webpackJsonp([0,3],[function(e,t,n){"use strict";var r=n(1).default;n(2041);var a=n(1248),i=r(a);i.default.start()},,function(e,t,n){"use strict";function r(){var e=s.default.initial(arguments).concat({escape:!0});return new l.default.SafeString(d.default.apply(d.default,e))}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(6),l=a(o),u=n(5),d=a(u);t.default=r,e.exports=t.default},,function(e,t,n){"use strict";e.exports=n(366)},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(291),i=r(a);t.default=function(){return i.default.t.apply(i.default,arguments)},e.exports=t.default},function(e,t,n){e.exports=n(2035)},function(e,t,n){"use strict";var r=n(1951).default;t.default="function"==typeof r&&r.for&&r.for("react.element")||60103,t.__esModule=!0},,,function(e,t){"use strict";t.default=function(e,t){if(e)for(var n in e)"undefined"==typeof t[n]&&(t[n]=e[n]);return t},t.__esModule=!0},,,,function(e,t,n){"use strict";function r(e,t){
if(!t)return e;var n={};return t.forEach(function(t){n[t]=function(){return e[t].apply(e,arguments)}}),n}function a(e,t){if(e.hasOwnProperty(t)){var n=e[t];n&&b.default.isFunction(n.destroy)&&n.destroy(),delete e[t]}}function i(e){for(var t in e)a(e,t)}function s(e,t,n){_[e]=r(t,n);var a=I[e];a&&(delete I[e],a.resolve(_[e]))}function o(e,t,n){h(e)||s(e,t(),n)}function l(e){b.default.each(e,function(e,t){var n=void 0,r=void 0;b.default.isArray(e)?(n=e[0],r=e[1]):n=e,s(t,n,r)})}function u(e){b.default.each(e,function(e,t){
var n=void 0,r=void 0;b.default.isArray(e)?(n=e[0],r=e[1]):n=e,o(t,n,r)})}function d(e){return h(e)?w.default.Deferred().resolve(_[e]).promise():(I[e]||(I[e]=w.default.Deferred()),I[e].promise())}function c(e,t,n){_.hasOwnProperty(e)&&(T[e]=_[e]),s(e,t,n)}function f(e){T.hasOwnProperty(e)&&(a(_,e),s(e,T[e]),delete T[e])}function p(){i(_),i(T)}function h(e){return _.hasOwnProperty(e)}function v(e){return _[e]}function g(e){var t=v(e);if(b.default.isFunction(t)){for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];
return t.apply(void 0,r)}}var m=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.register=s,t.registerOnce=o,t.registerAll=l,t.registerAllOnce=u,t.waitFor=d,t.swapIn=c,t.swapOut=f,t.reset=p,t.hasRegistered=h,t.resolve=v,t.execute=g;var y=n(3),b=m(y),P=n(8),w=m(P),S=n(41),_=(m(S),{}),T={},I={}},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 r(e,t){return e===t}function a(e){var t=arguments.length<=1||void 0===arguments[1]?r:arguments[1],n=null,a=null;
return function(){for(var r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null!==n&&n.length===i.length&&i.every(function(e,r){return t(e,n[r])})?a:(n=i,a=e.apply(void 0,i))}}function i(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,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return function(){for(var t=arguments.length,a=Array(t),s=0;s<t;s++)a[s]=arguments[s];var o=0,l=a.pop(),u=i(a),d=e.apply(void 0,[function(){return o++,l.apply(void 0,arguments)}].concat(r)),c=function(e,t){for(var r=arguments.length,a=Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i];var s=u.map(function(n){return n.apply(void 0,[e,t].concat(a))});return d.apply(void 0,n(s))};return c.resultFunc=l,c.recomputations=function(){
return o},c.resetRecomputations=function(){return o=0},c}}function o(){return s(a).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),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(e,t,r){
return e[n[r]]=t,e},{})})}t.__esModule=!0,t.defaultMemoize=a,t.createSelectorCreator=s,t.createSelector=o,t.createStructuredSelector=l},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 r=n(789).default;t.default=function(e,t,n){for(var a=!0;a;){var i=e,s=t,o=n;l=d=u=void 0,a=!1,null===i&&(i=Function.prototype);var l=r(i,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 d=Object.getPrototypeOf(i);if(null===d)return;e=d,t=s,n=o,a=!0}},t.__esModule=!0},function(e,t,n){"use strict";var r=n(788).default,a=n(1950).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=r(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(a?a(e,t):e.__proto__=t)},t.__esModule=!0},function(e,t){"use strict";
t.default=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},t.__esModule=!0},function(e,t,n){"use strict";function r(e){return!0}function a(e){return d.default.isObject(e)&&!d.default.isArray(e)}function i(e,t){t||(t={});var n=d.default.defaults(t,{typeName:e,parse:d.default.bind(f.default.parseType,f.default,e),stringify:d.default.bind(f.default.stringifyType,f.default,e)});return n.validate=t.validate?s(t.validate):r,n.isRequired=d.default.extend({},n,{
validate:function(e){return null!=e&&n.validate(e)}}),n}function s(e){return function(t){return null==t||e(t)}}var o=n(1945).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(3),d=l(u),c=n(49),f=l(c),p=["boolean","integer","float","string","object","array"],h={any:i("any"),"boolean":i("boolean",{validate:d.default.isBoolean}),integer:i("integer",{validate:o}),"float":i("float",{validate:d.default.isNumber}),string:i("string",{validate:d.default.isString}),object:i("object",{
validate:a}),array:i("array",{validate:d.default.isArray}),list:i("list",{validate:d.default.isArray}),encodedString:i("encodedString",{validate:d.default.isString}),queryString:i("queryString",{validate:a}),instanceOf:function(){var e=d.default.toArray(arguments);return i("instanceOf",{validate:function(t){return d.default.some(e,function(e){return t instanceof e})}})},oneOf:function(){var e=d.default.toArray(arguments);return i("oneOf",{validate:function(t){return d.default.contains(e,t)}})},oneOfType:function(){
var e=d.default.toArray(arguments);return i("oneOfType",{validate:function(t){return d.default.some(e,function(e){return e.validate(t)})}})},custom:function(e){return i("custom",{validate:e})},getAttrTypeFor:function(e){if(null==e)return h.any;for(var t=0,n=p.length;t<n;t++){var r=p[t],a=h[r];if(a.validate(e))return a}return h.any}};t.default=h,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.connect=t.Provider=void 0;var a=n(2629),i=r(a),s=n(2630),o=r(s);
t.Provider=i.default,t.connect=o.default},function(e,t,n){"use strict";var r=n(79).default,a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(47),u=a(l),d=n(8),c=a(d),f=n(12),p=a(f),h=n(49),v=a(h),g=n(399),m=a(g),y=n(41),b=a(y),P=n(26),w=i(P),S=n(293),_=a(S),T=n(20),I=a(T),M=n(62),C=a(M),x=n(50),E=i(x),k=n(63),D=a(k),A=/^change:[\w]+$/,O=u.default.Model.extend({mixins:[_.default],name:"AbstractModel",responseType:C.default.xml,hasInitialRelations:!1,
_context:["parent","skipCache"],cache:null,cacheKey:function(e){return e[this.idAttribute]},constructor:function(e,t){e||(e={}),t||(t={});var n;if(this.initialize!==u.default.Model.prototype.initialize&&(n=this.initialize,this.initialize=function(){}),o.default.each(this.getContext(),function(e){var n=this.findOption(t,e);void 0!==n&&(this[e]=n)},this),!this.cache||this.findOption(t,"skipCache"))return u.default.Model.prototype.constructor.apply(this,arguments),this._initModel(t),void(n&&(n.apply(this,arguments),
this.initialize=n));var r=this.findOption(t,"onlyIfCached"),a=this.cache.getItemCacheKey(this,e),i=this.cache.get(a);return i?(this.uninitialize(),r||(this.mergeStrategy&&(i.isMergingAttributes=!0),t.parse?e=i.parse(e):o.default.extend(e,i._getRelations(this.syncedRelations,e)),i.set(e),i.isMergingAttributes=!1),o.default.each(this.getContext(),function(e){i.setContext(e,this[e]||i[e])},this),t.collection&&(i.collection=t.collection),i._computedEntityID&&i.updateEntity(),i):r?{}:(u.default.Model.prototype.constructor.apply(this,arguments),
this._initModel(t),n&&(n.apply(this,arguments),this.initialize=n),void this.cache.store(this,a))},uninitialize:function(){this.stopListening()},_initModel:function(e){D.default.get("shouldCreateStateTree")&&this.entityID&&(this.state=this.toState()),this._initRelations(e),this._initDerived(e),this._initState()},_initRelations:function(e){this._relationListeners={};var t=o.default.extend({},this.sessionRelations,this.syncedRelations);o.default.each(t,function(e,t){this._initRelation(e,t);var n=o.default.bind(this._initRelation,this,e,t);
this.on("change:"+t,n)},this),this.hasInitialRelations=!0,this.set(this._getRelations(this.sessionRelations,this.attributes)),e.parse||this.set(this._getRelations(this.syncedRelations,this.attributes))},_initRelation:function(e,t){var n=this._resolveRelationDefinition(e),r=n.relationClass,a=this.get(t),i=this.previous(t),s=a&&a instanceof r,l=i&&i instanceof r;l&&o.default.has(this._relationListeners,t)&&(i.off("all",this._relationListeners[t]),this._relationListeners[t]=null),s&&this._forwardRelationEvents(a,t);
},_initDerived:function(){o.default.each(this.derivedAttrs,this._setDerived,this)},_initState:function(){D.default.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 e=o.default.result(this,"context");return this._context.concat(e)},setContext:function(e,t){
if(this.getContext().indexOf(e)!==-1&&this[e]!==t){if(this[e]=t,this.hasDerived(e)){var n=this.derivedAttrs[e],r=n.call(this);this.set(e,r)}if("parent"!==e){var a=o.default.extend({},this.sessionRelations,this.syncedRelations);o.default.each(a,function(n,r){var a=this.get(r);a&&a.setContext(e,t)},this)}}},getScopedKey:function(e){return null!=e&&o.default.isFunction(this.cacheKey)?this.cacheKey(this.attributes)+"!"+e:e},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(){this.skipCache||((0,b.default)(this.entityType,this.name+" requires an `entityType`"),p.default.trigger("change:entity",{type:this.entityType,id:this._computedEntityID,model:this}))},toState:function(){var e=r(this.attributes),t=o.default.reduce(e,this.reduceState,{possibleEntityContainers:[]},this);return Object.defineProperty(t,"possibleEntityContainers",{
enumerable:!1}),this.entityID&&(this._computedEntityID=this.entityID(t)),t},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 e(e,n){var r=this.get(n);if(r){var a;a=t.excludeDefaults?r instanceof u.default.Collection?r.map(function(e){return(0,m.default)(o.default.result(e,"defaults"),e.toJSON(t))}):(0,m.default)(o.default.result(r,"defaults"),r.toJSON(t)):r.toJSON(t),
h[n]=a}}var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=this.syncedAttrs,r=this.sessionRelations,a=this.syncedRelations,i=this.attributes,s={};for(var l in i){var d=r&&o.default.has(r,l),f=a&&o.default.has(a,l),p=t.syncedOnly&&(!n||!o.default.has(n,l));d||f||p||(s[l]=i[l])}var h=c.default.extend(!0,{},s);return t.syncedOnly||o.default.each(r,e,this),o.default.each(a,e,this),h},clone:function(){var e=o.default.extend(o.default.pick(this,this.getContext()),{skipCache:!0});return new this.constructor(this.toJSON(),e)||null;
},copy:function(e){(0,b.default)(e instanceof this.constructor,"Only a model of the same type may be copied");var t=e.toJSON();return o.default.extend(t,this._getRelations(this.sessionRelations,t,{parse:!0}),this._getRelations(this.syncedRelations,t,{parse:!0})),this.set(t)},restoreDefaults:function(e){var t={};return o.default.each(this.attributes,function(e,n){this.derivedAttrs&&o.default.has(this.derivedAttrs,n)||(t[n]=void 0)},this),o.default.extend(t,this._getRelations(this.sessionRelations,{},{
reset:!0}),this._getRelations(this.syncedRelations,{},{reset:!0}),o.default.result(this,"defaults"),e),this.set(t)},set:function(e,t,n){var r;o.default.isObject(e)?(r=e,n=t):(r={})[e]=t,n||(n={});var a;return!this.isMergingAttributes&&n.merge&&this.mergeStrategy&&(a=!0,this.isMergingAttributes=!0),this.isMergingAttributes&&(r=this._mergeAttributes(r)),u.default.Model.prototype.set.call(this,r,n),a&&(this.isMergingAttributes=!1),this},hasAttr:function(e){var t=this.sessionAttrs&&o.default.has(this.sessionAttrs,e),n=this.syncedAttrs&&o.default.has(this.syncedAttrs,e);
return!(!t&&!n)},hasRelation:function(e){var t=this.sessionRelations&&o.default.has(this.sessionRelations,e),n=this.syncedRelations&&o.default.has(this.syncedRelations,e);return!(!t&&!n)},hasDerived:function(e){return!(!this.derivedAttrs||!o.default.has(this.derivedAttrs,e))},validate:function(e,t){var n=o.default.extend({},this.sessionAttrs,this.syncedAttrs,this.sessionRelations,this.syncedRelations),r=this._validateTypes(e,n);return r&&(0,b.default)(!1,r),r},parse:function(e,t){return t&&t.save?this.attributes:this.convert(e,t);
},convert:function(e,t){var n,r=e,a=o.default.result(this,"responseType");o.default.isString(r)&&(n=!0,o.default.isFunction(this.augmentResponseText)&&(r=this.augmentResponseText(r,a)),r=a.parse(r),a===C.default.json&&(r=v.default.splitChildren(r))),o.default.isFunction(this.augmentResponse)&&(r=this.augmentResponse(r,a)),n&&this.rootPropertyName&&o.default.has(r,this.rootPropertyName)&&(r=r[this.rootPropertyName]),o.default.isArray(r)&&(r=o.default.first(r));var i,s={};o.default.each(this.sessionAttrs,function(e,t){
o.default.has(r,t)&&(s[t]=r[t])}),o.default.each(this.syncedAttrs,function(e,t){if(o.default.has(r,t)){var n,a=e;a.typeName||(a=e.type,n=o.default.omit(e,"type")),s[t]=a===I.default.string?r[t]:a.parse(r[t],n)}else this.has(t)&&(i||(i=o.default.result(this,"defaults")),s[t]=i&&o.default.has(i,t)?i[t]:void 0)},this);var l=o.default.extend({},t,{parse:!0});return o.default.extend(s,this._getRelations(this.syncedRelations,r,l)),s},save:function(e,t,n){var r;null==e||"object"==typeof e?(r=e,n=t):(r={})[e]=t;
var a=o.default.extend({save:!0},n),i=o.default.extend(this.getSaveParams(r),a.data);if(o.default.isEmpty(i))return a.success&&a.success(this),c.default.Deferred().resolve(this);a.data=i;var s=a.success;return a.success=function(e,t,n){e.cache&&e.cache.store(e),s&&s(e,t,n)},u.default.Model.prototype.save.call(this,r,a)},sync:function(e,t,n){var r=n?o.default.clone(n):{};if("create"===e||"update"===e){var a=r.data,i=r.url||o.default.result(this,"saveUrl")||o.default.result(this,"syncUrl")||o.default.result(this,"url");
r.url=w.join(i,a),r.data=""}return u.default.Model.prototype.sync.call(this,e,t,r)},getSaveParams:function(e){var t=this._getSaveAttrs(e),n=o.default.reduce(t,function(e,t,n){var r=t.definition,a=t.value,i=n;if(!r)return e[i]=a,e;var s=r.relationClass;if(s){var l,u=s.prototype.model;r.rootPropertyName?l=r.rootPropertyName:a.rootPropertyName?l=a.rootPropertyName:u&&u.prototype&&(l=u.prototype.rootPropertyName),a=a.getSaveParams(),l&&(i=l)}else{var d,c;o.default.has(r,"type")?(d=r.type,c=o.default.omit(r,"type")):d=r,
a=d.stringify(a,c)}return e[i]=a,e},{},this);return n},startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void(0,b.default)(!1,this.name+" is already capturing events");var e=this.set,t=[],n=o.default.clone(this.attributes);this.set=function(n,r,a){var i,s=o.default.extend({},a,{silent:!0});return"object"==typeof n?(i=n,a=r):(i={})[n]=r,o.default.each(i,function(n,r){this.get(r)!==n&&(t.push({key:r,value:n}),e.call(this,r,n,s))},this),o.default.each(this._derivedListeners,function(n){
var r=n.key,a=this.derivedAttrs[r],i=a.call(this);this.get(r)!==i&&(t.push({key:r,value:i}),e.call(this,r,i,s))},this),this},this.releaseCapturedChangeEvents=function(){this.set=e,this.releaseCapturedChangeEvents=null,this.discardCapturedChangeEvents=null,this._previousAttributes=n,this._changing=!0,o.default.each(t,function(e){this.trigger("change:"+e.key,this,e.value)},this),this._changing=!1,o.default.isEmpty(t)||this.trigger("change",this,{})},this.discardCapturedChangeEvents=function(){this.set=e,
this.releaseCapturedChangeEvents=null,this.discardCapturedChangeEvents=null,t.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},_mergeAttributes:function(e){var t=this.mergeStrategy;if(!t)return e;var n=o.default.reduce(e,function(e,n,r){return e[r]=t(r,this.get(r),n),e},{},this);return n},_resolveRelationDefinition:function(e){return o.default.isFunction(e)?e.call(this):e;
},_getRelations:function(e,t,n){t||(t={}),n||(n={});var r={};return o.default.each(e,function(e,a){var i=this._resolveRelationDefinition(e),s=i.relationClass;(0,b.default)(s,this.name+" requires a `relationClass` for the "+a+" relation");var l=a;n.parse&&!o.default.has(t,a)&&o.default.has(i,"rootPropertyName")&&(l=i.rootPropertyName);var d=t[l];if(d instanceof s)return void(r[a]=d);if(!d&&i.deferred)return void(r[a]=void 0);var c=n.reset?null:this.get(a),f=c instanceof s,p=s.prototype instanceof u.default.Collection;
if(p?d=v.default.parseArray(d):d||(d={}),f){c.isMergingAttributes=this.isMergingAttributes;var h=i.setOptions;o.default.isFunction(h)&&(h=h.call(this,n)),p?c.set(d,o.default.extend({parse:n.parse,remove:!this.isMergingAttributes},h)):(n.parse&&(d=c.parse(d)),c.set(d,h)),c.isMergingAttributes=!1}else{var g={parse:n.parse};if(o.default.each(this.getContext(),function(e){g[e]=this[e]},this),!p){var m=i.attrs;o.default.isFunction(m)&&(m=m.call(this,t)),d=o.default.extend({},d,m)}var y=i.options;o.default.isFunction(y)&&(y=y.call(this,t)),
o.default.extend(g,{parent:this},y),c=new s(d,g)}r[a]=c},this),r},_forwardRelationEvents:function(e,t){function n(){var n=arguments[0];if("change"!==n){if("statechange"===n)return void(this.shouldUpdateRelationState.apply(this,o.default.rest(arguments,1))&&E.scheduleUpdate(this.updateState,this));var a=o.default.toArray(arguments);a[0]="change:"+t+"."+n,this.trigger.apply(this,a),o.default.contains(r,n)||(this.trigger("change:"+t+".change",this,e),this.trigger("change",this))}}var r=["sync","request","sort","invalid","error","add","remove"];
e.on("all",n,this),this._relationListeners[t]=n},_setDerived:function(e,t){var n,r=this.spyOnGet(function(){var r=this.set;this.set=function(){(0,b.default)(!1,this.name+" blocked `set` in the "+t+" attribute. Derived attributes are read-only.")},n=e.call(this),this.set=r});this.set(t,n),o.default.each(r,function(n){this._addDerivedListener(t,n,e)},this)},_addDerivedListener:function(e,t,n){this._derivedListeners||(this._derivedListeners=[]);var r={key:e,name:t,callback:o.default.bind(this._setDerived,this,n,e)
},a=o.default.findWhere(this._derivedListeners,{key:e,name:r.name});a||(this._derivedListeners.push(r),this.on(r.name,r.callback))},_getSaveAttrs:function(e){var t;if(e)t=o.default.reduce(e,function(e,t,n){return e[n]={definition:this.syncedAttrs[n],value:t},e},{},this);else{var n=o.default.extend({},this.syncedAttrs,this.syncedRelations);t=o.default.reduce(n,function(e,t,n){var r=this._resolveRelationDefinition(t),a=r.save;return o.default.isFunction(a)&&(a=a.call(this)),a&&(e[n]={definition:r,value:this.get(n)
}),e},{},this)}return t},_validateTypes:function(e,t){var n=r(e),a=o.default.reduce(n,function(n,r){if(this.hasDerived(r))return n;if(!o.default.has(t,r))return n.push(this.name+" received an unknown attribute: "+r+". All attributes must be defined in `sessionAttrs`, `syncedAttrs`, `sessionRelations`, or `syncedRelations`."),n;var a,i=e[r],s=this._resolveRelationDefinition(t[r]),l=s.relationClass;a=l?this.hasInitialRelations?I.default.instanceOf(l):l.prototype instanceof u.default.Collection?I.default.oneOfType(I.default.array,I.default.object):I.default.object:s.type?s.type:s;
var d=a.validate;return d?d(i)||n.push(r+" of type "+a.typeName+" has an invalid value: "+JSON.stringify(i)):n.push(r+" has an unknown type. Specify the type in the attribute definition or use attrTypes.any as a wildcard type."),n},[],this);if(a.length>0)return a.join("\n")},onEvent:function(e){A.test(e)&&E.scheduleUpdate(this.updateState,this)}});t.default=O,e.exports=t.default},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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(903),i=r(a);t.autobind=i.default;var s=n(1081),o=r(s);t.after=o.default;var l=n(1082),u=r(l);t.compose=u.default;var d=n(1083),c=r(d);t.debounce=c.default;var f=n(1084),p=r(f);t.memoize=p.default;var h=n(1085),v=r(h);t.once=v.default;var g=n(616),m=r(g);t.throttle=m.default},function(e,t,n){"use strict";var r=n(279).default;t.default=function(){function e(e,t,n){
for(var a=0;a<t.length;a++){var i=t[a],s=i.decorators,o=i.key;if(delete i.key,delete i.decorators,i.enumerable=i.enumerable||!1,i.configurable=!0,("value"in i||i.initializer)&&(i.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 "+i.key+" is of the invalid type "+typeof u);i=u(e,o,i)||i}if(void 0!==i.initializer){n[o]=i;continue}}r(e,o,i)}}return function(t,n,r,a,i){return n&&e(t.prototype,n,a),r&&e(t,r,i),t}}(),t.__esModule=!0;
},,function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(41),o=r(s),l=n(32),u=r(l),d={_map:{},register:function(e,t){(0,o.default)(i.default.isFunction(t),'The "'+e+'" command must be a function'),this._map[e]=t},registerAll:function(e){var t=this;i.default.each(e,function(e,n){"__esModule"!==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,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return t.apply(void 0,r)}}};t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(47),l=r(o),u=n(8),d=r(u),c=n(41),f=(r(c),n(26)),p=a(f),h=n(49),v=r(h),g=n(293),m=r(g),y=n(62),b=r(y),P=n(50),w=a(P),S=n(63),_=r(S),T=l.default.Collection.extend({mixins:[m.default],responseType:b.default.xml,
instanceOptions:["url","path","pageStart","pageSize","persistInCache","skipCache"],_context:["parent"],cache:null,cacheKey:function(){return s.default.result(this,"url")},constructor:function(e,t){t||(t={}),s.default.each(this.getContext(),function(e){var n=t[e];void 0!==n&&this.setContext(e,n)},this);var n=s.default.result(this,"instanceOptions");if(s.default.each(n,function(e){s.default.has(t,e)&&(this[e]=t[e])},this),null==this.pageStart&&null==this.pageSize||(this.pageStart||(this.pageStart=0),
this.pageSize||(this.pageSize=0)),t.populated&&this.resetPopulatePromise(d.default.Deferred().resolve().promise()),!this.cache||this.skipCache)return l.default.Collection.prototype.constructor.apply(this,arguments),void this._initState();this.initialize.apply(this,arguments);var r=this.cache.getItemCacheKey(this),a=this.cache.get(r);return this.uninitialize(),a?a:t.onlyIfCached?{}:(l.default.Collection.prototype.constructor.apply(this,arguments),this._initState(),void this.cache.store(this,r))},uninitialize:function(){
this.stopListening()},_initState:function(){_.default.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 e=s.default.result(this,"context");return this._context.concat(e)},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),l.default.sync.apply(this,arguments)},syncUrl:function(){var e="";if(this.url&&(e=s.default.result(this,"url")),
this.path&&(e=p.join([e,s.default.result(this,"path")])),null!=this.pageStart||null!=this.pageSize){var t={"X-Plex-Container-Start":this.pageStart||0,"X-Plex-Container-Size":this.pageSize||0};e=p.join(e,t)}return e},parse:function(e,t){return this.convert(e)},convert:function(e){var t=e;if(s.default.isString(t)){var n=s.default.result(this,"responseType");s.default.isFunction(this.augmentResponseText)&&(t=this.augmentResponseText(t,n)),t=n.parse(t),n===b.default.json&&(t=v.default.splitChildren(t));
}if(s.default.isFunction(this.augmentResponse)&&(t=this.augmentResponse(t)),s.default.isArray(t))return t;var r=this.model.prototype.rootPropertyName;if(!r)return t;var a=t[r];return a?(s.default.isArray(a)||(a=[a]),a):[]},clone:function(e){e||(e=this.models);var t=s.default.result(this,"instanceOptions"),n=s.default.extend(s.default.pick(this,t),s.default.pick(this,this.getContext()),{skipCache:!0,persistInCache:!1});return new this.constructor(e,n)||null},cloneDeep:function(e){e||(e=this.models);
var t=s.default.map(e,function(e){return e.clone()});return this.clone(t)},clear:function(e){e=s.default.extend({silent:!0},e),this.abortPendingPopulate(),this.resetPopulatePromise(null),this.reset([],e)},getSaveParams:function(){return this.map(function(e){return e.getSaveParams()})},onCollectionChange:function(){w.scheduleUpdate(this.updateState,this)},onStateChange:function(e,t,n){e!==this&&this.shouldUpdateModelState(e,t,n)&&w.scheduleUpdate(this.updateState,this)}});t.default=T,e.exports=t.default;
},function(e,t,n){"use strict";function r(e,t){var n=l.default.partials[e],r=s.default.extend({},t.hash.context||this,t.hash);return new l.default.SafeString(n(r))}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(6),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(1162),i=r(a);t.directions=i;var s=n(426),o=r(s);t.kinds=o;var l=n(251),u=r(l);t.sizes=u;var d=n(1163),c=r(d);
t.scrollDirections=c;var f=n(1164),p=r(f);t.tooltipAttachments=p;var h=n(1938),v=r(h);t.recordingScheduleViewTypes=v},function(e,t,n){"use strict";function r(e,t,n){var r=(0,s.default)(e.props,t),a=(0,s.default)(e.state,n),i=!r||!a;return i}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(320),s=a(i);e.exports=t.default},,function(e,t,n){var r,a;/*!
	  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 r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===a)for(var s in r)i.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(r=[],a=function(){return n}.apply(t,r),!(void 0!==a&&(e.exports=a)))}()},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(11).default,l=n(19).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(61),p=u(f),h=n(33),v=u(h),g=n(41),m=u(g),y=n(24),b=n(31),P=u(b),w=n(30),S=n(783),_=n(2060),T=u(_),I=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),(0,m.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 a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,P.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,r=t.to,a=t.target,i=t.isDisabled,n=t.onTouchEnd;this._isActive&&!i&&(!r||a&&"_self"!==a||(e.preventDefault(),
window.location.href=r),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,r=e.kind,a=e.size,i=e.isSelected,s=e.isDisabled,u=e.component,d=l(e,["className","to","kind","size","isSelected","isDisabled","component"]),f=this.state,p=f.isActive,h=f.isFocused,g={},m=u;
return n?(m="a",g.href=n,g["aria-role"]="link"):g["aria-role"]="button",g.className=(0,v.default)(t,T.default.link,T.default[r],a&&T.default[a],i&&T.default.isSelected,p&&S.IS_ACTIVE,h&&S.IS_FOCUSED,s&&S.IS_DISABLED),"button"!==m&&"input"!==m||(g.type=d.type||"button",g.disabled=s),c.default.createElement(m,o({},d,g,{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}(d.Component);I.propTypes={component:d.PropTypes.string,className:d.PropTypes.string,to:d.PropTypes.string,target:d.PropTypes.string,kind:d.PropTypes.oneOf(w.kinds.all),size:d.PropTypes.oneOf(w.sizes.all),isSelected:d.PropTypes.bool,isDisabled:d.PropTypes.bool,allowFocusOnPress:d.PropTypes.bool,onPress:d.PropTypes.func,onTouchStart:d.PropTypes.func,onTouchMove:d.PropTypes.func,onTouchEnd:d.PropTypes.func,onTouchCancel:d.PropTypes.func,
onMouseDown:d.PropTypes.func,onMouseUp:d.PropTypes.func,onMouseLeave:d.PropTypes.func,onClick:d.PropTypes.func,onFocus:d.PropTypes.func,onBlur:d.PropTypes.func},I.defaultProps={component:"button",kind:w.kinds.DEFAULT,isSelected:!1,isDisabled:!1,allowFocusOnPress:!1},t.default=I,e.exports=t.default},,function(e,t,n){"use strict";function r(e){var t=e["aria-label"],n=e.className,r=e.name,i=e.style;return{$$typeof:a,type:"i",key:null,ref:null,props:{className:n?(0,l.default)(r,n):r,"aria-hidden":!t,
"aria-label":t,style:i},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(33)),l=i(o);r.propTypes={"aria-label":s.PropTypes.string,className:s.PropTypes.string,style:s.PropTypes.object,name:s.PropTypes.string.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=m.get(e);if(!t)return[];var n=d.default.compact(d.default.map(g,function(e){if(t.hasOwnProperty(e))return m.get(t[e])}));return n.unshift(t),
n}function a(e){var t=m.get(e);if(t){var n=t.grandparent||t.parent;return n?m.get(n):t}}function i(e){var t=m.get(e);if(t){var n=t.grandchild||t.child;return n?m.get(n):t}}function s(e){var t=i(e);return!!t&&t.typeString!==e}var o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(3),d=l(u),c=n(202),f=l(c),p=n(5),h=l(p),v=["id","typeString"],g=["grandparent","parent","child","grandchild"],m=(0,f.default)(v,[{id:1,typeString:"movie",title:function(){return(0,h.default)("Movie");
},plural:function(){return(0,h.default)("Movies")},element:"video"},{id:2,typeString:"show",title:function(){return(0,h.default)("Show")},plural:function(){return(0,h.default)("Shows")},element:"directory",child:3,grandchild:4},{id:3,typeString:"season",title:function(){return(0,h.default)("Season")},plural:function(){return(0,h.default)("Seasons")},element:"directory",parent:2,child:4},{id:4,typeString:"episode",title:function(){return(0,h.default)("Episode")},plural:function(){return(0,h.default)("Episodes");
},element:"video",grandparent:2,parent:3},{id:5,typeString:"trailer",title:function(){return(0,h.default)("Trailer")},plural:function(){return(0,h.default)("Trailers")},element:"video"},{id:6,typeString:"comic",title:function(){return(0,h.default)("Comic")},plural:function(){return(0,h.default)("Comics")},element:"photo"},{id:7,typeString:"person",title:function(){return(0,h.default)("Person")},plural:function(){return(0,h.default)("People")},element:"directory"},{id:8,typeString:"artist",title:function(){
return(0,h.default)("Artist")},plural:function(){return(0,h.default)("Artists")},element:"directory",child:9,grandchild:10},{id:9,typeString:"album",title:function(){return(0,h.default)("Album")},plural:function(){return(0,h.default)("Albums")},element:"directory",parent:8,child:10},{id:10,typeString:"track",title:function(){return(0,h.default)("Track")},plural:function(){return(0,h.default)("Tracks")},element:"audio",grandparent:8,parent:9},{id:11,typeString:"picture",title:function(){return(0,h.default)("Picture");
},plural:function(){return(0,h.default)("Pictures")},element:"photo"},{id:12,typeString:"clip",title:function(){return(0,h.default)("Clip")},plural:function(){return(0,h.default)("Clips")},element:"video"},{id:13,typeString:"photo",title:function(){return(0,h.default)("Photo")},plural:function(){return(0,h.default)("Photos")},element:"photo",parent:14},{id:14,typeString:"photoAlbum",title:function(){return(0,h.default)("Photo Album")},plural:function(){return(0,h.default)("Photo Albums")},element:"directory",
child:13},{id:15,typeString:"playlist",title:function(){return(0,h.default)("Playlist")},plural:function(){return(0,h.default)("Playlists")},element:"directory"},{id:16,typeString:"playlistFolder",title:function(){return(0,h.default)("Playlist")},plural:function(){return(0,h.default)("Playlists")},element:"directory",child:15},{id:1001,typeString:"userPlaylistItem",title:function(){return(0,h.default)("Clip")},plural:function(){return(0,h.default)("Clips")},element:"video"}]);t.default=o({},m,{getRelatedMediaTypes:r,
getLibraryType:a,getChildMediaType:i,typeHasChildMedia:s}),e.exports=t.default},function(e,t,n){"use strict";var r=n(279).default;t.default=function(e,t,n){return t in e?r(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},t.__esModule=!0},function(e,t,n){"use strict";function r(e,t,n,r,a,i,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,r,a,i,s,o],d=0;
l=new Error(t.replace(/%s/g,function(){return u[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}}e.exports=r},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(94),i=r(a),s=new i.default({"interface":["get","save","populate"]});t.default=s,e.exports=t.default},,function(e,t,n){"use strict";var r=n(222).default,a=n(223).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(394);r(t,a(i,r));var s="SHOW_ALERT";t.SHOW_ALERT=s;
var o="SAVE_SETTINGS";t.SAVE_SETTINGS=o;var l="DOWNLOAD_SERVER";t.DOWNLOAD_SERVER=l;var u="DISCOVER_SERVERS";t.DISCOVER_SERVERS=u;var d="REDIRECT_TO_ROUTE";t.REDIRECT_TO_ROUTE=d;var c="REDIRECT_TO_HTTP";t.REDIRECT_TO_HTTP=c;var f="GARBAGE_COLLECT_ENTITIES";t.GARBAGE_COLLECT_ENTITIES=f;var p="SELECT_ITEM";t.SELECT_ITEM=p;var h="SELECT_MODELS";t.SELECT_MODELS=h;var v="DESELECT_ALL_ITEMS";t.DESELECT_ALL_ITEMS=v;var g="DESELECT_MODELS";t.DESELECT_MODELS=g;var m="DESELECT_COLLECTION";t.DESELECT_COLLECTION=m;
var y="SELECT_RANGE";t.SELECT_RANGE=y;var b="DESELECT_RANGE";t.DESELECT_RANGE=b;var P="PLAY_SELECTED_ITEMS";t.PLAY_SELECTED_ITEMS=P;var w="ADD_SELECTED_ITEMS_TO_PLAYLIST";t.ADD_SELECTED_ITEMS_TO_PLAYLIST=w;var S="UPDATE_SELECTED_ITEMS_WATCHED_STATUS";t.UPDATE_SELECTED_ITEMS_WATCHED_STATUS=S;var _="EDIT_SELECTED_ITEMS";t.EDIT_SELECTED_ITEMS=_;var T="REFRESH_SELECTED_ITEMS";t.REFRESH_SELECTED_ITEMS=T;var I="ANALYZE_SELECTED_ITEMS";t.ANALYZE_SELECTED_ITEMS=I;var M="SYNC_METADATA_ITEMS";t.SYNC_METADATA_ITEMS=M;
var C="OPTIMIZE_METADATA_ITEMS";t.OPTIMIZE_METADATA_ITEMS=C;var x="MERGE_SELECTED_ITEMS";t.MERGE_SELECTED_ITEMS=x;var E="DELETE_SELECTED_ITEMS";t.DELETE_SELECTED_ITEMS=E;var k="FETCH_PLANS";t.FETCH_PLANS=k;var D="POPULATE_PLANS";t.POPULATE_PLANS=D;var A="REPOPULATE_UNWATCHED_WATCH_LATER_LIST";t.REPOPULATE_UNWATCHED_WATCH_LATER_LIST=A;var O="REPOPULATE_UNWATCHED_RECOMMENDED_LIST";t.REPOPULATE_UNWATCHED_RECOMMENDED_LIST=O;var R="UPDATE_USER";t.UPDATE_USER=R;var L="CLEAR_UPDATE_USER_ERROR";t.CLEAR_UPDATE_USER_ERROR=L;
var N="TEST_SERVER";t.TEST_SERVER=N;var j="SET_RELAY_REMINDER";t.SET_RELAY_REMINDER=j;var U="FETCH_PROVIDERS";t.FETCH_PROVIDERS=U;var $="POPULATE_PROVIDERS";t.POPULATE_PROVIDERS=$;var z="FETCH_LIBRARIES";t.FETCH_LIBRARIES=z;var F="POPULATE_LIBRARIES";t.POPULATE_LIBRARIES=F;var B="ADD_LIBRARY";t.ADD_LIBRARY=B;var V="START_LIBRARY_REFRESH";t.START_LIBRARY_REFRESH=V;var H="SHARE_LIBRARIES";t.SHARE_LIBRARIES=H;var q="ENABLE_HTTP_FALLBACK";t.ENABLE_HTTP_FALLBACK=q;var W="OPTIMIZE_DATABASE";t.OPTIMIZE_DATABASE=W;
var G="CLEAN_BUNDLES";t.CLEAN_BUNDLES=G;var Y="EMPTY_TRASH";t.EMPTY_TRASH=Y;var Q="DELETE_SERVER";t.DELETE_SERVER=Q;var K="START_ACTIVITY";t.START_ACTIVITY=K;var X="UPDATE_ACTIVITY";t.UPDATE_ACTIVITY=X;var Z="FINISH_ACTIVITY";t.FINISH_ACTIVITY=Z;var J="EVENT_CONNECTION_OPEN";t.EVENT_CONNECTION_OPEN=J;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 re="PLAY_METADATA_LIST";
t.PLAY_METADATA_LIST=re;var ae="SHUFFLE_METADATA_LIST";t.SHUFFLE_METADATA_LIST=ae;var ie="ADD_METADATA_LIST_TO_PLAYLIST";t.ADD_METADATA_LIST_TO_PLAYLIST=ie;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 de="DESELECT_ALL_METADATA_LIST_ITEMS";t.DESELECT_ALL_METADATA_LIST_ITEMS=de;var ce="RESET_METADATA_LIST";
t.RESET_METADATA_LIST=ce;var fe="ADD_METADATA_ITEM_TO_PLAYLIST";t.ADD_METADATA_ITEM_TO_PLAYLIST=fe;var pe="ANALYZE_METADATA_ITEM";t.ANALYZE_METADATA_ITEM=pe;var he="DELETE_METADATA_ITEM";t.DELETE_METADATA_ITEM=he;var ve="DELETE_METADATA_ITEM_VERSION";t.DELETE_METADATA_ITEM_VERSION=ve;var ge="DOWNLOAD_METADATA_ITEM_VERSION";t.DOWNLOAD_METADATA_ITEM_VERSION=ge;var me="EDIT_METADATA_ITEM";t.EDIT_METADATA_ITEM=me;var ye="FIX_METADATA_ITEM_MATCH";t.FIX_METADATA_ITEM_MATCH=ye;var be="GET_METADATA_ITEM_INFO";
t.GET_METADATA_ITEM_INFO=be;var Pe="MARK_METADATA_ITEM_UNWATCHED";t.MARK_METADATA_ITEM_UNWATCHED=Pe;var we="MARK_METADATA_ITEM_WATCHED";t.MARK_METADATA_ITEM_WATCHED=we;var Se="OPTIMIZE_METADATA_ITEM";t.OPTIMIZE_METADATA_ITEM=Se;var _e="PLAY_METADATA_ITEM";t.PLAY_METADATA_ITEM=_e;var Te="PLAY_METADATA_ITEM_VERSION";t.PLAY_METADATA_ITEM_VERSION=Te;var Ie="PLAY_RELATED_MIX";t.PLAY_RELATED_MIX=Ie;var Me="PLAY_PRIMARY_EXTRA";t.PLAY_PRIMARY_EXTRA=Me;var Ce="QUEUE_METADATA_ITEM";t.QUEUE_METADATA_ITEM=Ce;
var xe="RATE_METADATA_ITEM";t.RATE_METADATA_ITEM=xe;var Ee="RECOMMEND_METADATA_ITEM";t.RECOMMEND_METADATA_ITEM=Ee;var ke="REFRESH_METADATA_ITEM";t.REFRESH_METADATA_ITEM=ke;var De="SHARE_METADATA_ITEM";t.SHARE_METADATA_ITEM=De;var Ae="SPLIT_METADATA_ITEM_APART";t.SPLIT_METADATA_ITEM_APART=Ae;var Oe="SYNC_METADATA_ITEM";t.SYNC_METADATA_ITEM=Oe;var Re="UNMATCH_METADATA_ITEM";t.UNMATCH_METADATA_ITEM=Re;var Le="WATCH_METADATA_ITEM_LATER";t.WATCH_METADATA_ITEM_LATER=Le;var Ne="REPOPULATE_PAGE";t.REPOPULATE_PAGE=Ne;
var je="VIEW_ITEM_DETAILS";t.VIEW_ITEM_DETAILS=je;var Ue="INIT_DASHBOARD_PAGE";t.INIT_DASHBOARD_PAGE=Ue;var $e="CLEAR_DASHBOARD_PAGE";t.CLEAR_DASHBOARD_PAGE=$e;var ze="FETCH_HUBS";t.FETCH_HUBS=ze;var Fe="POPULATE_HUBS";t.POPULATE_HUBS=Fe;var Be="INIT_METADATA_LIST_PAGE";t.INIT_METADATA_LIST_PAGE=Be;var Ve="CLEAR_METADATA_LIST_PAGE";t.CLEAR_METADATA_LIST_PAGE=Ve;var He="INIT_LIBRARY_PAGE";t.INIT_LIBRARY_PAGE=He;var qe="CLEAR_LIBRARY_PAGE";t.CLEAR_LIBRARY_PAGE=qe;var We="FETCH_LIBRARY_METADATA_TYPES";
t.FETCH_LIBRARY_METADATA_TYPES=We;var Ge="POPULATE_LIBRARY_METADATA_TYPES";t.POPULATE_LIBRARY_METADATA_TYPES=Ge;var Ye="FETCH_LIBRARY_FIRST_CHARACTERS";t.FETCH_LIBRARY_FIRST_CHARACTERS=Ye;var Qe="POPULATE_LIBRARY_FIRST_CHARACTERS";t.POPULATE_LIBRARY_FIRST_CHARACTERS=Qe;var Ke="SELECT_LIBRARY_FILTER";t.SELECT_LIBRARY_FILTER=Ke;var Xe="DESELECT_LIBRARY_FILTER";t.DESELECT_LIBRARY_FILTER=Xe;var Ze="FETCH_LIBRARY_FILTER_OPTIONS";t.FETCH_LIBRARY_FILTER_OPTIONS=Ze;var Je="POPULATE_LIBRARY_FILTER_OPTIONS";
t.POPULATE_LIBRARY_FILTER_OPTIONS=Je;var et="SEARCH_LIBRARY_FILTER_OPTIONS";t.SEARCH_LIBRARY_FILTER_OPTIONS=et;var tt="INIT_PRE_PLAY_PAGE";t.INIT_PRE_PLAY_PAGE=tt;var nt="INIT_PRE_PLAY_DESCENDANT_LIST";t.INIT_PRE_PLAY_DESCENDANT_LIST=nt;var rt="CLEAR_PRE_PLAY_PAGE";t.CLEAR_PRE_PLAY_PAGE=rt;var at="FETCH_PRE_PLAY_METADATA_ITEM";t.FETCH_PRE_PLAY_METADATA_ITEM=at;var it="FETCH_PRE_PLAY_RELATED_HUBS";t.FETCH_PRE_PLAY_RELATED_HUBS=it;var st="INIT_LIVE_TV_SETTINGS_PAGE";t.INIT_LIVE_TV_SETTINGS_PAGE=st;var ot="CLEAR_LIVE_TV_SETTINGS_PAGE";
t.CLEAR_LIVE_TV_SETTINGS_PAGE=ot;var lt="FETCH_DVRS";t.FETCH_DVRS=lt;var ut="REMOVE_DVR";t.REMOVE_DVR=ut;var dt="RELOAD_GUIDE";t.RELOAD_GUIDE=dt;var ct="CLEAR_DVR_SETUP";t.CLEAR_DVR_SETUP=ct;var ft="DVR_SETUP_NEXT_STEP";t.DVR_SETUP_NEXT_STEP=ft;var pt="DVR_SETUP_PREVIOUS_STEP";t.DVR_SETUP_PREVIOUS_STEP=pt;var ht="FETCH_DEVICES";t.FETCH_DEVICES=ht;var vt="SELECT_DEVICE";t.SELECT_DEVICE=vt;var gt="SELECT_DEVICE_SOURCE";t.SELECT_DEVICE_SOURCE=gt;var mt="DISCOVER_DEVICES";t.DISCOVER_DEVICES=mt;var yt="ADD_DEVICE";
t.ADD_DEVICE=yt;var bt="FETCH_DEVICE_DETAILS";t.FETCH_DEVICE_DETAILS=bt;var Pt="FETCH_DEVICE_CHANNELS";t.FETCH_DEVICE_CHANNELS=Pt;var wt="SCAN_DEVICE_CHANNELS";t.SCAN_DEVICE_CHANNELS=wt;var St="CANCEL_SCAN_DEVICE_CHANNELS";t.CANCEL_SCAN_DEVICE_CHANNELS=St;var _t="FIND_BEST_EPG_LINEUP";t.FIND_BEST_EPG_LINEUP=_t;var Tt="SELECT_EPG_LINEUP";t.SELECT_EPG_LINEUP=Tt;var It="FETCH_LINEUP_CHANNELS";t.FETCH_LINEUP_CHANNELS=It;var Mt="FETCH_CHANNEL_MAP";t.FETCH_CHANNEL_MAP=Mt;var Ct="ENABLE_DEVICE_CHANNEL";t.ENABLE_DEVICE_CHANNEL=Ct;
var xt="UPDATE_CHANNEL_MAPPING";t.UPDATE_CHANNEL_MAPPING=xt;var Et="SAVE_CHANNEL_MAP";t.SAVE_CHANNEL_MAP=Et;var kt="SAVE_DVR";t.SAVE_DVR=kt;var Dt="SAVE_DEVICE_SETTINGS";t.SAVE_DEVICE_SETTINGS=Dt;var At="CLEAR_DEVICE_SETTINGS_SAVE_ERROR";t.CLEAR_DEVICE_SETTINGS_SAVE_ERROR=At;var Ot="RESET_EPG_SETTINGS";t.RESET_EPG_SETTINGS=Ot;var Rt="FETCH_EPG_COUNTRIES";t.FETCH_EPG_COUNTRIES=Rt;var Lt="FETCH_EPG_LANGUAGES";t.FETCH_EPG_LANGUAGES=Lt;var Nt="SELECT_EPG_COUNTRY";t.SELECT_EPG_COUNTRY=Nt;var jt="SELECT_EPG_LANGUAGE";
t.SELECT_EPG_LANGUAGE=jt;var Ut="SELECT_EPG_REGION";t.SELECT_EPG_REGION=Ut;var $t="SET_EPG_POSTAL_CODE";t.SET_EPG_POSTAL_CODE=$t;var zt="INIT_RECORDING_SCHEDULE_PAGE";t.INIT_RECORDING_SCHEDULE_PAGE=zt;var Ft="CLEAR_RECORDING_SCHEDULE_PAGE";t.CLEAR_RECORDING_SCHEDULE_PAGE=Ft;var Bt="FETCH_MEDIA_SUBSCRIPTIONS";t.FETCH_MEDIA_SUBSCRIPTIONS=Bt;var Vt="MOVE_MEDIA_SUBSCRIPTION";t.MOVE_MEDIA_SUBSCRIPTION=Vt;var Ht="SET_VISIBLE_DAYS";t.SET_VISIBLE_DAYS=Ht;var qt="GO_TO_TODAY";t.GO_TO_TODAY=qt;var Wt="GO_TO_PREVIOUS_RANGE";
t.GO_TO_PREVIOUS_RANGE=Wt;var Gt="GO_TO_NEXT_RANGE";t.GO_TO_NEXT_RANGE=Gt;var Yt="FETCH_CALENDAR";t.FETCH_CALENDAR=Yt;var Qt="PLAY_RECORDING";t.PLAY_RECORDING=Qt;var Kt="INIT_MEDIA_SUBSCRIPTION_MODAL";t.INIT_MEDIA_SUBSCRIPTION_MODAL=Kt;var Xt="CLEAR_MEDIA_SUBSCRIPTION_MODAL";t.CLEAR_MEDIA_SUBSCRIPTION_MODAL=Xt;var Zt="FETCH_MEDIA_SUBSCRIPTION";t.FETCH_MEDIA_SUBSCRIPTION=Zt;var Jt="SAVE_MEDIA_SUBSCRIPTION";t.SAVE_MEDIA_SUBSCRIPTION=Jt;var en="CHANGE_MEDIA_SUBSCRIPTION_TEMPLATE_MODE";t.CHANGE_MEDIA_SUBSCRIPTION_TEMPLATE_MODE=en;
var tn="CLEAR_MEDIA_SUBSCRIPTION_MODAL_ERROR";t.CLEAR_MEDIA_SUBSCRIPTION_MODAL_ERROR=tn;var nn="MOVE_MEDIA_SUBSCRIPTION_MODAL";t.MOVE_MEDIA_SUBSCRIPTION_MODAL=nn;var rn="DELETE_MEDIA_SUBSCRIPTION_MODAL";t.DELETE_MEDIA_SUBSCRIPTION_MODAL=rn;var an="INIT_QUICK_SEARCH";t.INIT_QUICK_SEARCH=an;var sn="RESET_QUICK_SEARCH";t.RESET_QUICK_SEARCH=sn;var on="FETCH_QUICK_SEARCH";t.FETCH_QUICK_SEARCH=on;var ln="CHANGE_SEARCH_QUERY";t.CHANGE_QUICK_SEARCH_QUERY=ln;var un="CHANGE_SEARCH_SETTINGS";t.CHANGE_QUICK_SEARCH_SETTINGS=un;
var dn="SELECT_SEARCH_RESULT";t.SELECT_QUICK_SEARCH_RESULT=dn;var cn="NAVIGATE_SEARCH_RESULT";t.NAVIGATE_QUICK_SEARCH_RESULT=cn;var fn="PLAY_SEARCH_RESULT";t.PLAY_QUICK_SEARCH_RESULT=fn;var pn="POPULATE_SEARCH_PROVIDERS";t.POPULATE_SEARCH_PROVIDERS=pn;var hn="FETCH_SEARCH_PAGE";t.FETCH_SEARCH_PAGE=hn;var vn="CLEAR_SEARCH_PAGE";t.CLEAR_SEARCH_PAGE=vn},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(13),o=r(s),l=o.default.CollectionView.extend({
appendHtml:function(e,t,n){return this.sorted?this.sortedAppendHtml.apply(this,arguments):this.reversed?this.reversedAppendHtml.apply(this,arguments):o.default.CollectionView.prototype.appendHtml.apply(this,arguments)},sortedAppendHtml:function(e,t,n){if(e.isBuffering){var r=e.elBuffer.childNodes;r.length<=n?e.elBuffer.appendChild(t.el):e.elBuffer.insertBefore(t.el,r[n]),e._bufferedChildren.push(t)}else{var a=e.itemViewContainer?e.$(e.itemViewContainer):e.$el,i=a.children();i.size()<=n?a.append(t.el):i.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 r=e.itemViewContainer?e.$(e.itemViewContainer):e.$el;r.prepend(t.el)}},measureList:function(){if(this.children.length){var e=this.children._views,t=e[i.default.first(i.default.keys(e))];i.default.defer(i.default.bind(function(){this.itemWidth=t.$el.outerWidth(!0),this.itemHeight=t.$el.outerHeight(!0),this.itemMarginRight=parseInt(t.$el.css("margin-right"),10),
this.itemMarginBottom=parseInt(t.$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 e=this.children,t=this.collection.models,n=i.default.map(t,function(t,n){var r=e.findByModel(t);return r._index=n,r.el});this.$el.append(n)},onCollectionRendered:function(){this.measure&&this.measureList()}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";
var r=n(279).default;t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),r(e,a.key,a)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t.__esModule=!0},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2417),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(54),c=r(d),f=c.default.extend({className:"confirm-modal modal modal-sm fade",template:i.default,
ui:{doubleConfirmMessage:".double-confirm-message",confirmBtn:".confirm-btn",confirmLabel:".confirm-btn .btn-label"},events:o.default.extend({"click .confirm-btn":"onConfirm"},c.default.prototype.events),whitelistedOptions:["title","message","confirmLabel","cancelLabel","hasDanger","hideCancel"],initialize:function(e){c.default.prototype.initialize.apply(this,arguments),this.async=e.async,this.data=o.default.pick(e,this.whitelistedOptions),this.promise=u.default.Deferred()},serializeData:function(){
return o.default.defaults(this.data,{confirmLabel:"Yes",cancelLabel:"No"})},onRender:function(){c.default.prototype.onRender.apply(this,arguments),setTimeout(o.default.bind(function(){this.ui.confirmBtn.focus()},this),this.focusDelay)},onHide:function(e){c.default.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()}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){o.default.isArray(t)?o.default.each(t,e):e(t)}function a(e){return o.default.reduce(e,function(e,t){var n=t.split("="),r=n[0],a=n[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(i){c.default.warn("Unable to decode query string at "+r)}return e},{})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(509),u=i(l),d=n(32),c=i(d),f=new u.default((!1),"",(!0)),p={parseXML:function(e){if(!e)return{};var t=f.parseXmlString(e);if(!t)return c.default.warn("parseXML: No XML document created"),{};if(t.getElementsByTagName("parsererror").length)return c.default.warn("parseXML: Errors found while parsing XML document"),{};try{return f.xml2json(t);
}catch(n){return c.default.warn("parseXML: Unable to parse XML: "+n.message),{}}},replaceXMLElementNames:function(e,t,n){o.default.isArray(t)||(t=[t]);var r=t.join("|"),a=new RegExp("<("+r+")","g"),i=new RegExp("</("+r+")>","g");return e=e.replace(a,"<"+n+' elementName="$1"'),e=e.replace(i,"</"+n+">")},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(r){}}}e&&r(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&&r(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&&r(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&&r(n,t)},parseArray:function(e,t){function n(t){if(e.hasOwnProperty(t)){
var n=e[t];o.default.isArray(n)||(e[t]=[n])}else e[t]=[]}e&&r(n,t)},parseQueryString:function(e,t,n){function i(t){if(e.hasOwnProperty(t)){var r=e[t];if(!o.default.isObject(r))return o.default.isString(r)&&(r=r.trim().replace(/^(\?|#)/,""))?void(e[t]=a(r.split(n))):void(e[t]={})}}e&&(n||(n="&"),r(i,t))}};t.default=p,e.exports=t.default},,function(e,t,n){"use strict";function r(){return(0,i.createSelector)(function(e,t){var n=t.metadataItemEntityID;return n},o.default,function(e,t){return t[e]})}var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(15),s=n(301),o=a(s);e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(509),o=r(s),l=n(32),u=r(l),d=new o.default((!1),"",(!0)),c=["Directory","Video","Track","Photo","Playlist"],f=i.default.reduce(c,function(e,t){return e[t]="Metadata",e},{}),p={parseType:function(e,t,n){var r=this.getByType("parse",e,this._parseTypeMap);return r?r(t,n):t},
stringifyType:function(e,t,n){if(i.default.isString(t))return t;if(null==t)return"";var r=this.getByType("stringify",e,this._stringifyTypeMap);return r?r(t,n):t},getByType:function(e,t,n){if(n&&i.default.has(n,t))return n[t];var r=t.charAt(0).toUpperCase()+t.slice(1),a=e+r;return i.default.has(this,a)?(n[t]=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 u.default.warn("[Parser] Unable to parse encoded string"),e}},parseArray:function(e){return e?i.default.isArray(e)?e:[e]:[]},parseList:function(e){return e?i.default.isArray(e)?e:e.split(","):[];
},stringifyList:function(e){return e.join(",")},parseQueryString:function(e,t){if(t||(t={}),i.default.isObject(e))return e;if(!i.default.isString(e))return{};if(e=e.trim().replace(/^(\?|#)/,""),!e)return{};var n=t.separator||"&";return i.default.reduce(e.split(n),function(e,t){var n=t.split("="),r=n[0],a=n[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(i){u.default.warn("[Parser] Unable to decode query string at "+r);
}return e},{})},stringifyQueryString:function(e,t){t||(t={});var n=t.separator||"&",r=i.default.map(i.default.keys(e),function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])});return r.join(n)},parseJSON:function(e){try{return JSON.parse(e)}catch(t){var n=i.default.isString(e)?e.substring(0,50):"no response";return u.default.warn("[Parser] Unable to parse JSON: "+t.message+" ("+n+")"),{}}},parseXML:function(e){var t=d.parseXmlString(e);if(!t)return u.default.warn("[Parser] No XML document created"),
{};if(t.getElementsByTagName("parsererror").length)return u.default.warn("[Parser] Errors found while parsing XML document"),{};try{return d.xml2json(t)}catch(n){return u.default.warn("[Parser] Unable to parse XML: "+n.message),{}}},replaceXMLElementNames:function(e,t,n){i.default.isArray(t)||(t=[t]);var r=t.join("|"),a=new RegExp("<("+r+")","g"),s=new RegExp("</("+r+")>","g");return e=e.replace(a,"<"+n+' elementName="$1"'),e=e.replace(s,"</"+n+">")},replaceMetadataXMLElementNames:function(e){return this.replaceXMLElementNames(e,c,"Metadata");
},splitChildren:function(e){var t=e&&e._children;return i.default.isArray(t)&&(t.forEach(function(t){var n=t._elementType;if(t.elementName=n,n){var r=f[n]||n;e[r]||(e[r]=[]),e[r].push(this.splitChildren(t))}}.bind(this)),e._children=null),e},reset:function(){this._parseTypeMap={json:this.parseJSON,xml:this.parseXML},this._stringifyTypeMap={}}};p.reset(),t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(){P&&(P=clearTimeout(P))}function a(){w&&(w=clearTimeout(w))}function i(){
r(),a();var e=(0,h.default)(),t=void 0;for(m=!0;v.length&&(!t||t-e<y);)v.pop()(),t=(0,h.default)();m=!1,v.length?P=setTimeout(i,b):S&&(w=setTimeout(S,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(){r(),a(),m=!1,g=!1,S=null,v.length=0}function l(e){for(r(),a(),m=!0,g=!0;v.length;)v.pop()();if(e)try{e()}catch(t){(0,f.default)(!1,t.name+": "+t.message)}S&&S(),m=!1,g=!1}function u(e,t){return t.isStateTreeRoot?(S=e,
void(m||w||(w=setTimeout(S,b)))):g?void e():(a(),v[0]!==e&&v.unshift(e),void(m||P||(P=setTimeout(i,b))))}var d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.configure=s,t.resetUpdates=o,t.scheduleImmediateUpdate=l,t.scheduleUpdate=u;var c=n(41),f=d(c),p=n(646),h=d(p),v=[],g=!1,m=!1,y=1e3/60,b=1e3/60,P=void 0,w=void 0,S=void 0},function(e,t,n){"use strict";function r(e,t){var n=s.default.invert(e);return s.default.reduce(e,function(e,r){return e[r]=t[n[r]],e},{})}var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(35),l=a(o),u={playing:"playing",paused:"paused",stopped:"paused",error:"paused",buffering:"playing"},d=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=r(this.elements,this.types),this.elementByType=r(this.types,this.elements),this.typeByStream=r(this.streams,this.types),this.streamByType=r(this.types,this.streams),this.statebyCastState=r(this.castStates,this.states),this.castStateByState=r(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]}}),c=new d;t.default=c,e.exports=t.default},function(e,t,n){"use strict";var r=n(97),a=r;e.exports=a},,function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=0,p=[],h=u.default.Layout.extend({className:"modal fade",focusDelay:500,animationDelay:500,events:{"hide.bs.modal":"onHide"},initialize:function(e){this.once("render",function(){f+=1,c.default.trigger("anyModalOpen")}),this.once("close",function(){f-=1,0===f&&c.default.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(c.default,"shortcut:escape",i.default.bind(function(){p[0]===this&&this.hide()},this)),this.listenToOnce(this,"close",function(){var e=p.indexOf(this);e!==-1&&p.splice(e,1)}),p.unshift(this),this.$el.modal()),(0,o.default)(":focus").blur())},onHide:function(e){this.isHidden=!0,i.default.each(this.panes,function(e,t){var n=e.constructor.onModalClose;n&&n.apply(this)},this),setTimeout(i.default.bind(function(){
c.default.trigger("hide:modal",this),this.trigger("close")},this),this.animationDelay)}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.containerClassName,r=e.labelClassName,i=e.size,s=e.label,o=(0,l.default)(t,p.default[i]);return s?{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:"div",key:null,ref:null,props:{className:o},_owner:null},{$$typeof:a,type:"div",key:null,ref:null,props:{children:s,className:(0,l.default)(r,p.default.spinnerLabel)
},_owner:null}],className:(0,l.default)(n,p.default.spinnerContainer)},_owner:null}:{$$typeof:a,type:"div",key:null,ref:null,props:{className:o,"aria-label":(0,d.default)("Loading")},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(33)),l=i(o),u=n(5),d=i(u),c=n(30),f=n(2057),p=i(f);r.propTypes={className:s.PropTypes.string,containerClassName:s.PropTypes.string,labelClassName:s.PropTypes.string,label:s.PropTypes.string,size:s.PropTypes.oneOf(c.sizes.all)
},r.defaultProps={size:c.sizes.MEDIUM},t.default=r,e.exports=t.default},,function(e,t,n){"use strict";var r=n(224).default,a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(8),u=a(l),d=n(5),c=a(d),f=n(46),p=a(f),h=n(49),v=a(h),g=n(26),m=i(g),y=n(310),b=a(y),P=n(119),w=a(P),S=n(37),_=a(S),T=n(90),I=a(T),M=n(241),C=a(M),x=n(72),E=i(x),k=n(66),D=a(k),A=n(246),O=a(A),R=n(136),L=a(R),N=n(20),j=a(N),U=n(62),$=a(U),z=n(22),F=a(z),B=n(297),V=a(B),H=n(1002),q=a(H),W=n(991),G=a(W),Y=n(567),Q=a(Y),K=n(993),X=a(K),Z=F.default.extend({
name:"MetadataModel",context:["server","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","containerKey","relatedOptions"],responseContext:["identifier","mediaTagPrefix","mediaTagVersion","allowSync"],entityType:E.METADATA_ITEM,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,D.default)(this.entityType,e.key||this.cid,this.server.entityID())},idAttribute:"ratingKey",rootPropertyName:"Metadata",cache:new L.default,
mergeStrategy:q.default,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:j.default.object},syncedAttrs:{elementName:j.default.string,ratingKey:j.default.string,parentRatingKey:j.default.string,grandparentRatingKey:j.default.string,key:j.default.string,
childrenKey:j.default.string,parentKey:j.default.string,grandparentKey:j.default.string,primaryExtraKey:j.default.string,guid:j.default.string,librarySectionID:j.default.string,librarySectionUUID:j.default.string,librarySectionKey:j.default.string,type:j.default.string,title:j.default.string,titleSort:j.default.string,originalTitle:j.default.string,parentTitle:j.default.string,grandparentTitle:j.default.string,year:j.default.string,tagline:j.default.string,summary:j.default.string,studio:j.default.string,
contentRating:j.default.string,originallyAvailableAt:j.default.string,thumb:j.default.string,parentThumb:j.default.string,grandparentThumb:j.default.string,banner:j.default.string,art:j.default.string,parentArt:j.default.string,grandparentArt:j.default.string,theme:j.default.string,parentTheme:j.default.string,grandparentTheme:j.default.string,chapterSource:j.default.string,ratingImage:j.default.string,audienceRating:j.default.float,audienceRatingImage:j.default.string,metadataState:j.default.string,
mediaState:j.default.string,isChannelItem:j.default.boolean,rating:j.default.float,userRating:j.default.float,index:j.default.integer,parentIndex:j.default.integer,absoluteIndex:j.default.integer,duration:j.default.integer,viewOffset:j.default.integer,viewCount:j.default.integer,childCount:j.default.integer,leafCount:j.default.integer,viewedLeafCount:j.default.integer,ratingCount:j.default.integer,extraType:j.default.integer,lastViewedAt:j.default.integer,addedAt:j.default.integer,updatedAt:j.default.integer,
deletedAt:j.default.integer,url:j.default.string,playlistID:j.default.integer,playlistType:j.default.string,smart:j.default.boolean,composite:j.default.string,durationInSeconds:j.default.integer,skipChildren:j.default.boolean,skipParent:j.default.boolean,subscriptionID:j.default.string,grandparentSubscriptionID:j.default.string,subscriptionType:j.default.string,grandparentSubscriptionType:j.default.string,Channel:j.default.array,Media:j.default.array,Collection:j.default.array,Director:j.default.array,
Producer:j.default.array,Writer:j.default.array,Genre:j.default.array,Mood:j.default.array,Country:j.default.array,Label:j.default.array,Role:j.default.array,Location:j.default.array},sessionRelations:{children:function(){return{relationClass:n(85)}}},syncedRelations:{chapters:{relationClass:G.default,rootPropertyName:"Chapter",deferred:!0},overlays:{relationClass:Q.default,rootPropertyName:"Overlay",deferred:!0},preferences:{relationClass:V.default,rootPropertyName:"Preferences",deferred:!0},onDeck:function(){
return{relationClass:Z,rootPropertyName:"OnDeck",deferred:!0}},related:function(){var e={skipCache:!0};return this.relatedOptions&&o.default.extend(e,this.relatedOptions),{relationClass:n(194),rootPropertyName:"RelatedHubs",deferred:!0,options:e}},popularLeaves:function(){return{relationClass:n(85),rootPropertyName:"PopularLeaves",deferred:!0}},extras:function(){return{relationClass:n(85),rootPropertyName:"Extras",deferred:!0,attrs:function(e){return{containerKey:m.join([e.key,"extras"])}}}},concerts:{
relationClass:X.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=_.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,O.default)(this.server,e)},thumbTranscodeUrl:function(){var e=this.get("thumb");if(e)return(0,O.default)(this.server,e)},parentThumbTranscodeUrl:function(){var e=this.get("parentThumb");if(e)return(0,
O.default)(this.server,e)},grandparentThumbTranscodeUrl:function(){var e=this.get("grandparentThumb");if(e)return(0,O.default)(this.server,e)},artTranscodeUrl:function(){var e=this.get("art");if(e)return(0,O.default)(this.server,e)},parentArtTranscodeUrl:function(){var e=this.get("parentArt");if(e)return(0,O.default)(this.server,e)},grandparentArtTranscodeUrl:function(){var e=this.get("grandparentArt");if(e)return(0,O.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),r=n&&n.key;if(r)return{v:function(){return e.server.resolveUrl(r,{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),F.default.prototype.fetch.call(this,e)},augmentResponseText:function(e,t){return t===$.default.xml?v.default.replaceMetadataXMLElementNames(e):e;
},augmentResponse:function(e,t){var n=this;this.responseContext.forEach(function(t){var r=e[t];void 0!==r&&n.setContext(t,r)});var r=e[this.rootPropertyName];r&&(r.librarySectionID=e.librarySectionID,r.librarySectionUUID=e.librarySectionUUID);var a=r||e,i=a.Related,s=a.OnDeck,l=a.Preferences,u=this.extractChildrenKey(a.key);return u.childrenKey&&(a.childrenKey=u.childrenKey,a.key=u.key),t===$.default.xml&&(a.Media=this.convertMediaItems(a.Media)),i&&(a.RelatedHubs=o.default.compact([].concat(i.Hub,i.Metadata))),
s&&(a.OnDeck=s.Metadata),l&&(a.Preferences=l.Setting),this.normalize(a)},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=m.join(e,{includeRelated:1})),this.get("children").set("containerKey",e))},convertMediaItems:function(e){var t=v.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","beginsAt","endsAt","beginOffset","startOffsetSeconds","endOffsetSeconds"]),p.default.parseArray(e,"Part"),o.default.each(e.Part,function(e){e.exists=null==e.exists||v.default.parseBoolean(e.exists),e.accessible=null==e.accessible||v.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=I.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 r=(0,w.default)(e,{streamType:t.id,selected:!0}),a={id:0,streamType:t.id,language:(0,c.default)("None")};r.length||(a.selected=!0),n.Stream.unshift(a)}}),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"),_.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,r=u.default.Deferred();
if(!e||!t)return r.reject(this).promise();if(!e.indirect)return r.resolve(this).promise();if(t.postURL){var a=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(a)return this.resolvePostUrl(e,t,a)}var i=t.key;this.server.get("isCloud")&&(i=this.server.swizzleNodeUrl(i));var s=u.default.ajax(this.server.getXHROptions(i));return s.done(function(a){
n.mergeIndirectResponse(a,e,t)?r.resolve(n):r.reject(n)}),s.fail(function(){r.reject(n)}),r.promise()},resolvePostUrl:function(e,t,n){var r=this,a=u.default.Deferred(),i=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 a=m.join(i,{postURL:s});r.server.get("isCloud")&&(a=r.server.swizzleNodeUrl(a));var o=r.server.getXHROptions(a);return o.type="POST",o.headers=o.headers||{},o.data=n.getAllResponseHeaders()+"\r\n"+e,
u.default.ajax(o)}),l.done(function(n,i,s){r.mergeIndirectResponse(n,e,t)?a.resolve(r):a.reject(r)}),l.fail(function(){a.reject(r)}),a.promise()},mergeIndirectResponse:function(e,t,n){var a=v.default.parseXML(v.default.replaceMetadataXMLElementNames(e));if(!(a&&a.Metadata&&a.Metadata.Media&&a.Metadata.Media.Part))return!1;var i=o.default.first(this.convertMediaItems(a.Metadata.Media)),s=v.default.parseArray(i.Part),l=o.default.first(s);if(!i||!l)return!1;if(i.indirect=!1,o.default.extend(t,o.default.omit(i,"Part")),
o.default.extend(n,l),s.length>1){var u;(u=t.Part).push.apply(u,r(s.slice(1)))}if(a.httpHeaders){for(var d,c=new RegExp("([^=]+)=([^&]+)&?","g"),f={};d=c.exec(a.httpHeaders);)d[1]in f?(o.default.isArray(f[d[1]])||(f[d[1]]=[f[d[1]]]),f[d[1]].push(d[2])):f[d[1]]=d[2];this.set("indirectHttpHeaders",f)}return!0},batchAdd:function(e,t,n){var r=o.default.map(e,function(e){return e.get("ratingKey")}),a=m.join(["/library/metadata",r.join(","),t,"add"],{tag:n}),i=this.server.getXHROptions(a,{type:"PUT"});return u.default.ajax(i);
},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),r=n&&n.key;if(r)return this.server.resolveUrl(r,{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===C.default.PROCESSED?(this.fetch({data:{skipRefresh:1},usePopulatedParams:!0}),this.refreshChildren()):e.state===C.default.DELETED&&this.trigger("destroy",this,this.collection);
},onChildrenKeyChange:function(e,t){this.setChildrenKey(t)}});t.default=Z,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(247),i=r(a),s=n(314),o=r(s),l=n(95),u=r(l),d=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=i.default.getPosterHeight(this.type,e.width):e.height&&(e.width=i.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=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(47),l=r(o),u=n(8),d=r(u),c=n(46),f=r(c),p=n(41),h=r(p),v=n(26),g=a(v),m=n(136),y=r(m),b=n(293),P=r(b),w=l.default.Model.extend({mixins:[P.default],cache:new y.default,constructor:function(e,t){e||(e={}),t||(t={}),this.server=this.findOption(t,"server"),this.section=this.findOption(t,"section"),this.channel=this.findOption(t,"channel"),this.device=this.findOption(t,"device"),this.parent=this.findOption(t,"parent");var n=this.findOption(t,"skipCache");
if(n)return void l.default.Model.prototype.constructor.apply(this,arguments);var r=this.cache.getItemCacheKey(this,e),a=this.cache.get(r);if(a)return t.parse&&(e=a.parse(e)),this.preserveCachedAttributes&&this.preserveCachedAttributes(t.url)?s.default.each(e,function(e,t){s.default.isUndefined(a.get(t))&&!s.default.isUndefined(e)&&a.set(t,e)}):a.set(e),a.server=this.server||a.server,a.section=this.section||a.section,a.channel=this.channel||a.channel,a.device=this.device||a.device,a.parent=this.parent||a.parent,
t.collection&&(a.collection=t.collection),a;var i=this.findOption(t,"onlyIfCached");return i?{}:(l.default.Model.prototype.constructor.apply(this,arguments),void this.cache.store(this,r))},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(e){var t=s.default.isObject(e)?e:f.default.parseXML(e);
return t},parse:function(e,t){var n=this.convert(e);return this.whitelistedAttrs&&(n=s.default.pick(n,this.whitelistedAttrs)),n},save:function(e,t,n){var r,a,i,o=this.attributes;null==e||"object"==typeof e?(r=e,n=t):(r={})[e]=t,n=s.default.extend({validate:!0},n);var u=this.getSaveParams(r,n);if(s.default.extend(u,n.data),r&&!n.wait){if(!this.set(r,n))return!1}else if(!this._validate(r,n))return!1;if(r&&n.wait&&(this.attributes=s.default.extend({},o,r)),s.default.isEmpty(u)&&!n.force)return n.success&&n.success(this),
d.default.Deferred().resolve(this);void 0===n.parse&&(n.parse=!0);var c=this,f=n.success;n.success=function(e){if(c.attributes=o,e){var t=c.parse(e,n);if(n.wait&&(t=s.default.extend(r||{},t)),s.default.isObject(t)&&!c.set(t,n))return!1;c.cache.store(c)}f&&f(c,e,n),c.trigger("sync",c,e,n)},l.default.wrapError(this,n),a=this.isNew()?"create":n.patch?"patch":"update","patch"===a&&(n.attrs=r);var p=s.default.result(this,"saveUrl")||s.default.result(this,"url");return s.default.isEmpty(u)||(n.url=g.join(p,u)),
n.data="",i=this.sync(a,this,n),r&&n.wait&&(this.attributes=o),i},getSaveParams:function(e,t){return this.isNew()?e||this.toJSON():this.changedAttributes(e)||{}},getScopedKey:function(e){return null!=e&&s.default.isFunction(this.cacheKey)?this.cacheKey(this.attributes)+"!"+e:e},restoreDefaults:function(e){var t=s.default.result(this,"defaults");if(!t)return this.clear(e);var n,r=this.attributes;for(n in r)n in t||this.unset(n,e);return this.set(t,e),this},startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void(0,
h.default)(!1,"This model is already capturing events");var e=this.set,t={};this.set=function(n,r,a){var i;"object"==typeof n?(i=n,a=r):(i={})[n]=r;var o=s.default.extend({},a,{silent:!0}),l=e.call(this,i,o);return s.default.extend(t,this.changed),l},this.releaseCapturedChangeEvents=function(){s.default.each(t,function(e,t){this.trigger("change:"+t,this,e)},this),s.default.isEmpty(t)||this.trigger("change",this,{}),t={},this.set=e,this.releaseCapturedChangeEvents=null}}});w.extend=function(){var e=l.default.Model.extend.apply(this,arguments);
return e.prototype.cache=new y.default,e},t.default=w,e.exports=t.default},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 r(){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 r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;
var a={};return"abcdefghijklmnopqrst".split("").forEach(function(e){a[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(i){return!1}}var a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,s,o=n(e),l=1;l<arguments.length;l++){r=Object(arguments[l]);for(var u in r)a.call(r,u)&&(o[u]=r[u]);if(Object.getOwnPropertySymbols){s=Object.getOwnPropertySymbols(r);for(var d=0;d<s.length;d++)i.call(r,s[d])&&(o[s[d]]=r[s[d]]);
}}return o}},function(e,t,n){"use strict";e.exports=n(858)},function(e,t,n){"use strict";function r(e,t){t||(t={});var n=s.default.defaults(t,{typeName:e,parse:s.default.bind(l.default.parseType,l.default,e)});return n}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(49),l=a(o),u={xml:r("xml"),json:r("json",{accept:"application/json"}),text:r("text")};t.default=u,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),i=r(a),s=n(47),o=r(s),l=n(1249),u=o.default.Model.extend({defaults:i.default.extend({allowFlash:!1,allowServerUpdates:!1,testPrivateConnectionsWhenPublicAddressDoesNotMatch:!0,allowHttpsMediaServerConnections:!1,allowMediaServerRelayConnections:!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)}),d=new u;t.default=d,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e}function a(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:r;return function(){var t={
type:e,payload:n.apply(void 0,arguments)};return t}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(41),o=i(s);t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(76),i=r(a),s={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 e="ie"===i.default.id&&11===parseInt(i.default.version,10);return!e&&!i.default.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}(),hasPassiveEventListeners:function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(n){}return e;
}(),isChromeApp:!(!window.chrome||!window.chrome.storage)};t.default=s,e.exports=t.default},function(e,t){"use strict";function n(e,t){if(t){var n=[];n.push(e);for(var r=arguments.length,a=Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i];for(var s=0,o=a.length;s<o;s++){var l=a[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){"use strict";function r(){return(0,l.createSelector)((0,f.default)(),function(e){
if(e){var t=o.default.pick(e,"machineIdentifier","allowSync","allowMediaDeletion","transcoderVideo","isFullServer","isFullOwnedServer");return t}})}function a(){return(0,d.default)(r(),function(e){return e})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(3),o=i(s),l=n(15),u=n(238),d=i(u),c=n(70),f=i(c);e.exports=t.default},function(e,t,n){"use strict";function r(e){for(var t;t=e._renderedComponent;)e=t;return e}function a(e,t){var n=r(e);n._nativeNode=t,t[v]=n;
}function i(e){var t=e._nativeNode;t&&(delete t[v],e._nativeNode=null)}function s(e,t){if(!(e._flags&h.hasCachedChildNodes)){var n=e._renderedChildren,i=t.firstChild;e:for(var s in n)if(n.hasOwnProperty(s)){var o=n[s],l=r(o)._domID;if(null!=l){for(;null!==i;i=i.nextSibling)if(1===i.nodeType&&i.getAttribute(p)===String(l)||8===i.nodeType&&i.nodeValue===" react-text: "+l+" "||8===i.nodeType&&i.nodeValue===" react-empty: "+l+" "){a(o,i);continue e}f(!1)}}e._flags|=h.hasCachedChildNodes}}function o(e){
if(e[v])return e[v];for(var t=[];!e[v];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,r;e&&(r=e[v]);e=t.pop())n=r,t.length&&s(r,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?f(!1):void 0,e._nativeNode)return e._nativeNode;for(var t=[];!e._nativeNode;)t.push(e),e._nativeParent?void 0:f(!1),e=e._nativeParent;for(;t.length;e=t.pop())s(e,e._nativeNode);return e._nativeNode}var d=n(190),c=n(859),f=n(39),p=d.ID_ATTRIBUTE_NAME,h=c,v="__reactInternalInstance$"+Math.random().toString(36).slice(2),g={
getClosestInstanceFromNode:o,getInstanceFromNode:l,getNodeFromInstance:u,precacheChildNodes:s,precacheNode:a,uncacheNode:i};e.exports=g},function(e,t,n){"use strict";function r(e){return(0,l.default)((0,s.default)(e),"Action handlers must be plain objects"),function(t,n,r){var a=n.type,i=n.payload;return!!e.hasOwnProperty(a)&&(e[a](t,i,r),!0)}}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(199),s=a(i),o=n(41),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";
function r(){return(0,i.createSelector)(function(e,t){var n=t.serverEntityID;return n},o.default,function(e,t){return t[e]})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(15),s=n(239),o=a(s);e.exports=t.default},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 r="providers";t.PROVIDER=r;var a="libraries";t.LIBRARY=a;var i="hubs";t.HUB=i;var s="metadataLists";t.METADATA_LIST=s;var o="metadataItems";t.METADATA_ITEM=o;var l="sessions";t.SESSION=l;var u="userPlaylistItems";t.USER_PLAYLIST_ITEM=u;var d="mediaSubscriptions";t.MEDIA_SUBSCRIPTION=d},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,d.default)(),function(e){if(e)return{identifier:e.identifier,isLibraryProvider:e.isLibraryProvider,protocols:e.protocols.reduce(function(e,t){
return e[t]=!0,e},{}),features:e.features.reduce(function(e,t){return e[t.type]=!0,e},{})}})}function a(){return(0,l.default)(r(),function(e){return e})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(15),o=n(595),l=i(o),u=n(100),d=i(u);e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),a=r.PropTypes.shape({identifier:r.PropTypes.string.isRequired,isLibraryProvider:r.PropTypes.bool.isRequired,protocols:r.PropTypes.object.isRequired,
features:r.PropTypes.object.isRequired});t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),a=r.PropTypes.shape({machineIdentifier:r.PropTypes.string.isRequired,allowSync:r.PropTypes.bool,allowMediaDeletion:r.PropTypes.bool,transcoderVideo:r.PropTypes.bool,isFullServer:r.PropTypes.bool.isRequired,isFullOwnedServer:r.PropTypes.bool.isRequired});t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),i=r(a),s=n(35),o=r(s),l=/version\/(\d+(\.\d+)?)/i,u=/(?:chrome|crios|gfibertv)[\/-](\d+(\.\d+)?)/i,d=/firefox[ \/](\d+(\.\d+)?)/i,c=/(msie |rv:)(\d+(\.\d+)?)/i,f=/(?:applewebkit|safari)\/(\d+(\.\d+)?)/i,p=function(e){var t=/\(.* ([^\)]+)\)$/.exec(e);return t&&t[1]||void 0},h=o.default.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:f,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:f},{id:"ps4",name:"Mystery 4",webkit:!0,regex:/\(PlayStation 4\)/,versionRegex:f},{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:c,versionMatchIndex:2},{id:"opera",name:"Opera",presto:!0,regex:/opera/i,versionRegex:l},{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:u},{id:"firefox",name:"Firefox",gecko:!0,regex:/firefox/i,
versionRegex:d},{id:"safari",name:"Safari",webkit:!0,regex:/macintosh.+safari/i,versionRegex:l},{id:"safari",name:"Safari",webkit:!0,regex:/applewebkit/i,versionRegex:f}],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){return/web[o0]s/i.test(e)&&/smarttv/i.test(e)},version:function(e){try{return JSON.parse(window.PalmSystem.deviceInfo).platformVersion;
}catch(t){}}},{id:"blackberry",name:"Blackberry",mobile:!0,regex:/BlackBerry|RIM|BB10/,version:function(e){var t=/PlayBook/.test(e)?/Tablet OS (\d+\.\d+)/:l,n=t.exec(e);return n&&n[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 v(e){var v,t;if(/SmartTvA/.test(e))t=/SmartTvA\/(\d+\.\d+)/.exec(e),v=t&&t[1]||v;else{var n=[/Linux i686.+Chromium\/18/,/nettv\/4.2/i,/toshiba-dtv/i,/viera/i],r=[/nettv\/4/i],a=[/nettv/i],s=function(t){return t.test(e)};i.default.some(n,s)?v="2.0":i.default.some(r,s)?v="1.0":i.default.some(a,s)&&(v="0");
}return v},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)&&!/smarttv/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:p},{id:"openelec",name:"OpenELEC",tv:!0,regex:/plexmediaplayer.*openelec/i,version:p},{id:"linuxkonvergo",name:"Linux",tv:!0,regex:/plexmediaplayer.*linux/i,version:p},{id:"osxkonvergo",name:"OSX",tv:!0,regex:/plexmediaplayer.*mac/i,version:p},{id:"windowskonvergo",name:"Windows",tv:!0,regex:/plexmediaplayer.*win/i,version:p},{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(e){var t,n=this.runTests(this.browsers,e),r=this.runTests(this.platforms,e);n&&(this.id=n.id,this.name=n.name,this.version=this.getVersion(e.userAgent,n.versionRegex,n.versionMatchIndex||1),this.webkit=!!n.webkit,this.gecko=!!n.gecko,this.msie=!!n.msie,this.presto=!!n.presto),r&&(t=i.default.isFunction(r.version)?r.version(e.userAgent):r.version,this.platform=r.name,this.platformID=r.id,this.platformVersion=t||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,r,a,i=0;r!==!0&&(a=e[i++]);)n=t[a.context||"userAgent"],a.regex?r=a.regex.test(n):a.predicate&&(r=a.predicate(n));return a},getVersion:function(e,t,n){var r=e.match(t);return r&&r.length>n&&r[n]||"0"},toJSON:function(){var e={};for(var t in this)this[t]&&"browsers"!==t&&"platforms"!==t&&(e[t]=this[t]);return e}});t.default=new h,
e.exports=t.default},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 r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(19).default,l=n(11).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(33),p=u(f),h=n(824),v=u(h),g=n(823),m=u(g),y=n(24),b=n(659),P=n(31),w=u(P),S=n(167),_=u(S),T=n(30),I=n(2055),M=u(I),C=function(e){
function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isScrolling:!1},this._currentScrollTop=0,this._currentScrollLeft=0}return a(t,e),i(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,w.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 r=null!=t&&t!==this._currentScrollTop,a=null!=n&&n!==this._currentScrollLeft;if(r||a){if(!this.props.smoothScroll)return this._currentScrollTop=t,this._currentScrollLeft=n,void this._updateScrollPosition({scrollTop:t,scrollLeft:n});var i=this.props.smoothScrollDuration/1e3,s={
ease:m.default.Power3.easeOut,onUpdate:this.onScrollToUpdate,onComplete:this.onScrollToComplete};this._scrollToPosition={},r&&(s.scrollTop=Math.min(t,this.refs.scroller.scrollHeight-this.refs.scroller.clientHeight),this._scrollToPosition.scrollTop=this.refs.scroller.scrollTop),a&&(s.scrollLeft=Math.min(n,this.refs.scroller.scrollWidth-this.refs.scroller.clientWidth),this._scrollToPosition.scrollLeft=this.refs.scroller.scrollLeft),this._cancelScrollTo(),this._scrollToTween=v.default.to(this._scrollToPosition,i,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,r=t!==this._currentScrollTop,a=n!==this._currentScrollLeft;(r||a)&&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,r=t.children,a=t.scrollDirection,i=t.autoScroll,s=t.enableChildrenProps,u=t.onScroll,d=t.onScrollPositionChange,f=o(t,["className","children","scrollDirection","autoScroll","enableChildrenProps","onScroll","onScrollPositionChange"]);return c.default.createElement("div",l({
ref:"scroller",className:(0,p.default)(n,M.default.scroller,M.default[a],i&&M.default.auto),onScroll:d?(0,_.default)(this.onScroll,u):u},f),s?(0,b.mapValidComponents)(r,function(t){return c.default.cloneElement(t,{isScrolling:e.state.isScrolling,scrollTop:e._currentScrollTop,scrollLeft:e._currentScrollLeft})}):r)}}]),t}(d.Component);C.propTypes={className:d.PropTypes.string,children:d.PropTypes.node.isRequired,scrollDirection:d.PropTypes.oneOf(T.scrollDirections.all).isRequired,autoScroll:d.PropTypes.bool,
smoothScroll:d.PropTypes.bool,smoothScrollDuration:d.PropTypes.number.isRequired,scrollTop:d.PropTypes.number,scrollLeft:d.PropTypes.number,enableChildrenProps:d.PropTypes.bool,isScrollingTimeout:d.PropTypes.number.isRequired,onScroll:d.PropTypes.func,onScrollPositionChange:d.PropTypes.func,onScrollToUpdate:d.PropTypes.func,onScrollToComplete:d.PropTypes.func},C.defaultProps={scrollDirection:T.scrollDirections.VERTICAL,autoScroll:!1,smoothScroll:!0,smoothScrollDuration:400,enableChildrenProps:!1,
isScrollingTimeout:100},t.default=C,e.exports=t.default},,function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children,r=e.kind,s=e.size,o=a(e,["className","children","kind","size"]);return l.default.createElement(p.default,i({
className:(0,d.default)(t,v.default.button,v.default[r],v.default[s])},o),n)}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(33),d=s(u),c=n(30),f=n(34),p=s(f),h=n(2058),v=s(h);r.propTypes={className:o.PropTypes.string,children:o.PropTypes.node,kind:o.PropTypes.oneOf(c.kinds.all),size:o.PropTypes.oneOf(c.sizes.all)},r.defaultProps={kind:c.kinds.DEFAULT,size:c.sizes.MEDIUM},t.default=r,e.exports=t.default},function(e,t,n){"use strict";
function r(e){var t=e.children,n=e.className,r=e.innerClassName,o=e.scrollDirection,l=i(e,["children","className","innerClassName","scrollDirection"]),c=o!==d.scrollDirections.NONE;return n||(n=c?h.default.modalScroller:h.default.modalBody),u.default.createElement(f.default,s({className:n,scrollDirection:o,autoScroll:!0},l),c?{$$typeof:a,type:"div",key:null,ref:null,props:{children:t,className:r},_owner:null}:t)}var a=n(7).default,i=n(19).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var l=n(4),u=o(l),d=n(30),c=n(78),f=o(c),p=n(2083),h=o(p);r.propTypes={children:l.PropTypes.node,className:l.PropTypes.string,innerClassName:l.PropTypes.string,scrollDirection:l.PropTypes.oneOf(d.scrollDirections.all)},r.defaultProps={innerClassName:h.default.innerModalBody},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(47),l=r(o),u=n(8),d=r(u),c=n(46),f=r(c),p=n(26),h=a(p),v=n(397),g=r(v),m=n(293),y=r(m),b=l.default.Collection.extend({
mixins:[y.default],cache:new g.default,constructor:function(e,t){if(t||(t={}),this.server=t.server,this.section=t.section,this.channel=t.channel,this.device=t.device,this.parent=t.parent,this.allowInCache=t.allowInCache,this.persistInCache=t.persistInCache,this.skipCache=t.skipCache,t.url&&(this.url=t.url),t.path&&(this.path=t.path),null==t.pageStart&&null==t.pageSize||(this.pageStart=t.pageStart||0,this.pageSize=t.pageSize||0),t.populated&&this.resetPopulatePromise(d.default.Deferred().resolve().promise()),
!t.allowInCache&&!t.persistInCache)return void l.default.Collection.prototype.constructor.apply(this,arguments);this.initialize.apply(this,arguments);var n=this.cache.getItemCacheKey(this),r=this.cache.get(n);return this.uninitialize(),t.onlyIfCached&&(r||(r={})),r?r:(l.default.Collection.prototype.constructor.apply(this,arguments),void this.cache.store(this,n))},uninitialize:function(){this.stopListening()},sync:function(){return(this.allowInCache||this.persistInCache)&&this.cache.store(this),l.default.sync.apply(this,arguments);
},syncUrl:function(){var e="";if(this.url&&(e=s.default.result(this,"url")),this.path&&(e=h.join([e,s.default.result(this,"path")])),null!=this.pageStart||null!=this.pageSize){var t=this.pageStart||0,n=this.pageSize||0,r={};r["X-Plex-Container-Start"]=t,r["X-Plex-Container-Size"]=n,e=h.join(e,r)}return e},convert:function(e,t){var n=s.default.isObject(e)?e:f.default.parseXML(e);if(!t)return n;var r=n[t];return r?(s.default.isArray(r)||(r=[r]),r):[]},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(e){e=s.default.extend({silent:!0},e),this.abortPendingPopulate(),this.resetPopulatePromise(null),this.reset([],e)}});b.extend=function(){var e=l.default.Collection.extend.apply(this,arguments);return e.prototype.cache=new g.default,e},t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(9).default,a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(72),s=r(i),o=n(66),l=a(o),u=n(20),d=a(u),c=n(22),f=a(c),p=n(575),h=a(p),v={LIBRARY_PROVIDER_IDENTIFIER:"com.plexapp.plugins.library",CHANNEL_PROVIDER_IDENTIFIER:"tv.plex.providers.channel",EPG_IDENTIFIER:/tv\.plex\.providers\.epg\./};t.providerIdentifiers=v;var g=f.default.extend({name:"ProviderModel",context:["server"],entityType:s.PROVIDER,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,
l.default)(this.entityType,e.identifier,this.server.entityID())},idAttribute:"identifier",rootPropertyName:"MediaProvider",syncedAttrs:{identifier:d.default.string,title:d.default.string,types:d.default.list,protocols:d.default.list,subscriptions:d.default.boolean},syncedRelations:{features:{relationClass:h.default,rootPropertyName:"Feature",options:function(){return{provider:this}}}},derivedAttrs:{isLibraryProvider:function(){return this.get("identifier")===v.LIBRARY_PROVIDER_IDENTIFIER}}});t.default=g;
},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(49),l=r(o),u=n(72),d=a(u),c=n(66),f=r(c),p=n(195),h=r(p),v=n(20),g=r(v),m=n(62),y=r(m),b=n(22),P=r(b),w=n(237),S=r(w),_=P.default.extend({mixins:[h.default],name:"MetadataListModel",context:["server","section","metadataItem","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync"],responseContext:["identifier","mediaTagPrefix","mediaTagVersion","allowSync"],
entityType:d.METADATA_LIST,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0],t=e.listIdentifier||e.containerKey||e.key;return(0,f.default)(this.entityType,t,this.server.entityID(),this.section&&this.section.entityID(),this.metadataItem&&this.metadataItem.entityID())},idAttribute:"containerKey",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(this.get("containerKey")||this.get("key"))},sessionAttrs:{isMetadataList:g.default.boolean,
listIdentifier:g.default.string,containerKey:g.default.string,containerTitle:g.default.string,currentPageStart:g.default.integer,currentPageSize:g.default.integer,populatedRange:g.default.object,isPending:g.default.boolean,isPopulated:g.default.boolean,error:g.default.object},syncedAttrs:{key:g.default.string,totalSize:g.default.integer,viewGroup:g.default.string,title:g.default.string,thumb:g.default.string,art:g.default.string,banner:g.default.string,theme:g.default.string,allowSync:g.default.boolean
},syncedRelations:{metadataItems:{relationClass:S.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 r=e[t];void 0!==r&&n.setContext(t,r)});var r=l.default.parseArray(e.Metadata),a=l.default.parseInteger(e.totalSize);return this.allowAllLeaves||(e.Metadata=s.default.reject(r,function(e){var t=/\/allLeaves$/.test(e.key);return t&&(this._totalSizeAdjustment-=1),t},this)),a&&this._totalSizeAdjustment&&(e.totalSize=a-this._totalSizeAdjustment),e},onContainerKeyChange:function(e,t){var n=this.get("metadataItems"),r=this.syncedRelations.metadataItems.options(this.attributes);
s.default.each(r,function(e,t){n.setContext(t,e)})}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";function r(e){return function(){return e.apply(this,s.default.initial(arguments))}}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i);t.default=r,e.exports=t.default},,function(e,t,n){"use strict";var r=function(e,t,n,r,a,i,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,r,a,i,s,o],d=0;l=new Error(t.replace(/%s/g,function(){return u[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=r},function(e,t,n){"use strict";var r=n(11).default,a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(47),u=a(l),d=n(14),c=n(41),f=a(c),p=n(26),h=i(p),v=n(65),g=a(v),m=n(629),y=a(m),b=n(72),P=i(b),w=n(66),S=a(w),_=n(136),T=a(_),I=n(306),M=a(I),C=n(40),x=a(C),E=n(192),k=a(E),D=n(32),A=a(D),O=n(27),R=a(O),L=n(63),N=a(L),j=n(20),U=a(j),$=n(556),z=a($),F=n(386),B=a(F),V=n(22),H=a(V),q=n(560),W=a(q),G=n(381),Y=a(G),Q=n(193),K=a(Q),X=n(980),Z=a(X),J=n(389),ee=a(J),te=n(133),ne=a(te),re=n(159),ae=a(re),ie=n(1024),se=a(ie),oe=n(1027),le=a(oe),ue=n(134),de=a(ue),ce=n(1022),fe=a(ce),pe=n(1030),he=a(pe),ve=n(1028),ge=a(ve),me={
PENDING:"pending",CONNECTED:"connected",UNAVAILABLE:"unavailable",UNAUTHORIZED:"unauthorized"},ye={PENDING:"pending",RESOLVED:"resolved",REJECTED:"rejected"},be={SECONDARY:"secondary"},Pe=["camera_upload","cloudsync","content_filter","home","lyrics","music_videos","pass","premium_music_metadata","sync","trailers"],we=H.default.extend({mixins:[B.default],name:"ServerModel",entityType:P.SERVER,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,S.default)(this.entityType,e.machineIdentifier||this.cid);
},idAttribute:"machineIdentifier",connectionTestTimeout:1e4,cache:new T.default,persistInCache:!0,sessionAttrs:{connectionTestResult:U.default.oneOf(me.PENDING,me.CONNECTED,me.UNAVAILABLE,me.UNAUTHORIZED).isRequired,promiseState:U.default.oneOf(ye.PENDING,ye.RESOLVED,ye.REJECTED).isRequired,sections:U.default.instanceOf(Y.default).isRequired,playlists:U.default.instanceOf(Z.default).isRequired,playQueueManager:U.default.instanceOf(W.default).isRequired,isShared:U.default.boolean.isRequired,isBundled:U.default.boolean.isRequired,
isCloud:U.default.boolean.isRequired,isMerged:U.default.boolean.isRequired,cloudAccount:U.default.instanceOf(se.default).isRequired,update:U.default.instanceOf(le.default),settings:U.default.instanceOf(de.default).isRequired,alerts:U.default.instanceOf(fe.default).isRequired,transcodeJobs:U.default.instanceOf(he.default).isRequired,sessions:U.default.instanceOf(ge.default).isRequired,superToken:U.default.string,accessToken:U.default.string,sourceTitle:U.default.string,publicAddressMatches:U.default.boolean,
httpsRequired:U.default.boolean,presence:U.default.boolean,home:U.default.boolean,synced:U.default.boolean,createdAt:U.default.integer,lastSeenAt:U.default.integer,serverClass:U.default.oneOf(be.SECONDARY)},sessionRelations:{activeConnection:{relationClass:ne.default,deferred:!0},connections:{relationClass:ee.default,options:function(){return{server:this}}}},syncedAttrs:{machineIdentifier:U.default.string,friendlyName:U.default.string,startState:U.default.string,version:U.default.string,platform:U.default.string,
platformVersion:U.default.string,sync:U.default.boolean,multiuser:U.default.boolean,transcoderLyrics:U.default.boolean,myPlex:U.default.boolean,myPlexMappingState:U.default.string,myPlexSigninState:U.default.string,myPlexSubscription:U.default.boolean,myPlexUsername:U.default.string,transcoderPhoto:U.default.boolean,transcoderAudio:U.default.boolean,transcoderVideo:U.default.boolean,transcoderVideoRemuxOnly:U.default.boolean,transcoderSubtitles:U.default.boolean,transcoderActiveVideoSessions:U.default.integer,
allowMediaDeletion:U.default.boolean,allowCameraUpload:U.default.boolean,allowChannelAccess:U.default.boolean,allowSync:U.default.boolean,diagnostics:U.default.list,companionProxy:U.default.boolean,updater:U.default.boolean,isDesktop:U.default.boolean,updatedAt:U.default.integer,countryCode:U.default.string,ownerFeatures:U.default.list,mediaProviders:U.default.integer,maxUploadBitrate:U.default.integer,maxUploadBitrateReason:U.default.string,maxUploadBitrateReasonMessage:U.default.string},derivedAttrs:{
debugName:function(){var e=this.get("machineIdentifier"),t=this.get("connections"),n=1===t.length&&t.at(0).get("isLoopback"),r=this.get("friendlyName");return!r&&n&&(r="[Loopback]"),r||(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")===me.CONNECTED},isUnavailable:function(){return this.get("connectionTestResult")===me.UNAVAILABLE},isUnauthorized:function(){
return this.get("connectionTestResult")===me.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("relay"))},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")},isCloudPersonalServer:function(){return"Cloud"===this.get("platform")},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")===me.PENDING;return e?null:this.get("isConnected")},available:function(){var e=this.get("connectionTestResult")===me.PENDING;
return e?null:!this.get("isUnavailable")},authorized:function(){var e=this.get("connectionTestResult")===me.PENDING;return e?null:this.get("isResolved")},relayed:function(){return this.get("isRelayed")}},defaults:function(){return{connectionTestResult:me.PENDING,promiseState:ye.PENDING,sections:new Y.default([],{server:this}),playlists:new Z.default({},{server:this}),playQueueManager:new W.default({server:this}),cloudAccount:new se.default({},{server:this}),update:N.default.get("allowServerUpdates")?new le.default({},{
server:this}):null,settings:new de.default([],{server:this}),alerts:new fe.default([],{server:this}),transcodeJobs:new he.default([],{server:this}),sessions:new ge.default([],{server:this}),isShared:!1,isBundled:!1,isCloud:!1,isMerged:!1,updater:!0}},url:function Se(){var e=arguments.length<=0||void 0===arguments[0]?this.get("activeConnection"):arguments[0];(0,f.default)(e,"An active or manual connection is required for a server url");var Se=o.default.result(e,"url");return/\/$/.test(Se)||(Se+="/"),
Se},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 H.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),r=this.get("accessToken"),a=o.default.extend({},t.params);return t.appendHeaders&&o.default.defaults(a,this.getHeaders()),t.appendToken&&r&&(a["X-Plex-Token"]=r),h.join([n,e],a)},swizzleUrl:function(e,t){var n=e.match(/^\w+:\/\/.+?(\/.+)$/),r=n?n[1]:e;return this.resolveUrl(r,t)},getXHROptions:function(e,t){return r({
url:this.resolveUrl(e),dataType:"text",headers:this.getHeaders()},t)},getHeaders:function(){var e=k.default.getInstance(),t=o.default.clone(e),n=this.get("accessToken");n&&(t["X-Plex-Token"]=n);var r=x.default.get("language");return r&&(t["Accept-Language"]=r),t},addConnection:function(e){e.sources||(e.sources=[{id:"internal"}]);var t=this.get("connections"),n=new ne.default(e),r=t.get(n.id);if(r){var a=r.get("sources");return a.set(e.sources,{remove:!1}),r}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 r=t.at(n),a=r.get("sources");a.remove(e),n--}},testAllConnections:function(){var e=this,t=this.get("connections");return(0,A.default)("[Connections] Testing all %s connection(s) for %s",t.length,this.get("debugName")),this._reset(),t.each(function(t){var n=!t.get("relay"),r=!t.get("isUntested");(n||r)&&e.testConnection(t)}),this.populatePromise;
},testOnlyUntestedConnections:function(){var e=this,t=this.get("connections");return t.each(function(t){var n=!t.get("relay"),r=t.get("isUntested"),a=t.get("isAborted");n&&(r||a)&&e.testConnection(t)}),this.populatePromise},testOnlyUntestedRelayConnections:function(){var e=this,t=this.get("connections");return t.each(function(t){var n=t.get("relay"),r=t.get("isUntested");n&&r&&e.testConnection(t)}),this.populatePromise},testConnection:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];
t.server=this,t.connection=e,this.get("promiseState")===ye.REJECTED&&this._reset();var n=R.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,A.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
};R.default.execute("abortServerConnectionTest",t)},populateIdentity:function(e){var t=this;if(this._identityPromise)return this._identityPromise;var n=R.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 r=n.get("debugName");A.default.warn("[Identity] %s and %s (cached) collide",e,r),
n.get("isConnected")||!this.get("isConnected")?((0,A.default)("[Identity] Merging %s into %s (cached)",e,r),n.merge(this)):((0,A.default)("[Identity] Merging %s (cached) into %s",r,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")&&Pe.indexOf(e)>-1},supports:function(e){var t=this.get(e);if(o.default.isBoolean(t))return t;var n=ae.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 K.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(g.default.isHostedHttps&&!N.default.get("allowMixedContent"))return!1;
var e=x.default.get("allowHttpFallback"),t=e===M.default.ALWAYS,n=e===M.default.SAME_NETWORK,r=t||n&&this.get("publicAddressMatches");return!!r},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:me.CONNECTED,promiseState:ye.RESOLVED},e);this.startCapturingChangeEvents(),this.set(t),this._resolvePopulate(),this.releaseCapturedChangeEvents()},_reject:function(e){var t=this.get("connections");
t.hasOnlyFailedConnections()&&A.default.warn("[Connections] All connections to %s failed",this.get("debugName"));var n=t.findWhere({isUnauthorized:!0})?me.UNAUTHORIZED:me.UNAVAILABLE,r=o.default.extend({connectionTestResult:n,promiseState:ye.REJECTED},e);this.startCapturingChangeEvents(),this.set(r),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(r({activeConnection:n},n.get("serverAttrs"))):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){var t=this.get("connections").getBestConnection();if(t!==this.get("activeConnection")&&A.default.info("[Connections] Active connection to %s is %s",this.get("debugName"),t.id),this._resolve(r({activeConnection:t},t.get("serverAttrs"))),N.default.get("allowLoopbackDiscovery")){var n=this.get("connections"),a=this.get("activeConnection"),i=a.get("isPrivate"),s=!!n.findWhere({
isLoopback:!0});!i||s||this.hasOtherLoopbackServer()||((0,A.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")){var r=this.get("connections");if(e.get("isHttps")&&!e.get("isUnauthorized")&&!e.get("relay"))if(this.canAllowHttpFallback()){var a=this.addConnection({scheme:"http",address:e.get("address"),port:e.get("port"),isFallback:!0});(0,A.default)("[Connections] Added insecure fallback connection for %s at %s",this.get("debugName"),a.id);
}else A.default.warn("[Connections] Prevented fallback to insecure connection for ",this.get("debugName"));!this.id&&e.get("isUnauthorized")&&this.populateIdentity(e),r.hasOnlyFailedConnections()?this.id||!this._identityPromise?this._reject():this._identityPromise.always(function(){r.hasOnlyFailedConnections()&&n._reject()}):r.hasFailedEveryDirectConnection()&&this.testOnlyUntestedRelayConnections()}}},{connectionTestResults:me,promiseStates:ye,serverClasses:be});(0,z.default)(we,function(){return{
relationClass:(0,d.resolve)("ServerFlexModel"),options:{server:this}}}),t.default=we,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),i=r(a),s=n(202),o=r(s),l=["id","typeString"],u=(0,o.default)(l,[{id:1,typeString:"video",key:"videoStreamID",title:function(){return(0,i.default)("Video")}},{id:2,typeString:"audio",key:"audioStreamID",title:function(){return(0,i.default)("Audio")}},{id:3,typeString:"subtitles",key:"subtitleStreamID",
title:function(){return(0,i.default)("Subtitles")}},{id:4,typeString:"lyrics",key:"lyricStreamID",title:function(){return(0,i.default)("Lyrics")}}]);t.default=u,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default,i=n(222).default,s=n(223).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=r(o),u=n(605),d=a(u),c=n(64),f=r(c),p=n(42),h=a(p),v=n(590);i(t,s(v,i));var g=(0,f.default)(h.SHOW_ALERT,function(e){return l.default.isString(e)?{type:d.ERROR,
message:e}:e});t.showAlert=g;var m=(0,f.default)(h.SAVE_SETTINGS);t.saveSettings=m;var y=(0,f.default)(h.DOWNLOAD_SERVER);t.downloadServer=y;var b=(0,f.default)(h.DISCOVER_SERVERS);t.discoverServers=b;var P=(0,f.default)(h.REDIRECT_TO_ROUTE);t.redirectToRoute=P;var w=(0,f.default)(h.REDIRECT_TO_HTTP);t.redirectToHttp=w;var S=(0,f.default)(h.GARBAGE_COLLECT_ENTITIES);t.garbageCollectEntities=S},function(e,t,n){"use strict";function r(e,t){var n=t.searchResultEntityID;return(0,d.default)(e,f.SEARCH_RESULT,n);
}function a(e,t){var n=t.syncMetadataEntityID;return(0,d.default)(e,f.SYNC_METADATA_ITEM,n)}var i=n(1).default,s=n(9).default,o=n(222).default,l=n(223).default;Object.defineProperty(t,"__esModule",{value:!0}),t.findSearchResultModel=r,t.findSyncMetadataModelModel=a;var u=n(412),d=i(u),c=n(211),f=s(c),p=n(413);o(t,l(p,o))},function(e,t,n){"use strict";var r=n(1943).default,a=n(1944).default;t.default=function(){function e(e,t){var n=[],a=!0,i=!1,s=void 0;try{for(var o,l=r(e);!(a=(o=l.next()).done)&&(n.push(o.value),
!t||n.length!==t);a=!0);}catch(u){i=!0,s=u}finally{try{!a&&l.return&&l.return()}finally{if(i)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(a(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";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(35),u=r(l),d=n(56),c=r(d),f=u.default.extend({mixins:c.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),i.default.each(this.interface,function(t){e[t]=i.default.bind(e._proxy,e,t)})},_proxy:function(e){for(var t=this.getInstance(),n=arguments.length,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return t[e].apply(t,r)},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(i.default.contains(this.props,e))return this.getInstance()[e];throw new Error("The "+e+" property has not been defined for this adapter")}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=n(65),h=r(p),v=n(201),g=r(v),m=n(604),y=r(m),b=n(244),P=r(b),w=n(63),S=r(w),_="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",T=d.default.ItemView.extend({
tagName:"img",background:!1,backgroundSize:"",cache:new y.default,initialize:function(e){e||(e={}),s.default.bindAll(this,"onLoad","onError","loadImage"),this.url=e.url,this.server=e.server,this.placeholder=e.placeholder,this.placeholderClass=e.placeholderClass,this.modelAttribute=e.modelAttribute,this.ignoreAttributeChanges=e.ignoreAttributeChanges,this.exposeUrl=e.exposeUrl,this.resetOnError=e.resetOnError,this.emptyImage=e.explicitEmpty?"url("+_+")":"",e.background&&(this.background=e.background),
e.backgroundSize&&(this.backgroundSize=e.backgroundSize),e.format&&(this.format=e.format),e.quality&&(this.quality=e.quality),s.default.isFunction(e.getUrl)&&(this.getUrl=e.getUrl),this.allowBaseImageBlobs=S.default.get("allowBaseImageBlobs"),this.allowBaseImagePreloading=S.default.get("allowBaseImagePreloading"),this.setup(e)},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){d.default.ItemView.prototype.setElement.apply(this,arguments),this.render({
force:!0})},getUrl:function(e){return e},getTranscodeUrl:function(e){if(!this.server||!this.transcode)return e;var t=f.resolve("appModel"),n=(0,P.default)();return g.default.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(_)},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 l.default.Deferred().reject().promise();if(e=this.getTranscodeUrl(e),this.exposeUrl&&this.$el.attr("data-image-url",e),this.allowBaseImageBlobs&&h.default.hasBlob&&h.default.hasObjectUrl){var t=this.loadBlob(e);return t=t.then(this.loadImage,null,this.loadImage)}return this.allowBaseImagePreloading?this.loadImage(e):l.default.Deferred().resolve(e).promise();
},loadBlob:function(e){var t=l.default.Deferred();this.cancel();var n=this.cache.getBlobUrl(e);if(n)return t.resolve(n),t.promise();var r=this.cache.getPlaceholder(e);r&&t.notify(r,!0);var a=new XMLHttpRequest;return a.open("GET",e,!0),a.responseType="arraybuffer",this.xhr=a,a.onreadystatechange=s.default.bind(function(){if(4===a.readyState)if(a.onreadystatechange=null,this.xhr=null,200===a.status){var n=new Blob([a.response],{type:"image/jpeg"}),r=window.URL.createObjectURL(n);this.cache.store({
url:e,blobUrl:r}),t.resolve(r)}else t.reject()},this),a.send(),t.promise()},loadImage:function(e,t){var n=l.default.Deferred(),r=new Image;return r.onload=function(){r.onload=r.onabort=r.onerror=null,t?n.notify(e,r.width,r.height):n.resolve(e,r.width,r.height)},r.onabort=r.onerror=function(){r.onload=r.onabort=r.onerror=null,n.reject()},r.src=e,n.promise()},cancel:function(){this.xhr&&(this.xhr.onreadystatechange=null,this.xhr.abort(),this.xhr=null)},onLoad:function(e,t,n){if(this.backgroundSize){
var r=t&&t>this.width||n&&n>this.height?this.backgroundSize:"auto";this.$el[0].style.backgroundSize=r}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())}});t.default=T,e.exports=t.default;
},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15),a=(0,r.createSelector)(function(e){return e.ui.liveTVSettingsPage},function(e){return e.dvrSetup});t.default=a,e.exports=t.default},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){
"use strict";var r=n(2661);e.exports={debugTool:r}},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(94),i=r(a),s=new i.default({"interface":["get","set","remove","clear"]});t.default=s,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,i.createSelector)(function(e,t){var n=t.providerEntityID;return n},o.default,function(e,t){return t[e]})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(15),s=n(303),o=a(s);
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(310),o=r(s),l=n(410),u=r(l),d=i.default.extend({},u.default,{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,t,n){if(!e||!t)return[];var r=t.get("transcoderVideo"),a=t.get("transcoderVideoRemuxOnly"),s=(0,o.default)(e),l=!(!s||!s.bitrate),u=!!e.videoResolution;if(!r||a||!l&&!u)return[];var d,c=t.get("maxUploadBitrate");if(c){var f=l?Math.min(s.bitrate,c):c;if(f===c){var p=i.default.extend({},n,{comparator:function(e){var t=this.qualities.bitrate[e];return t>f}});d=this.getAvailableQualities(p)}else d=this.getAvailableQualitiesBelowBitrate(f,n)}else d=l?this.getAvailableQualitiesBelowBitrate(s.bitrate,n):this.getAvailableQualitiesBelowResolution(e.videoResolution,n);
return d},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],r=this.getHeightFromResolution(this.getResolutionFromSize(t));return r>=n},this.getAvailableQualities(t)},getNearestIndexToBitrate:function(e){return this.getNearestIndex(this.qualities.bitrate,e);
},getMinimumQuality:function(e,t){var n=e===d.ORIGINAL?Number.MAX_VALUE:e,r=t===d.ORIGINAL?Number.MAX_VALUE:t;return n<r?e:t},getMaximumQuality:function(e,t){return this.getMinimumQuality(e,t)===e?t:e}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),i=r(a),s=n(202),o=r(s),l=["key","typeID","typeString"],u=(0,o.default)(l,[{key:"movies",typeID:"1",typeString:"movie",title:function(){return(0,i.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,i.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,i.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,i.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,i.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 r=n(11).default,a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(64),o=a(s),l=n(26),u=i(l),d=n(42),c=i(d),f=(0,o.default)(c.CLEAR_DVR_SETUP);t.clearDVRSetup=f;var p=(0,o.default)(c.DVR_SETUP_NEXT_STEP);t.dvrSetupNextStep=p;var h=(0,o.default)(c.DVR_SETUP_PREVIOUS_STEP);t.dvrSetupPreviousStep=h;
var v=(0,o.default)(c.FETCH_DEVICES);t.fetchDevices=v;var g=(0,o.default)(c.DISCOVER_DEVICES);t.discoverDevices=g;var m=(0,o.default)(c.ADD_DEVICE);t.addDevice=m;var y=(0,o.default)(c.SELECT_DEVICE);t.selectDevice=y;var b=(0,o.default)(c.SELECT_DEVICE_SOURCE);t.selectDeviceSource=b;var P=(0,o.default)(c.FETCH_DEVICE_DETAILS);t.fetchDeviceDetails=P;var w=(0,o.default)(c.FETCH_DEVICE_CHANNELS);t.fetchDeviceChannels=w;var S=(0,o.default)(c.SCAN_DEVICE_CHANNELS);t.scanDeviceChannels=S;var _=(0,o.default)(c.CANCEL_SCAN_DEVICE_CHANNELS);
t.cancelScanDeviceChannels=_;var T=(0,o.default)(c.FIND_BEST_EPG_LINEUP);t.findBestEPGLineup=T;var I=(0,o.default)(c.SELECT_EPG_LINEUP);t.selectEPGLineup=I;var M=(0,o.default)(c.ENABLE_DEVICE_CHANNEL);t.enableDeviceChannel=M;var C=(0,o.default)(c.UPDATE_CHANNEL_MAPPING);t.updateChannelMapping=C;var x=(0,o.default)(c.SAVE_CHANNEL_MAP);t.saveChannelMap=x;var E=(0,o.default)(c.SAVE_DVR);t.saveDVR=E;var k=(0,o.default)(c.SAVE_DEVICE_SETTINGS);t.saveDeviceSettings=k;var D=(0,o.default)(c.CLEAR_DEVICE_SETTINGS_SAVE_ERROR);
t.clearDeviceSettingsSaveError=D;var A=(0,o.default)(c.FETCH_LINEUP_CHANNELS,function(e){var t=u.join("/livetv/epg/channels",{lineup:e.lineupUUID});return r({options:{url:t}},e)});t.fetchLineupChannels=A;var O=(0,o.default)(c.FETCH_CHANNEL_MAP,function(e){var t=u.join("/livetv/epg/channelmap",{device:e.deviceUUID,lineup:e.lineupUUID});return r({options:{url:t}},e)});t.fetchChannelMap=O},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(19).default,d=n(1).default,c=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=d(f),h=n(61),v=d(h),g=n(24),m=n(326),y=c(m),b=n(31),P=d(b),w=n(659),S=n(167),_=d(S),T=n(204),I=d(T),M=n(657),C=d(M),x=n(277),E=c(x),k=n(30),D=n(221),A=d(D),O=n(319),R=d(O),L=n(78),N=d(L),j=n(1678),U=d(j),$=n(2076),z=d($),F=(0,I.default)(A.default.menuSpeed),B={appear:z.default.enter,appearActive:z.default.enterActive,enter:z.default.enter,enterActive:z.default.enterActive,leave:z.default.leave,leaveActive:z.default.leaveActive},V=function(e){
function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this._openMenu()}},{key:"shouldComponentUpdate",value:function(e,t){return(0,P.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(){E.startScopedFocus(v.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=v.default.findDOMNode(this.refs.menu),r=n&&n.contains(e.target),a=!r&&v.default.findDOMNode(t),i=a&&a.contains(e.target);r||i||this.props.onMenuClose()}},{key:"onKeyDown",decorators:[g.autobind],value:function(e){var t=e.keyCode;t===y.TAB?E.scopeTabEvent(e):t===y.ESCAPE&&(e.preventDefault(),e.stopPropagation(),this.props.onMenuClose(),E.restorePreviousFocus())}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.target,r=e.options,a=e.isOpen,i=e.scrollerProps,s=e.onMenuClose,d=u(e,["children","target","options","isOpen","scrollerProps","onMenuClose"]);
return{$$typeof:l,type:C.default,key:null,ref:null,props:o(C.default.defaultProps,{children:p.default.createElement(R.default,{ref:"menu",isOpen:a,transitionName:B,transitionAppearTimeout:F,transitionEnterTimeout:F,transitionLeaveTimeout:F},a&&p.default.createElement(U.default,d,p.default.createElement(N.default,i,(0,w.mapValidComponents)(t,function(e){var t=(0,_.default)(s,e.props.onPress);return p.default.cloneElement(e,{onPress:t})})))),className:z.default.menuPortal,target:n,options:r,isOpen:a,
closeTimeout:F}),_owner:null}}}]),t}(f.Component);V.propTypes={className:f.PropTypes.string,children:f.PropTypes.node.isRequired,target:f.PropTypes.object,options:f.PropTypes.object,isOpen:f.PropTypes.bool.isRequired,scrollerProps:f.PropTypes.object,onMenuClose:f.PropTypes.func.isRequired},V.defaultProps={className:z.default.menu,scrollerProps:{className:z.default.menuScroller,scrollDirection:k.scrollDirections.VERTICAL,autoScroll:!0}},t.default=V,e.exports=t.default},function(e,t,n){"use strict";
function r(e){var t=e.className,n=e.children,r=e.onModalClose,l=s(e,["className","children","onModalClose"]);return d.default.createElement("div",o({className:t},l),{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{children:m,className:g.default.closeButton,onPress:r}),_owner:null},n)}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(36),f=l(c),p=n(34),h=l(p),v=n(2084),g=l(v),m={
$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{name:"plex-icon-remove-560"}),_owner:null};r.propTypes={className:u.PropTypes.string,children:u.PropTypes.node,onModalClose:u.PropTypes.func.isRequired},r.defaultProps={className:g.default.modalContent},t.default=r,e.exports=t.default},,function(e,t,n){"use strict";var r=n(60),a=n(157),i=(n(52),n(531),"function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103),s={key:!0,ref:!0,__self:!0,__source:!0},o=function(e,t,n,r,a,s,o){
var l={$$typeof:i,type:e,key:t,ref:n,props:o,_owner:s};return l};o.createElement=function(e,t,n){var r,i={},l=null,u=null,d=null,c=null;if(null!=t){u=void 0===t.ref?null:t.ref,l=void 0===t.key?null:""+t.key,d=void 0===t.__self?null:t.__self,c=void 0===t.__source?null:t.__source;for(r in t)t.hasOwnProperty(r)&&!s.hasOwnProperty(r)&&(i[r]=t[r])}var f=arguments.length-2;if(1===f)i.children=n;else if(f>1){for(var p=Array(f),h=0;h<f;h++)p[h]=arguments[h+2];i.children=p}if(e&&e.defaultProps){var v=e.defaultProps;
for(r in v)void 0===i[r]&&(i[r]=v[r])}return o(e,l,u,d,c,a.current,i)},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 i,l=r({},e.props),u=e.key,d=e.ref,c=e._self,f=e._source,p=e._owner;if(null!=t){void 0!==t.ref&&(d=t.ref,p=a.current),void 0!==t.key&&(u=""+t.key);var h;e.type&&e.type.defaultProps&&(h=e.type.defaultProps);for(i in t)t.hasOwnProperty(i)&&!s.hasOwnProperty(i)&&(void 0===t[i]&&void 0!==h?l[i]=h[i]:l[i]=t[i]);
}var v=arguments.length-2;if(1===v)l.children=n;else if(v>1){for(var g=Array(v),m=0;m<v;m++)g[m]=arguments[m+2];l.children=g}return o(e.type,u,d,c,f,p,l)},o.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},e.exports=o},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(41),o=r(s),l=n(20),u=r(l),d=n(554),c=r(d),f=n(1060),p=r(f),h=c.default.extend({name:"UserStorageModel",storageKey:"users",sessionAttrs:{
activeUserID:u.default.integer},syncedRelations:{users:{relationClass:p.default}},initialize:function(){this.debouncedSave=i.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 h,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.key,n=e.getModel,r=(0,u.default)(t),i="is"+r+"Pending",s="is"+r+"Populated",l=t?t+"Error":"error";return function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=n(e,r),d=t?u.get(t):u,c=u.sessionAttrs;(0,o.default)(!!c,u.name+" is missing session attributes"),(0,o.default)(c.hasOwnProperty(i),u.name+" is missing a session attribute for "+i),
(0,o.default)(c.hasOwnProperty(s),u.name+" is missing a session attribute for "+s),(0,o.default)(c.hasOwnProperty(l),u.name+" is missing a session attribute for "+l),u.set(i,!0),d.fetch(r.options).done(function(){var e;u.set((e={},a(e,i,!1),a(e,s,!0),a(e,l,null),e))}).fail(function(e,t){var n;u.set((n={},a(n,i,!1),a(n,l,t),n))})}}var a=n(38).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(41),o=i(s),l=n(200),u=i(l);e.exports=t.default},function(e,t,n){"use strict";
var r=n(11).default,a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(64),o=a(s),l=n(42),u=i(l),d=(0,o.default)(u.TEST_SERVER);t.testServer=d;var c=(0,o.default)(u.SET_RELAY_REMINDER);t.setRelayReminder=c;var f=(0,o.default)(u.FETCH_PROVIDERS);t.fetchProviders=f;var p=(0,o.default)(u.POPULATE_PROVIDERS);t.populateProviders=p;var h=(0,o.default)(u.FETCH_LIBRARIES);t.fetchLibraries=h;var v=(0,o.default)(u.POPULATE_LIBRARIES);t.populateLibraries=v;var g=(0,o.default)(u.ADD_LIBRARY);
t.addLibrary=g;var m=(0,o.default)(u.START_LIBRARY_REFRESH);t.startLibraryRefresh=m;var y=(0,o.default)(u.SHARE_LIBRARIES);t.shareLibraries=y;var b=(0,o.default)(u.ENABLE_HTTP_FALLBACK);t.enableHttpFallback=b;var P=(0,o.default)(u.OPTIMIZE_DATABASE);t.optimizeDatabase=P;var w=(0,o.default)(u.CLEAN_BUNDLES);t.cleanBundles=w;var S=(0,o.default)(u.EMPTY_TRASH);t.emptyTrash=S;var _=(0,o.default)(u.DELETE_SERVER);t.deleteServer=_;var T=(0,o.default)(u.START_ACTIVITY);t.startActivity=T;var I=(0,o.default)(u.UPDATE_ACTIVITY);
t.updateActivity=I;var M=(0,o.default)(u.FINISH_ACTIVITY);t.finishActivity=M;var C=(0,o.default)(u.EVENT_CONNECTION_OPEN);t.eventConnectionOpen=C;var x=(0,o.default)(u.START_LIBRARY_REFRESH,function(e){return r({},e,{force:!0})});t.startLibraryForceRefresh=x;var E=(0,o.default)(u.START_LIBRARY_REFRESH,function(e){return r({},e,{cancel:!0})});t.cancelLibraryRefresh=E},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.className,r=e.errorClassName,s=e.name,o=e.hasError,u=a(e,["children","className","errorClassName","name","hasError"]);
return l.default.createElement("label",i({},u,{className:(0,d.default)(n,o&&r),htmlFor:s}),t)}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(33),d=s(u),c=n(2067),f=s(c);r.propTypes={children:o.PropTypes.node.isRequired,className:o.PropTypes.string,errorClassName:o.PropTypes.string,name:o.PropTypes.string,hasError:o.PropTypes.bool},r.defaultProps={className:f.default.label,errorClassName:f.default.hasError},t.default=r,e.exports=t.default;
},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children,r=a(e,["className","children"]);return l.default.createElement("div",i({className:t},r),n)}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(2087),d=s(u);r.propTypes={className:o.PropTypes.string,children:o.PropTypes.node},r.defaultProps={className:d.default.modalFooter},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=a(e,["children"]);
return l.default.createElement("div",i({className:d.default.modalHeader},n),t)}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(2089),d=s(u);r.propTypes={children:o.PropTypes.node},t.default=r,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={LIBRARY:"library",CONTINUE_WATCHING:"continueWatching",PRE_PLAY:"prePlay",SEARCH:"search"};t.default=n,e.exports=t.default},function(e,t,n){
"use strict";function r(){C.ReactReconcileTransaction&&w?void 0:g(!1)}function a(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=C.ReactReconcileTransaction.getPooled(!0)}function i(e,t,n,a,i,s){r(),w.batchedUpdates(e,t,n,a,i,s)}function s(e,t){return e._mountOrder-t._mountOrder}function o(e){var t=e.dirtyComponentsLength;t!==m.length?g(!1):void 0,m.sort(s),y++;for(var n=0;n<t;n++){var r=m[n],a=r._pendingCallbacks;r._pendingCallbacks=null;
var i;if(p.logTopLevelRenders){var o=r;r._currentElement.props===r._renderedComponent._currentElement&&(o=r._renderedComponent),i="React update: "+o.getName(),console.time(i)}if(h.performUpdateIfNecessary(r,e.reconcileTransaction,y),i&&console.timeEnd(i),a)for(var l=0;l<a.length;l++)e.callbackQueue.enqueue(a[l],r.getPublicInstance())}}function l(e){return r(),w.isBatchingUpdates?(m.push(e),void(null==e._updateBatchNumber&&(e._updateBatchNumber=y+1))):void w.batchedUpdates(l,e)}function u(e,t){w.isBatchingUpdates?void 0:g(!1),
b.enqueue(e,t),P=!0}var d=n(60),c=n(852),f=n(156),p=n(863),h=(n(98),n(233)),v=n(371),g=n(39),m=[],y=0,b=c.getPooled(),P=!1,w=null,S={initialize:function(){this.dirtyComponentsLength=m.length},close:function(){this.dirtyComponentsLength!==m.length?(m.splice(0,this.dirtyComponentsLength),I()):m.length=0}},_={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},T=[S,_];d(a.prototype,v.Mixin,{getTransactionWrappers:function(){return T},destructor:function(){
this.dirtyComponentsLength=null,c.release(this.callbackQueue),this.callbackQueue=null,C.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return v.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),f.addPoolingTo(a);var I=function(){for(;m.length||P;){if(m.length){var e=a.getPooled();e.perform(o,null,e),a.release(e)}if(P){P=!1;var t=b;b=c.getPooled(),t.notifyAll(),c.release(t)}}},M={injectReconcileTransaction:function(e){
e?void 0:g(!1),C.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:g(!1),"function"!=typeof e.batchedUpdates?g(!1):void 0,"boolean"!=typeof e.isBatchingUpdates?g(!1):void 0,w=e}},C={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:l,flushBatchedUpdates:I,injection:M,asap:u};e.exports=C},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=n(12),h=r(p),v=n(141),g=r(v),m=n(57),y=r(m),b=n(558),P=r(b),w=n(160),S=r(w);
n(194);var _,T=!1,I=d.default.Controller.extend({populateView:function(e){e||(e={}),e.showLoading!==!1&&h.default.trigger("show:loading",{navigating:!0}),this.abortPendingPopulate();var t={options:e},n=l.default.Deferred().resolve(t).promise(),r=this.populateUser(n,t);return r=this.populateServer(r,e.serverID,t),e.primaryServer&&(r=this.populatePrimaryServer(r,t)),e.sectionID&&(r=this.populateSection(e,r,t)),e.key&&(r=this.populateMetadata(e,r,t)),e.channelID&&(r=this.populateChannel(e,r,t)),e.channelKey&&(r=this.populateChannelMetadata(e,r,t)),
r=r.then(function(){return l.default.Deferred().resolve(t).promise()},function(e){return T?T=!1:h.default.trigger("navigate","unauthorized",{result:t,silent:!0}),l.default.Deferred().reject(t).promise()}),_=r,r},abortPendingPopulate:function(){_&&"pending"===_.state()&&(T=!0),g.default.abortAll("page")},populateUser:function(e,t){var n=f.resolve("appModel"),r=n.get("user"),a=function(){var e=r.get("isLocked"),n=l.default.Deferred();return e?n.reject(t):n.resolve(t),n.promise()},i=r.get("lockState")===S.default.lockStates.PENDING?r.server.populate():l.default.Deferred().resolve().promise();
return e=i.then(a,a)},populateServer:function(e,t,n){var r=f.resolve("appModel");return e=e.then(function(){var e=r.get("servers"),a=void 0;if(!t)return e.populateAnyServer();if(/^transient/.test(t)){var i=r.get("transientServer");if(!i||i.id!==t)return h.default.trigger("navigate:refresh:dashboard"),l.default.Deferred().reject().promise();a=l.default.Deferred().resolve(i).promise()}else a=e.populateServer(t);return a.done(function(e){n.server=e}),a.fail(function(){n.server=e.get(t)}),a})},populatePrimaryServer:function(e,t){
var n=f.resolve("appModel");return e=e.then(function(){function e(i,s){s||(n.off("change:isWaitingForPrimaryServer",e),a=n.get("primaryServer"),a?(t.server=a,a.populate().done(r.resolve).fail(r.reject)):r.reject())}var r=l.default.Deferred(),a=n.get("primaryServer");return a?(t.server=a,r.resolve().promise()):n.get("isWaitingForPrimaryServer")?(n.on("change:isWaitingForPrimaryServer",e),r.promise()):r.reject().promise()})},populateSection:function(e,t,n){return t=t.then(function(){return n.server.get("sections").populate();
}),t=t.then(function(t){var r=n.item,a=e.sectionID;if(r&&(a=r.get("librarySectionID"),!a||!n.server.get("isFullServer")))return l.default.Deferred().resolve();var i=t.get(a);return i?(n.section=i,r&&r.setContext("section",i),l.default.Deferred().resolve(i)):l.default.Deferred().reject()})},populateMetadata:function(e,t,n){return t=t.then(function(){var t=new y.default({key:e.key},{server:n.server,relatedOptions:e.relatedOptions});return n.item=t,t.fetch({scope:"page",data:s.default.extend({checkFiles:"1",
includeExtras:"1",includeRelated:"1",includeRelatedCount:"0",includeOnDeck:"1",includeChapters:"1"},e.populateData)})}),t=this.populateSection(e,t,n)},populateChannel:function(e,t,n){return t=t.then(function(){var t=e.channelID,r={};/^\/\w+\//.test(t)?r.key=t:r.identifier=t;var a=new P.default(r,{server:n.server});return n.channel=a,a.fetch({scope:"page"})})},populateChannelMetadata:function(e,t,n){return t=t.then(function(){var t=new P.default({key:e.channelKey},{server:n.server,channel:n.channel
});return n.channelItem=t,t.fetch({scope:"page"})})}});t.default=I,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(47),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=n(12),h=r(p),v=n(191),g=r(v),m=d.default.AppRouter.extend({initialize:function(){this.uniqueRoutes=s.default.uniq(s.default.values(this.appRoutes)),this.fragments=s.default.invert(this.appRoutes),this.listenTo(this,"route",this.onRoute),
this.listenTo(h.default,"navigate",this.onNavigate)},resolveUrlFragment:function(e,t){var n=e.match(/:\w+/g);return n&&s.default.each(n,function(n){var r=n.slice(1),a=t[r];if(null==a){var i=new RegExp("\\([^\\)]*"+n+"[^\\)]*\\)","g");e=e.replace(i,"")}else e=e.replace(n,encodeURIComponent(a))}),e.replace(/\(|\)/g,"")},onRoute:function(e){var t=f.resolve("appModel"),n=t.get("history"),r=t.get("forwardHistory"),a=l.default.history.getFragment();a===r[0]?n.push(r.shift()):a!==s.default.last(n)&&(n.push(a),
r.splice(0)),g.default.trackView(e),t.trigger("change:history",t,n)},onNavigate:function(e,t){if(s.default.indexOf(this.uniqueRoutes,e)!==-1){t||(t={});var n=!1;if(null!=t.silent&&(n=t.silent,delete t.silent),null==t.trigger&&(t.trigger=!0),n)this.controller[e].apply(this.controller,s.default.values(t));else{var r=this.resolveUrlFragment(this.fragments[e],t);this.navigate(r,{trigger:t.trigger,replace:t.replace})}}}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.seasonPrefix||"S{1}",n=e.episodePrefix||"E{1}",r=e.seasonIndex,a=e.episodeIndex;
if((a>0||0===a)&&r<1e3){e.noLeadingZero||(r=(0,d.default)(r),a=(0,d.default)(a));var i=e.separator||"";return(0,l.default)(t,r)+i+(0,l.default)(n,a)}return e.date?(0,s.default)(e.date).format("M/D/YY"):""}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),s=a(i),o=n(5),l=a(o),u=n(408),d=a(u);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=[];if(e){var r=s.default.first(e.Part);r&&r.Stream&&n.push.apply(n,s.default.where(r.Stream,t));
}return n}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(9).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(26),s=r(i),o=n(244),l=a(o),u=n(58),d=a(u),c=d.default.extend({getUrl:function(e){if(e){var t=(0,l.default)();return s.join(e,{size:Math.round(this.width*t)})}return e}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e.get("unviewedLeafCount")>0;
}function a(e){var t=e.get("viewCount"),n=e.get("viewOffset");return!(t&&!n)}function i(e){return!(!e||e.get("isFolder"))&&!m.default.get(e.get("type")).child}function s(e){return!r(e)}function o(e){return!a(e)}var l=n(1).default,u=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(3),c=l(d),f=n(14),p=u(f),h=n(5),v=l(h),g=n(37),m=l(g),y=n(59),b=l(y),P={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,showShare:!0,showWatchLater:!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,showShare:!0,showWatchLater:!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}},w={showListDropdown:["showShuffle","showQueue","showRefresh","showSync","showDownload","showWatchLater","showShare","showInfo"]},S=b.default.extend({initialize:function(e,t){t||(t={});var n=p.resolve("appModel");this.item=t.item,this.playQueue=t.playQueue,this.parent=this.item||this.section,this.showAdvanced=t.showAdvanced,this.user=n.get("user"),this.signedIn=this.user.get("signedIn"),this.devices=this.user.get("devices"),this.setDefaults(t.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(e){e&&e!==this.type&&(this.type=e,this.section&&(e+="Section"),this.defaults=c.default.clone(P[e]||{}),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 r=!!this.defaults&&this.defaults[e];this.set(e,t.call(this,r,n))},updateDropdown:function(e){var t=w[e],n=c.default.map(t,function(e){return this.get(e)},this);this.set(e,c.default.some(n))},updateSelectionStates:function(){var e=this.getActionTargets();if(e){var t=e[0].get("type"),n="show"===t||"season"===t,i=this.get("selectedItems"),l=!(!i||!i.length),u=c.default.some(i,function(e){
return e.get("isFolder")}),d=!!c.default.some(e,n?r:a),f=!!c.default.some(e,n?s:o);this.set({selecting:l,hasSelectedFolder:u,hasUnwatched:d,hasWatched:f})}},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.item&&!this.item.get("isLibraryItem"))&&(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(e){if(!e||!this.server)return!1;if(this.playQueue&&this.playQueue.get("isRadio"))return!1;var t,n=this.server.supports("playlists"),r=this.parent&&this.parent.get("currentSubset");if(r){var a=this.get("selectedItems"),i=c.default.some(a,function(e){return e.get("isFolder");
});t=("all"===r.id||a&&a.length>0)&&!i}else t=this.item&&this.item.get("isLibraryItem");return n&&t},canRefresh:function(e){if(!e||this.synced)return!1;var t=this.getActionTargets(),n=c.default.every(t,function(e){var t=this.shared&&e.get("isPlaylist"),n=e.get("isSection"),r=!this.shared&&(n||e.get("isLibraryItem")&&!e.get("isFolder"));return t||r},this);return n},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)&&!i(this.item))return!1;var t=this.getActionTargets();if(!t)return!1;var n=t[0];return!(n.get("isSection")||n.get("isFolder")||!n.get("isLibraryItem"))&&this.get("hasUnwatched");
},canMarkUnwatched:function(e){if(!e)return!1;if(!this.canMultiSelect(e)&&!i(this.item))return!1;var t=this.getActionTargets();if(!t)return!1;var n=t[0];return!(n.get("isSection")||n.get("isFolder")||!n.get("isLibraryItem"))&&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(e){if(!e||!this.item||this.shared||this.synced)return!1;var t;if("movie"===this.type){var n=this.item.get("Media");t=c.default.filter(n,function(e){return!e.proxyType})}else t=this.item.get("Location");return t.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",r=this.server.supports(n);if(!r||this.parent.get("isFolder"))return!1;var a;if(this.shared){var i=this.section||this.item.section;a=i&&i.get("allowSync")}else a=this.parent.get("allowSync")||this.parent.collection&&this.parent.collection.allowSync;return!!a},canConvert:function(e){if(!e||!this.parent||this.shared||this.synced)return!1;if(this.item&&!this.item.get("isLibraryItem"))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"===m.default.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)return!1;var t=this.item&&this.item.get("isLibraryItem");return!t&&this.signedIn&&!this.user.get("restricted")},canDelete:function(e){if(!e)return!1;if(this.item&&!this.item.get("isSection"))return this.canDeleteSingleItem(this.item);
if(!this.canMultiSelect(e))return!1;var t=this.getActionTargets();return!!t&&c.default.every(t,this.canDeleteSingleItem,this)},canDeleteSingleItem:function(e){if(!e||this.synced||e.get("isSection"))return!1;if(!i(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(e){if(!e||!this.item||this.shared||this.synced)return!1;if(!this.server.get("allowMediaDeletion"))return!1;
var t=this.item.get("Media"),n=c.default.filter(t,function(e){return!!e.proxyType});return!!n.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(e,t){
if(0!==e.length){var n=this.get("selectedItems"),r=c.default.bind(this.updateAll,this),a=c.default.filter(e,function(e){return!c.default.contains(n,e)});c.default.each(a,function(e){e.selected=!0,n.push(e),this.listenTo(e,{"change:viewCount":r,"change:viewOffset":r,"change:unviewedLeafCount":r,"change:viewedLeafCount":r})},this);var i=this.sortSelectedItems(n,t);this.set("selectedItems",i),this.trigger("change:selectedItems",this,i)}},sortSelectedItems:function(e,t){var n=t&&t.superset;return n?c.default.sortBy(e,function(e){
return n.indexOf(e)}):c.default.clone(e)},deselectItems:function(e,t){if(0!==e.length){var n=this.get("selectedItems");c.default.each(e,function(e){var t=c.default.indexOf(n,e);t!==-1&&(e.selected=!1,n.splice(t,1),this.stopListening(e))},this),n.length||this.set("selecting",!1),this.trigger("change:selectedItems",this,n)}},selectItem:function(e,t){this.selectItems([e],t)},deselectItem:function(e,t){this.deselectItems([e],t)},deselectAll:function(){var e=this.get("selectedItems");e&&0!==e.length&&(c.default.each(e,function(e){
e.selected=!1}),e.length=0,this.trigger("change:selectedItems",this,e))},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?(0,v.default)("{1} and {2}",e[0].get("title"),e[1].get("title")):3===e.length?(0,v.default)("{1}, {2}, and {3}",e[0].get("title"),e[1].get("title"),e[2].get("title")):(0,
v.default)("{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()}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(64),s=r(i),o=n(42),l=a(o),u=(0,s.default)(l.INIT_QUICK_SEARCH);t.initQuickSearch=u;var d=(0,s.default)(l.RESET_QUICK_SEARCH);
t.resetQuickSearch=d;var c=(0,s.default)(l.FETCH_QUICK_SEARCH);t.fetchQuickSearch=c;var f=(0,s.default)(l.CHANGE_QUICK_SEARCH_QUERY);t.changeQuickSearchQuery=f;var p=(0,s.default)(l.CHANGE_QUICK_SEARCH_SETTINGS);t.changeQuickSearchSettings=p;var h=(0,s.default)(l.SELECT_QUICK_SEARCH_RESULT);t.selectQuickSearchResult=h;var v=(0,s.default)(l.NAVIGATE_QUICK_SEARCH_RESULT);t.navigateQuickSearchResult=v;var g=(0,s.default)(l.PLAY_QUICK_SEARCH_RESULT);t.playQuickSearchItem=g},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2379),i=r(a),s=n(8),o=r(s),l=n(3),u=r(l),d=n(13),c=r(d),f=n(5),p=r(f),h=n(12),v=r(h),g=n(118),m=r(g),y=n(196),b=r(y),P=n(198),w=r(P),S=n(138),_=r(S),T=n(312),I=r(T),M=n(40),C=r(M),x=n(27),E=r(x),k=n(664),D=r(k),A=n(121),O=r(A),R=n(1521),L=r(R),N=n(144),j=r(N),U=n(259),$=r(U),z=n(173),F=r(z),B=c.default.Layout.extend({mixins:[D.default],tagName:"li",className:"striped-list-item media-list-item",template:i.default,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){u.default.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 n=this.model&&this.model.server||this.parentMediaActions&&this.parentMediaActions.server;this.mediaActions=new O.default({},{item:this.model,type:t,server:n}),this.listenTo(this.mediaActions,{"change:showPlay":this.onActionsChange,"change:showEdit":this.onActionsChange,"change:showListDropdown":this.onActionsChange}),v.default.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,r=n.id?n.id:n.get("identifier");t+="/channel/"+encodeURIComponent(r),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 c.default.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&&!C.default.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,n=this.model.get("type");return/^(season|episode|album|track)$/.test(n)&&!this.model.get("isChannelItem")?'<span class="btn-metadata-link media-title-link">'+u.default.escape(t)+"</span>":u.default.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=(0,p.default)("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?(0,m.default)({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"),r=n?this.model.server.get("friendlyName"):e;t.toggleClass("multiserver-only",n),t.text(r)}},".media-added-at":{modelAttribute:"addedAt",
autohide:!0,formatter:function(e){return(0,_.default)(e)}},".media-available-at":{modelAttribute:"originallyAvailableAt",autohide:!0,formatter:function(e){return(0,b.default)(e)}},".media-resolution":{modelAttribute:"Media",autohide:!0,formatter:function(e){return e&&e.length?(0,I.default)(e[0].videoResolution):""}},".media-duration":{modelAttribute:"duration",autohide:!0,formatter:function(e){return(0,w.default)(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 j.default({model:this.model,disabled:!0})),this.progress&&this.progress.show(new L.default({model:this.model}))},onClose:function(){this.image&&this.image.close(),this.dropdown&&this.dropdown.close(),v.default.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 r={item:this.model,siblings:this.canPlaySiblings()};"photo"===t&&(r.autoplay=!1),E.default.execute("playMedia",r)}})},onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),
E.default.execute("playMedia",{item:this.model,continuous:this.continuousPlay,siblings:this.canPlaySiblings()})},onPlayUnwatchedClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),E.default.execute("playMedia",{item:this.model,unwatched:!0,siblings:this.canPlaySiblings()})},onEditClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=(0,o.default)(e.currentTarget),n=t.hasClass("btn-loading")?t:this.$el;if(!n.hasClass("active")){n.addClass("active");var r=this.model.fetch({
data:{includePreferences:"1"}});r.done(u.default.bind(function(){v.default.trigger("show:modal",new F.default({mediaActions:this.mediaActions}))},this)),r.always(u.default.bind(function(){n.removeClass("active")},this))}},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),(0,o.default)(".media-actions-dropdown").trigger("hide.bs.dropdown"),this.dropdown=new $.default({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 t=(0,o.default)(e.currentTarget),n=this.ui.actions.position().top,r=this.dropdown.getPosition(t,this.containerSize,n);this.ui.dropdown.css(r)},onTitleClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),v.default.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"));
}});t.default=B,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(54),u=r(l),d=u.default.extend({className:"select-modal modal modal-sm fade",events:i.default.extend({"click a":"onClick"},u.default.prototype.events),initialize:function(){u.default.prototype.initialize.apply(this,arguments),this.promise=o.default.Deferred()},onRender:function(){u.default.prototype.onRender.apply(this,arguments)},
onHide:function(e){u.default.prototype.onHide.apply(this,arguments),this.promise.reject()},onClick:function(e){e.preventDefault(),this.promise.resolve((0,o.default)(e.currentTarget).data("value")),this.hide()}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.separator;return{$$typeof:a,type:"span",key:null,ref:null,props:{children:n,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),
n(2050)),l=i(o);r.propTypes={className:s.PropTypes.string,separator:s.PropTypes.string},r.defaultProps={className:l.default.separator,separator:"\u2014"},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.className,r=e.isSelected,l=e.selectedIconName,u=e.selectedIconAriaLabel,c=s(e,["children","className","isSelected","selectedIconName","selectedIconAriaLabel"]);return d.default.createElement(y.default,o({className:(0,f.default)(n,r&&P.default.isSelected)
},c),{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:"div",key:null,ref:null,props:{children:t,className:P.default.menuLabel},_owner:null},r&&{$$typeof:a,type:"div",key:null,ref:null,props:{children:{$$typeof:a,type:g.default,key:null,ref:null,props:i(g.default.defaultProps,{name:l,"aria-label":u||(0,h.default)("Selected")}),_owner:null},className:P.default.selectedIcon},_owner:null}],className:P.default.menuItemContainer},_owner:null})}var a=n(7).default,i=n(10).default,s=n(19).default,o=n(11).default,l=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(33),f=l(c),p=n(5),h=l(p),v=n(36),g=l(v),m=n(147),y=l(m),b=n(2080),P=l(b);r.propTypes={children:u.PropTypes.node,className:u.PropTypes.string,isSelected:u.PropTypes.bool,selectedIconName:u.PropTypes.string,selectedIconAriaLabel:u.PropTypes.string},r.defaultProps={selectedIconName:"plex-icon-selected-560"},t.default=r,e.exports=t.default},,function(e,t,n){var r=n(797)("wks"),a=n(799),i=n(348).Symbol;e.exports=function(e){return r[e]||(r[e]=i&&i[e]||(i||a)("Symbol."+e));
}},function(e,t,n){function r(e){if(!s(e)||p.call(e)!=o||i(e))return!1;var t=a(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&d.call(n)==f}var a=n(2566),i=n(831),s=n(836),o="[object Object]",l=Function.prototype,u=Object.prototype,d=l.toString,c=u.hasOwnProperty,f=d.call(Object),p=u.toString;e.exports=r},function(e,t,n){"use strict";var r=n(357),a=r({bubbled:null,captured:null}),i=r({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:i,PropagationPhases:a};e.exports=s},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var a=this.constructor.Interface;for(var i in a)if(a.hasOwnProperty(i)){var o=a[i];o?this[i]=o(n):"target"===i?this.target=r:this[i]=n[i]}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 a=n(60),i=n(156),s=n(97),o=(n(52),"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};a(r.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}}),r.Interface=l,
r.augmentClass=function(e,t){var n=this,r=function(){};r.prototype=n.prototype;var s=new r;a(s,e.prototype),e.prototype=s,e.prototype.constructor=e,e.Interface=a({},n.Interface,t),e.augmentClass=n.augmentClass,i.addPoolingTo(e,i.fourArgumentPooler)},i.addPoolingTo(r,i.fourArgumentPooler),e.exports=r},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(635),o=r(s),l=n(632),u=r(l),d=n(196),c=r(d),f=n(198),p=r(f),h=n(1146),v=r(h),g={
tagsRenderer:v.default,tagsRendererOptions:{},defaultBindings:{".item-title":{modelAttribute:"title"},".item-year":{modelAttribute:"year"},".item-progress":{modelAttribute:"viewOffset",manual:!0,formatter:function(e,t){var n=this.model.get("duration"),r=(0,o.default)(e,n);r&&t.css("width",r+"%"),t.parent().toggleClass("hidden",!r)}},".item-duration":{modelAttribute:"duration",autohide:!0,formatter:function(e){return e?(0,p.default)(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=(0,u.default)(e);return!!t.length}},".item-available-at":{modelAttribute:"originallyAvailableAt",autohide:!0,formatter:function(e){return(0,c.default)(e)}},".item-tagline":{modelAttribute:"tagline",autohide:!0},".item-genre":{modelAttribute:"Genre",autohide:!0,isHtml:!0,formatter:function(e){if(!e||!e.length)return"";
var t=this.tagsRenderer(i.default.extend({},this.tagsRendererOptions,{model:this.model,key:"genre",tags:e,maxLen:50,maxTags:2}));return t}},".item-director":{modelAttribute:"Director",manual:!0,autohide:!0,formatter:function(e,t){if(!e||!e.length)return"";var n=this.tagsRenderer(i.default.extend({},this.tagsRendererOptions,{model:this.model,key:"director",tags:e,maxLen:50,maxTags:3}));return t.find(".metadata-tag-list").html(n),n}},".item-writer":{modelAttribute:"Writer",manual:!0,autohide:!0,formatter:function(e,t){
if(!e||!e.length)return"";var n=this.tagsRenderer(i.default.extend({},this.tagsRendererOptions,{model:this.model,key:"writer",tags:e,maxLen:50,maxTags:3}));return t.find(".metadata-tag-list").html(n),n}},".item-cast":{modelAttribute:"Role",manual:!0,autohide:!0,formatter:function(e,t){if(!e||!e.length)return"";var n=this.tagsRenderer(i.default.extend({},this.tagsRendererOptions,{model:this.model,key:"actor",tags:e,maxLen:50,maxTags:5}));return t.find(".metadata-tag-list").html(n),n}},".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}}};t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(41),o=r(s),l=n(420),u=r(l),d=n(26),c=n(20),f=r(c),p=n(22),h=r(p),v=n(1017),g=r(v),m={UNTESTED:"untested",PENDING:"pending",CONNECTED:"connected",UNAUTHORIZED:"unauthorized",UNAVAILABLE:"unavailable",ABORTED:"aborted"},y=f.default.boolean.isRequired,b=h.default.extend({name:"ConnectionModel",context:["server"],idAttribute:"uri",sessionAttrs:{
currentTest:f.default.custom(function(e){return i.default.isFunction(e.abort)}),testState:f.default.oneOf(m.UNTESTED,m.PENDING,m.CONNECTED,m.UNAUTHORIZED,m.UNAVAILABLE,m.ABORTED).isRequired,isBundled:y,isFallback:y,serverAttrs:f.default.object,currentReachabilityTest:f.default.custom(function(e){return i.default.isFunction(e.abort)}),isPossiblyCrossNetworkProtected:f.default.boolean.isRequired},sessionRelations:{sources:{relationClass:g.default}},syncedAttrs:{uri:f.default.string,scheme:f.default.string,
address:f.default.string,port:f.default.string,relay:f.default.boolean},derivedAttrs:{isUntested:function(){return this.get("testState")===m.UNTESTED},isPending:function(){return this.get("testState")===m.PENDING},isConnected:function(){return this.get("testState")===m.CONNECTED},isUnauthorized:function(){return this.get("testState")===m.UNAUTHORIZED},isUnavailable:function(){return this.get("testState")===m.UNAVAILABLE},isFailed:function(){return this.get("isUnauthorized")||this.get("isUnavailable");
},isAborted:function(){return this.get("testState")===m.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:m.UNTESTED,isBundled:!1,
isFallback:!1,relay:!1,isPossiblyCrossNetworkProtected:!1},url:function(){return this.get("uri")},constructor:function(e,t){var n=i.default.clone(e);i.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)),h.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?i.default.extend({},e,{scheme:t}):e},getAddressFromUri:function(){return(0,d.parseUrl)(this.get("uri")).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:m});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(83),o=r(s),l=n(1026),u=r(l),d=o.default.extend({model:u.default,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(e){var t=this.convert(e,"Setting");return i.default.filter(t,function(e){return e.id})}});t.default=d,e.exports=t.default},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";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),i=r(a),s=n(396),o=r(s),l=o.default.extend({maxCycles:5,maxSize:100,getItemCacheKey:function(e,t){if(i.default.isFunction(e.cacheKey))return t||(t=e.toJSON()),e.cacheKey(t)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e<=0||!s.default.isNumber(e))return"0:00";var t=l.default.duration(e),n=t.seconds(),r=t.minutes(),a=t.hours()+24*t.days(),i="";return i=n<10?":0"+n:":"+n,i=r<10&&a>0?"0"+r+i:r+i,a>0&&(i=a+":"+i),i}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),s=a(i),o=n(53),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return(0,s.default)(e,{limit:"past"})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1077),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(641),i=r(a),s=n(86),o=r(s);t.default=(0,o.default)(i.default),e.exports=t.default},function(e,t,n){"use strict";function r(e){
var t=s.default.Deferred();return e.always(function(){t.resolve.apply(t,arguments)}),t.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(14),u=n(26),d=n(35),c=r(d),f=n(32),p=r(f),h=n(628),v=r(h),g=c.default.extend({initialize:function(){i.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=i.default.isString(e)?this.byId[e]:e;t&&(t.xhr.aborting=!0,
t.xhr.abort(),this.remove(t))},store:function(e,t){var n=i.default.uniqueId("r");e.rid=n;var r={xhr:e,settings:t};return this.requests.push(r),this.byId[n]=r,r},remove:function(e){var t=i.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 r=this;if(!n.skipCorsWithRedirect){var a=this.store(t,n);t.always(function(){t.aborting||r.remove(a)})}},onAjaxComplete:function(e,t,n){var r=(0,v.default)(t);
if(!t.aborting&&r){var a=(0,u.parseUrl)(n.url);if(!r||"/log"!==a.pathname){var s=(0,l.resolve)("appModel").get("servers").find(function(e){var t=e.get("activeConnection"),r=t&&t.get("isConnected"),a=i.default.result(t,"url");return!!r&&0===n.url.indexOf(a)});s&&((0,p.default)('[Connections] Active connection to "%s" lost authorization',s.get("debugName")),s.trigger("error:connection",s))}}}});t.default=new g,e.exports=t.default},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,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(13),i=r(a),s=n(61),o=r(s),l=n(41),u=r(l),d=n(2260),c=r(d),f=n(2044),p=r(f),h=i.default.Layout.extend({className:"react-page-container",template:c.default,ui:{sidebar:".sidebar-container",page:".page-container"},initialize:function(){this.$el.addClass(p.default.wrapper)},serializeData:function(){return{styles:p.default
}},mountReact:function(){(0,u.default)(!1,"`mountReact` must be implemented by a subclass of `ReactPageView`")},unmountReact:function(){this.isRendered&&(o.default.unmountComponentAtNode(this.ui.sidebar[0]),o.default.unmountComponentAtNode(this.ui.page[0]))},onBeforeRender:function(){this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2279),i=r(a),s=n(8),o=r(s),l=n(3),u=r(l),d=n(331),c=r(d),f=n(27),p=r(f),h=c.default.extend({tagName:"span",className:"rating star-rating",template:i.default,disabled:!0,modelEvents:{"change:rating":"onRatingChange","change:userRating":"onRatingChange"},events:u.default.extend({mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},c.default.prototype.events),initialize:function(e){c.default.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,r=n/t.width();return r=Math.min(Math.max(r,0),1),
r=2*Math.ceil(5*r)},persistValue:function(){var e=this.currentValue||-1;p.default.execute("rate",{item:this.model,rating:e,passive:this.passive}),this.updateRating(),this.render()},displayValue:function(e){this.$el.data("value",e);var t=this.normalizeRating(e),n=this.$(".star-icon");n.each(function(e){var n=t>e;(0,o.default)(this).toggleClass("star",n).toggleClass("dislikes",!n)}),this.$el.toggleClass("unrated",!e)},onRender:function(){c.default.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()}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(47),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=n(5),h=r(p),v=n(12),g=r(v),m=n(51),y=r(m),b=n(37),P=r(b),w=n(101),S=r(w),_=n(313),T=r(_),I=n(311),M=r(I),C=n(234),x=r(C),E=n(376),k=r(E),D=n(40),A=r(D),O=n(27),R=r(O),L=n(132),N=r(L),j=n(263),U=r(j),$=d.default.Layout.extend({mixins:N.default,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(e){s.default.bindAll(this,"onResize","onScroll");var t=f.resolve("appModel");this.mediaActions=e.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 l.default.Model({loading:!1,failed:!1}),this.listenTo(t,"change:primaryPlayer",this.onPrimaryPlayerChange),this.pageSize&&(g.default.trigger("content.subscribe:resize",this.onResize),
g.default.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"):P.default.getChildMediaType(this.model.get("type")).element;
var t=y.default.getTypeByElement(e),n=x.default.getInstance(t,{isPassive:!0});n&&n.mirror({item:this.model})}},populatePage:function(){this.progress.set("loading",!0);var e=this.children.populateRange({start:0,end:this.children.get("populatedRange").end+this.pageSize,scope:"page"});return e.always(s.default.bind(function(){this.progress.set("loading",!1)},this)),e},getPreferredMedia:function(){var e=f.resolve("appModel"),t=P.default.getChildMediaType(this.model.get("type")).element,n={item:this.model,
type:t,profile:k.default.prop(t),transcodeServer:T.default.resolveTranscodeServer({type:t,item:this.model,fallbackServer:e.get("primaryServer")}),allowDirectPlay:A.default.get("directPlay"),allowedAC3Containers:A.default.get("allowAC3")?"mp4":null,subtitlesBurnLevel:A.default.get("subtitlesBurnLevel")};return t===y.default.types.VIDEO&&(n.quality=S.default.getCurrentQuality(this.model,A.default.getInstance())),M.default.getMediaDecision(n).media},onRender:function(){if(this.children&&this.ListConstructor){
var e;e=this.pageSize?this.populatePage():this.children.fetch({scope:"page"}),e.fail(s.default.bind(function(){g.default.trigger("show:alert",{type:"error",message:(0,h.default)("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&&(g.default.trigger("content.unsubscribe:resize",this.onResize),g.default.trigger("content.unsubscribe:scroll",this.onScroll))},onPrimaryPlayerChange:function(e,t){t&&this.mirror()},onPlayClick:function(e){e.preventDefault(),R.default.execute("playMedia",{item:this.model})},onUnavailableClick:function(e){e.preventDefault(),g.default.trigger("show:modal",new U.default({
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,r=n-e.scrollTop<10,a=t.get("populatedRange").end<t.get("totalSize");r&&a&&this.populatePage()}}});t.default=$,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2413),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(47),c=r(d),f=n(5),p=r(f),h=n(12),v=r(h),g=n(37),m=r(g),y=n(568),b=r(y),P=n(385),w=r(P),S=n(1529),_=r(S),T=n(124),I=r(T),M=I.default.extend({
name:"addToPlaylistModal",className:"add-to-playlist-modal select-modal modal modal-sm fade",template:i.default,ui:{addBtn:".add-btn",newPlaylist:".message"},regions:{list:".playlists-container"},events:o.default.extend({"click .playlist":"onPlaylistClick","keyup .message":"onNewPlaylistKeyUp","click .message":"onNewPlaylistClick","click .add-btn":"onAddClick"},I.default.prototype.events),initialize:function(e){I.default.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=m.default.getChildMediaType(this.model.get("firstItemType")).element:this.model.get("playQueueID")?this.leafType=this.model.get("mediaType"):this.leafType=m.default.getChildMediaType(this.model.get("type")).element,this.smart=this.model.get("isSection")&&this.ignoreTargets,this.playlistList=new b.default({},{server:this.model.server,section:new c.default.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 t,n=this.model.server;this.ignoreTargets||(t=n.supports("playItemsBatchAdd")?this.items:o.default.first(this.items));var r=e.addContent(this.model,{items:t});return r.done(this.whenRendered(this.hide)),r.fail(this.whenRendered(function(){this.ui.addBtn.removeClass("active"),v.default.trigger("show:alert",{type:"error",message:(0,p.default)("There was a problem adding to the playlist.")
})})),r},_createPlaylist:function(){var e=this.ui.newPlaylist.val().trim();if(e){var t=new w.default({title:e,playlistType:this.leafType,smart:this.smart},{server:this.model.server}),n=this._addToPlaylist(t);n.then(o.default.bind(function(){v.default.trigger("navigate","playlist",{serverID:t.server.id,key:t.get("ratingKey")})},this))}},onRender:function(){I.default.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 _.default({collection:this.playlists}))},onNewPlaylistKeyUp:function(e){this.toggleAddButton(),13===e.keyCode&&this._createPlaylist()},onNewPlaylistClick:function(){this.suggestTitleIfEmpty()},onPlaylistClick:function(e){e.preventDefault();var t=(0,u.default)(e.currentTarget),n=t.data("id"),r=this.playlists.get(n);this._addToPlaylist(r)},onAddClick:function(e){e.preventDefault(),this.ui.addBtn.isDisabled()||this._createPlaylist();
}});t.default=M,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children,r=e.kind,s=a(e,["className","children","kind"]);return l.default.createElement(p.default,i({className:(0,d.default)(t,v.default.menuItem,v.default[r]),role:"menuitem"},s),n)}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(33),d=s(u),c=n(30),f=n(34),p=s(f),h=n(2078),v=s(h);r.propTypes={className:o.PropTypes.string,children:o.PropTypes.node,
kind:o.PropTypes.oneOf(c.kinds.all)},r.defaultProps={kind:c.kinds.DEFAULT},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(11).default,d=n(1).default,c=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=d(f),h=n(61),v=d(h),g=n(24),m=n(326),y=c(m),b=n(31),P=d(b),w=n(30),S=n(204),_=d(S),T=n(277),I=c(T),M=n(221),C=d(M),x=n(656),E=d(x),k=n(319),D=d(k),A=n(1679),O=d(A),R=n(2082),L=d(R),N=(0,
_.default)(C.default.modalSpeed),j={appear:L.default.enter,appearActive:L.default.enterActive,enter:L.default.enter,enterActive:L.default.enterActive,leave:L.default.leave,leaveActive:L.default.leaveActive},U=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this._openModal()}},{key:"shouldComponentUpdate",value:function(e,t){return(0,P.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(){I.startScopedFocus(v.default.findDOMNode(this.refs.modal)),this._autoFocusTimeoutID=setTimeout(I.scopeAutoFocus,N),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=v.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:[g.autobind],value:function(e){this._isBackdropPressed=this._isBackdropTarget(e);
}},{key:"onBackdropEndPress",decorators:[g.autobind],value:function(e){this._isBackdropPressed&&this._isBackdropTarget(e)&&this.props.onModalClose(),this._isBackdropPressed=!1}},{key:"onTouchMove",decorators:[g.autobind],value:function(e){this._isBackdropPressed=!1}},{key:"onTouchCancel",decorators:[g.autobind],value:function(e){this._isBackdropPressed=!1}},{key:"onKeyDown",decorators:[g.autobind],value:function(e){var t=e.keyCode;t===y.TAB?I.scopeTabEvent(e):t===y.ESCAPE&&(e.preventDefault(),e.stopPropagation(),
this.props.onModalClose(),I.restorePreviousFocus())}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.backdropClassName,r=e.children,a=e.size,i=e.metricsPage,s=e.metricsProperties,d=e.isOpen;return{$$typeof:l,type:E.default,key:null,ref:null,props:o(E.default.defaultProps,{children:{$$typeof:l,type:D.default,key:null,ref:null,props:o(D.default.defaultProps,{children:d&&p.default.createElement(O.default,u({},s,{page:i}),{$$typeof:l,type:"div",key:null,ref:null,props:{children:p.default.createElement("div",{
ref:"modal",className:t||L.default[a]},r),className:n,onMouseDown:this.onBackdropBeginPress,onMouseUp:this.onBackdropEndPress,onTouchStart:this.onBackdropBeginPress,onTouchEnd:this.onBackdropEndPress,onTouchMove:this.onTouchMove,onTouchCancel:this.onTouchCancel},_owner:null}),className:L.default.modalContainer,transitionName:j,transitionAppearTimeout:N,transitionEnterTimeout:N,transitionLeaveTimeout:N}),_owner:null},isOpen:d,closeTimeout:N}),_owner:null}}}]),t}(f.Component);U.propTypes={className:f.PropTypes.string,
backdropClassName:f.PropTypes.string,children:f.PropTypes.node.isRequired,size:f.PropTypes.oneOf(w.sizes.all),isOpen:f.PropTypes.bool.isRequired,metricsPage:f.PropTypes.string.isRequired,metricsProperties:f.PropTypes.object,onModalClose:f.PropTypes.func.isRequired},U.defaultProps={backdropClassName:L.default.modalBackdrop,size:w.sizes.MEDIUM},t.default=U,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.contentClassName,n=e.iconClassName,r=e.titleClassName,l=e.descriptionClassName,u=e.footerClassName,c=e.children,p=e.kind,h=e.icon,g=e.title,y=e.description,P=e.footer,w=s(e,["contentClassName","iconClassName","titleClassName","descriptionClassName","footerClassName","children","kind","icon","title","description","footer"]);
return d.default.createElement(m.default,o({className:b.default.emptyPage},w),{$$typeof:a,type:"div",key:null,ref:null,props:{children:[!!h&&{$$typeof:a,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{name:h,className:(0,f.default)(b.default[p],n)}),_owner:null},!!g&&{$$typeof:a,type:"div",key:null,ref:null,props:{children:g,className:r},_owner:null},!!y&&{$$typeof:a,type:"div",key:null,ref:null,props:{children:y,className:l},_owner:null},c],className:t},_owner:null},!!P&&{$$typeof:a,
type:"div",key:null,ref:null,props:{children:P,className:u},_owner:null})}var a=n(7).default,i=n(10).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(33),f=l(c),p=n(30),h=n(36),v=l(h),g=n(78),m=l(g),y=n(2149),b=l(y);r.propTypes={contentClassName:u.PropTypes.string,iconClassName:u.PropTypes.string,titleClassName:u.PropTypes.string,descriptionClassName:u.PropTypes.string,footerClassName:u.PropTypes.string,children:u.PropTypes.node,
icon:u.PropTypes.string,kind:u.PropTypes.oneOf(p.kinds.all),title:u.PropTypes.string,description:u.PropTypes.string,footer:u.PropTypes.string},r.defaultProps={contentClassName:b.default.content,iconClassName:b.default.icon,titleClassName:b.default.title,descriptionClassName:b.default.description,footerClassName:b.default.footer,kind:p.kinds.DEFAULT},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return o.default.createElement(u.default,a({iconClassName:c.default.icon,
icon:"plex-icon-alert-560"},e))}var a=n(11).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(149),u=i(l),d=n(2150),c=i(d);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return o.default.createElement(d.default,a({className:f.default.innerEmptyPage,contentClassName:f.default.innerEmptyPageContent,scrollDirection:l.scrollDirections.NONE},e))}var a=n(11).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(30),u=n(149),d=i(u),c=n(815),f=i(c);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n,r){var a=encodeURIComponent(e.machineIdentifier),s=encodeURIComponent(n),o=["#!/server",a,"section",s];if(r.filters){var u=r.filters.split("="),d=i(u,2),c=d[0],f=d[1];o.push("filter","0",c,f,encodeURIComponent(r.filterLabel))}return l.join(o)}function a(e,t,n){var a=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];if(e&&t&&n){if(t.isLibraryProvider)return r(e,t,n,a);var i=encodeURIComponent(e.machineIdentifier),s=encodeURIComponent(t.identifier),o=encodeURIComponent(n);
return l.join("#!/server/"+i+"/provider/"+s+"?key="+o,a)}}var i=n(93).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var o=n(26),l=s(o);e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],a=arguments.length<=4||void 0===arguments[4]?"details":arguments[4];if(e&&t&&n){var i=encodeURIComponent(e.machineIdentifier),o=encodeURIComponent(t.identifier),l=encodeURIComponent(n),u=t.isLibraryProvider?"#!/server/"+i+"/"+a+"/"+l:"#!/server/"+i+"/provider/"+o+"/details?key="+l;
return s.join(u,r)}}var a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(26),s=a(i);e.exports=t.default},,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 r=n(39),a=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),
r}return new n(e,t)},s=function(e,t,n){var r=this;if(r.instancePool.length){var a=r.instancePool.pop();return r.call(a,e,t,n),a}return new r(e,t,n)},o=function(e,t,n,r){var a=this;if(a.instancePool.length){var i=a.instancePool.pop();return a.call(i,e,t,n,r),i}return new a(e,t,n,r)},l=function(e,t,n,r,a){var i=this;if(i.instancePool.length){var s=i.instancePool.pop();return i.call(s,e,t,n,r,a),s}return new i(e,t,n,r,a)},u=function(e){var t=this;e instanceof t?void 0:r(!1),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e);
},d=10,c=a,f=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||c,n.poolSize||(n.poolSize=d),n.release=u,n},p={addPoolingTo:f,oneArgumentPooler:a,twoArgumentPooler:i,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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(1014),u=r(l),d={CONTENT:"content",SUBSCRIBE:"subscribe",
SEARCH:"search",MATCH:"match",METADATA:"metadata",TIMELINE:"timeline",PLAY_QUEUE:"playqueue",RATE:"rate",MANAGE:"manage"};t.providerFeatureTypes=d;var c=o.default.extend({name:"ProviderFeatureModel",context:["server","provider"],idAttribute:"type",syncedAttrs:{key:i.default.string,scrobbleKey:i.default.string,unscrobbleKey:i.default.string,type:i.default.string},syncedRelations:{directories:{relationClass:u.default,rootPropertyName:"Directory",deferred:!0}}});t.default=c},function(e,t){"use strict";
Object.defineProperty(t,"__esModule",{value:!0});var n={decisionEndpoint:"1.0.3",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",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){"use strict";var r=n(38).default,a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(47),d=a(u),c=n(2036),f=a(c),p=n(14),h=n(99),v=a(h),g=n(40),m=a(g),y=n(246),b=a(y),P=n(386),w=a(P),S=n(63),_=a(S),T=n(20),I=a(T),M=n(556),C=a(M),x=n(22),E=a(x),k=n(108),D=a(k),A=n(628),O=a(A),R=n(393),L=a(R),N=n(589),j=a(N),U=n(585),$=a(U),z=n(588),F=a(z),B=n(1044),V=a(B),H=n(584),q=a(H),W=n(1046),G=a(W),Y=n(1048),Q=a(Y),K=n(1052),X=a(K),Z=n(1047),J=a(Z),ee=n(1042),te=a(ee),ne={PENDING:"pending",LOCKED:"locked",UNLOCKED:"unlocked"},re={EMPTY:"",UNSUBSCRIBED:"unsubscribed",
ACTIVE:"active",ERROR:"error",REMOVED:"removed"},ae=E.default.extend({mixins:[w.default],name:"UserModel",context:["server"],url:"/api/v2/user",sessionAttrs:{isSignedIn:I.default.boolean.isRequired,hasInvalidToken:I.default.boolean.isRequired,lastPrimaryServerID:I.default.string,lockState:I.default.oneOf(ne.PENDING,ne.LOCKED,ne.UNLOCKED).isRequired,devices:I.default.instanceOf(V.default).isRequired,homeUsers:I.default.instanceOf(q.default).isRequired,friends:I.default.instanceOf(G.default).isRequired,
invites:I.default.instanceOf(Q.default).isRequired,sentInvites:I.default.instanceOf(Q.default).isRequired,socialNetworks:I.default.instanceOf(X.default).isRequired,homeDetails:I.default.instanceOf(J.default).isRequired},sessionRelations:{announcements:{relationClass:te.default}},syncedAttrs:{id:I.default.integer,uuid:I.default.string,authToken:I.default.string,username:I.default.string,email:I.default.string,emailOnlyAuth:I.default.boolean,title:I.default.string,locale:I.default.string,thumb:I.default.string,
pin:I.default.string,home:I.default.boolean,restricted:I.default.boolean,guest:I.default.boolean,homeSize:I.default.integer,maxHomeSize:I.default.integer,queueUid:I.default.string,queueEmail:I.default.string,hasAllEntitlements:I.default.boolean,mailingListActive:I.default.boolean,mailingListStatus:I.default.oneOf(re.EMPTY,re.UNSUBSCRIBED,re.ACTIVE,re.ERROR,re.REMOVED)},syncedRelations:{subscription:{relationClass:L.default},roles:{relationClass:j.default},entitlements:{relationClass:$.default},providers:{
relationClass:F.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 V.default([],e),homeUsers:new q.default([],e),friends:new G.default([],e),invites:new Q.default([],e),sentInvites:new Q.default([],s.default.extend({
subset:"requested"},e)),socialNetworks:new X.default([],e),homeDetails:new J.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 d.default.Model.prototype.fetch.apply(this,arguments)},augmentResponse:function(e){var t=e.roles,n=e.entitlements,r=e.providers,a=s.default.extend({},e,{roles:t&&t.role,hasAllEntitlements:n&&n.all,entitlements:n&&n.entitlement,providers:r&&r.provider});return a},signInWithStoredToken:function(){var e=this,t=v.default.get("myPlexAccessToken");t.done(function(t){var n=e.server.getXHROptions(s.default.result(e,"url")),a=s.default.extend({},n.headers,r({},"X-Plex-Token",t));n.headers=a;var i=l.default.ajax(n);
i.done(function(t){var n=e.get("homeDetails"),r=n.fetch({headers:a});r.always(function(){var r=e.parse(t),a=e.get("lockState");if(a!==ne.UNLOCKED){var i=_.default.get("proxied")||m.default.get("autoLogin"),s=!!r.guest&&!n.get("guestEnabled"),o=!!r.home&&(!i||s);a=o?ne.LOCKED:ne.UNLOCKED}e.signIn(r,{lockState:a})})}),i.fail(function(t){if(!t.aborting){var n=(0,O.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],r=s.default.isString(e)?this.parse(e):e,a=r.authToken,i=s.default.extend({isSignedIn:!0},r,t);return this._resolve(i,n),v.default.set("myPlexAccessToken",a)},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){D.default.set("activeUserID",e);var t=D.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=v.default.remove("myPlexAccessToken");return e=e.then(function(){return D.default.clearActiveUser()})},hashPIN:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.get("authToken"):arguments[1];return f.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:re});(0,C.default)(ae,function(){return{relationClass:(0,p.resolve)("UserFlexModel")}}),t.default=ae,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0
}),t.default={NORMAL:0,LOCAL:42,CLOUD:43},e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(26),l=a(o),u=n(118),d=r(u),c=n(37),f=r(c),p=n(650),h=r(p),v=n(566),g=r(v),m={uri:function(e,t){var n=t&&t.items;if(n&&n.length){if(n.length>1)return this.getBatchLibraryMetadataURI(n,t);e||(e=s.default.first(n))}return e.get("isSection")?this.getSectionURI(e,t):e.get("isMetadataList")?this.getMetadataListURI(e,t):e.get("isPlaylist")?this.getPlaylistURI(e,t):e.get("isChannelItem")?this.getChannelURI(e,t):this.getLibraryMetadataURI(e,t);
},getSectionURI:function(e,t){var n,r=s.default.result(e,"url"),a=e.get("currentSubset"),i=e.get("currentFolderKey"),o=e.get("currentType");if("folder"===a.id)n=i?i:l.join([r,"all"]);else{var u=e.get("items"),d=u.getParams();if(d.type&&delete d.type,d.timelineState&&delete d.timelineState,d.unwatchedLeaves){var c=f.default.getChildMediaType(e.get("type")).typeString;d[c+".unwatched"]=1,delete d.unwatchedLeaves}o&&(d.sourceType=o.id),n=l.join([r,a.id],d),n=u.replaceSpecialFilterOperators(n)}return this._resolveURI({
prefix:"library",parts:[e.get("uuid"),"directory",n]})},getBatchLibraryMetadataURI:function(e,t){var n=this._getSectionInfo(s.default.first(e)),r=s.default.map(e,function(e){return e.get("ratingKey")}),a="/library/metadata/"+r.join(",");return this._resolveURI({prefix:"library",parts:[n.sectionUUID,"directory",a]})},getLibraryMetadataURI:function(e,t){t||(t={});var n,r=this._getSectionInfo(e),a=s.default.result(e,"url");return t.excludeSeedItem&&(a=l.join(a,{excludeSeedItem:1})),n=e.models||e.collectionName||e instanceof g.default?"directory":"item",
this._resolveURI({prefix:"library",parts:[r.sectionUUID,n,a]})},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(e,t){t||(t={});var n=s.default.result(e,"url"),r=e.get("items").length?"directory":"item";return this._resolveURI({prefix:"channel",parts:[e.channel.get("identifier"),r,n]
})},title:function(e,t){var n=t&&t.items;if(n&&n.length){if(n.length>1)return this.getBatchLibraryMetadataTitle(n,t);e=s.default.first(n)}return e.get("isSection")?this.getSectionTitle(e,t):e.get("isMetadataList")?this.getMetadataListTitle(e,t):this.getLibraryMetadataTitle(e,t)},getSectionTitle:function(e){var t=e.get("title"),n=e.get("currentSubset"),r=e.get("currentFilters");if("all"!==n.id)return t+": "+n.get("title");if(!r.length)return t;var a=s.default.flatten(s.default.map(r,function(e){return e.titles;
}));return t+": "+a.join(", ")},getMetadataListTitle:function(e){return e.get("containerTitle")||e.get("title")},getBatchLibraryMetadataTitle:function(e){var t=s.default.map(e,function(e){return e.get("title")});return(0,h.default)(t)},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=(0,d.default)({seasonIndex:e.get("parentIndex"),episodeIndex:e.get("index"),date:e.get("originallyAvailableAt"),
noLeadingZero:!0,separator:" "});n+=" ("+r+")"}return n},_resolveURI:function(e){var t=e.parts,n=s.default.map(t,function(e){return e?encodeURIComponent(e):""});return e.prefix+"://"+n.join("/")},_getSectionInfo:function(e){var t=e.get("librarySectionUUID"),n=e.get("librarySectionID");if(!t||!n){var r=e.server.getSectionForItem(e);s.default.isEmpty(r)||(t=r.get("uuid"),n=r.id)}return{sectionUUID:t,sectionID:n}}};t.default=m,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(!e)return"";
var t=o.default.find(g,function(t){var n=a(t,1),r=n[0];return e<=r}),n=a(t,2),r=n[1];return r(e)}var a=n(93).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(611),u=i(l),d=n(198),c=i(d),f=n(610),p=i(f),h=n(609),v=i(h),g=[[54e5,u.default],[864e5,c.default],[6048e5,p.default],[1/0,v.default]];t.default=r,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="boolean";t.BOOLEAN=n;var r="other";t.OTHER=r},function(e,t){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={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.get("version")?this.addVersionHeader(n.get("version"),t):t},getSyncStateFromPart:function(e){return e.transcodeState||e.syncState;
},getSyncStateContextFromPart:function(e){return e.transcodeStateContext||e.syncStateContext}};t.default=n,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(41),f=(l(c),n(24)),p=n(31),h=l(p),v=n(2042),g=l(v),m=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n);var a=e.ignoreWidth,i=e.ignoreHeight,o=e.ignorePosition;
this.state={isMeasured:!1,width:a?void 0:0,height:i?void 0:0,x:o?void 0:0,y:o?void 0:0}}return a(t,e),i(t,[{key:"componentDidMount",value:function(){this._requestFrame()}},{key:"shouldComponentUpdate",value:function(e,t){return(0,h.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this._cancelFrame(),this._clearTimeout()}},{key:"_requestFrame",decorators:[f.autobind],value:function(){this._clearTimeout(),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,r=e.ignorePosition,a=this.refs.container,i=a.getBoundingClientRect(),s=i.width||0,o=i.height||0,l=i.left||0,u=i.top||0,d={isMeasured:!0,width:t?void 0:s,
height:n?void 0:o,x:r?void 0:l,y:r?void 0:u};this.setState(d),this.props.onMeasure&&this.props.onMeasure(d),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,r=(e.onMeasure,
"function"!=typeof n);return d.default.createElement("div",{ref:"container",className:t},r?n:n(this.state),d.default.createElement("div",{ref:"expandContainer",className:g.default.scrollContainer,onScroll:this.onScroll},{$$typeof:o,type:"div",key:null,ref:null,props:{className:g.default.expandContent},_owner:null}),d.default.createElement("div",{ref:"shrinkContainer",className:g.default.scrollContainer,onScroll:this.onScroll},{$$typeof:o,type:"div",key:null,ref:null,props:{className:g.default.shrinkContent
},_owner:null}))}}]),t}(u.Component);m.propTypes={className:u.PropTypes.string,style:u.PropTypes.object,children:u.PropTypes.oneOfType([u.PropTypes.node,u.PropTypes.func]).isRequired,ignoreWidth:u.PropTypes.bool,ignoreHeight:u.PropTypes.bool,ignorePosition:u.PropTypes.bool,resizeTimeout:u.PropTypes.number.isRequired,onMeasure:u.PropTypes.func},m.defaultProps={className:g.default.container,ignoreWidth:!1,ignoreHeight:!1,ignorePosition:!1,resizeTimeout:100},t.default=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 r=t[e];"function"==typeof r&&r.apply(void 0,arguments)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),i=r(a),s=n(62),o=r(s),l=n(20),u=r(l),d={GRABBER_GRAB:"grabber.grab",PROVIDER_DEVICE_CHANNELSCAN:"provider.device.channelscan",
PROVIDER_EPG_LOAD:"provider.epg.load",PROVIDER_SUBSCRIPTION_PROCESS:"provider.subscriptions.process"};t.activityTypes=d;var c=i.default.extend({name:"ActivityModel",responseType:o.default.json,context:["server"],idAttribute:"uuid",rootPropertyName:"Activity",syncedAttrs:{uuid:u.default.string,userID:u.default.integer,title:u.default.string,subtitle:u.default.string,progress:u.default.integer,event:u.default.string,cancellable:u.default.boolean,type:u.default.string,context:u.default.object,response:u.default.object
},defaults:function(){return{context:{},response:{}}},augmentResponse:function(e){return e.Context&&(e.context=e.Context[0],delete e.Context),e.Response&&(e.response=e.Response[0],delete e.Response),e}});t.default=c},function(e,t,n){"use strict";var r=n(11).default,a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(64),o=a(s),l=n(42),u=i(l),d=(0,o.default)(u.POPULATE_METADATA_LIST_RANGE);t.populateMetadataListRange=d;var c=(0,o.default)(u.REPOPULATE_METADATA_LIST_RANGE);
t.repopulateMetadataListRange=c;var f=(0,o.default)(u.PLAY_METADATA_LIST);t.playMetadataList=f;var p=(0,o.default)(u.ADD_METADATA_LIST_TO_PLAYLIST);t.addMetadataListToPlaylist=p;var h=(0,o.default)(u.SYNC_METADATA_LIST);t.syncMetadataList=h;var v=(0,o.default)(u.OPTIMIZE_METADATA_LIST);t.optimizeMetadataList=v;var g=(0,o.default)(u.SELECT_METADATA_LIST_ITEM);t.selectMetadataListItem=g;var m=(0,o.default)(u.DESELECT_METADATA_LIST_ITEM);t.deselectMetadataListItem=m;var y=(0,o.default)(u.DESELECT_ALL_METADATA_LIST_ITEMS);
t.deselectAllMetadataListItems=y;var b=(0,o.default)(u.RESET_METADATA_LIST);t.resetMetadataList=b;var P=(0,o.default)(u.PLAY_METADATA_LIST,function(e){return r({},e,{shuffle:!0})});t.shuffleMetadataList=P},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){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2315),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(5),p=r(f),h=n(12),v=r(h),g=c.default.ItemView.extend({
className:"summary",template:i.default,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 t=o.default.map(o.default.compact(e.split("\n")),function(e){return u.default.trim(o.default.escape(e));
});if(t.length)return"<p>"+t.join("</p><p>")+"</p>"}}}},initialize:function(){this.listenTo(v.default,"resize",this.onResize),this.listenTo(this.model,"change:summary",this.onSummaryChange)},updateDividerBtn:function(e){var t=e?(0,p.default)("More"):(0,p.default)("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(){o.default.defer(o.default.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())}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(230),i=r(a),s=n(1154),o=r(s),l=o.default.extend({
className:"container",template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(821),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(53),f=r(c),p=n(5),h=r(p),v=n(12),g=r(v),m=n(26),y=a(m),b=n(27),P=r(b),w=n(1304),S=r(w),_=n(694),T=r(_),I=n(695),M=r(I),C=n(1466),x=r(C),E=n(1463),k=r(E),D=n(1464),A=r(D),O=n(1462),R=r(O),L=n(54),N=r(L),j=n(45),U=r(j),$=n(252),z=r($),F={movie:["general","tags","sharing","poster","art","info","advanced"],
show:["general","tags","sharing","poster","banner","art","advanced"],season:["general","poster","art","info","advanced"],episode:["general","tags","poster","art","info","advanced"],artist:["general","tags","poster","art","advanced"],album:["general","tags","sharing","poster","art","info","advanced"],track:["general","tags","info","advanced"],photoAlbum:["general","poster","art","advanced"],photo:["general","info","advanced"]},B=["poster","art","banner","info","advanced"],V=N.default.extend({mixins:[z.default],
name:"editMetadataModal",className:"edit-metadata-modal modal modal-lg fade",template:s.default,panes:{general:{constructor:T.default},tags:{constructor:M.default},poster:{constructor:k.default},art:{constructor:k.default},banner:{constructor:k.default},sharing:{constructor:x.default},info:{constructor:A.default},advanced:{constructor:R.default}},events:l.default.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onFormSubmit","submit .edit-metadata-form":"onFormSubmit"},N.default.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){N.default.prototype.initialize.apply(this,arguments);var t,n=e.mediaActions,r=e.items||(n?n.getActionTargets():[this.model]),a=r[0];this.model=new S.default({},{server:a.server,metadataItems:r}),t=a.section||a.get("librarySectionID")?d.default.Deferred().resolve().promise():a.populate(),
t=t.then(l.default.bind(function(){return this.model.setContext("section",a.server.getSectionForItem(a)),this.model.populate()},this)),t.done(l.default.bind(function(){this.model.set("originalSaveParams",this.model.getSaveParams()),this.showNav(),this.showPane(e.selectedPane||"general"),this.listenTo(g.default,"shortcut:save",this.saveChanges)},this)),t.fail(l.default.bind(function(){this.ui.message.text((0,h.default)("There was an error editing this item")),this.ui.loadingIndicator.addClass("hidden");
},this))},serializeData:function(){var e=F[this.model.get("type")]||F.movie;this.model.get("isSingleMetadataItem")||(e=l.default.difference(e,B)),this.model.getSingleMetadataItem().has("preferences")||(e=l.default.difference(e,["advanced"]));var t=l.default.reduce(e,function(e,t){return e[t]=!0,e},{}),n=(0,h.default)("Edit {1}",this.model.get("aggregateTitle"),{escape:!0}),r={item:this.model.toJSON(),panes:t,selectedPane:this.selectedPane,paneTitle:n};return r},paneConstructorArg:function(){return{
type:this.selectedPane}},invalidChangedAttrs:function(e){var t=[];if("track"===this.model.get("type")){var n=l.default.has(e,"artist.id.value")||l.default.has(e,"artist.title.value")||l.default.has(e,"album.id.value")||l.default.has(e,"album.title.value"),r=e["album.id.value"]||e["album.title.value"],a=e["artist.id.value"]||e["artist.title.value"],i=!n||a&&r;i||(a||t.push("grandparentTitle"),r||t.push("parentTitle"))}if(l.default.has(e,"originallyAvailableAt.value")){var s=e["originallyAvailableAt.value"];
/^\d{4}$/.test(s)&&(e["originallyAvailableAt.value"]+="-01-01",s=e["originallyAvailableAt.value"]),""===s||(0,f.default)(s,"YYYY-MM-DD",!0).isValid()?this.model.set("originallyAvailableAt",s):t.push("originallyAvailableAt")}return t},markInvalid:function(e){this.paneRegion.currentView.markInvalid(e)},showNav:function(){this.ui.navPane.removeClass("hidden")},saveChanges:function(){var e=this.ui.saveBtn,t=this.ui.message;if(!e.isDisabled()){t.text(""),this.paneRegion.currentView.flushChanges();var n=[],r=this.model.getSaveParams(),a=this.invalidChangedAttrs(r);
if(a.length)return void this.markInvalid(a);e.addClass("active");var i=this.showAdvancedConfirmModal({saving:!0});i.done(l.default.bind(function(){l.default.each(["poster","banner","art"],function(e){var t=this.model.get(e);t&&n.push(P.default.execute("changeArtwork",{item:this.model.getSingleMetadataItem(),artworkType:e,artworkRatingKey:t}))},this),n.push(this.savePreferences()),n.push(this.model.save());var r=d.default.when.apply(d.default,n);r.done(l.default.bind(function(){this.hide()},this)),
r.fail(function(){t.text((0,h.default)("Your changes could not be saved."))}),r.always(function(){e.removeClass("active")})},this)),i.fail(l.default.bind(function(){e.removeClass("active"),this.showPane("advanced")},this))}},savePreferences:function(){var e=this.model.get("preferences");if(!e.length)return d.default.Deferred().resolve().promise();var t=this.model.getSingleMetadataItem(),n=y.join(["/library/metadata",t.get("ratingKey"),"prefs"],e.getSaveParams()),r=this.model.server.getXHROptions(n,{
type:"PUT"}),a=d.default.ajax(r);return a.done(function(){var n=t.get("preferences");e.forEach(function(e){var t=n.get(e.id);t.set("value",e.get("value"))})}),a},showAdvancedConfirmModal:function(){var e=this.model.get("preferences").some(function(e){return/^autoDeletion/.test(e.id)});if(!e)return d.default.Deferred().resolve().promise();var t=new U.default({title:(0,h.default)("Confirm Deletion Settings"),message:(0,h.default)("Deletion settings will take effect immediately! Files may be deleted and this can't be undone. Are you sure?"),
confirmLabel:(0,h.default)("Yes"),cancelLabel:(0,h.default)("Cancel"),requireDoubleConfirm:!0,doubleConfirmMessage:(0,h.default)("Multiple files may be deleted."),doubleConfirmLabel:(0,h.default)("Yes, I'm sure"),hasDanger:!0});return g.default.trigger("show:modal",t),t.promise},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()}
});t.default=V,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2419),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(5),f=r(c),p=n(12),h=r(p),v=n(46),g=r(v),m=n(26),y=a(m),b=n(102),P=r(b),w=n(37),S=r(w),_=n(27),T=r(_),I=n(193),M=r(I),C=n(1469),x=r(C),E=n(1472),k=r(E),D=n(1475),A=r(D),O=n(1477),R=r(O),L=n(1471),N=r(L),j=n(54),U=r(j),$=n(330),z=r($),F=n(252),B=r(F),V=U.default.extend({mixins:[B.default],name:"editSectionModal",
className:"edit-section-modal modal modal-lg fade",template:s.default,panes:{type:{constructor:R.default,nextPane:"folders",dependentPanes:["folders"]},folders:{constructor:k.default,nextPane:"create",dependentPanes:["create","advanced"]},create:{constructor:A.default,nextPane:"advanced"},advanced:{constructor:x.default},error:{constructor:N.default}},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:l.default.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onSaveClick","click .delete-btn":"onDeleteClick","submit .edit-section-type-form":"onGeneralFormSubmit"},U.default.prototype.events),onlyAfterRender:["showPane","updateMessage","updateSectionTitle","updateSectionTitleDestabilized","updateSaveBtn"],paneConstructorArg:function(){return{isDefaultSection:this.isDefaultSection}},initialize:function(e){U.default.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 M.default({},{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=d.default.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 H(){var e=this.ui.saveBtn,t=this.panes[this.selectedPane],H=l.default.bind(function(n){var r=t.nextPane,a=this.tempModel.isNew(),i=!t.constructor.prototype.validate||0===t.constructor.prototype.validate(this.tempModel).length,s=!this.getReachablePanes().isAnyInvalid;
this.ui.createBtn.toggleClass("hidden",!n);var o,l=s||a&&i;o=r,n||"create"!==r||(o=!1),s&&(o=!1),n&&"create"===r&&(o=!0),n&&"advanced"===r&&(o=!0),e.toggleClass("save",!o),e.toggleClass("next",!!o),e.toggleClass("disabled",!l)},this),n="music"===this.tempModel.get("type")&&this.tempModel.server.supports("premiumMusic");n?this.paneRegion.currentView.populateAgents().then(function(e){var t=e.findWhere({identifier:"com.plexapp.agents.plexmusic"});H(t)}):H(!1)},updateSectionTitle:function(){var e=P.default.get(this.tempModel.get("type"));
if(e){this.updateSectionTitleDestabilized();var t=(0,f.default)(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 t=this.saveModel();t.always(function(){e.removeClass("active")}),t.fail(l.default.bind(function(e){
503===e.status?h.default.trigger("show:modal",new z.default({model:this.server})):this.updateMessage((0,f.default)("Your changes could not be saved."))},this)),t.then(l.default.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")?(h.default.trigger("navigate","section",e),this._deferred.resolve(),void this.hide()):(e.type=S.default.get("album").id,e.sortKey="addedAt",
e.sortDirection="desc",this._deferred.resolve(),this.hide(),void h.default.trigger("navigate","sectionType",e))},this))},saveModel:function(){var e;return this.tempModel.isNew()?(e=this.tempModel.save(),e=e.then(l.default.bind(function(e,t,n){var r=g.default.parseXML(e);if(201===n.status){if(r.Directory&&(r=r.Directory),!r.key){var a=n.getResponseHeader("Location");a&&(r.key=a.substring(a.lastIndexOf("/")+1))}var i=this.server;return i.supports("advancedFilters")&&(r.filters=!0),this.model=new M.default(r,{
parse:!0,server:this.server}),i.get("sections").add(this.model),n}},this))):(this.model.copy(this.tempModel),e=this.model.save()),e=e.then(l.default.bind(this.saveSettings,this)),e=e.then(l.default.bind(this.saveAgentSettings,this))},saveSettings:function(){var e=d.default.Deferred().resolve(this.model).promise();if(!this.server.supports("sectionSettings"))return e;var t=this.tempModel.settings;if(!t)return e;var n=this.getSettingsChanges(t);if(l.default.isEmpty(n))return e;var r=t.first(),a=r.getSaveParams(n),i=y.join(["/library/sections/",this.model.id,"/prefs"],a),s=l.default.extend(this.server.getXHROptions(i),{
type:"PUT"});return d.default.ajax(s).promise().then(function(){return e})},saveAgentSettings:function(){var e=d.default.Deferred().resolve(this.model).promise(),t=this.tempModel.agentSettings;if(!this.tempModel.agentSettings)return e;var n=this.getSettingsChanges(t);if(l.default.isEmpty(n))return e;var r=t.first(),a=r.getSaveParams(n),i=l.default.result(t,"url"),s=y.join([i,"/set"],a),o=r.server.getXHROptions(s);return d.default.ajax(o).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=T.default.execute("deleteSection",{section:this.model});this.isDefaultSection||t.done(function(){h.default.trigger("navigate","dashboard")})},onGeneralFormSubmit:function(e){
this.onSaveClick(e)},onSectionTypeChange:function(){this.updateSaveBtn()}});t.default=V,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2444),i=r(a),s=n(8),o=r(s),l=n(206),u=r(l),d=n(430),c=r(d),f=n(1299),p=r(f),h=n(1290),v=r(h),g=n(54),m=r(g),y=n(1587),b=r(y),P=n(1586),w=r(P),S=n(1588),_=r(S),T=n(1583),I=r(T),M=m.default.extend({mixins:[u.default],name:"convertModal",className:"convert-modal modal fade",template:i.default,
regions:{bodyRegion:".modal-body-region"},initialize:function(e){m.default.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 c.default([],t),this.targets=new p.default([],t),this.profiles=new v.default([],t)},initialState:"loading",states:{loading:{nextState:"form",onEnter:function(){this.bodyRegion.show(new b.default),this.listenForStateRequests();var e=o.default.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 w.default({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 _.default({
server:this.server})),this.listenForStateRequests())}},error:{onEnter:function(e){this.bodyRegion.show(new I.default({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(){m.default.prototype.onRender.apply(this,arguments),this.enterNextState()},onStateMachineComplete:function(){this.hide()}
});t.default=M,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2518),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(5),c=r(d),f=u.default.Layout.extend({className:"form-group",template:i.default,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 o.default.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(){o.default.isEmpty(this.changes)||this.enable()},onInputChange:function(e){var t=e.currentTarget,n=t.name,r=t.value,a=t.value;
if(n){"checkbox"===t.type&&(a=t.checked,a||(r="0"));var i=this.updateModel(n,a);i&&(this.changes[t.name]=r,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=(0,c.default)("Your changes have been saved.")):t=(0,c.default)("Your changes could not be saved."),
this.ui.message.text(t)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=a(e,["children"]);return o.default.createElement("div",n,t)}var a=n(19).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(2065),u=i(l);r.propTypes={children:s.PropTypes.node.isRequired},r.defaultProps={className:u.default.group},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=function(t){function n(e,t){
o(this,n),a(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e,t),this.hasBlurred=!1}return i(n,t),s(n,[{key:"componentWillMount",value:function(){this.initializeInputState(this.props,this.context)}},{key:"componentWillReceiveProps",value:function(e,t){(0,y.default)(t.formState,this.context.formState)||this.handleStateChange(e,t),e.initialValue!==this.props.initialValue&&this.handleStateChange(e,t,e.initialValue)}},{key:"shouldComponentUpdate",value:function(e,t,n){var r=n.formState,a=e.name,i=!!r[a];
return i||this.initializeInputState(e,n),i}},{key:"componentWillUnmount",value:function(){var e=this.context.onInputChange,t=this.props.name;e(t,null)}},{key:"initializeInputState",value:function(e,t){var n=t.onInputChange,r=e.name,a=e.initialValue;n(r,{errors:[],showErrors:!1,value:a})}},{key:"handleStateChange",value:function(e,t,n){var r=t.onInputChange,a=t.formState,i=e.name,s=a[i],o=null!=n?n:s.value,l=this.calculateErrors(o,a,e);s.value===o&&c.default.isEqual(s.errors,l)||r(i,{errors:l,showErrors:this.hasBlurred&&0!==l.length,
value:o})}},{key:"calculateErrors",value:function(e,t,n){var r=n.validations,a=r.map(function(n){return n(e,t)}).filter(function(e){return null!=e});return a}},{key:"onChange",decorators:[h.autobind],value:function(e){this.handleStateChange(this.props,this.context,e)}},{key:"onBlur",decorators:[h.autobind],value:function(){if(!this.hasBlurred){this.hasBlurred=!0;var e=this.context,t=e.onInputChange,n=e.formState,r=this.props.name,a=n[r],i=this.calculateErrors(a.value,n,this.props);t(r,l({},a,{errors:i,
showErrors:0!==i.length}))}}},{key:"render",value:function(){var t=this.props,n=t.name,r=t.errors,a=this.context.formState[n];if(!a)return null;var i=r.length>0,s=a.value,o=a.errors,u=a.showErrors;return p.default.createElement(e,l({},this.props,{showErrors:!!i||u,errors:i?r:o,value:s,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur}))}}]),n}(f.Component);return t.displayName="FormInput("+(0,g.default)(e)+")",t.WrappedComponent=e,t.propTypes={name:f.PropTypes.string.isRequired,initialValue:f.PropTypes.oneOfType([f.PropTypes.number,f.PropTypes.string,f.PropTypes.bool]).isRequired,
errors:f.PropTypes.arrayOf(f.PropTypes.string),validations:f.PropTypes.arrayOf(f.PropTypes.func)},t.contextTypes={formState:f.PropTypes.object,onInputChange:f.PropTypes.func},t.defaultProps={validations:[],errors:[]},t}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(11).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(3),c=u(d),f=n(4),p=u(f),h=n(24),v=n(424),g=u(v),m=n(320),y=u(m);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){
var t=e.children,n=a(e,["children"]);return o.default.createElement("div",n,t)}var a=n(19).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(2088),u=i(l);r.propTypes={children:s.PropTypes.node,className:s.PropTypes.string},r.defaultProps={className:u.default.buttonBar},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var l=n(4),u=o(l),d=n(21),c=n(91),f=n(1766),p=o(f),h=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"componentWillUnmount",value:function(){this.props.garbageCollectEntities()}},{key:"render",value:function(){return u.default.createElement(p.default,this.props)}}]),t}(l.Component);h.propTypes={garbageCollectEntities:l.PropTypes.func.isRequired},t.default=(0,d.connect)(null,{garbageCollectEntities:c.garbageCollectEntities
})(h),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=a(e,["children"]);return l.default.createElement("div",i({className:d.default.pageHeader},n),t)}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(2136),d=s(u);r.propTypes={children:o.PropTypes.node},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=a(e,["children"]);return l.default.createElement("div",i({
className:d.default.pageHeaderLeft},n),t)}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(2138),d=s(u);r.propTypes={children:o.PropTypes.node},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return{isWaitingForPrimaryServer:e.isWaitingForPrimaryServer,primaryServerEntityID:e.primaryServer}}var a=n(17).default,i=n(18).default,s=n(44).default,o=n(16).default,l=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var u=n(4),d=l(u),c=n(21),f=n(50),p=n(91),h=n(1767),v=l(h),g=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(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,f.scheduleImmediateUpdate)(function(){e.machineIdentifier&&e.changePrimaryServer(e.machineIdentifier)})}},{key:"render",value:function(){return d.default.createElement(v.default,this.props)}}]),t}(u.Component);g.propTypes={machineIdentifier:u.PropTypes.string,changePrimaryServer:u.PropTypes.func.isRequired},t.default=(0,c.connect)(r,{changePrimaryServer:p.changePrimaryServer})(g),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,p.createSelector)(function(e,t){var n=t.providerEntityID;
return n},(0,_.default)(),(0,w.default)(),function(e,t,n){var r=n.desktop,a=r.providers,i=r.isProvidersPopulated,s=r.providersError,o=r.libraries,l=r.isLibrariesPopulated,u=r.librariesError,d=!i&&!s,c=!l&&!u,f=e||(0,m.default)(v.PROVIDER,b.providerIdentifiers.LIBRARY_PROVIDER_IDENTIFIER,n.entityID),p=a.indexOf(f)>-1;return{providerEntityID:f,providerIdentifier:t?t.identifier:null,hasProvider:p,showSpinner:d||c,showError:!!u&&!o.length}})}var a=n(17).default,i=n(18).default,s=n(44).default,o=n(16).default,l=n(1).default,u=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=l(d),f=n(21),p=n(15),h=n(211),v=u(h),g=n(66),m=l(g),y=n(50),b=n(84),P=n(70),w=l(P),S=n(100),_=l(S),T=n(110),I=n(122),M=n(1769),C=l(M),x={populateLibraries:T.populateLibraries,populateProviders:T.populateProviders,changeQuickSearchSettings:I.changeQuickSearchSettings},E=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"componentWillMount",value:function(){
this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=e.serverEntityID!==this.props.serverEntityID,n=e.providerIdentifier!==this.props.providerIdentifier;(t||n)&&this._populate(e)}},{key:"componentWillUnmount",value:function(){this.props.changeQuickSearchSettings({providerIdentifier:null})}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];(0,y.scheduleImmediateUpdate)(function(){e.populateProviders({serverEntityID:e.serverEntityID
}),e.populateLibraries({serverEntityID:e.serverEntityID}),e.changeQuickSearchSettings({providerIdentifier:e.providerIdentifier})})}},{key:"render",value:function(){return c.default.createElement(C.default,this.props)}}]),t}(d.Component);E.propTypes={serverEntityID:d.PropTypes.string.isRequired,providerEntityID:d.PropTypes.string,providerIdentifier:d.PropTypes.string,populateProviders:d.PropTypes.func.isRequired,populateLibraries:d.PropTypes.func.isRequired,changeQuickSearchSettings:d.PropTypes.func.isRequired
},t.default=(0,f.connect)(r,x)(E),e.exports=t.default},function(e,t,n){"use strict";function r(e){return o.default.createElement(d.default,a({className:f.default.innerEmptyPage,contentClassName:f.default.innerEmptyPageContent,scrollDirection:l.scrollDirections.NONE},e))}var a=n(11).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(30),u=n(275),d=i(u),c=n(815),f=i(c);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return{primaryServerEntityID:e.primaryServer,
serverEntityIDs:e.servers}}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(91),o=n(1902),l=a(o),u={onServerMenuOpen:s.discoverServers},d=(0,i.connect)(r,u)(l.default);t.default=d,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(t)switch(t){case l.default.PRE_PLAY:switch(e){case"episode":return c}break;case l.default.CONTINUE_WATCHING:return c}switch(e){case"movie":return u;case"show":return u;case"season":return u;case"episode":return u;case"artist":
return d;case"album":return d;case"track":return d;case"photo":return d;case"photoAlbum":return d;case"clip":return c;case"musicVideo":case"liveMusicVideo":case"lyricMusicVideo":case"concert":return c;case"mixed":return u;default:return d}}function a(e,t,n){var a=r(t,n);return Math.round(e*a)}function i(e,t,n){var a=r(t,n);return Math.round(e/a)}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getAspectRatio=r,t.getWidth=a,t.getHeight=i;var o=n(114),l=s(o),u=1/1.5;t.PORTRAIT=u;
var d=1;t.SQUARE=d;var c=16/9;t.LANDSCAPE=c},function(e,t){"use strict";e.exports={sliderTrackWidth:"60px",sliderThumbSize:"12px",tooltipArrowSize:"6px",sidebarWidth:"240px",searchHubTitleHeight:"18px",searchResultWidth:"346px",searchResultHeight:"50px",posterTitlePadding:"10px",posterTitleHeight:"20px",posterCenterCircleSize:"42px",posterBadgeHeight:"24px",posterHoverSlideDistance:"10px",pageHeaderHeight:"60px",pagePadding:"60px",recordingPriorityPaneWidth:"360px",recordingPriorityPaneBorderWidth:"4px",
recordingPriorityDragHandleWidth:"62px",breakpointExtraSmall:"480px",breakpointSmall:"768px",breakpointMedium:"992px",breakpointLarge:"1200px"}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var a=n(39),i={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=i,n=e.Properties||{},s=e.DOMAttributeNamespaces||{},l=e.DOMAttributeNames||{},u=e.DOMPropertyNames||{},d=e.DOMMutationMethods||{};
e.isCustomAttribute&&o._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var c in n){o.properties.hasOwnProperty(c)?a(!1):void 0;var f=c.toLowerCase(),p=n[c],h={attributeName:f,attributeNamespace:null,propertyName:c,mutationMethod:null,mustUseProperty:r(p,t.MUST_USE_PROPERTY),hasSideEffects:r(p,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(p,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(p,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(p,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(p,t.HAS_OVERLOADED_BOOLEAN_VALUE)
};if(!h.mustUseProperty&&h.hasSideEffects?a(!1):void 0,h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:a(!1),l.hasOwnProperty(c)){var v=l[c];h.attributeName=v}s.hasOwnProperty(c)&&(h.attributeNamespace=s[c]),u.hasOwnProperty(c)&&(h.propertyName=u[c]),d.hasOwnProperty(c)&&(h.mutationMethod=d[c]),o.properties[c]=h}}},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:i};e.exports=o},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(94),i=r(a),s=i.default.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}});t.default=new s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(94),i=r(a),s=new i.default({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"]
});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(26),l=a(o),u=n(102),d=r(u),c=n(654),f=r(c),p=n(37),h=r(p),v=n(72),g=a(v),m=n(66),y=r(m),b=n(20),P=r(b),w=n(22),S=r(w),_=n(136),T=r(_),I=n(1e3),M=r(I),C=n(382),x=r(C),E=n(988),k=r(E),D=n(986),A=r(D),O=n(564),R=r(O),L=n(562),N=r(L),j=n(982),U=r(j),$=n(383),z=r($),F=n(384),B=r(F),V=n(380),H=r(V),q=n(563),W=r(q),G=n(984),Y=r(G),Q=n(134),K=r(Q),X=S.default.extend({
name:"SectionModel",context:["server"],entityType:g.LIBRARY,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,y.default)(this.entityType,e.key,this.server.entityID())},idAttribute:"key",rootPropertyName:"Directory",cache:new T.default,persistInCache:!0,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.key)},url:function Z(){if(this.isNew())return s.default.result(this,"urlRoot")||s.default.result(this.collection,"url");var e=s.default.isNaN(parseInt(this.id,10)),Z=e?this.id:"/library/sections/"+this.id;
return Z},sessionAttrs:{isSection:P.default.boolean,currentFilters:P.default.array,currentFolderKey:P.default.string,settings:P.default.instanceOf(K.default)},syncedAttrs:{key:P.default.oneOfType(P.default.string,P.default.integer),uuid:P.default.string,thumb:P.default.string,art:P.default.string,createdAt:P.default.integer,updatedAt:P.default.integer,allowAdvancedFilters:P.default.boolean,allowSync:P.default.boolean,refreshing:P.default.boolean,name:{type:P.default.string,save:!0},title:{type:P.default.string,
save:!0},type:{type:P.default.string,save:!0},agent:{type:P.default.string,save:!0},scanner:{type:P.default.string,save:!0},language:{type:P.default.string,save:!0},importFromiTunes:{type:P.default.boolean,save:!0}},syncedRelations:{locations:function(){return{relationClass:Y.default,rootPropertyName:"Location",options:{section:this},save:!0}}},sessionRelations:{items:function(){return{relationClass:M.default,options:{section:this}}},currentSubset:function(){return{relationClass:x.default,options:{
section:this}}},currentFirstCharacter:function(){return{relationClass:W.default,deferred:!0}},currentType:function(){return{relationClass:R.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")?N.default:U.default;return{relationClass:e,options:{section:this}
}},sorts:function(){return{relationClass:z.default,options:{section:this}}},firstCharacters:function(){return{relationClass:H.default,options:{section:this}}}},defaults:function(){var e=this;return{isSection:!0,currentType:null,currentFilters:[],currentSort:null,currentFirstCharacter:null,currentFolderKey:null,currentSubset:f.default.get("all"),settings:new K.default([],{server:this.server,url:function(){return l.join(["/library/sections/",e.get("key"),"/prefs"])}})}},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 d.default.get(e)},getSaveParams:function(e){var t=S.default.prototype.getSaveParams.apply(this,arguments);if("type"in t){var n=d.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=[],r=this.get("currentSubset"),a=this.get("currentFilters");return e?(s.default.each(e,function(e){n.push(e.get("title"))}),t+": "+n.join(", ")):"all"!==r.id?t+": "+r.get("title"):a.length?(s.default.each(a,function(e){n.push(e.titles.join(", "))}),t+": "+n.join(",")):t;
},setAgentAndScanner:function(e,t,n,r){var a=e.defaultAgent,i=e.defaultScanner;if(r){var s=e.exclusiveAgents,o=e.exclusiveScanners,l=t.hasExclusiveAgent(s),u=n.hasExclusiveScanner(o);l&&(a=s[0]),u&&(i=o[0])}this.set({agent:a,scanner:i})},updateMediaTypes:function(e,t){var n=h.default.getRelatedMediaTypes(t);this.get("types").reset(n)}});t.default=X,e.exports=t.default},function(e,t,n){"use strict";var r=n(38).default,a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(12),u=a(l),d=n(49),c=a(d),f=n(26),p=i(f),h=n(397),v=a(h),g=n(200),m=a(g),y=n(62),b=a(y),P=n(28),w=a(P),S=n(566),_=a(S),T=w.default.extend({
name:"HubCollection",context:["server","section","metadataItem","hubKey","count","includeEmpty","excludes","allowSync","maxLength"],responseContext:["allowSync"],model:_.default,cache:new v.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,m.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})),w.default.prototype.fetch.call(this,t)},augmentResponseText:function(e,t){return t===b.default.xml?c.default.replaceMetadataXMLElementNames(e):e;
},augmentResponse:function(e){var t=this,n=this.model.prototype.rootPropertyName;if(e&&n){o.default.isArray(e)?e=r({},n,e):e[n]&&!o.default.isArray(e[n])&&(e=r({},n,[e[n]]));var a=e[n],i=a&&a.length;if(i){if(!this.includeEmpty)for(;i&&i--;)a[i].size<=0&&a.splice(i,1);this.maxLength&&a.splice(this.maxLength),e.size>a.length&&(e.size=String(a.length))}}return this.responseContext.forEach(function(n){var r=e[n];void 0!==r&&t.setContext(n,r)}),e}});t.default=T,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(315),d=r(u),c=n(26),f=a(c),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 r={"X-Plex-Container-Start":t||0,
"X-Plex-Container-Size":n||0};return f.join(e,r)}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"),r=d.default.difference(e,n)[0];if(!r)return l.default.Deferred().resolve().promise();if(r=d.default.degap(r,n),this.hasPendingPopulate()){var a=this.get("currentPageStart")!==r.start,i=this.get("currentPageSize")!==r.size;if(!a&&!i)return this.populatePromise;this.abortPendingPopulate()}if(e.reloadThreshold&&r.size>e.reloadThreshold)return t.reset(),
this.populateRange(s.default.omit(e,"reloadThreshold"));var o=s.default.extend({},e,r,{prepend:r.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 this.set({currentPageStart:0,currentPageSize:Math.max(t,e)}),this.abortPendingPopulate(),this.fetch()},updatePopulatedRange:function(){var e=this.get("currentPageStart"),t=this.get("populatedRange").start,n=this.get("populatedRange").size,r=this.getCollection().length,a=void 0;
a=r?n?Math.min(t,null==e?1/0:e):e||t:0,this.set("populatedRange",{start:a,end:a+r,size:r})}};t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=arguments.length<=1||void 0===arguments[1]?"MMMM D, YYYY":arguments[1];return e?(0,s.default)(e).format(t):""}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(null==e)return"";var t=(0,l.default)(1e3*e);return t?(0,
s.default)("{1} left",t):""}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),s=a(i),o=n(163),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(null==e)return"";var t=s.default.duration(e),n=t.hours()+24*t.days(),r=t.minutes(),a=t.seconds();return n&&r?(0,l.default)("{1} hr {2} min",n,r):n?(0,l.default)("{1} hr",n):r?(0,l.default)("{1} min",r):a>0?(0,l.default)("{1} sec",a):""}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(53),s=a(i),o=n(5),l=a(o);t.default=r,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&&r(n)===a}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r=function(e){return Function.prototype.toString.call(e)},a=r(Object);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 r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(26),l=a(o),u=n(32),d=r(u),c=n(133),f=r(c),p=n(631),h=r(p),v=n(634),g=r(v),m={extensions:{dash:".mpd",hls:".m3u8",http:""},logParams:function(e,t){d.default.group("[Transcoder] %s options",e),s.default.forEach(t,function(e,t){
return d.default.info("%s: %s",t,e)}),d.default.groupEnd()},serializeParams:function(e,t){var n,r={},a={},i=/^X-Plex/;return s.default.each(e,function(e,t){i.test(t)?a[t]=e:r[t]=e}),r=l.stringifyParams(r),a=l.stringifyParams(a),n=r&&a?r+"&"+a:r||a},image:function(e,t,n){if(!t)return"";var r,a=n.fallbackServer,i=!1;if(a&&a.get("isConnected")){var o=a.get("isFullServer"),l=a.get("activeConnection").get("isPossiblyCrossNetworkProtected");r=o&&!l?a:null}if(r)if(e.get("cloud"))i=!0;else if(!e.get("isFullServer")){
var u=!e.get("activeConnection").get("isPrivate"),d=r.get("activeConnection").get("isPrivate");i=u||d}var c=i?r:e,p=c.id===e.id;e.get("cloud")&&(t=i?r.resolveUrl(t,{appendToken:!0}):e.resolveUrl(t,{appendToken:!0,connection:new f.default({scheme:"https",address:"node.plexapp.com",port:"32443"})}));var h={url:e.resolveUrl(t,{useLoopback:p,appendToken:!0}),width:n.width&&Math.round(parseFloat(n.width)),height:n.height&&Math.round(parseFloat(n.height))};n.minSize&&(h.minSize=1),n.format&&(h.format=n.format),
n.quality&&(h.quality=n.quality),n.filters&&s.default.each(n.filters,function(e,t){void 0!==e&&(h[t]=e)});var v="/photo/:/transcode?"+this.serializeParams(h,c);return c.resolveUrl(v,{appendToken:!0})},music:function(e,t,n,r){r||(r="start");var a=s.default.first(t.get("Media"));if(a){var i=s.default.first(a.Part);if(i){var o,l;return e.supports("universalMusicTranscoder")?(o=s.default.extend({hasMDE:1,path:e.resolveUrl(t.get("key"),{useLoopback:!0}),mediaIndex:0,partIndex:0},n),l="/music/:/transcode/universal/"+r):(o={
identifier:t.get("identifier"),url:e.resolveUrl(i.key,{useLoopback:!0}),format:"mp3",audioCodec:"libmp3lame",audioBitrate:320,audioSamples:44100},l="/music/:/transcode/generic.mp3"),this.logParams("Music",o),o=s.default.extend(o,e.getHeaders()),e.resolveUrl(l+"?"+this.serializeParams(o,e))}}},video:function(e,t,n,r,a,i){a||(a={}),i||(i="start");var o=e.id===t.server.id,l=t.server.get("cloud")?e:t.server,u=s.default.extend({hasMDE:1,path:l.resolveUrl(t.get("key"),{useLoopback:o,appendToken:!o}),mediaIndex:(0,
h.default)(t,n.id),partIndex:(0,g.default)(n,r.key),protocol:"hls",offset:0,fastSeek:1,directPlay:0,directStream:1,subtitleSize:100,audioBoost:100},a);u.path=u.path.replace(/^http[s]?:\/\/node.plexapp.com:[\d]+\//,e.url()),this.logParams("Video",u);var d=t.get("indirectHttpHeaders");d&&(u.httpCookies=d.Cookie,u.userAgent=d["User-Agent"]),u=s.default.extend(u,e.getHeaders());var c=this.extensions[u.protocol],f="/video/:/transcode/universal/"+i;return"start"===i&&c&&(f+=c),e.resolveUrl(f+"?"+this.serializeParams(u,e));
}};t.default=m,e.exports=t.default},function(e,t,n){"use strict";function r(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 a(e,t){function n(e){for(var t in i){var n=i[t],a=n[e];if(a)return r(a)}u.default.warn("No type was found for "+e)}function a(){return t.map(function(e){return r(e)})}var i={};return e.forEach(function(e){i[e]=t.reduceRight(function(t,n){var r=n[e];return null!=r&&(t[r]=n),t;
},{})}),{get:n,getAll:a}}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(3),o=i(s),l=n(32),u=i(l);e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(13),i=r(a),s=i.default.Layout.extend({regions:{content:".content"}});t.default=s,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,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(13),o=r(s),l=n(315),u=r(l),d={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(e){var t=this.mediaActions.get("selectedItems");if(0===t.length)return!1;var n=e.model,r=i.default.indexOf(t,n);if(r!==-1)return!0;var a=n.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(e){if(this.getViewForModel){var t=this.collection.indexOf(e.model),n=this.listModel.get("populatedRange").start,r=this.previousCollectionOffset-n,a=[],s=[];if(this.previousCollectionOffset=n,
this.shiftRange.start<0)this.shiftRange.start=t,a.push(e.model),e.select();else if(this.shiftRange.end<0)this.shiftRange.start+=r,this.shiftRange.end=t,u.default.each(this.shiftRange,function(e){var t=this.collection.at(e);if(t){a.push(t);var n=this.getViewForModel(t);n&&n.select()}},this);else{u.default.each(this.shiftRange,function(e){var t=this.collection.at(e);t&&s.push(t)},this),this.shiftRange.start+=r,this.shiftRange.end=t,u.default.each(this.shiftRange,function(e){var t=this.collection.at(e);
if(t){a.push(t);var n=this.getViewForModel(t);n&&n.select()}},this);var o=[s].concat(a);s=i.default.without.apply(i.default,o),i.default.each(s,function(e){var t=this.getViewForModel(e);t&&t.deselect()},this)}this.mediaActions.selectItems(a,{superset:this.collection}),this.mediaActions.deselectItems(s,{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(e){this.stopListening(e,"all"),this.listenTo(e,"all",function(t){var n=Array.prototype.slice.call(arguments);n[0]="itemview:"+t,n.splice(1,0,e);var r=o.default.normalizeMethods.call(this,this.itemEvents);"undefined"!=typeof r&&i.default.isFunction(r[t])&&r[t].apply(this,n),o.default.triggerMethod.apply(this,n)},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&&e.model.selected&&(this.deselectItem(e.model),e.deselect())}};t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s={currentState:null,enterState:function(e){if(e!==this.currentState){var t=this.currentState,n=this.states[e];if(!n)throw new Error("The state machine is unable to enter undefined state: "+e);if(t){var r=this.states[t];if(i.default.isFunction(r.onExit)){var a=r.onExit.call(this);
if(a===!1)return}}if(this.currentState=e,i.default.isFunction(n.onEnter)){var s=n.onEnter.apply(this,i.default.rest(arguments));if(s===!1)return void(this.currentState=t)}this.triggerMethod("stateMachineChange",{from:t,to:e})}},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");
}};t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),i=r(a),s=n(20),o=r(s),l=n(671),u=r(l),d=n(431),c=r(d),f=n(676),p=r(f),h=n(1313),v=r(h),g=n(432),m=r(g),y=n(433),b=r(y),P=n(1312),w=r(P),S=n(673),_=r(S),T={DEVICE:"device",DEVICE_CHANNELS:"deviceChannels",EPG:"epg",EPG_MAPPING:"epgMapping",CHANNEL_MAPPING:"channelMapping",EPG_DOWNLOAD:"epgDownload"};t.dvrSetupSteps=T;var I=i.default.extend({name:"DVRSetupModel",
context:["server"],sessionAttrs:{isDevicesPending:o.default.boolean,isDevicesPopulated:o.default.boolean,devicesError:o.default.object,isChannelMappingsPending:o.default.boolean,isChannelMappingsPopulated:o.default.boolean,channelMappingsError:o.default.object,isLineupChannelsPending:o.default.boolean,isLineupChannelsPopulated:o.default.boolean,lineupChannelsError:o.default.object,channelScanActivityID:o.default.string,epgLineupActivityID:o.default.string,epgDownloadActivityID:o.default.string,step:o.default.string,
setupErrorMessage:o.default.string,addDevicePending:o.default.boolean},sessionRelations:{devices:{relationClass:u.default},lineupChannels:{relationClass:v.default},epgSettings:{relationClass:w.default},channelMappings:{relationClass:p.default},selectedDVR:{relationClass:_.default,deferred:!0},selectedDevice:{relationClass:c.default,deferred:!0},selectedLineup:{relationClass:m.default,deferred:!0},selectedLanguage:{relationClass:b.default,deferred:!0}},defaults:{step:T.DEVICE,isDevicesPending:!1,isDevicesPopulated:!1,
devicesError:null,isChannelMappingsPending:!1,isChannelMappingsPopulated:!1,channelMappingsError:null,isLineupChannelsPending:!1,isLineupChannelsPopulated:!1,lineupChannelsError:null,channelScanActivityID:"",epgLineupActivityID:"",epgDownloadActivityID:"",setupErrorMessage:null,addDevicePending:!1}});t.default=I},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(64),s=r(i),o=n(42),l=a(o),u=(0,s.default)(l.REPOPULATE_PAGE);t.repopulatePage=u;
var d=(0,s.default)(l.VIEW_ITEM_DETAILS);t.viewItemDetails=d},function(e,t,n){"use strict";function r(){return(0,i.createSelector)(o.default,function(e,t){var n=t.searchResultEntityID;return n},function(e,t){return e[t]})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(15),s=n(1400),o=a(s);e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,i.createSelector)((0,o.default)(),function(e){var t=e.desktop;return t.activities})}var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(15),s=n(70),o=a(s);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(222).default,a=n(223).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(72);r(t,a(i,r));var s="searchResults";t.SEARCH_RESULT=s;var o="syncMetadataItems";t.SYNC_METADATA_ITEM=o},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2453),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(14),f=a(c),p=n(5),h=r(p),v=n(12),g=r(v),m=n(46),y=r(m),b=n(27),P=r(b),w=n(583),S=r(w),_=n(392),T=r(_),I=n(1335),M=r(I),C=n(54),x=r(C),E=n(1595),k=r(E),D=n(1603),A=r(D),O=n(1594),R=r(O),L=n(1598),N=r(L),j=n(1602),U=r(j),$=n(1599),z=r($),F=n(120),B=r(F),V=x.default.extend({
name:"editFriendModal",className:"edit-friend-modal modal modal-lg fade",template:s.default,panes:{username:A.default,general:R.default,ownedServer:N.default,sharedServer:U.default,restrictions:z.default},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:l.default.extend({"submit #share-server-form":"onSubmit"},x.default.prototype.events),initialize:function(e){x.default.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 B.default({model:this.model,type:"friend",width:40}),this.listenTo(this.body,"show",this.onShowPane)},initHomeUser:function(e){var t=f.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 T.default({admin:!1},{server:t.get("user").server})},initModel:function(e){var t=f.resolve("appModel");this.model?this.tempModel=this.model.cloneDeep():(this.tempModel=new S.default({},{server:t.get("user").server}),this.tempModel.parseServers({Server:[]}))},initServerOverviews:function(e){var t=f.resolve("appModel"),n=t.get("servers"),r=t.get("user"),a=this.tempModel.get("serverOverviews");a||(a=new M.default([],{
server:r.server,parent:this.tempModel}),this.tempModel.set("serverOverviews",a));var i=n.filter(function(e){var t=!e.get("shared")&&!e.get("cloud"),n=e.get("isFullServer")||e.get("isCloudSyncServer");return e.id&&t&&n});l.default.each(i,function(e){var t=a.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 r,a;if("ownedServer"===e?(r=this.tempModel.get("serverOverviews"),a="serverOverview"):(r=this.tempModel.get("serverShares"),a="serverShare"),r.length){var i;this.defaultPaneID&&(i=r.findWhere({machineIdentifier:this.defaultPaneID})),i||(i=r.first()),t=i.id,n[a]=i}else e="general"}t||(t=e),this.showPane(e,t,n)},showPane:function(e,t,n){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(l.default.extend({paneID:t,model:this.tempModel,homeUser:this.tempHomeUser,type:this.type,isAdmin:this.isAdmin},n));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(t),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=f.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 i=this.tempModel.get("serverOverviews");this.model=e,this.tempModel=e.cloneDeep(),this.tempModel.set("serverOverviews",i),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(),t=!e&&this.tempModel.isNew(),n=[];n.push(this.sendFriendInvite()),n.push(this.sendHomeInvite());var r=d.default.when.apply(d.default,n);
return r=r.then(l.default.bind(function(){return Array.prototype.push.apply(n,this.sendServerShareInvites()),this.tempModel.isNew()||n.push(this.tempModel.save({},{parse:!1})),this.tempHomeUser&&!e&&n.push(this.tempHomeUser.save()),d.default.when.apply(d.default,n)},this)),r.done(l.default.bind(function(){var e=f.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)),
r.fail(l.default.bind(function(n){var r=y.default.parseXML(n.responseText),a=r&&r.status;l.default.isString(a)||(a=e?(0,h.default)("This user could not be added to your home."):t?(0,h.default)("An invite could not be sent to this user."):(0,h.default)("Your changes could not be saved.")),g.default.trigger("show:alert",{type:"error",message:a})},this)),r},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(l.default.bind(function(){if(this.tempHomeUser.get("restricted")){this.tempModel.set("id",this.tempHomeUser.id);var e=f.resolve("appModel"),t=e.get("user");t.set("home",!0)}this.showHomeWarnings()},this)),e}},showHomeWarnings:function(){P.default.execute("showHomeWarningsModal")},sendServerShareInvites:function(){var e=this.model&&this.model.get("serverShares").filterByOwned(),t=this.tempModel.get("serverShares").filterByOwned(),n=e?e.pluck("machineIdentifier"):[],r=t?t.pluck("machineIdentifier"):[],a=l.default.union(n,r),i=[];
return l.default.each(a,function(n){var r=e&&e.findWhere({machineIdentifier:n}),a=t&&t.findWhere({machineIdentifier:n}),s=r&&r.isActive(),o=a&&a.isActive();o?i.push(P.default.execute("shareServer",{user:this.tempModel,serverShare:a})):s&&i.push(r.destroy({wait:!0}))},this),i},onRender:function(){x.default.prototype.onRender.apply(this,arguments),this.image.setElement(this.ui.poster);var e=new k.default({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=P.default.execute("removeHomeUser",{
homeUser:this.homeUser});e.done(l.default.bind(this.hide,this))}},onFriendDestroy:function(){if(this.model){var e=P.default.execute("removeFriend",{friend:this.model});e.done(l.default.bind(this.hide,this))}},onServerShareDestroy:function(e){var t=P.default.execute("removeServerShare",{serverShare:e});t.done(l.default.bind(function(){var t=this.model.get("serverShares");t.remove(e.id),this.showNextPane("general")},this))},onGuestDisable:function(){var e=f.resolve("appModel"),t=P.default.execute("toggleGuest",{
user:e.get("user"),enable:!1});t.done(l.default.bind(this.hide,this))},onSubmit:function(e){e.preventDefault();var t=this.getSubmitBtn();if(!t.isDisabled()){if("username"===this.currentPane.paneID)return void this.showNextPane("ownedServer");t.addClass("active"),this.currentPane.flushChanges(),this.sendRequests().fail(l.default.bind(function(){this.ui.submitBtn.removeClass("active")},this))}}});t.default=V,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(19).default,l=n(11).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(33),p=u(f),h=n(24),v=n(251),g=n(2071),m=u(g),y=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"onChange",decorators:[h.autobind],value:function(e){this.props.onChange(e.target.value)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.errorClassName,r=e.disabledClassName,a=e.isDisabled,i=e.size,s=e.type,u=e.name,d=e.hasError,f=o(e,["className","errorClassName","disabledClassName","isDisabled","size","type","name","hasError"]);
return c.default.createElement("input",l({},f,{id:u,name:u,type:s,disabled:a,className:(0,p.default)(t,m.default[i],a&&r,d&&n),onChange:this.onChange}))}}]),t}(d.Component);y.defaultProps={className:m.default.input,errorClassName:m.default.hasError,disabledClassName:m.default.isDisabled,isDisabled:!1,size:v.LARGE,type:"text",hasError:!1},y.propTypes={className:d.PropTypes.string,errorClassName:d.PropTypes.string,disabledClassName:d.PropTypes.string,isDisabled:d.PropTypes.bool,size:d.PropTypes.oneOf([v.SMALL,v.LARGE]),
type:d.PropTypes.oneOf(["text","password","number"]),name:d.PropTypes.string.isRequired,hasError:d.PropTypes.bool,onChange:d.PropTypes.func.isRequired},t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(19).default,l=n(11).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(455),p=u(f),h=n(34),v=u(h),g=n(2090),m=u(g),y=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return a(t,e),i(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.tooltip,r=e.hideOnPress,a=e.onPress,i=o(e,["children","tooltip","hideOnPress","onPress"]);return c.default.createElement(p.default,l({className:m.default.toolbarButton,component:v.default,tooltip:n,tooltipClassName:m.default.toolbarTooltip,hideOnPress:r,onPress:a},i),t)}}]),t}(d.Component);y.propTypes={children:d.PropTypes.node,tooltip:d.PropTypes.string,hideOnPress:d.PropTypes.bool,onPress:d.PropTypes.func},t.default=y,
e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.isOpen,n=e.metricsProperties,r=e.onModalClose,l=s(e,["isOpen","metricsProperties","onModalClose"]);return{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{children:d.default.createElement(h.default,o({},l,{onModalClose:r})),isOpen:t,metricsPage:"mediaSubscription",metricsProperties:n,onModalClose:r}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var u=n(4),d=l(u),c=n(148),f=l(c),p=n(1735),h=l(p);r.propTypes={metricsProperties:u.PropTypes.object,isOpen:u.PropTypes.bool.isRequired,onModalClose:u.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.innerClassName,r=i(e,["children","innerClassName"]);return u.default.createElement(c.default,s({className:p.default.pageContent},r),{$$typeof:a,type:"div",key:null,ref:null,props:{children:t,className:n},_owner:null
})}var a=n(7).default,i=n(19).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(78),c=o(d),f=n(2135),p=o(f);r.propTypes={children:l.PropTypes.node,innerClassName:l.PropTypes.string},r.defaultProps={innerClassName:p.default.innerPageContent},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=a(e,["children"]);return l.default.createElement("div",i({className:d.default.pageHeaderRight},n),t)}var a=n(19).default,i=n(11).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(2139),d=s(u);r.propTypes={children:o.PropTypes.node},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=s(e,["children"]);return{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{children:u.default.createElement(p.default,n,t)}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(345),c=o(d),f=n(344),p=o(f);
r.propTypes={children:l.PropTypes.node},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.message,n=e.children;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:"p",key:null,ref:null,props:{children:t,className:l.default.sidebarMessage},_owner:null},n]},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(2223)),l=i(o);r.propTypes={message:s.PropTypes.string.isRequired,
children:s.PropTypes.node},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(f===e)return p;var t=e.split("?"),n=t.length>1?t[1]:void 0,r=n?u.parseParams(n):{};return f=e,p={url:t[0],params:r}}function a(e){var t=arguments.length<=1||void 0===arguments[1]?window.location.hash:arguments[1],n=r(t);return u.join(n.url,i({},n.params,{type:e.type,filters:(0,c.default)(e.filters),filterLabel:e.filterLabel,sort:e.sort}))}var i=n(11).default,s=n(9).default,o=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=a;var l=n(26),u=s(l),d=n(623),c=o(d),f=void 0,p=void 0;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,n){"use strict";var r=n(1949).default,a=n(789).default,i=n(279).default;t.default=function(e,t){for(var n=r(t),s=0;s<n.length;s++){
var o=n[s],l=a(t,o);l&&l.configurable&&void 0===e[o]&&i(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){"use strict";var r=n(787).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 r(e)},t.__esModule=!0},function(e,t){e.exports={}},,,,,function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(e,t){
var r,a,i="";return i+=' <h2 class="text-muted">',(a=n.subtitle)?r=a.call(e,{hash:{},data:t}):(a=e&&e.subtitle,r=typeof a===d?a.call(e,{hash:{},data:t}):a),(r||0===r)&&(i+=r),i+="</h2> "}function s(e,t){var r,a,i="";return i+=" <p>",(a=n.message)?r=a.call(e,{hash:{},data:t}):(a=e&&e.message,r=typeof a===d?a.call(e,{hash:{},data:t}):a),(r||0===r)&&(i+=r),i+="</p> "}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,u="",d="function",c=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:a}):(l=t&&t.title,o=typeof l===d?l.call(t,{hash:{},data:a}):l),(o||0===o)&&(u+=o),u+="</h1> ",o=n.if.call(t,t&&t.subtitle,{hash:{},inverse:c.noop,fn:c.program(1,i,a),data:a}),(o||0===o)&&(u+=o),u+=" ",o=n.if.call(t,t&&t.message,{hash:{},inverse:c.noop,fn:c.program(3,s,a),data:a}),(o||0===o)&&(u+=o),u+=" </div> </div>"})},function(e,t,n){function r(e,t){return t=i(void 0===t?e.length-1:t,0),function(){for(var n=arguments,r=-1,s=i(n.length-t,0),o=Array(s);++r<s;)o[r]=n[t+r];
r=-1;for(var l=Array(t+1);++r<t;)l[r]=n[r];return l[t]=o,a(e,this,l)}}var a=n(826),i=Math.max;e.exports=r},function(e,t,n){"use strict";function r(e){if(v){var t=e.node,n=e.children;if(n.length)for(var r=0;r<n.length;r++)g(t,n[r],null);else null!=e.html?t.innerHTML=e.html:null!=e.text&&f(t,e.text)}}function a(e,t){e.parentNode.replaceChild(t.node,e),r(t)}function i(e,t){v?e.children.push(t):e.node.appendChild(t.node)}function s(e,t){v?e.html=t:e.node.innerHTML=t}function o(e,t){v?e.text=t:f(e.node,t);
}function l(){return this.node.nodeName}function u(e){return{node:e,children:[],html:null,text:null,toString:l}}var d=n(853),c=n(532),f=n(883),p=1,h=11,v="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),g=c(function(e,t,n){t.node.nodeType===h||t.node.nodeType===p&&"object"===t.node.nodeName.toLowerCase()&&(null==t.node.namespaceURI||t.node.namespaceURI===d.html)?(r(t),e.insertBefore(t.node,n)):(e.insertBefore(t.node,n),
r(t))});u.insertTreeBefore=g,u.replaceChildWithTree=a,u.queueChild=i,u.queueHTML=s,u.queueText=o,e.exports=u},function(e,t,n){"use strict";function r(){a.attachRefs(this,this._currentElement)}var a=n(2671),i=(n(98),n(39)),s={mountComponent:function(e,t,n,a,i){var s=e.mountComponent(t,n,a,i);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(r,e),s},getNativeNode:function(e){return e.getNativeNode()},unmountComponent:function(e,t){a.detachRefs(e,e._currentElement),
e.unmountComponent(t)},receiveComponent:function(e,t,n,i){var s=e._currentElement;if(t!==s||i!==e._context){var o=a.shouldUpdateRefs(s,t);o&&a.detachRefs(e,s),e.receiveComponent(t,n,i),o&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t,n){return e._updateBatchNumber!==n?void(null!=e._updateBatchNumber&&e._updateBatchNumber!==n+1?i(!1):void 0):void e.performUpdateIfNecessary(t)}};e.exports=s},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(14),l=a(o),u=n(94),d=r(u),c=n(5),f=r(c),p=n(12),h=r(p),v=n(32),g=r(v),m=d.default.extend({initialize:function(){this.controllers=[]},register:function(e){this.controllers.push(e)},getInstance:function(e,t){t||(t={});var n,r=l.resolve("appModel"),a=r.get("primaryPlayer");n=a&&!t.forceLocal?a.get("protocol")||"legacy":"local";var i=s.default.find(this.controllers,function(t){var r=n===t.protocol,a=e===t.type||"*"===t.type;return r&&a;
});if(i)return i.create(e,t);if(t.forceLocal)throw new Error("No player controller found for: "+e);return g.default.warn("A player did not match the protocol ("+n+") and type ("+e+")."),h.default.trigger("show:alert",{type:"error",message:(0,f.default)("Playback of this media is not supported with the selected player.")}),this.getInstance(e,{forceLocal:!0})}});t.default=new m,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e?o.default.reduce(t,function(t,n,r){return e.indexOf(r)===-1&&(t[r]=n),
t},{}):t}function a(e,t){var n;try{n=e._getStorageKey()}catch(r){n="no storageKey"}p.default.error("StorageModel ("+n+") "+t)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(47),u=i(l),d=n(399),c=i(d),f=n(32),p=i(f),h=n(99),v=i(h),g=n(41),m=i(g),y=u.default.Model.extend({sessionAttrs:[],save:function(e,t,n){var a,i=this.attributes;if(null==e||"object"==typeof e?(a=e,n=t):(a={})[e]=t,n=o.default.extend({validate:!0},n),a&&!n.wait){if(!this.set(a,n))return!1;
}else if(!this._validate(a,n))return!1;a&&n.wait&&(this.attributes=o.default.extend({},i,a)),void 0===n.parse&&(n.parse=!0);var s=this,l=n.success;n.success=function(){s.attributes=i,l&&l(s,i,n),s.trigger("sync",s,i,n)},u.default.wrapError(this,n);var d=this._getStorage(),f=this._getStorageKey(),p=this.attributes;if(!d.getInstance().persistDefaults){var h=o.default.result(this,"defaults");p=(0,c.default)(h,p)}var v=o.default.result(this,"sessionAttrs");p=r(v,p);var g=this.serialize(p),m=d.set(f,g);
return m.done(n.success).fail(n.error),a&&n.wait&&(this.attributes=i),m},populate:function(){return this.populatePromise||(this.populatePromise=this.fetch.apply(this,arguments)),this.populatePromise},fetch:function(e){e=e?o.default.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=this,n=e.success;e.success=function(r){return!!t.set(t.parse(r,e),e)&&(n&&n(t,r,e),void t.trigger("sync",t,r,e))},u.default.wrapError(this,e);var r=this._getStorage().get(this._getStorageKey());return r.done(e.success).fail(e.error),
this.populatePromise=r,r},destroy:function b(e){e=e?o.default.clone(e):{};var t=this,n=e.success,b=function(){t.trigger("destroy",t,t.collection,e)};e.success=function(r){e.wait&&b(),n&&n(t,r,e),t.trigger("sync",t,r,e)},u.default.wrapError(this,e);var r=this._getStorage().remove(this._getStorageKey());return r.done(e.success).fail(e.error),e.wait||b(),r},serialize:function(e){var t="";try{t=JSON.stringify(e)}catch(n){a(this,"serialization error: "+n.message)}return t},parse:function(e){var t;if(null==e)return t;
if(o.default.isObject(e))return e;try{t=JSON.parse(e);var n=o.default.result(this,"sessionAttrs");t=r(n,t)}catch(i){var s=o.default.isString(e)?e.substring(0,50):"no response";a(this,"parse error: "+i.message+" ("+s+")")}return t},sync:function(){throw new Error("storage model doesn`t allow syncing to server")},startCapturingChangeEvents:function(){if(this.releaseCapturedChangeEvents)return void(0,m.default)(!1,"This model is already capturing events");var e=this.set,t={};this.set=function(n,r,a){
var i;"object"==typeof n?(i=n,a=r):(i={})[n]=r;var s=o.default.extend({},a,{silent:!0}),l=e.call(this,i,s);return o.default.extend(t,this.changed),l},this.releaseCapturedChangeEvents=function(){o.default.each(t,function(e,t){this.trigger("change:"+t,this,e)},this),o.default.isEmpty(t)||this.trigger("change",this,{}),t={},this.set=e,this.releaseCapturedChangeEvents=null}},_getStorageKey:function(){var e=o.default.result(this,"storageKey");if(!e)throw new Error("storageKey is required");return e},_getStorage:function(){
return v.default}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(12),d=r(u),c=n(162),f=r(c),p=n(46),h=r(p),v=n(26),g=a(v),m=n(59),y=r(m),b=n(379),P=r(b),w={audio:["Track"],photo:["Photo","Video"],video:["Video"]},S=y.default.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 P.default([],{server:t.server}))},_fetch:function(){var e=s.default.result(this,"url");return this._ajax("GET",e)},convert:function(e){var t=s.default.isObject(e)?e:h.default.parseXML(e);return h.default.parseInteger(t,["playQueueVersion","playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueSelectedMetadataItemID"]),
h.default.parseArray(t,"Metadata"),h.default.parseBoolean(t,"playQueueShuffled"),t.stationService?(h.default.parseBoolean(t,"allowRepeat"),h.default.parseBoolean(t,"allowSeek"),h.default.parseBoolean(t,"allowShuffle"),h.default.parseBoolean(t,"allowSkipPrevious"),h.default.parseInteger(t,"stationSkipsPerHour"),h.default.parseInteger(t,"serviceSkipsPerDay"),t.isRadio=!0):t.isRadio=!1,t},parse:function(e){var t=w[this.get("mediaType")].concat("Directory");e=h.default.replaceXMLElementNames(e,t,"Metadata");
var n=this.convert(e),r=["playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueSelectedMetadataItemID","message","isRadio","stationTitle","stationThumb","stationService","allowRepeat","allowSeek","allowShuffle","allowSkipPrevious","stationSkipsPerHour","serviceSkipsPerDay"];n.playQueueVersion>this.get("playQueueVersion")&&r.push("playQueueID","playQueueVersion");var a=s.default.pick(n,r);return a.shuffled=!!n.playQueueShuffled,a.hasUpNext=!!n.playQueueLastAddedItemID,this.set(a),this.parseElementCollection(n);
},parseElementCollection:function(e){var t=e.Metadata,n=(0,s.default)(t).pluck("playQueueItemID").indexOf(e.playQueueSelectedItemID.toString()),r=parseInt(e.playQueueSelectedItemOffset,10),a=r-n,i=this.get("collection");return e.identifier&&i.setContext("identifier",e.identifier),e.mediaTagPrefix&&i.setContext("mediaTagPrefix",e.mediaTagPrefix),e.mediaTagVersion&&i.setContext("mediaTagVersion",e.mediaTagVersion),s.default.each(t,function(e,t){e.queueIndex=a+t}),t.message=e.message,t.totalSize=parseInt(e.playQueueTotalCount,10),
t.availableRange={start:a,end:a+t.length},t},_ajax:function(e,t){var n={repeat:this.get("repeatAll")?1:0,includeChapters:1};"audio"===this.get("mediaType")&&(n.includeRelated=1),t=g.join(t,n);var r=s.default.extend(this.get("server").getXHROptions(t),{type:e}),a=this._$ajax(r),i=s.default.bind(function(e){var t=this.parse(e);t.message&&d.default.trigger("show:alert",{type:"error",message:t.message});var n=this.get("collection");n.totalSize=t.totalSize,n.availableRange=t.availableRange,n.reset(t,{
parse:!0}),this.set("selectedItem",this.getCurrentItem())},this);return a.done(i,this)},_$ajax:function(e){return l.default.ajax(e)},getCurrentItem:function(){var e=this.get("playQueueSelectedItemID");return this.get("collection").findWhere({playQueueItemID:e})||null},queueContent:function(e,t){t||(t={});var n={type:this.get("mediaType")};if(e.get("playlistType"))n.playlistID=e.get("ratingKey");else{var r=s.default.pick(t,"unwatched","items","excludeSeedItem");n.uri=f.default.uri(e,r)}return t.firstItemKey&&(n.key=t.firstItemKey),
t.extrasPrefixCount&&(n.extrasPrefixCount=t.extrasPrefixCount),n.shuffle=t.shuffle?1:0,t.continuous&&"episode"===e.get("type")&&(n.continuous=1),this.isNew()?this._addContentPromise=this._ajax("POST",g.join("/playQueues",n)):(n.next=t.next?1:0,this.set("hasUserAdditions",!0),this._addContentPromise=this._ajax("PUT",g.join(s.default.result(this,"url"),n))),this._addContentPromise},addContent:function(e,t){return this.queueContent(e,t).then(s.default.bind(this._setSelectedItem,this,t))},_setSelectedItem:function(e){
var t;if(e&&e.firstItemKey){var n=e.firstItemKey;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(e){if(e.get("playQueueItemID")===this.get("selectedItem").get("playQueueItemID"))return l.default.Deferred().resolve().promise();this.set("hasUserAdditions",!0);var t=g.join([s.default.result(this,"url"),"/items/",e.get("playQueueItemID")]);return this._ajax("DELETE",t)},moveItem:function(e,t){if(e===this.get("selectedItem").get("playQueueItemID"))return l.default.Deferred().resolve().promise();
var n=t||this.get("selectedItem").get("playQueueItemID");this.set("hasUserAdditions",!0);var r={after:n},a=g.join([s.default.result(this,"url"),"/items/",e,"/move"],r);return this._ajax("PUT",a)},isItemQueueable:function(e){var t=(0,s.default)(e).result("url"),n=e.get("playlistType")||/\/(?:library|hubs|services\/gracenote)\//.test(t);if(!n)return!1;var r=/\/sync\//.test(t);if(r)return!1;var a=/\/folder/.test(t);if(a)return!1;var i=/\/theme\//.test(t);if(i)return!1;var o=e.get("currentSubset")&&e.get("currentSubset").id;
if("folder"===o||"recentlyViewedShows"===o)return!1;var l=e.get("type")&&("photoAlbum"===e.get("type")||"photo"===e.get("type")),u="photo"===e.viewGroup||l,d=e.server.supports("photoPlayQueues");return d||!u},toggleShuffle:function(){var e=[s.default.result(this,"url")];return this.get("shuffled")?e.push("/unshuffle"):e.push("/shuffle"),this._ajax("PUT",g.join(e))},setRepeatAll:function(e){return this.set("repeatAll",e),this.fetch()},yieldOwnership:function(){this.set("owned",!1);var e=this._addContentPromise||l.default.Deferred().resolve().promise();
return e.then(s.default.bind(function(){return this.get("playQueueID")&&this.get("collection").length>0?s.default.result(this,"url")+"?own=1&window=200":null},this))},takeOwnership:function(){if(this.get("owned"))return l.default.Deferred().resolve().promise();this.set("owned",!0);var e=s.default.result(this,"url")+"?own=1";return this._ajax("GET",e)},supports:function(){return!0},getIdFromKey:function(e){var t=/playQueues\/([^\/?]+)/.exec(e);return t&&t[1]||null}});t.default=S,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(49),i=r(a),s=n(62),o=r(s),l=n(28),u=r(l),d=n(57),c=r(d),f=u.default.extend({name:"MetadataCollection",context:["server","section","playlist","channel","identifier","mediaTagPrefix","mediaTagVersion","allowSync","containerKey"],model:c.default,url:function(){return this.containerKey},augmentResponseText:function(e,t){return t===o.default.xml?i.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=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),i=n(320),s=r(i),o=(0,a.createSelectorCreator)(a.defaultMemoize,s.default);t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),i=n(135),s=r(i),o=(0,a.createSelector)(s.default,function(e){
return e.servers});t.default=o,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={AUTO:"auto",AVOID:"avoid",ALWAYS:"always",NEVER:"never"};n.settings=[{value:n.AUTO,title:"Automatic"},{value:n.AVOID,title:"Only image formats"},{value:n.ALWAYS,title:"Always"}],t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={CREATED:0,PROGRESS:1,MATCHING:2,DOWNLOADING_METADATA:3,LOADING_METADATA:4,
PROCESSED:5,ANALYZING:6,DELETED:9};t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=arguments.length<=1||void 0===arguments[1]?"MMMM D, YYYY":arguments[1];return e?s.default.unix(e).format(t):""}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(null==e)return!1;var t=s.default.unix(e);return(0,s.default)().isSame(t,"day")}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=r;var i=n(53),s=a(i);e.exports=t.default},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";function r(e){var t=e.episodePrefix||"E{1}",n=e.episodeIndex;return n>0||0===n?(e.noLeadingZero||(n=(0,d.default)(n)),(0,l.default)(t,n)):e.date?(0,s.default)(e.date).format("M/D/YY"):""}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(53),s=a(i),o=n(5),l=a(o),u=n(408),d=a(u);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){var r=(0,u.resolve)("appModel"),a=r.get("servers"),s=a.find(function(e){var t=e.get("activeConnection");return e.get("isConnected")&&e.get("isFullServer")&&t.get("isPrivate")});return l.default.image(e,t,i({fallbackServer:s},n))}function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){return r.apply(void 0,t)}}var i=n(11).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0}),t.imageTranscodeUrl=r,t.default=a;var o=n(201),l=s(o),u=n(14)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={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))}};t.default=n,
e.exports=t.default},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){"use strict";function r(e){var t=e.className,n=e.children,r=e.cellX,i=e.cellY,s=e.cellWidth,o=e.cellHeight,l="translate3d("+r+"px, "+i+"px, 0)",u={position:"absolute",width:s,height:o,WebkitTransform:l,msTransform:l,transform:l};return{$$typeof:a,type:"div",key:null,ref:null,props:{children:n,className:t,
style:u},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4);i(s);r.propTypes={className:s.PropTypes.string,children:s.PropTypes.node,cellX:s.PropTypes.number.isRequired,cellY:s.PropTypes.number.isRequired,cellWidth:s.PropTypes.number.isRequired,cellHeight:s.PropTypes.number.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=function(t){function n(e,t){o(this,n),a(Object.getPrototypeOf(n.prototype),"constructor",this).call(this,e,t),
this.state={isMoving:!1}}return i(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],r=e[e.keyPropName],a=n&&n===r;a?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:[v.autobind],value:function(){this.setState({isMoving:!1})}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.keyPropName,a=t.isScrolling,i=t.isVisible,s=(t.moveTimeout,l(t,["className","keyPropName","isScrolling","isVisible","moveTimeout"])),o=s[r],d=a&&o!==this._renderedItem,c=!i&&o!==this._visibleItem;return f.default.createElement(e,u({
className:(0,h.default)(n,w.default.cell,this.state.isMoving&&w.default.isMoving),showScrollPlaceholder:d,showOffscreenPlaceholder:c},s))}}]),n}(c.Component);return t.displayName="Virtualized("+(0,m.default)(e)+")",t.WrappedComponent=e,t.propTypes={className:c.PropTypes.string,keyPropName:c.PropTypes.string.isRequired,cellIndex:c.PropTypes.number.isRequired,isScrolling:c.PropTypes.bool.isRequired,isVisible:c.PropTypes.bool.isRequired,moveTimeout:c.PropTypes.number.isRequired},t.defaultProps={moveTimeout:400
},t}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(19).default,u=n(11).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=d(c),p=n(33),h=d(p),v=n(24),g=n(424),m=d(g),y=n(31),b=d(y),P=n(2043),w=d(P);t.default=r,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="small";t.SMALL=n;var r="medium";t.MEDIUM=r;var a="large";t.LARGE=a;var i=[n,r,a];t.all=i},function(e,t,n){"use strict";function r(e,t){
var n=t.constructor.prototype.validate;return n?n(e):[]}function a(e){var t=this.panes[e],n=o.call(this,t);return 0===r.call(this,n,t).length}function i(e,t){return e.concat(this.panes[t].dependentPanes||[])}function s(){var e=this.$(".change-pane-btn");e.addClass("disabled").removeClass("selected"),d.default.each(this.getReachablePanes(),function(t){e.filter("."+t+"-btn").removeClass("disabled")},this),e.filter("."+this.selectedPane+"-btn").addClass("selected")}function o(e){return this[e.model]||this[this.panesModel]||this.model;
}var l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(3),d=l(u),c={showPane:function(e){if(e!==this.selectedPane){var t=this.paneRegion.currentView;t&&(this.stopListening(t,"valid",s),this.stopListening(t,"invalid",s),this.$el.removeClass("pane-"+this.selectedPane),this.onPaneHide&&this.onPaneHide(this.selectedPane,t)),this.selectedPane=e;var n=this.panes[e],r=n.constructor,a=this.paneConstructorArg?this.paneConstructorArg():{},i=new r(d.default.extend(a,{model:o.call(this,n)
}));if(i.onModalClose){this._paneOnModalCloseCallbacks||this.listenToOnce(this,"close",function(){d.default.each(this._paneOnModalCloseCallbacks,function(e){e[1].call(e[0])},this),this._paneOnModalCloseCallbacks=null});var l=this._paneOnModalCloseCallbacks||[];l.push([i,i.onModalClose]),this._paneOnModalCloseCallbacks=d.default.uniq(l,function(e){return e[1]})}this.listenTo(i,"valid",s),this.listenTo(i,"invalid",s),s.call(this),this.onPaneShow&&this.onPaneShow(e,i),this.$el.addClass("pane-"+e),this.paneRegion.show(i),
s.call(this)}},getReachablePanes:function(){for(var e,t,n=d.default.reduce(this.panes,function(e,t){return d.default.union(e,t.dependentPanes||[])},[]),r=d.default.filter(d.default.keys(this.panes),function(e){return!d.default.contains(n,e)}),s=r;s.length;)e=d.default.filter(s,a,this),t=t||e.length!==s.length,s=d.default.reduce(e,i,[],this),r=r.concat(s);return r.isAnyInvalid=t,r},onChangePaneClick:function(e){e.preventDefault();var t=this.$(e.currentTarget);t.isDisabled()||this.showPane(t.data("pane"));
}};t.default=c,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(83),i=r(a),s=n(1289),o=r(s),l=i.default.extend({model:o.default,url:"/status/sessions/background",parse:function(e){return this.convert(e,"TranscodeJob")}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(136),i=r(a),s=n(20),o=r(s),l=n(22),u=r(l),d=n(1298),c=r(d),f=n(1297),p=r(f),h=n(1293),v=r(h),g=n(1295),m=r(g),y=u.default.extend({
name:"VersionGeneratorModel",context:["server","section","playlistID"],rootPropertyName:"Item",cache:new i.default,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.id)},urlRoot:function(){var e=this.playlistID||this.parent.id;return"/playlists/"+e+"/items"},syncedAttrs:{id:o.default.integer,clientIdentifier:o.default.string,contentType:o.default.string,composite:o.default.string,type:{type:o.default.integer,save:!0},title:{type:o.default.string,save:!0},target:{type:o.default.string,
save:!0},targetTagID:{type:o.default.integer,save:!0},locationID:{type:o.default.integer,save:!0},Location:{type:o.default.object,save:!0},Device:{type:o.default.object,save:!0}},sessionRelations:{children:{relationClass:m.default,options:function(){return{generator:this}}}},syncedRelations:{status:{relationClass:c.default,rootPropertyName:"Status"},policy:{relationClass:p.default,rootPropertyName:"Policy",save:!0},mediaSettings:{relationClass:v.default,rootPropertyName:"MediaSettings",save:!0}},
derivedAttrs:{isDirectory:function(){var e=this.get("Location");if(e.uri)return/(playlist\:\/\/|library\:\/\/([\w-]*)\/directory\/)/.test(e.uri)}},defaults:function(){return{type:42,locationID:-1,Location:{},Device:{}}},defaultCounts:{video:5,audio:50,photo:50},warningCounts:{video:10,audio:100,photo:100},getSaveParams:function(e,t){var n=u.default.prototype.getSaveParams.apply(this,arguments);return n.targetTagID&&(delete n.MediaSettings,delete n.Device),{Item:n}},setPolicyDefaultsFor:function(e){
var t=this.get("policy"),n=this.get("isDirectory");return t.has("scope")||t.set("scope",n?"count":"all"),!t.has("value")&&n&&t.set("value",this.defaultCounts[e]),this},shouldShowPolicyWarning:function(e,t){var n=this.get("policy").get("scope");return"count"===n?t>this.warningCounts[e]:"all"===n&&this.get("isDirectory")}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(11).default,a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(64),o=a(s),l=n(42),u=i(l),d=(0,
o.default)(u.ADD_METADATA_ITEM_TO_PLAYLIST);t.addMetadataItemToPlaylist=d;var c=(0,o.default)(u.ANALYZE_METADATA_ITEM);t.analyzeMetadataItem=c;var f=(0,o.default)(u.DELETE_METADATA_ITEM);t.deleteMetadataItem=f;var p=(0,o.default)(u.DELETE_METADATA_ITEM_VERSION);t.deleteMetadataItemVersion=p;var h=(0,o.default)(u.DOWNLOAD_METADATA_ITEM_VERSION);t.downloadMetadataItemVersion=h;var v=(0,o.default)(u.EDIT_METADATA_ITEM);t.editMetadataItem=v;var g=(0,o.default)(u.FIX_METADATA_ITEM_MATCH);t.fixMetadataItemMatch=g;
var m=(0,o.default)(u.GET_METADATA_ITEM_INFO);t.getMetadataItemInfo=m;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 P=(0,o.default)(u.OPTIMIZE_METADATA_ITEM);t.optimizeMetadataItem=P;var w=(0,o.default)(u.PLAY_METADATA_ITEM);t.playMetadataItem=w;var S=(0,o.default)(u.PLAY_METADATA_ITEM_VERSION);t.playMetadataItemVersion=S;var _=(0,o.default)(u.PLAY_PRIMARY_EXTRA);t.playPrimaryExtra=_;
var T=(0,o.default)(u.PLAY_RELATED_MIX);t.playRelatedMix=T;var I=(0,o.default)(u.QUEUE_METADATA_ITEM);t.queueMetadataItem=I;var M=(0,o.default)(u.RATE_METADATA_ITEM);t.rateMetadataItem=M;var C=(0,o.default)(u.RECOMMEND_METADATA_ITEM);t.recommendMetadataItem=C;var x=(0,o.default)(u.REFRESH_METADATA_ITEM);t.refreshMetadataItem=x;var E=(0,o.default)(u.SHARE_METADATA_ITEM);t.shareMetadataItem=E;var k=(0,o.default)(u.SPLIT_METADATA_ITEM_APART);t.splitMetadataItemApart=k;var D=(0,o.default)(u.SYNC_METADATA_ITEM);
t.syncMetadataItem=D;var A=(0,o.default)(u.UNMATCH_METADATA_ITEM);t.unmatchMetadataItem=A;var O=(0,o.default)(u.WATCH_METADATA_ITEM_LATER);t.watchMetadataItemLater=O;var R=(0,o.default)(u.QUEUE_METADATA_ITEM,function(e){return r({},e,{next:!1})});t.addMetadataItemToQueue=R;var L=(0,o.default)(u.PLAY_METADATA_ITEM,function(e){return r({},e,{unwatched:!1})});t.playMetadataItemAll=L;var N=(0,o.default)(u.QUEUE_METADATA_ITEM,function(e){return r({},e,{next:!0})});t.playMetadataItemNext=N;var j=(0,o.default)(u.PLAY_METADATA_ITEM,function(e){
return r({},e,{shuffle:!0})});t.shuffleMetadataItem=j},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(64),s=r(i),o=n(42),l=a(o),u=(0,s.default)(l.INIT_RECORDING_SCHEDULE_PAGE);t.initRecordingSchedulePage=u;var d=(0,s.default)(l.CLEAR_RECORDING_SCHEDULE_PAGE);t.clearRecordingSchedulePage=d;var c=(0,s.default)(l.FETCH_MEDIA_SUBSCRIPTIONS);t.fetchMediaSubscriptions=c;var f=(0,s.default)(l.MOVE_MEDIA_SUBSCRIPTION);t.moveMediaSubscription=f;
var p=(0,s.default)(l.SET_VISIBLE_DAYS);t.setVisibleDays=p;var h=(0,s.default)(l.GO_TO_TODAY);t.goToToday=h;var v=(0,s.default)(l.GO_TO_PREVIOUS_RANGE);t.goToPreviousRange=v;var g=(0,s.default)(l.GO_TO_NEXT_RANGE);t.goToNextRange=g;var m=(0,s.default)(l.FETCH_CALENDAR);t.fetchCalendar=m;var y=(0,s.default)(l.PLAY_RECORDING);t.playRecording=y},function(e,t,n){"use strict";function r(){return(0,o.createSelector)(function(e,t){var n=t.deviceID;return n},(0,u.default)(),function(e,t){if(t)return s.default.find(t.devices,{
key:e})})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(15),l=n(438),u=a(l);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2289),i=r(a),s=n(13),o=r(s),l=n(12),u=r(l),d=o.default.ItemView.extend({className:"alert-bar",template:i.default,events:{"click .close-btn":"onCloseClick"},initialize:function(e){this.alert=e.alert,this.alert&&this.$el.addClass(this.alert.type);
},hide:function(){u.default.trigger("hide:bar","alertbar")},serializeData:function(){return this.alert},onCloseClick:function(e){e.preventDefault(),this.hide()}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2318),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(5),h=r(p),v=n(12),g=r(v),m=n(26),y=a(m),b=n(37),P=r(b),w=n(27),S=r(w),_=n(57),T=r(_),I=n(121),M=r(I),C=n(445),x=r(C),E=n(444),k=r(E),D=n(146),A=r(D),O=n(265),R=r(O),L=n(263),N=r(L),j=n(264),U=r(j),$=n(175),z=r($),F=f.default.ItemView.extend({
tagName:"ul",className:"dropdown-menu",template:s.default,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=P.default.get(this.model.get("type")),this.mediaActions=new M.default({},{item:this.model}),(0,d.default)(".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=y.getLastSegment(n))}return{downloadUrl:e,downloadName:t}},getPosition:function(e,t,n){var r=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&&(r-=this.$el.width()-e.outerWidth()),{top:n,left:r}},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"),r=n.findWhere({browse:!1}),a=r.get("title");a&&t.text((0,
h.default)("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(),g.default.trigger("show:modal",new x.default({model:this.model}))},onPlayAllClick:function(e){e.preventDefault(),S.default.execute("playMedia",{item:this.model})},onPlayShuffledClick:function(e){e.preventDefault(),S.default.execute("playMedia",{item:this.model,
shuffle:!0})},onPlayPrimaryExtraClick:function(e){e.preventDefault();var t=this.model.server.getSectionForItem(this.model);if(!l.default.isEmpty(t)){var n=new T.default({key:this.model.get("primaryExtraKey"),type:"clip",librarySectionUUID:t.get("uuid")},{server:this.model.server,section:this.model.section});S.default.execute("playMedia",{item:n})}},onPlayNextClick:function(e){return e.preventDefault(),(0,d.default)(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void S.default.execute("queueMedia",{
item:this.model,next:!0})},onAddToQueueClick:function(e){return e.preventDefault(),(0,d.default)(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void S.default.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"),S.default.execute("playMedia",{item:n})},onAddToPlaylistClick:function(e){return e.preventDefault(),(0,d.default)(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void g.default.trigger("show:modal",new A.default({
model:this.model,items:this.mediaActions.getActionTargets(),title:this.mediaActions.getActionTargetsTitle()}))},onRefreshClick:function(e){e.preventDefault(),S.default.execute("refreshMetadata",{items:this.mediaActions.getActionTargets()})},onMarkWatchedClick:function(e){e.preventDefault(),S.default.execute("markWatched",{item:this.model})},onMarkUnwatchedClick:function(e){e.preventDefault(),S.default.execute("markUnwatched",{item:this.model})},onSyncClick:function(e){e.preventDefault(),S.default.execute("showSyncModal",{
item:this.model})},onConvertClick:function(e){e.preventDefault(),g.default.trigger("show:modal",new z.default({item:this.model}))},onWatchLaterClick:function(e){e.preventDefault(),S.default.execute("watchLater",{item:this.model})},onShareClick:function(e){e.preventDefault(),g.default.trigger("show:modal",new R.default({model:this.model}))},onRecommendClick:function(e){e.preventDefault(),g.default.trigger("show:modal",new U.default({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),
this.model.get("playlistType")?S.default.execute("deletePlaylist",{item:this.model}):S.default.execute("deleteItems",{item:this.model,skipRedirect:!0})},onInfoClick:function(e){e.preventDefault(),g.default.trigger("show:modal",new N.default({model:this.model}))},onDownloadClick:function(e){e.preventDefault(),this.model.get("Media").length>1?g.default.trigger("show:modal",new k.default({model:this.model})):window.location.href=this.model.getDownloadUrl()}});t.default=F,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2327),s=r(i),o=n(8),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=d.default.ItemView.extend({id:"primary-server-dropdown",tagName:"span",className:"dropdown",template:s.default,events:{"click .dropdown-menu a":"onServerClick"},initialize:function(e){e||(e={});var t=f.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"),r=t.get("sections");if(n&&!(this.showSharedServers&&r&&r.findWhere({allowSync:!0})))return e;var a=t.toJSON();return a.authorized&&!(a.cloud||a.synced||a.isOutOfDate)&&e.push(a),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=f.resolve("appModel"),n=(0,l.default)(e.currentTarget).data("id"),r=this.collection.get(n);r&&t.set("primaryServer",r)}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(13),d=r(u),c=n(26),f=a(c),p=n(102),h=r(p),v=n(321),g=r(v),m=n(1330),y=r(m),b=n(678),P=r(b),w=n(1327),S=r(w),_=n(134),T=r(_),I=d.default.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(e){var t=this.ui.formGroup;t.removeClass("has-error"),s.default.each(e,function(e){t.filter("."+e+"-group").addClass("has-error")}),this.trigger(e.length?"invalid":"valid")},createMenuOptions:function(e,t){return s.default.map(e,function(e){return'<option value="'+e.value+'"'+(e.value===t?" selected":"")+">"+e.label+"</option>";
}).join("\n")},getSectionType:function(){if(this.model.sectionType)return this.model.sectionType;var e=this.model.get("type"),t=h.default.get(e);return"movie"===e&&"com.plexapp.agents.none"===this.model.get("agent")&&(t=h.default.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 g.default([],{server:this.model.server,mediaTypeID:e.typeID})),this.model.agents.populate().then(function(e){
return e})):l.default.Deferred().reject().promise()},populateScanners:function(){var e=this.getSectionType();return e?(this.model.scanners||(this.model.scanners=new y.default([],{server:this.model.server,sectionTypeID:e.typeID})),this.model.scanners.populate().then(function(e){return e})):l.default.Deferred().reject().promise()},populateAgentsProxy:function(){var e=this.getSectionType().exclusiveAgents,t=new P.default(this.model.agents,e,this.model.get("agent"));return this.model.agentsProxy=t,l.default.Deferred().resolve(t).promise();
},populateScannersProxy:function(){var e=this.getSectionType().exclusiveScanners,t=new S.default(this.model.scanners,e,this.model.get("scanner"));return this.model.scannersProxy=t,l.default.Deferred().resolve(t).promise()},populateSectionSettings:function(){if(!this.model.server.supports("sectionSettings"))return l.default.Deferred().resolve().promise();if(!this.model.settings){var e=new T.default([],{server:this.model.server});if(this.model.isNew()){var t={type:this.getSectionType().typeID,agent:this.model.get("agent")
};e.url=f.join(["/library/sections/prefs"],t)}else e.url=f.join(["/library/sections/",this.model.id,"/prefs"]);this.model.settings=e}var n=this.model.settings.populate();return n},populateSectionAgentSettings:function(){if(!this.model.agentSettings){var e=new T.default([],{server:this.model.server,url:f.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}});t.default=I,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2381),i=r(a),s=n(3),o=r(s),l=n(123),u=r(l),d=n(58),c=r(d),f=u.default.extend({className:"poster-item media-tile-list-item",template:i.default,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){u.default.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 c.default({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,r=!!this.model.get("deletedAt");
n||r?this.$el.addClass("dim"):this.$el.removeClass("dim")},bindings:o.default.extend({},u.default.prototype.bindings,{".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","year"],autohide:!0,formatter:function(e){var t=u.default.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=u.default.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}}})});t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=d.default.reject(e,function(e){return 0===e.id}),n=d.default.sortBy(t,"streamType");return d.default.map(n,function(e){return O(e,"streamType")})}function a(e){return d.default.map(e.get("Media"),function(e){return d.default.extend(O(e,"Part"),{Part:d.default.map(e.Part,function(e){return d.default.extend(O(e,"Stream"),{file:e.file,exists:e.exists,accessible:e.accessible,Stream:r(e.Stream)
})})})})}var i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(2425),l=i(o),u=n(3),d=i(u),c=n(8),f=i(c),p=n(14),h=s(p),v=n(1079),g=s(v),m=n(1115),y=s(m),b=n(1142),P=s(b),w=n(26),S=s(w),_=n(54),T=i(_),I=n(27),M=i(I),C=n(121),x=i(C),E=["id","key","index","videoCodec","audioCodec","audioChannels","default","selected","languageCode","codecID","accessible","exists","provider","lines","minLines","follow","requiredBandwidths","deepAnalysisVersion","deepAnalysisDate"],k={
size:y.formatBytes,duration:g.formatPlayerTime,codec:P.toUpperCase,format:P.toUpperCase,container:P.toUpperCase,videoResolution:y.formatResolution,channels:y.formatAudioChannels,level:y.formatVideoLevel,bitrateMode:P.toUpperCase,accessible:P.formatBoolean,exists:P.formatBoolean,optimizedForStreaming:P.formatBoolean,timed:P.formatBoolean,file:S.getLastSegment},D={optimizedForStreaming:"Web Optimized",has64bitOffsets:"Has 64bit Offsets",cabac:"CABAC",postURL:"URL"},A={frameRate:" fps",dialogNorm:" dB",
bitrate:" kbps",samplingRate:" Hz"},O=function(e,t){var n={properties:[]};for(var r in e)if(r!==t&&d.default.indexOf(E,r)===-1){var a=D[r],i=e[r];k[r]&&(i=k[r](i)),i&&(A[r]&&(i+=A[r]),a||(a=P.formatPropertyLabel(r)),n.properties.push({name:a,value:i}))}return t&&e&&(n[t]=e[t]),n},R=T.default.extend({name:"mediaInfoModal",className:"media-info-modal modal modal-lg fade",template:l.default,ui:{scroller:".modal-body-scroll",files:".files > ul",stickyProps:".media > .props, .part > .props"},events:d.default.extend({
"click .delete-btn":"onDeleteClick"},T.default.prototype.events),modelEvents:{"change:Media":"onMediaChange"},initialize:function(e){T.default.prototype.initialize.apply(this,arguments),this.bindAllWhenRendered("onMediaChange","onScroll"),this.loading=!1,this.media=a(this.model),this.mediaActions=new x.default({},{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=h.resolve("appModel"),n=t.get("user"),r=this.model.server;return this.model.get("isLibraryItem")&&(e=S.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=a(this.model),this.render()},hasFiles:function(){return!!d.default.chain(this.media).pluck("Part").flatten().pluck("file").compact().size().value()},hasStreams:function(){return!!d.default.chain(this.media).pluck("Part").flatten().pluck("Stream").flatten().size().value()},bindingsModel:"mediaActions",bindings:{".delete-btn":{modelAttribute:"showDelete",manual:!0,autohide:!0}},onRender:function(){T.default.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(),M.default.execute("deleteMediaItem",{item:this.model,index:(0,f.default)(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 n=(0,f.default)(this),r=n.parent().height()-n.height(),a=e-this.parentNode.offsetTop,i=Math.min(Math.max(a,0),r);i&&i===a?(n.addClass("sticky"),n.css("top",t)):(n.removeClass("sticky"),n.css("top",i))})}});t.default=R,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2428),s=r(i),o=n(8),l=r(o),u=n(3),d=r(u),c=n(14),f=a(c),p=n(27),h=r(p),v=n(54),g=r(v),m=n(124),y=r(m),b=n(1565),P=r(b),w=y.default.extend({
name:"recommendModal",className:"recommend-modal select-modal modal modal-sm fade",template:s.default,playlistIDs:null,ui:{sendBtn:".send-btn",messageContainer:".message-container",message:".message"},regions:{list:".friends-container"},events:d.default.extend({"click .friend":"onFriendClick","click .friends-btn":"onFriendsClick","click .send-btn":"onSendClick"},g.default.prototype.events),initialize:function(){y.default.prototype.initialize.apply(this,arguments);var e=f.resolve("appModel"),t=e.get("user");
this.collection=t.get("friends").filterByUnrestricted(),this.playlistIDs=[]},serializeData:function(){return{hasFriends:!!this.collection.length}},onRender:function(){y.default.prototype.onRender.apply(this,arguments),this.list.show(new P.default({collection:this.collection}))},onClose:function(){this.collection.destroy()},onFriendClick:function(e){e.preventDefault();var t=(0,l.default)(e.currentTarget),n=t.data("id");t.hasClass("selected")?this.playlistIDs.splice(d.default.indexOf(this.playlistIDs,n),1):this.playlistIDs.push(n),
t.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 n={item:this.model,playlistIDs:this.playlistIDs,message:this.ui.message.val()},r=h.default.execute("recommend",n);r.done(d.default.bind(this.onSendSuccess,this)),
r.fail(d.default.bind(this.onSendError,this))}},onSendSuccess:function(){this.hide()},onSendError:function(){this.ui.sendBtn.removeClass("active")}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2435),s=r(i),o=n(8),l=r(o),u=n(3),d=r(u),c=n(14),f=a(c),p=n(27),h=r(p),v=n(54),g=r(v),m=n(124),y=r(m),b=y.default.extend({name:"shareModal",className:"share-modal select-modal modal modal-sm fade",template:s.default,
linkedNetworks:null,networkIDs:null,maxLength:null,ui:{shareBtn:".share-btn",messageContainer:".message-container",charactersRemaining:".characters-remaining",message:".message"},events:d.default.extend({"click .network":"onNetworkClick","keyup .message":"onMessageKeyUp","click .share-btn":"onShareClick"},g.default.prototype.events),initialize:function(){y.default.prototype.initialize.apply(this,arguments);var e=f.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;d.default.each(this.networkIDs,function(n){var r=t.get(n),a=r.get("maxLength")||null;(null===e||e>a)&&(e=a);
}),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(){y.default.prototype.onRender.apply(this,arguments),this.autoSelect&&(this.networkIDs.push(this.linkedNetworks[0].id),this.calculateMaxLength())},onNetworkClick:function(e){e.preventDefault();var t=(0,l.default)(e.currentTarget),n=t.data("id");t.hasClass("selected")?this.networkIDs.splice(d.default.indexOf(this.networkIDs,n),1):this.networkIDs.push(n),t.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 n={item:this.model,networkIDs:this.networkIDs,message:this.ui.message.val()},r=h.default.execute("share",n);r.done(d.default.bind(this.onShareSuccess,this)),r.fail(d.default.bind(this.onShareError,this))}},onShareSuccess:function(){this.hide()},onShareError:function(){
this.ui.shareBtn.removeClass("active")}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2465),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(14),f=a(c),p=n(63),h=r(p),v=n(54),g=r(v),m=n(1607),y=r(m),b=n(1605),P=r(b),w=n(1604),S=r(w),_=g.default.extend({name:"userSelectModal",className:"user-select-modal modal modal-transparent fade",template:s.default,transparent:!0,panes:{users:y.default,pin:P.default
},regions:{content:".modal-content",alertBar:".modal-alert"},initialize:function(e){g.default.prototype.initialize.apply(this,arguments);var t=f.resolve("appModel");this.options=e,this.isForced=e.isForced,this.user=t.get("user"),this.promise=d.default.Deferred()},showPane:function(e,t){this.currentPane&&this.stopListening(this.currentPane);var n=this.panes[e],r=new n(l.default.extend({},this.options,t));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=h.default.get("alerts");h.default.set("alerts",null);var t=new S.default({alert:l.default.first(e)});this.alertBar.show(t)},onRender:function(){g.default.prototype.onRender.apply(this,arguments),this.model?this.showPane("pin",{focusDelay:this.focusDelay}):this.showPane("users"),this.showAlertBar()},onHide:function(e){g.default.prototype.onHide.apply(this,arguments),"pending"===this.promise.state()&&this.promise.reject()},
onChangePane:function(e,t){this.showPane(e,t)},onResolve:function(e){return h.default.has("continueUrl")&&!this.options.isEditing?void(window.location=h.default.get("continueUrl")):(this.promise.resolve(e),void this.hide())},onReject:function(){this.promise.reject(),this.hide()}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=(l(u),
n(824)),c=l(d),f=n(823),p=l(f),h=n(24),v=n(1941),g=l(v),m=n(2048),y=l(m),b=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={progress:0}}return a(t,e),i(t,[{key:"componentDidMount",value:function(){this._progressTo(this.props)}},{key:"componentDidUpdate",value:function(e){this._progressTo(this.props)}},{key:"componentWillUnmount",value:function(){this._cancelProgressTo()}},{key:"_progressTo",value:function(e){var t=e.progress,n=this.props.smoothProgressDuration/1e3,r={
progress:t,ease:p.default.Power3.easeOut,onUpdate:this.onProgressToUpdate,onComplete:this.onProgressToComplete};this._progressPosition={progress:this.state.progress},this._cancelProgressTo(),this._progressToTween=c.default.to(this._progressPosition,n,r)}},{key:"_cancelProgressTo",value:function(){this._progressToTween&&(this._progressToTween.kill(),this._progressToTween=null)}},{key:"onProgressToUpdate",decorators:[h.autobind],value:function(){this.setState({progress:this._progressPosition.progress
})}},{key:"onProgressToComplete",decorators:[h.autobind],value:function(){this._progressToTween=null}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.containerClassName,r=e.backgroundClassName,a=e.size,i=e.lineWidth,s=e.strokeColor,l=e.showProgressText,u=this.state.progress,d=a/2,c=d-i,f=Math.PI*(2*c),p=a+"px",h=a-3*i+"px",v=(100-u)/100*f,g=Math.round(u)+"%";return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"svg",key:null,ref:null,props:{children:{
$$typeof:o,type:"circle",key:null,ref:null,props:{children:[],fill:"transparent",r:c,cx:d,cy:d,strokeDasharray:f,style:{strokeWidth:i,stroke:s,strokeDashoffset:v}},_owner:null},className:t,version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:a,height:a},_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:[],className:r,style:{width:h,height:h}},_owner:null},l&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:g,className:y.default.circularProgressBarText},_owner:null}],
className:n,style:{width:p,height:p,lineHeight:p}},_owner:null}}}]),t}(u.Component);b.propTypes={className:u.PropTypes.string,containerClassName:u.PropTypes.string,backgroundClassName:u.PropTypes.string,size:u.PropTypes.number,progress:u.PropTypes.number.isRequired,lineWidth:u.PropTypes.number,strokeColor:u.PropTypes.string,showProgressText:u.PropTypes.bool,smoothProgressDuration:u.PropTypes.number.isRequired},b.defaultProps={className:y.default.circularProgressBar,containerClassName:y.default.circularProgressBarContainer,
backgroundClassName:y.default.circularProgressBarBackground,size:60,lineWidth:5,strokeColor:g.default.primaryColor,showProgressText:!0,smoothProgressDuration:1e3},t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(19).default,d=n(11).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=c(f),h=n(30),v=n(34),g=c(v),m=n(449),y=c(m),b=n(2059),P=c(b),w=function(e){
function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.arrowClassName,r=e.children,a=e.direction,i=e.isSelected,s=u(e,["className","arrowClassName","children","direction","isSelected"]);return p.default.createElement(g.default,d({className:t,"aria-haspopup":!0,isSelected:i},s),r,{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{className:n,
direction:a,isSelected:i}),_owner:null})}}]),t}(f.Component);w.propTypes={className:f.PropTypes.string,arrowClassName:f.PropTypes.string,children:f.PropTypes.node.isRequired,direction:f.PropTypes.oneOf(h.directions.all),isSelected:f.PropTypes.bool},w.defaultProps={className:P.default.button,isSelected:!0},t.default=w,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.className,r=e.spinnerSize,l=e.isSpinning,u=s(e,["children","className","spinnerSize","isSpinning"]);
return d.default.createElement(m.default,o({className:(0,f.default)(n,b.default.button,l&&b.default.isSpinning),isDisabled:l},u),{$$typeof:a,type:"span",key:null,ref:null,props:{children:{$$typeof:a,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{className:b.default.spinner,size:r}),_owner:null},className:b.default.spinnerContainer},_owner:null},{$$typeof:a,type:"span",key:null,ref:null,props:{children:t,className:b.default.label},_owner:null})}var a=n(7).default,i=n(10).default,s=n(19).default,o=n(11).default,l=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(33),f=l(c),p=n(30),h=n(55),v=l(h),g=n(81),m=l(g),y=n(2063),b=l(y);r.propTypes={className:u.PropTypes.string,children:u.PropTypes.node,isSpinning:u.PropTypes.bool,spinnerSize:u.PropTypes.oneOf(p.sizes.all)},r.defaultProps={isSpinning:!1,spinnerSize:p.sizes.SMALL},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(19).default,u=n(11).default,d=n(93).default,c=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=c(f),h=n(4),v=c(h),g=n(33),m=c(g),y=n(24),b=n(251),P=n(2070),w=c(P),S=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"onChange",decorators:[y.autobind],value:function(e){this.props.onChange(e.target.value)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.errorClassName,r=e.disabledClassName,a=e.isDisabled,i=e.size,s=e.name,c=e.value,f=e.values,h=e.hasError,g=l(e,["className","errorClassName","disabledClassName","isDisabled","size","name","value","values","hasError"]);
return{$$typeof:o,type:"div",key:null,ref:null,props:{children:v.default.createElement("select",u({},g,{disabled:a,className:w.default.select,id:s,name:s,value:c,onChange:this.onChange}),f.map(function(e){if(p.default.isString(e))return{$$typeof:o,type:"option",key:e,ref:null,props:{children:e,value:e},_owner:null};var t=p.default.keys(e),n=d(t,1),r=n[0];return{$$typeof:o,type:"option",key:r,ref:null,props:{children:e[r],value:r},_owner:null}})),className:(0,m.default)(t,w.default[i],a&&r,h&&n)},
_owner:null}}}]),t}(h.Component);S.defaultProps={className:w.default.input,errorClassName:w.default.hasError,disabledClassName:w.default.isDisabled,isDisabled:!1,size:b.LARGE,hasError:!1},S.propTypes={className:h.PropTypes.string,errorClassName:h.PropTypes.string,disabledClassName:h.PropTypes.string,isDisabled:h.PropTypes.bool,size:h.PropTypes.oneOf([b.SMALL,b.LARGE]),name:h.PropTypes.string.isRequired,value:h.PropTypes.oneOfType([h.PropTypes.string,h.PropTypes.number]).isRequired,values:h.PropTypes.oneOfType([h.PropTypes.arrayOf(h.PropTypes.string),h.PropTypes.arrayOf(h.PropTypes.object)]),
hasError:h.PropTypes.bool,onChange:h.PropTypes.func.isRequired},t.default=S,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(11).default,l=n(10).default,u=n(7).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=d(c),p=n(14),h=n(5),v=d(h),g=n(24),m=n(31),y=d(m),b=n(30),P=n(81),w=d(P),S=n(726),_=d(S),T=n(148),I=d(T),M=n(105),C=d(M),x=n(113),E=d(x),k=n(82),D=d(k),A=n(112),O=d(A),R=n(179),L=d(R),N=n(2081),j=d(N),U=function(e){
function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isAccordGiven:!1}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,y.default)(this,e,t)}},{key:"onCancel",decorators:[g.autobind],value:function(){var e=(0,p.resolve)("metrics");e.trackClick(o({},this.props.metricsProperties,{page:this.props.metricsPage,action:"cancel"})),this.props.onCancel()}},{key:"onAccordChange",decorators:[g.autobind],value:function(e){this.setState({
isAccordGiven:e.target.checked})}},{key:"render",value:function(){var e=this.props,t=e.isOpen,n=e.metricsPage,r=e.metricsProperties,a=e.kind,i=e.title,s=e.message,d=e.accordMessage,c=e.confirmLabel,p=e.cancelLabel,h=e.hideCancelButton,g=e.onConfirm,m=!!d,y=m&&!this.state.isAccordGiven;return{$$typeof:u,type:I.default,key:null,ref:null,props:l(I.default.defaultProps,{children:{$$typeof:u,type:C.default,key:null,ref:null,props:l(C.default.defaultProps,{children:[{$$typeof:u,type:E.default,key:null,
ref:null,props:l(E.default.defaultProps,{children:i}),_owner:null},{$$typeof:u,type:D.default,key:null,ref:null,props:l(D.default.defaultProps,{children:[s,m&&{$$typeof:u,type:"label",key:null,ref:null,props:{children:[{$$typeof:u,type:"input",key:null,ref:null,props:{type:"checkbox",className:j.default.accordInput,checked:this.state.isAccordGiven,onChange:this.onAccordChange},_owner:null},d],className:j.default.accordLabel},_owner:null}],className:j.default.confirmBody}),_owner:null},{$$typeof:u,
type:O.default,key:null,ref:null,props:l(O.default.defaultProps,{children:{$$typeof:u,type:L.default,key:null,ref:null,props:l(L.default.defaultProps,{children:[!h&&{$$typeof:u,type:w.default,key:null,ref:null,props:l(w.default.defaultProps,{children:p||(0,v.default)("Cancel"),className:j.default.cancelButton,kind:b.kinds.DEFAULT,onPress:this.onCancel}),_owner:null},f.default.createElement(_.default,o({},r,{page:n,action:"confirm"}),{$$typeof:u,type:w.default,key:null,ref:null,props:l(w.default.defaultProps,{
children:c||(0,v.default)("OK"),className:j.default.confirmButton,"data-autofocus":!0,kind:a,isDisabled:y,onPress:g}),_owner:null})]}),_owner:null}}),_owner:null}],onModalClose:this.onCancel}),_owner:null},className:j.default.confirmModal,size:b.sizes.SMALL,isOpen:t,metricsPage:n,metricsProperties:r,onModalClose:this.onCancel}),_owner:null}}}]),t}(c.Component);U.propTypes={className:c.PropTypes.string,isOpen:c.PropTypes.bool.isRequired,metricsPage:c.PropTypes.string.isRequired,metricsProperties:c.PropTypes.object,
kind:c.PropTypes.oneOf(b.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.isRequired},U.defaultProps={kind:b.kinds.PRIMARY},t.default=U,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(11).default,l=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(21),f=n(15),p=n(24),h=n(142),v=l(h),g=n(91),m=n(1745),y=l(m),b=(0,f.createSelector)(v.default,function(e){return{columnAdjustment:e.columnAdjustment}}),P=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"onColumnAdjustmentChange",decorators:[p.autobind],value:function(e){this.props.saveSettings({name:"experienceSettings",settings:{columnAdjustment:e
}})}},{key:"render",value:function(){return d.default.createElement(y.default,o({onColumnAdjustmentChange:this.onColumnAdjustmentChange},this.props))}}]),t}(u.Component);P.propTypes={saveSettings:u.PropTypes.func.isRequired},t.default=(0,c.connect)(function(e){return b},{saveSettings:g.saveSettings})(P),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),(0,d.default)(),(0,f.default)(),function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];
return{server:e,provider:t,metadataKey:n.key,parentKey:n.parentKey,title:n.title,parentTitle:n.parentTitle,index:n.index,parentIndex:n.parentIndex,originallyAvailableAt:n.originallyAvailableAt}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(67),l=a(o),u=n(73),d=a(u),c=n(48),f=a(c),p=n(466),h=a(p);t.default=(0,i.connect)(r)(h.default),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.server,n=e.provider,r=e.metadataKey,s=e.title,o=a(e,["server","provider","metadataKey","title"]);
if(!s)return null;var u=(0,d.default)(t,n,r);return u?l.default.createElement(g.default,i({title:s,to:u},o),s):l.default.createElement("span",o,s)}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(153),d=s(u),c=n(75),f=s(c),p=n(74),h=s(p),v=n(34),g=s(v);r.propTypes={server:f.default,provider:h.default,metadataKey:o.PropTypes.string,title:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){
return u.default.createElement(m.default,s({title:(0,c.default)("There was an unexpected error"),description:(0,c.default)("Please visit our forums if you continue to experience problems")},e),{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:(0,c.default)("Go to Forums"),to:f.FORUMS_URL,target:"_blank",kind:p.kinds.PRIMARY}),_owner:null})}var a=n(10).default,i=n(7).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(398),p=n(30),h=n(34),v=o(h),g=n(150),m=o(g);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className;return{$$typeof:a,type:"div",key:null,ref:null,props:{className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(2168)),l=i(o);r.propTypes={className:s.PropTypes.string},r.defaultProps={className:l.default.divider},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){try{e.focus()}catch(t){}}function a(){var e=document.activeElement;
e&&e.blur()}function i(e){b=document.activeElement,P=e,a()}function s(e){(0,g.default)(P,"Call `startScopedFocus(element)` before `scopeTabEvent`");var t=(0,y.default)(P);if(t.length){e.preventDefault();var n=document.activeElement,a=n?t.indexOf(n):-1,i=t.length-1,s=void 0;a===-1?s=e.shiftKey?i:0:(s=e.shiftKey?a-1:a+1,s<0?s=i:s>i&&(s=0)),r(t[s])}}function o(){(0,g.default)(P,"Call `startScopedFocus(element)` before `scopeAutoFocus`");var e=(0,y.default)(P),t=f.default.find(e,function(e){return h.default.parseBoolean(e.getAttribute("data-autofocus"));
});t&&r(t)}function l(){P=null}function u(){b&&(r(b),b=null)}var d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.resetFocus=a,t.startScopedFocus=i,t.scopeTabEvent=s,t.scopeAutoFocus=o,t.resetScopedFocus=l,t.restorePreviousFocus=u;var c=n(3),f=d(c),p=n(49),h=d(p),v=n(41),g=d(v),m=n(1932),y=d(m),b=void 0,P=void 0},function(e,t,n){"use strict";function r(e,t){if("mixed"===e)return[];switch(t){case Y.default.PRE_PLAY:switch(e){case"season":return[d.default,T.default];case"episode":return[d.default,k.default];
case"actor":return[U.default,z.default];case"musicVideo":case"liveMusicVideo":case"lyricMusicVideo":return[l.default]}break;case Y.default.CONTINUE_WATCHING:switch(e){case"movie":return[d.default,A.default,g.default];case"clip":return[d.default,A.default];case"episode":return[h.default,A.default,x.default]}break;case Y.default.SEARCH:switch(e){case"artist":return[d.default,P.default];case"photo":return[l.default,R.default];case"photoAlbum":return[d.default,R.default];case"clip":return[d.default,R.default];
case"playlist":return[d.default,y.default];case"actor":return[W.default];case"genre":return[W.default];case"director":return[W.default]}}switch(e){case"movie":return[d.default,g.default];case"show":return[d.default,S.default];case"season":return[f.default,d.default];case"episode":return[h.default,d.default,M.default];case"artist":return[d.default];case"album":return[f.default,d.default];case"track":return[h.default,l.default];case"photo":return[l.default];case"photoAlbum":return[d.default];case"clip":
return[d.default];case"musicVideo":case"liveMusicVideo":case"lyricMusicVideo":return[h.default,l.default]}return[l.default]}function a(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],a=r(e,t);return n.isSearch&&(a.push(B.default),n.isSearchAll&&a.push(H.default)),s.providerIdentifiers.EPG_IDENTIFIER.test(n.providerEntityID)&&("movie"!==e&&"episode"!==e&&"mixed"!==e||a.push(N.default)),a}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(84),o=n(465),l=i(o),u=n(1756),d=i(u),c=n(741),f=i(c),p=n(464),h=i(p),v=n(467),g=i(v),m=n(748),y=i(m),b=n(744),P=i(b),w=n(749),S=i(w),_=n(747),T=i(_),I=n(1760),M=i(I),C=n(273),x=i(C),E=n(1754),k=i(E),D=n(1758),A=i(D),O=n(745),R=i(O),L=n(743),N=i(L),j=n(1746),U=i(j),$=n(1747),z=i($),F=n(774),B=i(F),V=n(1898),H=i(V),q=n(775),W=i(q),G=n(114),Y=i(G);
e.exports=t.default},function(e,t,n){e.exports={"default":n(1962),__esModule:!0}},function(e,t,n){var r=n(793),a=n(491);e.exports=function(e){return r(a(e))}},,,function(e,t,n){function r(e){return i(e)&&a(e)}var a=n(519),i=n(836);e.exports=r},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){"use strict";var r=n(365),a=n(525),i=n(529),s=n(874),o=n(876),l=n(39),u={},d=null,c=function(e,t){e&&(a.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e));
},f=function(e){return c(e,!0)},p=function(e){return c(e,!1)},h={injection:{injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?l(!1):void 0;var a=u[t]||(u[t]={});a[e._rootNodeID]=n;var i=r.registrationNameModules[t];i&&i.didPutListener&&i.didPutListener(e,t,n)},getListener:function(e,t){var n=u[t];return n&&n[e._rootNodeID]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);
var a=u[t];a&&delete a[e._rootNodeID]},deleteAllListeners:function(e){for(var t in u)if(u[t][e._rootNodeID]){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete u[t][e._rootNodeID]}},extractEvents:function(e,t,n,a){for(var i,o=r.plugins,l=0;l<o.length;l++){var u=o[l];if(u){var d=u.extractEvents(e,t,n,a);d&&(i=s(i,d))}}return i},enqueueEvents:function(e){e&&(d=s(d,e))},processEventQueue:function(e){var t=d;d=null,e?o(t,f):o(t,p),d?l(!1):void 0,i.rethrowCaughtError();
},__purge:function(){u={}},__getListenerBank:function(){return u}};e.exports=h},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return b(e,r)}function a(e,t,n){var a=t?y.bubbled:y.captured,i=r(e,n,a);i&&(n._dispatchListeners=g(n._dispatchListeners,i),n._dispatchInstances=g(n._dispatchInstances,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&v.traverseTwoPhase(e._targetInst,a,e)}function s(e){if(e&&e.dispatchConfig.phasedRegistrationNames){
var t=e._targetInst,n=t?v.getParentInstance(t):null;v.traverseTwoPhase(n,a,e)}}function o(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,a=b(e,r);a&&(n._dispatchListeners=g(n._dispatchListeners,a),n._dispatchInstances=g(n._dispatchInstances,e))}}function l(e){e&&e.dispatchConfig.registrationName&&o(e._targetInst,null,e)}function u(e){m(e,i)}function d(e){m(e,s)}function c(e,t,n,r){v.traverseEnterLeave(n,r,o,e,t)}function f(e){m(e,l)}var p=n(130),h=n(285),v=n(525),g=n(874),m=n(876),y=(n(52),
p.PropagationPhases),b=h.getListener,P={accumulateTwoPhaseDispatches:u,accumulateTwoPhaseDispatchesSkipTarget:d,accumulateDirectDispatches:f,accumulateEnterLeaveDispatches:c};e.exports=P},function(e,t,n){"use strict";function r(e,t,n,r){return a.call(this,e,t,n,r)}var a=n(131),i=n(535),s={view:function(e){if(e.view)return e.view;var t=i(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}};a.augmentClass(r,s),
e.exports=r},function(e,t,n){var r,a;/**!
	 * Sortable
	 * @author	RubaXa   <trash@rubaxa.org>
	 * @license MIT
	 */
!function(i){"use strict";r=i,a="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==a&&(e.exports=a))}(function(){"use strict";function e(e,t){this.el=e,this.options=t=g({},t),e[O]=this;var r={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 a in r)!(a in t)&&(t[a]=r[a]);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]));i(e,"mousedown",this._onTapStart),i(e,"touchstart",this._onTapStart),i(e,"dragover",this),i(e,"dragenter",this),B.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&&P.insertBefore(b,m),b.state=e)}function n(e,t){var n=F.call(arguments,2);return t.bind?t.bind.apply(t,[e].concat(n)):function(){return t.apply(e,n.concat(F.call(arguments)))}}function r(e,t,n){if(e){n=n||L,t=t.split(".");var r=t.shift().toUpperCase(),a=new RegExp("\\s("+t.join("|")+")\\s","g");do if(">*"===r&&e.parentNode===n||(""===r||e.nodeName.toUpperCase()==r)&&(!t.length||((" "+e.className+" ").match(a)||[]).length==t.length))return e;while(e!==n&&(e=e.parentNode))}return null}function a(e){
e.dataTransfer.dropEffect="move",e.preventDefault()}function i(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 r=(" "+e.className+" ").replace(A," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(A," ")}}function l(e,t,n){var r=e&&e.style;if(r){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 r||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function u(e,t,n){if(e){var r=e.getElementsByTagName(t),a=0,i=r.length;if(n)for(;a<i;a++)n(r[a],a);return r}return[]}function d(e){e.draggable=!1}function c(){U=!1}function f(e,t){var n=e.lastElementChild,r=n.getBoundingClientRect();return t.clientY-(r.top+r.height)>5&&n}function p(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function h(e){for(var t=0;e&&(e=e.previousElementSibling);)"TEMPLATE"!==e.nodeName.toUpperCase()&&t++;
return t}function v(e,t){var n,r;return function(){void 0===n&&(n=arguments,r=this,setTimeout(function(){1===n.length?e.call(r,n[0]):e.apply(r,n),n=void 0},t))}}function g(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var m,y,b,P,w,S,_,T,I,M,C,x,E,k,D={},A=/\s+/g,O="Sortable"+(new Date).getTime(),R=window,L=R.document,N=R.parseInt,j=!!("draggable"in L.createElement("div")),U=!1,$=function(e,t,n,r,a,i,s){var o=L.createEvent("Event"),l=(e||t[O]).options,u="on"+n.charAt(0).toUpperCase()+n.substr(1);
o.initEvent(n,!0,!0),o.item=r||t,o.from=a||t,o.clone=b,o.oldIndex=i,o.newIndex=s,l[u]&&l[u].call(e,o),t.dispatchEvent(o)},z=Math.abs,F=[].slice,B=[],V=v(function(e,t,n){if(n&&t.scroll){var r,a,i,s,o=t.scrollSensitivity,l=t.scrollSpeed,u=e.clientX,d=e.clientY,c=window.innerWidth,f=window.innerHeight;if(_!==n&&(S=t.scroll,_=n,S===!0)){S=n;do if(S.offsetWidth<S.scrollWidth||S.offsetHeight<S.scrollHeight)break;while(S=S.parentNode)}S&&(r=S,a=S.getBoundingClientRect(),i=(z(a.right-u)<=o)-(z(a.left-u)<=o),
s=(z(a.bottom-d)<=o)-(z(a.top-d)<=o)),i||s||(i=(c-u<=o)-(u<=o),s=(f-d<=o)-(d<=o),(i||s)&&(r=R)),D.vx===i&&D.vy===s&&D.el===r||(D.el=r,D.vx=i,D.vy=s,clearInterval(D.pid),r&&(D.pid=setInterval(function(){r===R?R.scrollTo(R.pageXOffset+i*l,R.pageYOffset+s*l):(s&&(r.scrollTop+=s*l),i&&(r.scrollLeft+=i*l))},24)))}},30);return e.prototype={constructor:e,_onTapStart:function(e){var t=this,n=this.el,a=this.options,i=e.type,s=e.touches&&e.touches[0],o=(s||e).target,l=o,u=a.filter;if(!("mousedown"===i&&0!==e.button||a.disabled)&&(o=r(o,a.draggable,n))){
if(M=h(o),"function"==typeof u){if(u.call(this,e,o,this))return $(t,l,"filter",o,n,M),void e.preventDefault()}else if(u&&(u=u.split(",").some(function(e){if(e=r(l,e.trim(),n))return $(t,e,"filter",o,n,M),!0})))return void e.preventDefault();a.handle&&!r(l,a.handle,n)||this._prepareDragStart(e,s,o)}},_prepareDragStart:function(e,t,n){var r,a=this,s=a.el,o=a.options,l=s.ownerDocument;n&&!m&&n.parentNode===s&&(E=e,P=s,m=n,w=m.nextSibling,x=o.group,r=function(){a._disableDelayedDrag(),m.draggable=!0,
o.ignore.split(",").forEach(function(e){u(m,e.trim(),d)}),a._triggerDragStart(t)},i(l,"mouseup",a._onDrop),i(l,"touchend",a._onDrop),i(l,"touchcancel",a._onDrop),o.delay?(i(l,"mousemove",a._disableDelayedDrag),i(l,"touchmove",a._disableDelayedDrag),a._dragStartTimer=setTimeout(r,o.delay)):r())},_disableDelayedDrag:function(){var e=this.el.ownerDocument;clearTimeout(this._dragStartTimer),s(e,"mousemove",this._disableDelayedDrag),s(e,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(e){
e?(E={target:m,clientX:e.clientX,clientY:e.clientY},this._onDragStart(E,"touch")):j?(i(m,"dragend",this),i(P,"dragstart",this._onDragStart)):this._onDragStart(E,!0);try{L.selection?L.selection.empty():window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(){P&&m&&(o(m,this.options.ghostClass,!0),e.active=this,$(this,P,"start",m,P,M))},_emulateDragOver:function(){if(k){l(y,"display","none");var e=L.elementFromPoint(k.clientX,k.clientY),t=e,n=" "+this.options.group.name,r=B.length;
if(t)do{if(t[O]&&t[O].options.groups.indexOf(n)>-1){for(;r--;)B[r]({clientX:k.clientX,clientY:k.clientY,target:e,rootEl:t});break}e=t}while(t=t.parentNode);l(y,"display","")}},_onTouchMove:function(e){if(E){var t=e.touches?e.touches[0]:e,n=t.clientX-E.clientX,r=t.clientY-E.clientY,a=e.touches?"translate3d("+n+"px,"+r+"px,0)":"translate("+n+"px,"+r+"px)";k=t,l(y,"webkitTransform",a),l(y,"mozTransform",a),l(y,"msTransform",a),l(y,"transform",a),e.preventDefault()}},_onDragStart:function(e,t){var n=e.dataTransfer,r=this.options;
if(this._offUpEvents(),"clone"==x.pull&&(b=m.cloneNode(!0),l(b,"display","none"),P.insertBefore(b,m)),t){var a,s=m.getBoundingClientRect(),o=l(m);y=m.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"),P.appendChild(y),a=y.getBoundingClientRect(),l(y,"width",2*s.width-a.width),l(y,"height",2*s.height-a.height),"touch"===t?(i(L,"touchmove",this._onTouchMove),
i(L,"touchend",this._onDrop),i(L,"touchcancel",this._onDrop)):(i(L,"mousemove",this._onTouchMove),i(L,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,150)}else n&&(n.effectAllowed="move",r.setData&&r.setData.call(this,n,m)),i(L,"drop",this);setTimeout(this._dragStarted,0)},_onDragOver:function(e){var n,a,i,s=this.el,o=this.options,u=o.group,d=u.put,p=x===u,h=o.sort;if(void 0!==e.preventDefault&&(e.preventDefault(),!o.dragoverBubble&&e.stopPropagation()),x&&!o.disabled&&(p?h||(i=!P.contains(m)):x.pull&&d&&(x.name===u.name||d.indexOf&&~d.indexOf(x.name)))&&(void 0===e.rootEl||e.rootEl===this.el)){
if(V(e,o,this.el),U)return;if(n=r(e.target,o.draggable,s),a=m.getBoundingClientRect(),i)return t(!0),void(b||w?P.insertBefore(m,b||w):h||P.appendChild(m));if(0===s.children.length||s.children[0]===y||s===e.target&&(n=f(s,e))){if(n){if(n.animated)return;g=n.getBoundingClientRect()}t(p),s.appendChild(m),this._animate(a,m),n&&this._animate(g,n)}else if(n&&!n.animated&&n!==m&&void 0!==n.parentNode[O]){T!==n&&(T=n,I=l(n));var v,g=n.getBoundingClientRect(),S=g.right-g.left,_=g.bottom-g.top,M=/left|right|inline/.test(I.cssFloat+I.display),C=n.offsetWidth>m.offsetWidth,E=n.offsetHeight>m.offsetHeight,k=(M?(e.clientX-g.left)/S:(e.clientY-g.top)/_)>.5,D=n.nextElementSibling;
U=!0,setTimeout(c,30),t(p),v=M?n.previousElementSibling===m&&!C||k&&C:D!==m&&!E||k&&E,v&&!D?s.appendChild(m):n.parentNode.insertBefore(m,v?D:n),this._animate(a,m),this._animate(g,n)}}},_animate:function(e,t){var n=this.options.animation;if(n){var r=t.getBoundingClientRect();l(t,"transition","none"),l(t,"transform","translate3d("+(e.left-r.left)+"px,"+(e.top-r.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,r=this.options;clearInterval(this._loopId),clearInterval(D.pid),clearTimeout(this.dragStartTimer),s(L,"drop",this),s(L,"mousemove",this._onTouchMove),s(n,"dragstart",this._onDragStart),this._offUpEvents(),t&&(t.preventDefault(),!r.dropBubble&&t.stopPropagation(),
y&&y.parentNode.removeChild(y),m&&(s(m,"dragend",this),d(m),o(m,this.options.ghostClass,!1),P!==m.parentNode?(C=h(m),$(null,m.parentNode,"sort",m,P,M,C),$(this,P,"sort",m,P,M,C),$(null,m.parentNode,"add",m,P,M,C),$(this,P,"remove",m,P,M,C)):(b&&b.parentNode.removeChild(b),m.nextSibling!==w&&(C=h(m),$(this,P,"update",m,P,M,C),$(this,P,"sort",m,P,M,C))),e.active&&$(this,P,"end",m,P,M,C)),P=m=y=w=b=S=_=E=k=T=I=x=e.active=null,this.save())},handleEvent:function(e){var t=e.type;"dragover"===t||"dragenter"===t?m&&(this._onDragOver(e),
a(e)):"drop"!==t&&"dragend"!==t||this._onDrop(e)},toArray:function(){for(var e,t=[],n=this.el.children,a=0,i=n.length,s=this.options;a<i;a++)e=n[a],r(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,a){var i=n.children[a];r(i,this.options.draggable,n)&&(t[e]=i)},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 r(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[O]=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")}),B.splice(B.indexOf(this._onDragOver),1),this._onDrop(),this.el=e=null}},e.utils={on:i,off:s,css:l,find:u,bind:n,is:function(e,t){
return!!r(e,t,e)},extend:g,throttle:v,closest:r,toggleClass:o,index:h},e.version="1.2.0",e.create=function(t,n){return new e(t,n)},e})},function(e,t,n){!function(t,r){e.exports=r(n(3),n(47))}(this,function(e,t){function n(n){return{underscore:e,backbone:t}[n]}var r=function(e){function t(e){var n=t.cache[e];if(!n){var r={};n=t.cache[e]={id:e,exports:r},t.modules[e].call(r,n,r)}return n.exports}return t.cache=[],t.modules=[function(e,r){function a(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),d(this._paginated,this),c.call(this,this._filtered,h),c.call(this,this._sorted,g),c.call(this,this._paginated,y),this.initialize(t)}var i=n("underscore"),s=n("backbone"),o=t(2),l=t(5),u=t(4),d=t(1),c=t(7),f={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"],h=["filtered:add","filtered:remove","filtered:reset"],v=["setSort","reverseSort","removeSort"],g=["sorted:add","sorted:remove"],m=["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"];
i.each(p,function(e){f[e]=function(){var t=o.prototype[e].apply(this._filtered,arguments);return t===this._filtered?this:t}}),i.each(m,function(e){f[e]=function(){var t=u.prototype[e].apply(this._paginated,arguments);return t===this._paginated?this:t}}),i.each(v,function(e){f[e]=function(){var t=l.prototype[e].apply(this._sorted,arguments);return t===this._sorted?this:t}}),i.each(b,function(e){f[e]=function(){throw new Error("Backbone.Obscura: Unsupported method: "+e+"called on read-only proxy")};
}),i.extend(a.prototype,f,s.Events),a=s.Collection.extend(a.prototype),a.FilteredCollection=o,a.SortedCollection=l,a.PaginatedCollection=u,e.exports=a},function(e,t){function r(e,t){function n(){t.length=e.length}function r(n){var r=a.toArray(arguments),i="change"===n||"change:"===n.slice(0,7);"reset"===n&&(t.models=e.models),a.contains(o,n)?(a.contains(["add","remove","destroy"],n)?r[2]=t:a.contains(["reset","sort"],n)&&(r[1]=t),t.trigger.apply(this,r)):i&&t.contains(r[1])&&t.trigger.apply(this,r);
}var l={};return a.each(a.functions(i.Collection.prototype),function(t){a.contains(s,t)||(l[t]=function(){return e[t].apply(e,arguments)})}),a.extend(t,i.Events,l),t.listenTo(e,"all",n),t.listenTo(e,"all",r),t.models=e.models,n(),t}var a=n("underscore"),i=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=r},function(e,r){function a(){this._filterResultCache={}}function i(e){for(var t in this._filterResultCache)this._filterResultCache.hasOwnProperty(t)&&delete this._filterResultCache[t][e]}function s(e,t){this._filters[e]&&i.call(this,e),this._filters[e]=t,this.trigger("filtered:add",e)}function o(e){delete this._filters[e],i.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(m.bind(l,this))),e.reset?this._collection.reset(t):this._collection.set(t),this.length=this._collection.length}function d(){u.call(this,{reset:!0})}function c(){var e=!(!this._superset||!this._superset.comparator);u.call(this,{reset:e})}function f(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,r=t-1;r>=0;r-=1)if(this.contains(this.superset().at(r))){n=this.indexOf(this.superset().at(r))+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 h(e,t,n){"change:"===e.slice(0,7)&&p.call(this,arguments[1]);
}function v(e){this.contains(e)&&this._collection.remove(e),this.length=this._collection.length}function g(e){this._superset=e,this._collection=new y.Collection(e.toArray()),b(this._collection,this),this.resetFilters(),this.listenTo(this._superset,"reset",d),this.listenTo(this._superset,"sort",c),this.listenTo(this._superset,"add change",f),this.listenTo(this._superset,"remove",v),this.listenTo(this._superset,"all",h)}var m=n("underscore"),y=n("backbone"),b=t(1),P=t(3),w={defaultFilterName:"__default",
filterBy:function(e,t){return t||(t=e,e=this.defaultFilterName),s.call(this,e,P(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={},a.call(this),this.trigger("filtered:reset"),u.call(this),this},superset:function(){return this._superset},refilter:function(e){return"object"==typeof e&&e.cid?f.call(this,e):(a.call(this),u.call(this)),this},getFilters:function(){return m.keys(this._filters);
},hasFilter:function(e){return m.contains(this.getFilters(),e)},destroy:function(){this.stopListening(),this._collection.reset([]),this._superset=this._collection,this.length=0,this.trigger("filtered:destroy")}};m.extend(g.prototype,w,y.Events),e.exports=g},function(e,t){function r(e,t){return function(n){return n.get(e)===t}}function a(e,t){return function(n){return t(n.get(e))}}function i(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)?a(t,n):r(t,n)}),s=function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0};return i(s,t)}function o(e,t){return l.isFunction(e)?i(e,t):l.isObject(e)?s(e):void 0}var l=n("underscore");e.exports=o},function(e,r){function a(){var e=this.getPage()*this.getPerPage(),t=e+this.getPerPage();return[e,t]}function i(){var e=a.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,r=this._totalPages!==n;
if(this._totalPages=n,r&&this.trigger("paginated:change:numPages",{numPages:n}),this.getPage()>=n)return this.setPage(n-1),!0}function o(){s.call(this)||i.call(this)}function l(e,t){for(var n=c.max([e.length,t.length]),r=0,a=0;r<n;r+=1,a+=1)if(e[r]!==t[a])if(t[r-1]===e[r])a-=1;else{if(t[r+1]!==e[r])return e[r];a+=1}}function u(e,t,n){if(!s.call(this)){var r=a.call(this),i=r[0],o=r[1],u=l(this.superset().slice(i,o),this._collection.toArray()),d=l(this._collection.toArray(),this.superset().slice(i,o));
d&&this._collection.remove(d),u&&this._collection.add(u,{at:this.superset().indexOf(u)-i})}}function d(e,t){this._superset=e,this._collection=new f.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 c=n("underscore"),f=n("backbone"),p=t(1),h={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,i.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");
}};c.extend(d.prototype,h,f.Events),e.exports=d},function(e,r){function a(e){return c.isFunction(e)?e:function(t){return t.get(e)}}function i(e){return this._comparator?this._reverse?h(this._collection.toArray(),e,a(this._comparator)):c.sortedIndex(this._collection.toArray(),e,a(this._comparator)):this._superset.indexOf(e)}function s(e){var t=i.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)!==i.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 d(e){this._superset=e,this._reverse=!1,this._comparator=null,this._collection=new f.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 c=n("underscore"),f=n("backbone"),p=t(1),h=t(6),v={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");
}};c.extend(d.prototype,v,f.Events),e.exports=d},function(e,t){function r(e){return i.isFunction(e)?e:function(t){return t[e]}}function a(e,t,n,a){n=null==n?i.identity:r(n);for(var s=n.call(a,t),o=0,l=e.length;o<l;){var u=o+l>>>1;n.call(a,e[u])<s?l=u:o=u+1}return o}var i=n("underscore");e.exports=a},function(e,t){function r(e,t){a.each(t,function(t){this.listenTo(e,t,function(){var e=a.toArray(arguments);e.unshift(t),this.trigger.apply(this,e)})},this)}var a=n("underscore");e.exports=r}],t(0)}();return r;
})},,function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(94),i=r(a),s=new i.default({"interface":["getLanguages","load","t"]});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(94),i=r(a),s=new i.default({"interface":["get","set","remove","clear"]});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(47),u=r(l),d=n(141),c=r(d),f={hasPendingPopulate:function(){return!!this.populatePromise&&"pending"===this.populatePromise.state()},populate:function(){return this.populatePromise?this.populatePromise:this.fetch.apply(this,arguments)},fetch:function(){var e,t=o.default.Deferred();if(this.hasPendingPopulate())return this.populatePromise;e=this._fetch?this._fetch.apply(this,arguments):this instanceof u.default.Collection?u.default.Collection.prototype.fetch.apply(this,arguments):u.default.Model.prototype.fetch.apply(this,arguments);
var n=t.promise();return n.rid=e.rid,this.populatePromise=n,e.done(i.default.bind(function(e){this.populatePromise=o.default.Deferred().resolveWith(this,[this]).promise(),t.resolveWith(this,[this,e])},this)),e.fail(i.default.bind(function(e){this.populatePromise=null,t.rejectWith(this,[this,e])},this)),n},abortPendingPopulate:function(){return this.hasPendingPopulate()&&c.default.abort(this.populatePromise.rid),this.populatePromise},resetPopulatePromise:function(e){return this.hasPendingPopulate()||(this.populatePromise=e),
this.populatePromise}};t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(79).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(49),l=a(o),u=n(90),d=a(u),c=n(136),f=a(c),p=n(20),h=a(p),v=n(22),g=a(v),m=n(57),y=a(m),b=n(1007),P=a(b),w=g.default.extend({name:"PlayQueueItemModel",context:["server","identifier","mediaTagPrefix","mediaTagVersion"],idAttribute:"playQueueItemID",cache:new f.default,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.playQueueItemID);
},sessionAttrs:{isPlayQueueItem:h.default.boolean},syncedAttrs:{playQueueItemID:h.default.integer,queueIndex:h.default.integer,key:h.default.string,ratingKey:h.default.string,type:h.default.string,advertisement:h.default.boolean,allowSkipAfter:h.default.integer,librarySectionID:h.default.string,syncItemId:h.default.integer,generatorID:h.default.integer,generatorType:h.default.integer,clientIdentifier:h.default.string,target:h.default.string},syncedRelations:{metadataItem:{relationClass:y.default,
deferred:!0},lyricsStreams:{relationClass:P.default,deferred:!0}},defaults:{isPlayQueueItem:!0},augmentResponse:function(e){var t=s.default.pick(e,r(this.syncedAttrs));t.metadataItem=e;var n=s.default.first(l.default.parseArray(e.Media));if(n){var a=s.default.first(l.default.parseArray(n.Part));if(a){var i=l.default.parseArray(a.Stream);i&&!function(){var e=d.default.get("lyrics");t.lyricsStreams=s.default.filter(i,function(t){return l.default.parseInteger(t.streamType)===e.id})}()}}return t}});t.default=w,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(296),u=r(l),d=o.default.extend({name:"FilterModel",context:["server","section","type","standalone"],idAttribute:"filter",rootPropertyName:"Directory",defaults:{advanced:!1},syncedAttrs:{filter:i.default.string,filterType:i.default.string,type:i.default.string,key:i.default.string,title:i.default.string,advanced:i.default.boolean},syncedRelations:{
options:{relationClass:u.default}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(28),o=r(s),l=n(981),u=r(l),d=o.default.extend({name:"FilterOptionCollection",context:["server","section","type","standalone"],model:u.default,url:function c(){var e=i.default.result(this.section,"url"),c=e+"/"+this.parent.id;return this.type?c+="?type="+this.type:this.standalone||(c+="?"+this.getUrlParams()),c},
getUrlParams:function(){var e=this,t={},n=[],r=this.section.get("currentType"),a=this.section.get("currentFilters");return r&&(t.type=r.id),i.default.each(a,function(n){n.key!==e.parent.id&&n.values.length&&(t[n.key]=n.values.join(","))}),i.default.each(t,function(e,t){"unviewedLeafCount"===t?n.push(t+">="+e):n.push(t+"="+e)}),n.join("&")},augmentResponse:function(e){return e.Directory&&!i.default.isArray(e.Directory)&&(e.Directory=[e.Directory]),e.Directory=i.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=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(580),o=r(s),l=i.default.extend({name:"MediaSettingCollection",context:["server"],model:o.default,getSaveParams:function(){return this.reduce(function(e,t){return e[t.id]=t.get("value"),e},{});
}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(11).default,a=n(19).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(49),o=i(s),l=n(72),u=n(66),d=i(u),c=n(20),f=i(c),p=n(62),h=i(p),v=n(574),g=i(v),m=n(22),y=i(m),b=n(390),P=i(b),w=n(1039),S=i(w),_=n(297),T=i(_),I=y.default.extend({name:"MediaSubscriptionModel",context:["server"],entityType:l.MEDIA_SUBSCRIPTION,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];
return(0,d.default)(this.entityType,e.key||this.cid,this.server.entityID())},idAttribute:"key",rootPropertyName:"MediaSubscription",urlRoot:"/media/subscriptions",mergeStrategy:g.default,syncedAttrs:{key:f.default.string,type:f.default.integer,targetLibrarySectionID:{type:f.default.string,save:!0},targetSectionLocationID:{type:f.default.string,save:!0},title:f.default.string,selected:f.default.boolean,parameters:f.default.string},syncedRelations:{target:{relationClass:S.default,rootPropertyName:"Metadata",
deferred:!0},grabOperations:{relationClass:P.default,rootPropertyName:"MediaGrabOperation",deferred:!0},prefs:{relationClass:T.default,rootPropertyName:"Setting",deferred:!0,save:!0}},augmentResponseText:function(e,t){return t===h.default.xml?o.default.replaceMetadataXMLElementNames(e):e},getSaveParams:function(){var e=y.default.prototype.getSaveParams.apply(this,arguments),t=e.Setting,n=a(e,["Setting"]);return r({prefs:t},n)}});t.default=I,e.exports=t.default},function(e,t,n){"use strict";function r(e){
var t=e.key,n=e.actionSuffix,r=e.getModel,a=(0,s.default)(n||t),i=(0,l.default)(t),o="is"+i+"Populated";return function(e,t,n){var i=r(e,t);i.get(o)||n({type:"FETCH_"+a,payload:t})}}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(648),s=a(i),o=n(200),l=a(o);e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,i.createSelector)(function(e,t){var n=t.metadataListEntityID;return n},o.default,function(e,t){return t[e]})}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=r;var i=n(15),s=n(598),o=a(s);e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),i=n(135),s=r(i),o=(0,a.createSelector)(s.default,function(e){return e.metadataItems});t.default=o,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,l.createSelector)((0,f.default)(),(0,h.default)(),function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=o.default.findWhere(t.features,{
type:d.providerFeatureTypes.CONTENT});if(n&&n.directories)return n.directories.map(function(e){return t.isLibraryProvider&&"/hubs"===e.hubKey?a({isHomeDirectory:!0},e):e});if(t.identifier===u.providerIdentifiers.LIBRARY_PROVIDER_IDENTIFIER){var r=function(){var t=[{hubKey:"/hubs",isHomeDirectory:!0}];return e.forEach(function(e){var n=e.key,r=e.title;t.push({key:"/library/sections/"+n,hubKey:"/hubs/sections/"+n,title:r})}),{v:t}}();if("object"==typeof r)return r.v}return[]})}var a=n(11).default,i=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(3),o=i(s),l=n(15),u=n(84),d=n(158),c=n(395),f=i(c),p=n(100),h=i(p);e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),i=n(135),s=r(i),o=(0,a.createSelector)(s.default,function(e){return e.providers});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){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(35),o=r(s),l=o.default.extend({initialize:function(){this._entries=[]},wrapAll:function(e,t,n){i.default.each(e,function(e){this.wrap(e,t,n)},this)},wrap:function(e,t,n){n[e]=i.default.wrap(n[e],i.default.bind(function(e){var r=i.default.toArray(arguments).slice(1);return t.call(n)?e.apply(n,r):void this.add({fn:e,args:r,context:n})},this))},add:function(e){this._entries.push(e);
},process:function(){i.default.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}});t.default=l,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={NEVER:"never",SAME_NETWORK:"samenetwork",ALWAYS:"always"};n.settings=[{value:n.NEVER,title:"Never"},{value:n.SAME_NETWORK,title:"On same network as server"},{value:n.ALWAYS,title:"Always"}],t.default=n,e.exports=t.default;
},function(e,t,n){"use strict";function r(e){if(e){var t=o[e.code+"-"+e.field]||o[e.code];return t?t():e.message}}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorText=r;var i=n(5),s=a(i),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 r(e){if(null==e)return!1;var t=s.default.unix(e);return(0,s.default)().subtract(1,"day").isSame(t,"day")}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(53),s=a(i);e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var n={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"};t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=l.default.get("video").id,n=(0,d.default)(e,{streamType:t});return s.default.first(n)}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),s=a(i),o=n(90),l=a(o),u=n(119),d=a(u);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(5),u=r(l),d=n(310),c=r(d),f=n(638),p=r(f),h=n(639),v=r(h),g=n(119),m=r(g),y=n(632),b=r(y),P=n(51),w=r(P),S=n(101),_=r(S),T=n(90),I=r(T),M=n(161),C=r(M),x=n(240),E=r(x),k=n(32),D=r(k),A={getMediaDecision:function(e){var t=this.augmentProfile(e);if(D.default.info("[MDE] Augmented profile:",t),
e.media)return this.analyzeMedia(e.media,t,e);var n=e.item,r=n.get("Media");if(!r.length)return{transcodeServer:e.transcodeServer,canPlay:!0,canDirectPlay:!0};if(1===r.length)return this.analyzeMedia(i.default.first(r),t,e);var a=i.default.map(r,function(n){return this.analyzeMedia(n,t,e)},this);return this.getBestDecision(a)},augmentProfile:function(e){var t=e.profile;if(!t)throw new Error("MDE: No player profile provided for "+e.type);var n=o.default.extend(!0,{},t.directPlay),r=o.default.extend(!0,{},t.directStream),a=n.generic;
a&&delete n.generic;var s=e.allowedAC3Containers,l="*"===s;!l&&s&&(s=i.default.isArray(s)?s:[s]);var u=e.allowedEAC3Containers,d="*"===u;!d&&u&&(u=i.default.isArray(u)?u:[u]);var c=e.allowedDCAContainers,f="*"===c;return!f&&c&&(c=i.default.isArray(c)?c:[c]),i.default.each(n,function(t,n){this.mergeGenericOptions(t,a),this.mergeMaxQualityOptions(t,e),(l||s&&i.default.contains(s,n))&&this.addAudioCodec("ac3",t,e),(d||u&&i.default.contains(u,n))&&this.addAudioCodec("eac3",t,e),(f||c&&i.default.contains(c,n))&&this.addAudioCodec("dca",t,e);
var r=w.default.getStreamByType(e.type),o=t[r];if(o){var p=o.codecs;i.default.each(p,function(t,n){this.mergeMaxQualityOptions(t,e,!0),e.videoCodecOptions&&e.videoCodecOptions[n]&&this.mergeVideoCodecOptions(t,e.videoCodecOptions[n])},this)}},this),this.mergeMaxQualityOptions(r,e),e.videoCodecOptions&&e.type===w.default.types.VIDEO&&r.video&&i.default.each(r.video.codecs,function(t,n){e.videoCodecOptions[n]&&this.mergeVideoCodecOptions(t,e.videoCodecOptions[n])},this),{directPlay:n,directStream:r
}},mergeGenericOptions:function(e,t){t&&(i.default.defaults(e,i.default.omit(t,"video","audio")),i.default.each(["audio","video"],function(n){var r=t[n],a=e[n];r&&(a||(a={},e[n]=a),i.default.defaults(a,i.default.omit(r,"codecs")),r.codecs&&i.default.each(r.codecs,function(e,t){i.default.defaults(this.ensureCodecs(t,a),e)},this))},this))},mergeVideoCodecOptions:function(e,t){i.default.each(t,function(t,n){e[n]=t},this)},ensureCodecs:function(e,t){return t.codecs||(t.codecs={}),t.codecs[e]||(t.codecs[e]={}),
t.codecs[e]},mergeMaxQualityOptions:function(e,t,n){var r=[{option:"bitrate",setting:"maxBitrate"},{option:"videoResolution",setting:"maxVideoResolution"}];i.default.each(r,function(r){if("videoResolution"!==r.option||t.type===w.default.types.VIDEO){var a=this.getMaxQualityOption(e,r.option,t);if(null!=a){var i=r.setting,s=w.default.getStreamByType(t.type);e.hasOwnProperty(i)?e[i]=a:e.hasOwnProperty(s)?e[s][i]=a:n||(e[s]={},e[s][i]=a)}}},this)},getMaxQualityOption:function(e,t,n){var r=n.quality||{},a="max"+t.charAt(0).toUpperCase()+t.slice(1),i=r[t],s=this.getPrimaryStreamProperty(e,a,n);
if("videoResolution"===t&&i&&(i=_.default.getResolutionFromSize(i)),"bitrate"===t){var o=n.item.server,l=o.get("maxUploadBitrate");l&&(!i||l<i)&&(i=l)}if(i||s){var u;return u=i&&s?Math.min(i,s):i||s}},addAudioCodec:function(e,t,n){t.audio||(t.audio={}),this.ensureCodecs(e,t.audio)},analyzeMedia:function(e,t,n){D.default.info("[MDE] Starting analysis of",this.getMediaTitle(e)),(0,D.default)("[MDE] Analyzing direct play");var r=this.canDirectPlay(e,t.directPlay,n),a={transcodeServer:n.transcodeServer,
item:n.item,media:e,canDirectPlay:r.result,canDirectPlayFailedCheck:r.failedCheck},s=n.transcoderOptions||{};if(i.default.isFunction(s)&&(s=s(a)),n.type===w.default.types.VIDEO){(0,D.default)("[MDE] Analyzing video direct stream");var o=(0,c.default)(e);if(o){var l=this.canDirectStream(o,t.directStream.video,n,s);a.canDirectStreamVideo=l.result,a.canDirectStreamVideoFailedCheck=l.failedCheck}}if(n.type!==w.default.types.PHOTO){(0,D.default)("[MDE] Analyzing audio direct stream");var u=(0,p.default)(e);
if(u){var l=this.canDirectStream(u,t.directStream.audio,n,s);a.canDirectStreamAudio=l.result,a.canDirectStreamAudioFailedCheck=l.failedCheck}}var d=(0,v.default)(a.media);return d&&((0,D.default)("[MDE] Analyzing subtitles"),i.default.extend(a,this.analyzeSubtitles(d,n))),(0,D.default)("[MDE] Analyzing playability"),i.default.extend(a,this.canPlay(a,n)),i.default.extend(a,this.getEffectiveQuality(e,t.directStream,n)),D.default.group("[MDE] Finished analysis of",this.getMediaTitle(e)),this.getDecisionLogs(a).forEach(function(e){
return D.default.info(e)}),D.default.groupEnd(),a},canDirectPlay:function(e,t,n){if(n.forceDirectPlay)return(0,D.default)("[MDE] Direct play forced"),{result:!0};if(n.allowDirectPlay===!1)return D.default.warn("[MDE] Direct play failed; option is disabled"),{result:!1,failedCheck:"allowDirectPlay"};if(n.type===w.default.types.VIDEO&&!this.canDirectPlayVideo(e,n))return{result:!1,failedCheck:"canDirectPlayVideo"};var r=t[e.container];if(!r)return D.default.warn("[MDE] Direct play failed; unsupported container:",e.container),
{result:!1,failedCheck:"containerProfile"};var a=i.default.keys(r);if(a&&a.length){for(var s=0,o=a.length;s<o;s++){var l=a[s],u=r[l];if("mimeType"===l){if(!n.skipCanPlayTypeTest&&!this.canPlayType(w.default.getElementByType(n.type),u))return D.default.warn("[MDE] Direct play failed; canPlayType test, %s: %s",l,u),{result:!1,failedCheck:"canPlayType"}}else if("video"===l||"audio"===l){var d=I.default.get(l),f=(0,m.default)(e,{streamType:d.id}),h="video"===l?(0,c.default)(e):(0,p.default)(e);if(!h){
D.default.warn("[MDE] No stream selected; will not be able to analyze stream codecs");continue}var v="audio"===l&&h!==f[0];if(v&&!n.allowMultiTrackAudio)return D.default.warn("[MDE] Direct play failed; multi-track audio is required"),{result:!1,failedCheck:"allowMultiTrackAudio"};var g=this.analyzeStream(h,u,n);if(!g.result)return{result:!1,failedCheck:g.failedCheck}}else if("photo"===l){var g=this.analyzeStream(i.default.first(e.Part),u,n);if(!g.result)return{result:!1,failedCheck:g.failedCheck};
}else if(!this.validateProfileProperty(l,u,e))return{result:!1,failedCheck:"validateProfileProperty:"+l}}return{result:!0}}return{result:!0}},canDirectPlayVideo:function(e,t){if(!t.allowDirectPlay)return D.default.warn("[MDE] Direct play failed; option is disabled"),!1;if("hls"===e.protocol&&!t.hasFlash&&!t.hasNativeHLS)return D.default.warn("[MDE] Direct play failed; cannot play HLS"),!1;if("flv"===e.container&&!t.hasFlash)return D.default.warn("[MDE] Direct play failed; cannot play FLV"),!1;var n=i.default.first(e.Part);
return t.allowSecureDirectPlay!==!1||!n||!/^https:\/\//.test(n.key)||(D.default.warn("[MDE] Direct play prevented; cannot play via HTTPS"),!1)},canPlayType:function(e,t){if(e===w.default.elements.PHOTO)return!0;var n=document.createElement(e);return!(!n.canPlayType||!n.canPlayType(t).replace(/^no$/,""))},canDirectStream:function(e,t,n,r){return r.directStream?this.analyzeStream(e,t,n):(D.default.warn("[MDE] Direct stream failed; option is disabled"),{result:!1,failedCheck:"options:directStream"});
},analyzeStream:function O(e,t,n){var r=t&&t.codecs&&t.codecs[e.codec];for(var a in t){var i=t[a];if("codecs"===a){var s=i[e.codec];if(!s)return{result:!1,failedCheck:"noCodecInProfile:"+e.codec};var O=this.analyzeStream(e,s,n);if(!O.result)return{result:!1,failedCheck:O.failedCheck}}else if(!(r&&a in r||this.validateProfileProperty(a,i,e)))return{result:!1,failedCheck:"validateProfileProperty:"+a}}return{result:!0}},validateProfileProperty:function(e,t,n){var r,a=e.match(/^max(\w)(\w*)/);if(a){if(e=a[1].toLowerCase()+a[2],
r=n[e],null==r&&D.default.warn("[MDE] Unable to validate %s; re-analyze the media if possible",e),null!=r&&"videoResolution"===e&&(r=_.default.getHeightFromResolution(r),t=_.default.getHeightFromResolution(t)),null!=r&&r>t)return D.default.warn("[MDE] Invalid profile property; %s: %s > %s",e,r,t),!1}else if(r=n[e],null==r&&D.default.warn("[MDE] Unable to validate %s; re-analyze the media if possible",e),r!==t&&!i.default.contains(t,r))return D.default.warn("[MDE] Invalid profile property; %s: %s !== %s",e,r,t),
!1;return!0},analyzeSubtitles:function(e,t){var n=t.subtitlesBurnLevel||E.default.ALWAYS,r=e.codec;return(0,D.default)("[MDE] Subtitle codec:",r),(0,D.default)("[MDE] Burn level:",n),n===E.default.ALWAYS?(D.default.warn("[MDE] Direct play failed; asked to always burn subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles:burnLevelAlways",canDirectStreamVideo:!1}):t.transcodeServer.supports("softSubtitles")?n===E.default.NEVER?{useSoftSubtitles:!0}:(D.default.warn("[MDE] Direct play failed; %s subtitles",r),
/^(pgs|vobsub)$/i.test(r)?(D.default.warn("[MDE] Soft subtitles failed; bitmap subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",canDirectStreamVideo:!1}):/^(ass|ssa)$/i.test(r)&&n===E.default.AUTO?(D.default.warn("[MDE] Soft subtitles failed; ASS subtitles"),{useSoftSubtitles:!1,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles",canDirectStreamVideo:!1}):{useSoftSubtitles:!0,canDirectPlay:!1,canDirectPlayFailedCheck:"subtitles"}):(D.default.warn("[MDE] Direct play failed; server support requires burn subtitles"),
D.default.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(e,t){var n=(0,b.default)(e.media);if(n.length){D.default.warn("[MDE] Unable to play; missing parts");var r=i.default.first(n);return 1===Number(r.exists)?(0,
u.default)("Please check the permissions for this file."):(0,u.default)("Please check that the file exists and the necessary drive is mounted.")}},validateTranscoder:function(e,t){if(!e.canDirectPlay){var n,r=t.type,a=r===w.default.types.MUSIC,s=r===w.default.types.VIDEO,o=t.transcodeServer,l=o.get("transcoderAudio"),d=o.get("transcoderVideo");if(a||"track"===t.item.get("type")){if(n=(0,u.default)("This server is not powerful enough to convert music."),s&&!d)return D.default.warn("[MDE] Unable to play; server unable to transcode music using video transcoder"),
n;if(a&&!l)return D.default.warn("[MDE] Unable to play; server unable to transcode music using audio transcoder"),n}else if(s){var c=(0,u.default)("This server is not powerful enough to convert video. You may be able to enable playback by increasing your quality setting."),f=(0,u.default)("This server is not powerful enough to convert video. Playback qualities are limited because an indirect connection is being used."),p=e.canDirectStreamVideo||!o.get("transcoderVideoRemuxOnly");if(n=(0,u.default)("This server is not powerful enough to convert video."),
!d||!p){if(D.default.warn("[MDE] Unable to play; server unable to transcode video"),o.get("isCloudSyncServer"))switch(e.canDirectPlayFailedCheck){case"validateProfileProperty:maxLevel":return(0,u.default)("Synced media cannot be converted to a lower H.264 level.");case"validateProfileProperty:maxBitrate":return(0,u.default)("Synced media cannot be converted to a lower quality.");case"allowDirectPlay":default:return(0,u.default)("Converting is not supported for synced media.")}if(t.quality){if(t.quality.index===_.default.ORIGINAL)return n;
var h=i.default.clone(t);return h.quality=i.default.extend({index:_.default.ORIGINAL},i.default.pick(t.quality,"attribute")),this.getMediaDecision(h).canDirectPlay?c:"relay"===o.get("maxUploadBitrateReason")?f:n}return c}}}},getEffectiveQuality:function(e,t,n){var r=n.quality,a={},i={};if(e.bitrate||D.default.warn("[MDE] Unable to determine effective quality; re-analyze the media if possible"),n.type===w.default.types.VIDEO){a.bitrate=e.bitrate,a.videoResolution=_.default.getHeightFromResolution(e.videoResolution);
var s=this.getPrimaryStreamProperty(t,"maxBitrate",n);if(s){var o=(0,c.default)(e),l=o?o.bitrate:e.bitrate;a.bitrate=Math.min(l,s),i.maxVideoBitrate=s}if(r){var u=r.videoResolution;if(u){var d=_.default.getResolutionFromSize(r.videoResolution),f=_.default.getHeightFromResolution(d);a.videoResolution=Math.min(a.videoResolution,f)}i.videoQuality=r.videoQuality,i.videoResolution=r.videoResolution}}else if(n.type===w.default.types.MUSIC){a.bitrate=e.bitrate;var p=this.getPrimaryStreamProperty(t,"maxBitrate",n);
p&&(a.bitrate=Math.min(e.bitrate,p),i.maxAudioBitrate=p)}return a.transcoderQualityOptions=i,a},getPrimaryStreamProperty:function(e,t,n){var r=w.default.getStreamByType(n.type),a=e[r],i=e[t];return null==i&&a&&(i=a[t]),i},getMediaTitle:function(e){var t=e.title||e.videoResolution||e.bitrate,n=i.default.compact([e.container,e.videoCodec,e.audioCodec]),r=(0,c.default)(e);return r&&n.push(r.level,r.profile),n.length&&(t+=" ("+n.join(", ")+")"),t},getDecisionLogs:function(e){var t=["canPlay: "+e.canPlay,"canDirectPlay: "+e.canDirectPlay],n=e.canDirectStreamVideo;
null!=n&&t.push("canDirectStreamVideo: "+n);var r=e.canDirectStreamAudio;null!=r&&t.push("canDirectStreamAudio: "+r);var a=e.useSoftSubtitles;null!=a&&t.push("useSoftSubtitles: "+a);var s=e.bitrate;null==s||i.default.isNaN(s)||t.push("bitrate: "+s);var o=e.videoResolution;return null==o||i.default.isNaN(o)||t.push("videoResolution: "+o),t},getBestDecision:function(e){var t=i.default.last(this.sortDecisions(e));return D.default.group("[MDE] Selected %s to play",this.getMediaTitle(t.media)),this.getDecisionLogs(t).forEach(function(e){
return D.default.info(e)}),D.default.groupEnd(),t},sortDecisions:function(e){return i.default.chain(e).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===C.default.CLOUD;return e.transcodeServer.hasLocalConnection()?!t:t},preferHigherResolutionIfCapable:function(e){var t=e.transcodeServer,n=t.get("transcoderVideo"),r=t.get("transcoderVideoRemuxOnly");return n&&!r&&(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}};t.default=A,e.exports=t.default},function(e,t,n){"use strict";function r(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 a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(5),u=r(l),d=n(49),c=r(d),f=n(51),p=r(f),h=n(1106),v=r(h),g=n(633),m=r(g),y=n(636),b=r(y),P=n(311),w=r(P),S=n(240),_=r(S),T=n(416),I=r(T),M=n(32),C=r(M),x=n(645),E=r(x),k=n(159),D=r(k),A={
getPlayerDecision:function(e){i.default.defaults(e,{offset:0,minVersionForDASH:D.default.dash,minVersionForStreamingMKV:D.default.streamingMKV,transcoderOptions:{}});var t={playbackSessionID:(0,I.default)(),transcodeSessionID:(0,I.default)(),offset:e.offset},n=this.populateMedia(t,e);return n=n.then(i.default.bind(function(){return this.resolveMedia(t,e)},this)),n=n.then(function(){return o.default.when(t.url)}),n=n.then(function(e){return t.url=e,t})},populateMedia:function(e,t){var n=o.default.Deferred(),r=i.default.bind(n.resolve,n,e);
return t.requireAnalysis&&(0,v.default)(t.item)?t.item.fetch({scope:"player"}).always(r):i.default.defer(r),n.promise()},resolveMedia:function(e,t){var n=i.default.extend({transcodeServer:this.resolveTranscodeServer(t)},t),r=w.default.getMediaDecision(n),a=r.media,s=o.default.Deferred();return i.default.extend(e,r),a?e.canPlay?"webkit"===a.protocol?(C.default.warn("[PDE] Webkit videos are not supported"),e.redirect=!0,s.reject(e).promise()):"embed"===a.protocol?(C.default.warn("[PDE] An embed is required"),
e.embed=!0,e.part=i.default.first(a.Part),s.reject(e).promise()):this.resolvePart(e,t):(C.default.warn("[PDE] Unable to play item;",e.errorMessage),s.reject(e).promise()):this.resolveUrls(e,t)},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===p.default.types.VIDEO?r="transcoderVideo":e.type===p.default.types.MUSIC&&(r="transcoderAudio"),r&&!t.get(r)&&n.get(r)?n:t},resolvePart:function(e,t){return t.part?e.part=t.part:t.offset?1===e.media.Part.length?e.part=e.media.Part[0]:(e.part=(0,
m.default)(e.media,t.offset),e.offset=(0,b.default)(e.media,e.part,t.offset)):e.part=i.default.first(e.media.Part),e.media.indirect?this.resolveIndirect(e,t):this.resolveUrls(e,t)},resolveIndirect:function(e,t){(0,C.default)("[PDE] Resolving indirect item");var n=t.item.resolveIndirect(e.media,e.part),r=i.default.bind(function(){return this.resolveMedia(e,t)},this),a=i.default.bind(function(){return o.default.Deferred().reject(e).promise()},this);return n=n.then(r,a)},resolveUrls:function(e,t){var n=o.default.Deferred();
return this.validatePlayerType(e,t)?(this.validateSoftSubtitles(e,t)?e.subtitlesUrl=this.resolveSubtitlesUrl(e,t):e.useSoftSubtitles&&(e.useSoftSubtitles=!1),C.default.group("[PDE] Player decision"),C.default.info("Player:",e.playerType),C.default.info("Protocol:",e.protocol),C.default.info("Direct Play:",e.canDirectPlay),C.default.groupEnd(),e.canDirectPlay?e.url=this.resolveDirectPlayUrl(e,t):e.url=this.resolveTranscoderUrl(e,t),this.resolveDecision(e,t)):n.reject(e).promise()},validatePlayerType:function(e,t){
return e.media&&t.type&&t.type!==p.default.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 n,r=e.transcodeServer,a=t.transcodeProtocol,i=!0,s=!0,o=!0;if(a&&(i="dash"===a,s="http"===a,o="hls"===a),o&&t.hasNativeHLS)return e.protocol="hls",
e.playerType="html",!0;if(s&&t.hasStreamingMKV){if(r.isVersionOrNewer(t.minVersionForStreamingMKV))return e.protocol="http",e.playerType="html",!0;n=t.minVersionForStreamingMKV}if(i&&t.hasDASH){if(r.isVersionOrNewer(t.minVersionForDASH))return e.protocol="dash",e.playerType="html",!0;n=t.minVersionForDASH}return t.type===p.default.types.MUSIC?(e.protocol="http",e.playerType="html",!0):o&&t.hasFlash?(e.protocol="hls",e.playerType="flash",!0):(n?e.errorMessage=(0,u.default)("Please update Plex Media Server. This feature requires {1} or later.",n):e.errorMessage=(0,
u.default)("Streaming this media is unsupported."),!1)},validateSoftSubtitles:function(e,t){return e.useSoftSubtitles&&"html"!==e.playerType?(C.default.warn("[PDE] Only the HTML player supports soft subtitles"),!1):e.useSoftSubtitles},resolveDirectPlayUrl:function(e,t){var n=t.item,r=e.part,a={"X-Plex-Session-Identifier":e.playbackSessionID};if(r){var i=/(googlevideo|youtube).com/.test(r.key);return"flv"===r.container&&i&&r.postURL?r.postURL:n.server.resolveUrl(r.key,{appendHeaders:!0,params:a})}
return n.server.resolveUrl(n.get("key"),{appendHeaders:!0,params:a})},resolveTranscoderUrl:function(e,t,n){var r=t.item,a=e.media,s=e.part,o=t.transcoderOptions;i.default.isFunction(o)&&(o=o(e)),o=i.default.extend({},e.transcoderQualityOptions,o,{"X-Plex-Session-Identifier":e.playbackSessionID,session:e.transcodeSessionID,protocol:e.protocol,directPlay:e.canDirectPlay?1:0,offset:e.offset/1e3}),t.type===p.default.types.VIDEO&&(e.useSoftSubtitles?(o.subtitles="auto",t.subtitlesBurnLevel===_.default.AVOID&&(o.advancedSubtitles="text")):o.subtitles="burn");
var l=t.profileExtra;i.default.isFunction(l)&&(l=l(e)),o["X-Plex-Client-Profile-Extra"]=l,("hls"===o.protocol&&!t.useOffsetHLS||"dash"===o.protocol)&&((0,C.default)("[PDE] DASH and HLS should seek forward by default, offset=0"),o.offset=0),"hls"===o.protocol&&t.useOffsetHLS&&(e.useOffsetHLS=!0,o.offset&&((0,C.default)("[PDE] HLS started with an offset, copyts=0"),o.copyts=0)),"http"===o.protocol&&(t.type===p.default.types.MUSIC?(e.useOffsetHTTP=!0,o.copyts=0):o.copyts=1),"http"!==o.protocol||e.canDirectPlay||(o["X-Plex-Chunked"]=1),
i.default.each(i.default.keys(o),function(e){var t=o[e];null==t&&delete o[e]});var u=t.type,d=t.transcoder,c=e.transcodeServer;return u===p.default.types.VIDEO?d.video(c,r,a,s,o,n):u===p.default.types.MUSIC?d.music(c,r,o,n):u===p.default.types.PHOTO?(o.fallbackServer=t.fallbackServer,d.image(c,r.getMediaKey(),o)):void 0},resolveSubtitlesUrl:function(e,t){var n=this.resolveTranscoderUrl(e,t),r=n.substring(n.indexOf("?"));return e.transcodeServer.resolveUrl("/video/:/transcode/universal/subtitles"+r);
},resolveDecision:function(e,t){var n=e.transcodeServer,r=o.default.Deferred();if(t.type===p.default.types.PHOTO||!n.supports("decisionEndpoint"))return r.resolve(e).promise();var a=this.resolveTranscoderUrl(e,t,"decision"),i=o.default.ajax(n.getXHROptions(a,{timeout:2e3}));return i.done(function(t){var n=c.default.parseXML(t);n.generalDecisionCode&&(e.generalDecisionCode=c.default.parseInteger(n.generalDecisionCode),e.generalDecisionText=n.generalDecisionText),n.mdeDecisionCode&&(e.mdeDecisionCode=c.default.parseInteger(n.mdeDecisionCode),
e.mdeDecisionText=n.mdeDecisionText),n.transcodeDecisionCode&&(e.transcodeDecisionCode=c.default.parseInteger(n.transcodeDecisionCode),e.transcodeDecisionText=n.transcodeDecisionText),(0,E.default)(e)?r.reject(e):r.resolve(e)}),i.fail(function(){C.default.warn("[PDE] Player decision failed; the transcode server may be a slow or outdated"),r.resolve(e)}),r.promise()}};t.default=A,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="placeholder-standard",r="placeholder-square",a="placeholder-widescreen",i="placeholder-folder",s="placeholder-friend",o={
movie:n,show:n,season:n,episode:a,artist:r,album:r,track:r,photo:r,photoAlbum:r,clip:a,userPlaylistItem:a,playlist:r,playlistFolder:r,channel:r,channelDirectory:r,folder:i,friend:s,device:r,poster:n,art:a,banner:a};t.default=o,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=o.default.clone(e);return"undefined"!=typeof t.last?(t.end=t.last+1,t.size=t.end-t.start):"undefined"!=typeof t.size?(t.end=t.start+t.size,t.last=t.end-1):"undefined"!=typeof t.end&&(t.last=t.end-1,t.size=t.end-t.start),
t}function a(e,t){return o.default.filter(o.default.map(e,r),function(e){return t?e.size>=0:e.size>0})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l={augment:r,difference:function(e,t,n){e=r(e),t=r(t);var i=[{start:e.start,last:Math.min(e.last,t.start-1)},{start:Math.max(e.start,t.end),last:e.last}];return a(i,n)},union:function(e,t,n){if(e=r(e),t=r(t),e.start>t.start){var i=e;e=t,t=i}var s=[e];return t.start<=e.end?s[0].last=Math.max(t.last,e.last):s.push(t),
a(s,n)},degap:function(e,t){var n=r(e);return t=r(t),t.size?(n.start>t.end&&(n={start:t.end,end:n.end}),n.end<t.start&&(n={start:n.start,end:t.start}),r(n)):n},each:function(e,t,n){e=r(e);for(var a=Math.min(e.start,e.end),i=Math.max(e.start,e.end);a<=i;a++)t.call(n,a)},roundByPage:function(e,t){return e=r(e),r({start:Math.floor(e.start/t)*t,end:Math.ceil(e.end/t)*t})}};t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});
var a=n(3),i=r(a),s=n(14),o=n(35),l=r(o),u=n(51),d=r(u),c=n(37),f=r(c),p=n(40),h=r(p),v=n(373),g=r(v),m=n(32),y=r(m),b=n(56),P=r(b),w=l.default.extend({mixins:[P.default],idleTimelineInterval:1e4,players:{photo:null,video:null,audio:null},textField:{focused:!1,content:"",secure:!1},initialize:function(){i.default.bindAll(this,"_sendTimeline"),this._sendTimelineThrottle=i.default.throttle(this._sendTimeline,1e3)},registerPlayer:function(e){if(h.default.get("companion")){var t=f.default.getChildMediaType(e.currentItem.get("type")).element;
(0,y.default)("[Companion Timeline] registering player. Type %s",t),this.players[t]=e,this.listenTo(e.model,{"change:state change:loaded change:lastSeekPosition":this._sendTimeline,"change:position":this._sendTimelineThrottle}),this._sendTimeline()}},unregisterPlayer:function(e){var t=f.default.getChildMediaType(e.currentItem.get("type")).element;(0,y.default)("[Companion Timeline] unregistering player. Type %s",t),this.players[t]=null,this.stopListening(e.model),i.default.defer(this._sendTimeline);
},enteredTextField:function(e){var t=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];this.flushTextField(),this.textField.focused=!0,this.textField.content=e,this.textField.secure=t,this._sendTimeline()},updatedTextField:function(e){this.textField.content!==e&&(this.flushTextField(),this.textField.content=e,this._sendTimeline())},leavedTextField:function(){this.textField.focused=!1,this._sendTimeline()},flushTextField:function(){this.textField.focused&&(this.textField.focused=!1,this._sendTimeline(),
this.textField.focused=!0)},start:function(){this.timelineStarted||(this.timelineStarted=!0,(0,y.default)("[Companion Timeline] Starting"),this._idleTimelineInterval=setInterval(this._sendTimelineThrottle,this.idleTimelineInterval))},stop:function(e){this.timelineStarted&&(e&&this._sendTimeline({requestDisconnect:!0}),this.timelineStarted=!1,(0,y.default)("[Companion Timeline] Stopping"),this._idleTimelineInterval=clearInterval(this._idleTimelineInterval))},isPlaybackActive:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.states||[d.default.states.PLAYING,d.default.states.PAUSED,d.default.states.BUFFERING],n=e.types||i.default.keys(this.players),r=i.default.find(this.players,function(e,r){
return e&&i.default.contains(t,e.model.get("state"))&&i.default.contains(n,r)});return!!r},_sendTimeline:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];if(this.timelineStarted){var t=this._buildVideoTimeline(),n=this._buildMusicTimeline(),r=this._buildPhotoTimeline(),a=t._location||r._location||n._location||"navigation",s={MediaContainer:{_location:a,Timeline:[t,n,r]}};e.requestDisconnect&&(s.MediaContainer._disconnected=1),this.textField.focused&&i.default.extend(s.MediaContainer,{
_textFieldFocused:"field",_textFieldContent:this.textField.content,_textFieldSecure:this.textField.secure?1:0}),(0,y.default)("[Companion Timeline] sending companion timeline"),g.default.publish(s)}},_buildVideoTimeline:function(){var e=this._buildbaseTimeline(this.players.video,"video");return e._state&&e._state!==d.default.states.STOPPED&&(e._location="fullScreenVideo"),e},_buildPhotoTimeline:function(){var e=this._buildbaseTimeline(this.players.photo,"photo");return e._state&&e._state!==d.default.states.STOPPED&&(e._location="fullScreenPhoto"),
e},_buildMusicTimeline:function(){var e=this._buildbaseTimeline(this.players.audio,"music");return e._state&&e._state!==d.default.states.STOPPED&&(e._location="fullScreenMusic"),e},_buildbaseTimeline:function(e,t){var n=(0,s.resolve)("companionPlayerProfile"),r={_type:t,_seekRange:"0-0",_time:"0",_controllable:n[t]};if(!e||!e.currentItem)return r;var a=e.currentItem,o=e.model,l=a.server,u=l.get("originalMachineIdentifier")||l.get("machineIdentifier"),d=l.get("connections"),c=l.get("activeConnection");
c.get("isLoopback")&&(c=d.findWhere({isConnected:!0,isLoopback:!1})||c);var f=o.get("duration"),p=0;o.get("repeatAll")?p=2:o.get("repeatItem")&&(p=1),r=i.default.extend(r,{_protocol:c.get("scheme"),_address:c.getAddressFromUri(),_port:c.get("port"),_token:l.get("accessToken"),_machineIdentifier:u,_guid:a.get("guid"),_key:a.get("key"),_ratingKey:a.get("ratingKey"),_duration:f,_audioStreamID:o.get("audioStreamID"),_state:o.get("state"),_subtitleStreamID:o.get("subtitleStreamID"),_time:o.get("position"),
_repeat:p,_mute:0,_shuffle:0,_volume:o.get("volume")}),f&&(r._seekRange="0-"+f);var h=o.get("playQueue");return i.default.result(h,"url")?r=i.default.extend(r,{_containerKey:"/playQueues/"+h.id,_playQueueID:h.id,_playQueueVersion:h.get("playQueueVersion"),_playQueueItemID:a.get("playQueueItemID")}):r._containerKey=i.default.result(h.get("lastAddedItem"),"url"),r}}),S=new w;t.default=S,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var a=n(5),i=r(a),s=n(202),o=r(s),l=["id","typeString"],u=(0,o.default)(l,[{id:0,typeString:"tag",title:function(){return(0,i.default)("Tag")}},{id:1,typeString:"genre",title:function(){return(0,i.default)("Genre")}},{id:2,typeString:"collection",title:function(){return(0,i.default)("Collection")}},{id:3,typeString:"bookmark",title:function(){return(0,i.default)("Bookmark")}},{id:4,typeString:"director",title:function(){return(0,i.default)("Director")},isPerson:!0},{id:5,typeString:"writer",title:function(){
return(0,i.default)("Writer")},isPerson:!0},{id:6,typeString:"actor",title:function(){return(0,i.default)("Actor")},isPerson:!0},{id:7,typeString:"producer",title:function(){return(0,i.default)("Producer")},isPerson:!0},{id:8,typeString:"country",title:function(){return(0,i.default)("Country")}},{id:9,typeString:"chapter",title:function(){return(0,i.default)("Chapter")}},{id:10,typeString:"review",title:function(){return(0,i.default)("Review")}},{id:11,typeString:"label",title:function(){return(0,
i.default)("Label")}},{id:42,typeString:"versionBackgroundProcessingTarget",title:function(){return(0,i.default)("Version Background Processing Target")}},{id:200,typeString:"make",title:function(){return(0,i.default)("Make")}},{id:201,typeString:"model",title:function(){return(0,i.default)("Model")}},{id:202,typeString:"aperture",title:function(){return(0,i.default)("Aperture")}},{id:203,typeString:"exposure",title:function(){return(0,i.default)("Exposure")}},{id:204,typeString:"iso",title:function(){
return(0,i.default)("ISO")}},{id:205,typeString:"lens",title:function(){return(0,i.default)("Lens")}},{id:206,typeString:"device",title:function(){return(0,i.default)("Device")}},{id:300,typeString:"mood",title:function(){return(0,i.default)("Mood")}},{id:301,typeString:"bpm",title:function(){return(0,i.default)("BPM")}},{id:302,typeString:"composer",title:function(){return(0,i.default)("Composer")}},{id:303,typeString:"featuring",title:function(){return(0,i.default)("Featuring")}},{id:304,typeString:"trackArtist",
title:function(){return(0,i.default)("Track Artist")}},{id:305,typeString:"similarArtist",title:function(){return(0,i.default)("Similar Artist")}},{id:306,typeString:"concert",title:function(){return(0,i.default)("Concert")}}]);t.default=u,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(95),i=r(a),s=i.default.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)}});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(2608),c=o(d),f=n(31),p=o(f),h=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,p.default)(this,e,t)}},{key:"render",value:function(){return u.default.createElement(c.default,this.props)}}]),t}(l.Component);h.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},h.defaultProps={component:"div",transitionName:{appear:"appear",enter:"enter",leave:"leave"},transitionAppear:!0,transitionEnter:!0,transitionLeave:!0},t.default=h,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;var n=a(e),r=a(t);
if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty,s=0;s<n.length;s++)if(!i.call(t,n[s])||e[n[s]]!==t[n[s]])return!1;return!0}var a=n(79).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(397),o=r(s),l=n(28),u=r(l),d=n(1326),c=r(d),f=u.default.extend({name:"AgentCollection",context:["server","mediaTypeID","primaryAgentID","relatedAgentID"],
model:c.default,cache:new o.default,cacheKey:function(){var e=i.default.result(this,"url");return this.server&&this.server.getScopedKey(e)},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(e){return!!i.default.intersection(this.pluck("identifier"),e).length;
}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(64),s=r(i),o=n(42),l=a(o),u=(0,s.default)(l.INIT_LIBRARY_PAGE);t.initLibraryPage=u;var d=(0,s.default)(l.CLEAR_LIBRARY_PAGE);t.clearLibraryPage=d;var c=(0,s.default)(l.FETCH_LIBRARY_METADATA_TYPES);t.fetchLibraryMetadataTypes=c;var f=(0,s.default)(l.POPULATE_LIBRARY_METADATA_TYPES);t.populateLibraryMetadataTypes=f;var p=(0,s.default)(l.FETCH_LIBRARY_FIRST_CHARACTERS);
t.fetchLibraryFirstCharacters=p;var h=(0,s.default)(l.POPULATE_LIBRARY_FIRST_CHARACTERS);t.populateLibraryFirstCharacters=h;var v=(0,s.default)(l.SELECT_LIBRARY_FILTER);t.selectLibraryFilter=v;var g=(0,s.default)(l.DESELECT_LIBRARY_FILTER);t.deselectLibraryFilter=g;var m=(0,s.default)(l.FETCH_LIBRARY_FILTER_OPTIONS);t.fetchLibraryFilterOptions=m;var y=(0,s.default)(l.POPULATE_LIBRARY_FILTER_OPTIONS);t.populateLibraryFilterOptions=y;var b=(0,s.default)(l.SEARCH_LIBRARY_FILTER_OPTIONS);t.searchLibraryFilterOptions=b;
},function(e,t,n){"use strict";function r(){return(0,o.createSelector)(function(e,t){var n=t.activeType;return n},u.default,function(e,t){var n=void 0;return e&&(n=s.default.find(t,function(t){return String(t.type)===e})),n||(n=s.default.first(t)),n})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(3),s=a(i),o=n(15),l=n(684),u=a(l);e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,o.createSelector)((0,d.default)(),(0,f.default)(),function(e,t){
return s.default.find(t,function(t){return t.type===l.activityTypes.PROVIDER_EPG_LOAD&&t.context.identifier===e.identifier})})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(15),l=n(168),u=n(100),d=a(u),c=n(210),f=a(c);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,o.createSelector)((0,u.default)(),function(e){if(e&&e.Media){for(var t=s.default.sortBy(e.Media,"endsAt"),n=Date.now()/1e3,r=0,a=t.length;r<a;r++){var i=t[r];
if(i.endsAt>n)return i}return s.default.first(t)}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(3),s=a(i),o=n(15),l=n(48),u=a(l);e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=9;t.TAB=n;var r=13;t.ENTER=r;var a=16;t.SHIFT=a;var i=17;t.CONTROL=i;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 d=93;t.META_2=d;var c=224;t.META_3=c},function(e,t,n){"use strict";
var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2306),s=r(i),o=n(3),l=r(o),u=n(13),d=r(u),c=n(12),f=r(c),p=n(40),h=r(p),v=n(14),g=a(v),m=n(122),y=a(m),b=n(27),P=r(b),w=n(57),S=r(w),_=n(121),T=r(_),I=n(1417),M=r(I),C=n(1432),x=r(C),E=n(1445),k=r(E),D=n(1449),A=r(D),O=n(1448),R=r(O),L=n(1444),N=r(L),j=n(1442),U=r(j),$=n(1441),z=r($),F=n(1446),B=r(F),V=n(1443),H=r(V),q=n(1447),W=r(q),G=n(1450),Y=r(G),Q={movie:k.default,show:A.default,season:R.default,episode:N.default,
artist:U.default,album:z.default,photoAlbum:B.default,clip:H.default,userPlaylistItem:H.default,playlist:W.default},K={playlist:{blur:5,saturation:50}},X=d.default.Layout.extend({className:"details-container",template:s.default,regions:{details:".row"},events:{"click .pivot-link":"onPivotClick"},onlyAfterRender:["playTheme"],initialize:function(){var e=this.model.get("type"),t={};(0,l.default)(K).has(e)&&(t=K[e]),this.mediaActions=new T.default({},{item:this.model,type:e,showAdvanced:!0}),g.resolve("appModel").get("primaryServer")===this.model.server&&g.resolve("appStore").dispatch(y.changeQuickSearchSettings({
serverEntityID:this.model.server.entityID(),section:this.model.get("librarySectionID")})),this.once("render",l.default.bind(function(){f.default.trigger("show:background",{model:this.model,imageFilters:t}),f.default.trigger("show:bar","actionbar",new M.default({model:this.model,mediaActions:this.mediaActions})),this.model.get("isLibraryItem")&&f.default.trigger("show:bar","breadcrumbbar",new x.default({model:this.model}))},this)),this.playTheme()},playTheme:function(){if(h.default.get("playThemeMusic")){
var e=this.model.get("grandparentTheme")||this.model.get("parentTheme")||this.model.get("theme");if(!e)return null;var t=new S.default({theme:e,key:e,parentKey:this.model.get("key"),type:"track",Media:[]},{server:this.model.server});P.default.execute("playBackgroundMedia",{item:t,volume:50})}},onRender:function(){var e,t=this.model.get("type");if(this.model.get("isLibraryItem")||"movie"!==t&&"episode"!==t||(t="clip"),(0,l.default)(Q).has(t)){var n=Q[t];e=new n({model:this.model,mediaActions:this.mediaActions
})}else e=new Y.default({model:this.model});this.details.append(e,this.$el)},onClose:function(){f.default.trigger("hide:bar","actionbar"),g.resolve("appModel").get("primaryServer")===this.model.server&&g.resolve("appStore").dispatch(y.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),section:null})),this.model.get("isLibraryItem")&&f.default.trigger("hide:bar","breadcrumbbar")},onPivotClick:function(e){var t=this.model.section;if(t){var n=t.get("items");n.scrollPosition=0}}});
t.default=X,e.exports=t.default},function(e,t,n){"use strict";var r=n(9).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(26),s=r(i),o=n(244),l=a(o),u=n(95),d=a(u),c=n(314),f=a(c),p=d.default.extend({background:!0,setup:function(e){this.model=e.model,e.noPlaceholder||(this.placeholderClass=f.default.playlist);var t=(0,l.default)(),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},r=this.model.get("composite");r&&(this.url=this.model.server.resolveUrl(s.join(r,n),{appendToken:!0}))}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2416),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(5),f=r(c),p=n(12),h=r(p),v=n(26),g=a(v),m=n(54),y=r(m),b=y.default.extend({name:"channelSettingsModal",className:"channel-settings-modal modal fade",template:s.default,
ui:{submitBtn:".submit-btn"},events:l.default.extend({"change input[name]":"onInputChange","change select[name]":"onInputChange","submit #channel-settings-form":"onSubmit"},y.default.prototype.events),initialize:function(){y.default.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(),l.default.isEmpty(this.changes))return void this.hide();var t=this.ui.submitBtn;if(!t.hasClass("active")){t.addClass("active");var n=this.collection.first(),r=n.getSaveParams(this.changes),a=l.default.result(this.collection,"url"),i=g.join([a,"/set"],r),s=d.default.ajax(n.server.getXHROptions(i));s.done(l.default.bind(function(){this.hide()},this)),s.fail(l.default.bind(function(){h.default.trigger("show:alert",{type:"error",message:(0,
f.default)("There was a problem saving these settings.")})},this)),s.always(function(){t.removeClass("active")})}}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2424),i=r(a),s=n(3),o=r(s),l=n(54),u=r(l),d=u.default.extend({name:"libraryFailureModal",className:"confirm-modal modal modal-sm fade",template:i.default,events:o.default.extend({"click .confirm-btn":"hide"},u.default.prototype.events),serializeData:function(){
return{serverID:this.model.id,isSignedIn:"ok"===this.model.get("myPlexSigninState"),hasPlexPass:this.model.get("myPlexSubscription")}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2489),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=c.default.ItemView.extend({className:"player-slider",template:i.default,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){o.default.bindAll(this,"onMouseMove","onMouseUp","onTouchMove","onTouchEnd"),this.$document=(0,u.default)(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,r=n/t.width();return r=Math.min(Math.max(r,0),1),r=Math.round(100*r)},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()}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children,r=e.kind;return{$$typeof:a,type:"span",key:null,ref:null,props:{children:n,className:(0,c.default)(t,p.default.badge,p.default[r],!n&&p.default.isHidden)},_owner:null}}var a=n(7).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(i(o),n(426)),u=s(l),d=n(33),c=i(d),f=n(2047),p=i(f);
r.propTypes={className:o.PropTypes.string,children:o.PropTypes.node,kind:o.PropTypes.oneOf(u.all)},r.defaultProps={kind:u.DEFAULT},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.circleClassName,r=e.iconClassName,l=e.title,u=s(e,["className","circleClassName","iconClassName","title"]);return d.default.createElement(g.default,o({className:t,"aria-label":(0,f.default)("Play {1}",l)},u),{$$typeof:a,type:"div",key:null,ref:null,props:{children:{$$typeof:a,
type:h.default,key:null,ref:null,props:i(h.default.defaultProps,{name:"plex-icon-play-560",className:r}),_owner:null},className:n},_owner:null})}var a=n(7).default,i=n(10).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(5),f=l(c),p=n(36),h=l(p),v=n(34),g=l(v),m=n(2061),y=l(m);r.propTypes={className:u.PropTypes.string,circleClassName:u.PropTypes.string,iconClassName:u.PropTypes.string,title:u.PropTypes.string.isRequired},
r.defaultProps={className:y.default.playButton,circleClassName:y.default.playCircle,iconClassName:y.default.playIcon},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.className,r=a(e,["children","className"]);return l.default.createElement("p",i({},r,{className:n}),t)}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(2066),d=s(u);r.propTypes={children:o.PropTypes.node.isRequired,
className:o.PropTypes.string},r.defaultProps={className:d.default.help},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.onErrorDismiss,n=e.errorMessage;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{name:"plex-icon-alert-560",className:v.default.sectionErrorIcon}),_owner:null},n?n:(0,u.default)("There was a problem saving your changes."),{$$typeof:a,type:p.default,key:null,
ref:null,props:i(p.default.defaultProps,{children:g,className:v.default.sectionErrorDismiss,onPress:t}),_owner:null}],className:v.default.sectionError},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(36),c=s(d),f=n(34),p=s(f),h=n(2068),v=s(h),g={$$typeof:a,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{name:"plex-icon-remove-560"}),_owner:null};r.propTypes={errorMessage:o.PropTypes.string,
onErrorDismiss:o.PropTypes.func},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children,r=e.component,o=e.width,l=e.height,d=e.url,c=i(e,["className","children","component","width","height","url"]);return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[u.default.createElement(r,s({width:o,height:l,url:d},c)),n],className:t,style:{width:o,height:l}},_owner:null}}var a=n(7).default,i=n(19).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var l=n(4),u=o(l),d=n(2073),c=o(d);r.propTypes={className:l.PropTypes.string,children:l.PropTypes.node,component:l.PropTypes.func.isRequired,width:l.PropTypes.number.isRequired,height:l.PropTypes.number.isRequired,url:l.PropTypes.oneOfType([l.PropTypes.string,l.PropTypes.func])},r.defaultProps={className:c.default.card},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,m.createSelector)(function(e,t){var n=t.columnAdjustment;return n},(0,w.default)(),_.default,function(e,t,n){
var r=p.default.pick(t,"totalSize","populatedRange","allowSync","isPending","isPopulated","error","firstItemType","isFirstItemLibraryItem");return a({columnAdjustment:e||n.columnAdjustment,metadataItemEntityIDs:t.metadataItems},r)})}var a=n(11).default,i=n(17).default,s=n(18).default,o=n(25).default,l=n(16).default,u=n(19).default,d=n(1).default,c=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=d(f),h=n(4),v=d(h),g=n(21),m=n(15),y=n(24),b=n(50),P=n(300),w=d(P),S=n(142),_=d(S),T=n(169),I=c(T),M=function(e){
function t(){l(this,t),i(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}),this.props.resetMetadataList({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,r=t.populateMetadataListRange;r(a({metadataListEntityID:n},e))}},{key:"render",value:function(){var e=this.props,t=e.component,n=(e.populateMetadataListRange,
u(e,["component","populateMetadataListRange"]));return v.default.createElement(t,a({onPageRequest:this.onPageRequest},n))}}]),t}(h.Component);M.propTypes={metadataListEntityID:h.PropTypes.string.isRequired,component:h.PropTypes.func.isRequired,initialSize:h.PropTypes.number,populateMetadataListRange:h.PropTypes.func.isRequired,deselectAllMetadataListItems:h.PropTypes.func.isRequired,resetMetadataList:h.PropTypes.func.isRequired},t.default=(0,g.connect)(r,I)(M),e.exports=t.default},function(e,t,n){
"use strict";function r(e){switch(e){case"movie":return[m.default];case"show":return[m.default];case"episode":return[b.default,w.default];case"playlist":return[m.default];default:return[m.default]}}function a(e){var t=e.target,n=e.children,a=t.type,l=t.thumbTranscodeUrl,u=t.grandparentThumbTranscodeUrl,f="playlist"===a?"show":a;return{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:{$$typeof:i,type:p.default,key:null,ref:null,props:s(p.default.defaultProps,{
children:{$$typeof:i,type:"div",key:null,ref:null,props:{children:{$$typeof:i,type:_.default,key:null,ref:null,props:s(_.default.defaultProps,{type:a}),_owner:null},className:C.default.subscriptionBadge},_owner:null},component:v.default,type:f,width:x,height:(0,c.getHeight)(x,f),url:u||l}),_owner:null},className:C.default.left},_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:r(a).map(function(e,n){return d.default.createElement(I.default,o({
key:n,component:e,isSecondary:n>0},t))}),className:C.default.titleContainer},_owner:null},n],className:C.default.right},_owner:null}],className:C.default.container},_owner:null}}var i=n(7).default,s=n(10).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(187),f=n(336),p=l(f),h=n(339),v=l(h),g=n(340),m=l(g),y=n(463),b=l(y),P=n(466),w=l(P),S=n(460),_=l(S),T=n(1737),I=l(T),M=n(2122),C=l(M),x=130;a.propTypes={target:u.PropTypes.shape({thumbTranscodeUrl:u.PropTypes.func,
title:u.PropTypes.string,grandparentTitle:u.PropTypes.string}),children:u.PropTypes.node},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.type,n=e.isOffscreen,r=e.url,s=e.width,o=e.height,l=e.transitionProps,d=e.onLoad,f=e.onError;return n?null:r?{$$typeof:i,type:u.default,key:null,ref:null,props:a(u.default.defaultProps,{url:r,width:s,height:o,backgroundPosition:"artist"===t?"center top":"center",transitionProps:l,onLoad:d,onError:f}),_owner:null}:{$$typeof:i,
type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{type:t,width:s,height:o}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(452)),u=s(l),d=n(740),c=s(d);r.propTypes={type:o.PropTypes.string,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 r(e){var t=e.className,n=e.title;return{$$typeof:a,type:"span",key:null,ref:null,props:{children:n,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4);i(s);r.propTypes={className:s.PropTypes.string,title:s.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=a(e,["children"]);
return l.default.createElement("div",i({className:d.default.pageHeaderCenter},n),t)}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(2137),d=s(u);r.propTypes={children:o.PropTypes.node},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:n,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(4),o=(i(s),n(2169)),l=i(o);r.propTypes={className:s.PropTypes.string,children:s.PropTypes.node},r.defaultProps={className:l.default.leftTitle},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,h.createSelector)(m.default,b.default,(0,w.default)(),(0,_.default)(),function(e,t,n,r){var i=t.activeSelectionItems,s=t.activeSelectionType;return{activeSelectionItems:i.map(function(t){return a({},t,{model:e[t.model]})}),activeSelectionType:s,server:n,provider:r
}})}var a=n(11).default,i=n(17).default,s=n(18).default,o=n(25).default,l=n(16).default,u=n(1).default,d=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=u(c),p=n(21),h=n(15),v=n(24),g=n(301),m=u(g),y=n(170),b=u(y),P=n(67),w=u(P),S=n(73),_=u(S),T=n(435),I=d(T),M=n(1900),C=u(M),x=function(e){function t(){l(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return s(t,e),o(t,[{key:"onDeselectAllPress",decorators:[v.autobind],value:function(e){
this.props.deselectAllItems()}},{key:"render",value:function(){return f.default.createElement(C.default,a({onDeselectAllPress:this.onDeselectAllPress},this.props))}}]),t}(c.Component);x.propTypes={serverEntityID:c.PropTypes.string.isRequired,providerEntityID:c.PropTypes.string.isRequired,deselectAllItems:c.PropTypes.func.isRequired},t.default=(0,p.connect)(r,I)(x),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children,r=e.icon,l=e.showSpinner,u=s(e,["className","children","icon","showSpinner"]);
return d.default.createElement(y.default,o({className:(0,f.default)(t,P.default.sidebarLink)},u),l?{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{className:P.default.sidebarLinkSpinner}),_owner:null}:{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{name:r,className:P.default.sidebarLinkIcon}),_owner:null},n)}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(33),f=l(c),p=n(36),h=l(p),v=n(55),g=l(v),m=n(34),y=l(m),b=n(2219),P=l(b);
r.propTypes={className:u.PropTypes.string,children:u.PropTypes.node,showSpinner:u.PropTypes.bool,icon:u.PropTypes.string.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=a(e,["className"]);return l.default.createElement("div",i({className:(0,d.default)(t,f.default.sidebarListItem)},n))}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(33),d=s(u),c=n(2221),f=s(c);r.propTypes={
className:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){var r=n(494);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},,,,,,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.publishSource,r=void 0===n||n,a=t.clientOffset,i=void 0===a?null:a,s=t.getSourceClientOffset;f.default(h.default(e),"Expected sourceIds to be an array.");var o=this.getMonitor(),l=this.getRegistry();
f.default(!o.isDragging(),"Cannot call beginDrag while dragging.");for(var u=0;u<e.length;u++)f.default(l.getSource(e[u]),"Expected sourceIds to be registered.");for(var d=null,u=e.length-1;u>=0;u--)if(o.canDragSource(e[u])){d=e[u];break}if(null!==d){var c=null;i&&(f.default("function"==typeof s,"When clientOffset is provided, getSourceClientOffset must be a function."),c=s(d));var p=l.getSource(d),v=p.beginDrag(o,d);f.default(g.default(v),"Item must be an object."),l.pinSource(d);var y=l.getSourceType(d);
return{type:m,itemType:y,item:v,sourceId:d,clientOffset:i,sourceClientOffset:c,isSourcePublic:r}}}function i(e){var t=this.getMonitor();if(t.isDragging())return{type:y}}function s(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.clientOffset,r=void 0===n?null:n;f.default(h.default(e),"Expected targetIds to be an array."),e=e.slice(0);var a=this.getMonitor(),i=this.getRegistry();f.default(a.isDragging(),"Cannot call hover while not dragging."),f.default(!a.didDrop(),"Cannot call hover after drop.");
for(var s=0;s<e.length;s++){var o=e[s];f.default(e.lastIndexOf(o)===s,"Expected targetIds to be unique in the passed array.");var l=i.getTarget(o);f.default(l,"Expected targetIds to be registered.")}for(var u=a.getItemType(),s=e.length-1;s>=0;s--){var o=e[s],c=i.getTargetType(o);d.default(c,u)||e.splice(s,1)}for(var s=0;s<e.length;s++){var o=e[s],l=i.getTarget(o);l.hover(a,o)}return{type:b,targetIds:e,clientOffset:r}}function o(){var e=this,t=this.getMonitor(),n=this.getRegistry();f.default(t.isDragging(),"Cannot call drop while not dragging."),
f.default(!t.didDrop(),"Cannot call drop twice during one drag operation.");var r=t.getTargetIds().filter(t.canDropOnTarget,t);r.reverse(),r.forEach(function(r,a){var i=n.getTarget(r),s=i.drop(t,r);f.default("undefined"==typeof s||g.default(s),"Drop result must either be an object or undefined."),"undefined"==typeof s&&(s=0===a?{}:t.getDropResult()),e.store.dispatch({type:P,dropResult:s})})}function l(){var e=this.getMonitor(),t=this.getRegistry();f.default(e.isDragging(),"Cannot call endDrag while not dragging.");
var n=e.getSourceId(),r=t.getSource(n,!0);return r.endDrag(e,n),t.unpinSource(),{type:w}}t.__esModule=!0,t.beginDrag=a,t.publishDragSource=i,t.hover=s,t.drop=o,t.endDrag=l;var u=n(814),d=r(u),c=n(88),f=r(c),p=n(189),h=r(p),v=n(284),g=r(v),m="dnd-core/BEGIN_DRAG";t.BEGIN_DRAG=m;var y="dnd-core/PUBLISH_DRAG_SOURCE";t.PUBLISH_DRAG_SOURCE=y;var b="dnd-core/HOVER";t.HOVER=b;var P="dnd-core/DROP";t.DROP=P;var w="dnd-core/END_DRAG";t.END_DRAG=w},function(e,t){"use strict";function n(e){return{type:s,sourceId:e
}}function r(e){return{type:o,targetId:e}}function a(e){return{type:l,sourceId:e}}function i(e){return{type:u,targetId:e}}t.__esModule=!0,t.addSource=n,t.addTarget=r,t.removeSource=a,t.removeTarget=i;var s="dnd-core/ADD_SOURCE";t.ADD_SOURCE=s;var o="dnd-core/ADD_TARGET";t.ADD_TARGET=o;var l="dnd-core/REMOVE_SOURCE";t.REMOVE_SOURCE=l;var u="dnd-core/REMOVE_TARGET";t.REMOVE_TARGET=u},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=n(39),a=function(e){var t,n={};
e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=a},function(e,t,n){function r(e,t){for(var n=e.length;n--;)if(a(e[n][0],t))return n;return-1}var a=n(362);e.exports=r},function(e,t,n){function r(e,t){var n=e.__data__;return a(t)?n["string"==typeof t?"string":"hash"]:n.map}var a=n(2575);e.exports=r},function(e,t,n){var r=n(518),a=r(Object,"create");e.exports=a},function(e,t,n){var r=n(2565),a="object"==typeof self&&self&&self.Object===Object&&self,i=r||a||Function("return this")();
e.exports=i},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t,n){"use strict";function r(e,t){}t.__esModule=!0,t.default=r,e.exports=t.default},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},r={getNativeProps:function(e,t){if(!t.disabled)return t;var r={};for(var a in t)!n[a]&&t.hasOwnProperty(a)&&(r[a]=t[a]);
return r}};e.exports=r},function(e,t,n){"use strict";function r(){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 r=t.eventTypes;for(var i in r)a(r[i],t,i)?void 0:s(!1)}}}function a(e,t,n){u.eventNameDispatchConfigs.hasOwnProperty(n)?s(!1):void 0,u.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var a in r)if(r.hasOwnProperty(a)){var o=r[a];i(o,t,n)}return!0}return!!e.registrationName&&(i(e.registrationName,t,n),
!0)}function i(e,t,n){u.registrationNameModules[e]?s(!1):void 0,u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var s=n(39),o=null,l={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){o?s(!1):void 0,o=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var a=e[n];l.hasOwnProperty(n)&&l[n]===a||(l[n]?s(!1):void 0,
l[n]=a,t=!0)}t&&r()},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 r=u.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}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 r=u.registrationNameModules;for(var a in r)r.hasOwnProperty(a)&&delete r[a]}};e.exports=u},function(e,t,n){"use strict";var r=n(60),a=n(854),i=n(856),s=n(855),o=n(2650),l=n(107),u=(n(861),n(870)),d=n(872),c=n(882),f=(n(52),l.createElement),p=l.createFactory,h=l.cloneElement,v=r,g={Children:{map:a.map,forEach:a.forEach,count:a.count,toArray:a.toArray,only:c},Component:i,createElement:f,cloneElement:h,isValidElement:l.isValidElement,PropTypes:u,createClass:s.createClass,createFactory:p,createMixin:function(e){
return e},DOM:o,version:d,__spread:v};e.exports=g},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,g)||(e[g]=h++,f[e[g]]={}),f[e[g]]}var a,i=n(60),s=n(130),o=n(365),l=n(2664),u=n(873),d=n(879),c=n(537),f={},p=!1,h=0,v={topAbort:"abort",topAnimationEnd:d("animationend")||"animationend",topAnimationIteration:d("animationiteration")||"animationiteration",topAnimationStart:d("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:d("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},g="_reactListenersID"+String(Math.random()).slice(2),m=i({},l,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(m.handleTopLevel),m.ReactEventListener=e;
}},setEnabled:function(e){m.ReactEventListener&&m.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!m.ReactEventListener||!m.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,a=r(n),i=o.registrationNameDependencies[e],l=s.topLevelTypes,u=0;u<i.length;u++){var d=i[u];a.hasOwnProperty(d)&&a[d]||(d===l.topWheel?c("wheel")?m.ReactEventListener.trapBubbledEvent(l.topWheel,"wheel",n):c("mousewheel")?m.ReactEventListener.trapBubbledEvent(l.topWheel,"mousewheel",n):m.ReactEventListener.trapBubbledEvent(l.topWheel,"DOMMouseScroll",n):d===l.topScroll?c("scroll",!0)?m.ReactEventListener.trapCapturedEvent(l.topScroll,"scroll",n):m.ReactEventListener.trapBubbledEvent(l.topScroll,"scroll",m.ReactEventListener.WINDOW_HANDLE):d===l.topFocus||d===l.topBlur?(c("focus",!0)?(m.ReactEventListener.trapCapturedEvent(l.topFocus,"focus",n),
m.ReactEventListener.trapCapturedEvent(l.topBlur,"blur",n)):c("focusin")&&(m.ReactEventListener.trapBubbledEvent(l.topFocus,"focusin",n),m.ReactEventListener.trapBubbledEvent(l.topBlur,"focusout",n)),a[l.topBlur]=!0,a[l.topFocus]=!0):v.hasOwnProperty(d)&&m.ReactEventListener.trapBubbledEvent(d,v[d],n),a[d]=!0)}},trapBubbledEvent:function(e,t,n){return m.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return m.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){
if(void 0===a&&(a=document.createEvent&&"pageX"in document.createEvent("MouseEvent")),!a&&!p){var e=u.refreshScrollValues;m.ReactEventListener.monitorScrollValue(e),p=!0}}});e.exports=m},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=n(357),a=r({prop:null,context:null,childContext:null});e.exports=a},function(e,t,n){"use strict";function r(e,t,n,r){return a.call(this,e,t,n,r)}var a=n(287),i=n(873),s=n(534),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+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};a.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";var r=n(39),a={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,a,i,s,o,l){this.isInTransaction()?r(!1):void 0;var u,d;try{this._isInTransaction=!0,u=!0,this.initializeAll(0),d=e.call(t,n,a,i,s,o,l),u=!1}finally{try{if(u)try{this.closeAll(0)}catch(c){}else this.closeAll(0)}finally{
this._isInTransaction=!1}}return d},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=i.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===i.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(a){}}}},closeAll:function(e){this.isInTransaction()?void 0:r(!1);for(var t=this.transactionWrappers,n=e;n<t.length;n++){var a,s=t[n],o=this.wrapperInitData[n];try{a=!0,o!==i.OBSERVED_ERROR&&s.close&&s.close.call(this,o),
a=!1}finally{if(a)try{this.closeAll(n+1)}catch(l){}}}this.wrapperInitData.length=0}},i={Mixin:a,OBSERVED_ERROR:{}};e.exports=i},function(e,t){"use strict";function n(e){return a[e]}function r(e){return(""+e).replace(i,n)}var a={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},i=/[&><"']/g;e.exports=r},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(94),i=r(a),s=i.default.extend({"interface":["publish","subscribe","unsubscribe","registerPlayer","getDeepLink"]
});t.default=new s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(94),i=r(a),s=new i.default({"interface":["init","enable","disable","set","capture"]});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(94),i=r(a),s=new i.default({props:["shortcuts"]});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(94),i=r(a),s=new i.default({props:["capabilities","video","music","photo"]});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),i=r(a),s=n(35),o=r(s),l=n(32),u=r(l),d=o.default.extend({getStorage:function(){},get:function(e){var t=this;return this._catchStorageError(function(n){var r=window.PLEXWEB,a=r&&e in r?r[e]:n.getItem(e);if(null==a)throw new Error(e+" is not in "+t.name);return a})},
set:function(e,t){var n=this;return this._catchStorageError(function(r){if(!e)throw new Error("Unable to set value in "+n.name+" without a key");if(null==t)throw new Error("Unable to set null or undefined value for "+e+" in "+n.name+". Use the remove function.");return r.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=i.default.Deferred();
try{t.resolve(e(this.getStorage()))}catch(n){u.default.warn(n.message),t.reject(n)}return t.promise()}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(51),u=r(l),d=n(1109),c=r(d),f=n(1107),p=r(f),h=n(1108),v=r(h),g=n(191),m=r(g),y=n(578),b=r(y),P=n(1010),w=r(P),S={playbackDuration:0,modelDefaults:function(){var e=i.default.omit(i.default.result(this.model,"defaults"),["playQueueItem","metadataItem","playQueue","transcodeServer","state","stopped","paused","playing","buffering","error","volume","shuffled","repeatAll","repeatItem","slideshowState","slideshowPlaying","slideshowPaused"]),t=this.model.get("playQueue"),n=!!this.previousItem,r=!!this.nextItem&&!this.currentItem.get("isAdvertisement");
return this.webRadioUsage&&r&&(r=this.webRadioUsage.get("canSkipNext")),i.default.extend(e,{playQueueItem:this.currentItem,metadataItem:this.currentItem.get("metadataItem"),type:this.type,canRepeat:!0,canSkipPrevious:n,canSkipNext:r,canShuffle:!t.get("hasUpNext"),shuffled:t.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(e){this.stoppedSessions={},this.stop=i.default.wrap(this.stop,i.default.bind(function(e){return!this.model||this.model.get("stopped")?o.default.Deferred().resolve().promise():e.apply(this,[].slice.call(arguments,1));
},this)),this.seekBackward=i.default.bind(this.seek,this,-1e4,0,0),this.seekForward=i.default.bind(this.seek,this,3e4,0,3e3)},request:function(e){return this.pendingRequests||(this.pendingRequests=[]),this.pendingRequests.push(e),e.always(i.default.bind(function(){var t=i.default.indexOf(this.pendingRequests,e);this.pendingRequests.splice(t,1)},this)),e},waitForRequests:function(){return o.default.when.apply(o.default,this.pendingRequests)},reset:function(e){this.currentItem&&(this.timeline({state:u.default.states.STOPPED,
continuing:!0}),this.stopTimeline(),this.stopSession()),this.currentItem=e,this.previousItem=this.getPreviousItem(e),this.nextItem=this.getNextItem(e),this.setRadioPolicy();var t=i.default.extend(i.default.result(this,"modelDefaults"),this.modelOverrides());return this.model.set(t),e},getItemAtOffset:function(e,t,n){if(t||(t=this.model.get("playQueueItem")),!t)return null;var r=this.model.get("playQueue"),a=t.get("ratingKey");if(!a)return null;n||(n={});var i=r.get("collection"),s=i.findWhere({ratingKey:a
}),o=i.indexOf(s),l=o+e,u=n.loop&&i.length>1||this.model.get("repeatAll");return l>=0&&l<i.length?i.at(l):u?(l=(l+i.length)%i.length,i.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")===u.default.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,r){var a=this.model.get("position")+e,i=0+(t>=0?t:0),s=this.model.get("duration")-(n>=0?n:0);a=Math.max(i,Math.min(a,s)),this.setPosition(a,r)},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,r=this.getNextItem(n),a=r&&this.getNextItem(r);r&&a||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"),r=n.get("collection"),a=r.findWhere({
key:e});return this.reset(a)},toggleShuffle:function(){var e=this.model.get("playQueue");this.model.get("canShuffle")&&e.toggleShuffle()},nextRepeat:function(){var e=this.model.get("playQueue");if(this.model.get("canRepeat")){var t=!this.model.get("repeatAll")&&!this.model.get("repeatItem"),n=this.model.get("repeatAll")&&!this.model.get("repeatItem");e.setRepeatAll(t).done(i.default.bind(function(){this.model.set({repeatAll:t,repeatItem:n})},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",u.default.states.STOPPED);var t=this.model.get("metadataItem"),n=t.server.get("playQueueManager");if(n){var r=this.model.get("playQueue"),a=n.getFor(t);a&&r&&a===r&&n.remove(r.get("mediaType"))}this.stopListening(),this.webRadioUsage&&(this.stopListening(this.webRadioUsage),
this.webRadioUsage.stop())},hardStop:function(){this.stop({async:!1,timeout:2e3})},fadeOut:function(){this._fadeInterval&&clearInterval(this._fadeInterval),this._fadeInterval=setInterval(i.default.bind(function(){var e=this.model.get("volume");e<=0?this.stop():this.decreaseVolume(5)},this),50)},timeline:function(e){return e||(e={}),i.default.defaults(e,this.model.attributes),this.companion||!e.metadataItem?o.default.Deferred().resolve().promise():this.request((0,c.default)(e))},startTimeline:function(){
this.companion||this.serverTimelineInterval||(this.serverTimelineInterval=setInterval(i.default.bind(this.timeline,this),c.default.DELAY))},stopTimeline:function(){this.serverTimelineInterval=clearInterval(this.serverTimelineInterval),this.trackPlaybackEvent()},updatePlayQueue:function(){var e=this.model.get("playQueue"),t=this.model.get("playQueueItem");return e.get("playQueueSelectedItemID")!==t.get("playQueueItemID")?e.fetch():o.default.Deferred().resolve().promise()},ping:function(){return this.companion?o.default.Deferred().resolve().promise():this.request((0,
p.default)(this.model.get("transcodeServer"),this.transcodeSessionID))},startPing:function(){var e=this.model.get("directPlay"),t=!this.companion&&this.type!==u.default.types.PHOTO;!t||e||this.pingInterval||(this.pingInterval=setInterval(i.default.bind(this.ping,this),p.default.DELAY))},stopPing:function(){this.pingInterval=clearInterval(this.pingInterval)},stopSession:function(e){var t=this.transcodeSessionID,n=t||i.default.uniqueId("no-session-"),r=e&&e.xhrOptions||{};if(this.stoppedSessions.hasOwnProperty(n))return this.stoppedSessions[n];
this.subcontroller&&this.subcontroller.stop(e);var a;return a=t&&this.type!==u.default.types.PHOTO&&!this.model.get("directPlay")?this.request((0,v.default)(this.model.get("transcodeServer"),t,r)):o.default.Deferred().resolve().promise(),this.stoppedSessions[n]=a,a},startPlaybackTracking:function(){this.companion||this.playbackInterval||(this.playbackInterval=setInterval(i.default.bind(function(){this.playbackDuration++},this),1e3))},stopPlaybackTracking:function(){this.playbackInterval=clearInterval(this.playbackInterval);
},trackPlaybackEvent:function(){if(!this.companion){b.default.incPlaybackCount();var e=this.model.get("metadataItem"),t=e.get("identifier");m.default.trackEvent({eventCategory:"Playback",eventAction:e.get("type"),eventLabel:t,eventValue:this.playbackDuration}),this.playbackDuration=0}},setRadioPolicy:function(){var e=this.model.get("playQueue");if(this.webRadioUsage){if(this.webRadioUsage.get("playQueue")===e)return;this.stopListening(this.webRadioUsage),this.webRadioUsage.stop(),this.webRadioUsage=null;
}if(this.webRadioAdvertisementTimeout&&(this.webRadioAdvertisementTimeout=clearTimeout(this.webRadioAdvertisementTimeout)),e&&e.get("isRadio")){var t=i.default.extend(i.default.pick(e.attributes,w.default.playQueueAttributes),{playQueue:e});this.webRadioUsage=new w.default(t),this.listenTo(this.webRadioUsage,"change",function(e){var t=e.changedAttributes();t&&this.model.set(t)});var n=this.currentItem;n.get("advertisement")&&n.get("allowSkipAfter")&&(this.webRadioAdvertisementTimeout=setTimeout(i.default.bind(function(){
this.model.set("canSkipNext",!!this.nextItem)},this),1e3*n.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 r=n.length-1;r>=0;r--){var a=n.at(r),i=a.get("startTimeOffset");if(i<e)return i}return 0}},getNextChapterTime:function(e){var t=this.model.get("metadataItem"),n=t.get("chapters");if(n&&n.length)for(var r=0;r<n.length;r++){var a=n.at(r),i=a.get("startTimeOffset");if(i>e)return i}},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)}};t.default=S,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(294),o=r(s),l=i.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(28),o=r(s),l=n(563),u=r(l),d=o.default.extend({
name:"FirstCharacterCollection",context:["server","section"],model:u.default,url:function c(){var e=i.default.result(this.section,"url")+"/firstCharacter",t=this.getUrlParams(),c=t?e+"?"+t:e;return c},getUrlParams:function(){var e={},t=[],n=this.section.get("currentType");n&&(e.type=n.id);var r=this.section.get("currentFilters");return i.default.each(r,function(t){t.values.length&&(e[t.key]=t.values.join(","))}),i.default.each(e,function(n,r){"unviewedLeafCount"===r?t.push(r+">="+e[r]):t.push(r+"="+e[r]);
}),t.join("&")}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(193),o=r(s),l=i.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(5),o=r(s),l=n(20),u=r(l),d=n(22),c=r(d),f=["all","recentlyAdded","recentlyViewed","recentlyViewedShows","onDeck","newest","folder"],p=c.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")&&i.default.contains(f,this.get("key"))}},defaults:{selected:!1},augmentResponse:function(e){return"all"===e.key&&(e.title=(0,o.default)("All")),e}},{whitelistedPrimaryKeySubsets:f});t.default=p,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(26),l=a(o),u=n(28),d=r(u),c=n(384),f=r(c),p=d.default.extend({name:"SortCollection",context:["server","section","typeID"],model:f.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 r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l={ASCENDING:"asc",DESCENDING:"desc"},u=o.default.extend({name:"SortModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",sessionAttrs:{selected:i.default.boolean,direction:i.default.string},syncedAttrs:{key:i.default.string,descKey:i.default.string,title:i.default.string,isDefault:i.default.boolean,defaultDirection:i.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 r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(26),d=a(u),c=n(162),f=r(c),p=n(20),h=r(p),v=n(22),g=r(v),m=n(998),y=r(m),b=g.default.extend({
name:"PlaylistModel",context:["server","containerKey"],idAttribute:"ratingKey",rootPropertyName:"Playlist",urlRoot:"/playlists",saveUrl:function(){return"/library/metadata/"+this.id},sessionAttrs:{isPlaylist:h.default.boolean,isLibraryItem:h.default.boolean},syncedAttrs:{ratingKey:h.default.string,key:h.default.string,guid:h.default.string,type:h.default.string,playlistType:h.default.string,title:h.default.string,titleSort:h.default.string,composite:h.default.string,summary:h.default.string,smart:h.default.boolean,
allowSync:h.default.boolean,duration:h.default.integer,durationInSeconds:h.default.integer,leafCount:h.default.integer,addedAt:h.default.integer,updatedAt:h.default.integer},sessionRelations:{children:{relationClass:y.default,attrs:function(e){var t={};return"audio"===e.playlistType&&(t.includeRelated=1),{containerKey:d.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){if(void 0!==e){var n=t?{after:t}:{},r=d.join([s.default.result(this,"url"),"/items/",e,"/move"],n),a=s.default.extend(this.server.getXHROptions(r),{type:"PUT"}),i=l.default.ajax(a),o=this.get("children").getCollection(),u=this.findItem(e);o.remove(u);var c=this.findItem(t),f=c?o.indexOf(c)+1:0;return o.add(u,{at:f}),i}},removeItem:function(e){var t=this;if(void 0!==e){var n=d.join([s.default.result(this,"url"),"/items/",e]),r=s.default.extend(this.server.getXHROptions(n),{
type:"DELETE"}),a=l.default.ajax(r);a.then(function(e){t.set(t.parse(e))});var i=this.get("children").getCollection(),o=this.findItem(e);return i.remove(o),a}},addContent:function(e,t){var n=this,r=this.isNew()?"POST":"PUT",a=[s.default.result(this,"url")],i={};this.isNew()?(i.type=this.get("playlistType"),i.title=this.get("title"),i.smart=this.get("smart")?1:0):a.push("/items"),e.get("playQueueID")?i.playQueueID=e.get("playQueueID"):i.uri=f.default.uri(e,t);var o=d.join(a,i),u=s.default.extend(e.server.getXHROptions(o),{
type:r}),c=l.default.ajax(u);return c.then(function(e){n.set(n.parse(e))}),c.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),i=r(a),s=n(41),o=r(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=i.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),i=r(a),s=n(20),o=r(s),l=n(57),u=r(l),d=n(294),c=r(d),f=n(236),p=r(f),h=n(559),v=r(h),g=n(89),m=r(g),y=n(51),b=r(y),P=i.default.extend({name:"PlayerModel",
sessionAttrs:{playQueueItem:o.default.instanceOf(c.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,v.default),transcodeServer:o.default.instanceOf(m.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 w(){var e=this.get("duration"),t=this.get("position"),w=e?Math.min(Math.max(t/e*100,0),100):0;return w}},initialize:function(){this.on("change:state",this.onStateChange)},onStateChange:function(e,t){t!==b.default.states.STOPPED&&e.set("ended",!1)}});t.default=P,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(37),i=r(a),s=n(83),o=r(s),l=n(294),u=r(l),d=o.default.extend({model:u.default,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 e=this.parent.get("playQueueItem").get("metadataItem"),t=this.collection.findWhere({ratingKey:e.get("ratingKey")}),n=this.collection.indexOf(t),r=i.default.getChildMediaType(e.get("type")).element,a=this.windowSize[r],s=this.collection.reject(function(e){return e.get("advertisement")}).slice(n+1,n+a);if(this.parent.get("repeatAll")){var o=Math.max(a-s.length,0),l=this.collection.slice(0,Math.min(n,o));
s=s.concat(l)}this.set(s)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(28),o=r(s),l=n(133),u=r(l),d=n(63),c=r(d),f=n(420),p=r(f),h=function(e,t){return!e.get("relay")&&t.get("relay")?e:!t.get("relay")&&e.get("relay")?t:!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;
},v=o.default.extend({name:"ConnectionCollection",context:["server"],model:u.default,getBestConnection:function(){var e=c.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 i.default.reduce(n,h)},hasBetterConnectionCandidates:function(){var e=this.server&&this.server.get("activeConnection");return this.some(function(t){var n=t.get("isUntested")||t.get("isPending"),r=!e||t!==e&&h(t,e)===t;
return n&&r})},hasOnlyFailedConnections:function(){return this.every(function(e){return e.get("isFailed")})},hasFailedEveryDirectConnection:function(){return this.where({relay:!1}).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 r=p.default.getV4Subnet(n);return e||(e=r),e!==r}})}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(579),o=r(s),l=i.default.extend({name:"MediaGrabOperationCollection",context:["server"],model:o.default,comparator:function(e){var t=e.get("mediaItem");if(t){var n=t.beginsAt,r=t.startOffsetSeconds||0;return n-r}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(165),o=r(s),l=n(20),u=r(l),d=n(254),c=r(d),f=c.default.extend({
name:"SyncItemModel",context:["server","device"],urlRoot:function(){if(this.device)return"/devices/"+this.device.get("clientIdentifier")+"/sync_items"},syncedAttrs:i.default.extend({},c.default.prototype.syncedAttrs,{version:{type:u.default.integer,save:!0},metadataType:{type:u.default.string,save:!0},rootTitle:{type:u.default.string,save:!0},machineIdentifier:{type:u.default.string,save:!0},Server:u.default.object}),defaults:function(){return{Location:{},Device:{},Server:{}}},sync:function(e,t,n){
var r=o.default.addVersionHeaderForDevice(this.device,n);return c.default.prototype.sync.call(this,e,t,r)},getSaveParams:function(e,t){var n=c.default.prototype.getSaveParams.apply(this,arguments),r=n.Item;return i.default.each(r,function(e,t){""===e&&delete r[t]}),{SyncItem:r}}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(46),o=r(s),l=n(59),u=r(l),d=u.default.extend({urlRoot:"/api/home/users",
whitelistedAttrs:["id","uuid","admin","protected","restricted","guest","title","username","email","thumb"],convert:function(e){var t=i.default.isObject(e)?e:o.default.parseXML(e);return t.User&&(t=t.User),o.default.parseInteger(t,"id"),o.default.parseBoolean(t,["admin","protected","restricted","guest"]),t},parse:function(e){var t=this.convert(e);return t=i.default.pick(t,this.whitelistedAttrs)},getSaveParams:function(e,t){if(i.default.isEmpty(e)){var n={};return this.get("restricted")?n.title=this.get("title"):this.isNew()&&(n.invitedEmail=this.get("username")),
n}return u.default.prototype.getSaveParams.apply(this,arguments)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(20),o=r(s),l=n(22),u=r(l),d=n(1055),c=r(d),f={ACTIVE:"Active",INACTIVE:"Inactive",CANCELED:"Canceled"},p={NONE:"",LIFETIME:"lifetime",YEARLY:"yearly",MONTHLY:"monthly",LITE:"lite",COMPED:"comped",PRO:"pro"},h=u.default.extend({name:"UserSubscriptionModel",syncedAttrs:{active:o.default.boolean,
status:o.default.oneOf(f.ACTIVE,f.INACTIVE,f.CANCELED),plan:o.default.oneOf(p.NONE,p.LIFETIME,p.YEARLY,p.MONTHLY,p.LITE,p.COMPED,p.PRO)},syncedRelations:{features:{relationClass:c.default}},augmentResponse:function(e){var t=e.features;return t&&t.feature?i.default.extend({},e,{features:t.feature}):e}},{statuses:f,plans:p});t.default=h,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="RESET_PRIMARY_SERVER";t.RESET_PRIMARY_SERVER=n;var r="CHANGE_PRIMARY_SERVER";
t.CHANGE_PRIMARY_SERVER=r;var a="CONFIRM_RELAY_CONNECTION";t.CONFIRM_RELAY_CONNECTION=a},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),function(e){return e?e.desktop.libraries:void 0})}function a(){return(0,s.createSelector)(d.default,r(),function(e,t){return t?t.map(function(t){return e[t]}):[]})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(15),o=n(70),l=i(o),u=n(596),d=i(u);e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(35),o=r(s),l=n(12),u=r(l),d=n(32),c=r(d),f=n(56),p=r(f),h=o.default.extend({mixins:p.default,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(u.default,{"cycle:cache":this.cycle,"clearWhere:cache":this.clearWhere,"clearAll:cache":this.clearAll,"clearCycles:cache":this.clearCycles
}))},get:function(e){var t=this._cache[e];return t&&t._cacheCycle&&this.setItemCycle(t,e,i.default.first(this.cycles)),t},store:function(e,t){t||(t=this.getItemCacheKey(e)),this.remove(e),t&&(this.startListening(),e._cacheKey=t,this._cache[t]=e,this.size++,e.persistInCache||this.setItemCycle(e,t,i.default.first(this.cycles)))},getItemCacheKey:function(e){return i.default.result(e,"cacheKey")},setItemCycle:function(e,t,n){var r=e._cacheCycle;r&&r.hasOwnProperty(t)&&delete r[t],e._cacheCycle=n,n[t]=e;
},cycle:function(){this.size>this.maxSize&&(c.default.warn("Cache overflow, size: "+this.size),i.default.each(this.cycles.slice(1),this.removeCycle,this)),this.cycles.unshift({}),this.cycles.length>Math.max(this.maxCycles,1)&&this.removeCycle(i.default.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(e){i.default.each(i.default.values(e),this.remove,this);var t=i.default.indexOf(this.cycles,e);this.cycles.splice(t,1)},clearWhere:function(e){var t=i.default.where(i.default.values(this._cache),e);i.default.each(t,this.remove,this)},clearAll:function(){i.default.each(i.default.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()}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(396),o=r(s),l=o.default.extend({maxCycles:3,maxSize:20,get:function(e){var t=o.default.prototype.get.apply(this,arguments);return t&&t.every(function(e){return!(!e.cache||!e.cache.isListening)&&(e.cache.store(e),!0)}),t},getItemCacheKey:function(e){var t=i.default.result(e,"url");return e.server&&(t=e.server.getScopedKey(t)),t}});t.default=l,
e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="https://forums.plex.tv";t.FORUMS_URL=n;var r="https://support.plex.tv";t.SUPPORT_URL=r;var a="https://status.plex.tv";t.SYSTEM_STATUS_URL=a;var i="https://plex.tv/subscription/about";t.PLEX_PASS_INFO_URL=i;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 r(e,t){return e?s.default.reduce(t,function(t,n,r){
return e[r]!==n&&(t[r]=n),t},{}):t}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(640),i=r(a),s=n(86),o=r(s);t.default=(0,o.default)(i.default),e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(649),i=r(a),s=n(86),o=r(s);t.default=(0,o.default)(i.default),
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(417),i=r(a),s=n(86),o=r(s);t.default=(0,o.default)(i.default),e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){if(e){var r=(0,l.default)(e,{streamType:t.id});s.default.each(r,function(e){e.selected=e.id===n})}}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(119),l=a(o);t.default=r,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,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 r(e){return e=parseInt(e,10),e?e<2?(0,s.default)("Mono"):e<3?(0,s.default)("Stereo"):(e-1).toString()+".1":""}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),s=a(i);t.default=r,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)+" "+r[n+1]}Object.defineProperty(t,"__esModule",{value:!0});var r=["bps","kbps","Mbps","Gbps","Tbps"];t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(e=parseInt(e,10),
s.default.isNaN(e))return"";var t=e<10?"0":"";return t+e}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=s.default.pick(t,"type","controller","media","offset","media","autoplay","useMiniPlayer","isSwitchingPlayers","inline","playQueue","isFromCompanion","background"),r=t.playQueue;if(e=r?r.get("selectedItem"):e,n.model=e,n.autoplay=n.autoplay!==!1,e&&"track"===e.get("type")){var a=e.get("metadataItem")||e,i=t.enableTrackOffsets?a.get("viewOffset"):null;
s.default.isNumber(i)&&(n.offset=i)}return n.offset&&(n.offset=parseInt(n.offset,10)||0),n.type||(n.type=l.default.getTypeByElement((0,d.default)(e))),n}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(51),l=a(o),u=n(1122),d=a(u);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(32),o=r(s),l={ORIGINAL:-1,qualities:{},getQualityByIndex:function(e){if(e<0)return{
index:this.ORIGINAL};var t={index:e};return i.default.each(this.qualities,function(n,r){t[r]=i.default.result(this.qualities,r)[e]},this),t},getQualityCount:function(){var e=i.default.first(i.default.keys(this.qualities));return i.default.result(this.qualities,e).length},getQualityAttribute:function(e){var t,n=e.get("isLibraryItem"),r=e.get("isExtra")&&!/^file:\/\//.test(e.get("guid"));return t=n&&!r?e.server.hasLocalConnection()?"localQuality":"remoteQuality":"channelQuality","video"!==this.type?this.type+"!"+t:t;
},getSyncQualityAttribute:function(){return"syncQuality!"+this.type},getCurrentQuality:function(e,t){var n=this.getQualityAttribute(e),r=t.get(n);return r>=this.getQualityCount()&&(o.default.warn("Quality index "+r+" is out of bounds"),r=t.defaults[n],t.save(n,r)),i.default.extend(this.getQualityByIndex(r),{attribute:n})},getAvailableQualities:function(e){e||(e={});var t=e.lowestQualityIndex,n=e.highestQualityIndex,r=e.comparator,a=[];n===this.ORIGINAL&&(n=void 0);for(var i=0,s=this.getQualityCount();i<s;i++)if(!(t&&i<t)){
if(n&&i>n)return a;if(r&&r.call(this,i))return a;a.push(this.getQualityByIndex(i))}return a},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 r=0,a=e.length;r<a;r++){var i=e[r];if(i>t)break;n=r}}return n}};t.default=l,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e=s.default.isArray(e)?e:s.default.toArray(arguments),l.default.when.apply(l.default,s.default.map(e,d.default))}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(140),d=a(u);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){var r=e.get("entities").get(t);
if(r){var a=r.get(n);if(a)return a.get("model")}s.default.warn('An entity does not exist with the type "%s" and id "%s"',t,n)}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(32),s=a(i);e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=t.serverEntityID;return(0,v.default)(e,m.SERVER,n)}function a(e,t){var n=t.providerEntityID;return(0,v.default)(e,m.PROVIDER,n)}function i(e,t){var n=t.libraryEntityID;return(0,v.default)(e,m.LIBRARY,n)}function s(e,t){
var n=t.hubEntityID;return(0,v.default)(e,m.HUB,n)}function o(e,t){var n=t.metadataListEntityID;return(0,v.default)(e,m.METADATA_LIST,n)}function l(e,t){var n=t.metadataItemEntityID;return(0,v.default)(e,m.METADATA_ITEM,n)}function u(e,t){var n=t.sessionItemEntityID;return(0,v.default)(e,m.SESSION,n)}function d(e,t){var n=t.userPlaylistItemEntityID;return(0,v.default)(e,m.USER_PLAYLIST_ITEM,n)}function c(e,t){var n=t.mediaSubscriptionEntityID;return(0,v.default)(e,m.MEDIA_SUBSCRIPTION,n)}var f=n(1).default,p=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0}),t.findServerModel=r,t.findProviderModel=a,t.findLibraryModel=i,t.findHubModel=s,t.findMetadataListModel=o,t.findMetadataItemModel=l,t.findSessionModel=u,t.findUserPlaylistItemModel=d,t.findMediaSubscriptionModel=c;var h=n(412),v=f(h),g=n(72),m=p(g)},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 r=t-3-n;return e.substr(0,n)+"..."+e.substr(e.length-r)}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),i=r(a),s=n(202),o=r(s),l=["id","typeString"],u=(0,o.default)(l,[{id:1,typeString:"trailer",title:function(){return(0,i.default)("Trailer");
}},{id:2,typeString:"deletedScene",title:function(){return(0,i.default)("Deleted Scene")}},{id:3,typeString:"interview",title:function(){return(0,i.default)("Interview")}},{id:4,typeString:"musicVideo",title:function(){return(0,i.default)("Music Video")}},{id:5,typeString:"behindTheScenes",title:function(){return(0,i.default)("Behind the Scenes")}},{id:6,typeString:"scene",title:function(){return(0,i.default)("Scene")}},{id:7,typeString:"liveMusicVideo",title:function(){return(0,i.default)("Live Music Video");
}},{id:8,typeString:"lyricMusicVideo",title:function(){return(0,i.default)("Lyric Music Video")}},{id:9,typeString:"concert",title:function(){return(0,i.default)("Concert")}},{id:10,typeString:"featurette",title:function(){return(0,i.default)("Featurette")}},{id:11,typeString:"short",title:function(){return(0,i.default)("Short")}},{id:12,typeString:"other",title:function(){return(0,i.default)("Other")}}]);t.default=u,e.exports=t.default},function(e,t,n){"use strict";function r(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 a(e){if(d.test(e)){var t=e.split("::"),n=t[0].match(c),r={parts:[]};if(null!=n){if(n.length>8)return;r.parts=o.default.map(n,function(e){return parseInt(e,16)})}if(t.length>1){var a=t[1].match(c),i=o.default.map(a,function(e){return parseInt(e,16)}),s=8-r.parts.length-i.length;if(s<0||8===s)return;o.default.times(s,function(){r.parts.push(0)}),r.parts=r.parts.concat(i)}return r}}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(3),o=i(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})$/,d=/(([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,c=/[a-f0-9]{1,4}/gi,f={
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=r(e);return!(!t||!o.default.all(t.octets,function(e){return e>=0&&e<=255;
}))},isLoopbackV4Address:function(e){var t=r(e);return!(!t||127!==t.octets[0]&&!o.default.all(t.octets,function(e){return 0===e}))},isPrivateV4Address:function(e){var t=r(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=a(e);return!(!t||!o.default.all(t.parts,function(e){return e>=0&&e<=65535}))},isLoopbackV6Address:function(e){var t=a(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=a(e);return!!(t&&t.parts[0]>=64512&&t.parts[0]<=65023)},getV4Subnet:function(e){return f.isValidV4Address(e)?e.split(".").slice(0,-1).join("."):""}};t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2256),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({className:"circle-progress",template:i.default,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,r=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",r),this.ui.svgCircle.css("stroke-width",this.lineWidth),this.ui.svgCircle.css("stroke",this.strokeColor),this.hasSize=!0);var a=this.model.get("progress"),i=(100-a)/100*r;this.ui.svgCircle.css("stroke-dashoffset",i)},onRender:function(){this.drawProgressBar()},onProgressChange:function(){this.drawProgressBar();
}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";function r(e){return b.default.createElement("img",e)}function a(e){var t=e.src,n=e.style,r=e.width,a=e.height,i=e.backgroundSize,o=e.backgroundPosition,l=c(e,["src","style","width","height","backgroundSize","backgroundPosition"]),u=s({backgroundImage:"url("+t+")",backgroundSize:i,backgroundPosition:o,width:r,height:a},n);return b.default.createElement("div",s({style:u},l))}function i(e){var t=e.component,n=e.transitionProps,r=e.isLoaded,a=e.style,i=e.src,o=e.prevSrc,l=c(e,["component","transitionProps","isLoaded","style","src","prevSrc"]),u=t;
return b.default.createElement(N.default,n,r&&b.default.createElement(u,s({style:$(2,a)},l,{src:i,key:i})),!r&&o&&b.default.createElement(u,s({style:$(1,a)},l,{src:o,key:o})))}var s=n(11).default,o=n(17).default,l=n(18).default,u=n(25).default,d=n(16).default,c=n(19).default,f=n(1).default,p=n(9).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ImgTag=r,t.BackgroundImgTag=a,t.TransitionImg=i;var h=n(3),v=f(h),g=n(8),m=f(g),y=n(4),b=f(y),P=n(24),w=n(26),S=p(w),_=n(244),T=f(_),I=n(65),M=f(I),C=n(1131),x=f(C),E=n(604),k=f(E),D=n(31),A=f(D),O=n(786),R=f(O),L=n(319),N=f(L),j=new k.default;
t.cache=j;var U="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";t.EMPTY_IMAGE=U,a.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},a.defaultProps={backgroundSize:"cover",backgroundPosition:"center"};var $=function(e,t){return s({position:"absolute",zIndex:e},t)};i.propTypes={component:y.PropTypes.oneOf([r,a]),transitionProps:y.PropTypes.shape(N.default.propTypes),
isLoaded:y.PropTypes.bool,prevSrc:y.PropTypes.string,src:y.PropTypes.string,style:y.PropTypes.object};var z=function(e){function t(e,n){d(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isLoaded:!1,url:this.getImageUrl(e),src:U,prevSrc:U}}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 r=this.state.src;
this.setState({isLoaded:!1,url:t,prevSrc:r}),this.loadImage(e,t)}}},{key:"shouldComponentUpdate",value:function(e,t){return(0,A.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,T.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 r=v.default.result(e,"url"),a=r.indexOf("?"),i=r;return a>-1?(i=S.join(r.substring(0,a),n),i+=i.indexOf("?")===-1?"?":"&",i+=r.substring(a+1)):i=S.join(i,n),i}}},{key:"getImageProps",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],t=e.exposeUrl,n=e.backgroundSize,r=e.backgroundPosition,a=e.width,i=e.height,s=e.style,o=e.className,l=this.state,u=l.src,d=l.url;return{"data-image-url":t?d:void 0,src:u,style:s,className:o,
backgroundSize:n,backgroundPosition:r,width:a,height:i}}},{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,x.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 r=m.default.Deferred(),a=j.getBlobUrl(n);if(a)return r.resolve({url:a
}),r.promise();var i=j.getPlaceholder(n);i&&r.notify({url:i,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"}),a=window.URL.createObjectURL(e);j.store({url:n,blobUrl:a}),r.resolve({url:a})}else r.reject({url:n})},s.send(),r.then(this.preloadImage,this.onError,this.preloadImage),r.promise();
}},{key:"preloadImage",decorators:[P.autobind],value:function(e){if(!this.props.allowImagePreloading)return m.default.Deferred().resolve(e).promise();var t=m.default.Deferred(),n=new Image,r=e.url,a=e.isPlaceholder;return n.onload=function(){n.onload=n.onabort=n.onerror=null,a?t.notify(e):t.resolve(e)},n.onabort=n.onerror=function(){n.onload=n.onabort=n.onerror=null,t.reject(e)},n.src=r,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:[P.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:[P.autobind],value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.url,n=e.isCanceled,r=void 0!==n&&n;r||(this.setState({isLoaded:!0,src:U}),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,d=l.prevSrc,c=t?a:r,f=this.getImageProps();return n?b.default.createElement(i,s({component:c,isLoaded:u,prevSrc:d,transitionProps:o},f)):b.default.createElement(c,s({},f,{src:u?f.src:d}))}}]),t}(y.Component);z.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},z.defaultProps={exposeUrl:!1,transition:!1,background:!1,minSize:!1,transitionProps:s({},R.default,{style:{position:"relative"}}),filters:{},allowImageBlobs:M.default.hasBlob&&M.default.hasObjectUrl,allowImagePreloading:!0,onLoad:function(){},onError:function(){}},t.default=z},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(11).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(3),c=u(d),f=n(4),p=(u(f),
n(33)),h=u(p),v=n(660),g=n(427),m=u(g),y=n(1159),b=u(y),P=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state=this._getListState(e),this._keyPool=(0,b.default)("cell"),this._shouldRequestPage=!1}return a(t,e),i(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,r=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!==r.visibleStartIndex||(t.visibleEndIndex!==r.visibleEndIndex||(t.partiallyVisibleStartIndex!==r.partiallyVisibleStartIndex||(t.partiallyVisibleEndIndex!==r.partiallyVisibleEndIndex||(t.renderStartIndex!==r.renderStartIndex||t.renderEndIndex!==r.renderEndIndex)))))))));
}},{key:"componentWillUpdate",value:function(e,t){this.props.onListUpdate&&t!==this.state&&this.props.onListUpdate(t)}},{key:"componentDidUpdate",value:function(){var e=this.state;this._shouldRequestPage&&(this._shouldRequestPage=!1,this.props.onPageRequest({startIndex:e.renderStartIndex,endIndex:e.renderEndIndex}))}},{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,r=e.layout,a=e.viewportWidth,i=e.viewportHeight,s=e.listTop,o=e.listLeft,l={viewportWidth:a,viewportHeight:i,listTop:s,listLeft:o};return r.getListStyle(l,n,t)}},{key:"renderCells",value:function(){var e=this.props,t=e.keyPropName,n=e.items,r=e.itemsOffset,a=e.size,i=e.layout,s=e.cellRenderer,l=e.isScrolling,u=e.onPageRequest,d=this.state,f=d.renderStartIndex,p=d.renderEndIndex,h=d.partiallyVisibleStartIndex,v=d.partiallyVisibleEndIndex,g=a>n.length&&p===n.length-1,m=this._keyPool.getKeys(f,p,n,r,t),y=[];
return c.default.each(m,function(e,r){var u=e.index,d=e.item,f=u>=h&&u<=v,p=i.getPositionForIndex(u,a,n);null===d&&(g=!0);var m={key:r,keyPropName:t,isVisible:f,isScrolling:l,cellIndex:u,cellX:p.cellX,cellY:p.cellY,cellWidth:p.cellWidth,cellHeight:p.cellHeight};c.default.isString(d)?m[t]=d:m=o({},d,m),y.push(s(m))}),this._shouldRequestPage=!!u&&(g&&!l),y}},{key:"render",value:function(){var e=this._getListStyle(this.props);return{$$typeof:l,type:"div",key:null,ref:null,props:{children:this.renderCells(),
className:(0,h.default)(this.props.className,this.props.isScrolling&&v.IS_SCROLLING),style:e},_owner:null}}}]),t}(f.Component);P.propTypes={className:f.PropTypes.string,keyPropName:f.PropTypes.string.isRequired,items:f.PropTypes.array.isRequired,itemsOffset:f.PropTypes.number.isRequired,size:f.PropTypes.number.isRequired,layout:m.default.isRequired,cellRenderer:f.PropTypes.func.isRequired,viewportWidth:f.PropTypes.number,viewportHeight:f.PropTypes.number,listTop:f.PropTypes.number,listLeft:f.PropTypes.number,
isScrolling:f.PropTypes.bool,scrollTop:f.PropTypes.number,scrollLeft:f.PropTypes.number,onListUpdate:f.PropTypes.func,onPageRequest:f.PropTypes.func},P.defaultProps={keyPropName:"entityID",items:[],itemsOffset:0,viewportWidth:0,viewportHeight:0,listTop:0,listLeft:0,isScrolling:!1},t.default=P,e.exports=t.default},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,n){"use strict";
function r(){function e(e,t){C=e.listTop,x=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)(d||e.viewportWidth,"A grid list must have a viewport width or a fixed number of columns");var n=e.viewportWidth-P-T,r=e.viewportHeight-y-S;i===u?n-=x:r-=C,E=I({innerViewportWidth:n,innerViewportHeight:r,innerHorizontalPadding:h,innerVerticalPadding:g}),k=M({cellWidth:E,innerViewportWidth:n,innerViewportHeight:r,innerHorizontalPadding:h,
innerVerticalPadding:g}),D=o||Math.floor((r+g)/(k+g)),A=d||Math.floor((n+h)/(E+h)),O=A*D;var a=i===u?A*(E+h)-h:Math.ceil(t/D)*(E+h)-h,l=i===u?Math.ceil(t/A)*(k+g)-g:D*(k+g)-g;return{width:a+P+T,height:l+y+S}}function t(e){(0,s.default)(void 0!==E,"`getListStyle` must be called before `getPositionForIndex`");var t=void 0,n=void 0;i===u?(t=e%A,n=Math.floor(e/A)):(t=Math.floor(e/D),n=e%D);var r=t*(E+h)+x+T,a=n*(k+g)+C+y;return{cellX:r,cellY:a,cellWidth:E,cellHeight:k}}function n(e,t,n){(0,s.default)(void 0!==E,"`getListStyle` must be called before `getRangesForPosition`");
var r=i===u?A:D,a=i===u?(e-C)/(k+g):(t-x)/(E+h),o=O+2*r+f*r*2,d=Math.round(a)*r,c=d+O-1,p=Math.floor(a)*r,v=d+O+r-1,m=p-r*f,y=(0,l.default)(m,n)+o-1;return y>=n&&(m=n-o),{visibleStartIndex:(0,l.default)(d,n),visibleEndIndex:(0,l.default)(c,n),partiallyVisibleStartIndex:(0,l.default)(p,n),partiallyVisibleEndIndex:(0,l.default)(v,n),renderStartIndex:(0,l.default)(m,n),renderEndIndex:(0,l.default)(y,n)}}var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],a=r.direction,i=void 0===a?u:a,o=r.rows,d=r.columns,c=r.overscan,f=void 0===c?0:c,p=r.innerHorizontalPadding,h=void 0===p?0:p,v=r.innerVerticalPadding,g=void 0===v?0:v,m=r.outerPaddingTop,y=void 0===m?0:m,b=r.outerPaddingRight,P=void 0===b?0:b,w=r.outerPaddingBottom,S=void 0===w?0:w,_=r.outerPaddingLeft,T=void 0===_?0:_,I=r.getCellWidth,M=r.getCellHeight,C=void 0,x=void 0,E=void 0,k=void 0,D=void 0,A=void 0,O=void 0;
return{options:r,getListStyle:e,getPositionForIndex:t,getRangesForPosition:n}}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(41),s=a(i),o=n(1160),l=a(o),u="vertical";t.VERTICAL=u;var d="horizontal";t.HORIZONTAL=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="default";t.DEFAULT=n;var r="primary";t.PRIMARY=r;var a="success";t.SUCCESS=a;var i="danger";t.DANGER=i;var s=[n,r,a,i];t.all=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var r=n(4),a=r.PropTypes.shape({getListStyle:r.PropTypes.func.isRequired,getPositionForIndex:r.PropTypes.func.isRequired,getRangesForPosition:r.PropTypes.func.isRequired});t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),a=r.PropTypes.shape({start:r.PropTypes.number.isRequired,end:r.PropTypes.number.isRequired,size:r.PropTypes.number.isRequired});t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var r=n(14),a={handleCollectUsageData:function(e){var t=(0,r.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 r=void 0;if(t){var a=t.get("settings"),i=a.get("collectUsageData");
r=i?i.get("value"):r,this.listenTo(a,"add change",this.onSettingsModelChange)}this._toggleAdapter(r)},onSettingsModelChange:function(e,t,n){if("collectUsageData"===e.id){var r=this._appModel.get("primaryServer");r&&r.id===e.server.id&&this._toggleAdapter(e.get("value"))}}};t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(161),i=r(a),s=n(83),o=r(s),l=n(1287),u=r(l),d=o.default.extend({model:u.default,url:"/playlists?type="+i.default.LOCAL,
parse:function(e){return this.convert(e,"Playlist")}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),i=r(a),s=n(20),o=r(s),l=n(297),u=r(l),d=n(676),c=r(d),f=n(1306),p=r(f),h={DEAD:"dead",ALIVE:"alive"};t.deviceStatuses=h;var v={DISABLED:"disabled",ENABLED:"enabled"};t.deviceStates=v;var g=i.default.extend({name:"MediaGrabberDeviceModel",context:["server"],rootPropertyName:"Device",idAttribute:"key",sessionAttrs:{
isChannelsPending:o.default.boolean,isChannelsPopulated:o.default.boolean,channelsError:o.default.object,selectedSource:o.default.string,isSaving:o.default.boolean,saveError:o.default.object},sessionRelations:{channels:{relationClass:p.default}},syncedAttrs:{key:o.default.integer,uuid:o.default.string,parentID:o.default.integer,uri:o.default.string,protocol:o.default.string,status:o.default.string,state:o.default.string,lastSeenAt:o.default.integer,make:o.default.string,model:o.default.string,modelNumber:o.default.string,
sources:o.default.list,tuners:o.default.integer},syncedRelations:{channelMappings:{rootPropertyName:"ChannelMapping",relationClass:c.default},prefs:{relationClass:u.default,rootPropertyName:"Setting",deferred:!0,save:!0}},defaults:{isChannelsPending:!1,isChannelsPopulated:!1,channelsError:null,isSaving:!1,saveError:null}});t.default=g},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),i=r(a),s=n(20),o=r(s),l=i.default.extend({name:"EPGLineupModel",
context:["server"],idAttribute:"uuid",rootPropertyName:"Lineup",syncedAttrs:{uuid:o.default.string,type:o.default.string,title:o.default.string,lineupType:o.default.integer,location:o.default.string},defaults:{location:""}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),i=r(a),s=n(20),o=r(s),l=i.default.extend({name:"EPGLanguageModel",context:["server"],rootPropertyName:"Language",idAttribute:"code",syncedAttrs:{
code:o.default.string,title:o.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(62),o=r(s),l=n(49),u=r(l),d=n(22),c=r(d),f=n(1317),p=r(f),h=c.default.extend({name:"SearchModel",context:["server","provider"],idAttribute:"providerEntityID",url:function(){return this.get("key")},sessionAttrs:{providerEntityID:i.default.string,key:i.default.string,isSearchPending:i.default.boolean,
isSearchPopulated:i.default.boolean,searchError:i.default.object},syncedRelations:{hubs:{relationClass:p.default,rootPropertyName:"Hub"}},defaults:{isSearchPending:!0,isSearchPopulated:!1},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=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(64),s=r(i),o=n(42),l=a(o),u=(0,s.default)(l.SELECT_ITEM);t.selectItem=u;var d=(0,s.default)(l.SELECT_MODELS);t.selectModels=d;var c=(0,s.default)(l.DESELECT_ALL_ITEMS);t.deselectAllItems=c;var f=(0,s.default)(l.DESELECT_MODELS);t.deselectModels=f;var p=(0,s.default)(l.DESELECT_COLLECTION);t.deselectCollection=p;var h=(0,s.default)(l.SELECT_RANGE);t.selectRange=h;var v=(0,s.default)(l.DESELECT_RANGE);t.deselectRange=v;var g=(0,s.default)(l.PLAY_SELECTED_ITEMS);t.playSelectedItems=g;
var m=(0,s.default)(l.ADD_SELECTED_ITEMS_TO_PLAYLIST);t.addSelectedItemsToPlaylist=m;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 P=(0,s.default)(l.REFRESH_SELECTED_ITEMS);t.refreshSelectedItems=P;var w=(0,s.default)(l.ANALYZE_SELECTED_ITEMS);t.analyzeSelectedItems=w;var S=(0,s.default)(l.SYNC_METADATA_ITEMS);t.syncSelectedItems=S;var _=(0,s.default)(l.OPTIMIZE_METADATA_ITEMS);t.optimizeSelectedItems=_;
var T=(0,s.default)(l.MERGE_SELECTED_ITEMS);t.mergeSelectedItems=T;var I=(0,s.default)(l.DELETE_SELECTED_ITEMS);t.deleteSelectedItems=I;var M=(0,s.default)(l.PLAY_SELECTED_ITEMS,function(){return{shuffle:!0}});t.shuffleSelectedItems=M;var C=(0,s.default)(l.UPDATE_SELECTED_ITEMS_WATCHED_STATUS,function(){return{watched:!0}});t.markSelectedItemsWatched=C;var x=(0,s.default)(l.UPDATE_SELECTED_ITEMS_WATCHED_STATUS,function(){return{watched:!1}});t.markSelectedItemsUnwatched=x},function(e,t,n){"use strict";
var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(64),s=r(i),o=n(42),l=a(o),u=(0,s.default)(l.INIT_LIVE_TV_SETTINGS_PAGE);t.initLiveTVSettingsPage=u;var d=(0,s.default)(l.CLEAR_LIVE_TV_SETTINGS_PAGE);t.clearLiveTVSettingsPage=d;var c=(0,s.default)(l.FETCH_DVRS);t.fetchDVRs=c;var f=(0,s.default)(l.REMOVE_DVR);t.removeDVR=f;var p=(0,s.default)(l.RELOAD_GUIDE);t.reloadGuide=p},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(64),s=r(i),o=n(42),l=a(o),u=(0,s.default)(l.FETCH_PLANS);t.fetchPlans=u;var d=(0,s.default)(l.POPULATE_PLANS);t.populatePlans=d;var c=(0,s.default)(l.REPOPULATE_UNWATCHED_WATCH_LATER_LIST);t.repopulateUnwatchedWatchLaterList=c;var f=(0,s.default)(l.REPOPULATE_UNWATCHED_RECOMMENDED_LIST);t.repopulateUnwatchedRecommendedList=f;var p=(0,s.default)(l.UPDATE_USER);t.updateUser=p;var h=(0,s.default)(l.CLEAR_UPDATE_USER_ERROR);t.clearUpdateUserError=h},function(e,t,n){"use strict";function r(){
return(0,o.createSelector)(function(e){return e.ui.liveTVSettingsPage},function(e,t){var n=t.dvrID;return n},function(e,t){var n=e.dvrs;return s.default.find(n,{key:t})})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(15);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2332),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(119),p=r(f),h=n(90),v=r(h),g=n(27),m=r(g),y=c.default.ItemView.extend({
tagName:"span",className:"dropdown",template:i.default,modelEvents:{"change:Media":"render","change:streams":"render"},events:{"click .dropdown-menu a":"onStreamClick"},initialize:function(e){this.streamType=v.default.get(e.type),this.disabled=e.disabled,this.media=e.media},serializeData:function(){var e=this.model.server.get("multiuser"),t=this.model.server.get("shared"),n=(0,p.default)(this.media,{streamType:this.streamType.id}),r=(0,p.default)(this.media,{streamType:this.streamType.id,selected:!0
}),a=o.default.first(r);return{showDropdown:!this.disabled&&n.length>1&&(!t||e),type:this.streamType.typeString,streams:n,selectedStream:a}},onRender:function(){this.$el.attr("id",this.streamType.typeString+"-dropdown")},onStreamClick:function(e){e.preventDefault();var t=(0,u.default)(e.currentTarget),n=t.data("id");m.default.execute("selectStream",{item:this.model,streamType:this.streamType,streamID:n})}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=n(5),c=r(d),f=u.default.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:(0,
c.default)("YYYY-MM-DD")};return r&&r.forEach(function(e){a[e]=(0,c.default)("MIXED")}),{item:n,locked:t,placeholders:a,canReparent:this.canReparent,canEditSimilarArtists:this.canEditSimilarArtists,disableIndices:!this.canReparent}},flushChanges:function(){},getLockedFieldsArray:function(){var e=this.ui.form,t=this.model.get("lockedFields").reduce(function(e,t){return e[t.get("name")]=t.get("locked"),e},{});return e.find(".edit-lock-addon").each(function(e,n){var r=(0,o.default)(n),a=r.data("field");
r.hasClass("locked")?t[a]=!0:a in t&&(t[a]=!1)}),i.default.map(t,function(e,t){return{name:t,locked:e}})},onLockClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget);t.hasClass("disabled")||(0,o.default)(e.currentTarget).toggleClass("locked")},onLockableFieldChange:function(e){var t=e instanceof o.default?e:(0,o.default)(e.currentTarget);if(!e.force){var n=t.data("original-value");if(void 0===n&&(n=t.attr("value")||t.val()),t.data("original-value",n),t.val()===n)return}t.siblings(".edit-lock-addon").addClass("locked");
}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(47),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=n(315),p=r(f),h=n(652),v=r(h),g=n(205),m=r(g),y=n(1149),b=r(y);n(900);var P=b.default.extend({mixins:m.default,paginated:!0,scrollPosition:0,scrollDirection:"down",mergeDelay:5e3,viewsByModel:{},initialize:function(e){b.default.prototype.initialize.apply(this,arguments),i.default.bindAll(this,"onResize","onScroll"),
this.listModel=e.listModel,this.mediaActions=e.mediaActions,m.default.initialize.apply(this,arguments),null!=e.paginated&&(this.paginated=e.paginated),this.channelName=e.channelName||"content",this.initializingScrollPosition=!0,this.merge=i.default.throttle(i.default.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),c.default.trigger(this.channelName+".subscribe:resize",this.onResize),c.default.trigger(this.channelName+".subscribe:scroll",this.onScroll),c.default.trigger("start:scrollListener")},getLockIndexes:function(){var e,t=this.getVisibleBounds(),n=this.getLockBounds(),r=this.getIndexBounds(),a=i.default.range(t.from,t.to+1),s=i.default.range(t.to+1,n.to+1),o=i.default.range(t.from-1,n.from-1,-1);return"down"===this.scrollDirection?(o.reverse(),
e=a.concat(s,o)):(a.reverse(),o.reverse(),e=a.concat(o,s)),i.default.filter(e,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(e){var t=this.getIndexBounds();this.pool.filter(function(e){return t.from<=e.id&&t.to>=e.id},this);var n=i.default.reject(e,this.getModelForId,this);if(n.length&&this.paginated){if(this.listModel.populatePromise&&"pending"===this.listModel.populatePromise.state())return void this.listModel.populatePromise.done(i.default.bind(this.prepareCells,this,e));var r=p.default.roundByPage({start:i.default.min(n),last:i.default.max(n)},2*this.getPageSize()),a=this.listModel.populateRange(r);
this.trigger("change:loading",!0,{prepend:"up"===this.scrollDirection}),a.always(i.default.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(e){var t=u.default.getOption(this,"itemViewOptions");
i.default.isFunction(t)&&(t=t.call(this,e)),t=i.default.clone(t),t.model=this.getModelForId(e.id),t.mediaActions=this.mediaActions,e.el&&(t.el=e.el);var n=u.default.getOption(this,"itemView");n._ensureElementExtension||(n._ensureElementExtension=n.extend({_ensureElement:function(){var e=this.el?i.default.result(this,"el"):o.default.$("<"+i.default.result(this,"tagName")+">");this.setElement(e,!1);var t=i.default.extend({},i.default.result(this,"attributes"));this.id&&(t.id=i.default.result(this,"id")),
this.className&&(t.class=i.default.result(this,"className")),this.$el.attr(t)}}));var r=new n._ensureElementExtension(t);return e.el||(this.$el.append(r.$el),e.el=r.el),this.forwardItemViewEvents(r),r.remove=function(){return this.stopListening(),this.$el.unbind(),this.$el.empty(),this},r},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||(b.default.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 e,t,n=this.listModel.section;if(n){var r=n.get("currentType"),a=this.listModel.getSort();if(e=r&&r.get("typeString"),a){var s=a.split(":");s.length&&(t=i.default.first(s))}}else e="clip";return{type:e,sort:t}},measureItem:function(){var e=this.createCellView({id:this.listModel.get("populatedRange").start});e.model||(this.remeasureItem=!0),e.render(),e.$el.css("visibility","hidden");var t=e.$el.appendTo(this.$el);i.default.defer(i.default.bind(function(){
this.itemWidth=t.outerWidth(!0),this.itemHeight=t.outerHeight(!0),this.itemMarginRight=parseInt(t.css("margin-right"),10),this.itemMarginBottom=parseInt(t.css("margin-bottom"),10),e.close(),e.$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,c.default.trigger("update:scrollPosition",n)},merge:function(){
if(!this.isClosed){var e=this.listModel.get("populatedRange"),t=e.start,n=e.end>this.itemsPerPageWithPadding?e.end:this.itemsPerPageWithPadding;if(n){if(t>0)return this.scrollDirection="up",void this.listModel.populateRange({start:0,size:t});this.listModel.set({currentPageStart:t,currentPageSize:n});var r=this.listModel.fetch();r.done(i.default.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?c.default.trigger("update:scrollPosition",this.listModel.scrollPosition):this.containerScrollPosition.scrollTop>0&&c.default.trigger("update:scrollPosition",0))},onDeselectAll:function(e){i.default.each(e,function(e){this.pool.each(function(t){t.view.model===e&&t.view.deselect()},this)},this)},onClose:function(){b.default.prototype.onClose.apply(this,arguments),m.default.onClose.apply(this,arguments),
c.default.trigger("stop:scrollListener"),c.default.trigger(this.channelName+".unsubscribe:resize",this.onResize),c.default.trigger(this.channelName+".unsubscribe:scroll",this.onScroll),this.listModel.scrollPosition=this.scrollPosition},onCollectionReset:function(e,t){this.isRefreshing||(v.default.cancel(this.cid),this.pool.each(function(e){e.id=e.filledWithIndex=this.collection.indexOf(e.view.model)},this),this.pool.reindex(),t&&t.previousModels&&i.default.each(t.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())}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2378),i=r(a),s=n(3),o=r(s),l=n(123),u=r(l),d=n(58),c=r(d),f=u.default.extend({className:"striped-list-item media-list-item media-details-list-item",template:i.default,ui:o.default.extend({poster:".media-poster"},u.default.prototype.ui),initialize:function(e){u.default.prototype.initialize.apply(this,arguments),this.model&&this.createImageView()},createImageView:function(){var e=this.type;"episode"===e&&(e="show"),this.image=new c.default({
model:this.model,type:e,getUrl:this.getPosterUrl,height:150})},bindings:o.default.extend({},u.default.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}})});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(205),i=r(a),s=n(43),o=r(s),l=o.default.extend({mixins:[i.default],onAddChild:function(e){this.forwardItemViewEvents(e)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});
var i=n(2418),s=r(i),o=n(3),l=r(o),u=n(124),d=r(u),c=n(26),f=a(c),p=d.default.extend({name:"downloadVersionModal",template:s.default,serializeData:function(){var e=this.model,t=l.default.map(this.model.get("Media"),function(t,n){var r=l.default.clone(t);r.downloadUrl=e.getDownloadUrl(n);var a=e.getFilepath(n);return a&&(r.downloadName=f.getLastSegment(a)),r});return{mediaItems:t}},onClick:function(){}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2426),i=r(a),s=n(8),o=r(s),l=n(27),u=r(l),d=n(124),c=r(d),f=c.default.extend({name:"playVersionModal",template:i.default,serializeData:function(){return{mediaItems:this.model.get("Media")}},onClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget).data("value"),n=this.model.get("Media")[t];u.default.execute("playMedia",{item:this.model,media:n}),this.promise.resolve(n),this.hide()}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(47),d=r(u),c=n(13),f=r(c),p=n(14),h=a(p),v=n(12),g=r(v),m=n(51),y=r(m),b=n(118),P=r(b),w=n(40),S=r(w),_=n(234),T=r(_),I=n(27),M=r(I),C=n(387),x=r(C);n(2540);var E=f.default.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(e){var t=e.playerModelClass||x.default;if(this.controller=e.controller,this.isNew=!e.controller,this.type=e.type,this.media=e.media,this.offset=e.offset,this.autoplay=e.autoplay,this.$el.addClass(this.type),this.isNew){var n=h.resolve("appModel"),r=n.get("primaryPlayer");this.controller=T.default.getInstance(this.type),!this.model&&this.playQueue&&(this.model=this.playQueue.get("selectedItem")),this.playQueue=e.playQueue,this.metadataItem=this.model.get("metadataItem"),this.playerModel=new t({
playQueueItem:this.model,metadataItem:this.metadataItem,playQueue:this.playQueue,volume:this.volumeSettingsKey?S.default.get(this.volumeSettingsKey):S.default.getInstance().defaults.volume,friendlyName:r?r.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=s.default.throttle(s.default.bind(this.persistPlayQueue,this),1e3),
this.$document=(0,l.default)(document),this.$document.on("MSFullscreenChange",s.default.bind(this.onFullscreenChange,this)),this.$document.on("mozfullscreenchange",s.default.bind(this.onFullscreenChange,this))},addListeners:function(){var e=h.resolve("appModel");this.listenTo(d.default.history,"route",this.onRouteChange),this.listenTo(e,"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(g.default,s.default.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===y.default.states.STOPPED)return void(document.title="Plex");var t,n=this.playerModel.get("metadataItem"),r=n.get("type");if("episode"===r){var a=(0,P.default)({seasonIndex:n.get("parentIndex"),episodeIndex:n.get("index"),date:n.get("originallyAvailableAt"),
noLeadingZero:!0,separator:" \xb7 "});t=n.get("grandparentTitle")+" - "+a}else if("track"===r){var i=n.get("originalTitle")||n.get("grandparentTitle");t=i?i+" - "+n.get("title"):n.get("title")}else t=n.get("title");e===y.default.states.PLAYING||e===y.default.states.BUFFERING?document.title="\u25b6 "+t:document.title=t},getListenerFor:function(e){return s.default.isFunction(this[e])?this[e]:s.default.bind(this.controller[e],this.controller)},minimize:function(){this.isSwitchingPlayers=!0,M.default.execute("playMedia",{
item:this.model,controller:this.controller,useMiniPlayer:!0,isSwitchingPlayers:!0})},maximize:function(){this.isSwitchingPlayers=!0,M.default.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({},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"))&&(g.default.trigger("navigate","details",{
serverID:this.model.server.id,key:e}),!0)},navigateToChannelItem:function(e){var t=this.model.channel;return!!t&&(g.default.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=h.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!==y.default.states.PAUSED},persistPlayQueue:function(){var e=this.playerModel;if(e&&this.playQueue.get("playQueueID")){var t=e.get("state");return t===y.default.states.STOPPED?void M.default.execute("persistPlayQueue",null):void M.default.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||g.default.trigger("hide:player",this)},onPrimaryPlayerChange:function(e,t){var n=this.playerModel.get("state"),r=this.playerModel.get("position"),a=this.controller.mediaElement;
this.playerModel.set("ready",!1),this.playerModel.set("friendlyName",t?t.get("friendlyName"):null),this.controller.stop({isSwitchingPlayers:!0}),this.controller=T.default.getInstance(this.type),this.stopListening(),this.addListeners(),this.startPlayback({offset:r,autoplay:this.canAutoplay(n),mediaElement:a})},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&&S.default.save(this.volumeSettingsKey,t)},onPlayerFinishedChange:function(e,t){if(t){var n=y.default.getElementByType(this.type);this.model.server.get("playQueueManager").remove(n),g.default.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?g.default.trigger("shortcut:increaseVolume"):e.deltaY<0&&g.default.trigger("shortcut:decreaseVolume")}});t.default=E,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(446),o=r(s),l=o.default.extend({className:"player mini-player",isMini:!0,regions:{controls:".mini-player-controls"},
shortcutListeners:function(){var e=o.default.prototype.shortcutListeners.apply(this,arguments);return i.default.omit(e,"shortcut:stop")}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2487),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=n(137),c=r(d),f=n(5),p=r(f),h=n(58),v=r(h),g=n(144),m=r(g),y=n(1411),b=r(y),P=n(1407),w=r(P),S=n(714),_=r(S),T=n(331),I=r(T),M=n(1455),C=r(M),x=n(691),E=r(x),k=n(1461),D=r(k),A=u.default.Layout.extend({
template:i.default,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 E.default({model:this.model,collection:t}),this.lyricsDropdown=new D.default({model:this.model}),this.setupPosterImage(),this.seekBarView=new _.default({model:this.model}),this.volumeSlider=new I.default({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 v.default({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"),r=this.ui.repeatBtn;
r.toggleClass("disabled",!e),n&&!t?(r.addClass("one"),r.addClass("selected")):t&&!n?(r.removeClass("one"),r.addClass("selected")):(r.removeClass("one"),r.removeClass("selected"))},updateAncillaryBtns:function(){var e=this.ui.shuffleBtn.parent(),t=this.model.get("showShuffle")||this.model.get("showRepeat")||this.model.get("showLyrics");(0,o.default)(e).toggleClass("hidden",!t)},updateRatingView:function(e){var t="track"===e.get("type");if(this.$(this.rating.el).toggleClass("hidden",!t),t){var n,r=e.get("isLibraryItem"),a=this.model.get("playQueueItem"),i=this.model.get("playQueue"),s=i&&i.get("isRadio"),o=a.get("advertisement");
o?n=w.default:s?n=b.default:r&&(n=m.default),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 C.default({model:e,playQueue:t})))},updateControlTooltips:function(){var e=this.model.get("playQueueItem"),t=e.get("advertisement")?(0,p.default)("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 r=e.get("originalTitle")||e.get("grandparentTitle");return r?r: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"),r=this.model.get("showLyrics"),a=e||n||r;return t.toggleClass("hidden",!a),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&&(0,c.default)(e)}},".separator":{modelAttribute:"duration",formatter:function(e){return!!e&&"/"}},".player-duration":{modelAttribute:"duration",formatter:function(e){return!!e&&(0,c.default)(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((0,c.default)(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)}});t.default=A,
e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.kind,r=e.size,i=e.direction,s=e.isSelected;return{$$typeof:a,type:"div",key:null,ref:null,props:{className:(0,l.default)(t,c.default.disclosureArrow,c.default[i],c.default[n],c.default[r],s&&c.default.isSelected)},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(33)),l=i(o),u=n(30),d=n(2051),c=i(d);r.propTypes={className:s.PropTypes.string,direction:s.PropTypes.oneOf(u.directions.all),
kind:s.PropTypes.oneOf(u.kinds.all),size:s.PropTypes.oneOf(u.sizes.all),isSelected:s.PropTypes.bool},r.defaultProps={direction:u.directions.DOWN,kind:u.kinds.DEFAULT,size:u.sizes.MEDIUM,isSelected:!1},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.circleClassName,r=e.iconClassName,o=e.title,l=i(e,["className","circleClassName","iconClassName","title"]);return u.default.createElement(p.default,s({className:t,"aria-label":(0,c.default)("Record {1}",o)
},l),{$$typeof:a,type:"div",key:null,ref:null,props:{children:{$$typeof:a,type:"span",key:null,ref:null,props:{className:r},_owner:null},className:n},_owner:null})}var a=n(7).default,i=n(19).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(34),p=o(f),h=n(2062),v=o(h);r.propTypes={className:l.PropTypes.string,circleClassName:l.PropTypes.string,iconClassName:l.PropTypes.string,title:l.PropTypes.string.isRequired},r.defaultProps={
className:v.default.recordButton,circleClassName:v.default.recordCircle,iconClassName:v.default.recordIcon},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(11).default,l=n(38).default,u=n(19).default,d=n(79).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=c(f),h=n(4),v=c(h),g=n(24),m=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state={}}return a(t,e),i(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:[g.autobind],value:function(e,t){this.setState(function(n){return null==t?(delete n[e],o({},n)):o({},n,l({},e,t))})}},{key:"onFormReset",decorators:[g.autobind],value:function(){var e=d(this.state).reduce(function(e,t){
return e[t]=void 0,e},{});this.setState(e)}},{key:"onSubmit",decorators:[g.autobind],value:function(e){e.preventDefault(),e.nativeEvent.preventDefault();var t=p.default.some(this.state,function(e,t){return 0!==e.errors.length});if(t){var n=p.default.mapObject(this.state,function(e){return o({},e,{showErrors:0!==e.errors.length})});this.setState(n)}else{var r=p.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,
u(e,["children","onChange"]));return v.default.createElement("form",o({},n,{onSubmit:this.onSubmit}),t)}}]),t}(h.Component);m.childContextTypes={formState:h.PropTypes.object,onInputChange:h.PropTypes.func,onFormReset:h.PropTypes.func},m.propTypes={children:h.PropTypes.node,onSubmit:h.PropTypes.func,onChange:h.PropTypes.func},m.defaultProps={onSubmit:function(){},onChange:function(){}},t.default=m,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.transitionProps,n=i(e,["transitionProps"]);
return l.default.createElement(f.default,a({style:v,background:!0,minSize:!0,transition:!0,transitionProps:a({className:h.default.imageContainer},d.default,t)},n))}var a=n(11).default,i=n(19).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(786),d=s(u),c=n(422),f=s(c),p=n(2074),h=s(p),v={width:"100%",height:"100%"};r.propTypes={transitionProps:o.PropTypes.object},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return{$$typeof:a,
type:"div",key:null,ref:null,props:{className:l.default.separator},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(2079)),l=i(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return o.default.createElement(u.default,a({className:c.default.toolbarMenu},e))}var a=n(11).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(104),u=i(l),d=n(2091),c=i(d);t.default=r,
e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(19).default,d=n(11).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=c(f),h=n(24),v=n(31),g=c(v),m=n(167),y=c(m),b=n(1681),P=c(b),w=n(1680),S=c(w),_=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isOpen:!1},this._isHovered=!1,this._isFocused=!1;
}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,g.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,r=e.tooltip,a=e.tooltipClassName,i=e.tooltipAttachment,s=e.tooltipTarget,c=e.tooltipOptions,f=e.onMouseEnter,h=e.onMouseLeave,v=e.onFocus,g=e.onBlur,m=e.onPress,b=u(e,["children","component","tooltip","tooltipClassName","tooltipAttachment","tooltipTarget","tooltipOptions","onMouseEnter","onMouseLeave","onFocus","onBlur","onPress"]),P=this.state.isOpen;
return p.default.createElement(n,d({ref:"target",onMouseEnter:(0,y.default)(this.onMouseEnter,f),onMouseLeave:(0,y.default)(this.onMouseLeave,h),onFocus:(0,y.default)(this.onFocus,v),onBlur:(0,y.default)(this.onBlur,g),onPress:(0,y.default)(this.onPress,m)},b),{$$typeof:l,type:S.default,key:null,ref:null,props:o(S.default.defaultProps,{children:r,className:a,attachment:i,options:c,target:s||this.refs.target,isOpen:!!r&&P}),_owner:null},t)}}]),t}(f.Component);_.propTypes={children:f.PropTypes.node,
className:f.PropTypes.string,component:f.PropTypes.func.isRequired,tooltip:f.PropTypes.string,tooltipClassName:f.PropTypes.string,tooltipAttachment:f.PropTypes.string,tooltipTarget:f.PropTypes.object,tooltipOptions:f.PropTypes.object,showOnHover:f.PropTypes.bool.isRequired,showOnFocus:f.PropTypes.bool.isRequired,hideOnPress:f.PropTypes.bool.isRequired,onMouseEnter:f.PropTypes.func,onMouseLeave:f.PropTypes.func,onFocus:f.PropTypes.func,onBlur:f.PropTypes.func,onPress:f.PropTypes.func},_.defaultProps={
component:P.default,showOnHover:!0,showOnFocus:!0,hideOnPress:!0},t.default=_,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.model,r=e.size,s=void 0;switch(n){case"HDHomeRun CONNECT":s=h.default;break;case"HDHomeRun EXPAND":s=g.default;break;case"HDHomeRun EXTEND":s=y.default;break;case"HDHomeRun PRIME":s=P.default}return{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{className:(0,u.default)(t,S.default[r]),src:s,background:!0}),
_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(33)),u=s(l),d=n(30),c=n(422),f=s(c),p=n(2702),h=s(p),v=n(2703),g=s(v),m=n(2704),y=s(m),b=n(2705),P=s(b),w=n(2095),S=s(w);r.propTypes={className:o.PropTypes.string,model:o.PropTypes.string,size:o.PropTypes.oneOf(d.sizes.all)},r.defaultProps={className:S.default.image,size:d.sizes.SMALL},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return s.default.createElement("div",e,(0,
l.default)("Powered by {1}","Gracenote\xae"))}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),s=a(i),o=n(5),l=a(o),u=n(2098),d=a(u);r.defaultProps={className:d.default.attribution},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(5),p=u(f),h=n(24),v=n(1138),g=u(v),m=n(30),y=n(31),b=u(y),P=n(427),w=u(P),S=n(36),_=u(S),T=n(34),I=u(T),M=n(725),C=u(M),x=n(2113),E=u(x),k=function(e){
function t(e,n){s(this,t),r(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 a(t,e),i(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&&this.props.onListReady())}},{key:"shouldComponentUpdate",
value:function(e,t){return(0,b.default)(this,e,t)}},{key:"onListUpdate",decorators:[h.autobind],value:function(e){var t=e.visibleStartIndex,n=e.visibleEndIndex,r=e.renderEndIndex,a=e.listStyle,i=this.props.onListReady,s=this._isReady?void 0:i;this._isReady=!0,this._visibleStartIndex=t,this._visibleEndIndex=n,this._pageSize=this._visibleEndIndex-this._visibleStartIndex;var o=t>0,l=r>n;this.setState({showActions:o||l,enablePrevious:o,enableNext:l,listHeight:a.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,r=e.listType,a=e.listContext,i=e.size,s=e.more,u=e.random,d=e.totalSize,f=e.keyPropName,h=e.itemsOffset,v=e.items,y=e.layout,b=e.cellRenderer,P=e.onPageRequest,w=this.state,S=w.showActions,T=w.enablePrevious,M=w.enableNext,x=w.listHeight;
if(!i&&!d)return null;var k=(0,g.default)(t),D=s?i+1:i,A={visibility:"auto"===x?"hidden":"inherit"},O={height:x,overflow:"hidden"};return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{children:n?{$$typeof:o,type:I.default,key:null,ref:null,props:l(I.default.defaultProps,{children:k,className:E.default.hubLink,to:n}),_owner:null}:k,className:E.default.hubTitle},_owner:null},S&&{$$typeof:o,
type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:I.default,key:null,ref:null,props:l(I.default.defaultProps,{children:{$$typeof:o,type:_.default,key:null,ref:null,props:l(_.default.defaultProps,{name:"plex-icon-hub-prev-560","aria-label":(0,p.default)("Previous Page")}),_owner:null},className:E.default.hubScrollButton,isDisabled:!T,onPress:this.onPreviousPress}),_owner:null},{$$typeof:o,type:I.default,key:null,ref:null,props:l(I.default.defaultProps,{children:{$$typeof:o,type:_.default,
key:null,ref:null,props:l(_.default.defaultProps,{name:"plex-icon-hub-next-560","aria-label":(0,p.default)("Next Page")}),_owner:null},className:E.default.hubScrollButton,isDisabled:!M,onPress:this.onNextPress}),_owner:null}],className:E.default.hubActions},_owner:null}],className:E.default.hubHeader},_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:c.default.createElement(C.default,{ref:"list",ignoreHeight:!0,keyPropName:f,items:v,itemsOffset:h,listType:r,listContext:a,scrollDirection:m.scrollDirections.HORIZONTAL,
scrollIndex:this.state.scrollIndex,size:u?i:d||D,layout:y,cellRenderer:b,onListUpdate:this.onListUpdate,onListScrollIndexChange:this.onListScrollIndexChange,onPageRequest:P}),style:O},_owner:null}],className:E.default.hubContainer,style:A},_owner:null}}}]),t}(d.Component);k.propTypes={hubIdentifier:d.PropTypes.string.isRequired,title:d.PropTypes.string.isRequired,hubLink:d.PropTypes.string,size:d.PropTypes.number.isRequired,more:d.PropTypes.bool,random:d.PropTypes.bool,listType:d.PropTypes.string.isRequired,
listContext:d.PropTypes.string.isRequired,keyPropName:d.PropTypes.string.isRequired,items:d.PropTypes.array.isRequired,itemsOffset:d.PropTypes.number,layout:w.default.isRequired,cellRenderer:d.PropTypes.func.isRequired,totalSize:d.PropTypes.number,onListReady:d.PropTypes.func,onPageRequest:d.PropTypes.func},t.default=k,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,v.createSelector)(function(e,t){var n=t.listType;return n},(0,M.default)(),function(e,t){if(!t||e&&"mixed"!==e)return e;
var n=t.type,r=t.extraType,a=r&&P.default.get(r);return a?a.typeString:n})}function a(){return(0,v.createSelector)((0,M.default)(),k.default,function(e,t){return!!e&&(0,A.default)(t,e.ratingKey)})}function i(){return(0,v.createSelector)(function(e,t){var n=t.listContext;return n},function(e,t){var n=t.cellWidth;return n},(0,M.default)(),r(),a(),x.default,function(e,t,n,r,a,i){void 0===n&&(n={});var s=(0,T.default)(t,null,r,n,e),o=n.type&&y.default.getChildMediaType(n.type),l=o&&o.element;return{isLoading:!n.key,
isContinueWatching:e===S.default.CONTINUE_WATCHING,metadataKey:n.key,type:r,selectionType:l,activeSelectionType:i.activeSelectionType,isSelected:a,imageWidth:s.width,imageHeight:s.height,imageUrl:s.url}})}var s=n(17).default,o=n(18).default,l=n(25).default,u=n(16).default,d=n(11).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=c(f),h=n(21),v=n(15),g=n(24),m=n(37),y=c(m),b=n(419),P=c(b),w=n(114),S=c(w),_=n(488),T=c(_),I=n(48),M=c(I),C=n(170),x=c(C),E=n(1401),k=c(E),D=n(1940),A=c(D),O=n(169),R=n(1721),L=c(R),N={
selectMetadataListItem:O.selectMetadataListItem,deselectMetadataListItem:O.deselectMetadataListItem},j=function(e){function t(){u(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),l(t,[{key:"onSelectItem",decorators:[g.autobind],value:function(e){var t=this.props.metadataListEntityID;this.props.selectMetadataListItem(d({metadataListEntityID:t},e))}},{key:"onDeselectItem",decorators:[g.autobind],value:function(e){var t=this.props.metadataListEntityID;
this.props.deselectMetadataListItem(d({metadataListEntityID:t},e))}},{key:"render",value:function(){return p.default.createElement(L.default,d({onSelectItem:this.onSelectItem,onDeselectItem:this.onDeselectItem},this.props))}}]),t}(f.Component);j.propTypes={serverEntityID:f.PropTypes.string.isRequired,metadataListEntityID:f.PropTypes.string,metadataItemEntityID:f.PropTypes.string,selectMetadataListItem:f.PropTypes.func.isRequired,deselectMetadataListItem:f.PropTypes.func.isRequired},t.default=(0,h.connect)(i,N)(j),
e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.type,r=u.default.get(n),s=r&&r.typeString;switch(s){case"show":case"playlist":case"season":return{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{className:t,name:"plex-icon-dvr-series-560"}),_owner:null};default:return{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{className:t,name:"plex-icon-dvr-single-560"}),_owner:null}}}var a=n(10).default,i=n(7).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(37)),u=s(l),d=n(36),c=s(d);r.propTypes={className:o.PropTypes.string,type:o.PropTypes.string.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.component,r=e.isSecondary,s=e.isSplitLeft,o=e.isSplitRight,u=a(e,["className","component","isSecondary","isSplitLeft","isSplitRight"]);return l.default.createElement(n,i({className:(0,d.default)(t,f.default.title,r&&f.default.isSecondary,s&&f.default.isSplitLeft,o&&f.default.isSplitRight)
},u))}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(33),d=s(u),c=n(2130),f=s(c);r.propTypes={className:o.PropTypes.string,component:o.PropTypes.func.isRequired,isSecondary:o.PropTypes.bool,isSplitLeft:o.PropTypes.bool,isSplitRight:o.PropTypes.bool},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.imageWidth,n=e.imageHeight,r=e.imageUrl,s=a(e,["imageWidth","imageHeight","imageUrl"]);return l.default.createElement(d.default,i({
className:h.default.card,component:f.default,width:t,height:n,url:r},s))}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(336),d=s(u),c=n(1744),f=s(c),p=n(2131),h=s(p);r.propTypes={imageWidth:o.PropTypes.number.isRequired,imageHeight:o.PropTypes.number.isRequired,imageUrl:o.PropTypes.oneOfType([o.PropTypes.func,o.PropTypes.string])},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.grandparentTitle,n=a(e,["grandparentTitle"]);
return l.default.createElement(d.default,i({},n,{title:t}))}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(340),d=s(u);r.propTypes={grandparentTitle:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),(0,d.default)(),(0,f.default)(),function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return{server:e,provider:t,grandparentKey:n.grandparentKey,
grandparentTitle:n.grandparentTitle}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(67),l=a(o),u=n(73),d=a(u),c=n(48),f=a(c),p=n(1749),h=a(p);t.default=(0,i.connect)(r)(h.default),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return{title:e.title}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(48),l=a(o),u=n(340),d=a(u);
t.default=(0,i.connect)(r)(d.default),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.title,r=e.route,l=s(e,["className","title","route"]);return{$$typeof:a,type:"span",key:null,ref:null,props:{children:[d.default.createElement(g.default,o({title:n,route:r},l)),n&&m,n&&{$$typeof:a,type:h.default,key:null,ref:null,props:i(h.default.defaultProps,{title:n,route:r}),_owner:null}],className:t},_owner:null}}var a=n(7).default,i=n(10).default,s=n(19).default,o=n(11).default,l=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(125),f=l(c),p=n(274),h=l(p),v=n(750),g=l(v),m={$$typeof:a,type:f.default,key:null,ref:null,props:i(f.default.defaultProps,{}),_owner:null};r.propTypes={className:u.PropTypes.string,title:u.PropTypes.string,route:u.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return{
year:e.year}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(48),l=a(o),u=n(751),d=a(u);t.default=(0,i.connect)(r)(d.default),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(19).default,d=n(11).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=c(f),h=n(31),v=c(h),g=n(36),m=c(g),y=n(214),b=c(y),P=function(e){function t(){
s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.icon,r=e.label,a=e.isMenuOpen,i=u(e,["children","icon","label","isMenuOpen"]);return p.default.createElement(b.default,d({"aria-haspopup":!0,tooltip:a?void 0:r,hideOnPress:!1},i),{$$typeof:l,type:m.default,key:null,ref:null,props:o(m.default.defaultProps,{
name:n,"aria-label":r}),_owner:null},t)}}]),t}(f.Component);P.propTypes={children:f.PropTypes.node,icon:f.PropTypes.string.isRequired,label:f.PropTypes.string.isRequired,isMenuOpen:f.PropTypes.bool.isRequired},t.default=P,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=a(e,["className"]);return l.default.createElement(d.default,i({className:t},n))}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(125),d=s(u),c=n(2140),f=s(c);
r.propTypes={className:o.PropTypes.string},r.defaultProps={className:f.default.pageHeaderSeparator},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.machineIdentifier,n=e.providerIdentifier,r=e.isLibraryProvider,o=e.directories,l=e.selectedDirectory,d=s(e,["machineIdentifier","providerIdentifier","isLibraryProvider","directories","selectedDirectory"]),f=l&&(l.hubKey||l.key),h=encodeURIComponent(t),g=encodeURIComponent(n);return u.default.createElement(p.default,d,o&&o.map(function(e){
var t=e.key,n=e.hubKey,s=e.title,o=e.isHomeDirectory;if(r&&!n)return null;var l=n||t,u=encodeURIComponent(l),d=r?"#!/server/"+h+"/dashboard?key="+u:"#!/server/"+h+"/provider/"+g+"?key="+u;return{$$typeof:i,type:v.default,key:l,ref:null,props:a(v.default.defaultProps,{children:o?(0,c.default)("All Libraries"):s,to:d,isSelected:f===l}),_owner:null}}))}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(104),p=o(f),h=n(126),v=o(h);
r.propTypes={machineIdentifier:l.PropTypes.string.isRequired,providerIdentifier:l.PropTypes.string.isRequired,isLibraryProvider:l.PropTypes.bool.isRequired,directories:l.PropTypes.array.isRequired,selectedDirectory:l.PropTypes.object.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,f.createSelector)((0,h.default)(),(0,g.default)(),(0,y.default)(),function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=l.default.pick(n,"librarySectionKey","Producer","Director","Writer","studio");
return i({server:e,provider:t},r)})}function a(e){return d.default.createElement(P.default,e)}var i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=s(o),u=n(4),d=s(u),c=n(21),f=n(15),p=n(67),h=s(p),v=n(73),g=s(v),m=n(48),y=s(m),b=n(1820),P=s(b);a.propTypes={serverEntityID:u.PropTypes.string.isRequired,providerEntityID:u.PropTypes.string.isRequired,metadataItemEntityID:u.PropTypes.string.isRequired},t.default=(0,c.connect)(r)(a),e.exports=t.default},function(e,t,n){
"use strict";function r(e){var t=e.children,n=e.className,r=e.labelClassName,i=e.contentClassName,s=e.label;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:"div",key:null,ref:null,props:{children:s,className:r},_owner:null},{$$typeof:a,type:"div",key:null,ref:null,props:{children:t,className:i},_owner:null}],className:n},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(2167)),l=i(o);r.propTypes={children:s.PropTypes.node,
className:s.PropTypes.string,labelClassName:s.PropTypes.string,contentClassName:s.PropTypes.string,label:s.PropTypes.string.isRequired},r.defaultProps={className:l.default.groupItem,labelClassName:l.default.label},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children,r=e.posterWidth;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:n,className:t,style:{paddingLeft:r+60}},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(4),o=(i(s),n(2172)),l=i(o);r.propTypes={className:s.PropTypes.string,children:s.PropTypes.node,posterWidth:s.PropTypes.number},r.defaultProps={className:l.default.content},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:n,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(2173)),l=i(o);
r.propTypes={className:s.PropTypes.string,children:s.PropTypes.node},r.defaultProps={className:l.default.innerContent},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.metadataItemEntityID,s=e.metadataKey,o=e.type,l=e.posterType,u=e.pageHeight,d=e.posterWidth,p=e.posterTop,v=e.posterUrl,g=l||o,y=d,b=(0,f.getHeight)(y,g,c.default.PRE_PLAY);return b>u-m&&(b=u-m,y=(0,f.getWidth)(b,g,c.default.PRE_PLAY)),{$$typeof:a,type:"div",
key:null,ref:null,props:{children:{$$typeof:a,type:h.default,key:null,ref:null,props:i(h.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r,metadataKey:s,type:o,imageWidth:y,imageHeight:b,imageUrl:v,showLink:!1,showEdit:!1,showMore:!1}),_owner:null},style:{position:"fixed",top:p}},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(188)),u=s(l),d=n(114),c=s(d),f=n(187),p=n(739),h=s(p),v=parseInt(u.default.pagePadding,10),g=40,m=2*v+g;
r.propTypes={serverEntityID:o.PropTypes.string,providerEntityID:o.PropTypes.string,metadataItemEntityID:o.PropTypes.string,metadataKey:o.PropTypes.string.isRequired,type:o.PropTypes.string.isRequired,posterType:o.PropTypes.string,pageHeight:o.PropTypes.number.isRequired,posterWidth:o.PropTypes.number.isRequired,posterTop:o.PropTypes.number.isRequired,posterUrl:o.PropTypes.func},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children;return{$$typeof:a,
type:"div",key:null,ref:null,props:{children:n,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(2174)),l=i(o);r.propTypes={className:s.PropTypes.string,children:s.PropTypes.node},r.defaultProps={className:l.default.primaryTitle},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:n,className:t},_owner:null
}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(2176)),l=i(o);r.propTypes={className:s.PropTypes.string,children:s.PropTypes.node},r.defaultProps={className:l.default.secondaryTitle},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children;return{$$typeof:i,type:u.default,key:null,ref:null,props:a(u.default.defaultProps,{children:n,className:t}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(716)),u=s(l),d=n(2177),c=s(d);r.propTypes={className:o.PropTypes.string,children:o.PropTypes.node},r.defaultProps={className:c.default.summary,children:""},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)(function(e){return e.ui.prePlayPage},function(e){var t=e.relatedHubs,n=e.isRelatedHubsPending;return{relatedHubEntityIDs:t,showSpinner:!t.length&&n}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(21),s=n(15),o=n(1827),l=a(o);t.default=(0,i.connect)(r)(l.default),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.posterTop,n=e.pageHeight,r=t+n-2*h-g*v;return{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{style:{position:"fixed",top:r}}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(188)),u=s(l),d=n(1942),c=s(d),f=n(457),p=s(f),h=parseInt(u.default.pagePadding,10),v=parseInt(c.default.defaultFontSize,10),g=parseFloat(c.default.lineHeightComputed,10);
r.propTypes={pageHeight:o.PropTypes.number.isRequired,posterTop:o.PropTypes.number.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(5)),f=u(c),p=n(24),h=n(31),v=u(h),g=n(30),m=n(81),y=u(m),b=n(460),P=u(b),w=n(215),S=u(w),_=n(2182),T=u(_),I=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state={isSubscribeModalOpen:e.isSubscribeModalOpen}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"onRecordPress",decorators:[p.autobind],value:function(e){this.setState({isSubscribeModalOpen:!0})}},{key:"onSubscribeModalClose",decorators:[p.autobind],value:function(){this.setState({isSubscribeModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.metadataItemEntityID,r=e.type,a=e.isSubscribed,i=e.subscriptionType,s=e.grandparentSubscriptionType,u=this.state.isSubscribeModalOpen;
return{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{children:[{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{className:a?T.default.recordingIcon:T.default.recordIcon,type:s||i||r}),_owner:null},a?(0,f.default)("Recording Scheduled"):(0,f.default)("Record"),{$$typeof:l,type:S.default,key:null,ref:null,props:o(S.default.defaultProps,{serverEntityID:t,metadataItemEntityID:n,isOpen:u,subscriptionType:r,onModalClose:this.onSubscribeModalClose
}),_owner:null}],className:T.default.recordButton,size:g.sizes.SMALL,onPress:this.onRecordPress}),_owner:null}}}]),t}(d.Component);I.propTypes={serverEntityID:d.PropTypes.string.isRequired,metadataItemEntityID:d.PropTypes.string.isRequired,type:d.PropTypes.string.isRequired,isSubscribed:d.PropTypes.bool,subscriptionType:d.PropTypes.string,grandparentSubscriptionType:d.PropTypes.string,isSubscribeModalOpen:d.PropTypes.bool},I.defaultProps={isSubscribeModalOpen:!1},t.default=I,e.exports=t.default},function(e,t,n){
"use strict";function r(e){var t=e.children,n=e.mediaItem,r=n&&n.videoResolution,s=!1,o=void 0;if(r){var l=parseInt(r,10);s=!0,o=l>=720||4===l||8===l}return t||s?{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{children:[t,s&&{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{children:o?(0,u.default)("HD"):(0,u.default)("SD"),label:(0,u.default)("Video")}),_owner:null}]}),_owner:null}:null}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(763),c=s(d),f=n(472),p=s(f);r.propTypes={children:o.PropTypes.node,mediaItem:o.PropTypes.object},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.server,r=e.provider,s=e.librarySectionKey,o=e.contentRating,l=e.genres,u=!!o,d=!(!l||!l.length);return{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{children:[{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{
children:t}),_owner:null},{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:[u&&{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{server:n,provider:r,librarySectionKey:s,contentRating:o}),_owner:null},u&&d&&T,d&&{$$typeof:i,type:_.default,key:null,ref:null,props:a(_.default.defaultProps,{server:n,provider:r,librarySectionKey:s,tags:l,limit:2}),_owner:null}]}),_owner:null}]}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(75)),u=s(l),d=n(74),c=s(d),f=n(1824),p=s(f),h=n(342),v=s(h),g=n(1823),m=s(g),y=n(1818),b=s(y),P=n(1819),w=s(P),S=n(764),_=s(S),T={$$typeof:i,type:w.default,key:null,ref:null,props:a(w.default.defaultProps,{}),_owner:null};r.propTypes={children:o.PropTypes.node,server:u.default.isRequired,provider:c.default.isRequired,librarySectionKey:o.PropTypes.string.isRequired,contentRating:o.PropTypes.string,genres:o.PropTypes.array},t.default=r,
e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.title,n=e.children;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:"div",key:null,ref:null,props:{children:t,className:l.default.sidebarListHeader,role:"header"},_owner:null},n],role:"navigation"},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(2220)),l=i(o);r.propTypes={title:s.PropTypes.string.isRequired,children:s.PropTypes.node
},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(21),c=n(15),f=n(304),p=o(f),h=n(437),v=n(1930),g=o(v),m=(0,c.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),
r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(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(g.default,this.props)}}]),t}(l.Component);y.propTypes={isSignedIn:l.PropTypes.bool.isRequired,fetchPlans:l.PropTypes.func.isRequired
},t.default=(0,d.connect)(function(e){return m(e)},{fetchPlans:h.fetchPlans})(y),e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],r=arguments.length<=3||void 0===arguments[3]?0:arguments[3];t===c.default.CONTINUE_WATCHING&&n<0&&n++;var i=e+t+n+r;if(m.hasOwnProperty(i))return m[i];var l=(0,f.getAspectRatio)(e,t),d=parseInt(u.default.posterTitleHeight,10),p=parseInt(u.default.posterTitlePadding,10),v=void 0,y=void 0,b=void 0,P=void 0;
t===c.default.CONTINUE_WATCHING?(v=2,y=300,b=1,P=4,p*=2):(v="mixed"===e?r+3:r,y=l>1?180:120,b=2,P=11);var w=v*d+p,S=(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,h.default)(a({},e,{minCellWidth:y,minColumns:b,maxColumns:P,columnAdjustment:n,aspectRatio:l}))},getCellHeight:function(e){return(0,g.default)(a({},e,{aspectRatio:l,titleHeight:w
}))}});return S.cellOptions={minCellWidth:y,minColumns:b,maxColumns:P,columnAdjustment:n,aspectRatio:l,titleHeight:w},m[i]=S,S}var a=n(11).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(425),o=i(s),l=n(188),u=i(l),d=n(114),c=i(d),f=n(187),p=n(780),h=i(p),v=n(779),g=i(v),m={};e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=j.default.get(e);return!(!t||!t.child)}function a(e){return!!e.provider.protocols.stream&&!e.hasInvalidKey&&!e.deletedAt;
}function i(e){return!!a(e)&&(e.Media&&e.Media.length>1)}function s(e){return a(e)}function o(e){return a(e)&&!!e.provider.features.playqueue}function l(e){return!!e.primaryExtraKey}function u(e){return!!O.default.findWhere(e.related,{browse:!1})}function d(e){return!!e.isLibraryItem}function c(e){return!!e.provider.features.timeline&&(r(e.type)?e.unviewedLeafCount>0:!e.viewCount||!!e.viewOffset)}function f(e){return!!e.provider.features.timeline&&(r(e.type)?e.viewedLeafCount>0:!!e.viewCount||!!e.viewOffset);
}function p(e){return!!e.provider.features.manage}function h(e){return p(e)}function v(e){return p(e)}function g(e){return!!p(e)&&!(!e.guid||/(local|none)\:\/\//.test(e.guid))}function m(e){return!!p(e)&&(!!e.guid&&!g(e))}function y(e){return g(e)}function b(e){if(!p(e))return!1;var t=void 0;return t=r(e.type)?e.Location:O.default.filter(e.Media,function(e){return!e.proxyType}),t.length>1}function P(e){return!(!e.server.isFullServer||!e.isLibraryItem)&&!(!e.server.allowSync||!e.allowSync)}function w(e){
return!!p(e)&&!!e.server.transcoderVideo}function S(e){return!!e.provider.protocols.download}function _(e){return!1}function T(e){return!1}function I(e){return!1}function M(e){return!!p(e)&&!!e.server.allowMediaDeletion}function C(e){if(!p(e))return!1;if(!e.server.allowMediaDeletion)return!1;var t=O.default.filter(e.Media,function(e){return!!e.proxyType});return t.length>0}function x(e){var t="photo"===e.type&&!e.isLibraryItem;return!t}function E(e){return!!e.isLibraryItem&&(!e.activeSelectionType||e.type===e.activeSelectionType);
}function k(e){var t=e.type,n=$[t];(0,L.default)(O.default.isArray(n),"getMetadataActionProps: Invalid type, "+t+", provided");var r=n.reduce(function(n,r){var a=U[r];return(0,L.default)(O.default.isFunction(a),"getMetadataActionProps: Invalid action, "+r+", for "+t),O.default.has(e,r)?n[r]=e[r]:n[r]=a(e),n},{});return r}var D=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=k;var A=n(3),O=D(A),R=n(41),L=D(R),N=n(37),j=D(N),U={showPlay:a,showPlayVersion:i,showPlayAll:a,showShuffle:s,
showQueue:o,showPlayTrailer:l,showPlayPlexMix:u,showPlayMusicVideo:l,showAddToPlaylist:d,showMarkWatched:c,showMarkUnwatched:f,showEdit:p,showRefresh:h,showAnalyze:v,showFixMatch:g,showMatch:m,showUnmatch:y,showSplitApart:b,showSync:P,showOptimize:w,showDownload:S,showWatchLater:_,showShare:T,showRecommend:I,showDelete:M,showDeleteVersion:C,showGetInfo:x,showSelect:E},$={movie:["showPlay","showPlayVersion","showQueue","showPlayTrailer","showAddToPlaylist","showMarkWatched","showMarkUnwatched","showEdit","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","showWatchLater","showShare","showRecommend","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","showWatchLater","showShare","showRecommend","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","showPlay","showQueue","showShuffle","showSync","showSelect"]};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e.thumbTranscodeUrl||e.parentThumbTranscodeUrl||e.grandparentThumbTranscodeUrl;
}function a(e){return e.artTranscodeUrl||e.parentArtTranscodeUrl||e.grandparentArtTranscodeUrl}function i(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 a(t);case"episode":return a(t)}}switch(e){case"movie":return t.thumbTranscodeUrl;case"show":return t.thumbTranscodeUrl;
case"season":return r(t);case"episode":return t.grandparentThumbTranscodeUrl;case"artist":return t.thumbTranscodeUrl;case"album":return r(t);case"track":return r(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,r,a){var s=null==e?(0,d.getWidth)(t,n,a):e,o=null==t?(0,d.getHeight)(e,n,a):t,l=i(n,r,a);return{url:l,width:s,height:o
}}var o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var l=n(114),u=o(l),d=n(187);e.exports=t.default},,,,227,function(e,t,n){var r=n(87),a=n(496);e.exports=n(791)?function(e,t,n){return r.setDesc(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},352,,504,function(e,t,n){var r=n(87).setDesc,a=n(492),i=n(128)("toStringTag");e.exports=function(e,t,n){e&&!a(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},,function(e,t,n){"use strict";var r=n(1981)(!0);n(794)(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=r(t,n),this._i+=e.length,{value:e,done:!1})})},,,,,,,,,function(e,t){"use strict";function n(e){return Boolean(e&&"function"==typeof e.dispose)}t.__esModule=!0,t.default=n,e.exports=t.default},function(e,t){function n(e,t,n){"use strict";function r(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function a(i){var s,o,l;if(i.nodeType==y.DOCUMENT_NODE){
var u,d;for(o=i.firstChild,u=0,d=i.childNodes.length;u<d;u+=1)if(i.childNodes[u].nodeType!==y.COMMENT_NODE){o=i.childNodes[u];break}return n?s=a(o):(s={},l=r(o),s[l]=a(o)),s}if(i.nodeType==y.ELEMENT_NODE){var c=0,f=i.childNodes;s=new Object;for(var p=0;p<f.length;p++)if(o=f.item(p),l=r(o),c++,null==s[l])s[l]=a(o);else{if(null!=s[l]&&!(s[l]instanceof Array)){var h=s[l];s[l]=[],s[l].push(h)}for(var v=0;null!=s[l][v];)v++;s[l][v]=a(o)}for(var g=0;g<i.attributes.length;g++){var m=i.attributes.item(g);
c++;for(var b=m.value,P=0,w=e.length;P<w;P++){var S=e[P];S.test.call(this,m.value)&&(b=S.converter.call(this,m.value))}s[t+m.name]=b}if(null!=s["#text"]){var _=s["#text"];"string"==typeof _?(_=_.replace(/[\r\n]/g,""),s["#text"]=_,1==c&&(s=_)):delete s["#text"]}return s}return i.nodeType==y.TEXT_NODE||i.nodeType==y.CDATA_SECTION_NODE?i.nodeValue:i.nodeType==y.COMMENT_NODE?null:void 0}function i(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+=m?i(e.__text):e.__text),t}function o(e){var t="";return e instanceof Object?t+=s(e):null!=e&&(t+=m?i(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 d(e){var t=0;if(e instanceof Object)for(var n in e)u(e,n)||t++;return t}function c(e){var t=[];if(e instanceof Object)for(var n in e){
var r=n.toString(),a=r.charAt(0);n.indexOf("__")==-1&&("_"===a||a===a.toLowerCase()&&a!==a.toUpperCase())&&t.push(n)}return t}function f(e,t,n){var r="";if(0==e.length)r+=p(e,t,n,!0);else for(var a=0;a<e.length;a++)r+=p(e[a],t,c(e[a]),!1),r+=v(e[a]),r+=h(e[a],t);return r}function p(e,t,n,r){var a="<"+(null!=e&&null!=e.__prefix?e.__prefix+":":"")+t;if(null!=n)for(var s=0;s<n.length;s++){var o=n[s],l=i(e[o]);a+=" "+o.substr(1)+"='"+l+"'"}return a+=r?"/>":">"}function h(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">";
}function v(e){var t="",n=d(e);if(n>0)for(var r in e)if(!u(e,r)){var a=e[r],i=c(a);if(null==a||void 0==a)t+=p(a,r,i,!0);else if(a instanceof Object)if(a instanceof Array)t+=f(a,r,i);else{var s=d(a);s>0||null!=a.__text||null!=a.__cdata?(t+=p(a,r,i,!1),t+=v(a),t+=h(a,r)):t+=p(a,r,i,!0)}else t+=p(a,r,i,!1),t+=o(a),t+=h(a,r)}return t+=o(e)}null!==t&&void 0!==t||(t="_"),null!==n&&void 0!==n||(n=!1);var g="1.0.11",m=!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 a(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return this.xml2json(t)},this.getVersion=function(){return g},this.escapeMode=function(e){m=e},this.json2xml_str=function(e){return v(e)}}e.exports=n},function(e,t,n){"use strict";
function r(e,t){this.helpers=e||{},this.partials=t||{},a(this)}function a(e){e.registerHelper("helperMissing",function(e){if(2!==arguments.length)throw new o("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(t,n){var r=n.inverse||function(){},a=n.fn;return f(t)&&(t=t.call(this)),t===!0?a(this):t===!1||null==t?r(this):c(t)?t.length>0?e.helpers.each(t,n):r(this):a(t)}),e.registerHelper("each",function(e,t){var n,r=t.fn,a=t.inverse,i=0,s="";if(f(e)&&(e=e.call(this)),t.data&&(n=g(t.data)),
e&&"object"==typeof e)if(c(e))for(var o=e.length;i<o;i++)n&&(n.index=i,n.first=0===i,n.last=i===e.length-1),s+=r(e[i],{data:n});else for(var l in e)e.hasOwnProperty(l)&&(n&&(n.key=l,n.index=i,n.first=0===i),s+=r(e[l],{data:n}),i++);return 0===i&&(s=a(this)),s}),e.registerHelper("if",function(e,t){return f(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(f(e)&&(e=e.call(this)),!s.isEmpty(e))return t.fn(e)}),e.registerHelper("log",function(t,n){var r=n.data&&null!=n.data.level?parseInt(n.data.level,10):1;e.log(r,t)})}function i(e,t){v.log(e,t)}var s=n(512),o=n(511).default,l="1.3.0";t.VERSION=l;var u=4;t.COMPILER_REVISION=u;var d={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};t.REVISION_CHANGES=d;var c=s.isArray,f=s.isFunction,p=s.toString,h="[object Object]";t.HandlebarsEnvironment=r,
r.prototype={constructor:r,logger:v,log:i,registerHelper:function(e,t,n){if(p.call(e)===h){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)===h?s.extend(this.partials,e):this.partials[e]=t}};var v={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(v.level<=e){var n=v.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t);
}}};t.logger=v,t.log=i;var g=function(e){var t={};return s.extend(t,e),t};t.createFrame=g},function(e,t){"use strict";function n(e,t){var n;t&&t.firstLine&&(n=t.firstLine,e+=" - "+n+":"+t.firstColumn);for(var a=Error.prototype.constructor.call(this,e),i=0;i<r.length;i++)this[r[i]]=a[r[i]];n&&(this.lineNumber=n,this.column=t.firstColumn)}var r=["description","fileName","lineNumber","message","name","number","stack"];n.prototype=new Error,t.default=n},function(e,t,n){"use strict";function r(e){return l[e]||"&amp;";
}function a(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function i(e){return e instanceof o?e.toString():e||0===e?(e=""+e,d.test(e)?e.replace(u,r):e):""}function s(e){return!e&&0!==e||!(!p(e)||0!==e.length)}var o=n(822).default,l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},u=/[&<>"'`]/g,d=/[&<>"'`]/;t.extend=a;var c=Object.prototype.toString;t.toString=c;var f=function(e){return"function"==typeof e};f(/x/)&&(f=function(e){return"function"==typeof e&&"[object Function]"===c.call(e);
});var f;t.isFunction=f;var p=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===c.call(e)};t.isArray=p,t.escapeExpression=i,t.isEmpty=s},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.__data__=new a;++t<n;)this.add(e[t])}var a=n(825),i=n(2590),s=n(2591);r.prototype.add=r.prototype.push=i,r.prototype.has=s,e.exports=r},function(e,t,n){function r(e,t){var n=e?e.length:0;return!!n&&a(e,t,0)>-1}var a=n(2553);e.exports=r},function(e,t){function n(e,t,n){for(var r=-1,a=e?e.length:0;++r<a;)if(n(t,e[r]))return!0;
return!1}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=e?e.length:0,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}e.exports=n},function(e,t){function n(e,t){return e.has(t)}e.exports=n},function(e,t,n){function r(e,t){var n=i(e,t);return a(n)?n:void 0}var a=n(2556),i=n(2567);e.exports=r},function(e,t,n){function r(e){return null!=e&&i(e.length)&&!a(e)}var a=n(835),i=n(2596);e.exports=r},function(e,t){"use strict";t.__esModule=!0;var n="__NATIVE_FILE__";t.FILE=n;var r="__NATIVE_URL__";t.URL=r;
var a="__NATIVE_TEXT__";t.TEXT=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var a=n(2616);t.DragDropContext=r(a);var i=n(2617);t.DragLayer=r(i);var s=n(2618);t.DragSource=r(s);var o=n(2619);t.DropTarget=r(o)},function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=Object.prototype.hasOwnProperty,i=0;i<n.length;i++){if(!a.call(t,n[i])||e[n[i]]!==t[n[i]])return!1;var s=e[n[i]],o=t[n[i]];
if(s!==o)return!1}return!0}t.__esModule=!0,t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function a(e,t,n){d.insertTreeBefore(e,t,n)}function i(e,t,n){Array.isArray(t)?o(e,t[0],t[1],n):g(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,r){for(var a=t;;){var i=a.nextSibling;if(g(e,a,r),a===n)break;a=i}}function l(e,t,n){for(;;){var r=t.nextSibling;
if(r===n)break;e.removeChild(r)}}function u(e,t,n){var r=e.parentNode,a=e.nextSibling;a===t?n&&g(r,document.createTextNode(n),a):n?(v(a,n),l(r,a,t)):l(r,e,t)}var d=n(232),c=n(2636),f=n(866),p=(n(68),n(98),n(532)),h=n(538),v=n(883),g=p(function(e,t,n){e.insertBefore(t,n)}),m=c.dangerouslyReplaceNodeWithMarkup,y={dangerouslyReplaceNodeWithMarkup:m,replaceDelimitedText:u,processUpdates:function(e,t){for(var n=0;n<t.length;n++){var o=t[n];switch(o.type){case f.INSERT_MARKUP:a(e,o.content,r(e,o.afterNode));
break;case f.MOVE_EXISTING:i(e,o.fromNode,r(e,o.afterNode));break;case f.SET_MARKUP:h(e,o.content);break;case f.TEXT_CONTENT:v(e,o.content);break;case f.REMOVE_NODE:s(e,o.fromNode)}}}};e.exports=y},function(e,t,n){"use strict";function r(e){return!!u.hasOwnProperty(e)||!l.hasOwnProperty(e)&&(o.test(e)?(u[e]=!0,!0):(l[e]=!0,!1))}function a(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&t<1||e.hasOverloadedBooleanValue&&t===!1}var i=n(190),s=(n(68),
n(2654),n(98),n(2694)),o=(n(52),new RegExp("^["+i.ATTRIBUTE_NAME_START_CHAR+"]["+i.ATTRIBUTE_NAME_CHAR+"]*$")),l={},u={},d={createMarkupForID:function(e){return i.ID_ATTRIBUTE_NAME+"="+s(e)},setAttributeForID:function(e,t){e.setAttribute(i.ID_ATTRIBUTE_NAME,t)},createMarkupForRoot:function(){return i.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(e){e.setAttribute(i.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(e,t){var n=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(n){
if(a(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+s(t)}return i.isCustomAttribute(e)?null==t?"":e+"="+s(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+s(t):""},setValueForProperty:function(e,t,n){var r=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(r){var s=r.mutationMethod;if(s)s(e,n);else{if(a(r,n))return void this.deleteValueForProperty(e,t);if(r.mustUseProperty){var o=r.propertyName;r.hasSideEffects&&""+e[o]==""+n||(e[o]=n);
}else{var l=r.attributeName,u=r.attributeNamespace;u?e.setAttributeNS(u,l,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(l,""):e.setAttribute(l,""+n)}}}else if(i.isCustomAttribute(t))return void d.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){if(r(t)){null==n?e.removeAttribute(t):e.setAttribute(t,""+n)}},deleteValueForProperty:function(e,t){var n=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseProperty){
var a=n.propertyName;n.hasBooleanValue?e[a]=!1:n.hasSideEffects&&""+e[a]==""||(e[a]="")}else e.removeAttribute(n.attributeName)}else i.isCustomAttribute(t)&&e.removeAttribute(t)}};e.exports=d},function(e,t,n){"use strict";function r(e){return e===y.topMouseUp||e===y.topTouchEnd||e===y.topTouchCancel}function a(e){return e===y.topMouseMove||e===y.topTouchMove}function i(e){return e===y.topMouseDown||e===y.topTouchStart}function s(e,t,n,r){var a=e.type||"unknown-event";e.currentTarget=b.getNodeFromInstance(r),
t?v.invokeGuardedCallbackWithCatch(a,n,e):v.invokeGuardedCallback(a,n,e),e.currentTarget=null}function o(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var a=0;a<n.length&&!e.isPropagationStopped();a++)s(e,t,n[a],r[a]);else n&&s(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null}function l(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}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 d(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)?g(!1):void 0,e.currentTarget=t?b.getNodeFromInstance(n):null;var r=t?t(e):null;return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,r}function c(e){return!!e._dispatchListeners}var f,p,h=n(130),v=n(529),g=n(39),m=(n(52),{injectComponentTree:function(e){f=e},injectTreeTraversal:function(e){p=e}}),y=h.topLevelTypes,b={
isEndish:r,isMoveish:a,isStartish:i,executeDirectDispatch:d,executeDispatchesInOrder:o,executeDispatchesInOrderStopAtTrue:u,hasDispatches:c,getInstanceFromNode:function(e){return f.getInstanceFromNode(e)},getNodeFromInstance:function(e){return f.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,r,a){return p.traverseEnterLeave(e,t,n,r,a)},injection:m};e.exports=b},function(e,t){"use strict";function n(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function r(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var a={escape:n,unescape:r};e.exports=a},function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?u(!1):void 0;
}function a(e){r(e),null!=e.value||null!=e.onChange?u(!1):void 0}function i(e){r(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(870),l=n(369),u=n(39),d=(n(52),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),c={value:function(e,t,n){return!e[t]||d[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},f={},p={checkPropTypes:function(e,t,n){for(var r in c){if(c.hasOwnProperty(r))var a=c[r](t,r,e,l.prop);if(a instanceof Error&&!(a.message in f)){f[a.message]=!0;s(n)}}},getValue:function(e){
return e.valueLink?(a(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(i(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(a(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(i(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 r=n(39),a=!1,i={unmountIDFromEnvironment:null,replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{
injectEnvironment:function(e){a?r(!1):void 0,i.unmountIDFromEnvironment=e.unmountIDFromEnvironment,i.replaceNodeWithMarkup=e.replaceNodeWithMarkup,i.processChildrenUpdates=e.processChildrenUpdates,a=!0}}};e.exports=i},function(e,t,n){"use strict";function r(e,t,n,r){try{return t(n,r)}catch(i){return void(null===a&&(a=i))}}var a=null,i={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(a){var e=a;throw a=null,e}}};e.exports=i},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 r=!1;e.exports=r},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,a){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,a)})}: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 r=a[e];return!!r&&!!n[r]}function r(e){return n}var a={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},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&&(r&&e[r]||e[a]);if("function"==typeof t)return t}var r="function"==typeof Symbol&&Symbol.iterator,a="@@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 r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var s=document.createElement("div");s.setAttribute(n,"return;"),r="function"==typeof s[n]}return!r&&a&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var a,i=n(80);i.canUseDOM&&(a=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t,n){"use strict";var r=n(80),a=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,s=n(532),o=s(function(e,t){
e.innerHTML=t});if(r.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(o=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&i.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,r=null===t||t===!1;if(n||r)return n===r;var a=typeof e,i=typeof t;return"string"===a||"number"===a?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key;
}e.exports=n},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?u.escape(e.key):t.toString(36)}function a(e,t,n,i){var f=typeof e;if("undefined"!==f&&"boolean"!==f||(e=null),null===e||"string"===f||"number"===f||s.isValidElement(e))return n(i,e,""===t?d+r(e,0):t),1;var p,h,v=0,g=""===t?d:t+c;if(Array.isArray(e))for(var m=0;m<e.length;m++)p=e[m],h=g+r(p,m),v+=a(p,h,n,i);else{var y=o(e);if(y){var b,P=y.call(e);if(y!==e.entries)for(var w=0;!(b=P.next()).done;)p=b.value,
h=g+r(p,w++),v+=a(p,h,n,i);else for(;!(b=P.next()).done;){var S=b.value;S&&(p=S[1],h=g+u.escape(S[0])+c+r(p,0),v+=a(p,h,n,i))}}else if("object"===f){String(e);l(!1)}}return v}function i(e,t,n){return null==e?0:a(e,"",t,n)}var s=(n(157),n(107)),o=n(536),l=n(39),u=n(526),d=(n(52),"."),c=":";e.exports=i},function(e,t,n){"use strict";var r=(n(60),n(97)),a=(n(52),r);e.exports=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,n){function r(){h===p&&(h=p.slice());
}function i(){return f}function l(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return r(),h.push(e),function(){if(t){t=!1,r();var n=h.indexOf(e);h.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(v)throw new Error("Reducers may not dispatch actions.");
try{v=!0,f=c(f,e)}finally{v=!1}for(var t=p=h,n=0;n<t.length;n++)t[n]();return e}function d(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");c=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(a)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var c=e,f=t,p=[],h=p,v=!1;return u({
type:o.INIT}),{dispatch:u,subscribe:l,getState:i,replaceReducer:d}}t.__esModule=!0,t.ActionTypes=void 0,t.default=a;var i=n(129),s=r(i),o=t.ActionTypes={INIT:"@@redux/INIT"}},,,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 r=(new Date).getTime(),a=Math.max(0,16-(r-e)),i=window.setTimeout(function(){t(r+a)},a);return e=r+a,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}()},function(e,t,n){var r,a,r,i,r,s,o;(function(l){!function(i,s){r=s,!(a="function"==typeof r?r.call(t,n,t,e):r)}(this,function(){var e=function(e,t){this.items=e,this.settings=t||{diacritics:!0}};e.prototype.tokenize=function(e){if(e=r(String(e||"").toLowerCase()),!e||!e.length)return[];var t,n,i,o,l=[],u=e.split(/ +/);
for(t=0,n=u.length;t<n;t++){if(i=a(u[t]),this.settings.diacritics)for(o in s)s.hasOwnProperty(o)&&(i=i.replace(new RegExp(o,"g"),s[o]));l.push({string:u[t],regex:new RegExp(i,"i")})}return l},e.prototype.iterator=function(e,t){var n;n=i(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,r,a,i;n=this,e=n.prepareSearch(e,t),
a=e.tokens,r=e.options.fields,i=a.length;var s=function(e,t){var n,r;return e?(e=String(e||""),r=e.search(t.regex),r===-1?0:(n=t.string.length/e.length,0===r&&(n+=.5),n)):0},o=function(){var e=r.length;return e?1===e?function(e,t){return s(t[r[0]],e)}:function(t,n){for(var a=0,i=0;a<e;a++)i+=s(n[r[a]],t);return i/e}:function(){return 0}}();return i?1===i?function(e){return o(a[0],e)}:"and"===e.options.conjunction?function(e){for(var t,n=0,r=0;n<i;n++){if(t=o(a[n],e),t<=0)return 0;r+=t}return r/i}:function(e){
for(var t=0,n=0;t<i;t++)n+=o(a[t],e);return n/i}:function(){return 0}},e.prototype.getSortFunction=function(e,n){var r,a,i,s,o,l,u,d,c,f,p;if(i=this,e=i.prepareSearch(e,n),p=!e.query&&n.sort_empty||n.sort,c=function(e,t){return"$score"===e?t.score:i.items[t.id][e]},o=[],p)for(r=0,a=p.length;r<a;r++)(e.query||"$score"!==p[r].field)&&o.push(p[r]);if(e.query){for(f=!0,r=0,a=o.length;r<a;r++)if("$score"===o[r].field){f=!1;break}f&&o.unshift({field:"$score",direction:"desc"})}else for(r=0,a=o.length;r<a;r++)if("$score"===o[r].field){
o.splice(r,1);break}for(d=[],r=0,a=o.length;r<a;r++)d.push("desc"===o[r].direction?-1:1);return l=o.length,l?1===l?(s=o[0].field,u=d[0],function(e,n){return u*t(c(s,e),c(s,n))}):function(e,n){var r,a,i;for(r=0;r<l;r++)if(i=o[r].field,a=d[r]*t(c(i,e),c(i,n)))return a;return 0}:null},e.prototype.prepareSearch=function(e,t){if("object"==typeof e)return e;t=n({},t);var r=t.fields,a=t.sort,s=t.sort_empty;return r&&!i(r)&&(t.fields=[r]),a&&!i(a)&&(t.sort=[a]),s&&!i(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,r,a,i,s=this;return r=this.prepareSearch(e,t),t=r.options,e=r.query,i=t.score||s.getScoreFunction(r),e.length?s.iterator(s.items,function(e,a){n=i(e),(t.filter===!1||n>0)&&r.items.push({score:n,id:a})}):s.iterator(s.items,function(e,t){r.items.push({score:1,id:t})}),a=s.getSortFunction(r,t),a&&r.items.sort(a),r.total=r.items.length,"number"==typeof t.limit&&(r.items=r.items.slice(0,t.limit)),r};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,r,a,i;for(n=1,r=arguments.length;n<r;n++)if(i=arguments[n])for(a in i)i.hasOwnProperty(a)&&(e[a]=i[a]);return e},r=function(e){return(e+"").replace(/^\s+|\s+$|/g,"")},a=function(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},i=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,r,a="",i={};for(n in s)if(s.hasOwnProperty(n))for(r=s[n].substring(2,s[n].length-1),a+=r,e=0,t=r.length;e<t;e++)i[r.charAt(e)]=n;var o=new RegExp("["+a+"]","g");return function(e){return e.replace(o,function(e){return i[e]}).toLowerCase()}}();return e}),function(a,s){r=s,!(i="function"==typeof r?r.call(t,n,t,e):r)}(this,function(){var e={};e.mixin=function(e){e.plugins={},e.prototype.initializePlugins=function(e){var n,r,a,i=this,s=[];if(i.plugins={names:[],settings:{},requested:{},loaded:{}
},t.isArray(e))for(n=0,r=e.length;n<r;n++)"string"==typeof e[n]?s.push(e[n]):(i.plugins.settings[e[n].name]=e[n].options,s.push(e[n].name));else if(e)for(a in e)e.hasOwnProperty(a)&&(i.plugins.settings[a]=e[a],s.push(a));for(;s.length;)i.require(s.shift())},e.prototype.loadPlugin=function(t){var n=this,r=n.plugins,a=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');r.requested[t]=!0,r.loaded[t]=a.fn.apply(n,[n.plugins.settings[t]||{}]),r.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(8),a,i],r=u,o="function"==typeof r?r.apply(t,s):r,!(void 0!==o&&(e.exports=o))}(this,function(e,t,n){"use strict";
var r=function(e,t){if("string"!=typeof t||t.length){var n="string"==typeof t?new RegExp(t,"i"):t,r=function(e){var t=0;if(3===e.nodeType){var a=e.data.search(n);if(a>=0&&e.data.length>0){var i=e.data.match(n),s=document.createElement("span");s.className="highlight";var o=e.splitText(a),l=(o.splitText(i[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+=r(e.childNodes[u]);
return t};return e.each(function(){r(this)})}},a=function(){};a.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));
}},a.mixin=function(e){for(var t=["on","off","trigger"],n=0;n<t.length;n++)e.prototype[t[n]]=a.prototype[t[n]]};var i=/Mac/.test(navigator.userAgent),s=65,o=13,l=27,u=37,d=38,c=80,f=39,p=40,h=78,v=8,g=46,m=16,y=i?91:17,b=i?18:17,P=9,w=1,S=2,_=!/android/i.test(window.navigator.userAgent)&&!!document.createElement("form").validity,T=function(e){return"undefined"!=typeof e},I=function(e){return"undefined"==typeof e||null===e?null:"boolean"==typeof e?e?"1":"0":e+""},M=function(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");
},C=function(e){return(e+"").replace(/\$/g,"$$$$")},x={};x.before=function(e,t,n){var r=e[t];e[t]=function(){return n.apply(e,arguments),r.apply(e,arguments)}},x.after=function(e,t,n){var r=e[t];e[t]=function(){var t=r.apply(e,arguments);return n.apply(e,arguments),t}};var E=function(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}},k=function(e,t){var n;return function(){var r=this,a=arguments;window.clearTimeout(n),n=window.setTimeout(function(){e.apply(r,a)},t)}},D=function(e,t,n){
var r,a=e.trigger,i={};e.trigger=function(){var n=arguments[0];return t.indexOf(n)===-1?a.apply(e,arguments):void(i[n]=arguments)},n.apply(e,[]),e.trigger=a;for(r in i)i.hasOwnProperty(r)&&a.apply(e,i[r])},A=function(e,t,n,r){e.on(t,n,function(t){for(var n=t.target;n&&n.parentNode!==e[0];)n=n.parentNode;return t.currentTarget=n,r.apply(this,[t])})},O=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(),r=document.selection.createRange().text.length;
n.moveStart("character",-e.value.length),t.start=n.text.length-r,t.length=r}return t},R=function(e,t,n){var r,a,i={};if(n)for(r=0,a=n.length;r<a;r++)i[n[r]]=e.css(n[r]);else i=e.css();t.css(i)},L=function(t,n){if(!t)return 0;var r=e("<test>").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(t).appendTo("body");R(n,r,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var a=r.width();return r.remove(),a},N=function(e){var t=null,n=function(n,r){
var a,i,s,o,l,u,d,c;n=n||window.event||{},r=r||{},n.metaKey||n.altKey||(r.force||e.data("grow")!==!1)&&(a=e.val(),n.type&&"keydown"===n.type.toLowerCase()&&(i=n.keyCode,s=i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||32===i,i===g||i===v?(c=O(e[0]),c.length?a=a.substring(0,c.start)+a.substring(c.start+c.length):i===v&&c.start?a=a.substring(0,c.start-1)+a.substring(c.start+1):i===g&&"undefined"!=typeof c.start&&(a=a.substring(0,c.start)+a.substring(c.start+1))):s&&(u=n.shiftKey,d=String.fromCharCode(n.keyCode),
d=u?d.toUpperCase():d.toLowerCase(),a+=d)),o=e.attr("placeholder"),!a&&o&&(a=o),l=L(a,e)+4,l!==t&&(t=l,e.width(l),e.triggerHandler("resize")))};e.on("keydown keyup update blur",n),n()},j=function(n,r){var a,i,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:r,$input:n,tabIndex:n.attr("tabindex")||"",
tagType:"select"===o.tagName.toLowerCase()?w:S,rtl:/rtl/i.test(s),eventNS:".selectize"+ ++j.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===r.loadThrottle?l.onSearchChange:k(l.onSearchChange,r.loadThrottle)}),l.sifter=new t(this.options,{diacritics:r.diacritics}),l.settings.options){for(a=0,i=l.settings.options.length;a<i;a++)l.registerOption(l.settings.options[a]);delete l.settings.options}if(l.settings.optgroups){for(a=0,i=l.settings.optgroups.length;a<i;a++)l.registerOptionGroup(l.settings.optgroups[a]);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 a.mixin(j),n.mixin(j),e.extend(j.prototype,{setup:function(){var t,n,r,a,s,o,l,u,d,c=this,f=c.settings,p=c.eventNS,h=e(window),v=e(document),g=c.$input;if(l=c.settings.mode,u=g.attr("class")||"",t=e("<div>").addClass(f.wrapperClass).addClass(u).addClass(l),n=e("<div>").addClass(f.inputClass).addClass("items").appendTo(t),r=e('<input type="text" autocomplete="off" />').appendTo(n).attr("tabindex",g.is(":disabled")?"-1":c.tabIndex),
o=e(f.dropdownParent||t),a=e("<div>").addClass(f.dropdownClass).addClass(l).hide().appendTo(o),s=e("<div>").addClass(f.dropdownContentClass).appendTo(a),c.settings.copyClassesToDropdown&&a.addClass(u),t.css({width:g[0].style.width}),c.plugins.names.length&&(d="plugin-"+c.plugins.names.join(" plugin-"),t.addClass(d),a.addClass(d)),(null===f.maxItems||f.maxItems>1)&&c.tagType===w&&g.attr("multiple","multiple"),c.settings.placeholder&&r.attr("placeholder",f.placeholder),!c.settings.splitOn&&c.settings.delimiter){
var P=c.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");c.settings.splitOn=new RegExp("\\s*"+P+"+\\s*")}g.attr("autocorrect")&&r.attr("autocorrect",g.attr("autocorrect")),g.attr("autocapitalize")&&r.attr("autocapitalize",g.attr("autocapitalize")),c.$wrapper=t,c.$control=n,c.$control_input=r,c.$dropdown=a,c.$dropdown_content=s,a.on("mouseenter","[data-selectable]",function(){return c.onOptionHover.apply(c,arguments)}),a.on("mousedown click","[data-selectable]",function(){return c.onOptionSelect.apply(c,arguments);
}),A(n,"mousedown","*:not(input)",function(){return c.onItemSelect.apply(c,arguments)}),c.settings.manualInputWidth||N(r),n.on({mousedown:function(){return c.onMouseDown.apply(c,arguments)},click:function(){return c.onClick.apply(c,arguments)}}),r.on({mousedown:function(e){e.stopPropagation()},keydown:function(){return c.onKeyDown.apply(c,arguments)},keyup:function(){return c.onKeyUp.apply(c,arguments)},keypress:function(){return c.onKeyPress.apply(c,arguments)},resize:function(){c.positionDropdown.apply(c,[]);
},blur:function(){return c.onBlur.apply(c,arguments)},focus:function(){return c.ignoreBlur=!1,c.onFocus.apply(c,arguments)},paste:function(){return c.onPaste.apply(c,arguments)}}),g.parents().last().find('label[for="'+g.attr("id")+'"]').on("click",function(){c.onClick.apply(c,arguments)}),v.on("keydown"+p,function(e){c.isCmdDown=e[i?"metaKey":"ctrlKey"],c.isCtrlDown=e[i?"altKey":"ctrlKey"],c.isShiftDown=e.shiftKey}),v.on("keyup"+p,function(e){e.keyCode===b&&(c.isCtrlDown=!1),e.keyCode===m&&(c.isShiftDown=!1),
e.keyCode===y&&(c.isCmdDown=!1)}),v.on("mousedown"+p,function(e){if(c.isFocused){if(e.target===c.$dropdown[0]||e.target.parentNode===c.$dropdown[0])return!1;c.$control.has(e.target).length||e.target===c.$control[0]||c.blur(e.target)}}),h.on(["scroll"+p,"resize"+p].join(" "),function(){c.isOpen&&c.positionDropdown.apply(c,arguments)}),h.on("mousemove"+p,function(){c.ignoreHover=!1}),this.revertSettings={$children:g.children().detach(),tabindex:g.attr("tabindex")},g.attr("tabindex",-1).hide().after(c.$wrapper),
e.isArray(f.items)&&(c.setValue(f.items),delete f.items),_&&g.on("invalid"+p,function(e){e.preventDefault(),c.isInvalid=!0,c.refreshState()}),c.updateOriginalInput(),c.refreshItems(),c.refreshState(),c.updatePlaceholder(),c.isSetup=!0,g.is(":disabled")&&c.disable(),c.on("change",this.onChange),g.data("selectize",c),g.addClass("selectized"),c.trigger("initialize"),f.preload===!0&&c.onSearchChange("")},setupTemplates:function(){var t=this,n=t.settings.labelField,r=t.settings.optgroupLabelField,a={optgroup:function(e){
return'<div class="optgroup">'+e.html+"</div>"},optgroup_header:function(e,t){return'<div class="optgroup-header">'+t(e[r])+"</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({},a,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,r=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():r||n.setActiveItem(null),!1}else r||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),r=0,a=t.length;r<a;r++)n.createItem(t[r]);
},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!==P&&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 h: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 c:if(!e.ctrlKey||e.altKey)break;case d:if(t.$activeOption){t.ignoreHover=!0;var r=t.getAdjacentOption(t.$activeOption,-1);r.length&&t.setActiveOption(r,!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 f:return void t.advanceSelection(1,e);case P: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 v:return void t.deleteSelection(e,!0);case g:return void t.deleteSelection(e)}return!t.isFull()&&!t.isInputHidden||(i?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(r){n.apply(t,[e,r])})))},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,r,a=this;t.preventDefault&&(t.preventDefault(),t.stopPropagation()),r=e(t.currentTarget),r.hasClass("create")?a.createItem(null,function(){
a.settings.closeAfterSelect&&a.close()}):(n=r.attr("data-value"),"undefined"!=typeof n&&(a.lastQuery=null,a.setTextboxValue(""),a.addItem(n),a.settings.closeAfterSelect?a.close():!a.settings.hideSelected&&t.type&&/mouse/.test(t.type)&&a.setActiveOption(a.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===w&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(e,t){var n=t?[]:["change"];D(this,n,function(){
this.clear(t),this.addItems(e,t)})},setActiveItem:function(t,n){var r,a,i,s,o,l,u,d,c=this;if("single"!==c.settings.mode){if(t=e(t),!t.length)return e(c.$activeItems).removeClass("active"),c.$activeItems=[],void(c.isFocused&&c.showInput());if(r=n&&n.type.toLowerCase(),"mousedown"===r&&c.isShiftDown&&c.$activeItems.length){for(d=c.$control.children(".active:last"),s=Array.prototype.indexOf.apply(c.$control[0].childNodes,[d[0]]),o=Array.prototype.indexOf.apply(c.$control[0].childNodes,[t[0]]),s>o&&(u=s,
s=o,o=u),a=s;a<=o;a++)l=c.$control[0].childNodes[a],c.$activeItems.indexOf(l)===-1&&(e(l).addClass("active"),c.$activeItems.push(l));n.preventDefault()}else"mousedown"===r&&c.isCtrlDown||"keydown"===r&&this.isShiftDown?t.hasClass("active")?(i=c.$activeItems.indexOf(t[0]),c.$activeItems.splice(i,1),t.removeClass("active")):c.$activeItems.push(t.addClass("active")[0]):(e(c.$activeItems).removeClass("active"),c.$activeItems=[t.addClass("active")[0]]);c.hideInput(),this.isFocused||c.focus()}},setActiveOption:function(t,n,r){
var a,i,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&&T(n)||(a=u.$dropdown_content.height(),i=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-a+i,s+i>a+n?u.$dropdown_content.stop().animate({scrollTop:l},r?u.settings.scrollDuration:0):s<n&&u.$dropdown_content.stop().animate({scrollTop:o},r?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,r,a,i=this,s=i.settings,o=this.getSearchOptions();if(s.score&&(a=i.settings.score.apply(this,[t]),"function"!=typeof a))throw new Error('Selectize "score" setting must be a function that returns a function');if(t!==i.lastQuery?(i.lastQuery=t,r=i.sifter.search(t,e.extend(o,{score:a})),i.currentResults=r):r=e.extend(!0,{},i.currentResults),s.hideSelected)for(n=r.items.length-1;n>=0;n--)i.items.indexOf(I(r.items[n].id))!==-1&&r.items.splice(n,1);return r},refreshOptions:function(t){
var n,a,i,s,o,l,u,d,c,f,p,h,v,g,m,y;"undefined"==typeof t&&(t=!0);var b=this,P=e.trim(b.$control_input.val()),w=b.search(P),S=b.$dropdown_content,_=b.$activeOption&&I(b.$activeOption.attr("data-value"));for(s=w.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[w.items[n].id],d=b.render("option",u),c=u[b.settings.optgroupField]||"",f=e.isArray(c)?c:[c],a=0,i=f&&f.length;a<i;a++)c=f[a],b.optgroups.hasOwnProperty(c)||(c=""),
o.hasOwnProperty(c)||(o[c]=[],l.push(c)),o[c].push(d);for(this.settings.lockOptgroupOrder&&l.sort(function(e,t){var n=b.optgroups[e].$order||0,r=b.optgroups[t].$order||0;return n-r}),p=[],n=0,s=l.length;n<s;n++)c=l[n],b.optgroups.hasOwnProperty(c)&&o[c].length?(h=b.render("optgroup_header",b.optgroups[c])||"",h+=o[c].join(""),p.push(b.render("optgroup",e.extend({},b.optgroups[c],{html:h})))):p.push(o[c].join(""));if(S.html(p.join("")),b.settings.highlight&&w.query.length&&w.tokens.length)for(n=0,
s=w.tokens.length;n<s;n++)r(S,w.tokens[n].regex);if(!b.settings.hideSelected)for(n=0,s=b.items.length;n<s;n++)b.getOption(b.items[n]).addClass("selected");v=b.canCreate(P),v&&(S.prepend(b.render("option_create",{input:P})),y=e(S[0].childNodes[0])),b.hasOptions=w.items.length>0||v,b.hasOptions?(w.items.length>0?(m=_&&b.getOption(_),m&&m.length?g=m:"single"===b.settings.mode&&b.items.length&&(g=b.getOption(b.items[0])),g&&g.length||(g=y&&!b.settings.addPrecedence?b.getAdjacentOption(y,1):S.find("[data-selectable]:first"))):g=y,
b.setActiveOption(g),t&&!b.isOpen&&b.open()):(b.setActiveOption(null),t&&b.isOpen&&b.close())},addOption:function(t){var n,r,a,i=this;if(e.isArray(t))for(n=0,r=t.length;n<r;n++)i.addOption(t[n]);else(a=i.registerOption(t))&&(i.userOptions[a]=!0,i.lastQuery=null,i.trigger("option_add",a,t))},registerOption:function(e){var t=I(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=I(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 r,a,i,s,o,l,u,d=this;if(t=I(t),
i=I(n[d.settings.valueField]),null!==t&&d.options.hasOwnProperty(t)){if("string"!=typeof i)throw new Error("Value must be set in option data");u=d.options[t].$order,i!==t&&(delete d.options[t],s=d.items.indexOf(t),s!==-1&&d.items.splice(s,1,i)),n.$order=n.$order||u,d.options[i]=n,o=d.renderCache.item,l=d.renderCache.option,o&&(delete o[t],delete o[i]),l&&(delete l[t],delete l[i]),d.items.indexOf(i)!==-1&&(r=d.getItem(t),a=e(d.render("item",n)),r.hasClass("active")&&a.addClass("active"),r.replaceWith(a)),
d.lastQuery=null,d.isOpen&&d.refreshOptions(!1)}},removeOption:function(e,t){var n=this;e=I(e);var r=n.renderCache.item,a=n.renderCache.option;r&&delete r[e],a&&delete a[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 r=this.$dropdown.find("[data-selectable]"),a=r.index(t)+n;return a>=0&&a<r.length?r.eq(a):e()},getElementWithValue:function(t,n){if(t=I(t),"undefined"!=typeof t&&null!==t)for(var r=0,a=n.length;r<a;r++)if(n[r].getAttribute("data-value")===t)return e(n[r]);return e()},getItem:function(e){return this.getElementWithValue(e,this.$control.children())},addItems:function(t,n){for(var r=e.isArray(t)?t:[t],a=0,i=r.length;a<i;a++)this.isPending=a<i-1,this.addItem(r[a],n);
},addItem:function(t,n){var r=n?[]:["change"];D(this,r,function(){var r,a,i,s,o,l=this,u=l.settings.mode;return t=I(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()||(r=e(l.render("item",l.options[t])),o=l.isFull(),l.items.splice(l.caretPos,0,t),l.insertAtCaret(r),(!l.isPending||!o&&l.isFull())&&l.refreshState(),l.isSetup&&(i=l.$dropdown_content.find("[data-selectable]"),l.isPending||(a=l.getOption(t),s=l.getAdjacentOption(a,1).attr("data-value"),
l.refreshOptions(l.isFocused&&"single"!==u),s&&l.setActiveOption(l.getOption(s))),!i.length||l.isFull()?l.close():l.positionDropdown(),l.updatePlaceholder(),l.trigger("item_add",t,r),l.updateOriginalInput({silent:n})))))})},removeItem:function(e,t){var n,r,a,i=this;n="object"==typeof e?e:i.getItem(e),e=I(n.attr("data-value")),r=i.items.indexOf(e),r!==-1&&(n.remove(),n.hasClass("active")&&(a=i.$activeItems.indexOf(n[0]),i.$activeItems.splice(a,1)),i.items.splice(r,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(e)&&i.removeOption(e,t),
r<i.caretPos&&i.setCaret(i.caretPos-1),i.refreshState(),i.updatePlaceholder(),i.updateOriginalInput({silent:t}),i.positionDropdown(),i.trigger("item_remove",e,n))},createItem:function(t,n){var r=this,a=r.caretPos;t=t||e.trim(r.$control_input.val()||"");var i=arguments[arguments.length-1];if("function"!=typeof i&&(i=function(){}),"boolean"!=typeof n&&(n=!0),!r.canCreate(t))return i(),!1;r.lock();var s="function"==typeof r.settings.create?this.settings.create:function(e){var t={};return t[r.settings.labelField]=e,
t[r.settings.valueField]=e,t},o=E(function(e){if(r.unlock(),!e||"object"!=typeof e)return i();var t=I(e[r.settings.valueField]);return"string"!=typeof t?i():(r.setTextboxValue(""),r.addOption(e),r.setCaret(a),r.addItem(t),r.refreshOptions(n&&"single"!==r.settings.mode),void i(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(),r=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",r).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&&!r)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(e){var t,n,r,a,i=this;if(e=e||{},i.tagType===w){for(r=[],t=0,n=i.items.length;t<n;t++)a=i.options[i.items[t]][i.settings.labelField]||"",r.push('<option value="'+M(i.items[t])+'" selected="selected">'+M(a)+"</option>");r.length||this.$input.attr("multiple")||r.push('<option value="" selected="selected"></option>'),i.$input.html(r.join(""));
}else i.$input.val(i.getValue()),i.$input.attr("value",i.$input.val());i.isSetup&&(e.silent||i.trigger("change",i.$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 r,a,i,s,o,l,u,d,c,f=this;
if(i=n||void 0===n&&t&&t.keyCode===v?-1:1,s=O(f.$control_input[0]),f.$activeOption&&!f.settings.hideSelected&&(u=f.getAdjacentOption(f.$activeOption,-1).attr("data-value")),o=[],f.$activeItems.length){for(c=f.$control.children(".active:"+(i>0?"last":"first")),l=f.$control.children(":not(input)").index(c),i>0&&l++,r=0,a=f.$activeItems.length;r<a;r++)o.push(e(f.$activeItems[r]).attr("data-value"));t&&(t.preventDefault(),t.stopPropagation())}else(f.isFocused||"single"===f.settings.mode)&&f.items.length&&(i<0&&0===s.start&&0===s.length?o.push(f.items[f.caretPos-1]):i>0&&s.start===f.$control_input.val().length&&o.push(f.items[f.caretPos]));
if(!o.length||"function"==typeof f.settings.onDelete&&f.settings.onDelete.apply(f,[o])===!1)return!1;for("undefined"!=typeof l&&f.setCaret(l);o.length;)f.removeItem(o.pop());return f.showInput(),f.positionDropdown(),f.refreshOptions(!0),u&&(d=f.getOption(u),d.length&&f.setActiveOption(d)),!0},advanceSelection:function(e,t){var n,r,a,i,s,o,l=this;0!==e&&(l.rtl&&(e*=-1),n=e>0?"last":"first",r=O(l.$control_input[0]),l.isFocused&&!l.isInputHidden?(i=l.$control_input.val().length,s=e<0?0===r.start&&0===r.length:r.start===i,
s&&!i&&l.advanceCaret(e,t)):(o=l.$control.children(".active:"+n),o.length&&(a=l.$control.children(":not(input)").index(o),l.setActiveItem(null),l.setCaret(e>0?a+1:a))))},advanceCaret:function(e,t){var n,r,a=this;0!==e&&(n=e>0?"next":"prev",a.isShiftDown?(r=a.$control_input[n](),r.length&&(a.hideInput(),a.setActiveItem(r),t&&t.preventDefault())):a.setCaret(a.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 r,a,i,s;for(i=n.$control.children(":not(input)"),r=0,a=i.length;r<a;r++)s=e(i[r]).detach(),r<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,r=t.revertSettings;t.trigger("destroy"),t.off(),t.$wrapper.remove(),t.$dropdown.remove(),t.$input.html("").append(r.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:r.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,r,a="",i=!1,s=this,o=/^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;
return"option"!==e&&"item"!==e||(n=I(t[s.settings.valueField]),i=!!n),i&&(T(s.renderCache[e])||(s.renderCache[e]={}),s.renderCache[e].hasOwnProperty(n))?s.renderCache[e][n]:(a=s.settings.render[e].apply(this,[t,M]),"option"!==e&&"option_create"!==e||(a=a.replace(o,"<$1 data-selectable")),"optgroup"===e&&(r=t[s.settings.optgroupValueField]||"",a=a.replace(o,'<$1 data-group="'+C(M(r))+'"')),"option"!==e&&"item"!==e||(a=a.replace(o,'<$1 data-value="'+C(M(n||""))+'"')),i&&(s.renderCache[e][n]=a),a)},
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))}}),j.count=0,j.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,r=e.extend({},n,t),a=r.dataAttr,i=r.labelField,s=r.valueField,o=r.optgroupField,l=r.optgroupLabelField,u=r.optgroupValueField,d=function(t,n){var o,l,u,d,c=t.attr(a);if(c)for(n.options=JSON.parse(c),o=0,l=n.options.length;o<l;o++)n.items.push(n.options[o][s]);else{
var f=e.trim(t.val()||"");if(!r.allowEmptyOption&&!f.length)return;for(u=f.split(r.delimiter),o=0,l=u.length;o<l;o++)d={},d[i]=u[o],d[s]=u[o],n.options.push(d);n.items=u}},c=function(t,n){var d,c,f,p,h=n.options,v={},g=function(e){var t=a&&e.attr(a);return"string"==typeof t&&t.length?JSON.parse(t):null},m=function(t,a){t=e(t);var l=I(t.attr("value"));if(l||r.allowEmptyOption)if(v.hasOwnProperty(l)){if(a){var u=v[l][o];u?e.isArray(u)?u.push(a):v[l][o]=[u,a]:v[l][o]=a}}else{var d=g(t)||{};d[i]=d[i]||t.text(),
d[s]=d[s]||l,d[o]=d[o]||a,v[l]=d,h.push(d),t.is(":selected")&&n.items.push(l)}},y=function(t){var r,a,i,s,o;for(t=e(t),i=t.attr("label"),i&&(s=g(t)||{},s[l]=i,s[u]=i,n.optgroups.push(s)),o=e("option",t),r=0,a=o.length;r<a;r++)m(o[r],i)};for(n.maxItems=t.attr("multiple")?null:1,p=t.children(),d=0,c=p.length;d<c;d++)f=p[d].tagName.toLowerCase(),"optgroup"===f?y(p[d]):"option"===f&&m(p[d])};return this.each(function(){if(!this.selectize){var a,i=e(this),s=this.tagName.toLowerCase(),o=i.attr("placeholder")||i.attr("data-placeholder");
o||r.allowEmptyOption||(o=i.children('option[value=""]').text());var l={placeholder:o,options:[],optgroups:[],items:[]};"select"===s?c(i,l):d(i,l),a=new j(i,e.extend(!0,{},n,l,t))}})},e.fn.selectize.defaults=j.defaults,e.fn.selectize.support={validity:_},j.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,r='<a href="javascript:void(0)" class="'+t.className+'" tabindex="-1" title="'+M(t.title)+'">'+t.label+"</a>",a=function(e,t){
var n=e.search(/(<\/[^>]+>\s*)$/);return e.substring(0,n)+t+e.substring(n)};this.setup=function(){var i=n.setup;return function(){if(t.append){var s=n.settings.render.item;n.settings.render.item=function(e){return a(s.apply(this,arguments),r)}}i.apply(this,arguments),this.$control.on("click","."+t.className,function(t){if(t.preventDefault(),!n.isLocked){var r=e(t.currentTarget).parent();n.setActiveItem(r),n.deleteSelection()&&n.setCaret(n.items.length)}})}}()}}),j.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 r,a;return t.keyCode===v&&""===this.$control_input.val()&&!this.$activeItems.length&&(r=this.caretPos-1,r>=0&&r<this.items.length)?(a=this.options[this.items[r]],this.deleteSelection(t,!0)&&(this.setTextboxValue(e.text.apply(this,[a])),this.refreshOptions(!0)),void t.preventDefault()):n.apply(this,arguments)}}()}),j.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 r=this.caretPos-1;if(r>=0&&r<this.items.length){var a=this.options[this.items[r]],i=e.text.call(this,a);this.removeItem(a[this.settings.valueField]),this.setTextboxValue(i),this.refreshOptions(!0)}return n.apply(this,arguments)}}()}),j})}).call(t,n(8))},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(94),i=r(a),s=new i.default({
"interface":["load","stop","canPause"]});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(5),o=r(s),l=n(35),u=r(l),d=n(51),c=r(d),f=n(119),p=r(f),h=n(305),v=r(h),g=n(608),m=r(g),y=n(90),b=r(y),P=n(32),w=r(P),S=n(547),_=r(S),T=u.default.extend({readyEvent:"loadedmetadata",wrapped:["play","pause","setVolume","setPosition","resume","stop"],initialize:function(e){i.default.bindAll(this,"onReady","onWaiting","onStalled","onPlaying","onProgress","onTime","onPause","onVolume","onEnded","onError"),
this.type=e,this.backlog=new v.default,this.backlog.wrapAll(this.wrapped,function(){return!!this.mediaElement},this)},setMediaSrc:function(e,t){w.default.info("[Player] setting src attribute",e),this.mediaElement.setAttribute("src",e)},removeMediaSrc:function(){w.default.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"),r=e.mediaElement||this.createManagedMediaElement();this.backlog.clear(),this.model=t,
this.mediaElement=r,this.autoplay=e.autoplay,this.offset=t.get("position"),this.lastOffset=null;var a=!t.get("directPlay")&&"http"===e.protocol;this.useSeekStreamSwitch=a||e.useOffsetHLS,this.useOffset=e.useOffsetHLS||e.useOffsetHTTP,this.useOffset&&this.model.set("offset",this.offset),r.stream_restart=!1,r.autoplay=this.autoplay,this.addMediaListeners(),w.default.group("[Player] Load"),w.default.info("URL:",n),w.default.info("Autoplay:",this.autoplay),w.default.info("Offset:",this.offset),w.default.groupEnd(),
"dash"===e.protocol?(_.default.load(n,r),this.usingDashPlayer=!0):(this.setMediaSrc(n,e.mimeType),r.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(){w.default.info("[Player] Resuming at "+this.offset),this.setPosition(this.offset),this.offset=0},stop:function(){
w.default.info("[Player] Stopping playback. DashPlayer:",!!this.usingDashPlayer),this.removeMediaListeners(),this.model.set("ready",!1),this.usingDashPlayer&&(this.usingDashPlayer=!1,_.default.stop()),this.removeMediaSrc(),this.removeManagedMediaElement(),this.mediaElement=null},preferElementDuration:function(){if(!i.default.isFinite(this.mediaElement.duration))return!1;if(this.model.get("type")!==c.default.types.PHOTO){var e=i.default.first((0,p.default)(this.model.get("media"),{streamType:b.default.get("audio").id,
selected:!0}));if(e&&"vbr"===e.bitrateMode)return!1}return!0},getErrorMessage:function(e){return(0,o.default)("There was a problem playing this item.")},beforeStreamSwitch:function(){this.mediaElement&&(this.mediaElement.stream_restart=!0)},createManagedMediaElement:function(){var e=c.default.getElementByType(this.type),t="audio"===e,n=(0,m.default)(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")){w.default.info("[Player] Playback is ready");var t=this.mediaElement,n={ready:!0,loaded:!0};if(e.get("type")===c.default.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",c.default.states.BUFFERING)},onStalled:function(){},onPlaying:function(){this.model.set("state",c.default.states.PLAYING)},onProgress:function(){for(var e=this.mediaElement.buffered,t=null,n=null,r=0,a=e.length;r<a;r++){var i=Math.round(1e3*e.start(r)),s=Math.round(1e3*e.end(r));this.useOffset&&(i+=this.offset,s+=this.offset),(null===t||t>i)&&(t=i),(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 i=this.model;this.lastOffset=r,i.get("buffering")&&i.set("state",c.default.states.PLAYING),i.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&&_.default.canPause(this.mediaElement)?this.model.set("state",c.default.states.BUFFERING):this.model.set("state",c.default.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&&w.default.warn("[Player] Media element error code: "+n),this.model.set({state:c.default.states.ERROR,errorMessage:this.getErrorMessage(n)})}});t.default=T,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(5),u=r(l),d=n(163),c=r(d),f=n(35),p=r(f),h=n(638),v=r(h),g=n(639),m=r(g),y=n(631),b=r(y),P=n(634),w=r(P),S=n(1103),_=r(S),T=n(51),I=r(T),M=n(316),C=r(M),x=n(305),E=r(x),k=n(645),D=r(k),A=n(1127),O=r(A),R=n(32),L=r(R),N=n(12),j=r(N),U=n(90),$=r(U),z=n(101),F=r(z),B=n(376),V=r(B),H=n(27),q=r(H),W=n(56),G=r(W),Y=n(378),Q=r(Y),K=n(548),X=r(K),Z=p.default.extend({
mixins:[G.default,Q.default],playerProfileAdapter:V.default,resetStreamDebounce:200,handleSetPositionDebounce:0,errorSkipTime:2e3,wrapped:["play","pause","playPause","setVolume","setRepeat","setPosition","seekForward","seekBackward","setSubtitleStreamID"],modelDefaults:function(){var e=Q.default.modelDefaults.apply(this,arguments);return i.default.extend(e,{state:I.default.states.BUFFERING})},initialize:function(e){e||(e={}),Q.default.initialize.apply(this,arguments),i.default.bindAll(this,"onDecisionSuccess","onDecisionError"),
this.profile=this.playerProfileAdapter.prop(this.type),this.backlog=new E.default,this.backlog.wrapAll(this.wrapped,function(){return!!this.subcontroller},this),this.useBufferDetection()&&(this.bufferingDetector=new O.default,this.bufferingDetector.on("warn",this.onBufferingDetectorWarn,this),this.bufferingDetector.on("buffering",this.onBufferingDetected)),this.resetStreamDebounce&&(this.resetStream=i.default.debounce(this.resetStream,this.resetStreamDebounce)),this.handleSetPositionDebounce&&(this.handleSetPosition=i.default.debounce(this.handleSetPosition,this.handleSetPositionDebounce)),
this.listenTo(j.default,{"companion:play":this.play,"companion:stop":this.stop,"companion:pause":this.pause,"companion:skipNext":this.skipNext,"companion:skipPrevious":this.skipPrevious,"companion:setPosition":this.setPosition,"companion:skipTo":this.skipTo,"companion:setVolume":this.setVolume,"companion:setRepeat":this.setRepeat,"companion:stepForward":this.seekForward,"companion:stepBack":this.seekBackward,"companion:setSubtitleStreamID":this.setSubtitleStreamID})},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),C.default.registerPlayer(this),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(),Q.default.reset.apply(this,arguments)},populateItem:function(e,t){var n=i.default.extend({},t,{reset:!0,scope:"player"});if(e.get("isLibraryItem")&&(n.data={checkFiles:"1",includeChapters:"1"}),e.server.get("cloud")){
var r=e.get("key");n.url=e.server.swizzleNodeUrl(r)}return e.populate(n)},loadMediaElement:function(e){this.subcontroller=this.getSubcontrollerByType(this.playerType),this.backlog.process();var t,n=this.profile&&this.profile.protocols,r=this.protocol;r&&n&&n[r]&&(t=n[r].mimeType),this.subcontroller.load(i.default.extend({},this.originalOptions,{model:this.model,protocol:r,autoplay:this.autoplay,mimeType:t,useOffsetHLS:e.useOffsetHLS,useOffsetHTTP:e.useOffsetHTTP,canDirectPlay:e.canDirectPlay})),this.bufferingDetector&&(this.bufferingDetector.setModel(this.model),
this.bufferingDetector.start())},getSubcontrollerByType:function(e){return new X.default(this.type)},embed:function(e){var t=this.model.get("metadataItem"),n=o.default.ajax(t.server.getXHROptions(e.key));n.done(i.default.bind(function(e){this.model.set("embedHtml",e)},this)),n.fail(i.default.bind(function(e){this.model.set({state:I.default.states.ERROR,errorMessage:(0,u.default)("There was a problem embedding this video.")})},this))},redirect:function(e){var t=this.model.get("metadataItem"),n=t.get("url");
if(!n&&e){var r=e.key.match(/\/webkit\?url=([^&]+)/);r&&(n=decodeURIComponent(r[1]))}window.open(n),i.default.defer(i.default.bind(function(){this.model.set("finished",!0)},this))},play:function(){this.model.get("state")!==I.default.states.PLAYING&&this.subcontroller.play()},pause:function(){this.model.get("state")!==I.default.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!==I.default.states.STOPPED},setVolume:function(e){this.model.set("volume",e),
this.subcontroller.setVolume(e)},setRepeat:function(e){this.model.set({repeatAll:2===e,repeatItem:1===e})},setSubtitleStreamID:function(e){var t=q.default.execute("selectStream",{item:this.model.get("metadataItem"),media:this.model.get("media"),part:this.model.get("part"),streamType:$.default.get("subtitles"),streamID:e});t.done(i.default.bind(function(){this.model.set("subtitleStreamID",e)},this))},restartCurrent:function(){this.getPlayerDecision(this.model.get("metadataItem"),this.originalOptions);
},skipPrevious:function(){var e=Q.default.skipPrevious.apply(this,arguments);return e&&this.switchStreams({autoplay:!0}),e},skipNext:function(){var e=Q.default.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=Q.default.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(e){if(e||(e={}),this.canHandleDebounce()){var t=this.stopSession();t.done(i.default.bind(function(){this.autoplay=e.autoplay!==!1,this.getPlayerDecision(this.model.get("metadataItem"),this.originalOptions);
},this))}},stop:function(e,t){return(0,L.default)("[PlayerController] Stopping playback"),Q.default.stop.apply(this,arguments),this.bufferingDetector&&(this.bufferingDetector.off("warn",this.onBufferingDetectorWarn),this.bufferingDetector.stop()),C.default.unregisterPlayer(this),e&&e.isSwitchingPlayers||j.default.trigger("hide:player",t),this.stopSession(e)},setSkipStates:function(e){this.previousItem=this.getPreviousItem(),this.nextItem=this.getNextItem(),this.model.set(i.default.extend({},e,{canSkipPrevious:!!this.previousItem,
canSkipNext:!!this.nextItem},this.modelOverrides()))},shouldSkipOnError:function(){return!1},skipOnError:function(){if(this.shouldSkipOnError()){this.abortSkipOnError(),L.default.warn("[PlayerController] Item failed to play, automatically skipping to the next item in",(0,c.default)(this.errorSkipTime));var e=i.default.bind(function(){this.model.get("error")&&this.skipNextOrFinish()},this);this._skipOnErrorTimeout=setTimeout(e,this.errorSkipTime)}},abortSkipOnError:function(){clearTimeout(this._skipOnErrorTimeout);
},useBufferDetection:function(){return!0},getErrorMessage:function(e){return(0,D.default)(e)||(0,u.default)("There was a problem playing this item.")},getMaxVideoBitrateQualityIndex:function(e){var t=e.transcoderQualityOptions.maxVideoBitrate;if(t)return t?F.default.getNearestIndexToBitrate(t):void 0},onDecisionSuccess:function(e){var t=this.model,n=t.get("state"),r=0;if(n!==I.default.states.STOPPED&&n!==I.default.states.ERROR){e.part&&e.part.duration&&(r=e.part.duration),this.playbackSessionID=e.playbackSessionID,
this.transcodeSessionID=e.transcodeSessionID,this.playerType=e.playerType,this.protocol=e.protocol;var a=e.media,s=e.part,o=(0,v.default)(a),l=(0,m.default)(a),u=t.get("playQueueItem"),d=u.get("lyricsStreams");this.model.set(i.default.extend({media:a,part:s,url:e.url,subtitlesUrl:e.subtitlesUrl,transcodeServer:e.transcodeServer,mediaIndex:a?(0,b.default)(t.get("metadataItem"),a.id):0,partIndex:s?(0,w.default)(a,s.key):0,partCount:(0,_.default)(e.media),audioStreamID:o?o.id:0,subtitleStreamID:l?l.id:0,
state:this.autoplay?I.default.states.BUFFERING:I.default.states.PAUSED,position:e.offset,duration:r,directPlay:e.canDirectPlay,playbackSessionID:e.playbackSessionID,transcodeSessionID:e.transcodeSessionID,softSubtitlesFailed:!1,canLyrics:d&&d.length>0},this.modelOverrides())),this.loadMediaElement(e)}},onDecisionError:function(e){var t=this.model,n=t.get("state");if(n!==I.default.states.STOPPED&&n!==I.default.states.ERROR){var r=this.playerProfileAdapter.prop("capabilities");return e.embed&&r.embed?void this.embed(e.part):e.redirect&&r.redirect?void this.redirect(e.part):void t.set({
state:I.default.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(e,t){var n=this.timeline();(0,L.default)("[PlayerController] State change",t),t===I.default.states.PLAYING&&n.done(i.default.bind(this.updatePlayQueue,this)),t===I.default.states.STOPPED||t===I.default.states.ERROR?this.stopTimeline():this.startTimeline(),t===I.default.states.PAUSED?this.startPing():this.stopPing(),t===I.default.states.PLAYING?this.startPlaybackTracking():this.stopPlaybackTracking(),
t===I.default.states.ERROR?this.skipOnError():this.abortSkipOnError()},onEndedChange:function(e,t){if(t){var n=e.get("partIndex"),r=e.get("partCount");if(++n>=r)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 a=e.get("media");this.model.set({part:a.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",I.default.states.BUFFERING)},onBufferingDetectorWarn:function(e){var t,n=this.bufferingDetector.reasons,r=e.reason,a=this.bufferingDetector.recommendations,i=e.recommendation,s=this.type===I.default.types.VIDEO?(0,u.default)("video"):(0,u.default)("track");t=r===n.TRANSCODER?i===a.ORIGINAL_QUALITY?(0,u.default)("The server is not powerful enough to convert this {1} for smooth playback. Try playing at the original quality.",s):(0,u.default)("The server is not powerful enough to convert this {1} for smooth playback.",s):r===n.NETWORK?i===a.LOWER_QUALITY?(0,
u.default)("Your connection to the server is not fast enough to stream this {1}. Check your network or try a lower quality.",s):(0,u.default)("Your connection to the server is not fast enough to stream this {1}. Check your network.",s):(0,u.default)("We are having trouble playing this {1}. Please check your playback setup.",s),this.model.set("bufferingMessage",t)}});t.default=Z,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(553),i=r(a),s=i.default.extend({
supportsRetry:function(e){return e.get("isCloud")}});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(56),i=r(a),s=n(553),o=r(s),l=o.default.extend({mixins:[i.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(5),o=r(s),l=n(12),u=r(l),d=n(35),c=r(d),f=n(65),p=r(f),h=n(241),v=r(h),g=n(32),m=r(g),y=n(56),b=r(y),P=c.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 r=n.open(),a=n.socket?n.socket.url:n.pollUrl;return(0,m.default)("["+this.name+"] Opening server event connection to "+t.get("debugName")+" at "+a),r},disconnectAll:function(){var e=this;i.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,r=t.server;(0,m.default)("["+this.name+"] Closing server event connection to "+r.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,r=t.previousModels;i.default.each(r,function(t){e.contains(t)||n.disconnect({server:t})})},onTimeline:function(e){var t=void 0;switch(e.state){case v.default.CREATED:t="Created {1} in {2} on {3}";break;case v.default.MATCHING:t="Matching {1} in {2} on {3}";break;case v.default.DOWNLOADING_METADATA:t="Downloading metadata for {1} in {2} on {3}";
break;case v.default.LOADING_METADATA:t="Loading metadata for {1} in {2} on {3}";break;case v.default.PROCESSED:t="Finished processing {1} in {2} on {3}";break;case v.default.ANALYZING:t="Analyzing {1} in {2} on {3}";break;case v.default.DELETED:t="Deleted {1} in {2} on {3}"}if(t&&e.sectionID>0){var n=e.title||(0,o.default)("an item"),r=e.section?e.section.get("title"):"section "+e.sectionID;u.default.trigger("show:status",e.server,(0,o.default)(t,n,r,e.server.get("friendlyName")))}},onOpen:function(e){
var t=this.connections[e.id],n=t.socket?t.socket.url:t.pollUrl;m.default.info("["+this.name+"] Opened server event connection to "+e.get("debugName")+" at "+n),this._serverRetryManager.stop(e)},onClose:function(e){m.default.warn("["+this.name+"] Unexpectedly closed server event connection to "+e.get("debugName")),this._serverRetryManager.start(e)}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(35),o=r(s),l=n(32),u=r(l),d=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;i.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],r=Math.min(this.maximumDelay,n.attempt);(0,u.default)(this.logFormat,e.get("debugName"),r),n.timeout=setTimeout(function(){t.callback(e),n.attempt++,t._scheduleRetry(e)},1e3*r)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(399),o=r(s),l=n(41),u=r(l),d=n(99),c=r(d),f=n(62),p=r(f),h=n(22),v=r(h),g=v.default.extend({
name:"AbstractStorageModel",responseType:p.default.json,save:function(e,t){var n=this,r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],a=this.attributes,s=void 0;if(null==e||i.default.isObject(e)?(s=e,r=t):(s={})[e]=t,r=i.default.extend({validate:!0},r),this._warnUnsupportedOptions(r),s&&!r.wait){if(!this.set(s,r))return!1}else if(!this._validate(s,r))return!1;s&&r.wait&&(this.attributes=i.default.extend({},a,s));var l=this.toJSON({syncedOnly:!0,excludeDefaults:!0});c.default.getInstance().persistDefaults||(l=(0,
o.default)(i.default.result(this,"defaults"),l));var u=this._serialize(l),d=c.default.set(this._getStorageKey(),u);return d.done(function(){n.attributes=a,n.trigger("sync",n,a,r)}),d.fail(function(e){n.trigger("error",n,e,r)}),s&&r.wait&&(this.attributes=a),d},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=c.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=i.default.result(this,"storageKey");if(!e)throw new Error(this.name+" requires a `storageKey` property");return e},_fetch:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this._warnUnsupportedOptions(t);var n=c.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=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(140),u=r(l),d=n(59),c=r(d),f=c.default.extend({fetch:function(){return this.storage.fetch().then(i.default.bind(function(){var e=this._readFromStorage();return e?(this.set(e),this):o.default.Deferred().reject();
},this))},save:function(e){return(0,u.default)(this.storage.fetch()).then(i.default.bind(function(){return e&&this.set(e),this._saveToStorage(this.toJSON())},this))},destroy:function(){return(0,u.default)(this.storage.fetch()).then(i.default.bind(function(){return this.storage.unset(i.default.result(this,"storageKey")),this.storage.save()},this))},_readFromStorage:function(){return this.storage.get(i.default.result(this,"storageKey"))},_saveToStorage:function(e){return this.storage.save(i.default.result(this,"storageKey"),e);
}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return l.default.get("shouldCreateFlexModels")&&(e.prototype.sessionRelations=a({},e.prototype.sessionRelations,i({},"desktop",t))),e}var a=n(11).default,i=n(38).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(63),l=s(o);e.exports=t.default},function(e,t,n){"use strict";var r=n(9).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(26),s=r(i),o=n(195),l=a(o),u=n(20),d=a(u),c=n(22),f=a(c),p=n(974),h=a(p),v=f.default.extend({
mixins:[l.default],name:"ChannelListModel",context:["server"],idAttribute:"key",collectionName:"channels",url:function g(){var e=this.get("key"),g=e?e:s.join(["/channels",this.get("subset")]);return this.getPaginatedUrl(g)},sessionAttrs:{key:d.default.string,subset:d.default.oneOf("all","recentlyViewed"),currentPageStart:d.default.integer,currentPageSize:d.default.integer,populatedRange:d.default.object},syncedAttrs:{totalSize:d.default.integer,viewGroup:d.default.string,title1:d.default.string,title2:d.default.string
},syncedRelations:{channels:{relationClass:h.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=v,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(49),i=r(a),s=n(20),o=r(s),l=n(62),u=r(l),d=n(22),c=r(d),f=n(85),p=r(f),h=c.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?i.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=i.default.parseArray(e.Metadata),r=n.length-1;r>=0;r--){var a=n[r];if(a.isChannelItem=!0,a.settings||a.search){var s=a.settings?"prefsKey":"searchKey";e[s]=a.key,n.splice(r,1)}}return e.Metadata=n,e.metadataList=e,e}});t.default=h,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(59),u=r(l),d=n(1114),c=r(d),f=n(1117),p=r(f),h=n(1110),v=r(h),g=n(379),m=r(g),y=u.default.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 m.default([],{type:e.mediaType,server:e.server})})},fetch:function(){return o.default.Deferred().resolve().promise();
},queueContent:function(e,t,n){n||(n={});var r=o.default.Deferred().resolve().promise(),a=e.get("isPlayQueueItem")?e.get("metadataItem"):e;return this.isItemQueueable(a)&&(a.get("children")&&i.default.result(a.get("children"),"url")&&(r=r.then(function(){return a.get("children").populate()})),r=r.done(i.default.bind(function(){this.set({lastAddedItem:a,hasUpNext:!0,hasUserAdditions:this.get("collection").length>0,shuffled:!!n.shuffled});var e=this.get("collection").indexOf(t);e===-1&&(e=0);var r=n.next?{
at:e+1}:{},s=(0,c.default)(a);if(s){var o=s.filter(p.default);n.shuffle&&(o=(0,i.default)(o).shuffle());var l=i.default.map(o,i.default.bind(v.default,this));this.get("collection").add(l,r)}else this.get("collection").add(v.default.apply(this,[a]),r);this.get("collection").trigger("reset",this.get("collection"))},this))),r},addContent:function(e,t){return this.queueContent(e,this.get("selectedItem"),t).then(i.default.bind(this._setSelectedItem,this,t))},_setSelectedItem:function(e){var t=null;e&&e.firstItemKey?t=this.get("collection").find(function(t){
return t.get("key")===e.firstItemKey}):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")?o.default.Deferred().resolve().promise():(this.set("hasUserAdditions",!0),this.get("collection").remove(e),this.get("collection").trigger("reset",this.get("collection")),o.default.Deferred().resolve().promise())},moveItem:function(e,t){if(e===this.get("selectedItem").get("playQueueItemID"))return o.default.Deferred().resolve().promise();
var n=this.get("collection"),r=n.findWhere({playQueueItemID:e});n.remove(r);var a=t||this.get("selectedItem").get("playQueueItemID"),i=n.findWhere({playQueueItemID:a}),s=n.indexOf(i)+1;return this.set("hasUserAdditions",!0),n.add(r,{at:s}),n.trigger("reset",n),o.default.Deferred().resolve().promise()},isItemQueueable:function(e){if(e.get("currentSubset")&&"photo"!==e.viewGroup)return!1;if("photoAlbum"===e.get("type")&&!e.get("isLibraryItem"))return!1;var t=["track","episode","movie","photo","clip","userPlaylistItem","photoAlbum","album","season"],n=(0,
i.default)(t).contains(e.get("type")),r=(0,c.default)(e),a=r&&r.any(p.default);return n||a},toggleShuffle:function(){return o.default.Deferred().resolve().promise()},setRepeatAll:function(e){return o.default.Deferred().resolve().promise()},yieldOwnership:function(e){e=e||{};var t,n=this.get("lastAddedItem");return t=n.server.get("synced")||e.absoluteUrl?i.default.result((0,c.default)(n),"url"):this.get("selectedItem").get("key"),o.default.Deferred().resolve(t).promise()},takeOwnership:function(){
return o.default.Deferred().resolve().promise()},supports:function(e){return!(e&&(e.unwatched||e.remoteRefresh))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(35),o=r(s),l=n(56),u=r(l),d=n(37),c=r(d),f=n(559),p=r(f),h=n(236),v=r(h),g=o.default.extend({mixins:u.default,initialize:function(e){this.server=e.server,this._queues={audio:null,photo:null,video:null},this.canCreateOnLocal=p.default.prototype.isItemQueueable,
this.doesLocalSupport=p.default.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")?c.default.getChildMediaType(t.get("firstItemType")).element:e.get("element")||c.default.getChildMediaType(t.get("type")).element;var r=null;return this.canCreateOnServer(e)?r=new v.default({mediaType:n},{server:this.server}):this.canCreateOnLocal(e)&&(r=new p.default({mediaType:n},{server:this.server})),this._queues[n]=r,
this.trigger("change change:playQueue:"+n,r),r},getForType:function(e){return this._queues[e]},createForType:function(e,t){var n=null;return n=t.onServer?new v.default({mediaType:e},{server:this.server}):new p.default({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")||c.default.getChildMediaType(t).element;
var r=this._queues[n];return r&&r.isItemQueueable(e)?r:null},get:function(e){return i.default.findWhere(this._queues,{id:e})},populateQueue:function(e,t){var n=new v.default({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(){i.default.each(i.default.keys(this._queues),this.remove,this)},canCreateOnServer:function(e){return this.server.supports("playQueues")&&this.server.get("isFullServer")&&v.default.prototype.isItemQueueable(e);
},doesServerSupport:function(e){return this.server.supports("playQueues")&&v.default.prototype.supports(e)},canCreateFor:function(e,t){return this.canCreateOnServer(e)&&this.doesServerSupport(t)||this.canCreateOnLocal(e)&&this.doesLocalSupport(t)}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(971),o=r(s),l=o.default.extend({initialize:function(e){this.playQueue=e.playQueue,this.includeSelectedItem=e.includeSelectedItem,
this.addFilter(i.default.bind(this.filterUpNext,this)),this.listenForUpNextChanges()},listenForUpNextChanges:function(){var e=i.default.debounce(this.onPlayQueueChange),t=["change:playQueueSelectedItemID","change:playQueueLastAddedItemID"];this.listenTo(this.playQueue,t.join(" "),e),this.listenTo(this.playQueue.get("collection"),"change:queueIndex",e)},filterUpNext:function(e){var t=this.superset.indexOf(e),n=this.playQueue.getUpNextRange(),r=n.start,a=n.end;return this.includeSelectedItem||(r+=1),
t>=r&&t<=a},onPlayQueueChange:function(){this.refilter()}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(26),l=a(o),u=n(28),d=r(u),c=n(295),f=r(c),p=d.default.extend({name:"FilterCollection",context:["server","section","includeAdvanced"],model:f.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"FirstCharacterModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:i.default.string,
title:i.default.string,size:i.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"MediaTypeModel",context:["server","section"],sessionAttrs:{id:i.default.integer,typeString:i.default.string,title:i.default.string,plural:i.default.string,element:i.default.string,child:i.default.integer,
grandchild:i.default.integer,parent:i.default.integer,grandparent:i.default.integer,selected:i.default.boolean},defaults:{selected:!1}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(987),o=r(s),l=i.default.extend({name:"MetadataTypeCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(49),s=r(i),o=n(72),l=a(o),u=n(66),d=r(u),c=n(20),f=r(c),p=n(62),h=r(p),v=n(22),g=r(v),m=n(85),y=r(m),b=g.default.extend({name:"HubModel",context:["server","section","metadataItem","allowSync"],entityType:l.HUB,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,d.default)(this.entityType,e.hubIdentifier,this.server.entityID(),this.section&&this.section.entityID(),this.metadataItem&&this.metadataItem.entityID())},idAttribute:"hubIdentifier",
rootPropertyName:"Hub",url:function(){return this.get("key")||this.get("hubKey")},sessionAttrs:{isMetadataListPending:f.default.boolean,isMetadataListPopulated:f.default.boolean,metadataListError:f.default.object},syncedAttrs:{key:f.default.string,hubKey:f.default.string,hubIdentifier:f.default.string,title:f.default.string,type:f.default.string,size:f.default.integer,more:f.default.boolean,random:f.default.boolean,browse:f.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===h.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,r=e.get("totalSize"),a={size:n};null!=r&&(a.more=r>n),this.set(a)}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(995),o=r(s),l=i.default.extend({name:"OverlayCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(165),l=r(o),u=n(26),d=a(u),c=n(195),f=r(c),p=n(20),h=r(p),v=n(22),g=r(v),m=n(996),y=r(m),b=g.default.extend({
mixins:[f.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),d.join("/playlists/all",n)},sessionAttrs:{isPlaylistList:h.default.boolean,
currentPageStart:h.default.integer,currentPageSize:h.default.integer,populatedRange:h.default.object},syncedAttrs:{totalSize:h.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 r=l.default.addVersionHeader(2,n);return g.default.prototype.sync.call(this,e,t,r)}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(246),i=r(a),s=n(20),o=r(s),l=n(22),u=r(l),d=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,librarySectionID:o.default.string,
librarySectionKey:o.default.string,librarySectionType:o.default.integer,filter: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,i.default)(this.server,e)}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(59),u=r(l),d=n(237),c=r(d),f=u.default.extend({whitelistedAttrs:["friendlyName","label","capabilities"],
defaults:{protocolCapabilities:["playback","timeline","mirror","playqueues"]},initialize:function(){this.set("nowPlaying",new c.default([],{server:this.server}))},parse:function(e){var t=i.default.pick(e,this.whitelistedAttrs);return t.friendlyName=(0,o.default)("<div/>").html(t.friendlyName).text(),t.protocol=e.receiverType,t.volume=e.volume.level,t.muted=e.volume.muted,t}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var a=n(3),i=r(a),s=n(20),o=r(s),l=n(387),u=r(l),d=n(51),c=r(d),f=u.default.extend({name:"PhotoPlayerModel",sessionAttrs:i.default.extend({},u.default.prototype.sessionAttrs,{slideshowState:o.default.oneOf(c.default.slideshowStates.PLAYING,c.default.slideshowStates.PAUSED)}),defaults:function(){return i.default.extend({},u.default.prototype.defaults.apply(this),{slideshowState:c.default.slideshowStates.PAUSED,slideshowPaused:!0,slideshowPlaying:!1})},derivedAttrs:i.default.extend({},u.default.prototype.derivedAttrs,{
slideshowPaused:function(){return this.get("slideshowState")===c.default.slideshowStates.PAUSED},slideshowPlaying:function(){return this.get("slideshowState")===c.default.slideshowStates.PLAYING}})});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(99),i=r(a),s=n(653),o=r(s),l=n(235),u=r(l),d=n(555),c=r(d),f=2592e5,p=u.default.extend({storageKey:"resumePlayQueue",serialize:function(e){return u.default.prototype.serialize.call(this,o.default.augmentDictionary(e,{
ttl:f}))},_getStorage:function(){return i.default}}),h=c.default.extend({initialize:function(e,t){c.default.prototype.initialize.apply(this,arguments),this.user=t.user,this.storage=new p},storageKey:function(){return this.user.id},toJSON:function(){var e=c.default.prototype.toJSON.apply(this,arguments);return o.default.augmentObj(e,f,!0)}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(11).default,a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0
});var s=n(3),o=a(s),l=n(26),u=i(l),d=n(192),c=a(d),f=n(20),p=a(f),h=n(22),v=a(h),g=n(237),m=a(g),y=v.default.extend({name:"PlexPlayerModel",context:["server"],idAttribute:"machineIdentifier",rootPropertyName:"Server",sessionAttrs:{nowPlaying:p.default.instanceOf(m.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 m.default([],{server:this.server})}},url:function(){return"http://"+this.get("address")+":"+this.get("port")+"/"},getXHROptions:function(e,t){return r({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=c.default.getInstance(),t=o.default.clone(e);return t}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){return void 0===n?t:s.default.isObject(t)?t:n}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(3),s=a(i);e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(158),o=r(s),l=i.default.extend({name:"ProviderFeatureCollection",context:["server","provider"],
model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(20),o=r(s),l=n(89),u=r(l),d=n(14),c=u.default.prototype,f=u.default.extend({name:"TransientServerModel",cache:null,persistInCache:!1,sessionAttrs:i.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 i.default.extend({},p,{friendlyName:"Transient Server",isTransient:!0})},initialize:function(e){var t=e.originalMachineIdentifier,n=(0,d.resolve)("appModel"),r=n.get("servers").get(t);r&&i.default.extend(e,r.pick("publicAddressMatches","version")),u.default.prototype.initialize.apply(this,arguments)},addConnection:function(){var e=c.addConnection.apply(this,arguments),t=e.getIpAddressFromPlexDirectAddress();return t&&e.set("address",t),this.testConnection(e),e},updateCacheKey:function(){},
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=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(20),o=r(s),l=n(22),u=r(l),d=n(1034),c=r(d),f=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:c.default}},copyFromServer:function(e){var t={};i.default.each(this.syncedAttrs,function(n,r){t[r]=e.get(r)}),this.set(t)}});t.default=f,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(63),o=r(s),l=n(235),u=r(l),d=u.default.extend({storageKey:"sessionstats",incPlaybackCount:function(){this.save("playbackCount",this.get("playbackCount")+1)},startSession:function(){var e=(new Date).getTime();this.save({playbackCount:0,startTime:e,heartbeatTime:e}),setInterval(i.default.bind(function(){this.save("heartbeatTime",(new Date).getTime())},this),o.default.get("heartbeatInterval"));
}});t.default=new d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(57),u=r(l),d=n(390),c=r(d),f={INACTIVE:"inactive",SCHEDULED:"scheduled",IN_PROGRESS:"inprogress",COMPLETE:"complete",CANCELLED:"cancelled",ERROR:"error"};t.grabOperationStatuses=f;var p=o.default.extend({name:"MediaGrabOperationModel",context:["server"],rootPropertyName:"MediaGrabOperation",syncedAttrs:{mediaSubscriptionID:i.default.string,
mediaIndex:i.default.integer,channelTitle:i.default.string,status:i.default.string,error:i.default.string,linkedKey:i.default.string},syncedRelations:{metadataItem:{relationClass:u.default,rootPropertyName:"Metadata"},conflicts:function(){return{relationClass:c.default,deferred:!0}}},derivedAttrs:{mediaItem:function(){var e=this.get("mediaIndex"),t=this.get("metadataItem"),n=t.get("Media")||[];return n[e]},beginsAt:function(){var e=this.get("mediaItem");return e&&e.beginsAt},endsAt:function(){var e=this.get("mediaItem");
return e&&e.endsAt}},augmentResponse:function(e){var t=e;return t[this.rootPropertyName]&&(t=t[this.rootPropertyName]),t.Conflicts&&(t.conflicts=t.Conflicts.MediaGrabOperation,delete t.Conflicts),t}});t.default=p},function(e,t,n){"use strict";function r(e,t){switch(e){case p.INT:case p.ENUM:return o.default.parseInteger(t);case p.BOOL:return o.default.parseBoolean(t);default:return t}}var a=n(93).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(49),o=i(s),l=n(20),u=i(l),d=n(22),c=i(d),f="|",p={
INT:"int",TEXT:"text",BOOL:"bool"};t.settingsTypes=p;var h=c.default.extend({name:"MediaSettingModel",context:["server"],idAttribute:"id",rootPropertyName:"Setting",syncedAttrs:{id:u.default.string,advanced:u.default.boolean,"default":u.default.oneOfType(u.default.integer,u.default.string,u.default.boolean),hidden:u.default.boolean,group:u.default.string,label:u.default.string,summary:u.default.string,type:u.default.oneOf(p.INT,p.TEXT,p.BOOL,p.ENUM),value:u.default.oneOfType(u.default.integer,u.default.string,u.default.boolean),
enumValues:u.default.array},augmentResponse:function(e){return e.default=r(e.type,e.default),e.value=r(e.type,e.value),e.enumValues&&(e.enumValues=e.enumValues.split(f).map(function(t){var n=t.split(":"),i=a(n,2),s=i[0],o=i[1],l=void 0===o?s:o;return{label:decodeURIComponent(l),value:r(e.type,s)}})),e},parseAndSetValue:function(e){this.set("value",r(this.get("type"),e))}});t.default=h},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(49),i=r(a),s=n(62),o=r(s),l=n(28),u=r(l),d=n(298),c=r(d),f=u.default.extend({
name:"MediaSubscriptionCollection",context:["server"],model:c.default,url:"/media/subscriptions",augmentResponseText:function(e,t){return t===o.default.xml?i.default.replaceMetadataXMLElementNames(e):e}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(49),i=r(a),s=n(62),o=r(s),l=n(28),u=r(l),d=n(298),c=r(d),f=u.default.extend({name:"MediaSubscriptionTemplateCollection",context:["server"],url:"/media/subscriptions/template",
model:c.default,augmentResponseText:function(e,t){return t===o.default.xml?i.default.replaceMetadataXMLElementNames(e):e},augmentResponse:function(e){return e.SubscriptionTemplate}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(46),u=r(l),d=n(59),c=r(d),f=n(1050),p=r(f),h=c.default.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(e){var t=i.default.isObject(e)?e:u.default.parseXML(e);return t.User&&(t=t.User),u.default.parseInteger(t,"id"),u.default.parseBoolean(t,["home","protected","restricted","allowSync","allowCameraUpload","allowChannels"]),
u.default.parseQueryString(t,["filterMovies","filterTelevision","filterMusic","filterPhotos"],"|"),u.default.parseArray(t,"Server"),t},parse:function(e){var t=this.convert(e);return this.parseServers(t),t=i.default.pick(t,this.whitelistedAttrs)},parseServers:function(e){var t=this.get("serverShares"),n=e.Server;t?t.set(n,{parse:!0}):(t=new p.default(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 t={server:this.server,section:this.section,channel:this.channel,parent:this.parent,parse:!0,skipCache:!0};return new this.constructor(o.default.extend(!0,{},e),t)||null},getSaveParams:function(e,t){var n=this;if(i.default.isEmpty(e)){var r=this.pick(this.saveAttrs);return i.default.map(r,function(e,t,r){i.default.isBoolean(e)?r[t]=e?"1":"0":i.default.contains(n.filterAttrs,t)&&(r[t]=n.stringifyFilter(e))},this),r}return c.default.prototype.getSaveParams.apply(this,arguments);
},stringifyFilter:function(e){var t=i.default.map(i.default.keys(e),function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])});return t.join("|")}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(83),i=r(a),s=n(392),o=r(s),l=i.default.extend({model:o.default,url:"/api/home/users",parse:function(e){return this.convert(e,"User")}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1054),o=r(s),l=i.default.extend({name:"UserEntitlementCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(26),l=a(o),u=n(72),d=a(u),c=n(66),f=r(c),p=n(20),h=r(p),v=n(57),g=r(v),m=g.default.prototype,y=g.default.extend({name:"UserPlaylistItemModel",entityType:d.USER_PLAYLIST_ITEM,entityID:function(){
var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];return(0,f.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({},m.sessionAttrs,{isUserPlaylistItem:h.default.boolean}),syncedAttrs:s.default.extend({},m.syncedAttrs,{
id:h.default.integer,sourceTitle:h.default.string,recommender:h.default.string,message:h.default.string}),defaults:s.default.extend({},m.defaults,{isUserPlaylistItem:!0}),augmentResponse:function(e,t){var n=m.augmentResponse.apply(this,arguments);if(n.type="userPlaylistItem",n.ratingKey=n.url,n.thumb){var r=/\?(\d+)$/.exec(n.thumb);r&&(n.addedAt=r[1])}return n}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(3),s=r(i),o=n(5),l=r(o),u=n(49),d=r(u),c=n(26),f=a(c),p=n(195),h=r(p),v=n(20),g=r(v),m=n(62),y=r(m),b=n(22),P=r(b),w=n(1057),S=r(w),_={WATCH_LATER:"queue",RECOMMENDED:"recommendations"},T={ALL:"all",UNWATCHED:"unwatched",WATCHED:"watched"},I=P.default.extend({mixins:[h.default],name:"UserPlaylistModel",context:["server"],idAttribute:"key",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(s.default.result(this,"containerKey"))},containerKey:function(){return f.join(["/pms/playlists",this.get("key"),this.get("subset")]);
},sessionAttrs:{isUserPlaylist:g.default.boolean,key:g.default.oneOf(_.WATCH_LATER,_.RECOMMENDED).isRequired,subset:g.default.oneOf(T.ALL,T.UNWATCHED,T.WATCHED).isRequired,currentPageStart:g.default.integer,currentPageSize:g.default.integer,populatedRange:g.default.object},syncedAttrs:{totalSize:g.default.integer,identifier:g.default.string,mediaTagPrefix:g.default.string,mediaTagVersion:g.default.string,viewGroup:g.default.string,title:g.default.string},syncedRelations:{metadataItems:{relationClass:S.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===_.WATCH_LATER?(0,l.default)("Watch Later"):e===_.RECOMMENDED?(0,l.default)("Recommended"):void 0},helpRoute:function(){var e=this.get("key");if(e===_.WATCH_LATER)return"#!/playlist/"+e+"/help";
},playlistRoute:function(){return"#!/playlist/"+this.get("key")}},defaults:function(){return{isUserPlaylist:!0,subset:T.ALL,populatedRange:{start:0,end:0,size:0}}},initialize:function(){this.startPopulatedRangeMonitor()},augmentResponseText:function(e,t){return t===y.default.xml?d.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:_,subsets:T});t.default=I,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1058),o=r(s),l=i.default.extend({name:"UserProviderCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1059),o=r(s),l=i.default.extend({name:"UserRoleCollection",
model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(64),s=r(i),o=n(394),l=a(o),u=(0,s.default)(l.RESET_PRIMARY_SERVER);t.resetPrimaryServer=u;var d=(0,s.default)(l.CHANGE_PRIMARY_SERVER);t.changePrimaryServer=d;var c=(0,s.default)(l.CONFIRM_RELAY_CONNECTION);t.confirmRelayConnection=c},function(e,t,n){"use strict";function r(e){var t=e.key,n=e.getModel,r=(0,u.default)(t),i="is"+r+"Pending",s="is"+r+"Populated",l=t?t+"Error":"error";
return function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=r.count,d=n(e,r),c=t?d.get(t):d,f=d.sessionAttrs;(0,o.default)(f&&f.hasOwnProperty(i),d.name+" is missing a session attribute for "+i),(0,o.default)(f&&f.hasOwnProperty(s),d.name+" is missing a session attribute for "+s),(0,o.default)(f&&f.hasOwnProperty(l),d.name+" is missing a session attribute for "+l),d.set(i,!0),c.repopulateRange(u).done(function(){var e;d.set((e={},a(e,i,!1),a(e,s,!0),a(e,l,null),e))}).fail(function(e,t){
var n;d.set((n={},a(n,i,!1),a(n,l,t),n))})}}var a=n(38).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(41),o=i(s),l=n(200),u=i(l);e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.server,n=t.getXHROptions("/library/metadata/"+e.id+"/analyze",{type:"PUT"});e.set("mediaState",u.ANALYZING);var r=o.default.ajax(n).fail(function(t){e.unset("mediaState")});return r.promise()}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=r;var s=n(8),o=a(s),l=n(1073),u=i(l);e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.server,n=t.getXHROptions("/library/metadata/"+e.id+"/refresh",{type:"PUT"});e.set("metadataState",u.QUEUED);var r=o.default.ajax(n).fail(function(t){e.unset("metadataState")});return r.promise()}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(8),o=a(s),l=n(607),u=i(l);e.exports=t.default},function(e,t,n){"use strict";
function r(e,t){var n=e.server,r=o.default.result(e,"url"),a=n.getXHROptions(c.join([r,"move"],{after:t}),{type:"PUT"});return u.default.ajax(a).promise()}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(3),o=a(s),l=n(8),u=a(l),d=n(26),c=i(d);e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(15),o=(0,s.createSelectorCreator)(s.defaultMemoize,i.default.isEqual);
t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),i=n(135),s=r(i),o=(0,a.createSelector)(s.default,function(e){return e.libraries});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),i=n(135),s=r(i),o=(0,a.createSelector)(s.default,function(e){return e.hubs});t.default=o,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),i=n(135),s=r(i),o=(0,a.createSelector)(s.default,function(e){return e.metadataLists});t.default=o,e.exports=t.default},function(e,t,n){"use strict";function r(e){return(0,l.createSelector)(f.default,(0,h.default)(),function(t,n){return n?n.reduce(function(n,r){var a=t[r];return a&&o.default.findWhere(a.features,{type:e})&&n.push(r),n},[]):[]})}function a(e){return(0,d.default)(r(e),function(e){return e})}var i=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(3),o=i(s),l=n(15),u=n(238),d=i(u),c=n(303),f=i(c),p=n(600),h=i(p);e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,i.createSelector)((0,o.default)(),function(e){return e?e.desktop.providers:void 0})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(15),s=n(70),o=a(s);e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),i=r(a),s=n(15),o=n(602),l=r(o),u=(0,s.createSelector)(l.default,function(e){return i.default.where(e,{isOutOfDate:!0})});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),i=n(239),s=r(i),o=(0,a.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){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),i=n(135),s=r(i),o=(0,a.createSelector)(s.default,function(e){return e.mediaSubscriptions});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(65),o=r(s),l=n(396),u=r(l),d=u.default.extend({maxCycles:3,maxSize:50,imageParamsRegex:/&?(width|height|minSize)=([^&]+)/g,initialize:function(){u.default.prototype.initialize.apply(this,arguments),
this._infoMemo={}},store:function(e,t){if(t||(t=this.getItemCacheKey(e)),t){var n=e.url,r=this.getImageInfo(n),a={url:n,blobUrl:e.blobUrl,size:r.size},s=this.get(t);if(s){if(!s.images.hasOwnProperty(n)){var o=s.sizes;s.images[n]=a;var l=i.default.sortedIndex(o,a,"size");o.splice(l,0,a)}}else s={images:{},sizes:[a]},s.images[n]=a,this.startListening(),s._cacheKey=t,this._cache[t]=s,this.size++,e.persistInCache||this.setItemCycle(s,t,i.default.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,r){return t[n]=parseInt(r,10),""}),r={key:n,size:t.width*t.height+t.minSize};return this._infoMemo[e]=r,r},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 r=n.images[e];if(r)return r.blobUrl}},getPlaceholder:function(e){
var t=this.getImageInfo(e),n=this.get(t.key);if(n){if(n.images[e])return;var r=i.default.last(n.sizes);return r.blobUrl}},remove:function(e,t){u.default.prototype.remove.apply(this,arguments),i.default.each(e.sizes,function(e){this.removeImageInfo(e.url),o.default.hasObjectUrl&&window.URL.revokeObjectURL(e.blobUrl)},this)}});t.default=d,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="error";t.ERROR=n;var r="success";t.SUCCESS=r},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 r="matching";t.MATCHING=r;var a="processing";t.PROCESSING=a;var i="loading";t.LOADING=i},function(e,t){"use strict";function n(e){return e.toLowerCase();
}function r(e,t){e=n(e);var i=!r.preventRecycle&&t;if(i&&a[e])return a[e];var s=document.createElement(e);return i&&(a[e]=s),s}Object.defineProperty(t,"__esModule",{value:!0});var a={};t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(null==e)return"";var t=s.default.duration(e),n=365*t.years(),r=30*t.months(),a=n+r+t.days();return 1!==a?(0,l.default)("{1} days",a):(0,l.default)("{1} day",a)}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),s=a(i),o=n(5),l=a(o);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(null==e)return"";var t=s.default.duration(e),n=t.days(),r=t.hours(),a=1!==n;return n&&r?a?(0,l.default)("{1} days {2} hr",n,r):(0,l.default)("{1} day {2} hr",n,r):n?a?(0,l.default)("{1} days",n):(0,l.default)("{1} day",n):(0,l.default)("{1} hr",r)}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),s=a(i),o=n(5),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){
if(null==e)return"";var t=s.default.duration(e),n=24*t.days()*60,r=60*t.hours(),a=t.minutes()+r+n,i=t.seconds();return a?(0,l.default)("{1} min",a):i>0?(0,l.default)("{1} sec",i):""}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),s=a(i),o=n(5),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=n.includeMinuteZero,a=void 0===r||r,i=s.default.unix(e),o=s.default.unix(t),l=i.format("a")===o.format("a"),u=i.minutes(),d=o.minutes(),c="h"+(a||u>0?":mm":"")+(l?"":"a"),f="h"+(a||d>0?":mm":"")+"a",p=i.format(c),h=o.format(f);
return p+"-"+h}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(null==e)return!1;var t=s.default.unix(e);return(0,s.default)().isSame(t,"week")}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(53),s=a(i);e.exports=t.default},function(e,t,n){"use strict";function r(e){if(null==e)return!1;var t=s.default.unix(e);return(0,s.default)().add(1,"day").isSame(t,"day");
}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(53),s=a(i);e.exports=t.default},function(e,t,n){"use strict";function r(e){if(null==e||!(0,s.default)(e))return!1;var t=parseInt((0,l.default)(e,"HH"),10);return t>16}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(243),s=a(i),o=n(242),l=a(o);e.exports=t.default},function(e,t,n){"use strict";function r(e){return function(t,n,r){var i=r.value;return r.value=(0,a.throttle)(i,e),
r}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var a=n(3);e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s={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},o=i.default.pairs(s),l={},u={getIcon:function(e){var t="default";return e?l.hasOwnProperty(e)?l[e]:(i.default.every(o,function(n){var r=n[1].test(e);return r&&(t=n[0],l[e]=t),!r}),t):t}};t.default=u,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){var r=l.default.extend(!0,{},e),i=a(r);return i.forEach(function(e){var t=r[e],a=t&&t[0],i=a.type===c.BOOLEAN,s=n.type===c.BOOLEAN;
a&&i!==s||delete r[e]}),r[t]=[n],r}var a=n(79).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(3),o=(i(s),n(8)),l=i(o),u=n(41),d=(i(u),n(199)),c=(i(d),n(164));e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="=";t.EQUAL=n;var r="!=";t.NOT_EQUAL=r;var a=">=";t.GREATER_THAN_OR_EQUAL=a;var i="<=";t.LESS_THAN_OR_EQUAL=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="&";
t.AND=n;var r=",";t.OR=r},function(e,t,n){"use strict";function r(e,t){if(!e)return!1;var n=!!s.default.find(e,function(e){var n=e.value;return s.default.isArray(n)?n.indexOf(t)>-1:n===t});return n}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(3),s=a(i);e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){var r=l.default.extend(!0,{},e),a=r[t];if(!a)return r;if(null==n)return delete r[t],r;for(var i=a.length;i-- >0;){var o=a[i],u=o.value;if(n===u)a.splice(i,1);else if(s.default.isArray(u)){
var d=u.indexOf(n);d>-1&&(u.splice(d,1),1===u.length?o.value=u[0]:u.length||a.splice(i,1))}}return a.length||delete r[t],r}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(3),s=a(i),o=n(8),l=a(o),u=n(41),d=(a(u),n(199));a(d);e.exports=t.default},function(e,t,n){"use strict";function r(e){if(!o.default.isEmpty(e)){if(e===d)return c;var t=a(e).reduce(function(t,n){var r=e[n],a=r.map(function(e){var t=e.value,r=e.operator,a=void 0===r?l.EQUAL:r,i=o.default.isArray(t)?t.join(u.OR):t;
return encodeURIComponent(n)+a+encodeURIComponent(i)});return t.concat(a)},[]);return d=e,c=t.join(u.AND)}}var a=n(79).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(3),o=i(s),l=n(619),u=n(620),d=void 0,c=void 0;e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(196),i=r(a),s=n(86),o=r(s);t.default=(0,o.default)(i.default),e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(407),i=r(a),s=n(86),o=r(s);t.default=(0,o.default)(i.default),e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(312),i=r(a),s=n(86),o=r(s);t.default=(0,o.default)(i.default),e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(418),i=r(a),s=n(86),o=r(s);t.default=(0,o.default)(i.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 r(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("."),r=e.split("."),a=0,i=n.length;a<i;a++)if(a<r.length){var o=parseInt(n[a],10),l=parseInt(r[a],10);if(o<l)return!0;if(o>l)return!1}return!0;
}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(41),s=a(i);e.exports=t.default},function(e,t,n){"use strict";function r(e){return s.default[e]||""}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(309),s=a(i);e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=e.get("Media"),r=s.default.indexOf(n,s.default.findWhere(n,{id:t}));return r}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(3),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(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 a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=void 0;if(e.Part.length>1)for(var r=0,a=0,i=e.Part.length;a<i&&(n=e.Part[a],
n.duration)&&(r+=n.duration,!(r>t));a++);else n=s.default.first(e.Part);return n}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=e.Part,r=s.default.indexOf(n,s.default.findWhere(n,{key:t}));return r}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i);t.default=r,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 r=n;if(e.Part.length>1)for(var a=0,i=e.Part.length;a<i;a++){var s=e.Part[a];if(!s.duration)break;if(t.key===s.key)break;r-=s.duration}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){var r=(0,s.default)(e,t);if(n=(0,l.default)(r,n)){var a=(0,d.default)(e,r,t);return"/library/parts/"+r.id+"/indexes/"+n+"/"+a;
}}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(633),s=a(i),o=n(1104),l=a(o),u=n(636),d=a(u);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=l.default.get("audio").id,n=(0,d.default)(e,{streamType:t,selected:!0});return s.default.first(n)}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(90),l=a(o),u=n(119),d=a(u);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=l.default.get("subtitles").id,n=(0,
d.default)(e,{streamType:t,selected:!0}),r=s.default.first(n);if(r&&r.id>0)return r}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(90),l=a(o),u=n(119),d=a(u);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(!e)return(0,s.default)("None");var t=e.language||(0,s.default)("Unknown"),n=l.default.get(e.streamType),r=n&&n.typeString,a=e.codec,i=[];return"subtitles"===r&&a?(i.push(a.toUpperCase()),e.key&&i.push((0,s.default)("External")),
e.forced&&i.push((0,s.default)("Forced"))):"audio"===r&&a&&(i.push((0,d.default)(a)),e.channels&&i.push((0,f.default)(e.channels))),i.length?t+" ("+i.join(" ")+")":t}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),s=a(i),o=n(90),l=a(o),u=n(406),d=a(u),c=n(405),f=a(c);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.bitrate||e.maxVideoBitrate,n=e.videoResolution;if(!t&&!n)return(0,s.default)("Unknown");var r=[];if(t){var a=t<1e3||t%1e3===0?0:1;
r.push((0,d.default)(t,a))}if(n&&(!t||t>=1e3)){var i=l.default.getResolutionFromSize(n);r.push((0,f.default)(i))}return r.join(" ")}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),s=a(i),o=n(101),l=a(o),u=n(407),d=a(u),c=n(312),f=a(c);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(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 a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=["Bytes","KB","MB","GB","TB"];t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.item||e.items[0];if((0,y.default)(e))return s.default.Deferred().resolve((0,d.default)(t,e)).promise();var n=s.default.Deferred();return e.notify=n.notify,(0,h.default)(t,e).then(function(n){return e.itemDecision=n,(0,f.default)(t,e)}).done(n.resolve).fail(function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];
e.silent||((0,g.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 a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i),o=n(32),l=a(o),u=n(409),d=a(u),c=n(1124),f=a(c),p=n(1121),h=a(p),v=n(644),g=a(v),m=n(1126),y=a(m);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){l.default.trigger("show:alert",{
type:"error",message:e||(0,s.default)("Sorry, there was a problem playing this item.")})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),s=a(i),o=n(12),l=a(o);t.default=r,e.exports=t.default},function(e,t){"use strict";function n(e){return e>=2e3}function r(e){return n(e.generalDecisionCode)?e.generalDecisionText:n(e.mdeDecisionCode)?e.mdeDecisionText:n(e.transcodeDecisionCode)?e.transcodeDecisionText:e.errorMessage}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,
e.exports=t.default},function(e,t,n){"use strict";function r(){return l?performance.now():Date.now()-u}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(32),s=a(i),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,n){"use strict";function r(e){return(0,l.default)((0,s.default)(e).join("_"))}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(1143),s=a(i),o=n(414),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&l.default.parseBoolean(e)?(0,
s.default)("Yes"):(0,s.default)("No")}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),s=a(i),o=n(49),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(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 a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),s=a(i);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return(0,s.default)((0,o.getLastSegment)(e||""),t)}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(418),s=a(i),o=n(26);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){g=setTimeout(function(){g=null,a(),u.default.times(t,i),v.length&&r(e,t)},e)}function a(){var e=(new Date).getTime();v=u.default.filter(v,function(t){return t.expire>e})}function i(){for(var e=0;e<v.length;e++){
var t=v[e],n=!1;try{n=t.fn.call(t.thisArg,t.arg)}catch(r){c.default.error(r.name+": "+r.message),n=!0}if(n){v.splice(e,1);break}}}var s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=s(l),d=n(32),c=s(d),f=n(14),p=o(f);n(545);var h={defaultWait:10,defaultBatchSize:2,timeout:3e4,enqueue:function(e,t,n,a,i){var s={fn:e,thisArg:t,cancelToken:n,expire:(new Date).getTime()+this.timeout,arg:i};if(void 0===a?v.push(s):v.splice(a,0,s),!g){var o=p.hasRegistered("experience")?p.resolve("experience").taskThrottle:{},l=o.wait||this.defaultWait,u=o.batchSize||this.defaultBatchSize;
r(l,u)}},cancel:function(e){v=u.default.filter(v,function(t){return t.cancelToken!==e})},throttleWithRAF:function(e,t){var n=function r(){r.rafID&&window.cancelAnimationFrame(r.rafID),r.rafID=window.requestAnimationFrame(function(){delete r.rafID,e.call(t)})};return n}},v=[],g=null;t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s={augmentDictionary:function(e,t){return t=t||{},i.default.reduce(e,function(e,n,r){
var a=(new Date).getTime(),o=i.default.isFunction(t.ttl)?t.ttl(r,n):t.ttl,l=i.default.isFunction(t.refresh)?t.refresh(r,n):t.refresh,u=i.default.isObject(n)?s.augmentObj(n,o,l,a):null;return u&&(e[r]=u),e},{})},augmentObj:function(e,t,n,r){var a=e._ttl;if(r=r||(new Date).getTime(),a){if(n)a.expireAt=r+t;else if(a.expireAt<=r)return null}else a={expireAt:r+t};return e._ttl=a,e}};t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var a=n(5),i=r(a),s=n(202),o=r(s),l=["key"],u=(0,o.default)(l,[{key:"all",title:function(){return(0,i.default)("All")}},{key:"unwatched",title:function(){return(0,i.default)("Unwatched")}},{key:"newest",title:function(){return(0,i.default)("Recently Released")}},{key:"recentlyAdded",title:function(){return(0,i.default)("Recently Added")}},{key:"recentlyViewed",title:function(){return(0,i.default)("Recently Viewed")}},{key:"recentlyViewedShows",title:function(){return(0,i.default)("Recently Viewed Shows");
}},{key:"onDeck",title:function(){return(0,i.default)("On Deck")}},{key:"folder",title:function(){return(0,i.default)("By Folder")}}]);t.default=u,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(509),i=r(a),s=new i.default((!1),"_",(!0)),o={writeXml:function(e){return'<?xml version="1.0"?>'+s.json2xml_str(e)}};t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(61),c=o(d),f=n(851),p=o(f),h=n(24),v=n(31),g=o(v),m=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this._portal=null,this._portalRef=null,this._closeTimeoutID=null}return a(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.renderPortal(this.props)}},{key:"shouldComponentUpdate",value:function(e,t){return(0,g.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 r=u.default.Children.only(e.children);this._portal=n;var a=c.default.unstable_renderSubtreeIntoContainer(this,r,n);this._portalRef!==a&&(this._portalRef=a,t&&(t(null),t(this._portalRef)))}},{key:"removePortal",decorators:[h.autobind],
value:function(){var e=this.props.onPortalRef,t=this._portal;t&&(c.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);m.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=m,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(61),f=l(c),p=n(2700),h=l(p),v=n(24),g=n(31),m=l(g),y=n(656),b=l(y),P=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this._tether=null}return a(t,e),i(t,[{key:"shouldComponentUpdate",
value:function(e,t){return(0,m.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:[v.autobind],value:function(e){return e?void(this._tether=new h.default(o({element:f.default.findDOMNode(e).parentNode,target:f.default.findDOMNode(this.props.target)},this.props.options))):void this._destroy()}},{key:"render",value:function(){return d.default.createElement(b.default,o({},this.props,{
onPortalRef:this.onPortalRef}))}}]),t}(u.Component);P.propTypes={target:u.PropTypes.object,options:u.PropTypes.object},P.defaultProps={options:{skipMoveElement:!0,attachment:"top left",targetAttachment:"bottom left",constraints:[{to:"window",attachment:"together",pin:!0}]}},t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(19).default,l=n(224).default,u=n(11).default,d=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var c=n(3),f=d(c),p=n(4),h=d(p),v=n(5),g=d(v),m=n(320),y=d(m),b=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){var n=this.props,r=n.args,a=o(n,["args"]),i=e.args,s=o(e,["args"]),l=!(0,y.default)(a,s),u=!(0,y.default)(this.state,t),d=f.default.difference(r,i).length>0;return l||u||d}},{key:"render",value:function(){var e=this.props,t=e.text,n=e.args,r=o(e,["text","args"]);
return h.default.createElement("span",u({},r,{dangerouslySetInnerHTML:{__html:g.default.apply(void 0,[t].concat(l(n),[{escape:!0}]))}}))}}]),t}(p.Component);b.propTypes={text:p.PropTypes.string.isRequired,args:p.PropTypes.array.isRequired},t.default=b,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){var r=0;return c.default.Children.map(e,function(e){if(c.default.isValidElement(e)){var a=r;return r++,t.call(n,e,a)}return e})}function a(e,t,n){var r=0;return c.default.Children.forEach(e,function(e){
c.default.isValidElement(e)&&(t.call(n,e,r),r++)})}function i(e){var t=0;return c.default.Children.forEach(e,function(e){c.default.isValidElement(e)&&t++}),t}function s(e){var t=!1;return c.default.Children.forEach(e,function(e){!t&&c.default.isValidElement(e)&&(t=!0)}),t}function o(e,t){var n=void 0;return a(e,function(r,a){!n&&t(r,a,e)&&(n=r)}),n}function l(e,t,n){var r=[],a=0;return c.default.Children.forEach(e,function(e){c.default.isValidElement(e)&&(t.call(n,e,a)&&r.push(e),a++)}),r}var u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0}),t.mapValidComponents=r,t.forEachValidComponents=a,t.numberOfValidComponents=i,t.hasValidComponent=s,t.findValidComponent=o,t.findValidComponents=l;var d=n(4),c=u(d)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="isScrolling";t.IS_SCROLLING=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={PLAY:"PLAY",PAUSE:"PAUSE",SEEK:"SEEK",STOP:"STOP",PREVIOUS:"PREVIOUS",NEXT:"NEXT",SKIPTO:"SKIPTO",
SHOWDETAILS:"SHOWDETAILS",REFRESHPLAYQUEUE:"REFRESHPLAYQUEUE",SETSTREAM:"SETSTREAM",SETQUALITY:"SETQUALITY"};t.default=n,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(14),l=a(o),u=n(5),d=r(u),c=n(35),f=r(c),p=n(12),h=r(p),v=n(403),g=r(v),m=n(51),y=r(m),b=n(90),P=r(b),w=n(56),S=r(w),_=n(378),T=r(_),I=n(27),M=r(I),C=n(45),x=r(C),E=f.default.extend({mixins:[S.default,T.default],companion:!0,modelDefaults:function(){
var e=T.default.modelDefaults.apply(this,arguments),t=this.type===y.default.types.MUSIC,n=this.type===y.default.types.PHOTO;return s.default.extend(e,{state:y.default.states.BUFFERING,showMinimize:!0,showMaximize:!t,showSeekBar:!n,showRepeat:t,showShuffle:t})},modelOverrides:function(){var e=T.default.modelOverrides.apply(this,arguments),t=this.model.get("metadataItem"),n=t.get("type")===y.default.types.PHOTO;return(n||this.model.get("playQueue").get("collection").length<2)&&(e.showPlayQueue=!1),
e},initialize:function(e){T.default.initialize.apply(this,arguments),s.default.bindAll(this,"skipPrevious","skipNext"),this.type=e.type,this.manager=e.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 t=l.resolve("appModel"),n=t.get("user");if(!n.get("signedIn")||"ok"!==e.get("myPlexSigninState")){var r;r=n.get("signedIn")?(0,d.default)("This server is unavailable to the player. Please sign this server in to your Plex account and try again."):(0,d.default)("This server is unavailable to the player. Please sign in to your Plex account and try again.");var a=new x.default({title:(0,d.default)("Unable to Cast"),message:r,confirmLabel:(0,d.default)("OK"),cancelLabel:(0,
d.default)("Ignore")});a.promise.done(function(){h.default.trigger("hide:player"),n.get("signedIn")?h.default.trigger("navigate","serverSettings",{serverID:e.id}):h.default.trigger("navigate","login",{silent:!0})}),h.default.trigger("show:modal",a)}},getTransientToken:function(e){return M.default.execute("getTransientToken",{server:e})},reset:function(e){var t={loop:"photo"===this.type};return this.currentItem=e,this.previousItem=this.getPreviousItem(e,t),this.nextItem=this.getNextItem(e,t),this.model.set(s.default.extend(s.default.result(this,"modelDefaults"),this.modelOverrides())),
e},stop:function(e,t){T.default.stop.apply(this,arguments);var n=l.resolve("appModel"),r=this.model.get("playQueue");r&&!n.get("primaryPlayer")&&r.takeOwnership(),this.manager.resetActiveController(this.type),h.default.trigger("hide:player",t)},setStream:function(e,t){},setRepeat:function(e){},refreshRemotePlayQueue:function(){},onFinishedChange:function(e,t){t&&(this.manager.resetActiveController(this.type),h.default.trigger("hide:player"))},onMetadataItemChange:function(){var e,t,n=this.model.get("metadataItem"),r=this.model.get("mediaIndex"),a=this.model.get("partIndex"),i=n.get("Media");
if(e=r>1&&i.length>r?i[r]:s.default.first(i)){var o=e.Part;t=a>1&&o.length>a?o[a]:s.default.first(o)}this.model.set({media:e,part:t})},onAudioStreamIDChange:function(e,t){var n=e.previous("audioStreamID");if(null!=t&&null!=n){if(this.isTimelineChange){var r=P.default.get("audio");return void(0,g.default)(e.get("media"),r,t)}this.setStream("audio",t)}},onSubtitleStreamIDChange:function(e,t){var n=e.previous("subtitleStreamID");if(null!=t&&null!=n){if(this.isTimelineChange){var r=P.default.get("subtitles");
return void(0,g.default)(e.get("media"),r,t)}this.setStream("subtitles",t)}},onPlayQueueChange:function(){this.previousItem=this.getPreviousItem(),this.nextItem=this.getNextItem();var e=s.default.pick(s.default.result(this,"modelDefaults"),["showPlayQueue","canSkipPrevious","canSkipNext","canShuffle","shuffled"]);this.model.set(s.default.extend(e,this.modelOverrides())),this.refreshRemotePlayQueue()},onRepeatChange:function(e){if(!this.isTimelineChange){var t=0;e.get("repeatAll")&&!e.get("repeatItem")?t=2:e.get("repeatItem")&&!e.get("repeatAll")&&(t=1),
this.setRepeat(t)}}});t.default=E,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(14),l=a(o),u=n(35),d=r(u),c=n(51),f=r(c),p=n(37),h=r(p),v=n(27),g=r(v),m=n(56),y=r(m),b=n(32),P=r(b),w=n(316),S=r(w),_=n(133),T=r(_),I=n(89),M=r(I),C=n(57),x=r(C),E=n(85),k=r(E),D=n(236),A=r(D),O=d.default.extend({mixins:[y.default],types:[f.default.types.VIDEO,f.default.types.MUSIC,f.default.types.PHOTO],initialize:function(){
var e=l.resolve("appModel");this.items={},this.containers={},this.activeControllerTypes={},this.listenTo(e,"change:primaryPlayer",this.onPrimaryPlayerChange)},start:function(e){this.player&&this.stop(),P.default.info("Casting to "+e.get("friendlyName")),this.player=e,e&&this.listenTo(e.get("nowPlaying"),"add",this.onNowPlayingAdd)},stop:function(){if(this.player){(0,P.default)("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(e){var t=e.type,n=e.key,r=e.state===f.default.states.STOPPED||e.state===f.default.states.ERROR,a=this.items[t],i=this.containers[t];if(a){if(n===a.get("key")&&!r)return;this.removeFromNowPlaying(a,e);
}n&&!r&&this.addToNowPlaying(s.default.extend({},e,{previousItem:a,previousContainer:i}))},addToNowPlaying:function(e){var t=e.type,n=e.machineIdentifier,r=e.key,a=e.containerKey,i=e.previousContainer;"node"===n&&(n="myPlex");var o=new M.default({machineIdentifier:n},{onlyIfCached:!0});if(!s.default.isEmpty(o)){if("myPlex"===n){var l=o.parent.get("primaryServer");r=l?l.resolveUrl(r):o.resolveUrl(r,{connection:new T.default({scheme:"https",address:"node.plexapp.com",port:"32443"})})}var u=new x.default({
key:r},{server:o,skipCache:!0}),d=u.populate();this.items[t]=u;var c;if(i&&i.key===a)c=i.playQueue;else{var p=u.server.get("playQueueManager"),h=f.default.getElementByType(t),v=A.default.prototype.getIdFromKey(a);if(null!==v)c=p.getForType(h),c&&c.get("playQueueID")===v||(c=p.createForType(h,{onServer:!0}),c.set("playQueueID",v),d=d.then(function(){return c.fetch({reset:!0})}));else{var g;a&&(g=new k.default({containerKey:a},{server:o,skipCache:!0}),d=d.then(function(){return g.populate()})),d=d.then(function(){
c=p.createForType(h,{onServer:!1});var e=g?g.get("metadataItems"):u;return c.addContent(e)})}d.done(function(){var e=c.get("collection").findWhere({key:r});c.set("selectedItem",e)})}this.containers[t]={key:a,playQueue:c},d.done(s.default.bind(function(){u.set("key",r);var e=this.player.get("nowPlaying");e.add(u)},this)),d.fail(s.default.bind(function(){this.removeFromNowPlaying(u,e)},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){if(t){S.default.stop(!0);var n=l.resolve("appModel");n.has("transientServer")&&n.unset("transientServer")}t&&t.get("protocol")===this.protocol?this.start(t):this.stop()},onNowPlayingAdd:function(e){var t=e.get("type");if(t){var n=h.default.getChildMediaType(t),r=f.default.getTypeByElement(n.element);this.activeControllerTypes[r]||g.default.execute("playMedia",{item:e,useMiniPlayer:!0,isFromCompanion:!0})}}});t.default=O,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s={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(e){if(this.parentMediaActions&&this.parentMediaActions.shouldStartTrackingSelecting(e)){var t=i.default.bind(function(){this.ignoreOnClick=!0},this);this.listenToOnce(this.parentMediaActions,"change:selectedItems",t),this.isTrackingSelecting=!0,this.trigger("select",{multiSelect:e.shiftKey}),this.stopListening(this.parentMediaActions,"change:selectedItems",t)}},onClick:function(e){this.ignoreOnClick&&(this.ignoreOnClick=!1,e.preventDefault())}};t.default=s,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s={collectionEvents:{"update reset sort":"onTracksUpdate"},markDiscNumbers:function(){if(this.collection.server.supports("premiumMusic")){var e=this.collection.reduce(function(e,t,n){var r=t.get("parentIndex");return r!==e.lastDiscNumber&&(e.markers[n]=r,e.lastDiscNumber=r,e.count+=1),e},{markers:{},lastDiscNumber:null,count:0});return this.discMarkers=e.markers,e.count}},onRender:function(){
var e=this.markDiscNumbers();1!==e&&i.default.each(this.discMarkers,i.default.bind(function(e,t){this.$("li:eq("+t+") .disc-number").removeClass("hidden")},this))},onTracksUpdate:function(){this.render()}};t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1285),o=r(s),l=i.default.extend({name:"FilePathCollection",context:["server"],model:o.default,url:"/services/browse"});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1286),o=r(s),l=i.default.extend({name:"MatchResultCollection",context:["server"],model:o.default,url:function(){return"/library/metadata/"+this.parent.id+"/matches"}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(161),i=r(a),s=n(83),o=r(s),l=n(1288),u=r(l),d=o.default.extend({model:u.default,
url:"/playQueues?type="+i.default.LOCAL,parse:function(e){return this.convert(e,"PlayQueue")}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){var r=/!$/.test(n),a=/\.id$/.test(n);if(r||a)return e[n]=t,e;var i=n.match(/^(.+)\.(.+)/);return i&&(e.type=p.default.get(i[1]).id,n=i[2]),e[n+".query"]=t,e}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(49),u=a(l),d=n(26),c=i(d),f=n(37),p=a(f),h=n(62),v=a(h),g=n(28),m=a(g),y=n(1303),b=a(y),P=m.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,r,e),c.join([this.multiMetadataItem.sectionUrl(),"autocomplete"],e)},augmentResponseText:function(e,t){return t===v.default.xml?u.default.replaceMetadataXMLElementNames(e):e}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(9).default,a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(211),s=r(i),o=n(66),l=a(o),u=n(136),d=a(u),c=n(57),f=a(c),p=f.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 d.default,cacheKey:function(){var e=f.default.prototype.cacheKey.apply(this,arguments);
return e+"!"+this.syncItemId}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(431),o=r(s),l=i.default.extend({name:"MediaGrabberDeviceCollection",context:["server"],model:o.default,url:"/media/grabbers/devices"});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(673),o=r(s),l=i.default.extend({
name:"DVRCollection",context:["server"],model:o.default,url:"/livetv/dvrs"});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),i=r(a),s=n(20),o=r(s),l=n(671),u=r(l),d=i.default.extend({name:"DVRModel",context:["server"],rootPropertyName:"Dvr",idAttribute:"key",syncedAttrs:{key:o.default.integer,epgIdentifier:o.default.string,language:o.default.string,lineup:o.default.string,lineupTitle:o.default.string,uuid:o.default.string
},syncedRelations:{devices:{relationClass:u.default,rootPropertyName:"Device"}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),i=r(a),s=n(20),o=r(s),l=i.default.extend({name:"EPGCountryModel",context:["server"],idAttribute:"code",rootPropertyName:"Country",syncedAttrs:{key:o.default.string,type:o.default.string,title:o.default.string,code:o.default.string,example:o.default.string,flavor:o.default.integer,
language:o.default.string,languageTitle:o.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),i=r(a),s=n(20),o=r(s),l=i.default.extend({name:"EPGCountryRegionModel",context:["server"],idAttribute:"key",rootPropertyName:"Region",syncedAttrs:{key:o.default.string,type:o.default.string,title:o.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(28),i=r(a),s=n(1316),o=r(s),l=i.default.extend({name:"ChannelMappingCollection",context:["server"],model:o.default,comparator:function(e){return parseFloat(e.get("deviceIdentifier"))}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(434),o=r(s),l=i.default.extend({name:"SearchCollection",context:["server","provider"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(289),o=r(s),l=o.default.extend({constructor:function(e,t,n,r){this.exclusiveAgents=t,this.agentIdentifier=n,o.default.call(this,e,r),this.filterBy(i.default.bind(this.filterExclusiveAgent,this))},filterExclusiveAgent:function(e){var t=e.get("identifier"),n=this.exclusiveAgents;if(!n)return!0;var r=this.agentIdentifier,a=n.indexOf(r)!==-1,i=n.indexOf(t)!==-1,s=a?t===r:!i;return s}});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(53),o=r(s),l=n(49),u=r(l),d=n(20),c=r(d),f=n(62),p=r(f),h=n(22),v=r(h),g=n(390),m=r(g),y=v.default.extend({name:"CalendarModel",context:["server"],url:"/media/subscriptions/scheduled",sessionAttrs:{visibleDays:c.default.integer,time:c.default.string},syncedRelations:{scheduled:{relationClass:m.default,rootPropertyName:"MediaGrabOperation"}},derivedAttrs:{startTime:function(){var e=this.get("visibleDays"),t=(0,
o.default)(this.get("time")),n=t.startOf("day");return e>1?n.subtract(1,"day").toISOString():n.toISOString()},endTime:function(){var e=this.get("visibleDays"),t=(0,o.default)(this.get("time")),n=t.endOf("day");return e>1?n.add(e-2,"days").toISOString():n.toISOString()},daysOfWeek:function(){var e=(0,o.default)(this.get("startTime")),t=(0,o.default)(this.get("endTime")),n=t.diff(e,"days");return i.default.times(Math.min(n+1,7),function(t){return e.clone().add(t,"days").unix()})},days:function(){var e=(0,
o.default)(this.get("startTime")),t=(0,o.default)(this.get("endTime")),n=t.diff(e,"days");return i.default.times(n+1,function(t){return e.clone().add(t,"days").toISOString()})},firstEvent:function(){return this.get("scheduled").first()},lastEvent:function(){return this.get("scheduled").last()},hasPastEvents:function(){var e=this.get("firstEvent");return!!e&&o.default.unix(e.get("beginsAt")).isBefore((0,o.default)(this.get("startTime")))},hasFutureEvents:function(){var e=this.get("lastEvent");return!!e&&o.default.unix(e.get("beginsAt")).isAfter((0,
o.default)(this.get("endTime")))}},defaults:function(){return{visibleDays:7,time:(0,o.default)().toISOString()}},augmentResponseText:function(e,t){var n=t===p.default.xml?u.default.replaceMetadataXMLElementNames(e):e;return n}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(64),s=r(i),o=n(42),l=a(o),u=(0,s.default)(l.RESET_EPG_SETTINGS);t.resetEPGSettings=u;var d=(0,s.default)(l.FETCH_EPG_COUNTRIES);
t.fetchEPGCountries=d;var c=(0,s.default)(l.FETCH_EPG_LANGUAGES);t.fetchEPGLanguages=c;var f=(0,s.default)(l.SELECT_EPG_COUNTRY);t.selectEPGCountry=f;var p=(0,s.default)(l.SELECT_EPG_LANGUAGE);t.selectEPGLanguage=p;var h=(0,s.default)(l.SELECT_EPG_REGION);t.selectEPGRegion=h;var v=(0,s.default)(l.SET_EPG_POSTAL_CODE);t.setEPGPostalCode=v},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(64),s=r(i),o=n(42),l=a(o),u=(0,s.default)(l.INIT_MEDIA_SUBSCRIPTION_MODAL);
t.initMediaSubscriptionModal=u;var d=(0,s.default)(l.CLEAR_MEDIA_SUBSCRIPTION_MODAL);t.clearMediaSubscriptionModal=d;var c=(0,s.default)(l.FETCH_MEDIA_SUBSCRIPTION);t.fetchMediaSubscription=c;var f=(0,s.default)(l.SAVE_MEDIA_SUBSCRIPTION);t.saveMediaSubscription=f;var p=(0,s.default)(l.CHANGE_MEDIA_SUBSCRIPTION_TEMPLATE_MODE);t.changeMediaSubscriptionTemplateMode=p;var h=(0,s.default)(l.CLEAR_MEDIA_SUBSCRIPTION_MODAL_ERROR);t.clearMediaSubscriptionModalError=h;var v=(0,s.default)(l.MOVE_MEDIA_SUBSCRIPTION_MODAL);
t.moveMediaSubscriptionModal=v;var g=(0,s.default)(l.DELETE_MEDIA_SUBSCRIPTION_MODAL);t.deleteMediaSubscriptionModal=g},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(64),s=r(i),o=n(42),l=a(o),u=(0,s.default)(l.INIT_PRE_PLAY_PAGE);t.initPrePlayPage=u;var d=(0,s.default)(l.INIT_PRE_PLAY_DESCENDANT_LIST);t.initPrePlayDescendantList=d;var c=(0,s.default)(l.CLEAR_PRE_PLAY_PAGE);t.clearPrePlayPage=c;var f=(0,s.default)(l.FETCH_PRE_PLAY_METADATA_ITEM);
t.fetchPrePlayMetadataItem=f;var p=(0,s.default)(l.FETCH_PRE_PLAY_RELATED_HUBS);t.fetchPrePlayRelatedHubs=p},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(64),s=r(i),o=n(42),l=a(o),u=(0,s.default)(l.POPULATE_SEARCH_PROVIDERS);t.populateSearchProviders=u;var d=(0,s.default)(l.FETCH_SEARCH_PAGE);t.fetchSearchPage=d;var c=(0,s.default)(l.CLEAR_SEARCH_PAGE);t.clearSearchPage=c},function(e,t){"use strict";function n(e){return e.ui.libraryPage.metadataTypes;
}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,o.createSelector)(function(e,t){var n=t.dvrID;return n},(0,d.default)(),f.default,function(e,t,n){return e?s.default.find(t,function(t){return t.type===l.activityTypes.PROVIDER_EPG_LOAD&&parseInt(t.context.dvrID,10)===e}):s.default.find(t,{uuid:n.epgDownloadActivityID})})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(15),l=n(168),u=n(210),d=a(u),c=n(96),f=a(c);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,o.createSelector)((0,u.default)(),(0,c.default)(),function(e,t){if(e&&t)return s.default.findWhere(e.Channel,{id:t.channelID})})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(3),s=a(i),o=n(15),l=n(48),u=a(l),d=n(325),c=a(d);e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={PRODUCTION:"9AC194DC",QA:"4289C4E0",CUSTOM:"custom"
};n.settings=[{value:n.PRODUCTION,title:"Production"},{value:n.QA,title:"QA"},{value:n.CUSTOM,title:"Custom"}],t.default=n,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2275),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({className:"loading",template:i.default,initialize:function(e){e&&e.inline&&this.$el.addClass("loading-inline")}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(2278),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(12),h=r(p),v=n(14),g=a(v),m=n(27),y=r(m),b=n(1415),P=r(b),w=f.default.Layout.extend({className:"sign-in-container container",template:s.default,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)?y.default.execute("signIn",e).done(function(){g.resolve("metrics").trackEvent({event:"client:signin",interaction:!0,properties:{mode:"password",firstRun:this.isFirstRun}})}.bind(this)):d.default.Deferred().reject().promise()},signUp:function(e){
return this.form.currentView.validateAll(this.ui.form[0],null,e)?y.default.execute("signUp",e).done(function(){g.resolve("metrics").trackEvent({event:"client:signup",interaction:!0,properties:{firstRun:this.isFirstRun}})}.bind(this)):d.default.Deferred().reject().promise()},onRender:function(){this.form.show(new P.default({isFirstRun:this.isFirstRun,showRememberMe:!0}))},onSubmit:function(e){e.preventDefault();var t=e.currentTarget,n=this.form.currentView.ui.submitBtn;if(!n.hasClass("active")){n.addClass("active");
var r={username:t.username.value,email:t.email.value,password:t.password.value,confirm:t.confirm.value,remember:t.remember.checked},a=this.form.currentView.$el.hasClass("sign-in-form")?this.signIn(r):this.signUp(r);a.done(function(){h.default.trigger("navigate:refresh")}),a.fail(l.default.bind(function(){n.removeClass("active")},this))}},onWhySignInClick:function(e){e.preventDefault(),g.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(),g.resolve("metrics").trackClick({page:"signIn",action:"skip",firstRun:this.isFirstRun}),this.trigger("skipSignIn")}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2290),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(206),c=r(d),f=u.default.ItemView.extend({mixins:[c.default],
className:"alert transition-in",template:i.default,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"]),o.default.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(){o.default.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())}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2320),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(288),p=r(f),h=n(12),v=r(h),g=n(43),m=r(g),y=n(1522),b=r(y),P=n(1454),w=r(P),S=n(146),_=r(S),T=c.default.CompositeView.extend({id:"player-play-queue-dropdown",tagName:"span",className:"dropup",itemView:b.default,emptyView:w.default,itemViewContainer:"ol",template:i.default,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"),r=e.supports({playlists:!0});return{canEdit:this.model.get("showPlayQueue"),canPlaylist:!t&&r&&n}},appendHtml:function(e,t,n){return m.default.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=(0,u.default)(e.item).data("play-queue-id"),n=(0,
u.default)(e.item).prev(".play-queue-list-item").data("play-queue-id");this.trigger("move",t,n)},t=this.$el.children(".dropdown-menu")[0];this.sortable=new p.default(t,{draggable:".play-queue-list-item",animation:200,onUpdate:o.default.bind(e,this)})}},onShowPlayQueueChange:function(){this.render()},onSaveClick:function(){v.default.trigger("show:modal",new _.default({model:this.model.get("playQueue")}))},onPlayQueueMouseWheel:function(e){e.stopPropagation()}});t.default=T,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2325),s=r(i),o=n(13),l=r(o),u=n(14),d=a(u),c=n(12),f=r(c),p=n(1457),h=r(p),v=l.default.Layout.extend({id:"primary-player-dropdown",tagName:"li",className:"nav-dropdown dropdown",template:s.default,regions:{list:".dropdown-menu"},events:{"click .cast-btn":"onCastClick"},initialize:function(e){e||(e={});var t=d.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=d.resolve("appModel"),t=e.get("primaryPlayer");if(t){var n=t.get("nowPlaying");this.listenTo(n,"update reset",this.render)}},serializeData:function(){var e=d.resolve("appModel");return{primaryPlayer:!!e.get("primaryPlayer"),showDropdown:!e.get("isCastApiAvailable")
}},onRender:function(){var e=d.resolve("appModel"),t=!e.get("isCastApiAvailable");t&&this.list.append(new h.default({showNowPlaying:this.showNowPlaying}),this.$el)},onPrimaryPlayerChange:function(e,t){var n=d.resolve("appModel"),r=n.previous("primaryPlayer");r&&this.stopListening(r.get("nowPlaying")),this.setup(),this.render()},onCastClick:function(e){e.preventDefault(),this.players.fetch(),f.default.trigger("cast:launch")}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(2328),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({id:"section-dropdown",tagName:"span",className:"dropdown",template:i.default,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")
}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";function r(e){return M.default.reduce(e,function(e,t){return e[t]=!0,e},{})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2334),s=a(i),o=n(2336),l=a(o),u=n(2339),d=a(u),c=n(2343),f=a(c),p=n(2345),h=a(p),v=n(2346),g=a(v),m=n(2348),y=a(m),b=n(2350),P=a(b),w=n(2352),S=a(w),_=n(2347),T=a(_),I=n(3),M=a(I),C=n(8),x=a(C),E=n(5),k=a(E),D=n(37),A=a(D),O=n(440),R=a(O),L=n(1467),N=a(L),j=n(144),U=a(j),$={movie:f.default,
show:P.default,season:y.default,episode:d.default,artist:l.default,album:s.default,track:S.default,photoAlbum:h.default,photo:g.default,playlist:T.default},z=R.default.extend({regions:{ratingRegion:".rating-region"},ui:M.default.extend({selectizeInputs:".selectize input[type=text]"},R.default.prototype.ui),initialize:function(e){var t=this.model.get("type");this.template=$[t]||$.movie;var n=A.default.get(t);this.canSelectize=this.model.server.supports("batchEdit")&&n,this.canReparent=this.model.server.supports("batchEdit");
},serializeData:function(){var e=R.default.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=r(M.default.pluck(t,"name")),a=r(M.default.pluck(e.find("[type=number]"),"name")),i=(0,M.default)(e.serializeArray()).reject(function(e){return n[e.name]},this),s=M.default.reduce(i,function(e,t){if(a[t.name]){var n=x.default.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);M.default.each(t,function(e){var t=(0,x.default)(e),n=t.data("updateAttr"),r=t.data("altUpdateAttr"),a=t.data("isText"),i=e.selectize.getValue();if(r)if(a)s[n]=i,s[r]=null;else{var o=e.selectize.options[i];if(o){var l=o[t.data("autocompleteAttr")];s[n]=l,s[r]=i}}else s[n]=i});var o=this.model.get("lockedFields");o&&o.set(this.getLockedFieldsArray(),{parse:!0}),this.model.set(s)},markInvalid:function(e){this.$(".form-group").removeClass("has-error"),
(0,M.default)(e).each(function(e){var t=this.$('.form-group[data-attr="'+e+'"]');t.addClass("has-error"),t.find(".control-error").text((0,k.default)("Required"))},this)},onRender:function(){if(this.$(".rating-region").length>0&&this.ratingRegion.show(new U.default({model:this.model,passive:!0})),this.canSelectize){var e=this;this.ui.selectizeInputs.each(function(t,n){(0,N.default)(e,n)})}}});t.default=z,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2344),i=r(a),s=n(2351),o=r(s),l=n(2340),u=r(l),d=n(2337),c=r(d),f=n(2335),p=r(f),h=n(2353),v=r(h),g=n(3),m=r(g),y=n(8),b=r(y),P=n(193),w=r(P),S=n(440),_=r(S),T=n(1468),I=r(T);n(546);var M=_.default.extend({templatesByType:{movie:i.default,show:o.default,episode:u.default,artist:c.default,album:p.default,track:v.default},ui:m.default.extend({tagInputs:".tag-input-hidden"},_.default.prototype.ui),events:m.default.extend({"change .lockable-field":"onLockableFieldChange"},_.default.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 w.default({key:t},{server:this.model.server})}this.section=e},flushChanges:function(){var e=this.ui.form,t=m.default.reduce(e.serializeArray(),function(e,t){
return e[t.name]=t.value,e},{}),n=m.default.reduce(this.ui.tagInputs,function(e,t){var n=t.selectize,r=(0,b.default)(t).data("name"),a=(0,b.default)(t).data("attr");return e[a]=m.default.map(n.items,function(e){var t=n.options[e];return{tag:t.tag,id:t.id}}),this.model["original.tag."+r]=m.default.toArray(n.options),e},{},this);m.default.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){(0,I.default)(e,n)})}});t.default=M,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2364),i=r(a),s=n(47),o=r(s),l=n(13),u=r(l),d=n(5),c=r(d),f=n(197),p=r(f),h=n(206),v=r(h),g=n(421),m=r(g),y=u.default.Layout.extend({mixins:[v.default],className:"conversion-status",template:i.default,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 o.default.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 e?(0,c.default)("Paused"):(0,c.default)("Converting")}},".conversion-status-pending-label":{
model:"pausedSetting",modelAttribute:"value",formatter:function(e){return e?(0,c.default)("Paused"):(0,c.default)("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(0,p.default)(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"),r=this.model.get("syncItemId"),a=t&&t===e.get("ratingKey"),i=n&&n===e.get("generatorID"),s=r&&r===e.get("syncItemId");
return a&&(i||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 m.default({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);
}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(13),i=r(a),s=n(37),o=r(s),l=n(58),u=r(l),d=i.default.ItemView.extend({ui:{poster:".media-poster"},bindings:{".media-title":{modelAttribute:"title"}},initialize:function(e){this.type=this.model.get("type");var t=o.default.get(this.type).element,n=this.posterWidth[t]||40,r="movie"===this.type?"art":"thumb",a="movie"===this.type?"art":this.type;this.image=new u.default({
model:this.model,type:a,getUrl:this.getPosterUrl,width:n,modelAttribute:r})},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)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1514),o=r(s),l=i.default.extend({
tagName:"ul",className:"tile-list media-tile-list extra-tile-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(441),i=r(a),s=n(442),o=r(s),l=i.default.extend({tagName:"ul",className:"list virtual-list media-list media-details-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(441),i=r(a),s=n(123),o=r(s),l=i.default.extend({
tagName:"ul",className:"list virtual-list media-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(441),i=r(a),s=n(262),o=r(s),l=i.default.extend({tagName:"ul",className:"tile-list virtual-list media-tile-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1545),o=r(s),l=i.default.extend({
tagName:"ul",className:"list side-bar-list",itemView:o.default,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"})}});t.default=l,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2403),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(14),h=a(p),v=n(5),g=r(v),m=n(12),y=r(m),b=n(248),P=r(b),w=n(212),S=r(w),_=f.default.ItemView.extend({className:"friend-server-status-container",template:s.default,events:{"click .server-share-edit-btn":"onEditClick"},initialize:function(){var e=h.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=h.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:this.model.get("restricted")?(0,g.default)("user"):(0,g.default)("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=(0,P.default)((0,g.default)("library"),t.numLibraries,(0,g.default)("libraries")),t},getServerStatus:function(e){for(var t,n=0,r=this.collection.length;n<r;n++){
var a=this.collection.at(n);if(a.get("owned")===e.owned){var i=this.servers.get(a.get("machineIdentifier")),s=i&&i.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 t=l.default.indexOf(this.attachedServers,e);t>-1&&this.attachedServers.splice(t,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=(0,d.default)(e.currentTarget);if(!t.isDisabled()){var n,r=t.hasClass("owned"),a=this.collection.findWhere({
owned:r});a&&(n=a.get("machineIdentifier")),y.default.trigger("show:modal",new S.default({model:this.model,defaultPaneType:r?"ownedServer":"sharedServer",defaultPaneID:n}))}}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2405),s=r(i),o=n(8),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=n(5),h=r(p),v=n(12),g=r(v),m=n(27),y=r(m),b=n(120),P=r(b),w=n(703),S=r(w),_=n(212),T=r(_),I=n(266),M=r(I),C=d.default.Layout.extend({
tagName:"li",className:"card-tile-list-item card-2-col-item",template:s.default,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=f.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 P.default({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 S.default({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")?(0,h.default)("Guest User"):e?(0,h.default)("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=f.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(),(0,l.default)(e.currentTarget).isDisabled()||g.default.trigger("show:modal",new M.default({
model:this.model,isEditing:!0}))},onEditClick:function(e){e.preventDefault(),g.default.trigger("show:modal",new T.default({type:"home",homeUser:this.model,isAdmin:this.isAdmin}))},onDeleteClick:function(e){e.preventDefault(),y.default.execute("removeHomeUser",{homeUser:this.model})}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1560),o=r(s),l=i.default.extend({tagName:"ul",className:"list card-tile-list",
itemView:o.default,sorted:!0});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(821),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(5),c=r(d),f=n(12),p=r(f),h=n(694),v=r(h),g=n(54),m=r(g),y=n(252),b=r(y),P={playlist:["general"]},w=m.default.extend({mixins:[b.default],name:"editPlaylistModal",className:"edit-metadata-modal modal modal-lg fade",template:i.default,panes:{general:{constructor:v.default}},panesModel:"tempModel",
events:o.default.extend({"click .change-pane-btn":"onChangePaneClick","click .save-btn":"onFormSubmit","submit .edit-metadata-form":"onFormSubmit"},m.default.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){m.default.prototype.initialize.apply(this,arguments);var t,n,r,a=e.mediaActions;if(a?(r=a.getActionTargets(),
t=r[0]):(t=e.model,r=[t]),this.model=t,this.tempModel=t.clone(),!n){var i=u.default.Deferred();i.resolve(),n=i.promise()}n=n.done(o.default.bind(function(){this.tempModel.set(t.attributes),1===r.length&&this.tempModel.set("key",r[0].get("key")),this.showNav(),this.showPane(e.selectedPane||"general"),this.listenTo(p.default,"shortcut:save",this.saveChanges)},this)),n.fail(o.default.bind(function(){this.ui.message.text((0,c.default)("There was an error editing this item")),this.ui.loadingIndicator.addClass("hidden");
},this))},serializeData:function(){var e=P[this.model.get("type")]||P.movie,t=o.default.reduce(e,function(e,t){return e[t]=!0,e},{}),n=o.default.escape((0,c.default)("Edit {1}",this.model.get("title"))),r={item:this.model.toJSON(),panes:t,selectedPane:this.selectedPane,paneTitle:n};return r},paneConstructorArg:function(){return{type:this.selectedPane}},showNav:function(){this.ui.navPane.removeClass("hidden")},saveChanges:function(){var e=this.ui.saveBtn,t=this.ui.message;if(!e.isDisabled()){t.text(""),
this.paneRegion.currentView.flushChanges();var n=o.default.reduce(this.model.changedAttributes(this.tempModel.attributes),function(e,t,n){return e[n]=t,e},{});e.addClass("active");var r=[];o.default.isEmpty(n)||r.push(this.model.save(n));var a=u.default.when.apply(u.default,r);a.done(o.default.bind(function(){this.hide()},this)),a.fail(function(){t.text((0,c.default)("Your changes could not be saved."))}),a.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()}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2420),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(5),c=r(d),f=n(54),p=r(f),h=n(1452),v=r(h),g=n(252),m=r(g),y=n(1639),b=r(y),P=n(1640),w=r(P),S=p.default.extend({mixins:[m.default],name:"fixIncorrectMatch",className:"fix-incorrect-match-modal modal modal-lg fade",
template:i.default,panes:{form:{constructor:b.default},results:{constructor:w.default}},ui:{searchBtn:".search-btn"},regions:{paneRegion:".pane-region",autoMatchDropdownRegion:".auto-match-dropdown-region"},events:o.default.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"},p.default.prototype.events),onlyAfterRender:["showPane","updateSearchBtn"],
initialize:function(){p.default.prototype.initialize.apply(this,arguments),b.default.prototype.setupAgents.apply(this),w.default.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 t=o.default.reduce(e.serializeArray(),function(e,t){return e[t.name]=t.value,e;
},{manual:1});this.model.results.fetch({reset:!0,data:t,processData:!0,timeout:0})},bindings:{".modal-title-text":{modelAttribute:"guid",formatter:function(e){return/com\.plexapp\.agents\.none\:\/\//.test(e)?(0,c.default)("Match"):(0,c.default)("Fix Incorrect Match")}}},onRender:function(){p.default.prototype.onRender.apply(this,arguments),this.autoMatchDropdownRegion.show(new v.default({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=(0,u.default)(e.currentTarget);if(!t.isDisabled()){var n=t.closest("form");this.fetchResults(n),this.showPane("results")}},onSearchSubmit:function(e){e.preventDefault();var t=(0,u.default)(e.currentTarget),n=t.find("search-btn");n.isDisabled()||(this.fetchResults(t),this.showPane("results"))}});
t.default=S,e.exports=t.default},function(e,t,n){"use strict";function r(e){return u.default.reduce(e,function(e,t,n){var r=a(t);if(0===n)return e.concat(r);var i=r.length>1;return e.concat({plain:!0,split:i,s:"or"},r)},[])}function a(e){var t=e.match(/(.+) (.+)/);if(t)return a(t[1]).concat({plain:!0,s:"then"}).concat(a(t[2]));var n=e.match(/(.+)\+(\S+)/);if(n)return a(n[1]).concat({plain:!0,s:"+"}).concat(a(n[2]));var r=u.default.reduce([[/command/,"\u2318"],[/up/,"\u2191"],[/down/,"\u2193"],[/left/,"\u2190"],[/right/,"\u2192"]],function(e,t){
return e.replace(t[0],t[1])},e);return[{s:r}]}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(2423),o=i(s),l=n(3),u=i(l),d=n(54),c=i(d),f=c.default.extend({name:"keyboardShortcutsModal",className:"keyboard-shortcuts-modal modal fade",template:o.default,orderedGroups:[{group:"navigation",label:"Navigation"},{group:"actions",label:"Actions"},{group:"player",label:"Player"}],initialize:function(e){c.default.prototype.initialize.apply(this,arguments),this.shortcuts=e.shortcuts;
},serializeData:function(){var e={};u.default.each(this.shortcuts,function(t){var n=t.group;e[n]||(e[n]=[]),e[n].push(this.humanizeShortcut(t))},this);var t=u.default.map(this.orderedGroups,function(t){var n=u.default.clone(t);return n.shortcuts=e[t.group],n},this);return{groups:t}},humanizeShortcut:function(e){return e=u.default.clone(e),e.keys=r(e.keys),e}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(2427),s=r(i),o=n(14),l=a(o),u=n(54),d=r(u),c=d.default.extend({name:"plexPassModal",template:s.default,serializeData:function(){var e=l.resolve("appModel"),t=e.get("user").server;return{plexPassUrl:t.get("plexPassUrl"),friendlyName:this.model.get("friendlyName"),isClaimed:this.model.get("isClaimed")}}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2440),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(51),c=r(d),f=n(37),p=r(f),h=u.default.ItemView.extend({
className:"convert-policy-container",template:i.default,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=p.default.get(this.model.get("metadataType")||"movie"),
this.childElement=p.default.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.get("isDirectory"),policy:this.model.get("policy").toJSON()};return e.showLimitWarning=this.model.shouldShowPolicyWarning(this.childElement,e.policy.value),e.showUnwatched=e.isDirectory&&this.childElement===c.default.elements.VIDEO,e},updatePolicyValue:function(){
var e=this.model.get("policy"),t=Math.abs(parseInt(this.ui.policyValueInput.val(),10));this.ui.policyValueInput.val(o.default.isNaN(t)?"":t),o.default.isNaN(t)&&(t=0),e.set("value","all"===e.scope?null:t);var n=this.model.shouldShowPolicyWarning(this.childElement,t);this.ui.policyWarning.toggleClass("hidden",!n)},onPolicyUnwatchedChange:function(e){var t=this.model.get("policy");t.set("unwatched",this.ui.policyUnwatchedInput.prop("checked"))},onPolicyScopeChange:function(e){var t=this.model.get("policy"),n=this.ui.policyScopeInput.prop("checked")?this.ui.policyScopeInput.val():"all";
t.set("scope",n),this.updatePolicyValue()},onPolicyValueChange:function(e){this.updatePolicyValue()}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2449),i=r(a),s=n(206),o=r(s),l=n(54),u=r(l),d=n(1591),c=r(d),f=n(1592),p=r(f),h=n(1589),v=r(h),g=u.default.extend({mixins:[o.default],name:"syncModal",className:"convert-modal modal fade",template:i.default,regions:{bodyRegion:".modal-body-region"},initialize:function(e){
u.default.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 c.default({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 p.default({server:this.options.item.server,device:this.device})),this.listenForStateRequests());
}},error:{onEnter:function(){this.bodyRegion.show(new v.default),this.listenForStateRequests()}}},listenForStateRequests:function(){this.bodyRegion&&this.bodyRegion.currentView&&this.listenTo(this.bodyRegion.currentView,{"request:state":this.enterState,"request:nextState":this.enterNextState})},onRender:function(){u.default.prototype.onRender.apply(this,arguments),this.enterNextState()},onStateMachineComplete:function(){this.hide()}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(2464),i=r(a),s=n(3),o=r(s),l=n(5),u=r(l),d=n(12),c=r(d),f=n(54),p=r(f),h=p.default.extend({name:"homeWarningModal",template:i.default,events:o.default.extend({"click .server-settings-btn":"onServerSettingsClick"},p.default.prototype.events),initialize:function(e){p.default.prototype.initialize.apply(this,arguments),this.type=e.type},serializeData:function(){var e;return e="pin"===this.type?(0,u.default)("You've added a PIN restriction"):(0,
u.default)("You've joined a Plex Home"),{intro:e}},onServerSettingsClick:function(e){e.preventDefault(),this.hide(),c.default.trigger("navigate","serverSettings")}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2468),s=r(i),o=n(13),l=r(o),u=n(14),d=a(u),c=n(120),f=r(c),p=l.default.ItemView.extend({tagName:"li",className:"user-select-list-item",template:s.default,ui:{container:".user-select-container",
poster:".user-poster"},events:{"click a":"onClick"},initialize:function(e){this.disabled=e.disabled,this.posterImage=new f.default({model:this.model,type:"friend",width:80});var t=d.resolve("appModel"),n=t.get("primaryServer");n&&n.supports("imageFilters")&&(this.backgroundImage=new f.default({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)}});t.default=p,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2488),i=r(a),s=n(3),o=r(s),l=n(331),u=r(l),d=u.default.extend({className:function(){var e=this.model.get("canSeek");return"player-seek-bar player-slider"+(e?"":" disabled")},template:i.default,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:o.default.extend({mouseenter:"onMouseMove",mousemove:"onMouseMove",mouseleave:"onMouseLeave"},u.default.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,r=e-n.offset().left,a=r/n.width();return a=Math.min(Math.max(a,0),1),a*=t,Math.round(a)},setValue:function(e){
this.model.get("canSeek")&&u.default.prototype.setValue.apply(this,arguments)},displayValue:function(e){e=this.normalizeValue(e),this.dragging&&(e>=100||!this.model.get("canSeek"))||u.default.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"),r=this.normalizeValue(n);this.ui.buffer.css("width",r+"%")},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)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2508),s=r(i),o=n(13),l=r(o),u=n(14),d=a(u),c=n(12),f=r(c),p=n(705),h=r(p),v=n(1555),g=r(v),m=l.default.Layout.extend({className:"friends-container col-sm-8 col-md-9",
template:s.default,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=d.resolve("appModel"),t=e.get("user");return t.get("restricted")?void f.default.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 g.default({collection:this.collection})),this.inviteList.show(new h.default({collection:this.invites})),this.pendingList.show(new h.default({collection:this.sentInvites})),this.updateHeaders()},onClose:function(){this.collection.destroy&&this.collection.destroy(),this.invites.destroy(),this.sentInvites.destroy()},onInvitesChange:function(){this.updateHeaders()}});t.default=m,e.exports=t.default},function(e,t,n){
"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(5),p=u(f),h=n(24),v=n(30),g=n(31),m=u(g),y=n(166),b=u(y),P=n(268),w=u(P),S=n(2049),_=u(S),T=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isCollapsed:!0,allowTransition:!1,lineHeight:0,expandedHeight:0}}return a(t,e),i(t,[{key:"shouldComponentUpdate",
value:function(e,t){return(0,m.default)(this,e,t)}},{key:"onLineHeightRef",decorators:[h.autobind],value:function(e){e&&this.setState({lineHeight:e.clientHeight})}},{key:"onMeasure",decorators:[h.autobind],value:function(e){var t=e.height;this.setState({expandedHeight:t})}},{key:"onTogglePress",decorators:[h.autobind],value:function(){this.setState({isCollapsed:!this.state.isCollapsed,allowTransition:!0})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,r=e.maxLines,a=this.state,i=a.isCollapsed,s=a.allowTransition,u=a.expandedHeight,d=a.lineHeight,f=d*r,h=u>f,g={
overflow:"hidden",maxHeight:i?f:u};return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[!d&&c.default.createElement("div",{className:_.default.lineHeightMeasure,ref:this.onLineHeightRef}),{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:b.default,key:null,ref:null,props:l(b.default.defaultProps,{children:n,ignoreWidth:!0,ignorePosition:!0,onMeasure:this.onMeasure}),_owner:null},className:s&&_.default.contentTransition,style:g},_owner:null},h&&{$$typeof:o,type:w.default,
key:null,ref:null,props:l(w.default.defaultProps,{children:i?(0,p.default)("Read More"):(0,p.default)("Read Less"),className:_.default.readMore,arrowClassName:_.default.readMoreArrow,direction:i?v.directions.DOWN:v.directions.UP,isSelected:!1,onPress:this.onTogglePress}),_owner:null}],className:t},_owner:null}}}]),t}(d.Component);T.propTypes={className:d.PropTypes.string,children:d.PropTypes.node.isRequired,maxLines:d.PropTypes.number.isRequired},T.defaultProps={maxLines:3},t.default=T,e.exports=t.default;
},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children,r=i(e,["className","children"]);return{$$typeof:a,type:"div",key:null,ref:null,props:{children:n,className:t,style:r},_owner:null}}var a=n(7).default,i=n(19).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4);s(o);r.propTypes={className:o.PropTypes.string,children:o.PropTypes.node,margin:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]),flexGrow:o.PropTypes.number,flexShrink:o.PropTypes.number,
flexBasis:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]),alignSelf:o.PropTypes.oneOf(["flex-start","flex-end","center","baseline","stretch"])},r.defaultProps={flexGrow:1,flexShrink:0},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children,r=i(e,["className","children"]);return{$$typeof:a,type:"div",key:null,ref:null,props:{children:n,className:(0,u.default)(c.default.grid,t),style:r},_owner:null}}var a=n(7).default,i=n(19).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(33)),u=s(l),d=n(2053),c=s(d);r.propTypes={className:o.PropTypes.string,children:o.PropTypes.node,flexWrap:o.PropTypes.oneOf(["nowrap","wrap","wrap-reverse"]),flexDirection:o.PropTypes.oneOf(["row","row-reverse","column","column-reverse"]),alignContent:o.PropTypes.oneOf(["flex-start","flex-end","center","space-between","space-around","stretch"]),alignItems:o.PropTypes.oneOf(["flex-start","flex-end","center","baseline","stretch"]),
justifyContent:o.PropTypes.oneOf(["flex-start","flex-end","center","space-between","space-around"])},r.defaultProps={flexDirection:"row",justifyContent:"space-between",alignItems:"center",alignContent:"center"},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(19).default,d=n(11).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=c(f),h=n(4),v=c(h),g=n(33),m=c(g),y=n(41),b=c(y),P=n(24),w=n(31),S=c(w),_=n(167),T=c(_),I=n(34),M=c(I),C=n(2056),x=c(C),E=function(e){
function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isDragging:!1}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,S.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(x.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(x.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,r=t.max;(0,b.default)(r>n,"The max, "+r+", must be greater than the min, "+n);var a=this.refs.track,i=a.getBoundingClientRect(),s=i.left+document.body.scrollLeft,o=e-s,l=o/a.offsetWidth;return l=Math.min(Math.max(l,0),1),(r-n)*l+n}},{key:"_getSteppedValue",value:function(e){var t=this.props,n=t.min,r=t.max,a=t.stepSize;if(!a)return e;(0,b.default)(a>=1,"The step size, "+a+", must be greater or equal to 1");var i=Math.round(e/a)*a;
return Math.min(Math.max(i,n),r)}},{key:"_getStickyValue",value:function(e){var t=this.props,n=t.max,r=t.min,a=t.stepSize,i=t.stickiness;if(!a||!i)return e;var s=this._getSteppedValue(e),o=Math.abs(s-e)/(n-r);return o<i/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:[P.autobind],value:function(e){e.preventDefault(),
0===e.button&&this._startDrag(e.pageX)}},{key:"onTouchStart",decorators:[P.autobind],value:function(e){e.preventDefault();var t=p.default.first(e.touches);t&&this._startDrag(t.pageX,!0)}},{key:"onMouseMove",decorators:[P.autobind],value:function(e){this._drag(e.pageX)}},{key:"onTouchMove",decorators:[P.autobind],value:function(e){var t=p.default.first(e.touches);t&&this._drag(t.pageX)}},{key:"onMouseUp",decorators:[P.autobind],value:function(e){this._stopDrag(e.pageX)}},{key:"onTouchEnd",decorators:[P.autobind],
value:function(e){var t=p.default.first(e.changedTouches);t&&this._stopDrag(t.pageX)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.trackClassName,r=e.fillClassName,a=e.thumbClassName,i=e.label,s=e.value,c=e.min,f=e.max,p=e.showFill,h=e.autoHideThumb,g=e.onMouseDown,y=e.onTouchStart,b=u(e,["className","trackClassName","fillClassName","thumbClassName","label","value","min","max","showFill","autoHideThumb","onMouseDown","onTouchStart"]),P=this.state.isDragging,w=this._getPercent(this._getStickyValue(s),c,f);
return v.default.createElement("div",d({className:(0,m.default)(t,P&&x.default.isDragging,h&&x.default.hasAutoHideThumb),onMouseDown:(0,T.default)(this.onMouseDown,g),onTouchStart:(0,T.default)(this.onTouchStart,y)},b),v.default.createElement("div",{ref:"track",className:n},p&&{$$typeof:o,type:"div",key:null,ref:null,props:{className:r,style:{width:w+"%"}},_owner:null}),{$$typeof:o,type:M.default,key:null,ref:null,props:l(M.default.defaultProps,{className:a,style:{left:w+"%"},"aria-role":"slider",
"aria-labelledby":i,"aria-valuemin":c,"aria-valuemax":f,"aria-valuenow":s}),_owner:null})}}]),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:x.default.slider,trackClassName:x.default.track,fillClassName:x.default.fill,thumbClassName:x.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 r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(19).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(33)),f=u(c),p=n(24),h=n(251),v=n(2064),g=u(v),m=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(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,r=e.errorClassName,a=e.disabledClassName,i=e.isDisabled,s=e.size,u=e.checkboxText,d=e.name,c=e.value,p=e.checkedValue,h=e.hasError;
l(e,["className","inputClassName","errorClassName","disabledClassName","isDisabled","size","checkboxText","name","value","checkedValue","hasError"]);return{$$typeof:o,type:"label",key:null,ref:null,props:{children:[{$$typeof:o,type:"input",key:null,ref:null,props:{id:d,type:"checkbox",disabled:i,className:n,checked:c===p,onChange:this.onChange},_owner:null},u],className:(0,f.default)(t,g.default[s],i&&a,h&&r),htmlFor:d},_owner:null}}}]),t}(d.Component);m.defaultProps={className:g.default.label,inputClassName:g.default.input,
errorClassName:g.default.hasError,disabledClassName:g.default.isDisabled,isDisabled:!1,size:h.LARGE,value:!1,uncheckedValue:!1,checkedValue:!0,hasError:!1},m.propTypes={className:d.PropTypes.string,inputClassName:d.PropTypes.string,errorClassName:d.PropTypes.string,disabledClassName:d.PropTypes.string,isDisabled:d.PropTypes.bool,size:d.PropTypes.oneOf([h.SMALL,h.LARGE]),checkboxText:d.PropTypes.node,name:d.PropTypes.string.isRequired,value:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.bool]),
uncheckedValue:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.bool]),checkedValue:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.bool]),hasError:d.PropTypes.bool,onChange:d.PropTypes.func.isRequired},t.default=m,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.labelText,n=e.checkboxText,r=e.helpText,u=e.showErrors,d=e.errors,f=s(e,["labelText","checkboxText","helpText","showErrors","errors"]),p=o(d,1),h=p[0];return{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{
children:[t&&{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:t}),_owner:null},c.default.createElement(w.default,l({},f,{hasError:u,checkboxText:{$$typeof:i,type:"span",key:null,ref:null,props:{children:[n,u&&h&&" \u2014 "+h]},_owner:null}})),r&&{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{children:r}),_owner:null}]}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(93).default,l=n(11).default,u=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var d=n(4),c=u(d),f=n(178),p=u(f),h=n(177),v=u(h),g=n(111),m=u(g),y=n(334),b=u(y),P=n(720),w=u(P);r.propTypes={labelText:d.PropTypes.node,checkboxText:d.PropTypes.node.isRequired,helpText:d.PropTypes.string,showErrors:d.PropTypes.bool,errors:d.PropTypes.arrayOf(d.PropTypes.string)},r.defaultProps={showErrors:!1,errors:[]},t.default=(0,p.default)(r),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.name,n=e.labelText,r=e.helpText,u=e.showErrors,d=e.errors,f=s(e,["name","labelText","helpText","showErrors","errors"]),p=o(d,1),h=p[0];
return{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:[{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:[n,u&&h&&" \u2014 "+h],name:t,hasError:u}),_owner:null},c.default.createElement(w.default,l({name:t,hasError:u},f)),r&&{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{children:r}),_owner:null}]}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(93).default,l=n(11).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(178),p=u(f),h=n(177),v=u(h),g=n(111),m=u(g),y=n(334),b=u(y),P=n(270),w=u(P);r.propTypes={name:d.PropTypes.string.isRequired,labelText:d.PropTypes.node.isRequired,helpText:d.PropTypes.string,showErrors:d.PropTypes.bool,errors:d.PropTypes.arrayOf(d.PropTypes.string).isRequired},t.default=(0,p.default)(r),e.exports=t.default},function(e,t,n){"use strict";function r(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];
return e.map(function(e){var t=e.label,n=e.value;return i({},n,t)})}function a(e){var t=e.id,n=e.type,a=e.label,i=e.summary,o=e.value,l=e.initialValueModifier,c=e.enumValues,p={name:t,helpText:i,initialValue:l(o)};if(Array.isArray(c))return u.default.createElement(f.default,s({labelText:a},p,{values:r(c)}));switch(n){case d.settingsTypes.TEXT:return u.default.createElement(h.default,s({labelText:a},p));case d.settingsTypes.BOOL:return u.default.createElement(y.default,s({checkboxText:a},p));case d.settingsTypes.INT:
return u.default.createElement(g.default,s({labelText:a},p));default:return null}}var i=n(38).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(580),c=n(722),f=o(c),p=n(724),h=o(p),v=n(1675),g=o(v),m=n(721),y=o(m);a.propTypes={id:l.PropTypes.string,type:l.PropTypes.string,label:l.PropTypes.string,summary:l.PropTypes.string,initialValueModifier:l.PropTypes.func,value:l.PropTypes.oneOfType([l.PropTypes.string,l.PropTypes.number,l.PropTypes.bool]).isRequired,
enumValues:l.PropTypes.arrayOf(l.PropTypes.object)},a.defaultProps={initialValueModifier:function(e){return e}},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.name,n=e.labelText,r=e.helpText,u=e.showErrors,d=e.errors,f=s(e,["name","labelText","helpText","showErrors","errors"]),p=o(d,1),h=p[0];return{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:[{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{
children:[n,u&&h&&" \u2014 "+h],hasError:u,name:t}),_owner:null},c.default.createElement(w.default,l({name:t,hasError:u},f)),r&&{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{children:r}),_owner:null}]}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(93).default,l=n(11).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(178),p=u(f),h=n(177),v=u(h),g=n(111),m=u(g),y=n(334),b=u(y),P=n(213),w=u(P);r.propTypes={
name:d.PropTypes.string.isRequired,labelText:d.PropTypes.node.isRequired,helpText:d.PropTypes.string,showErrors:d.PropTypes.bool,errors:d.PropTypes.arrayOf(d.PropTypes.string).isRequired},t.default=(0,p.default)(r),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(11).default,l=n(10).default,u=n(7).default,d=n(19).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=c(f),h=n(24),v=n(31),g=c(v),m=n(167),y=c(m),b=n(1161),P=c(b),w=n(427),S=c(w),_=n(166),T=c(_),I=n(423),M=c(I),C=n(78),x=c(C),E=n(2075),k=c(E),D=function(e){
function t(e,n){s(this,t),r(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=P.default.getPageKey()+"!scrollPosition!"+e.scrollPositionStorageKey)}return a(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.scrollIndex?this._scrollToIndex(this.props.scrollIndex):this._restoreScrollPosition();
}},{key:"shouldComponentUpdate",value:function(e,t){return(0,g.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&&P.default.set(this._scrollPositionKey,{scrollTop:this.state.scrollTop,scrollLeft:this.state.scrollLeft})}},{key:"_restoreScrollPosition",value:function(){var e=this;if(this._scrollPositionKey){var t=P.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,r=t.getPositionForIndex,a=r(Math.max(e,0)),i=n.outerPaddingTop||0,s=n.outerPaddingLeft||0;this.setState({scrollTop:a.cellY-i,scrollLeft:a.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.children,r=e.scrollerClassName,a=e.ignoreWidth,i=e.ignoreHeight,s=e.scrollDirection,c=e.onListUpdate,f=d(e,["className","children","scrollerClassName","ignoreWidth","ignoreHeight","scrollDirection","onListUpdate"]),h=this.state,v=h.isMeasured,g=h.isRestoringScrollPosition,m=h.width,b=h.height,P=h.scrollTop,w=h.scrollLeft;
return{$$typeof:u,type:T.default,key:null,ref:null,props:l(T.default.defaultProps,{children:v&&{$$typeof:u,type:x.default,key:null,ref:null,props:l(x.default.defaultProps,{children:[p.default.createElement(M.default,o({viewportWidth:m,viewportHeight:b,onListUpdate:(0,y.default)(this.onListUpdate,c)},f)),n],className:r,smoothScroll:!g,scrollDirection:s,scrollTop:P,scrollLeft:w,enableChildrenProps:!0,onScrollPositionChange:this.onScrollPositionChange}),_owner:null},className:t,ignoreWidth:a,ignoreHeight:i,
ignorePosition:!0,onMeasure:this.onMeasure}),_owner:null}}}]),t}(f.Component);D.propTypes={className:f.PropTypes.string,children:f.PropTypes.node,scrollerClassName:f.PropTypes.string,layout:S.default,ignoreWidth:f.PropTypes.bool,ignoreHeight:f.PropTypes.bool,scrollDirection:f.PropTypes.string,scrollIndex:f.PropTypes.number,scrollPositionStorageKey:f.PropTypes.string,onListUpdate:f.PropTypes.func,onListScrollIndexChange:f.PropTypes.func},D.defaultProps={scrollerClassName:k.default.scroller},t.default=D,
e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=o(l),d=n(4),c=o(d),f=n(14),p=n(24),h=n(31),v=o(h),g=n(167),m=o(g),y=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"onPress",decorators:[p.autobind],
value:function(e){(0,f.resolve)("metrics").trackClick(u.default.omit(this.props,"children"))}},{key:"render",value:function(){var e=c.default.Children.only(this.props.children);return c.default.cloneElement(e,{onPress:(0,m.default)(this.onPress,e.props.onPress)})}}]),t}(d.Component);y.propTypes={children:d.PropTypes.element.isRequired,page:d.PropTypes.string.isRequired,action:d.PropTypes.string.isRequired},t.default=y,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=s(e,["children"]);
return u.default.createElement(c.default,n,{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{children:t,className:v.default.modalScroller,innerClassName:v.default.innerModalBody}),_owner:null})}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(105),c=o(d),f=n(82),p=o(f),h=n(2085),v=o(h);r.propTypes={children:l.PropTypes.node},t.default=r,e.exports=t.default},function(e,t,n){"use strict";
function r(e){var t=e.iconClassName,n=e.messageClassName,r=e.kind,o=e.message,l=s(e,["iconClassName","messageClassName","kind","message"]);return u.default.createElement(g.default,l,{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{name:"plex-icon-alert-560",className:(0,c.default)(y.default[r],t)}),_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:o,className:n},_owner:null})}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var l=n(4),u=o(l),d=n(33),c=o(d),f=n(30),p=n(36),h=o(p),v=n(727),g=o(v),m=n(2086),y=o(m);r.propTypes={iconClassName:l.PropTypes.string,messageClassName:l.PropTypes.string,kind:l.PropTypes.oneOf(f.kinds.all),message:l.PropTypes.string},r.defaultProps={iconClassName:y.default.icon,messageClassName:y.default.message,kind:f.kinds.DEFAULT},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return l.default.createElement(f.default,e,p)}var a=n(10).default,i=n(7).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(55),d=s(u),c=n(727),f=s(c),p={$$typeof:i,type:d.default,key:null,ref:null,props:a(d.default.defaultProps,{}),_owner:null};t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,u.createSelector)((0,c.default)(),(0,p.default)(),function(e,t){return{machineIdentifier:e.machineIdentifier,isRefreshing:!!t}})}function a(e){return o.default.createElement(v.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(4),o=i(s),l=n(21),u=n(15),d=n(70),c=i(d),f=n(324),p=i(f),h=n(1698),v=i(h);a.propTypes={serverEntityID:s.PropTypes.string.isRequired,providerEntityID:s.PropTypes.string.isRequired},t.default=(0,l.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,c.createSelector)((0,h.default)(),function(e){return{isRefreshing:!!e}})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var u=n(4),d=n(21),c=n(15),f=n(24),p=n(324),h=l(p),v=n(110),g=n(208),m=15e3,y=18e5,b={fetchProviders:v.fetchProviders,repopulatePage:g.repopulatePage},P=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"componentWillMount",value:function(){this._setRepopulateTimeout()}},{key:"componentWillReceiveProps",value:function(e){e.isRefreshing!==this.props.isRefreshing&&this._setRepopulateTimeout()}},{key:"componentWillUnmount",
value:function(){this._clearRepopulateTimeout()}},{key:"_setRepopulateTimeout",value:function(){this._clearRepopulateTimeout();var e=m;this.props.isRefreshing||(e=Math.ceil(Date.now()/y)*y-Date.now()),this._repopulateTimeoutID=setTimeout(this._repopulateProgramGuide,e)}},{key:"_clearRepopulateTimeout",value:function(){this._repopulateTimeoutID&&clearTimeout(this._repopulateTimeoutID)}},{key:"_repopulateProgramGuide",decorators:[f.autobind],value:function(){this.props.isRefreshing&&this.props.fetchProviders({
serverEntityID:this.props.serverEntityID}),this.props.repopulatePage(),this._setRepopulateTimeout()}},{key:"render",value:function(){return null}}]),t}(u.Component);P.propTypes={serverEntityID:u.PropTypes.string.isRequired,providerEntityID:u.PropTypes.string.isRequired,isRefreshing:u.PropTypes.bool,fetchProviders:u.PropTypes.func.isRequired,repopulatePage:u.PropTypes.func.isRequired},t.default=(0,d.connect)(r,b)(P),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(5)),f=u(c),p=n(24),h=n(36),v=u(h),g=n(34),m=u(g),y=n(456),b=u(y),P=n(2102),w=u(P),S=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"onSelectDevicePress",decorators:[p.autobind],value:function(){this.props.onSelectDevicePress(this.props.deviceID)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.model,r=e.uri,a=e.channelCount,i=e.isSelectable,s=e.isSelected,u=e.includeUri,d=e.includeChannelCount,c=void 0;
return c=1===a?(0,f.default)("1 channel"):a>1?(0,f.default)("{1} channels",a):(0,f.default)("No channels"),{$$typeof:o,type:"div",key:null,ref:null,props:{children:[i&&{$$typeof:o,type:m.default,key:null,ref:null,props:l(m.default.defaultProps,{children:{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:b.default,key:null,ref:null,props:l(b.default.defaultProps,{model:n}),_owner:null},s&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:"div",key:null,
ref:null,props:{children:{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:v.default,key:null,ref:null,props:l(v.default.defaultProps,{name:"plex-icon-selected-560",className:w.default.selectedIcon,"aria-label":(0,f.default)("Selected")}),_owner:null},className:w.default.selectedCircle},_owner:null},className:w.default.selectedContainer},_owner:null},className:w.default.selected},_owner:null}],className:w.default.deviceImageContainer},_owner:null},onPress:this.onSelectDevicePress
}),_owner:null},!i&&{$$typeof:o,type:b.default,key:null,ref:null,props:l(b.default.defaultProps,{model:n}),_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{children:n,className:w.default.model},_owner:null},u&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:r,className:w.default.uri},_owner:null},d&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:c,className:w.default.channelCount},_owner:null}],className:w.default.details
},_owner:null}],className:t},_owner:null}}}]),t}(d.Component);S.propTypes={className:d.PropTypes.string,deviceID:d.PropTypes.number,model:d.PropTypes.string.isRequired,uri:d.PropTypes.string,channelCount:d.PropTypes.number,isSelectable:d.PropTypes.bool,isSelected:d.PropTypes.bool,includeUri:d.PropTypes.bool,includeChannelCount:d.PropTypes.bool,onSelectDevicePress:d.PropTypes.func},S.defaultProps={includeUri:!1,includeChannelCount:!1,isSelectable:!1},t.default=S,e.exports=t.default},function(e,t,n){
"use strict";function r(){return(0,p.createSelector)((0,m.default)(),b.default,function(e,t){return a({},e,{lineupChannels:t})})}var a=n(11).default,i=n(17).default,s=n(18).default,o=n(25).default,l=n(16).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(21),p=n(15),h=n(24),v=n(50),g=n(1397),m=u(g),y=n(1399),b=u(y),P=n(103),w=n(1715),S=u(w),_={fetchLineupChannels:P.fetchLineupChannels,fetchChannelMap:P.fetchChannelMap,selectEPGLineup:P.selectEPGLineup,enableDeviceChannel:P.enableDeviceChannel,
updateChannelMapping:P.updateChannelMapping},T=function(e){function t(){l(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return s(t,e),o(t,[{key:"onDeviceChannelEnabledChange",decorators:[h.autobind],value:function(e){var t=this,n=this.props,r=n.serverEntityID,a=n.dvrID,i=n.deviceID,s=n.deviceIdentifier;(0,v.scheduleImmediateUpdate)(function(){t.props.enableDeviceChannel({serverEntityID:r,dvrID:a,deviceID:i,deviceIdentifier:s,enabled:e})})}},{key:"onLineupChannelChange",
decorators:[h.autobind],value:function(e){var t=this,n=this.props,r=n.serverEntityID,a=n.dvrID,i=n.deviceID,s=n.deviceIdentifier;(0,v.scheduleImmediateUpdate)(function(){t.props.updateChannelMapping({serverEntityID:r,dvrID:a,deviceID:i,deviceIdentifier:s,lineupIdentifier:e})})}},{key:"render",value:function(){return c.default.createElement(S.default,a({onLineupSelect:this.onLineupSelect,onDeviceChannelEnabledChange:this.onDeviceChannelEnabledChange,onLineupChannelChange:this.onLineupChannelChange
},this.props))}}]),t}(d.Component);T.propTypes={serverEntityID:d.PropTypes.string.isRequired,dvrID:d.PropTypes.number,deviceID:d.PropTypes.number,deviceIdentifier:d.PropTypes.string.isRequired,enableDeviceChannel:d.PropTypes.func.isRequired,updateChannelMapping:d.PropTypes.func.isRequired},t.default=(0,f.connect)(r,_)(T),e.exports=t.default},function(e,t,n){"use strict";function r(){return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:"div",key:null,ref:null,props:{children:(0,
l.default)("Device Channels"),className:d.default.deviceChannels},_owner:null},{$$typeof:a,type:"div",key:null,ref:null,props:{children:(0,l.default)("Guide Channels"),className:d.default.guideChannels},_owner:null}],className:d.default.container},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(5)),l=i(o),u=n(2111),d=i(u);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(24)),f=n(31),p=u(f),h=n(1719),v=u(h),g={visibility:"hidden"},m={visibility:"visible"},y=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isReady:!1},this._readyCount=0}return a(t,e),i(t,[{key:"componentWillMount",value:function(){this._initialCount=this.props.hubEntityIDs.length}},{key:"componentWillReceiveProps",value:function(e){var t=e.hubEntityIDs.length,n=this.props.hubEntityIDs.length;
this.state.isReady||t===n||(this._initialCount=t,this._readyCount===t&&this.setState({isReady:!0}))}},{key:"shouldComponentUpdate",value:function(e,t){return(0,p.default)(this,e,t)}},{key:"onListReady",decorators:[c.autobind],value:function(){++this._readyCount===this._initialCount&&this.setState({isReady:!0})}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.serverEntityID,a=t.providerEntityID,i=t.hubEntityIDs,s=t.columnAdjustment,u=this.state.isReady;return{$$typeof:o,type:"div",
key:null,ref:null,props:{children:i.map(function(t){return{$$typeof:o,type:v.default,key:t,ref:null,props:l(v.default.defaultProps,{serverEntityID:r,providerEntityID:a,hubEntityID:t,columnAdjustment:s,onListReady:e.onListReady}),_owner:null}}),className:n,style:u?m:g},_owner:null}}}]),t}(d.Component);y.propTypes={className:d.PropTypes.string,serverEntityID:d.PropTypes.string.isRequired,providerEntityID:d.PropTypes.string.isRequired,hubEntityIDs:d.PropTypes.array.isRequired,columnAdjustment:d.PropTypes.number
},t.default=y,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return!!h.default.find(e,function(e){return t[e]})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(11).default,u=n(10).default,d=n(7).default,c=n(19).default,f=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var p=n(3),h=f(p),v=n(4),g=(f(v),n(24)),m=n(31),y=f(m),b=n(5),P=f(b),w=n(30),S=n(104),_=f(S),T=n(147),I=f(T),M=n(453),C=f(M),x=["showPlay","showPlayVersion","showPlayAll","showShuffle","showQueue","showPlayPlexMix","showPlayTrailer","showPlayMusicVideo","showAddToPlaylist"],E=["showEdit","showMarkWatched","showMarkUnwatched","showRefresh","showAnalyze","showFixMatch","showMatch","showUnmatch","showSplitApart","showSync","showOptimize","showDownload","showWatchLater","showShare","showRecommend","showDelete","showDeleteVersion","showGetInfo"],k={
$$typeof:d,type:C.default,key:null,ref:null,props:u(C.default.defaultProps,{}),_owner:null},D=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,y.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:"onPlayVersionPress",decorators:[g.autobind],value:function(e){this.props.playMetadataItemVersion(this._getActionPayload())}},{key:"onPlayAllPress",decorators:[g.autobind],value:function(e){this.props.playMetadataItemAll(this._getActionPayload())}},{key:"onShufflePress",decorators:[g.autobind],value:function(e){this.props.shuffleMetadataItem(this._getActionPayload())}},{key:"onPlayNextPress",decorators:[g.autobind],value:function(e){this.props.playMetadataItemNext(this._getActionPayload());
}},{key:"onAddToQueuePress",decorators:[g.autobind],value:function(e){this.props.addMetadataItemToQueue(this._getActionPayload())}},{key:"onPlayPlexMixPress",decorators:[g.autobind],value:function(e){this.props.playRelatedMix(this._getActionPayload())}},{key:"onPlayPrimaryExtraPress",decorators:[g.autobind],value:function(e){this.props.playPrimaryExtra(this._getActionPayload())}},{key:"onAddToPlaylistPress",decorators:[g.autobind],value:function(e){this.props.addMetadataItemToPlaylist(this._getActionPayload());
}},{key:"onMarkWatchedPress",decorators:[g.autobind],value:function(e){this.props.markMetadataItemWatched(this._getActionPayload())}},{key:"onMarkUnwatchedPress",decorators:[g.autobind],value:function(e){this.props.markMetadataItemUnwatched(this._getActionPayload())}},{key:"onEditPress",decorators:[g.autobind],value:function(e){this.props.editMetadataItem(this._getActionPayload())}},{key:"onRefreshPress",decorators:[g.autobind],value:function(e){this.props.refreshMetadataItem(this._getActionPayload());
}},{key:"onAnalyzePress",decorators:[g.autobind],value:function(e){this.props.analyzeMetadataItem(this._getActionPayload())}},{key:"onFixMatchPress",decorators:[g.autobind],value:function(e){this.props.fixMetadataItemMatch(this._getActionPayload())}},{key:"onUnmatchPress",decorators:[g.autobind],value:function(e){this.props.unmatchMetadataItem(this._getActionPayload())}},{key:"onSplitApartPress",decorators:[g.autobind],value:function(e){this.props.splitMetadataItemApart(this._getActionPayload())}
},{key:"onSyncPress",decorators:[g.autobind],value:function(e){this.props.syncMetadataItem(this._getActionPayload())}},{key:"onOptimizePress",decorators:[g.autobind],value:function(e){this.props.optimizeMetadataItem(this._getActionPayload())}},{key:"onDownloadVersionPress",decorators:[g.autobind],value:function(e){this.props.downloadMetadataItemVersion(this._getActionPayload())}},{key:"onWatchLaterPress",decorators:[g.autobind],value:function(e){this.props.watchMetadataItemLater(this._getActionPayload());
}},{key:"onSharePress",decorators:[g.autobind],value:function(e){this.props.shareMetadataItem(this._getActionPayload())}},{key:"onRecommendPress",decorators:[g.autobind],value:function(e){this.props.recommendMetadataItem(this._getActionPayload())}},{key:"onDeletePress",decorators:[g.autobind],value:function(e){var t=this._getActionPayload();this.props.deleteMetadataItem(l({},t,{skipRedirect:!0}))}},{key:"onDeleteVersionPress",decorators:[g.autobind],value:function(e){this.props.deleteMetadataItemVersion(this._getActionPayload());
}},{key:"onGetInfoPress",decorators:[g.autobind],value:function(e){this.props.getMetadataItemInfo(this._getActionPayload())}},{key:"render",value:function(){var e=this.props,t=e.target,n=e.isOpen,a=e.onMenuClose,i=c(e,["target","isOpen","onMenuClose"]),s=r(x,i),o=r(E,i),l=s&&o;return{$$typeof:d,type:_.default,key:null,ref:null,props:u(_.default.defaultProps,{children:[i.showPlay&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:i.playLabel||(0,P.default)("Play"),
onPress:this.onPlayPress}),_owner:null},i.showPlayVersion&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Play Version..."),onPress:this.onPlayVersionPress}),_owner:null},i.showPlayAll&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Play All"),onPress:this.onPlayAllPress}),_owner:null},i.showShuffle&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Shuffle"),
onPress:this.onShufflePress}),_owner:null},i.showQueue&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Play Next"),onPress:this.onPlayNextPress}),_owner:null},i.showQueue&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Add to Queue"),onPress:this.onAddToQueuePress}),_owner:null},i.showPlayPlexMix&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Play Plex Mix"),
onPress:this.onPlayPlexMixPress}),_owner:null},i.showPlayTrailer&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Play Trailer"),onPress:this.onPlayPrimaryExtraPress}),_owner:null},i.showPlayMusicVideo&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Play Music Video"),onPress:this.onPlayPrimaryExtraPress}),_owner:null},i.showAddToPlaylist&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{
children:(0,P.default)("Add to Playlist..."),onPress:this.onAddToPlaylistPress}),_owner:null},l&&k,i.showEdit&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Edit"),onPress:this.onEditPress}),_owner:null},i.showMarkWatched&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Mark Watched"),onPress:this.onMarkWatchedPress}),_owner:null},i.showMarkUnwatched&&{$$typeof:d,type:I.default,key:null,ref:null,
props:u(I.default.defaultProps,{children:(0,P.default)("Mark Unwatched"),onPress:this.onMarkUnwatchedPress}),_owner:null},i.showRefresh&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Refresh"),onPress:this.onRefreshPress}),_owner:null},i.showAnalyze&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Analyze"),onPress:this.onAnalyzePress}),_owner:null},i.showFixMatch&&{$$typeof:d,type:I.default,
key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Fix Match..."),onPress:this.onFixMatchPress}),_owner:null},i.showMatch&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Match..."),onPress:this.onFixMatchPress}),_owner:null},i.showUnmatch&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Unmatch"),onPress:this.onUnmatchPress}),_owner:null},i.showSplitApart&&{$$typeof:d,
type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Split Apart"),onPress:this.onSplitApartPress}),_owner:null},i.showSync&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Sync..."),onPress:this.onSyncPress}),_owner:null},i.showOptimize&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Optimize..."),onPress:this.onOptimizePress}),_owner:null},i.showDownload&&{
$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Download"),to:i.downloadUrl&&i.downloadUrl(),download:!!i.downloadUrl,onPress:!i.downloadUrl&&this.onDownloadVersionPress}),_owner:null},i.showWatchLater&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Watch Later"),onPress:this.onWatchLaterPress}),_owner:null},i.showShare&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{
children:(0,P.default)("Share..."),onPress:this.onSharePress}),_owner:null},i.showRecommend&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Recommend..."),onPress:this.onRecommendPress}),_owner:null},i.showDelete&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Delete"),kind:w.kinds.DANGER,onPress:this.onDeletePress}),_owner:null},i.showDeleteVersion&&{$$typeof:d,type:I.default,key:null,ref:null,
props:u(I.default.defaultProps,{children:(0,P.default)("Delete Version"),kind:w.kinds.DANGER,onPress:this.onDeleteVersionPress}),_owner:null},i.showGetInfo&&{$$typeof:d,type:I.default,key:null,ref:null,props:u(I.default.defaultProps,{children:(0,P.default)("Get Info"),onPress:this.onGetInfoPress}),_owner:null}],target:t,isOpen:n,onMenuClose:a}),_owner:null}}}]),t}(v.Component);D.propTypes={serverEntityID:v.PropTypes.string.isRequired,metadataItemEntityID:v.PropTypes.string.isRequired,target:v.PropTypes.object,
isOpen:v.PropTypes.bool.isRequired,onMenuClose:v.PropTypes.func.isRequired,playLabel:v.PropTypes.string,showPlay:v.PropTypes.bool,showPlayVersion:v.PropTypes.bool,showPlayAll:v.PropTypes.bool,showShuffle:v.PropTypes.bool,showQueue:v.PropTypes.bool,showPlayPlexMix:v.PropTypes.bool,showPlayTrailer:v.PropTypes.bool,showPlayMusicVideo:v.PropTypes.bool,showAddToPlaylist:v.PropTypes.bool,showEdit:v.PropTypes.bool,showMarkWatched:v.PropTypes.bool,showMarkUnwatched:v.PropTypes.bool,showRefresh:v.PropTypes.bool,
showAnalyze:v.PropTypes.bool,showFixMatch:v.PropTypes.bool,showMatch:v.PropTypes.bool,showUnmatch:v.PropTypes.bool,showSplitApart:v.PropTypes.bool,showSync:v.PropTypes.bool,showOptimize:v.PropTypes.bool,downloadUrl:v.PropTypes.func,showDownload:v.PropTypes.bool,showWatchLater:v.PropTypes.bool,showShare:v.PropTypes.bool,showRecommend:v.PropTypes.bool,showDelete:v.PropTypes.bool,showDeleteVersion:v.PropTypes.bool,showGetInfo:v.PropTypes.bool,playMetadataItem:v.PropTypes.func,playMetadataItemVersion:v.PropTypes.func,
playMetadataItemAll:v.PropTypes.func,shuffleMetadataItem:v.PropTypes.func,playMetadataItemNext:v.PropTypes.func,addMetadataItemToQueue:v.PropTypes.func,playRelatedMix:v.PropTypes.func,playPrimaryExtra:v.PropTypes.func,addMetadataItemToPlaylist:v.PropTypes.func,markMetadataItemWatched:v.PropTypes.func,markMetadataItemUnwatched:v.PropTypes.func,editMetadataItem:v.PropTypes.func,refreshMetadataItem:v.PropTypes.func,analyzeMetadataItem:v.PropTypes.func,fixMetadataItemMatch:v.PropTypes.func,unmatchMetadataItem:v.PropTypes.func,
splitMetadataItemApart:v.PropTypes.func,syncMetadataItem:v.PropTypes.func,optimizeMetadataItem:v.PropTypes.func,downloadMetadataItemVersion:v.PropTypes.func,watchMetadataItemLater:v.PropTypes.func,shareMetadataItem:v.PropTypes.func,recommendMetadataItem:v.PropTypes.func,deleteMetadataItem:v.PropTypes.func,deleteMetadataItemVersion:v.PropTypes.func,getMetadataItemInfo:v.PropTypes.func},t.default=D,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.isOpen,n=e.metricsProperties,r=e.metadataItemEntityID,l=e.onRecordingModify,u=e.onModalClose,c=s(e,["isOpen","metricsProperties","metadataItemEntityID","onRecordingModify","onModalClose"]);
return{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{children:d.default.createElement(h.default,o({metadataItemEntityID:r,onRecordingModify:l,onModalClose:u},c)),isOpen:t,metricsPage:"dvrAiringDetails",metricsProperties:n,onModalClose:u}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(148),f=l(c),p=n(1726),h=l(p);r.propTypes={isOpen:u.PropTypes.bool.isRequired,
metricsProperties:u.PropTypes.object.isRequired,metadataItemEntityID:u.PropTypes.string.isRequired,onRecordingModify:u.PropTypes.func.isRequired,onModalClose:u.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.name,n=e.labelText,r=s(e,["name","labelText"]);return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{children:n,name:t}),_owner:null},d.default.createElement(m.default,o({
name:t,size:c.sizes.SMALL},r))]},_owner:null}}var a=n(7).default,i=n(10).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(30),f=n(178),p=l(f),h=n(111),v=l(h),g=n(270),m=l(g);r.propTypes={name:u.PropTypes.string.isRequired,labelText:u.PropTypes.node.isRequired},t.default=(0,p.default)(r),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(19).default,u=n(11).default,d=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=d(c),p=n(33),h=d(p),v=n(24),g=n(31),m=d(g),y=n(204),b=d(y),P=n(221),w=d(P),S=n(1740),_=d(S),T=n(2125),I=d(T),M="faceFront",C="faceBack",x=(0,b.default)(w.default.posterFlipSpeed),E={transitionName:{appear:"appear",enter:"enter",leave:"leave"},transitionAppear:!0,transitionAppearTimeout:0,transitionEnterTimeout:0,transitionLeaveTimeout:0},k=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state={visibleFace:M,isLoadingFace:!1,isFlippingFace:!1,previousImageUrl:null}}return a(t,e),i(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.props.imageUrl,n=e.imageUrl&&t!==e.imageUrl,r=this.props.metadataKey===e.metadataKey;r&&n&&this._prepareFlip(t)}},{key:"shouldComponentUpdate",value:function(e,t){return(0,m.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,x)}},{key:"_cancelFlip",value:function(){this._flipTimeoutID&&(this._flipTimeoutID=clearTimeout(this._flipTimeoutID))}},{key:"_getInverseFace",value:function(e){return e===M?C:M}},{key:"onImageLoad",decorators:[v.autobind],value:function(){this.state.isLoadingFace&&this._flipCard()}},{
key:"onImageError",decorators:[v.autobind],value:function(){this.state.isLoadingFace&&this._flipCard()}},{key:"onFlipComplete",decorators:[v.autobind],value:function(){this.setState({isFlippingFace:!1,previousImageUrl:null})}},{key:"render",value:function(){var e=this.props,t=e.metadataKey,n=e.imageWidth,r=e.imageHeight,a=e.imageUrl,i=l(e,["metadataKey","imageWidth","imageHeight","imageUrl"]),s=this.state,d=s.visibleFace,c=s.isLoadingFace,p=s.isFlippingFace,v=s.previousImageUrl,g=this._getInverseFace(d),m={
width:n,height:r};return{$$typeof:o,type:"div",key:t,ref:null,props:{children:{$$typeof:o,type:"div",key:null,ref:null,props:{children:[f.default.createElement(_.default,u({key:d,visibleFace:d,imageWidth:n,imageHeight:r,imageUrl:c?v:a,imageTransitionProps:p?E:void 0,onImageLoad:this.onImageLoad,onImageError:this.onImageError},i)),p&&f.default.createElement(_.default,u({key:g,visibleFace:g,imageWidth:n,imageHeight:r,imageUrl:c?a:v,imageTransitionProps:p?E:void 0,onImageLoad:this.onImageLoad,onImageError:this.onImageError
},i))],className:(0,h.default)(I.default.card,d===C&&I.default.isFlipped),style:m},_owner:null},className:I.default.cardContainer},_owner:null}}}]),t}(c.Component);k.propTypes={metadataKey:c.PropTypes.string.isRequired,imageWidth:c.PropTypes.number.isRequired,imageHeight:c.PropTypes.number.isRequired,imageUrl:c.PropTypes.oneOfType([c.PropTypes.func,c.PropTypes.string])},t.default=k,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.type,r=e.width,s=e.height;return{
$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{className:(0,u.default)(t,p.default.placeholderIcon),type:n,width:r,height:s}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(33)),u=s(l),d=n(1739),c=s(d),f=n(2127),p=s(f);r.propTypes={className:o.PropTypes.string,type:o.PropTypes.string,width:o.PropTypes.number.isRequired,height:o.PropTypes.number.isRequired},t.default=r,e.exports=t.default;
},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),(0,d.default)(),(0,f.default)(),function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return{server:e,provider:t,parentKey:n.parentKey,parentTitle:n.parentTitle}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(67),l=a(o),u=n(73),d=a(u),c=n(48),f=a(c),p=n(1750),h=a(p);t.default=(0,i.connect)(r)(h.default),e.exports=t.default},function(e,t,n){
"use strict";function r(e){var t=e.beginsAt,n=e.endsAt,r=e.channel,a=e.showChannel,i=e.showFullTime;if(t){if((0,g.default)(t,n))return(0,S.default)(n-Date.now()/1e3);var s=i?y.default:P.default;return s(t,a&&r)}return(0,p.default)("No upcoming airings")}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(7).default,u=n(10).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=(d(c),n(5)),p=d(f),h=n(24),v=n(1080),g=d(v),m=n(1074),y=d(m),b=n(1075),P=d(b),w=n(197),S=d(w),_=n(31),T=d(_),I=n(125),M=d(I),C=n(2133),x=d(C),E=function(e){
function t(e,n){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state=this.getState(e)}return i(t,e),s(t,[{key:"componentWillMount",value:function(){this.setTickTimeout()}},{key:"componentWillReceiveProps",value:function(e,t){this.setState(this.getState(e))}},{key:"shouldComponentUpdate",value:function(e,t){return(0,T.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this.tickTimeout&&clearTimeout(this.tickTimeout)}},{key:"getState",value:function(e){
return{title:r(e)}}},{key:"setTickTimeout",value:function(){this.tickTimeout=setTimeout(this.tick,6e4-Date.now()%6e4)}},{key:"tick",decorators:[h.autobind],value:function(){this.setState(this.getState(this.props)),this.setTickTimeout()}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.beginsAt,r=e.endsAt,a=e.channel,i=e.showChannel,s=this.state.title,o=i&&!!a&&(0,g.default)(n,r);return{$$typeof:l,type:"span",key:null,ref:null,props:{children:o?{$$typeof:l,type:"span",key:null,ref:null,
props:{children:[(0,p.default)("Now on {1}",a),{$$typeof:l,type:M.default,key:null,ref:null,props:u(M.default.defaultProps,{className:x.default.separator}),_owner:null},s]},_owner:null}:s,className:t},_owner:null}}}]),t}(c.Component);E.propTypes={className:c.PropTypes.string,beginsAt:c.PropTypes.number,endsAt:c.PropTypes.number,channel:c.PropTypes.string,showFullTime:c.PropTypes.bool,showChannel:c.PropTypes.bool},E.defaultProps={showFullTime:!1,showChannel:!1},t.default=E,e.exports=t.default},function(e,t,n){
"use strict";function r(){return(0,s.createSelector)((0,l.default)(),(0,d.default)(),function(e,t){return{beginsAt:e&&e.beginsAt,endsAt:e&&e.endsAt,channel:t&&t.tag}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(325),l=a(o),u=n(686),d=a(u),c=n(742),f=a(c);t.default=(0,i.connect)(r)(f.default),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];
return{childCount:e.childCount}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(48),l=a(o),u=n(1751),d=a(u);t.default=(0,i.connect)(r)(d.default),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return{addedAt:e.addedAt}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(48),l=a(o),u=n(1752),d=a(u);
t.default=(0,i.connect)(r)(d.default),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.leafCount,r=void 0;return null!=n&&(r=1===n?(0,l.default)("{1} episode",n):(0,l.default)("{1} episodes",n)),{$$typeof:a,type:"span",key:null,ref:null,props:{children:r,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(5)),l=i(o);r.propTypes={className:s.PropTypes.string,leafCount:s.PropTypes.number
},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return{leafCount:e.leafCount}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(48),l=a(o),u=n(746),d=a(u);t.default=(0,i.connect)(r)(d.default),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),function(){
var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return{leafCount:e.leafCount}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(48),l=a(o),u=n(1755),d=a(u);t.default=(0,i.connect)(r)(d.default),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return{skipChildren:e.skipChildren,childCount:e.childCount,leafCount:e.leafCount
}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(48),l=a(o),u=n(1759),d=a(u);t.default=(0,i.connect)(r)(d.default),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.server,r=e.provider,s=e.metadataKey,o=e.parentKey,l=e.title,d=e.parentTitle,f=e.index,h=e.parentIndex,v=e.originallyAvailableAt,g=e.onPress,m=(0,u.default)({seasonIndex:h,noLeadingZero:!0}),y=(0,c.default)({episodeIndex:f,date:v,noLeadingZero:!0}),b=(0,
p.default)(n,r,s),P=(0,p.default)(n,r,o);return b&&P?{$$typeof:a,type:"span",key:null,ref:null,props:{children:[f>0&&{$$typeof:a,type:w.default,key:null,ref:null,props:i(w.default.defaultProps,{children:m,title:d,to:P,onPress:g}),_owner:null},f>0&&_,{$$typeof:a,type:w.default,key:null,ref:null,props:i(w.default.defaultProps,{children:y,title:l,to:b,onPress:g}),_owner:null}],className:t},_owner:null}:{$$typeof:a,type:"span",key:null,ref:null,props:{children:[f>0&&{$$typeof:a,type:"span",key:null,ref:null,
props:{children:m},_owner:null},f>0&&S,{$$typeof:a,type:"span",key:null,ref:null,props:{children:y},_owner:null}],className:t},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(1105)),u=s(l),d=n(245),c=s(d),f=n(153),p=s(f),h=n(75),v=s(h),g=n(74),m=s(g),y=n(125),b=s(y),P=n(34),w=s(P),S={$$typeof:a,type:b.default,key:null,ref:null,props:i(b.default.defaultProps,{separator:"\xb7"}),_owner:null},_={$$typeof:a,type:b.default,
key:null,ref:null,props:i(b.default.defaultProps,{separator:"\xb7"}),_owner:null};r.propTypes={className:o.PropTypes.string,server:v.default,provider:m.default,metadataKey:o.PropTypes.string,parentKey:o.PropTypes.string,title:o.PropTypes.string,parentTitle:o.PropTypes.string,index:o.PropTypes.number,parentIndex:o.PropTypes.number,originallyAvailableAt:o.PropTypes.string,onPress:o.PropTypes.func},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.year;
return{$$typeof:a,type:"span",key:null,ref:null,props:{children:n,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4);i(s);r.propTypes={className:s.PropTypes.string,year:s.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return!!p.default.find(e,function(e){return t[e]})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(7).default,u=n(10).default,d=n(11).default,c=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=c(f),h=n(4),v=c(h),g=n(5),m=c(g),y=n(24),b=n(31),P=c(b),w=n(1724),S=c(w),_=n(754),T=c(_),I=n(755),M=c(I),C=n(753),x=c(C),E=n(756),k=c(E),D=n(468),A=c(D),O=["showOptimize"],R=function(e){function t(e,n){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isActionsMenuOpen:!1}}return i(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,P.default)(this,e,t)}},{key:"_getActionPayload",
value:function(){return{metadataListEntityID:this.props.metadataListEntityID}}},{key:"onPlayAllPress",decorators:[y.autobind],value:function(e){this.props.playMetadataList(this._getActionPayload())}},{key:"onShufflePress",decorators:[y.autobind],value:function(e){this.props.shuffleMetadataList(this._getActionPayload())}},{key:"onAddToPlaylistPress",decorators:[y.autobind],value:function(e){this.props.addMetadataListToPlaylist(this._getActionPayload())}},{key:"onSyncPress",decorators:[y.autobind],
value:function(e){this.props.syncMetadataList(this._getActionPayload())}},{key:"onActionsPress",decorators:[y.autobind],value:function(e){this.setState({isActionsMenuOpen:!this.state.isActionsMenuOpen})}},{key:"onActionsMenuClose",decorators:[y.autobind],value:function(){this.setState({isActionsMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.showPlayAll,n=e.showShuffle,a=e.showAddToPlaylist,i=e.showSync,s=this.state.isActionsMenuOpen,o=r(O,this.props);return{$$typeof:l,type:"div",
key:null,ref:null,props:{children:[t&&{$$typeof:l,type:T.default,key:null,ref:null,props:u(T.default.defaultProps,{playLabel:(0,m.default)("Play All"),onPress:this.onPlayAllPress}),_owner:null},n&&{$$typeof:l,type:M.default,key:null,ref:null,props:u(M.default.defaultProps,{onPress:this.onShufflePress}),_owner:null},a&&{$$typeof:l,type:x.default,key:null,ref:null,props:u(x.default.defaultProps,{onPress:this.onAddToPlaylistPress}),_owner:null},i&&{$$typeof:l,type:k.default,key:null,ref:null,props:u(k.default.defaultProps,{
onPress:this.onSyncPress}),_owner:null},o&&v.default.createElement(A.default,{ref:"moreButton",icon:"plex-icon-toolbar-more-560",label:(0,m.default)("More..."),isMenuOpen:s,onPress:this.onActionsPress}),v.default.createElement(S.default,d({target:this.refs.moreButton,isOpen:s,onMenuClose:this.onActionsMenuClose},this.props,{showPlayAll:!1,showShuffle:!1,showAddToPlaylist:!1,showSync:!1}))]},_owner:null}}}]),t}(h.Component);R.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=R,e.exports=t.default},function(e,t,n){"use strict";function r(e){return u.default.createElement(v.default,s({tooltip:(0,c.default)("Add to Playlist")},e),{$$typeof:i,type:p.default,key:null,
ref:null,props:a(p.default.defaultProps,{name:"plex-icon-toolbar-add-to-playlist-560","aria-label":(0,c.default)("Add to Playlist")}),_owner:null})}var a=n(10).default,i=n(7).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(36),p=o(f),h=n(214),v=o(h);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.playLabel,n=void 0===t?(0,f.default)("Play"):t,r=s(e,["playLabel"]);return d.default.createElement(g.default,o({
tooltip:n},r),{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{name:"plex-icon-toolbar-play-560","aria-label":n}),_owner:null})}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(5),f=l(c),p=n(36),h=l(p),v=n(214),g=l(v);r.propTypes={playLabel:u.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return u.default.createElement(v.default,s({
tooltip:(0,c.default)("Shuffle")},e),{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{name:"plex-icon-toolbar-shuffle-560","aria-label":(0,c.default)("Shuffle")}),_owner:null})}var a=n(10).default,i=n(7).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(36),p=o(f),h=n(214),v=o(h);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return u.default.createElement(v.default,s({
tooltip:(0,c.default)("Sync")},e),{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{name:"plex-icon-toolbar-sync-560","aria-label":(0,c.default)("Sync")}),_owner:null})}var a=n(10).default,i=n(7).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(36),p=o(f),h=n(214),v=o(h);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(7).default,l=n(19).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(31),p=u(f),h=n(268),v=u(h),g=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,p.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.hasMenu,n=e.title,r=l(e,["hasMenu","title"]);return t?c.default.createElement(v.default,r,n):{$$typeof:o,type:"span",key:null,ref:null,
props:{children:n},_owner:null}}}]),t}(d.Component);g.propTypes={hasMenu:d.PropTypes.bool.isRequired,title:d.PropTypes.string.isRequired},t.default=g,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,c.createSelector)(function(e,t){var n=t.directoryKey;return n},(0,p.default)(),function(e,t){var n=!1,r=void 0;return e?r=o.default.find(t,function(t){return t.hubKey===e?(n=!0,!0):t.key===e}):(r=o.default.first(t),n=!(!r||!r.hubKey)),{isHubKey:n,selectedDirectory:r}})}function a(e){
return u.default.createElement(v.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(4),u=i(l),d=n(21),c=n(15),f=n(302),p=i(f),h=n(1768),v=i(h);a.propTypes={serverEntityID:l.PropTypes.string.isRequired,providerEntityID:l.PropTypes.string.isRequired,directoryKey:l.PropTypes.string,changeQuickSearchSettings:l.PropTypes.func.isRequired},t.default=(0,d.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),i=r(a),s=n(21),o=n(15),l=n(602),u=r(l),d=n(601),c=r(d),f=n(91),p=n(1790),h=r(p),v=(0,o.createSelector)(u.default,function(e){return!!i.default.findWhere(e,{isDownForMaintenance:!0})}),g=(0,o.createSelector)(u.default,function(e){return!!i.default.findWhere(e,{hasFailedResources:!0})}),m=(0,o.createStructuredSelector)({outOfDateServers:c.default,isDownForMaintenance:v,hasFailedResources:g,hasPlexPass:function(e){return e.user.hasPlexPass},isUserRestricted:function(e){return!!e.user.restricted;
}}),y={onDownloadServer:f.downloadServer},b=(0,s.connect)(function(e){return m(e)},y)(h.default);t.default=b,e.exports=t.default},function(e,t,n){"use strict";function r(){return{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{children:{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{children:(0,u.default)("Go Home"),to:"#",kind:d.kinds.PRIMARY}),_owner:null},title:(0,u.default)("You must be lost"),description:(0,u.default)("We can't find the page you're looking for")
}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(30),c=n(34),f=s(c),p=n(150),h=s(p);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(7).default,l=n(19).default,u=n(11).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=d(c),p=n(33),h=d(p),v=n(31),g=d(v),m=n(268),y=d(m),b=n(2156),P=d(b),w=function(e){
function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.title,n=e.isSelected,r=l(e,["title","isSelected"]);return f.default.createElement(y.default,u({className:P.default.menuButton,isSelected:n},r),{$$typeof:o,type:"span",key:null,ref:null,props:{children:t,className:(0,h.default)(P.default.menuButtonLabel,n&&P.default.isSelected)
},_owner:null})}}]),t}(c.Component);w.propTypes={title:c.PropTypes.string.isRequired,isSelected:c.PropTypes.bool.isRequired},w.defaultProps={isSelected:!1},t.default=w,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.serverEntityID,r=e.providerEntityID,s=e.metadataListEntityID,o=e.listTitle,l=e.listType,d=e.listContext,c=e.metadataItemEntityIDs,f=e.totalSize,p=e.populatedRange,h=e.firstItemType,g=e.isPending,y=e.isPopulated,P=e.error,S=e.columnAdjustment,T=e.onPageRequest,M=f||c.length;
if(y&&M){var x=l||h,k=(0,v.default)(x,d,{providerEntityID:r});return{$$typeof:i,type:_.default,key:null,ref:null,props:a(_.default.defaultProps,{children:t,className:O.default.metadataListPageContent,scrollerClassName:O.default.metadataListScroller,listType:x,listContext:d,scrollPositionStorageKey:"MetadataListPageContent",keyPropName:"metadataItemEntityID",items:c,itemsOffset:p.start,size:M,layout:(0,m.default)(x,d,S,k.length),cellRenderer:(0,b.default)({serverEntityID:n,providerEntityID:r,metadataListEntityID:s,
listType:x,listContext:d,titleComponents:k},I.default),onPageRequest:T}),_owner:null}}return g?{$$typeof:i,type:C.default,key:null,ref:null,props:a(C.default.defaultProps,{children:{$$typeof:i,type:E.default,key:null,ref:null,props:a(E.default.defaultProps,{children:{$$typeof:i,type:w.default,key:null,ref:null,props:a(w.default.defaultProps,{label:o?(0,u.default)("Loading {1}",o):(0,u.default)("Loading list")}),_owner:null}}),_owner:null}}),_owner:null}:P?{$$typeof:i,type:C.default,key:null,ref:null,
props:a(C.default.defaultProps,{children:{$$typeof:i,type:D.default,key:null,ref:null,props:a(D.default.defaultProps,{title:o?(0,u.default)("There was an unexpected error loading {1}",o):(0,u.default)("There was an unexpected error loading this list")}),_owner:null}}),_owner:null}:{$$typeof:i,type:C.default,key:null,ref:null,props:a(C.default.defaultProps,{children:{$$typeof:i,type:E.default,key:null,ref:null,props:a(E.default.defaultProps,{title:(0,u.default)("Nothing to see here"),description:o?(0,
u.default)("There are no items in {1}",o):(0,u.default)("There are no items in this list")}),_owner:null}}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(428),c=s(d),f=n(114),p=s(f),h=n(278),v=s(h),g=n(1935),m=s(g),y=n(781),b=s(y),P=n(55),w=s(P),S=n(725),_=s(S),T=n(459),I=s(T),M=n(216),C=s(M),x=n(151),E=s(x),k=n(185),D=s(k),A=n(2161),O=s(A);r.propTypes={children:o.PropTypes.node,serverEntityID:o.PropTypes.string.isRequired,
providerEntityID:o.PropTypes.string.isRequired,metadataListEntityID:o.PropTypes.string.isRequired,listTitle:o.PropTypes.string,listType:o.PropTypes.string,listContext:o.PropTypes.string.isRequired,metadataItemEntityIDs:o.PropTypes.array.isRequired,totalSize:o.PropTypes.number,populatedRange:c.default.isRequired,firstItemType:o.PropTypes.string,isPending:o.PropTypes.bool.isRequired,isPopulated:o.PropTypes.bool.isRequired,error:o.PropTypes.object,columnAdjustment:o.PropTypes.number.isRequired,onPageRequest:o.PropTypes.func
},r.defaultProps={listContext:p.default.LIBRARY},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.className;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:t,className:n},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(2166)),l=i(o);r.propTypes={children:s.PropTypes.node,className:s.PropTypes.string},r.defaultProps={className:l.default.group},t.default=r,e.exports=t.default;
},function(e,t,n){"use strict";function r(e){var t=e.server,n=e.provider,r=e.librarySectionKey,s=e.tags,o=e.limit;return s&&s.length?{$$typeof:a,type:"span",key:null,ref:null,props:{children:s.map(function(e,l){if(!(l>=o)){var u={filters:e.filter,filterLabel:e.tag};return{$$typeof:a,type:"span",key:l,ref:null,props:{children:[{$$typeof:a,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{children:e.tag,to:(0,p.default)(t,n,r,u)}),_owner:null},l+1<o&&l+1<s.length&&", "]},_owner:null};
}})},_owner:null}:null}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(75)),u=s(l),d=n(74),c=s(d),f=n(152),p=s(f),h=n(34),v=s(h);r.propTypes={server:u.default.isRequired,provider:c.default.isRequired,librarySectionKey:o.PropTypes.string.isRequired,tags:o.PropTypes.array,limit:o.PropTypes.number},r.defaultProps={limit:1/0},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,u.createSelector)((0,
c.default)(),(0,p.default)(),(0,v.default)(),function(e,t,n){return{server:e,provider:t,librarySectionKey:n.librarySectionKey,roles:n.Role}})}function a(e){return o.default.createElement(m.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(21),u=n(15),d=n(67),c=i(d),f=n(73),p=i(f),h=n(48),v=i(h),g=n(1826),m=i(g);a.propTypes={serverEntityID:s.PropTypes.string.isRequired,providerEntityID:s.PropTypes.string.isRequired,metadataItemEntityID:s.PropTypes.string.isRequired
},t.default=(0,l.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.beginsAt,r=e.endsAt,s=e.channel;if(!n||!r)return null;var o=Date.now()/1e3,l=void 0;return l=r<o?(0,u.default)("Aired"):n<=o&&r>=o?(0,u.default)("Airing"):(0,u.default)("Airs"),{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{children:[{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{beginsAt:n,endsAt:r,channel:s,showFullTime:!0,
showChannel:!0}),_owner:null},t],label:l}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(742),c=s(d),f=n(472),p=s(f);r.propTypes={children:o.PropTypes.node,beginsAt:o.PropTypes.number,endsAt:o.PropTypes.number,channel:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,u.createSelector)((0,c.default)(),(0,p.default)(),function(e,t){return{beginsAt:e&&e.beginsAt,
endsAt:e&&e.endsAt,channel:t&&t.tag}})}function a(e){return o.default.createElement(v.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(21),u=n(15),d=n(325),c=i(d),f=n(686),p=i(f),h=n(766),v=i(h);a.propTypes={metadataItemEntityID:s.PropTypes.string.isRequired},t.default=(0,l.connect)(r)(v.default),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,m.createSelector)(function(e,t){var n=t.linkedKey;return n},(0,I.default)(),function(e,t){
var n={isLibraryProvider:!0,identifer:S.providerIdentifiers.LIBRARY_PROVIDER_IDENTIFIER};return(0,A.default)(t,n,e)})}function a(){return(0,m.createSelector)(function(e,t){var n=t.serverEntityID;return n},function(e,t){var n=t.mediaSubscriptionID;return n},function(e,t){var n=t.status;return n},r(),(0,C.default)(),(0,E.default)(),function(e,t,n,r,a,s){var o=(0,P.default)(w.MEDIA_SUBSCRIPTION,t,e),l=n===_.grabOperationStatuses.COMPLETE,u=n===_.grabOperationStatuses.ERROR,d=p.default.pick(a,"type","title","grandparentTitle","index","parentIndex","originallyAvailableAt");
return i({mediaSubscriptionEntityID:o,prePlayRoute:r,isRecording:!!s,recordingProgress:s&&s.progress,isComplete:l,hasError:u,hasSubscription:!!t,showPlay:l&&!!r},d)})}var i=n(11).default,s=n(17).default,o=n(18).default,l=n(25).default,u=n(16).default,d=n(19).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=c(f),h=n(4),v=c(h),g=n(21),m=n(15),y=n(24),b=n(66),P=c(b),w=n(72),S=n(84),_=n(579),T=n(67),I=c(T),M=n(48),C=c(M),x=n(1398),E=c(x),k=n(256),D=n(153),A=c(D),O=function(e){
function t(){u(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),l(t,[{key:"onPlayPress",decorators:[y.autobind],value:function(e){this.props.playRecording({serverEntityID:this.props.serverEntityID,linkedKey:this.props.linkedKey})}},{key:"render",value:function(){var e=this.props,t=e.component,n=(e.mediaSubscriptionID,e.status,e.linkedKey,d(e,["component","mediaSubscriptionID","status","linkedKey"]));return v.default.createElement(t,i({},n,{onPlayPress:this.onPlayPress
}))}}]),t}(h.Component);O.propTypes={serverEntityID:h.PropTypes.string.isRequired,metadataItemEntityID:h.PropTypes.string.isRequired,mediaSubscriptionID:h.PropTypes.string,component:h.PropTypes.func.isRequired,status:h.PropTypes.string.isRequired,linkedKey:h.PropTypes.string,playRecording:h.PropTypes.func.isRequired},t.default=(0,g.connect)(a,{playRecording:k.playRecording})(O),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.subscriptionCount;return{$$typeof:i,type:c.default,
key:null,ref:null,props:a(c.default.defaultProps,{icon:"plex-icon-calendar-560",title:(0,u.default)("You have no recordings scheduled"),description:1===t?(0,u.default)("There are no upcoming airings of the item in your list"):(0,u.default)("There are no upcoming airings of the {1} items in your list",t)}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(151),c=s(d);r.propTypes={subscriptionCount:o.PropTypes.number.isRequired
},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.error,n=e.onPress;return{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{children:{$$typeof:i,type:d.default,key:null,ref:null,props:a(d.default.defaultProps,{name:"plex-icon-alert-560","aria-label":t}),_owner:null},className:g.default.errorButton,component:f.default,tooltip:t,tooltipClassName:g.default.errorTooltip,tooltipAttachment:l.tooltipAttachments.MIDDLE_RIGHT,onPress:n}),_owner:null
}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(30)),u=n(36),d=s(u),c=n(34),f=s(c),p=n(455),h=s(p),v=n(2193),g=s(v);r.propTypes={error:o.PropTypes.string,onPress:o.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.startTime,n=e.endTime,r=(0,o.default)(t),i=(0,o.default)(n),s="MMMM D",l="MMMM D, YYYY",u=r.isSame(i,"day")?r.format(l):r.format(s)+" \u2013 "+i.format(l);
return{$$typeof:a,type:"span",key:null,ref:null,props:{children:u,className:d.default.title},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(53),o=i(s),l=n(4),u=(i(l),n(2196)),d=i(u);r.propTypes={startTime:l.PropTypes.string.isRequired,endTime:l.PropTypes.string.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,c.createSelector)((0,p.default)(),function(e){return o.default.pick(e.target,"title","grandparentTitle","type","year","index","parentIndex","originallyAvailableAt","thumbTranscodeUrl","grandparentThumbTranscodeUrl");
})}function a(e){return u.default.createElement(v.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(4),u=i(l),d=n(21),c=n(15),f=n(1069),p=i(f),h=n(1862),v=i(h);a.propTypes={mediaSubscriptionEntityID:l.PropTypes.string.isRequired},t.default=(0,d.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,d.createSelector)((0,f.default)(),function(e){var t=e.metadataItem;return{metadataItemEntityID:t,isMetadataItem:!!t}});
}function a(e){var t=e.component,n=i(e,["component"]);return l.default.createElement(t,n)}var i=n(19).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(21),d=n(15),c=n(209),f=s(c);a.propTypes={searchResultEntityID:o.PropTypes.string.isRequired,component:o.PropTypes.func.isRequired},t.default=(0,u.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),(0,d.default)(),(0,f.default)(),(0,h.default)(),function(e,t,n,r){
void 0===n&&(n={});var a=r||n.tagItem;return{server:e,provider:t,reasonID:n.reasonID,reason:n.reason,reasonTitle:n.reasonTitle,originalTitle:a.originalTitle,filter:a.filter,librarySectionID:a.librarySectionID,librarySectionKey:a.librarySectionKey,librarySectionType:a.librarySectionType}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(67),l=a(o),u=n(73),d=a(u),c=n(209),f=a(c),p=n(48),h=a(p),v=n(1893),g=a(v);t.default=(0,i.connect)(r)(g.default),e.exports=t.default;
},function(e,t,n){"use strict";function r(){return(0,f.createSelector)((0,h.default)(),(0,g.default)(),(0,y.default)(),function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=l.default.pick(n.tagItem,"id","tag","tagType","librarySectionType","librarySectionKey");return i({server:e,provider:t,reasonID:n.reasonID},r)})}function a(e){return d.default.createElement(P.default,e)}var i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=s(o),u=n(4),d=s(u),c=n(21),f=n(15),p=n(67),h=s(p),v=n(73),g=s(v),m=n(209),y=s(m),b=n(1896),P=s(b);
a.propTypes={searchResultEntityID:u.PropTypes.string.isRequired},t.default=(0,c.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(33)),f=u(c),p=n(5),h=u(p),v=n(31),g=u(v),m=n(36),y=u(m),b=n(2227),P=u(b),w=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return a(t,e),i(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.isConnected,r=e.isUnavailable,a=e.isSecure,i=e.isRelayed;return i?{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{className:(0,f.default)(t,P.default.warningIcon),name:"plex-icon-alert-round-560","aria-label":(0,h.default)("Indirect")}),_owner:null}:r?{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{
className:(0,f.default)(t,P.default.alertIcon),name:"plex-icon-alert-560","aria-label":(0,h.default)("Unavailable")}),_owner:null}:a&&n?{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{className:(0,f.default)(t,P.default.secureIcon),name:"plex-icon-lock-560","aria-label":(0,h.default)("Secure")}),_owner:null}:null}}]),t}(d.Component);w.propTypes={className:d.PropTypes.string,isConnected:d.PropTypes.bool,isUnavailable:d.PropTypes.bool,isSecure:d.PropTypes.bool,isRelayed:d.PropTypes.bool
},t.default=w,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.img,n=e.title,r=e.description;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:"img",key:null,ref:null,props:{className:l.default.featureImage,src:t},_owner:null},{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:"div",key:null,ref:null,props:{children:n,className:l.default.featureTitle},_owner:null},{$$typeof:a,type:"div",key:null,ref:null,props:{children:r,
className:l.default.featureDescription},_owner:null}],className:l.default.featureContainer},_owner:null}],className:l.default.feature},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(2233)),l=i(o);r.propTypes={img:s.PropTypes.string.isRequired,title:s.PropTypes.string.isRequired,description:s.PropTypes.string.isRequired},t.default=r,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="RECORDING_PRIORITY_SUBSCRIPTION";
t.RECORDING_PRIORITY_SUBSCRIPTION=n},function(e,t){"use strict";function n(e){var t=e.cellWidth,n=e.aspectRatio,r=e.titleHeight,a=void 0===r?0:r;return Math.floor(t/n+a)}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,r=void 0===n?0:n,a=e.minCellWidth,i=e.minColumns,s=void 0===i?0:i,o=e.maxColumns,l=void 0===o?1/0:o,u=e.columnAdjustment,d=void 0===u?0:u,c=Math.floor((t+r)/(a+r)),f=void 0;
return f=c<s?s:c>l?l:c,f=Math.max(f+d,1),Math.max(Math.floor((t+r)/f)-r,0)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return function(n){return o.default.createElement(t,a({},e,n))}}var a=n(11).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(4),o=i(s);e.exports=t.default},function(e,t,n){"use strict";function r(e){return!!e.provider.protocols.stream}function a(e){return!!e.provider.protocols.stream;
}function i(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.listType||e.firstItemType||"mixed",n=v[t];(0,p.default)(c.default.isArray(n),"getMetadataListActionProps: Invalid type, "+t+", provided");var r=n.reduce(function(n,r){var a=h[r];
return(0,p.default)(c.default.isFunction(a),"getMetadataListActionProps: Invalid action, "+r+", for "+t),c.default.has(e,r)?n[r]=e[r]:n[r]=a(e),n},{});return r}var u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var d=n(3),c=u(d),f=n(41),p=u(f),h={showPlayAll:r,showShuffle:a,showAddToPlaylist:i,showSync:s,showOptimize:o},v={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";var r=n(222).default,a=n(223).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(660);r(t,a(i,r));var s="isActive";t.IS_ACTIVE=s;var o="isFocused";t.IS_FOCUSED=o;var l="isDisabled";t.IS_DISABLED=l;var u="isDragging";t.IS_DRAGGING=u;var d="isDraggingBefore";t.IS_DRAGGING_BEFORE=d;var c="isDraggingAfter";t.IS_DRAGGING_AFTER=c},function(e,t,n){"use strict";
function r(e,t,n){return a({},e,n,t)}var a=n(11).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r="details",a=n.key;switch(n.type){case"photoAlbum":case"show":case"episode":case"movie":case"album":case"artist":r="details",a=n.key;break;case"track":case"photo":r="details",a=n.parentKey;break;case"playlist":r="playlist",a=n.ratingKey}if("photo"===n.type)if(n.parentKey)r="details",
a=n.parentKey;else{if(!n.librarySectionID)return null;r="section",a=n.librarySectionID}return(0,s.default)(e,t,a,null,r)}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(153),s=a(i);e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(204),i=r(a),s=n(221),o=r(s),l=n(2236),u=r(l),d=(0,i.default)(o.default.slowSpeed),c={transitionName:u.default,transitionAppear:!0,transitionAppearTimeout:d,
transitionEnterTimeout:d,transitionLeaveTimeout:2*d};t.default=c,e.exports=t.default},function(e,t,n){e.exports={"default":n(1954),__esModule:!0}},function(e,t,n){e.exports={"default":n(1961),__esModule:!0}},function(e,t,n){e.exports={"default":n(1963),__esModule:!0}},function(e,t,n){var r=n(489),a=n(128)("toStringTag"),i="Arguments"==r(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))[a])?n:i?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s;
}},function(e,t,n){e.exports=!n(347)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(280),a=n(87).getNames,i={}.toString,s="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return a(e)}catch(t){return s.slice()}};e.exports.get=function(e){return s&&"[object Window]"==i.call(e)?o(e):a(r(e))}},,function(e,t,n){"use strict";var r=n(795),a=n(127),i=n(796),s=n(493),o=n(492),l=n(225),u=n(1975),d=n(497),c=n(87).getProto,f=n(128)("iterator"),p=!([].keys&&"next"in[].keys()),h="@@iterator",v="keys",g="values",m=function(){
return this};e.exports=function(e,t,n,y,b,P,w){u(n,t,y);var S,_,T=function(e){if(!p&&e in x)return x[e];switch(e){case v:return function(){return new n(this,e)};case g:return function(){return new n(this,e)}}return function(){return new n(this,e)}},I=t+" Iterator",M=b==g,C=!1,x=e.prototype,E=x[f]||x[h]||b&&x[b],k=E||T(b);if(E){var D=c(k.call(new e));d(D,I,!0),!r&&o(x,h)&&s(D,f,m),M&&E.name!==g&&(C=!0,k=function(){return E.call(this)})}if(r&&!w||!p&&!C&&x[f]||s(x,f,k),l[t]=k,l[I]=m,b)if(S={values:M?k:T(g),
keys:P?k:T(v),entries:M?T("entries"):k},w)for(_ in S)_ in x||i(x,_,S[_]);else a(a.P+a.F*(p||C),t,S);return S}},function(e,t){e.exports=!0},function(e,t,n){e.exports=n(493)},function(e,t,n){var r=n(348),a="__core-js_shared__",i=r[a]||(r[a]={});e.exports=function(e){return i[e]||(i[e]={})}},809,281,function(e,t,n){var r=n(790),a=n(128)("iterator"),i=n(225);e.exports=n(106).getIteratorMethod=function(e){if(void 0!=e)return e[a]||e["@@iterator"]||i[r(e)]}},function(e,t,n){n(1986);var r=n(225);r.NodeList=r.HTMLCollection=r.Array;
},,,,,,,,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return e&&e.constructor===Symbol?"symbol":typeof e}function s(e){f.default("function"==typeof e.canDrag,"Expected canDrag to be a function."),f.default("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),f.default("function"==typeof e.endDrag,"Expected endDrag to be a function.")}
function o(e){f.default("function"==typeof e.canDrop,"Expected canDrop to be a function."),f.default("function"==typeof e.hover,"Expected hover to be a function."),f.default("function"==typeof e.drop,"Expected beginDrag to be a function.")}function l(e,t){return t&&h.default(e)?void e.forEach(function(e){return l(e,!1)}):void f.default("string"==typeof e||"symbol"===("undefined"==typeof e?"undefined":i(e)),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.");
}function u(e){var t=g.default().toString();switch(e){case P.SOURCE:return"S"+t;case P.TARGET:return"T"+t;default:f.default(!1,"Unknown role: "+e)}}function d(e){switch(e[0]){case"S":return P.SOURCE;case"T":return P.TARGET;default:f.default(!1,"Cannot parse handler ID: "+e)}}t.__esModule=!0;var c=n(88),f=r(c),p=n(189),h=r(p),v=n(2034),g=r(v),m=n(355),y=n(901),b=r(y),P={SOURCE:"SOURCE",TARGET:"TARGET"},w=function(){function e(t){a(this,e),this.store=t,this.types={},this.handlers={},this.pinnedSourceId=null,
this.pinnedSource=null}return e.prototype.addSource=function(e,t){l(e),s(t);var n=this.addHandler(P.SOURCE,e,t);return this.store.dispatch(m.addSource(n)),n},e.prototype.addTarget=function(e,t){l(e,!0),o(t);var n=this.addHandler(P.TARGET,e,t);return this.store.dispatch(m.addTarget(n)),n},e.prototype.addHandler=function(e,t,n){var r=u(e);return this.types[r]=t,this.handlers[r]=n,r},e.prototype.containsHandler=function(e){var t=this;return Object.keys(this.handlers).some(function(n){return t.handlers[n]===e;
})},e.prototype.getSource=function(e,t){f.default(this.isSourceId(e),"Expected a valid source ID.");var n=t&&e===this.pinnedSourceId,r=n?this.pinnedSource:this.handlers[e];return r},e.prototype.getTarget=function(e){return f.default(this.isTargetId(e),"Expected a valid target ID."),this.handlers[e]},e.prototype.getSourceType=function(e){return f.default(this.isSourceId(e),"Expected a valid source ID."),this.types[e]},e.prototype.getTargetType=function(e){return f.default(this.isTargetId(e),"Expected a valid target ID."),
this.types[e]},e.prototype.isSourceId=function(e){var t=d(e);return t===P.SOURCE},e.prototype.isTargetId=function(e){var t=d(e);return t===P.TARGET},e.prototype.removeSource=function(e){var t=this;f.default(this.getSource(e),"Expected an existing source."),this.store.dispatch(m.removeSource(e)),b.default(function(){delete t.handlers[e],delete t.types[e]})},e.prototype.removeTarget=function(e){var t=this;f.default(this.getTarget(e),"Expected an existing target."),this.store.dispatch(m.removeTarget(e)),
b.default(function(){delete t.handlers[e],delete t.types[e]})},e.prototype.pinSource=function(e){var t=this.getSource(e);f.default(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t},e.prototype.unpinSource=function(){f.default(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null},e}();t.default=w,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,n){switch(void 0===e&&(e=f),
t.type){case d.HOVER:break;case c.ADD_SOURCE:case c.ADD_TARGET:case c.REMOVE_TARGET:case c.REMOVE_SOURCE:return f;case d.BEGIN_DRAG:case d.PUBLISH_DRAG_SOURCE:case d.END_DRAG:case d.DROP:default:return p}var r=t.targetIds,a=n.targetIds,i=o.default(r,a),s=!1;if(0===i.length){for(var l=0;l<r.length;l++)if(r[l]!==a[l]){s=!0;break}}else s=!0;if(!s)return f;var u=a[a.length-1],h=r[r.length-1];return u!==h&&(u&&i.push(u),h&&i.push(h)),i}function i(e,t){return e!==f&&(e===p||"undefined"==typeof t||u.default(t,e).length>0);
}t.__esModule=!0,t.default=a,t.areDirty=i;var s=n(2600),o=r(s),l=n(2595),u=r(l),d=n(354),c=n(355),f=[],p=[]},function(e,t,n){"use strict";function r(e,t){return e===t||e&&t&&e.x===t.x&&e.y===t.y}function a(e,t){switch(void 0===e&&(e=u),t.type){case l.BEGIN_DRAG:return{initialSourceClientOffset:t.sourceClientOffset,initialClientOffset:t.clientOffset,clientOffset:t.clientOffset};case l.HOVER:return r(e.clientOffset,t.clientOffset)?e:o({},e,{clientOffset:t.clientOffset});case l.END_DRAG:case l.DROP:
return u;default:return e}}function i(e){var t=e.clientOffset,n=e.initialClientOffset,r=e.initialSourceClientOffset;return t&&n&&r?{x:t.x+r.x-n.x,y:t.y+r.y-n.y}:null}function s(e){var t=e.clientOffset,n=e.initialClientOffset;return t&&n?{x:t.x-n.x,y:t.y-n.y}:null}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=a,t.getSourceClientOffset=i,t.getDifferenceFromInitialOffset=s;
var l=n(354),u={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){return s.default(e)?e.some(function(e){return e===t}):e===t}t.__esModule=!0,t.default=a;var i=n(189),s=r(i);e.exports=t.default},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 r=n(97),a={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:r}},registerDefault:function(){}};e.exports=a},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 r(e){return s?void 0:i(!1),f.hasOwnProperty(e)||(e="*"),o.hasOwnProperty(e)||("*"===e?s.innerHTML="<link />":s.innerHTML="<"+e+"></"+e+">",o[e]=!s.firstChild),o[e]?f[e]:null}var a=n(80),i=n(39),s=a.canUseDOM?document.createElement("div"):null,o={},l=[1,'<select multiple="true">',"</select>"],u=[1,"<table>","</table>"],d=[3,"<table><tbody><tr>","</tr></tbody></table>"],c=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],f={
"*":[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:d,th:d},p=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];p.forEach(function(e){f[e]=c,
o[e]=!0}),e.exports=r},function(e,t){"use strict";function n(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function r(e,t){if(n(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var s=0;s<r.length;s++)if(!a.call(t,r[s])||!n(e[r[s]],t[r[s]]))return!1;return!0}var a=Object.prototype.hasOwnProperty;e.exports=r},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
function s(e,t){var r="";return r+=' <li><a class="btn-gray change-pane-btn general-btn" data-pane="general" href="#"> <i class="modal-nav-icon glyphicon align-center"></i> '+g(n(2).call(e,"General",{hash:{},data:t}))+" </a></li> "}function o(e,t){var r="";return r+=' <li><a class="btn-gray change-pane-btn tags-btn" data-pane="tags" href="#"> <i class="modal-nav-icon glyphicon tags"></i> '+g(n(2).call(e,"Tags",{hash:{},data:t}))+" </a></li> "}function l(e,t){var r="";return r+=' <li><a class="btn-gray change-pane-btn sharing-btn" data-pane="sharing" href="#"> <i class="modal-nav-icon glyphicon parents"></i> '+g(n(2).call(e,"Sharing",{
hash:{},data:t}))+" </a></li> "}function u(e,t){var r="";return r+=' <li><a class="btn-gray change-pane-btn poster-btn" data-pane="poster" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+g(n(2).call(e,"Poster",{hash:{},data:t}))+" </a></li> "}function d(e,t){var r="";return r+=' <li><a class="btn-gray change-pane-btn banner-btn" data-pane="banner" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+g(n(2).call(e,"Banner",{hash:{},data:t}))+" </a></li> "}function c(e,t){var r="";
return r+=' <li><a class="btn-gray change-pane-btn art-btn" data-pane="art" href="#"> <i class="modal-nav-icon glyphicon picture"></i> '+g(n(2).call(e,"Background",{hash:{},data:t}))+" </a></li> "}function f(e,t){var r="";return r+=' <li><a class="btn-gray change-pane-btn info-btn" data-pane="info" href="#"> <i class="modal-nav-icon glyphicon circle-info"></i> '+g(n(2).call(e,"Info",{hash:{},data:t}))+" </a></li> "}function p(e,t){var r="";return r+=' <li><a class="btn-gray change-pane-btn advanced-btn" data-pane="advanced" href="#"> <i class="modal-nav-icon glyphicon cogwheel"></i> '+g(n(2).call(e,"Advanced",{
hash:{},data:t}))+" </a></li> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var h,v="",g=this.escapeExpression,m="function",y=this;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 pencil"></i> ',h=t&&t.paneTitle,h=typeof h===m?h.apply(t):h,(h||0===h)&&(v+=h),v+='</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"> ',
h=r.if.call(t,(h=t&&t.panes,null==h||h===!1?h:h.general),{hash:{},inverse:y.noop,fn:y.program(1,s,i),data:i}),(h||0===h)&&(v+=h),v+=" ",h=r.if.call(t,(h=t&&t.panes,null==h||h===!1?h:h.tags),{hash:{},inverse:y.noop,fn:y.program(3,o,i),data:i}),(h||0===h)&&(v+=h),v+=" ",h=r.if.call(t,(h=t&&t.panes,null==h||h===!1?h:h.sharing),{hash:{},inverse:y.noop,fn:y.program(5,l,i),data:i}),(h||0===h)&&(v+=h),v+=" ",h=r.if.call(t,(h=t&&t.panes,null==h||h===!1?h:h.poster),{hash:{},inverse:y.noop,fn:y.program(7,u,i),
data:i}),(h||0===h)&&(v+=h),v+=" ",h=r.if.call(t,(h=t&&t.panes,null==h||h===!1?h:h.banner),{hash:{},inverse:y.noop,fn:y.program(9,d,i),data:i}),(h||0===h)&&(v+=h),v+=" ",h=r.if.call(t,(h=t&&t.panes,null==h||h===!1?h:h.art),{hash:{},inverse:y.noop,fn:y.program(11,c,i),data:i}),(h||0===h)&&(v+=h),v+=" ",h=r.if.call(t,(h=t&&t.panes,null==h||h===!1?h:h.info),{hash:{},inverse:y.noop,fn:y.program(13,f,i),data:i}),(h||0===h)&&(v+=h),v+=" ",h=r.if.call(t,(h=t&&t.panes,null==h||h===!1?h:h.advanced),{hash:{},
inverse:y.noop,fn:y.program(15,p,i),data:i}),(h||0===h)&&(v+=h),v+=' </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">'+g(n(2).call(t,"Cancel",{hash:{},data:i}))+'</button> <button type="button" class="save-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+g(n(2).call(t,"Save Changes",{
hash:{},data:i}))+"</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){(function(n){var r={},a="undefined"!=typeof e&&e.exports&&"undefined"!=typeof n?n:this||r;(a._gsQueue||(a._gsQueue=[])).push(function(){"use strict";a._gsDefine("easing.Back",["easing.Ease"],function(e){var t,n,r,i=a.GreenSockGlobals||a,s=i.com.greensock,o=2*Math.PI,l=Math.PI/2,u=s._class,d=function(t,n){
var r=u("easing."+t,function(){},!0),a=r.prototype=new e;return a.constructor=r,a.getRatio=n,r},c=e.register||function(){},f=function(e,t,n,r,a){var i=u("easing."+e,{easeOut:new t,easeIn:new n,easeInOut:new r},!0);return c(i,e),i},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)},h=function(t,n){var r=u("easing."+t,function(e){this._p1=e||0===e?e:1.70158,this._p2=1.525*this._p1},!0),a=r.prototype=new e;return a.constructor=r,a.getRatio=n,a.config=function(e){
return new r(e)},r},v=f("Back",h("BackOut",function(e){return(e-=1)*e*((this._p1+1)*e+this._p1)+1}),h("BackIn",function(e){return e*e*((this._p1+1)*e-this._p1)}),h("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)})),g=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),m=g.prototype=new e;return m.constructor=g,m.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},g.ease=new g(.7,.7),m.config=g.config=function(e,t,n){return new g(e,t,n)},t=u("easing.SteppedEase",function(e){e=e||1,this._p1=1/e,this._p2=e+1},!0),m=t.prototype=new e,m.constructor=t,m.getRatio=function(e){return e<0?e=0:e>=1&&(e=.999999999),(this._p2*e>>0)*this._p1},m.config=t.config=function(e){
return new t(e)},n=u("easing.RoughEase",function(t){t=t||{};for(var n,r,a,i,s,o,l=t.taper||"none",u=[],d=0,c=0|(t.points||20),f=c,h=t.randomize!==!1,v=t.clamp===!0,g=t.template instanceof e?t.template:null,m="number"==typeof t.strength?.4*t.strength:.4;--f>-1;)n=h?Math.random():1/c*f,r=g?g.getRatio(n):n,"none"===l?a=m:"out"===l?(i=1-n,a=i*i*m):"in"===l?a=n*n*m:n<.5?(i=2*n,a=i*i*.5*m):(i=2*(1-n),a=i*i*.5*m),h?r+=Math.random()*a-.5*a:f%2?r+=.5*a:r-=.5*a,v&&(r>1?r=1:r<0&&(r=0)),u[d++]={x:n,y:r};for(u.sort(function(e,t){
return e.x-t.x}),o=new p(1,1,null),f=c;--f>-1;)s=u[f],o=new p(s.x,s.y,o);this._prev=new p(0,0,0!==o.t?o:o.next)},!0),m=n.prototype=new e,m.constructor=n,m.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},m.config=function(e){return new n(e)},n.ease=new n,f("Bounce",d("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;
}),d("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)}),d("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})),f("Circ",d("CircOut",function(e){return Math.sqrt(1-(e-=1)*e)}),d("CircIn",function(e){return-(Math.sqrt(1-e*e)-1);
}),d("CircInOut",function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)})),r=function(t,n,r){var a=u("easing."+t,function(e,t){this._p1=e>=1?e:1,this._p2=(t||r)/(e<1?e:1),this._p3=this._p2/o*(Math.asin(1/this._p1)||0),this._p2=o/this._p2},!0),i=a.prototype=new e;return i.constructor=a,i.getRatio=n,i.config=function(e,t){return new a(e,t)},a},f("Elastic",r("ElasticOut",function(e){return this._p1*Math.pow(2,-10*e)*Math.sin((e-this._p3)*this._p2)+1},.3),r("ElasticIn",function(e){
return-(this._p1*Math.pow(2,10*(e-=1))*Math.sin((e-this._p3)*this._p2))},.3),r("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)),f("Expo",d("ExpoOut",function(e){return 1-Math.pow(2,-10*e)}),d("ExpoIn",function(e){return Math.pow(2,10*(e-1))-.001}),d("ExpoInOut",function(e){return(e*=2)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*(e-1)))})),f("Sine",d("SineOut",function(e){
return Math.sin(e*l)}),d("SineIn",function(e){return-Math.cos(e*l)+1}),d("SineInOut",function(e){return-.5*(Math.cos(Math.PI*e)-1)})),u("easing.EaseLookup",{find:function(t){return e.map[t]}},!0),c(i.SlowMo,"SlowMo","ease,"),c(n,"RoughEase","ease,"),c(t,"SteppedEase","ease,"),v},!0)}),a._gsDefine&&a._gsQueue.pop()(),t.Power1=Power1,t.Power2=Power2,t.Power3=Power3}).call(t,function(){return this}())},function(e,t,n){var r,a;(function(i){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(i,s){"use strict";var o=i.GreenSockGlobals=i.GreenSockGlobals||i;if(!o.TweenLite){var l,u,d,c,f,p=function(e){var t,n=e.split("."),r=o;for(t=0;t<n.length;t++)r[n[t]]=r=r[n[t]]||{};return r},h=p("com.greensock"),v=1e-10,g=function(e){var t,n=[],r=e.length;for(t=0;t!==r;n.push(e[t++]));return n},m=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={},P=function(i,l,u,d){
this.sc=b[i]?b[i].sc:[],b[i]=this,this.gsClass=null,this.func=u;var c=[];this.check=function(f){for(var h,v,g,m,y,w=l.length,S=w;--w>-1;)(h=b[l[w]]||new P(l[w],[])).gsClass?(c[w]=h.gsClass,S--):f&&h.sc.push(this);if(0===S&&u)for(v=("com.greensock."+i).split("."),g=v.pop(),m=p(v.join("."))[g]=this.gsClass=u.apply(u,c),d&&(o[g]=m,y="undefined"!=typeof e&&e.exports,!y&&n(2714)?(r=[],a=function(){return m}.apply(t,r),!(void 0!==a&&(e.exports=a))):i===s&&y&&(e.exports=m)),w=0;w<this.sc.length;w++)this.sc[w].check();
},this.check(!0)},w=i._gsDefine=function(e,t,n,r){return new P(e,t,n,r)},S=h._class=function(e,t,n){return t=t||function(){},w(e,[],function(){return t},n),t};w.globals=o;var _=[0,0,1,1],T=[],I=S("easing.Ease",function(e,t,n,r){this._func=e,this._type=n||0,this._power=r||0,this._params=t?_.concat(t):_},!0),M=I.map={},C=I.register=function(e,t,n,r){for(var a,i,s,o,l=t.split(","),u=l.length,d=(n||"easeIn,easeOut,easeInOut").split(",");--u>-1;)for(i=l[u],a=r?S("easing."+i,null,!0):h.easing[i]||{},s=d.length;--s>-1;)o=d[s],
M[i+"."+o]=M[o+i]=a[o]=e.getRatio?e:e[o]||new e};for(d=I.prototype,d._calcEnd=!1,d.getRatio=function(e){if(this._func)return this._params[0]=e,this._func.apply(null,this._params);var t=this._type,n=this._power,r=1===t?1-e:2===t?e:e<.5?2*e:2*(1-e);return 1===n?r*=r:2===n?r*=r*r:3===n?r*=r*r*r:4===n&&(r*=r*r*r*r),1===t?1-r:2===t?r:e<.5?r/2:1-r/2},l=["Linear","Quad","Cubic","Quart","Quint,Strong"],u=l.length;--u>-1;)d=l[u]+",Power"+u,C(new I(null,null,1,u),d,"easeOut",!0),C(new I(null,null,2,u),d,"easeIn"+(0===u?",easeNone":"")),
C(new I(null,null,3,u),d,"easeInOut");M.linear=h.easing.Linear.easeIn,M.swing=h.easing.Quad.easeInOut;var x=S("events.EventDispatcher",function(e){this._listeners={},this._eventTarget=e||this});d=x.prototype,d.addEventListener=function(e,t,n,r,a){a=a||0;var i,s,o=this._listeners[e],l=0;for(null==o&&(this._listeners[e]=o=[]),s=o.length;--s>-1;)i=o[s],i.c===t&&i.s===n?o.splice(s,1):0===l&&i.pr<a&&(l=s+1);o.splice(l,0,{c:t,s:n,up:r,pr:a}),this!==c||f||c.wake()},d.removeEventListener=function(e,t){var n,r=this._listeners[e];
if(r)for(n=r.length;--n>-1;)if(r[n].c===t)return void r.splice(n,1)},d.dispatchEvent=function(e){var t,n,r,a=this._listeners[e];if(a)for(t=a.length,n=this._eventTarget;--t>-1;)r=a[t],r&&(r.up?r.c.call(r.s||n,{type:e,target:n}):r.c.call(r.s||n))};var E=i.requestAnimationFrame,k=i.cancelAnimationFrame,D=Date.now||function(){return(new Date).getTime()},A=D();for(l=["ms","moz","webkit","o"],u=l.length;--u>-1&&!E;)E=i[l[u]+"RequestAnimationFrame"],k=i[l[u]+"CancelAnimationFrame"]||i[l[u]+"CancelRequestAnimationFrame"];
S("Ticker",function(e,t){var n,r,a,i,s,o=this,l=D(),u=!(t===!1||!E)&&"auto",d=500,p=33,h="tick",g=function(e){var t,u,c=D()-A;c>d&&(l+=c-p),A+=c,o.time=(A-l)/1e3,t=o.time-s,(!n||t>0||e===!0)&&(o.frame++,s+=t+(t>=i?.004:i-t),u=!0),e!==!0&&(a=r(g)),u&&o.dispatchEvent(h)};x.call(o),o.time=o.frame=0,o.tick=function(){g(!0)},o.lagSmoothing=function(e,t){d=e||1/v,p=Math.min(t,d,0)},o.sleep=function(){null!=a&&(u&&k?k(a):clearTimeout(a),r=m,a=null,o===c&&(f=!1))},o.wake=function(e){null!==a?o.sleep():e?l+=-A+(A=D()):o.frame>10&&(A=D()-d+5),
r=0===n?m:u&&E?E:function(e){return setTimeout(e,1e3*(s-o.time)+1|0)},o===c&&(f=!0),g(2)},o.fps=function(e){return arguments.length?(n=e,i=1/(n||60),s=this.time+i,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)}),d=h.Ticker.prototype=new h.events.EventDispatcher,d.constructor=h.Ticker;var O=S("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,Z){f||c.wake();var n=this.vars.useFrames?X:Z;n.add(this,n._time),this.vars.paused&&this.paused(!0)}});c=O.ticker=new h.Ticker,d=O.prototype,d._dirty=d._gc=d._initted=d._paused=!1,d._totalTime=d._time=0,d._rawPrevTime=-1,d._next=d._last=d._onUpdate=d._timeline=d.timeline=null,d._paused=!1;var R=function(){f&&D()-A>2e3&&c.wake(),
setTimeout(R,2e3)};R(),d.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},d.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},d.resume=function(e,t){return null!=e&&this.seek(e,t),this.paused(!1)},d.seek=function(e,t){return this.totalTime(Number(e),t!==!1)},d.restart=function(e,t){return this.reversed(!1).paused(!1).totalTime(e?-this._delay:0,t!==!1,!0)},d.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1);
},d.render=function(e,t,n){},d.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,!this._gc&&this.timeline||this._enabled(!0),this},d.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},d._enabled=function(e,t){return f||c.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},d._kill=function(e,t){return this._enabled(!1,!1)},d.kill=function(e,t){return this._kill(e,t),this},d._uncache=function(e){for(var t=e?this:this.timeline;t;)t._dirty=!0,t=t.timeline;return this},d._swapSelfInParams=function(e){for(var t=e.length,n=e.concat();--t>-1;)"{self}"===e[t]&&(n[t]=this);return n},d._callback=function(e){var t=this.vars;t[e].apply(t[e+"Scope"]||t.callbackScope||this,t[e+"Params"]||T)},d.eventCallback=function(e,t,n,r){if("on"===(e||"").substr(0,2)){var a=this.vars;if(1===arguments.length)return a[e];
null==t?delete a[e]:(a[e]=t,a[e+"Params"]=y(n)&&n.join("").indexOf("{self}")!==-1?this._swapSelfInParams(n):n,a[e+"Scope"]=r),"onUpdate"===e&&(this._onUpdate=t)}return this},d.delay=function(e){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+e-this._delay),this._delay=e,this):this._delay},d.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)},d.totalDuration=function(e){return this._dirty=!1,arguments.length?this.duration(e):this._totalDuration},d.time=function(e,t){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(e>this._duration?this._duration:e,t)):this._time},d.totalTime=function(e,t,n){if(f||c.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(e<0&&!n&&(e+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var r=this._totalDuration,a=this._timeline;
if(e>r&&!n&&(e=r),this._startTime=(this._paused?this._pauseTime:a._time)-(this._reversed?r-e:e)/this._timeScale,a._dirty||this._uncache(!1),a._timeline)for(;a._timeline;)a._timeline._time!==(a._startTime+a._totalTime)/a._timeScale&&a.totalTime(a._totalTime,!0),a=a._timeline}this._gc&&this._enabled(!0,!1),this._totalTime===e&&0!==this._duration||($.length&&ee(),this.render(e,t,!1),$.length&&ee())}return this},d.progress=d.totalProgress=function(e,t){var n=this.duration();return arguments.length?this.totalTime(n*e,t):n?this._time/n:this.ratio;
},d.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},d.endTime=function(e){return this._startTime+(0!=e?this.totalDuration():this.duration())/this._timeScale},d.timeScale=function(e){if(!arguments.length)return this._timeScale;if(e=e||v,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)},d.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},d.paused=function(e){if(!arguments.length)return this._paused;var t,n,r=this._timeline;return e!=this._paused&&r&&(f||e||c.wake(),t=r.rawTime(),n=t-this._pauseTime,!e&&r.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=r.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=S("core.SimpleTimeline",function(e){O.call(this,0,e),this.autoRemoveChildren=this.smoothChildTiming=!0});d=L.prototype=new O,d.constructor=L,d.kill()._gc=!1,d._first=d._last=d._recent=null,d._sortChildren=!1,d.add=d.insert=function(e,t,n,r){
var a,i;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),a=this._last,this._sortChildren)for(i=e._startTime;a&&a._startTime>i;)a=a._prev;return a?(e._next=a._next,a._next=e):(e._next=this._first,this._first=e),e._next?e._next._prev=e:this._last=e,e._prev=a,this._recent=e,this._timeline&&this._uncache(!0),this},d._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},d.render=function(e,t,n){var r,a=this._first;for(this._totalTime=this._time=this._rawPrevTime=e;a;)r=a._next,(a._active||e>=a._startTime&&!a._paused)&&(a._reversed?a.render((a._dirty?a.totalDuration():a._totalDuration)-(e-a._startTime)*a._timeScale,t,n):a.render((e-a._startTime)*a._timeScale,t,n)),
a=r},d.rawTime=function(){return f||c.wake(),this._totalTime};var N=S("TweenLite",function(e,t,n){if(O.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 r,a,s,o=e.jquery||e.length&&e!==i&&e[0]&&(e[0]===i||e[0].nodeType&&e[0].style&&!e.nodeType),l=this.vars.overwrite;if(this._overwrite=l=null==l?K[N.defaultOverwrite]:"number"==typeof l?l>>0:K[l],(o||e instanceof Array||e.push&&y(e))&&"number"!=typeof e[0])for(this._targets=s=g(e),
this._propLookup=[],this._siblings=[],r=0;r<s.length;r++)a=s[r],a?"string"!=typeof a?a.length&&a!==i&&a[0]&&(a[0]===i||a[0].nodeType&&a[0].style&&!a.nodeType)?(s.splice(r--,1),this._targets=s=s.concat(g(a))):(this._siblings[r]=te(a,this,!1),1===l&&this._siblings[r].length>1&&re(a,this,null,1,this._siblings[r])):(a=s[r--]=N.selector(a),"string"==typeof a&&s.splice(r+1,1)):s.splice(r--,1);else this._propLookup={},this._siblings=te(e,this,!1),1===l&&this._siblings.length>1&&re(e,this,null,1,this._siblings);
(this.vars.immediateRender||0===t&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-v,this.render(-this._delay))},!0),j=function(e){return e&&e.length&&e!==i&&e[0]&&(e[0]===i||e[0].nodeType&&e[0].style&&!e.nodeType)},U=function(e,t){var n,r={};for(n in e)Q[n]||n in t&&"transform"!==n&&"x"!==n&&"y"!==n&&"width"!==n&&"height"!==n&&"className"!==n&&"border"!==n||!(!W[n]||W[n]&&W[n]._autoCSS)||(r[n]=e[n],delete e[n]);e.css=r};d=N.prototype=new O,d.constructor=N,d.kill()._gc=!1,d.ratio=0,
d._firstPT=d._targets=d._overwrittenProps=d._startAt=null,d._notifyPluginsOfEnabled=d._lazy=!1,N.version="1.18.1",N.defaultEase=d._ease=new I(null,null,1,1),N.defaultOverwrite="auto",N.ticker=c,N.autoSleep=120,N.lagSmoothing=function(e,t){c.lagSmoothing(e,t)},N.selector=i.$||i.jQuery||function(e){var t=i.$||i.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 $=[],z={},F=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,B=function(e){
for(var t,n=this._firstPT,r=1e-6;n;)t=n.blob?e?this.join(""):this.start:n.c*e+n.s,n.r?t=Math.round(t):t<r&&t>-r&&(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},V=function(e,t,n,r){var a,i,s,o,l,u,d,c=[e,t],f=0,p="",h=0;for(c.start=e,n&&(n(c),e=c[0],t=c[1]),c.length=0,a=e.match(F)||[],i=t.match(F)||[],r&&(r._next=null,r.blob=1,c._firstPT=r),l=i.length,o=0;o<l;o++)d=i[o],u=t.substr(f,t.indexOf(d,f)-f),p+=u||!o?u:",",f+=u.length,h?h=(h+1)%5:"rgba("===u.substr(-5)&&(h=1),d===a[o]||a.length<=o?p+=d:(p&&(c.push(p),
p=""),s=parseFloat(a[o]),c.push(s),c._firstPT={_next:c._firstPT,t:c,p:c.length-1,s:s,c:("="===d.charAt(1)?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-s)||0,f:0,r:h&&h<4}),f+=d.length;return p+=t.substr(f),p&&c.push(p),c.setRatio=B,c},H=function(e,t,n,r,a,i,s,o){var l,u,d="get"===n?e[t]:n,c=typeof e[t],f="string"==typeof r&&"="===r.charAt(1),p={t:e,p:t,s:d,f:"function"===c,pg:0,n:a||t,r:i,pr:0,c:f?parseInt(r.charAt(0)+"1",10)*parseFloat(r.substr(2)):parseFloat(r)-d||0};if("number"!==c&&("function"===c&&"get"===n&&(u=t.indexOf("set")||"function"!=typeof e["get"+t.substr(3)]?t:"get"+t.substr(3),
p.s=d=s?e[u](s):e[u]()),"string"==typeof d&&(s||isNaN(d))?(p.fp=s,l=V(d,r,o||N.defaultStringFilter,p),p={t:l,p:"setRatio",s:0,c:1,f:2,pg:0,n:a||t,pr:0}):f||(p.s=parseFloat(d),p.c=parseFloat(r)-p.s||0)),p.c)return(p._next=this._firstPT)&&(p._next._prev=p),this._firstPT=p,p},q=N._internals={isArray:y,isSelector:j,lazyTweens:$,blobDif:V},W=N._plugins={},G=q.tweenLookup={},Y=0,Q=q.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},K={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},X=O._rootFramesTimeline=new L,Z=O._rootTimeline=new L,J=30,ee=q.lazyRender=function(){
var e,t=$.length;for(z={};--t>-1;)e=$[t],e&&e._lazy!==!1&&(e.render(e._lazy[0],e._lazy[1],!0),e._lazy=!1);$.length=0};Z._startTime=c.time,X._startTime=c.frame,Z._active=X._active=!0,setTimeout(ee,1),O._updateRoot=N.render=function(){var e,t,n;if($.length&&ee(),Z.render((c.time-Z._startTime)*Z._timeScale,!1,!1),X.render((c.frame-X._startTime)*X._timeScale,!1,!1),$.length&&ee(),c.frame>=J){J=c.frame+(parseInt(N.autoSleep,10)||120);for(n in G){for(t=G[n].tweens,e=t.length;--e>-1;)t[e]._gc&&t.splice(e,1);
0===t.length&&delete G[n]}if(n=Z._first,(!n||n._paused)&&N.autoSleep&&!X._first&&1===c._listeners.tick.length){for(;n&&n._paused;)n=n._next;n||c.sleep()}}},c.addEventListener("tick",O._updateRoot);var te=function(e,t,n){var r,a,i=e._gsTweenID;if(G[i||(e._gsTweenID=i="t"+Y++)]||(G[i]={target:e,tweens:[]}),t&&(r=G[i].tweens,r[a=r.length]=t,n))for(;--a>-1;)r[a]===t&&r.splice(a,1);return G[i].tweens},ne=function(e,t,n,r){var a,i,s=e.vars.onOverwrite;return s&&(a=s(e,t,n,r)),s=N.onOverwrite,s&&(i=s(e,t,n,r)),
a!==!1&&i!==!1},re=function(e,t,n,r,a){var i,s,o,l;if(1===r||r>=4){for(l=a.length,i=0;i<l;i++)if((o=a[i])!==t)o._gc||o._kill(null,e,t)&&(s=!0);else if(5===r)break;return s}var u,d=t._startTime+v,c=[],f=0,p=0===t._duration;for(i=a.length;--i>-1;)(o=a[i])===t||o._gc||o._paused||(o._timeline!==t._timeline?(u=u||ae(t,0,p),0===ae(o,u,p)&&(c[f++]=o)):o._startTime<=d&&o._startTime+o.totalDuration()/o._timeScale>d&&((p||!o._initted)&&d-o._startTime<=2e-10||(c[f++]=o)));for(i=f;--i>-1;)if(o=c[i],2===r&&o._kill(n,e,t)&&(s=!0),
2!==r||!o._firstPT&&o._initted){if(2!==r&&!ne(o,t))continue;o._enabled(!1,!1)&&(s=!0)}return s},ae=function(e,t,n){for(var r=e._timeline,a=r._timeScale,i=e._startTime;r._timeline;){if(i+=r._startTime,a*=r._timeScale,r._paused)return-100;r=r._timeline}return i/=a,i>t?i-t:n&&i===t||!e._initted&&i-t<2*v?v:(i+=e.totalDuration()/e._timeScale/a)>t+v?0:i-t-v};d._init=function(){var e,t,n,r,a,i=this.vars,s=this._overwrittenProps,o=this._duration,l=!!i.immediateRender,u=i.ease;if(i.startAt){this._startAt&&(this._startAt.render(-1,!0),
this._startAt.kill()),a={};for(r in i.startAt)a[r]=i.startAt[r];if(a.overwrite=!1,a.immediateRender=!0,a.lazy=l&&i.lazy!==!1,a.startAt=a.delay=null,this._startAt=N.to(this.target,0,a),l)if(this._time>0)this._startAt=null;else if(0!==o)return}else if(i.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(r in i)Q[r]&&"autoCSS"!==r||(n[r]=i[r]);if(n.overwrite=0,n.data="isFromStart",n.lazy=l&&i.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 I?u:"function"==typeof u?new I(u,i.easeParams):M[u]||N.defaultEase:N.defaultEase,i.easeParams instanceof Array&&u.config&&(this._ease=u.config.apply(u,i.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)),i.runBackwards)for(n=this._firstPT;n;)n.s+=n.c,n.c=-n.c,n=n._next;this._onUpdate=i.onUpdate,this._initted=!0},d._initProps=function(e,t,n,r){var a,s,o,l,u,d;if(null==e)return!1;z[e._gsTweenID]&&ee(),this.vars.css||e.style&&e!==i&&e.nodeType&&W.css&&this.vars.autoCSS!==!1&&U(this.vars,e);for(a in this.vars)if(d=this.vars[a],Q[a])d&&(d instanceof Array||d.push&&y(d))&&d.join("").indexOf("{self}")!==-1&&(this.vars[a]=d=this._swapSelfInParams(d,this));else if(W[a]&&(l=new W[a])._onInitTween(e,this.vars[a],this)){
for(this._firstPT=u={_next:this._firstPT,t:l,p:"setRatio",s:0,c:1,f:1,n:a,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[a]=H.call(this,e,a,"get",d,a,0,null,this.vars.stringFilter);return r&&this._kill(r,e)?this._initProps(e,t,n,r):this._overwrite>1&&this._firstPT&&n.length>1&&re(e,this,t,this._overwrite,n)?(this._kill(t,e),
this._initProps(e,t,n,r)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(z[e._gsTweenID]=!0),o)},d.render=function(e,t,n){var r,a,i,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||(r=!0,a="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===v&&"isPause"!==this.data)&&u!==e&&(n=!0,
u>v&&(a="onReverseComplete")),this._rawPrevTime=s=!t||e||u===e?e:v);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)&&(a="onReverseComplete",r=this._reversed),e<0&&(this._active=!1,0===l&&(this._initted||!this.vars.lazy||n)&&(u>=0&&(u!==v||"isPause"!==this.data)&&(n=!0),this._rawPrevTime=s=!t||e||u===e?e:v)),this._initted||(n=!0);else if(this._totalTime=this._time=e,this._easeType){var d=e/l,c=this._easeType,f=this._easePower;(1===c||3===c&&d>=.5)&&(d=1-d),
3===c&&(d*=2),1===f?d*=d:2===f?d*=d*d:3===f?d*=d*d*d:4===f&&(d*=d*d*d*d),1===c?this.ratio=1-d:2===c?this.ratio=d:e/l<.5?this.ratio=d/2:this.ratio=1-d/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,$.push(this),void(this._lazy=[e,t]);this._time&&!r?this.ratio=this._ease.getRatio(this._time/l):r&&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):a||(a="_dummyGS")),this.vars.onStart&&(0===this._time&&0!==l||t||this._callback("onStart"))),i=this._firstPT;i;)i.f?i.t[i.p](i.c*this.ratio+i.s):i.t[i.p]=i.c*this.ratio+i.s,i=i._next;this._onUpdate&&(e<0&&this._startAt&&e!==-1e-4&&this._startAt.render(e,t,n),t||(this._time!==o||r)&&this._callback("onUpdate")),a&&(this._gc&&!n||(e<0&&this._startAt&&!this._onUpdate&&e!==-1e-4&&this._startAt.render(e,t,n),
r&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[a]&&this._callback(a),0===l&&this._rawPrevTime===v&&s!==v&&(this._rawPrevTime=0)))}},d._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 r,a,i,s,o,l,u,d,c,f=n&&this._time&&n._startTime===this._startTime&&this._timeline===n._timeline;if((y(t)||j(t))&&"number"!=typeof t[0])for(r=t.length;--r>-1;)this._kill(e,t[r],n)&&(l=!0);else{
if(this._targets){for(r=this._targets.length;--r>-1;)if(t===this._targets[r]){o=this._propLookup[r]||{},this._overwrittenProps=this._overwrittenProps||[],a=this._overwrittenProps[r]=e?this._overwrittenProps[r]||{}:"all";break}}else{if(t!==this.target)return!1;o=this._propLookup,a=this._overwrittenProps=e?this._overwrittenProps||{}:"all"}if(o){if(u=e||o,d=e!==a&&"all"!==a&&e!==o&&("object"!=typeof e||!e._tempKill),n&&(N.onOverwrite||this.vars.onOverwrite)){for(i in u)o[i]&&(c||(c=[]),c.push(i));if((c||!e)&&!ne(this,n,t,c))return!1;
}for(i in u)(s=o[i])&&(f&&(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[i]),d&&(a[i]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return l},d.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?{}:[],O.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-v,this.render(-this._delay)),this},d._enabled=function(e,t){if(f||c.wake(),e&&this._gc){var n,r=this._targets;if(r)for(n=r.length;--n>-1;)this._siblings[n]=te(r[n],this,!0);else this._siblings=te(this.target,this,!0)}return O.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,r){return r.startAt=n,r.immediateRender=0!=r.immediateRender&&0!=n.immediateRender,new N(e,t,r)},N.delayedCall=function(e,t,n,r,a){return new N(t,0,{delay:e,onComplete:t,onCompleteParams:n,callbackScope:r,onReverseComplete:t,onReverseCompleteParams:n,immediateRender:!1,lazy:!1,useFrames:a,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,r,a,i;if((y(e)||j(e))&&"number"!=typeof e[0]){for(n=e.length,r=[];--n>-1;)r=r.concat(N.getTweensOf(e[n],t));for(n=r.length;--n>-1;)for(i=r[n],a=n;--a>-1;)i===r[a]&&r.splice(n,1)}else for(r=te(e).concat(),n=r.length;--n>-1;)(r[n]._gc||t&&!r[n].isActive())&&r.splice(n,1);return r},N.killTweensOf=N.killDelayedCallsTo=function(e,t,n){"object"==typeof t&&(n=t,t=!1);for(var r=N.getTweensOf(e,t),a=r.length;--a>-1;)r[a]._kill(n,e);
};var ie=S("plugins.TweenPlugin",function(e,t){this._overwriteProps=(e||"").split(","),this._propName=this._overwriteProps[0],this._priority=t||0,this._super=ie.prototype},!0);if(d=ie.prototype,ie.version="1.18.0",ie.API=2,d._firstPT=null,d._addTween=H,d.setRatio=B,d._kill=function(e){var t,n=this._overwriteProps,r=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(;r;)null!=e[r.n]&&(r._next&&(r._next._prev=r._prev),r._prev?(r._prev._next=r._next,
r._prev=null):this._firstPT===r&&(this._firstPT=r._next)),r=r._next;return!1},d._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,r,a,i,s,o=t._firstPT;if("_onInitAllProps"===e){for(;o;){for(s=o._next,r=a;r&&r.pr>o.pr;)r=r._next;(o._prev=r?r._prev:i)?o._prev._next=o:a=o,(o._next=r)?r._prev=o:i=o,o=s}o=t._firstPT=a}for(;o;)o.pg&&"function"==typeof o.t[e]&&o.t[e]()&&(n=!0),
o=o._next;return n},ie.activate=function(e){for(var t=e.length;--t>-1;)e[t].API===ie.API&&(W[(new e[t])._propName]=e[t]);return!0},w.plugin=function(e){if(!(e&&e.propName&&e.init&&e.API))throw"illegal plugin definition.";var t,n=e.propName,r=e.priority||0,a=e.overwriteProps,i={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},s=S("plugins."+n.charAt(0).toUpperCase()+n.substr(1)+"Plugin",function(){ie.call(this,n,r),this._overwriteProps=a||[]},e.global===!0),o=s.prototype=new ie(n);
o.constructor=s,s.API=e.API;for(t in i)"function"==typeof e[t]&&(o[i[t]]=e[t]);return s.version=e.version,ie.activate([s]),s},l=i._gsQueue){for(u=0;u<l.length;u++)l[u]();for(d in b)b[d].func||i.console.log("GSAP encountered missing dependency: com.greensock."+d)}f=!1}}("undefined"!=typeof e&&e.exports&&"undefined"!=typeof i?i:this||s,"TweenLite"),e.exports=TweenLite}).call(t,function(){return this}())},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1]);
}}var a=n(2583),i=n(2584),s=n(2585),o=n(2586),l=n(2587);r.prototype.clear=a,r.prototype.delete=i,r.prototype.get=s,r.prototype.has=o,r.prototype.set=l,e.exports=r},function(e,t){function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}e.exports=n},function(e,t,n){function r(e,t,n,r){
var c=-1,f=i,p=!0,h=e.length,v=[],g=t.length;if(!h)return v;n&&(t=o(t,l(n))),r?(f=s,p=!1):t.length>=d&&(f=u,p=!1,t=new a(t));e:for(;++c<h;){var m=e[c],y=n?n(m):m;if(m=r||0!==m?m:0,p&&y===y){for(var b=g;b--;)if(t[b]===y)continue e;v.push(m)}else f(t,y,r)||v.push(m)}return v}var a=n(513),i=n(514),s=n(515),o=n(516),l=n(829),u=n(517),d=200;e.exports=r},function(e,t){function n(e){return function(t){return e(t)}}e.exports=n},function(e,t,n){function r(e,t,n){var r=-1,c=i,f=e.length,p=!0,h=[],v=h;if(n)p=!1,
c=s;else if(f>=d){var g=t?null:l(e);if(g)return u(g);p=!1,c=o,v=new a}else v=t?[]:h;e:for(;++r<f;){var m=e[r],y=t?t(m):m;if(m=n||0!==m?m:0,p&&y===y){for(var b=v.length;b--;)if(v[b]===y)continue e;t&&v.push(y),h.push(m)}else c(v,y,n)||(v!==h&&v.push(y),h.push(m))}return h}var a=n(513),i=n(514),s=n(515),o=n(517),l=n(2564),u=n(833),d=200;e.exports=r},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,t){
return t=null==t?r:t,!!t&&("number"==typeof e||a.test(e))&&e>-1&&e%1==0&&e<t}var r=9007199254740991,a=/^(?:0|[1-9]\d*)$/;e.exports=n},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}e.exports=n},function(e,t,n){function r(e){return a(e)&&o.call(e,"callee")&&(!u.call(e,"callee")||l.call(e)==i)}var a=n(283),i="[object Arguments]",s=Object.prototype,o=s.hasOwnProperty,l=s.toString,u=s.propertyIsEnumerable;e.exports=r},function(e,t,n){function r(e){var t=a(e)?l.call(e):"";
return t==i||t==s}var a=n(284),i="[object Function]",s="[object GeneratorFunction]",o=Object.prototype,l=o.toString;e.exports=r},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t){function n(){}e.exports=n},function(e,t,n){var r=n(828),a=n(231),i=n(283),s=a(function(e,t){return i(e)?r(e,t):[]});e.exports=s},,function(e,t,n){"use strict";var r=n(2606),a=window.Raven,i=new r;i.noConflict=function(){return window.Raven=a,i},i.afterLoad(),e.exports=i},function(e,t){"use strict";
function n(e){return void 0===e}function r(e){return"function"==typeof e}function a(e){return"[object String]"===v.toString.call(e)}function i(e){return"object"==typeof e&&null!==e}function s(e){for(var t in e)return!1;return!0}function o(e){return i(e)&&"[object Error]"===v.toString.call(e)||e instanceof Error}function l(e,t){var r,a;if(n(e.length))for(r in e)c(e,r)&&t.call(null,r,e[r]);else if(a=e.length)for(r=0;r<a;r++)t.call(null,r,e[r])}function u(e,t){return t?(l(t,function(t,n){e[t]=n}),e):e;
}function d(e,t){return e.length<=t?e:e.substr(0,t)+"\u2026"}function c(e,t){return v.hasOwnProperty.call(e,t)}function f(e){for(var t,n=[],r=0,i=e.length;r<i;r++)t=e[r],a(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 h(){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 r=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return r(t[0])+r(t[1])+r(t[2])+r(t[3])+r(t[4])+r(t[5])+r(t[6])+r(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 v=Object.prototype;e.exports={isUndefined:n,isFunction:r,isString:a,isObject:i,isEmptyObject:s,isError:o,each:l,objectMerge:u,truncate:d,hasKey:c,joinRegExp:f,
urlencode:p,uuid4:h}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(2598),i=r(a),s=i.default(function(){return/firefox/i.test(navigator.userAgent)});t.isFirefox=s;var o=i.default(function(){return Boolean(window.safari)});t.isSafari=o},function(e,t,n){"use strict";function r(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}function a(e){return e&&e.__esModule?e:{
"default":e}}function i(e){return new o.default(e)}t.__esModule=!0,t.default=i;var s=n(2610),o=a(s),l=n(2614),u=a(l),d=n(520),c=r(d);t.NativeTypes=c,t.getEmptyImage=u.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){return t===e||null!==t&&null!==e&&s.default(t,e)}t.__esModule=!0,t.default=a;var i=n(522),s=r(i);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");
}function i(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 s(e){var t=e.DecoratedComponent,n=e.createHandler,r=e.createMonitor,s=e.createConnector,f=e.registerHandler,h=e.containerDisplayName,g=e.getType,m=e.collect,b=e.options,P=b.arePropsEqual,w=void 0===P?v.default:P,S=t.displayName||t.name||"Component";
return function(e){function v(t,i){a(this,v),e.call(this,t,i),this.handleChange=this.handleChange.bind(this),this.handleChildRef=this.handleChildRef.bind(this),y.default("object"==typeof this.context.dragDropManager,"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://gaearon.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",S,S),this.manager=this.context.dragDropManager,
this.handlerMonitor=r(this.manager),this.handlerConnector=s(this.manager.getBackend()),this.handler=n(this.handlerMonitor),this.disposable=new c.SerialDisposable,this.receiveProps(t),this.state=this.getCurrentState(),this.dispose()}return i(v,e),v.prototype.getHandlerId=function(){return this.handlerId},v.prototype.getDecoratedComponentInstance=function(){return this.decoratedComponentInstance},v.prototype.shouldComponentUpdate=function(e,t){return!w(e,this.props)||!p.default(t,this.state)},l(v,null,[{
key:"DecoratedComponent",value:t,enumerable:!0},{key:"displayName",value:h+"("+S+")",enumerable:!0},{key:"contextTypes",value:{dragDropManager:u.PropTypes.object.isRequired},enumerable:!0}]),v.prototype.componentDidMount=function(){this.isCurrentlyMounted=!0,this.disposable=new c.SerialDisposable,this.currentType=null,this.receiveProps(this.props),this.handleChange()},v.prototype.componentWillReceiveProps=function(e){w(e,this.props)||(this.receiveProps(e),this.handleChange())},v.prototype.componentWillUnmount=function(){
this.dispose(),this.isCurrentlyMounted=!1},v.prototype.receiveProps=function(e){this.handler.receiveProps(e),this.receiveType(g(e))},v.prototype.receiveType=function(e){if(e!==this.currentType){this.currentType=e;var t=f(e,this.handler,this.manager),n=t.handlerId,r=t.unregister;this.handlerId=n,this.handlerMonitor.receiveHandlerId(n),this.handlerConnector.receiveHandlerId(n);var a=this.manager.getMonitor(),i=a.subscribeToStateChange(this.handleChange,{handlerIds:[n]});this.disposable.setDisposable(new c.CompositeDisposable(new c.Disposable(i),new c.Disposable(r)));
}},v.prototype.handleChange=function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();p.default(e,this.state)||this.setState(e)}},v.prototype.dispose=function(){this.disposable.dispose(),this.handlerConnector.receiveHandlerId(null)},v.prototype.handleChildRef=function(e){this.decoratedComponentInstance=e,this.handler.receiveComponent(e)},v.prototype.getCurrentState=function(){var e=m(this.handlerConnector.hooks,this.handlerMonitor);return e},v.prototype.render=function(){return d.default.createElement(t,o({},this.props,this.state,{
ref:this.handleChildRef}))},v}(u.Component)}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=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),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=s;var u=n(4),d=r(u),c=n(2023),f=n(522),p=r(f),h=n(847),v=r(h),g=n(129),m=(r(g),
n(88)),y=r(m);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){return"string"==typeof e||"symbol"==typeof e||t&&s.default(e)&&e.every(function(e){return a(e,!1)})}t.__esModule=!0,t.default=a;var i=n(189),s=r(i);e.exports=t.default},function(e,t){"use strict";function n(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;
for(var a=Object.prototype.hasOwnProperty,i=0;i<n.length;i++){if(!a.call(t,n[i]))return!1;var s=e[n[i]],o=t[n[i]];if(s!==o||"object"==typeof s||"object"==typeof o)return!1}return!0}t.__esModule=!0,t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors. "+("You can either wrap "+t+" into a <div>, or turn it into a ")+"drag source or a drop target itself.");
}}function i(e){return function(){var t=arguments.length<=0||void 0===arguments[0]?null:arguments[0],n=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(!u.isValidElement(t)){var r=t;return void e(r,n)}var i=t;a(i);var s=n?function(t){return e(t,n)}:e;return l.default(i,s)}}function s(e){var t={};return Object.keys(e).forEach(function(n){var r=e[n],a=i(r);t[n]=function(){return a}}),t}t.__esModule=!0,t.default=s;var o=n(2628),l=r(o),u=n(4);e.exports=t.default},function(e,t,n){"use strict";
t.__esModule=!0;var r=n(4);t.default=r.PropTypes.shape({subscribe:r.PropTypes.func.isRequired,dispatch:r.PropTypes.func.isRequired,getState:r.PropTypes.func.isRequired})},function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={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},a=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){a.forEach(function(t){r[n(t,e)]=r[e]})});var i={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:r,shorthandPropertyExpansions:i};e.exports=s},function(e,t,n){"use strict";var r=n(850),a=n(80),i=(n(98),n(2239),n(2690)),s=n(2245),o=n(2249),l=(n(52),o(function(e){return s(e)})),u=!1,d="cssFloat";if(a.canUseDOM){var c=document.createElement("div").style;try{c.font=""}catch(f){u=!0}void 0===document.documentElement.style.cssFloat&&(d="styleFloat")}var p={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){
var a=e[r];null!=a&&(n+=l(r)+":",n+=i(r,a,t)+";")}return n||null},setValueForStyles:function(e,t,n){var a=e.style;for(var s in t)if(t.hasOwnProperty(s)){var o=i(s,t[s],n);if("float"!==s&&"cssFloat"!==s||(s=d),o)a[s]=o;else{var l=u&&r.shorthandPropertyExpansions[s];if(l)for(var c in l)a[c]="";else a[s]=""}}}};e.exports=p},function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var a=n(60),i=n(156),s=n(39);a(r.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()}}),i.addPoolingTo(r),e.exports=r},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 r(e){return(""+e).replace(P,"$&/")}function a(e,t){this.func=e,this.context=t,this.count=0}function i(e,t,n){var r=e.func,a=e.context;r.call(a,t,e.count++)}function s(e,t,n){if(null==e)return e;var r=a.getPooled(t,n);m(e,i,r),a.release(r);
}function o(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function l(e,t,n){var a=e.result,i=e.keyPrefix,s=e.func,o=e.context,l=s.call(o,t,e.count++);Array.isArray(l)?u(l,a,n,g.thatReturnsArgument):null!=l&&(v.isValidElement(l)&&(l=v.cloneAndReplaceKey(l,i+(!l.key||t&&t.key===l.key?"":r(l.key)+"/")+n)),a.push(l))}function u(e,t,n,a,i){var s="";null!=n&&(s=r(n)+"/");var u=o.getPooled(t,s,a,i);m(e,l,u),o.release(u)}function d(e,t,n){if(null==e)return e;var r=[];return u(e,r,null,t,n),
r}function c(e,t,n){return null}function f(e,t){return m(e,c,null)}function p(e){var t=[];return u(e,t,null,g.thatReturnsArgument),t}var h=n(156),v=n(107),g=n(97),m=n(540),y=h.twoArgumentPooler,b=h.fourArgumentPooler,P=/\/+/g;a.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(a,y),o.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,b);var w={forEach:s,map:d,mapIntoWithKeyPrefixInternal:u,
count:f,toArray:p};e.exports=w},function(e,t,n){"use strict";function r(e,t){var n=S.hasOwnProperty(t)?S[t]:null;T.hasOwnProperty(t)&&(n!==P.OVERRIDE_BASE?g(!1):void 0),e&&(n!==P.DEFINE_MANY&&n!==P.DEFINE_MANY_MERGED?g(!1):void 0)}function a(e,t){if(t){"function"==typeof t?g(!1):void 0,p.isValidElement(t)?g(!1):void 0;var n=e.prototype,a=n.__reactAutoBindPairs;t.hasOwnProperty(b)&&_.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==b){var s=t[i],u=n.hasOwnProperty(i);if(r(u,i),_.hasOwnProperty(i))_[i](e,s);else{
var d=S.hasOwnProperty(i),c="function"==typeof s,f=c&&!d&&!u&&t.autobind!==!1;if(f)a.push(i,s),n[i]=s;else if(u){var h=S[i];!d||h!==P.DEFINE_MANY_MERGED&&h!==P.DEFINE_MANY?g(!1):void 0,h===P.DEFINE_MANY_MERGED?n[i]=o(n[i],s):h===P.DEFINE_MANY&&(n[i]=l(n[i],s))}else n[i]=s}}}}function i(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var a=n in _;a?g(!1):void 0;var i=n in e;i?g(!1):void 0,e[n]=r}}}function s(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:g(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?g(!1):void 0,
e[n]=t[n]);return e}function o(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var a={};return s(a,n),s(a,r),a}}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 d(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],a=t[n+1];e[r]=u(e,a)}}var c=n(60),f=n(856),p=n(107),h=(n(369),n(368),n(869)),v=n(356),g=n(39),m=n(357),y=n(155),b=(n(52),
y({mixins:null})),P=m({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),w=[],S={mixins:P.DEFINE_MANY,statics:P.DEFINE_MANY,propTypes:P.DEFINE_MANY,contextTypes:P.DEFINE_MANY,childContextTypes:P.DEFINE_MANY,getDefaultProps:P.DEFINE_MANY_MERGED,getInitialState:P.DEFINE_MANY_MERGED,getChildContext:P.DEFINE_MANY_MERGED,render:P.DEFINE_ONCE,componentWillMount:P.DEFINE_MANY,componentDidMount:P.DEFINE_MANY,componentWillReceiveProps:P.DEFINE_MANY,shouldComponentUpdate:P.DEFINE_ONCE,
componentWillUpdate:P.DEFINE_MANY,componentDidUpdate:P.DEFINE_MANY,componentWillUnmount:P.DEFINE_MANY,updateComponent:P.OVERRIDE_BASE},_={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)a(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=c({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=c({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=o(e.getDefaultProps,t):e.getDefaultProps=t},
propTypes:function(e,t){e.propTypes=c({},e.propTypes,t)},statics:function(e,t){i(e,t)},autobind:function(){}},T={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},I=function(){};c(I.prototype,f.prototype,T);var M={createClass:function(e){var t=function(e,t,n){this.__reactAutoBindPairs.length&&d(this),this.props=e,this.context=t,this.refs=v,this.updater=n||h,this.state=null;
var r=this.getInitialState?this.getInitialState():null;"object"!=typeof r||Array.isArray(r)?g(!1):void 0,this.state=r};t.prototype=new I,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],w.forEach(a.bind(null,t)),a(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:g(!1);for(var n in S)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){w.push(e)}}};e.exports=M},function(e,t,n){"use strict";function r(e,t,n){this.props=e,
this.context=t,this.refs=i,this.updater=n||a}var a=n(869),i=(n(98),n(531),n(356)),s=n(39);n(52);r.prototype.isReactComponent={},r.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")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};e.exports=r},function(e,t,n){"use strict";var r=n(523),a=n(2652),i={
processChildrenUpdates:a.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup,unmountIDFromEnvironment:function(e){}};e.exports=i},function(e,t,n){"use strict";var r=n(68),a=n(2663),i=n(865),s=n(233),o=n(115),l=n(872),u=n(2691),d=n(877),c=n(2695);n(52);a.inject();var f={findDOMNode:u,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:l,unstable_batchedUpdates:o.batchedUpdates,unstable_renderSubtreeIntoContainer:c};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=d(e)),e?r.getNodeFromInstance(e):null}},Mount:i,Reconciler:s});e.exports=f},function(e,t){"use strict";var n={hasCachedChildNodes:1};e.exports=n},function(e,t,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=l.getValue(e);null!=t&&a(this,Boolean(e.multiple),t);
}}function a(e,t,n){var r,a,i=u.getNodeFromInstance(e).options;if(t){for(r={},a=0;a<n.length;a++)r[""+n[a]]=!0;for(a=0;a<i.length;a++){var s=r.hasOwnProperty(i[a].value);i[a].selected!==s&&(i[a].selected=s)}}else{for(r=""+n,a=0;a<i.length;a++)if(i[a].value===r)return void(i[a].selected=!0);i.length&&(i[0].selected=!0)}}function i(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),d.asap(r,this),n}var s=n(60),o=n(364),l=n(527),u=n(68),d=n(115),c=(n(52),
!1),f={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:i.bind(e),wasMultiple:Boolean(t.multiple)},void 0===t.value||void 0===t.defaultValue||c||(c=!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 r=l.getValue(t);null!=r?(e._wrapperState.pendingUpdate=!1,a(e,Boolean(t.multiple),r)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?a(e,Boolean(t.multiple),t.defaultValue):a(e,Boolean(t.multiple),t.multiple?[]:""))}};e.exports=f},function(e,t,n){"use strict";function r(){if(c.current){var e=c.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function a(e,t){if(e._store&&!e._store.validated&&null==e.key){
e._store.validated=!0;i("uniqueKey",e,t)}}function i(e,t,n){var a=r();if(!a){var i="string"==typeof n?n:n.displayName||n.name;i&&(a=" Check the top-level render call using <"+i+">.")}var s=h[e]||(h[e]={});if(s[a])return null;s[a]=!0;var o={parentOrOwner:a,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==c.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 r=e[n];u.isValidElement(r)&&a(r,t)}else if(u.isValidElement(e))e._store&&(e._store.validated=!0);else if(e){var i=f(e);if(i&&i!==e.entries)for(var s,o=i.call(e);!(s=o.next()).done;)u.isValidElement(s.value)&&a(s.value,t)}}function o(e,t,n,a){for(var i in t)if(t.hasOwnProperty(i)){var s;try{"function"!=typeof t[i]?p(!1):void 0,s=t[i](n,i,e,a)}catch(o){s=o}if(s instanceof Error&&!(s.message in v)){v[s.message]=!0;r()}}}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,d.prop),"function"==typeof t.getDefaultProps}}var u=n(107),d=n(369),c=(n(368),n(157)),f=(n(531),n(536)),p=n(39),h=(n(52),{}),v={},g={createElement:function(e,t,n){var r="string"==typeof e||"function"==typeof e,a=u.createElement.apply(this,arguments);if(null==a)return a;if(r)for(var i=2;i<arguments.length;i++)s(arguments[i],e);return l(a),a},createFactory:function(e){var t=g.createElement.bind(null,e);return t.type=e,t},cloneElement:function(e,t,n){for(var r=u.cloneElement.apply(this,arguments),a=2;a<arguments.length;a++)s(arguments[a],r.type);
return l(r),r}};e.exports=g},function(e,t){"use strict";var n,r={injectEmptyComponentFactory:function(e){n=e}},a={create:function(e){return n(e)}};a.injection=r,e.exports=a},function(e,t){"use strict";var n={logTopLevelRenders:!1};e.exports=n},function(e,t,n){"use strict";function r(e){return i(document.documentElement,e)}var a=n(2656),i=n(2240),s=n(817),o=n(818),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,a=e.selectionRange;t!==n&&r(n)&&(l.hasSelectionCapabilities(n)&&l.setSelection(n,a),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=a.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if(void 0===r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else a.setOffsets(e,t)}
};e.exports=l},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function a(e){return e?e.nodeType===A?e.documentElement:e.firstChild:null}function i(e){return e.getAttribute&&e.getAttribute(E)||""}function s(e,t,n,r,a){var i;if(b.logTopLevelRenders){var s=e._currentElement.props,o=s.type;i="React mount: "+("string"==typeof o?o:o.displayName||o.name),console.time(i)}var l=w.mountComponent(e,n,null,g(e,t),a);
i&&console.timeEnd(i),e._renderedComponent._topLevelWrapper=e,j._mountImageIntoNode(l,t,e,r,n)}function o(e,t,n,r){var a=_.ReactReconcileTransaction.getPooled(!n&&m.useCreateElement);a.perform(s,null,e,t,a,n,r),_.ReactReconcileTransaction.release(a)}function l(e,t,n){for(w.unmountComponent(e,n),t.nodeType===A&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function u(e){var t=a(e);if(t){var n=v.getInstanceFromNode(t);return!(!n||!n._nativeParent)}}function d(e){var t=a(e),n=t&&v.getInstanceFromNode(t);
return n&&!n._nativeParent?n:null}function c(e){var t=d(e);return t?t._nativeContainerInfo._topLevelWrapper:null}var f=n(232),p=n(190),h=n(367),v=(n(157),n(68)),g=n(2647),m=n(2651),y=n(107),b=n(863),P=(n(98),n(2667)),w=n(233),S=n(871),_=n(115),T=n(356),I=n(880),M=n(39),C=n(538),x=n(539),E=(n(52),p.ID_ATTRIBUTE_NAME),k=p.ROOT_ATTRIBUTE_NAME,D=1,A=9,O=11,R={},L=1,N=function(){this.rootID=L++};N.prototype.isReactComponent={},N.prototype.render=function(){return this.props};var j={TopLevelWrapper:N,_instancesByReactRootID:R,
scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return j.scrollMonitor(n,function(){S.enqueueElementInternal(e,t),r&&S.enqueueCallbackInternal(e,r)}),e},_renderNewRootComponent:function(e,t,n,r){!t||t.nodeType!==D&&t.nodeType!==A&&t.nodeType!==O?M(!1):void 0,h.ensureScrollValueMonitoring();var a=I(e);_.batchedUpdates(o,a,t,n,r);var i=a._instance.rootID;return R[i]=a,a},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?M(!1):void 0,
j._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){S.validateCallback(r,"ReactDOM.render"),y.isValidElement(t)?void 0:M(!1);var s=y(N,null,null,null,null,null,t),o=c(n);if(o){var l=o._currentElement,d=l.props;if(x(d,t)){var f=o._renderedComponent.getPublicInstance(),p=r&&function(){r.call(f)};return j._updateRootComponent(o,s,n,p),f}j.unmountComponentAtNode(n)}var h=a(n),v=h&&!!i(h),g=u(n),m=v&&!o&&!g,b=j._renderNewRootComponent(s,n,m,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):T)._renderedComponent.getPublicInstance();
return r&&r.call(b),b},render:function(e,t,n){return j._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){!e||e.nodeType!==D&&e.nodeType!==A&&e.nodeType!==O?M(!1):void 0;var t=c(e);if(!t){u(e),1===e.nodeType&&e.hasAttribute(k);return!1}return delete R[t._instance.rootID],_.batchedUpdates(l,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,i,s){if(!t||t.nodeType!==D&&t.nodeType!==A&&t.nodeType!==O?M(!1):void 0,i){var o=a(t);if(P.canReuseMarkup(e,o))return void v.precacheNode(n,o);
var l=o.getAttribute(P.CHECKSUM_ATTR_NAME);o.removeAttribute(P.CHECKSUM_ATTR_NAME);var u=o.outerHTML;o.setAttribute(P.CHECKSUM_ATTR_NAME,l);var d=e,c=r(d,u);" (client) "+d.substring(c-20,c+20)+"\n (server) "+u.substring(c-20,c+20);t.nodeType===A?M(!1):void 0}if(t.nodeType===A?M(!1):void 0,s.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);f.insertTreeBefore(t,e,null)}else C(t,e),v.precacheNode(n,t.firstChild)}};e.exports=j},function(e,t,n){"use strict";var r=n(357),a=r({INSERT_MARKUP:null,
MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=a},function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=c[t];return null==n&&(c[t]=n=u(t)),n}function a(e){return d?void 0:l(!1),new d(e)}function i(e){return new f(e)}function s(e){return e instanceof f}var o=n(60),l=n(39),u=null,d=null,c={},f=null,p={injectGenericComponentClass:function(e){d=e},injectTextComponentClass:function(e){f=e},injectComponentClasses:function(e){
o(c,e)}},h={getComponentClassForElement:r,createInternalComponent:a,createInstanceForText:i,isTextComponent:s,injection:p};e.exports=h},function(e,t,n){"use strict";var r=n(107),a=n(39),i={NATIVE:0,COMPOSITE:1,EMPTY:2,getType:function(e){return null===e||e===!1?i.EMPTY:r.isValidElement(e)?"function"==typeof e.type?i.COMPOSITE:i.NATIVE:void a(!1)}};e.exports=i},function(e,t,n){"use strict";function r(e,t){}var a=(n(52),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){
r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")}});e.exports=a},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function a(e){function t(t,n,r,a,i,s){if(a=a||_,s=s||r,null==n[r]){var o=P[i];return t?new Error("Required "+o+" `"+s+"` was not specified in "+("`"+a+"`.")):null}return e(n,r,a,i,s)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function i(e){function t(t,n,r,a,i){
var s=t[n],o=g(s);if(o!==e){var l=P[a],u=m(s);return new Error("Invalid "+l+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return a(t)}function s(){return a(w.thatReturns(null))}function o(e){function t(t,n,r,a,i){if("function"!=typeof e)return new Error("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var o=P[a],l=g(s);return new Error("Invalid "+o+" `"+i+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an array."));
}for(var u=0;u<s.length;u++){var d=e(s,u,r,a,i+"["+u+"]");if(d instanceof Error)return d}return null}return a(t)}function l(){function e(e,t,n,r,a){if(!b.isValidElement(e[t])){var i=P[r];return new Error("Invalid "+i+" `"+a+"` supplied to "+("`"+n+"`, expected a single ReactElement."))}return null}return a(e)}function u(e){function t(t,n,r,a,i){if(!(t[n]instanceof e)){var s=P[a],o=e.name||_,l=y(t[n]);return new Error("Invalid "+s+" `"+i+"` of type "+("`"+l+"` supplied to `"+r+"`, expected ")+("instance of `"+o+"`."));
}return null}return a(t)}function d(e){function t(t,n,a,i,s){for(var o=t[n],l=0;l<e.length;l++)if(r(o,e[l]))return null;var u=P[i],d=JSON.stringify(e);return new Error("Invalid "+u+" `"+s+"` of value `"+o+"` "+("supplied to `"+a+"`, expected one of "+d+"."))}return a(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function c(e){function t(t,n,r,a,i){if("function"!=typeof e)return new Error("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");
var s=t[n],o=g(s);if("object"!==o){var l=P[a];return new Error("Invalid "+l+" `"+i+"` of type "+("`"+o+"` supplied to `"+r+"`, expected an object."))}for(var u in s)if(s.hasOwnProperty(u)){var d=e(s,u,r,a,i+"."+u);if(d instanceof Error)return d}return null}return a(t)}function f(e){function t(t,n,r,a,i){for(var s=0;s<e.length;s++){var o=e[s];if(null==o(t,n,r,a,i))return null}var l=P[a];return new Error("Invalid "+l+" `"+i+"` supplied to "+("`"+r+"`."))}return a(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,r,a){if(!v(e[t])){var i=P[r];return new Error("Invalid "+i+" `"+a+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return a(e)}function h(e){function t(t,n,r,a,i){var s=t[n],o=g(s);if("object"!==o){var l=P[a];return new Error("Invalid "+l+" `"+i+"` of type `"+o+"` "+("supplied to `"+r+"`, expected `object`."))}for(var u in e){var d=e[u];if(d){var c=d(s,u,r,a,i+"."+u);if(c)return c}}return null}return a(t)}function v(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(v);if(null===e||b.isValidElement(e))return!0;var t=S(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var a=n.value;if(a&&!v(a[1]))return!1}return!0;default:return!1}}function g(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function m(e){var t=g(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:_}var b=n(107),P=n(368),w=n(97),S=n(536),_="<<anonymous>>",T={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),any:s(),arrayOf:o,element:l(),instanceOf:u,node:p(),objectOf:c,oneOf:d,oneOfType:f,shape:h};e.exports=T},function(e,t,n){"use strict";function r(e){s.enqueueUpdate(e)}function a(e,t){var n=i.get(e);return n?n:null;
}var i=(n(157),n(530)),s=n(115),o=n(39),l=(n(52),{isMounted:function(e){var t=i.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){l.validateCallback(t,n);var i=a(e);return i?(i._pendingCallbacks?i._pendingCallbacks.push(t):i._pendingCallbacks=[t],void r(i)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=a(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){
var n=a(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=a(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),r(n)}},enqueueElementInternal:function(e,t){e._pendingElement=t,r(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 r(e,t){if(null==t?a(!1):void 0,null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var a=n(39);e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r=e,a=void 0===r[n];a&&null!=t&&(r[n]=t)}function a(e){if(null==e)return e;var t={};return i(e,r,t),t}var i=(n(526),n(540));n(52);e.exports=a},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 r(e){for(var t;(t=e._renderedNodeType)===a.COMPOSITE;)e=e._renderedComponent;return t===a.NATIVE?e._renderedComponent:t===a.EMPTY?null:void 0}var a=n(868);e.exports=r},function(e,t,n){"use strict";function r(){return!i&&a.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var a=n(80),i=null;e.exports=r},function(e,t,n){"use strict";function r(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 a(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 i=n(80),s={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},o={},l={};i.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=a},function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function a(e){var t,n=null===e||e===!1;if(n)t=o.create(a);else if("object"==typeof e){var i=e;
!i||"function"!=typeof i.type&&"string"!=typeof i.type?u(!1):void 0,t="string"==typeof i.type?l.createInternalComponent(i):r(i.type)?new i.type(i):new d(i)}else"string"==typeof e||"number"==typeof e?t=l.createInstanceForText(e):u(!1);t._mountIndex=0,t._mountImage=null;return t}var i=n(60),s=n(2644),o=n(862),l=n(867),u=(n(98),n(39)),d=(n(52),function(e){this.construct(e)});i(d.prototype,s.Mixin,{_instantiateReactComponent:a});e.exports=a},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();
return t&&("input"===t&&r[e.type]||"textarea"===t)}var r={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 r(e){return a.isValidElement(e)?void 0:i(!1),e}var a=n(107),i=n(39);e.exports=r},function(e,t,n){"use strict";var r=n(80),a=n(372),i=n(538),s=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(s=function(e,t){
i(e,a(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){"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){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NCAwLTI4MC0xMjYtMjgwLTI4MCAwLTE1NCAxMjYtMjgwIDI4MC0yODAgMTU0IDAgMjgwIDEyNiAyODAgMjgwIDAgMTU0LTEyNiAyODAtMjgwIDI4MG0wLTU0Ny44NjdjLTE0Ny40NjYgMC0yNjcuODY2IDEyMC40LTI2Ny44NjYgMjY3Ljg2NiAwIDE0Ny40NjcgMTIwLjQgMjY3Ljg2NyAyNjcuODY2IDI2Ny44NjcgMTQ3LjQ2NiAwIDI2Ny44NjYtMTIwLjQgMjY3Ljg2Ni0yNjcuODY3LS45MzMtMTQ3LjQ2Ni0xMjAuNC0yNjcuODY2LTI2Ny44NjYtMjY3Ljg2Nm0xMzQuNCAzODcuMzMzbC0yNjkuNzM0IDBjLTMuNzMzIDAtNi41MzMtMi44LTYuNTMzLTYuNTMzbDAtMjI0LjkzNGMwLTMuNzMzIDIuOC02LjUzMyA2LjUzMy02LjUzM2wyNjkuNzM0IDBjMy43MzQgMCA2LjUzNCAyLjggNi41MzQgNi41MzNsMCAyMjQuOTM0YzAgMy43MzMtMi44IDYuNTMzLTYuNTM0IDYuNTMzbS0yNjMuMi03OS4zOTNsMCA2Ni4zMjcgMjU3LjYgMCAwLTMyLjMxN2MtLjkzMy4zNS0xLjg2Ny41ODMtMi44LjU4My0xLjg2NiAwLTIuOC0uOTMzLTMuNzM0LTEuODY2bC01My4yLTQ1LjczNC02MS42IDQxLjA2Ny04MC4yNjYtODUuODY3LTU2IDU3LjgwN20yNTcuNiAyMi43MTlsMC0xNjguMjU4LTI1Ny42IDAgMCAxMjguNTE0IDU2LjkzNC01OC41MTQgODEuMiA4Ny43MzMgNjAuNjY2LTQwLjEzMyA1OC44IDUwLjY1OG0tMTEzLjg2Ni02OS4zMjZjLTIxLjQ2NyAwLTM4LjI2Ny0xNi44LTM4LjI2Ny0zOC4yNjYgMC0yMS40NjYgMTYuOC0zOC4yNjYgMzguMjY3LTM4LjI2NiAyMS40NjYgMCAzOC4yNjYgMTYuOCAzOC4yNjYgMzguMjY2IDAgMjAuNTM0LTE3LjczNCAzOC4yNjYtMzguMjY2IDM4LjI2Nm0wLTY0LjRjLTE0IDAtMjYuMTM0IDExLjItMjYuMTM0IDI2LjEzNCAwIDE0IDExLjIgMjYuMTM0IDI2LjEzNCAyNi4xMzQgMTQgMCAyNi4xMzMtMTEuMiAyNi4xMzMtMjYuMTM0LS45MzMtMTQuOTM0LTEyLjEzMy0yNi4xMzQtMjYuMTMzLTI2LjEzNCIvPgo8L3N2Zz4K";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NCAwLTI4MC0xMjYtMjgwLTI4MCAwLTE1NCAxMjYtMjgwIDI4MC0yODAgMTU0IDAgMjgwIDEyNiAyODAgMjgwIDAgMTU0LTEyNiAyODAtMjgwIDI4MG0wLTU0Ny44NjZjLTE0Ny40NjYgMC0yNjcuODY2IDEyMC40LTI2Ny44NjYgMjY3Ljg2NiAwIDE0Ny40NjYgMTIwLjQgMjY3Ljg2NyAyNjcuODY2IDI2Ny44NjcgMTQ3LjQ2NiAwIDI2Ny44NjYtMTIwLjQwMSAyNjcuODY2LTI2Ny44NjcgMC0xNDcuNDY2LTEyMC40LTI2Ny44NjYtMjY3Ljg2Ni0yNjcuODY2bS0zLjczNCAyMjQuOTMzYzEuMTY3LTEuMTY3IDIuOC0xLjg2NyA0LjY2OC0xLjg2NyAyLjk1MSAwIDUuMzE5IDEuNzUgNi4xODEgNC4zMjdsNjguNDg0IDQ5LjgwN2MyLjggMS44NjYgMy43MzQgNS42LjkzNCA4LjQgMCAxLjg2Ni0xLjg2NiAyLjc5OS0zLjczNCAyLjhsLjAwMSAwLS4wMDEgMGMtLjkzMyAwLTIuNzk5LS4wMDEtMy43MzMtLjkzNGwtNjEuNTk5LTQ0LjcyMyAwIDE0Ni40NTdjLS45MzMgMi44LTMuNzMzIDUuNi02LjUzMyA1LjYtMy43MzQgMC02LjUzNC0yLjgtNi41MzQtNi41MzRsMC0xNDUuNjc2LTYyLjUzNCA0My45NDNjLTIuOCAxLjg2Ny02LjUzMyAxLjg2Ny04LjQtLjkzMy0xLjg2Ni0yLjgtMS44NjYtNi41MzQuOTM0LTguNGw3MS44NjYtNTIuMjY3bS01My4xOTkgMTEwLjEzNGwtMzcuMzMzIDBjLTI4LjkzNCAwLTUyLjI2Ny0yMy4zMzQtNTIuMjY3LTUyLjI2NyAwLTI4LjkzMyAyMy4zMzQtNTIuMjY2IDUyLjI2Ny01Mi4yNjZsNi41MzMgMCAwLTguNGMwLTQ0LjggMzYuNC04MS4yIDgxLjItODEuMiAzOS4yIDAgNzIuOCAyOCA3OS4zMzQgNjUuMzMzIDQuNjY2LS45MzMgOC40LS45MzMgMTMuMDY2LS45MzMgMzUuNDY3IDAgNjQuNCAyOC45MzMgNjQuNCA2NC40IDAgMTcuNzMzLTcuNDY2IDM1LjQ2Ni0yMS40NjYgNDcuNi0xMC4yNjcgMTEuMi0yNS4yIDE3LjczMy0zOS4yIDE3LjczM2wtLjAwMS0uMDAxLTI5Ljg2NiAwYy0zLjczNCAwLTYuNTM0LTIuOC02LjUzNC02LjUzNCAwLTMuNzMzIDIuOC02LjUzMyA2LjUzNC02LjUzM2wyOS44NjYgMGMxMS4yIDAgMjIuNC00LjY2NyAyOS44NjYtMTMuMDY3IDExLjItMTAuMjY2IDE3LjczNC0yNC4yNjYgMTcuNzM0LTM5LjIgMC0yOC45MzMtMjMuMzM0LTUyLjI2Ni01Mi4yNjYtNTIuMjY2LTUuNiAwLTExLjIuOTM0LTE1Ljg2NyAyLjgtMS44NjYuOTM0LTMuNzMzIDAtNS42LS45MzQtMS44NjYtLjkzMy0yLjgtMi44LTIuOC00LjY2Ni0zLjczMy0zNS40NjYtMzIuNjY2LTYxLjYtNjguMTMzLTYxLjYtMzcuMzM0IDAtNjguMTM0IDMwLjgtNjguMTM0IDY4LjEzNCAwIDQuNjY2IDAgOS4zMzMuOTM0IDEzLjA2NiAwIDEuODY2IDAgMy43MzQtLjkzNCA1LjYtLjkzNCAxLjg2Ni0yLjggMS44NjYtNC42NjYgMS44NjZsLTE0IDBjLTIyLjQwMS4wMDEtNDAuMTM0IDE3LjczNC00MC4xMzQgNDAuMTM0IDAgMjIuNCAxNy43MzMgNDAuMTMzIDQwLjEzNCA0MC4xMzRsMzcuMzMzIDBjMy43MzQgMCA2LjUzNCAyLjggNi41MzQgNi41MzMgMCAzLjczNC0yLjggNi41MzQtNi41MzQgNi41MzQiLz4KPC9zdmc+Cg==";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NCAwLTI4MC0xMjYtMjgwLTI4MCAwLTE1NCAxMjYtMjgwIDI4MC0yODAgMTU0IDAgMjgwIDEyNiAyODAgMjgwIDAgMTU0LTEyNiAyODAtMjgwIDI4MG0wLTU0Ny44NjZjLTE0Ny40NjYgMC0yNjcuODY2IDEyMC40LTI2Ny44NjYgMjY3Ljg2NiAwIDE0Ny40NjYgMTIwLjQgMjY3Ljg2NyAyNjcuODY2IDI2Ny44NjcgMTQ3LjQ2NiAwIDI2Ny44NjYtMTIwLjQwMSAyNjcuODY2LTI2Ny44NjcgMC0xNDcuNDY2LTEyMC40LTI2Ny44NjYtMjY3Ljg2Ni0yNjcuODY2bTg2LjgwMSA0MTAuNjY2bC0xNzMuNjAxIDBjLTMuNzM0IDAtNi41MzQtMi44LTYuNTM0LTYuNTM0bDAtMjczLjQ2NmMwLTMuNzM0IDIuOC02LjUzNCA2LjUzNC02LjUzNGwxNzQuNTM0IDBjMy43MzMgMCA2LjUzMyAyLjggNi41MzMgNi41MzRsMCAyNzMuNDY2Yy0uOTMzIDMuNzM0LTMuNzMzIDYuNTM0LTcuNDY2IDYuNTM0bS0xNjguMDAxLTEyLjEzNGwxNjEuNDY2IDAgMC0yNjEuMzM0LTE2MS40NjYgMCAwIDI2MS4zMzRtOTYuMTM0LTM0LjUzMmMwIDguMjQ3LTYuNjg3IDE0LjkzMy0xNC45MzQgMTQuOTMzLTguMjQ3IDAtMTQuOTM0LTYuNjg2LTE0LjkzNC0xNC45MzMgMC04LjI0OCA2LjY4Ny0xNC45MzQgMTQuOTM0LTE0LjkzNCA4LjI0NyAwIDE0LjkzNCA2LjY4NiAxNC45MzQgMTQuOTM0bTQ3LjYtMjhsLTEyNS4wNjcgMGMtMy43MzMgMC02LjUzMy0yLjgtNi41MzMtNi41MzRsMC0xNTYuOGMwLTMuNzM0IDIuOC02LjUzNCA2LjUzMy02LjUzNGwxMjQuMTM0IDBjMy43MzMgMCA2LjUzMyAyLjggNi41MzMgNi41MzRsMCAxNTcuNzM0YzAgMi43OTktMi44IDUuNTk5LTUuNiA1LjZtLTExOC41MzQtMTIuMTM0bDExMiAwIDAtMTQ1LjYtMTEyIDAgMCAxNDUuNiIvPgo8L3N2Zz4K";
},,,,,,function(e,t,n){(function(e){+function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",a=n.data();e+="Text",a.resetText||n.data("resetText",n[r]()),n[r](a[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 r=e(this),a=r.data("bs.button"),i="object"==typeof n&&n;a||r.data("bs.button",a=new t(this,i)),"toggle"==n?a.toggle():n&&a.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(8))},function(e,t,n){(function(e){+function(e){"use strict";function t(){e(r).remove(),e(a).each(function(t){var r=n(e(this));r.hasClass("open")&&(r.trigger(t=e.Event("hide.bs.dropdown")),t.isDefaultPrevented()||r.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 r=n&&e(n);return r&&r.length?r:t.parent()}var r=".dropdown-backdrop",a="[data-toggle=dropdown]",i=function(t){e(t).on("click.bs.dropdown",this.toggle)};i.prototype.toggle=function(r){var a=e(this);if(!a.is(".disabled, :disabled")){var i=n(a),s=i.hasClass("open");if(t(),!s){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&e('<div class="dropdown-backdrop"/>').insertAfter(e(this)).on("click",t),
i.trigger(r=e.Event("show.bs.dropdown")),r.isDefaultPrevented())return;i.toggleClass("open").trigger("shown.bs.dropdown"),a.focus()}return!1}},i.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var r=e(this);if(t.preventDefault(),t.stopPropagation(),!r.is(".disabled, :disabled")){var i=n(r),s=i.hasClass("open");if(!s||s&&27==t.keyCode)return 27==t.which&&i.find(a).focus(),r.click();var o=e("[role=menu] li:not(.divider):visible a",i);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),r=n.data("dropdown");r||n.data("dropdown",r=new i(this)),"string"==typeof t&&r[t].call(n)})},e.fn.dropdown.Constructor=i,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",a,i.prototype.toggle).on("keydown.bs.dropdown.data-api",a+", [role=menu]",i.prototype.keydown);
}(e)}).call(t,n(8))},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,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,
this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),r&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var a=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(a);
}).emulateTransitionEnd(300):n.$element.focus().trigger(a)}))},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 r=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)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;r?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,r){return this.each(function(){var a=e(this),i=a.data("bs.modal"),s=e.extend({},t.DEFAULTS,a.data(),"object"==typeof n&&n);
i||a.data("bs.modal",i=new t(this,s)),"string"==typeof n?i[n](r):s.show&&i.show(r)})},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),r=n.attr("href"),a=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),i=a.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},a.data(),n.data());t.preventDefault(),a.modal(i,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(8))},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,r){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r);for(var a=this.options.trigger.split(" "),i=a.length;i--;){var s=a[i];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,r){
n[e]!=r&&(t[e]=r)}),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 r="function"==typeof this.options.placement?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,i=a.test(r);
i&&(r=r.replace(a,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass(r),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(i){var u=this.$element.parent(),d=r,c=document.documentElement.scrollTop||document.body.scrollTop,f="body"==this.options.container?window.innerWidth:u.outerWidth(),p="body"==this.options.container?window.innerHeight:u.outerHeight(),h="body"==this.options.container?0:u.offset().left;
r="bottom"==r&&s.top+s.height+l-c>p?"top":"top"==r&&s.top-c-l<0?"bottom":"right"==r&&s.right+o>f?"left":"left"==r&&s.left-o<h?"right":r,n.removeClass(d).addClass(r)}var v=this.getCalculatedOffset(r,s,o,l);this.applyPlacement(v,r),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,r=this.tip(),a=r[0].offsetWidth,i=r[0].offsetHeight,s=parseInt(r.css("margin-top"),10),o=parseInt(r.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(o)&&(o=0),e.top=e.top+s,e.left=e.left+o,
r.offset(e).addClass("in");var l=r[0].offsetWidth,u=r[0].offsetHeight;if("top"==t&&u!=i&&(n=!0,e.top=e.top+i-u),/bottom|top/.test(t)){var d=0;e.left<0&&(d=e.left*-2,e.left=0,r.offset(e),l=r[0].offsetWidth,u=r[0].offsetHeight),this.replaceArrow(d-a+l,l,"left")}else this.replaceArrow(u-i,u,"top");n&&r.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&&r.detach()}var n=this,r=this.tip(),a=e.Event("hide.bs."+this.type);if(this.$element.trigger(a),!a.isDefaultPrevented())return r.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r.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,r){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-r,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/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 r=e(this),a=r.data("bs.tooltip"),i="object"==typeof n&&n;
a||r.data("bs.tooltip",a=new t(this,i)),"string"==typeof n&&a[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(e)}).call(t,n(8))},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,r=this;e(this).one(e.support.transition.end,function(){n=!0});var a=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(a,t),this},e(function(){e.support.transition=t()})}(e)}).call(t,n(8))},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"},r=/^(?:html)$/i,a=function(t,n){n=n||(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(t,null):t.currentStyle);var r=!(!document.defaultView||!document.defaultView.getComputedStyle),a={top:parseFloat(r?n.borderTopWidth:e.css(t,"borderTopWidth"))||0,left:parseFloat(r?n.borderLeftWidth:e.css(t,"borderLeftWidth"))||0,
bottom:parseFloat(r?n.borderBottomWidth:e.css(t,"borderBottomWidth"))||0,right:parseFloat(r?n.borderRightWidth:e.css(t,"borderRightWidth"))||0};return{top:a.top,left:a.left,bottom:a.bottom,right:a.right,vertical:a.top+a.bottom,horizontal:a.left+a.right}},i=function(t){var n=e(window),i=r.test(t[0].nodeName);return{border:i?{top:0,left:0,bottom:0,right:0}:a(t[0]),scroll:{top:(i?n:t).scrollTop(),left:(i?n:t).scrollLeft()},scrollbar:{right:i?0:t.innerWidth()-t[0].clientWidth,bottom:i?0:t.innerHeight()-t[0].clientHeight
},rect:function(){var e=t[0].getBoundingClientRect();return{top:i?0:e.top,left:i?0:e.left,bottom:i?t[0].clientHeight:e.bottom,right:i?t[0].clientWidth:e.right}}()}};e.fn.extend({scrollIntoView:function(a){a=e.extend({},n,a),a.direction=t["string"==typeof a.direction&&a.direction.toLowerCase()]||t.both;var s="";a.direction.x===!0&&(s="horizontal"),a.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:i(o),s:i(l)};if(a.center){
var d=(u.s.rect.bottom-u.s.rect.top-(u.e.rect.bottom-u.e.rect.top))/2,c=(u.s.rect.right-u.s.rect.left-(u.e.rect.right-u.e.rect.left))/2;a.direction.y&&(u.e.rect.top-=d,u.e.rect.bottom+=d),a.direction.x&&(u.e.rect.left-=c,u.e.rect.right+=c)}var f={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={};
a.direction.y===!0&&(f.top<0?p.scrollTop=u.s.scroll.top+f.top:f.top>0&&f.bottom<0&&(p.scrollTop=u.s.scroll.top+Math.min(f.top,-f.bottom))),a.direction.x===!0&&(f.left<0?p.scrollLeft=u.s.scroll.left+f.left:f.left>0&&f.right<0&&(p.scrollLeft=u.s.scroll.left+Math.min(f.left,-f.right))),e.isEmptyObject(p)?e.isFunction(a.complete)&&a.complete.call(l[0]):(r.test(l[0].nodeName)&&(l=e("html,body")),l.animate(p,a.duration).eq(0).queue(function(t){e.isFunction(a.complete)&&a.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,a,i){var o=t["string"==typeof a[3]&&a[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:r.test(e.nodeName)};if(!u.x&&!u.y&&!u.isRoot)return!1;var d={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&&d.scrollableY()||o.x&&d.scrollableX()}})}(e)}).call(t,n(8))},function(e,t,n){var r,a;r=[n(8),n(2539)],a=function(e,t){"use strict";e.fn.translate=function(e,n){var r=t.csstransforms3d?"translate3d("+e+"px, "+n+"px, 0)":"translate("+e+"px, "+n+"px)";if(1===this.length){var a=this[0].style;"webkitTransform"in a?a.webkitTransform=r:"OTransform"in a?a.OTransform=r:a.transform=r;
}else this.css("transform",r)}}.apply(t,r),!(void 0!==a&&(e.exports=a))},function(e,t,n){"use strict";function r(){if(l.length)throw l.shift()}function a(e){var t;t=o.length?o.pop():new i,t.task=e,s(t)}function i(){this.task=null}var s=n(902),o=[],l=[],u=s.makeRequestCallFromTimer(r);e.exports=a,i.prototype.call=function(){try{this.task.call()}catch(e){a.onerror?a.onerror(e):(l.push(e),u())}finally{this.task=null,o[o.length]=this}}},function(e,t){(function(t){"use strict";function n(e){o.length||(s(),
l=!0),o[o.length]=e}function r(){for(;u<o.length;){var e=u;if(u+=1,o[e].call(),u>d){for(var t=0,n=o.length-u;t<n;t++)o[t]=o[t+u];o.length-=u,u=0}}o.length=0,u=0,l=!1}function a(e){var t=1,n=new c(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}function i(e){return function(){function t(){clearTimeout(n),clearInterval(r),e()}var n=setTimeout(t,0),r=setInterval(t,50)}}e.exports=n;var s,o=[],l=!1,u=0,d=1024,c=t.MutationObserver||t.WebKitMutationObserver;
s="function"==typeof c?a(r):i(r),n.requestFlush=s,n.makeRequestCallFromTimer=i}).call(t,function(){return this}())},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?r.apply(void 0,t):a.apply(void 0,t)}function r(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,a(e,t,n))}}),e}function a(e,t,n){var r=n.value;if("function"!=typeof r)throw new Error("@autobind decorator can only be applied to methods not: "+typeof r);return{configurable:!0,get:function(){if(this===e.prototype)return r;var n=r.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2037),i=r(a),s=n(35),o=r(s),l=o.default.extend({constructor:function(e){this.ga=this.createGaQueue(),(0,i.default)("create",e,"auto")},createGaQueue:function(){var e=function t(){t.queue.push(arguments)};return e.queue=[],e.run=function(){for(;e.queue.length;)i.default.apply(window,e.queue.shift())},e},enable:function(){this.ga.run&&this.ga.run(),this.ga=i.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 r in e)n[t[r]||r]=e[r];(0,i.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){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(35),i=r(a),s=n(32),o=r(s),l=i.default.extend({
enable:function(){(0,o.default)("[Analytics] Enabled")},disable:function(){(0,o.default)("[Analytics] Disabled")},set:function(e){(0,o.default)("[Analytics] Set options:",e)},trackView:function(e){(0,o.default)('[Analytics] Tracked view "%s"',e)},trackEvent:function(e){(0,o.default)("[Analytics] Tracked event:",e)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(32),i=r(a),s={init:function(e){(0,i.default)('[ErrorTracker] Initialized with id="%s"',e);
},enable:function(){(0,i.default)("[ErrorTracker] Enabled")},disable:function(){(0,i.default)("[ErrorTracker] Disabled")},set:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];(0,i.default)("[ErrorTracker] Set options:",e)},capture:function(e,t){i.default.error("[ErrorTracker] Captured error:",e,t)}};t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(11).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i),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=r({},this.defaults,e)},trackView:function(e,t){this.trackEvent(r({event:"client:view",interaction:!0,properties:e},t))},trackClick:function(e,t){this.trackEvent(r({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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(840),i=r(a);i.default.debug=!1;var s={},o={},l={userTitle:"username",userID:"id"},u=!1,d={init:function(e){i.default.config(e)},enable:function(){u||(u=!0,i.default.install())},disable:function(){u&&(u=!1,i.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?i.default.setRelease(n):l[t]?(o[l[t]]=n,i.default.setUserContext(o)):(s[t]=n,i.default.setTagsContext(s))}},capture:function(e,t){i.default.captureException(e,t)}};t.default=d,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";function r(e){var t=e.get("machineIdentifier");t in C||(C[t]=0),
C[t]++,_.default.info("[Companion] Server %s has had %s poll errors",e.get("debugName"),C[t])}function a(e){var t=e.get("machineIdentifier");C[t]=0}function i(e){return C[e.get("machineIdentifier")]>=3}function s(e){return e&&!e.get("isCloud")&&"iOS"!==e.get("platform")&&e.supports("companionProxy")}function o(e){return e&&e.get("isPrivate")&&e.get("isConnected")&&!e.get("isPossiblyCrossNetworkProtected")}function l(e){return s(e)&&o(e.get("activeConnection"))&&!i(e)}function u(e){return l(e)&&!e.get("shared");
}var d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(8),f=d(c),p=n(3),h=d(p),v=n(14),g=n(35),m=d(g),y=n(655),b=d(y),P=n(49),w=d(P),S=n(32),_=d(S),T=n(56),I=d(T),M=f.default.Deferred().resolve(),C={},x=m.default.extend({mixins:[I.default],commandID:0,proxyServerDecisionDebounce:2e3,initialize:function(){h.default.bindAll(this,"_checkPollRequestStatus","_pickProxyServer","_poll","_sendResponse","onPollSuccess","onPollError")},getDeepLink:function(){return M.promise()},publish:function(e){
var t=this;if(this.proxyServer){if(this.timelineInflight)return void(this._pendingTimeline=e);this.timelineInflight=!0;var n=b.default.writeXml(e),r=h.default.result(this.proxyServer,"url"),a=this.proxyServer.getXHROptions(r+"player/proxy/timeline?commandID="+this.commandID);a.data="timeline="+encodeURIComponent(n),a.method="POST",a.contentType="application/x-www-form-urlencoded",f.default.ajax(a).always(function(){t.timelineInflight=!1;var e=t._pendingTimeline;e&&(delete t._pendingTimeline,t.publish(e));
})}},subscribe:function(e){this.started||(this.callback=e,this.started=!0,this.servers=(0,v.resolve)("appModel").get("servers"),this._debouncePickProxyServer=h.default.debounce(this._pickProxyServer,this.proxyServerDecisionDebounce),this.listenTo(this.servers,"change:connected",this._debouncePickProxyServer),this._debouncePickProxyServer())},unsubscribe:function(){this.started&&(this.started=!1,this.stopListening(this.servers,"change:connected",this._debouncePickProxyServer),this.callback=null,this.proxyServer=null,
this._clearPollRequestStatusCheck(),this.pollRequest&&(this.pollRequest.abort(),this.pollRequest=null))},registerPlayer:function(e,t){return this.cloudServer=e,this.clientID=t,this.playerRegistrationDeferred=f.default.Deferred(),this.playerRegistrationDeferred.promise()},_pickProxyServer:function(){this.started&&(this.proxyServer&&l(this.proxyServer)||(this.proxyServer=this.servers.find(u)||this.servers.find(l),this.proxyServer?(this._registerServer(),_.default.info("[Companion] Found proxy",this.proxyServer.get("friendlyName")),
this._poll()):_.default.warn("[Companion] No proxy found")))},_registerServer:function(){if(this.proxyServer&&this.cloudServer&&this.clientID){var e=h.default.result(this.cloudServer,"url"),t=e+"devices/"+this.clientID+"?proxiedBy="+this.proxyServer.id,n=this.cloudServer.getXHROptions(t);n.data="_method=PUT",n.method="POST",n.headers["X-Plex-Provides"]="player",f.default.ajax(n).done(this.playerRegistrationDeferred.resolve).fail(this.playerRegistrationDeferred.reject)}},_poll:function(){if(this.started){
var e=this.proxyServer;if(!e)return void _.default.info("[Companion] No proxy server available to long poll");if(this._isPollRequestPending())return void _.default.info("[Companion] Long poll already open");this._clearPollRequestStatusCheck(),this._checkPollRequestStatusLater();var t=h.default.result(e,"url"),n=e.getXHROptions(t+"player/proxy/poll");_.default.info("[Companion] Opening long poll to %s at %s",e.get("friendlyName"),t),n.data=h.default.extend(n.data||{},{deviceClass:"pc",protocolVersion:"1",
protocolCapabilities:"timeline,playback,navigation,mirror,playqueues"}),this.pollRequest=f.default.ajax(n).done(this.onPollSuccess).fail(this.onPollError)}},_isPollRequestPending:function(){return!!this.pollRequest&&"pending"===this.pollRequest.state()},_checkPollRequestStatus:function(){this._isPollRequestPending()&&(_.default.info("[Companion] Poll connection established successfully"),a(this.proxyServer))},_checkPollRequestStatusLater:function(){this._pollRequestStatusCheckTimeout=setTimeout(this._checkPollRequestStatus,5e3);
},_clearPollRequestStatusCheck:function(){this._pollRequestStatusCheckTimeout=clearTimeout(this._pollRequestStatusCheckTimeout)},_processCommand:function(e){var t=this;if(this.started){var n={path:e.path,commandID:e.commandID,query:{key:[e.queryKey],offset:[e.queryOffset],containerKey:[e.queryContainerKey],playQueueID:[e.queryPlayqueueid],type:[e.queryType],volume:[e.queryVolume],repeat:[e.queryRepeat],subtitleStreamID:[e.querySubtitleStreamID],token:[e.queryToken],machineIdentifier:[e.queryMachineIdentifier],
protocol:[e.queryProtocol],address:[e.queryAddress],port:[e.queryPort],text:[e.queryText],field:[e.queryField]}},r="resolved"!==M.state();this.callback(n,r).always(function(e){r&&e&&e.deferredAction&&M.resolve(e.deferredAction),t._sendResponse(e.controllerResponse)})}},_sendResponse:function(e){if(this.proxyServer){var t=h.default.result(this.proxyServer,"url"),n=parseInt(e.commandID,10);this.commandID<n&&(this.commandID=n);var r=this.proxyServer.getXHROptions(t+"player/proxy/response?commandID="+e.commandID);
r.data="response="+encodeURIComponent(e.body),r.method="POST",r.contentType="application/x-www-form-urlencoded",f.default.ajax(r)}},onPollSuccess:function(e){var t=this,n=e&&w.default.parseXML(e),r=n&&n.Command;if(e?n?r||_.default.warn("[Companion] Poll succeeded without a Command response",n):_.default.warn("[Companion] Poll succeeded without a parseable response",e):_.default.warn("[Companion] Poll succeeded without a response"),!r)return void this.onPollError();this._clearPollRequestStatusCheck(),
a(this.proxyServer),this._poll();var i=h.default.isArray(r)?r:[r];i.forEach(function(e){try{_.default.info("[Companion] Received %s from %s",e.path,e.deviceName),t._processCommand(e)}catch(n){_.default.warn("[Companion] encountered %s while processing %s",n.message,e)}},this)},onPollError:function(){var e=this;arguments.length<=0||void 0===arguments[0]?{}:arguments[0];if(this.started){var t=this.proxyServer,n=t.get("isConnected"),a=t.get("debugName"),s=function(){_.default.warn("[Companion] Poll failed to %s; attempting to pick new proxy",a),
e._pickProxyServer()};return this.proxyServer=null,this._clearPollRequestStatusCheck(),r(t),i(t)?(_.default.warn("[Companion] Poll failed to %s; is no longer an eligible proxy",a),void s()):void(n?(_.default.warn("[Companion] Poll failed to %s; testing all connections",a),t.testAllConnections().done(function(){_.default.info("[Companion] Poll failed to %s; server is available",a)}).fail(function(){_.default.warn("[Companion] Poll failed to %s; unable to reconnect",a)}).always(s)):s())}}}),E=new x;
t.default=E,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2038),i=r(a),s=n(35),o=r(s),l=o.default.extend({load:function(e,t){this.dashPlayer&&this.stop(),this.dashPlayer=new i.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){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(51),o=r(s),l=n(313),u=r(l),d=n(201),c=r(d),f=n(549),p=r(f),h=p.default.extend({type:o.default.types.MUSIC,modelDefaults:function(){var e=p.default.prototype.modelDefaults.apply(this,arguments);return i.default.extend(e,{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 u.default.getPlayerDecision({type:this.type,profile:this.profile,item:e,offset:t.offset,fallbackServer:t.fallbackServer,transcoder:c.default})},shouldSkipOnError:function(){return!0}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(12),u=r(l),d=n(316),c=r(d),f=n(35),p=r(f),h=n(65),v=r(h),g=n(51),m=r(g),y=n(56),b=r(y),P=n(378),w=r(P),S=p.default.extend({
mixins:[b.default,w.default],type:m.default.types.PHOTO,slideshowDelay:5e3,skipTransition:!1,modelDefaults:function(){var e=w.default.modelDefaults.apply(this,arguments),t=i.default.first(e.metadataItem.get("Media")),n=t&&i.default.first(t.Part);return i.default.extend(e,{media:t,part:n,ready:!0,canPlayPause:!0,canStop:!0,showEnterFullscreen:v.default.hasFullscreen})},initialize:function(e){w.default.initialize.apply(this,arguments),this.loop=!(!e||!e.loop),i.default.bindAll(this,"skipPrevious","skipNext"),
this.listenTo(u.default,{"companion:pause":this.pause,"companion:play":this.play,"companion:stop":this.stop,"companion:skipNext":this.skipNext,"companion:skipPrevious":this.skipPrevious,"companion:skipTo":this.skipTo})},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}),c.default.registerPlayer(this),
o.default.Deferred().resolve().promise()},reset:function(e){this.currentItem&&this.timeline({state:m.default.states.STOPPED,continuing:!0});var t={loop:this.loop};return this.currentItem=e,this.previousItem=this.getPreviousItem(e,t),this.nextItem=this.getNextItem(e,t),this.model.set(i.default.result(this,"modelDefaults")),this.timeline().done(i.default.bind(this.updatePlayQueue,this)),e},play:function(){this.model.set({state:m.default.states.PLAYING,slideshowState:m.default.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:m.default.states.PAUSED,slideshowState:m.default.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",m.default.states.BUFFERING),w.default.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",m.default.states.BUFFERING),w.default.skipNext.apply(this,arguments)},stop:function(e,t){w.default.stop.apply(this,arguments),this.slideshowTimeout=clearTimeout(this.slideshowTimeout),
this.stopPlaybackTracking(),this.trackPlaybackEvent(),c.default.unregisterPlayer(this),u.default.trigger("hide:player",t)},onStateChange:function(e,t){this.timeline().done(i.default.bind(this.updatePlayQueue,this))},onLoadedChange:function(e,t){t&&(this.model.get("slideshowState")===m.default.slideshowStates.PLAYING?(clearTimeout(this.slideshowTimeout),this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay),this.model.set("state",m.default.states.PLAYING)):this.model.set("state",m.default.states.PAUSED));
},onErrorChange:function(e,t){t&&this.model.get("slideshowState")===m.default.slideshowStates.PLAYING&&(clearTimeout(this.slideshowTimeout),this.slideshowTimeout=setTimeout(this.skipNext,this.slideshowDelay/2))}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(377),i=r(a),s=i.default.extend({name:"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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(377),i=r(a);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=i.default.extend({name:"PersistentWebStorage",getStorage:function(){return window.localStorage}});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(377),i=r(a),s=i.default.extend({name:"VolatileWebStorage",getStorage:function(){return window.sessionStorage}});t.default=s,e.exports=t.default},function(e,t,n){"use strict";function r(e){
return 401===e.status||403===e.status||406===e.status}function a(e){var t=e.server,n=e.connection;return!T.default.get("testPrivateConnectionsWhenPublicAddressDoesNotMatch")&&!t.get("isCloud")&&!t.get("isTransient")&&!t.get("publicAddressMatches")&&n.get("isPrivate")}function i(e,t){var n=t.server,r=n.get("debugName");return S.default.warn("[Connections] Aborting connection test for %s at %s because secure connections are disallowed",r,e),u(e,t)}function s(e,t){var n=t.server,r=n.get("debugName");
return S.default.warn("[Connections] Aborting connection test for %s at %s because location does not match",r,e),u(e,t)}function o(e,t){var n=t.server,r=n.get("debugName");return S.default.warn("[Connections] Aborting connection test for %s at %s due to mixed content prevention",r,e),u(e,t)}function l(e,t){var n=t.server,r=n.get("debugName");return S.default.warn("[Connections] Aborting connection test for %s at %s due to reject direct connection debug setting",r,e),u(e,t)}function u(e,t){var n=t.connection,r=g.default.Deferred();
return h.default.defer(function(){n.set({currentTest:null,testState:M.default.testStates.UNAVAILABLE}),r.reject(n)}),r.promise()}function d(e,t){function n(t){(0,S.default)("[Connections] %s connected at %s",l,e),s.set({currentTest:null,testState:M.default.testStates.CONNECTED,serverAttrs:t}),o.resolve(s)}function a(t){var n={currentTest:null};if(t.aborting)(0,S.default)("[Connections] Aborted pending connection test for %s at %s",l,e),n.testState=M.default.testStates.ABORTED;else{var a=r(t)?M.default.testStates.UNAUTHORIZED:M.default.testStates.UNAVAILABLE;
S.default.warn("[Connections] %s is %s at %s (Status %s)",l,a,e,t.status),n.testState=a}s.set(n),o.reject(s,t)}var i=t.server,s=t.connection,o=g.default.Deferred(),l=i.get("debugName");(0,S.default)("[Connections] Testing connection for %s at %s",l,e);var u=i.getXHROptions(e);u.timeout=i.connectionTestTimeout,T.default.get("emulateCNP")&&!T.default.get("proxied")&&s.get("isPrivate")&&(u.url="cnpfail"+u.url);var d=g.default.ajax(u);return s.set({currentTest:d,testState:M.default.testStates.PENDING
}),d.done(function(t,r,s){if(i.get("isCloud"))return void n();var o=i.parse(t),u=!!o.machineIdentifier;i.get("isTransient")&&o.machineIdentifier===i.get("originalMachineIdentifier")&&(o.machineIdentifier=i.get("machineIdentifier")),!u||i.id&&o.machineIdentifier!==i.id?(S.default.warn("[Connections] %s has an unexpected machine identifier at %s",l,e),a(s)):n(o)}),d.fail(a),o.promise()}function c(e){var t=e.server,n=e.connection,r=t.resolveUrl(e.url||"/",{connection:n});return T.default.get("allowHttpsMediaServerConnections")||!n.get("isHttps")||t.get("isCloudBased")?T.default.get("allowMixedContent")||!P.default.isHostedHttps||n.get("isHttps")?a(e)?s(r,e):t.get("isCloud")||n.get("relay")||!y.default.get("rejectDirectConnections")?d(r,e):l(r,e):o(r,e):i(r,e);
}var f=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var p=n(3),h=f(p),v=n(8),g=f(v),m=n(40),y=f(m),b=n(65),P=f(b),w=n(32),S=f(w),_=n(63),T=f(_),I=n(133),M=f(I);e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(927),i=r(a);t.testServerConnection=i.default;var s=n(925),o=r(s);t.abortServerConnectionTest=o.default;var l=n(926),u=r(l);t.populateServerIdentity=u.default;var d=n(931),c=r(d);t.signIn=c.default;
var f=n(932),p=r(f);t.signOut=p.default;var h=n(930),v=r(h);t.resetUser=v.default;var g=n(933),m=r(g);t.switchUser=m.default;var y=n(929),b=r(y);t.authenticateWithServer=b.default;var P=n(928),w=r(P);t.authenticateWithHash=w.default;var S=n(921),_=r(S);t.selectStream=_.default;var T=n(922),I=r(T);t.updateWatchedStatus=I.default;var M=n(919),C=r(M);t.deleteFile=C.default;var x=n(920),E=r(x);t.deleteItem=E.default;var k=n(924),D=r(k);t.resumePlayQueue=D.default;var A=n(923),O=r(A);t.persistPlayQueue=O.default;
},function(e,t,n){"use strict";function r(e){var t,n=e.item,r=e.media,a=n.server;if(r){var i="/library/metadata/"+n.id+"/media/"+r.id,o=s.default.extend(a.getXHROptions(i),{type:"DELETE"});t=l.default.ajax(o),t.done(function(){var t=e.item.get("Media");t.splice(s.default.indexOf(t,r),1),n.trigger("change:Media",n,n.get("Media"))})}else t=n.destroy({wait:!0});return t.fail(function(e){var t=403===e.status?(0,d.default)("Ensure that media deletion is enabled for library content in your server settings."):(0,
d.default)("There was a problem deleting this item.");f.default.trigger("show:alert",{type:"error",message:t})}),t}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=p.default.execute("deleteFile",e);return t.done(function(){var t=e.item,n=a(t.get("parentKey"),e);if(!n)return void i(e);var r=n.get("children").getCollection();if(r.length)return void s(n.get("key"),e);
n.trigger("destroy",n,n.collection);var o=a(t.get("grandparentKey"),e);if(!o)return void i(e);var l=o.get("children").getCollection();l.length?s(o.get("key"),e):i(e)}),t}function a(e,t){if(!e)return!1;var n=new v.default({key:e},{server:t.item.server,onlyIfCached:!0});return!u.default.isEmpty(n)&&n}function i(e){if(!e.skipRedirect){var t=e.item;t.section?c.default.trigger("navigate","section",{serverID:t.server.id,sectionID:t.section.id,replace:!0}):c.default.trigger("navigate:back")}}function s(e,t){
if(!t.skipRedirect){var n=t.item;c.default.trigger("navigate","details",{serverID:n.server.id,key:e,replace:!0})}}var o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=o(l),d=n(12),c=o(d),f=n(27),p=o(f),h=n(57),v=o(h);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=u.default.Deferred(),n=e.item,r=n.server,a=e.media||o.default.first(n.get("Media")),i=e.part||a&&o.default.first(a.Part),s=e.streamType,l=e.streamID;if(!a||!i)return t.reject().promise();
var d={};d[s.key]=l,!e.media&&r.supports("allPartsStreamSelection")&&(d.allParts=1);var f=m.join(["/library/parts/",i.id],d),h=o.default.extend(r.getXHROptions(f),{type:"PUT"}),g=u.default.ajax(h);return g.done(function(){(0,v.default)(a,s,l),n.trigger("change:streams"),t.resolve()}),g.fail(function(e){p.default.trigger("show:alert",{type:"error",message:(0,c.default)("There was a problem selecting the stream for this item.")}),t.reject(e)}),t.promise()}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(3),o=a(s),l=n(8),u=a(l),d=n(5),c=a(d),f=n(12),p=a(f),h=n(403),v=a(h),g=n(26),m=i(g);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t,n,r=e.watched;e.item?(t=e.item,n=[t]):e.items&&(n=e.items,t=n[0]);var s=u.default.map(n,function(e){var t=r?"scrobble":"unscrobble",n={identifier:e.get("identifier")||"com.plexapp.plugins.library"};e.server.get("isCloudSyncServer")?(n.key=e.get("key"),n.ratingKey=e.get("ratingKey")):n.key=e.get("ratingKey");var s=b.join(["/:/",t],n),o=c.default.ajax(e.server.getXHROptions(s));
return o.done(function(){i(e,r),a(e,r)}),o}),o=c.default.when.apply(c.default,s);return o.fail(function(){var e;e=r?(0,p.default)("There was a problem marking this item as watched."):(0,p.default)("There was a problem marking this item as unwatched."),v.default.trigger("show:alert",{type:"error",message:e})}),o}function a(e,t){var n=m.default.get(e.get("type"));if(n&&"directory"===n.element){e.set({unviewedLeafCount:t?0:e.get("leafCount"),viewedLeafCount:t?e.get("leafCount"):0});var r=e.get("children")||e.get("items");
r&&r.getCollection().each(function(e){a(e,t)})}else e.set({viewOffset:0,viewCount:t?1:0})}function i(e,t){var n,r=m.default.get(e.get("type")),a=e.parent;if(a&&a.get("isMetadataList")&&(a=a.parent),a&&(n=m.default.get(a.get("type"))),n&&n.id===r.parent){var s,o="directory"===r.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}),i(a,t)}}var s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var l=n(3),u=s(l),d=n(8),c=s(d),f=n(5),p=s(f),h=n(12),v=s(h),g=n(37),m=s(g),y=n(26),b=o(y);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=t.playQueue;if(!n.get("playQueueID")||!n.server)return c.default.Deferred().reject().promise();var r=m.default.getTypeByElement(n.get("mediaType"));if("music"!==r)return c.default.Deferred().reject().promise();var a=u.default.pick(t,"position","autoplay","inline");return a=u.default.extend(a,{serverID:n.server.id,
playQueueID:n.get("playQueueID"),mediaType:r}),(0,v.default)(e.fetch()).then(u.default.bind(e.save,e,a))}function a(e){return e.destroy()}function i(e){var t=p.resolve("appModel"),n=t.get("user"),i=new b.default({},{user:n});return e?r(i,e):a(i)}var s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=s(l),d=n(8),c=s(d),f=n(14),p=o(f),h=n(140),v=s(h),g=n(51),m=s(g),y=n(572),b=s(y);t.default=i,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=r(i),o=n(14),l=a(o),u=n(51),d=r(u),c=n(27),f=r(c),p=n(572),h=r(p),v=function(e){var t=l.resolve("appModel"),n=new h.default({},{user:e}),r=n.fetch().then(function(){return t.get("servers").populateServer(n.get("serverID"))}).then(function(e){return e.get("playQueueManager").populateQueue(n.get("playQueueID"),d.default.getElementByType(n.get("mediaType")))}).then(function(e){return s.default.when(e,n.get("position"),n.get("autoplay"),n.get("mediaType"),n.get("inline"));
}).then(function(e,t,n,r,a){return"music"!==r?f.default.execute("persistPlayQueue",null):f.default.execute("playMedia",{type:r,item:e,playQueue:e,offset:t,autoplay:n,inline:a})}).fail(function(){f.default.execute("persistPlayQueue",null)});return r};t.default=v,e.exports=t.default},function(e,t,n){"use strict";function r(e){return(0,a.resolve)("serverConnectionTestManager").abortConnectionTest(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(14);t.default=r,e.exports=t.default},function(e,t,n){
"use strict";function r(e){var t=e.server,n=e.connection;if(t.id)return l.default.Deferred().resolve(t.id).promise();var r=t.resolveUrl("/identity",{connection:n}),a=s.default.extend(t.getXHROptions(r),{timeout:t.connectionTestTimeout});(0,f.default)("[Identity] Requesting the machine identifier of "+t.get("debugName")+" at "+r);var i=l.default.ajax(a).promise();return i=i.then(function(e){var n=l.default.Deferred(),r=d.default.parseXML(e),a=r&&r.machineIdentifier;return a?((0,f.default)("[Identity] Machine identifier found for "+t.get("debugName")+": "+a),
!t.collection||t.collection.get(a)?n.resolve(a):(t.collection.populateServer({isCloud:!0}).done(function(e){e.get("resources").populate().always(function(){n.resolve(a)})}),t.collection.findServer({isCloud:!0}).done(function(e){e.populate().fail(function(){n.resolve(a)})}).fail(function(){n.resolve(a)}))):n.reject(),n.promise()}),i.fail(function(){f.default.warn("[Identity] Machine identifier not found for "+t.get("debugName")+" at "+r)}),i}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(49),d=a(u),c=n(32),f=a(c);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return(0,a.resolve)("serverConnectionTestManager").queueConnectionTest(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(14);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=s.default.Deferred().resolve().promise(),n=s.default.Deferred().reject().promise(),r=u.default.getActiveUser();if(!r)return n;var a=r.get("pin"),i=r.get("authToken");
if(!a&&!e.pin)return t;var l=(0,o.resolve)("appModel").get("user"),d=l.hashPIN(e.pin,i);return a===d?t:n}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i),o=n(14),l=n(108),u=a(l);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.homeUser,n=u.resolve("appModel"),r=n.get("user"),a=t.get("uuid")||r.get("uuid"),i={pin:e.pin},s=c.join(["/api/v2/home/users/",a,"/switch"],i),l=t.server.getXHROptions(s,{type:"POST",xhrFields:{withCredentials:!1
}});return o.default.ajax(l).promise()}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(8),o=a(s),l=n(14),u=i(l),d=n(26),c=i(d);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){var e=(0,i.resolve)("appModel"),t=e.get("user"),n=t.server,r=t.clearAccessToken();return r.fail(function(){p.default.warn("Failed to clear the access token and user storage")}).always(function(){e.set("history",[]),c.default.abortAll(),t.signOut(),t.uninitialize(),
t.initialize(),o.default.trigger("clearAll:cache"),n.cache.store(n)}),(0,u.default)(r)}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(14),s=n(12),o=a(s),l=n(140),u=a(l),d=n(141),c=a(d),f=n(32),p=a(f);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){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 r=l.default.ajax(n).promise();return r=r.then(function(n){return e.remember?c.default.restorePrevious():c.default.register(p.default.getInstance()),t.signIn(n)}),r.fail(function(t){var n=void 0;if(!e.silent){var r=t.responseText&&b.default.parseXML(t.responseText),a=r&&r.error,i=s.default.isArray(a)?s.default.first(a):a;n=i?s.default.isObject(i)?(0,P.getErrorText)(i):i:(0,v.default)("There was a problem signing in to Plex."),
m.default.trigger("show:alert",{type:"error",message:n})}}),r}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(14),d=n(99),c=a(d),f=n(292),p=a(f),h=n(5),v=a(h),g=n(12),m=a(g),y=n(49),b=a(y),P=n(307);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){var e=u.default.execute("resetUser");return e=e.then(function(){return c.default.restoreDefaults(),c.default.save()}),e=e.then(function(){o.default.trigger("reset:servers");
})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=(a(i),n(12)),o=a(s),l=n(27),u=a(l),d=n(108),c=a(d);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=(0,s.resolve)("appModel").get("user"),n=t.get("signedIn"),r=t.id!==e.homeUser.id,i=e.allowGuestLock,o=r||i,l=n?d.default.execute("authenticateWithServer",e):d.default.execute("authenticateWithHash",e);return n&&o?l=l.then(function(t){
return a(t,e)}):l.done(function(){t.set("lockState",f.default.lockStates.UNLOCKED)}),l}function a(e,t){var n=(0,s.resolve)("appModel").get("user"),r=d.default.execute("resetUser");return r=r.then(function(){return n.activateStoredUser(t.homeUser.id),l.default.trigger("reset:servers"),n.signIn(e,{lockState:f.default.lockStates.UNLOCKED})})}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(14),o=n(12),l=i(o),u=n(27),d=i(u),c=n(160),f=i(c);t.default=r,e.exports=t.default},function(e,t,n){
"use strict";function r(){return s.default.ajaxPrefilter(l.default),d.default.startListening(),s.default.Deferred().resolve().promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(8),s=a(i),o=n(1148),l=a(o),u=n(141),d=a(u);e.exports=t.default},function(e,t,n){"use strict";function r(){d.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")),d.default.set(e),d.default.enable(),s.default.Deferred().resolve().promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=r;var i=n(8),s=a(i),o=n(192),l=a(o),u=n(191),d=a(u),c=n(905);a(c);e.exports=t.default},function(e,t,n){"use strict";function r(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 a(e){var t=u.default.get("skipSignIn");return t.always(function(t){e.set("skipSignIn","1"===t);
}),t}function i(){var e=(0,o.resolve)("appModel"),t=r(e),n=a(e);return(0,c.default)(t,n)}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(14),l=n(99),u=s(l),d=n(411),c=s(d),f=n(416),p=s(f);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e.get("isCloud")}function a(){var e=new f.default({name:"CloudServerEventManager",appModel:(0,l.resolve)("appModel"),isValidServer:r,supportsLongPolling:!0,showTimelineStatus:!1,ServerEventConnection:d.default,
ServerRetryManager:h.default});return e.start(),o.default.Deferred().resolve().promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(8),o=i(s),l=n(14),u=n(1133),d=i(u),c=n(552),f=i(c),p=n(550),h=i(p);e.exports=t.default},function(e,t,n){"use strict";function r(){var e=(0,u.resolve)("appModel"),t=e.get("cloudServer"),n=e.get("clientID");t.get("authorized")&&n&&n!==y&&(y=n,p.default.info('[Companion] Registering player with plex.tv, clientID="%s"',n),v.default.registerPlayer(t,n).done(function(){
p.default.info('[Companion] Registered player with plex.tv, clientID="%s"',n)}).fail(function(e){e||(e={}),y=null,p.default.warn('[Companion] Couldn\'t register player with plex.tv, status="%s", response="%s"',e.status,e.responseText&&e.responseText.substr(0,100))}))}function a(){var e=c.default.getInstance(),t=e.get("companion"),n=(0,u.resolve)("appModel"),a=n.get("cloudServer");t?(n.on("change:clientID",r),a.on("change:authorized",r),v.default.subscribe(m.default.onSignal)):(n.off("change:clientID",r),
a.off("change:authorized",r),v.default.unsubscribe())}function i(){var e=c.default.getInstance();return e.on("change:companion",a),a(),c.default.get("companion")?v.default.getDeepLink():l.default.Deferred().resolve().promise()}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(8),l=s(o),u=n(14),d=n(40),c=s(d),f=n(32),p=s(f),h=n(373),v=s(h),g=n(955),m=s(g),y=null;e.exports=t.default},function(e,t,n){"use strict";function r(){d.default.init("https://67349abf654648e18514f1fbcb1603c8@app.getsentry.com/34246");
var e={lifecycle:"started",release:"9e983f7dda669917d952187b3368452c644969ba",version:l.default.prop("X-Plex-Version")};return l.default.props.forEach(function(t){var n=l.default.prop(t);n&&(e[t]=n)}),d.default.set(e),d.default.enable(),s.default.Deferred().resolve().promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(8),s=a(i),o=n(192),l=a(o),u=n(374),d=a(u),c=n(906);a(c);e.exports=t.default},function(e,t,n){"use strict";function r(){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 a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(8),s=a(i),o=n(14),l=n(192),u=a(l);e.exports=t.default},function(e,t,n){"use strict";function r(){var e=f.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 r=[];return n.forEach(function(e){var n=e.entitlements,a=e.servers,i={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&&i.entitlements.push({id:t})}),a&&a.forEach(function(e){var t=e.connections,n=e.sources,r=!(!t||!t.length),a=!(!n||!n.length);if(e.machineIdentifier&&r&&a){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)}),i.servers.push(o)}}),r.push(i)}),{v:f.default.set("users",JSON.stringify({users:r}))}}();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 f.default.remove("connections");
}),(0,d.default)(e)}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(41),l=a(o),u=n(140),d=a(u),c=n(99),f=a(c);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){(0,m.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(),a()}function a(){(0,m.default)("[Servers] Initializing..."),i(),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,m.default)("[Servers] Finished initialization")}function i(){var e=(0,y.resolve)("appModel"),t=e.get("servers"),n=e.get("cloudServer");n.addConnection({scheme:P.default.get("myPlexScheme")||S.default.get("myPlexScheme"),
address:P.default.get("myPlexUrl")||S.default.get("myPlexUrl")}),t.add(n)}function s(e){var t=(0,y.resolve)("appModel"),n=t.get("servers"),r=T.default.getActiveServers();r&&r.each(function(e){if(e.get("connections").length)try{var r=new M.default(e.toJSON(),{parent:t});n.add(r)}catch(a){m.default.warn(a)}})}function o(){var e=(0,y.resolve)("appModel"),t=e.get("servers"),n=S.default.get("primaryServer");if(n){var r=new M.default({machineIdentifier:n.machineIdentifier,friendlyName:n.name,isShared:n.shared,
superToken:n.superToken,accessToken:n.accessToken,sourceTitle:n.sourceTitle},{parent:e});r.addConnection({scheme:n.scheme,address:n.address,port:n.port}),t.add(r)}}function l(){var e=(0,y.resolve)("appModel"),t=e.get("servers"),n=new M.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(S.default.get("allowLoopbackDiscovery")){var e=(0,y.resolve)("appModel"),t=e.get("servers"),n=new M.default({},{
parent:e});n.addConnection({scheme:"http",address:"127.0.0.1",port:"32400"}),t.add(n)}}function d(){return a(),v.default.on("reset:servers",r),p.default.Deferred().resolve().promise()}var c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var f=n(8),p=c(f),h=n(12),v=c(h),g=n(32),m=c(g),y=n(14),b=n(40),P=c(b),w=n(63),S=c(w),_=n(108),T=c(_),I=n(89),M=c(I);e.exports=t.default},function(e,t,n){"use strict";function r(){var e=s.default.Deferred();return s.default.when(d.default.populate(),f.default.populate()).always(function(){
var t=d.default.get("language");l.default.load(t).always(function(){e.resolve()})}),e.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(8),s=a(i),o=n(291),l=a(o),u=n(40),d=a(u),c=n(108),f=a(c);e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.default)()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(941),s=a(i);e.exports=t.default},function(e,t,n){"use strict";function r(){var e=s.default.Deferred(),t=u.default.get("myPlexAccessToken");
return t.done(function(e){var t=(0,o.resolve)("appModel").get("user"),n=c.default.get("users"),r=n.findWhere({authToken:e});r&&t.activateStoredUser(r.id)}),t.always(function(){e.resolve()}),e.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(8),s=a(i),o=n(14),l=n(99),u=a(l),d=n(108),c=a(d);e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(35),i=r(a),s=n(56),o=r(s),l=n(191),u=r(l),d=n(578),c=r(d),f=i.default.extend({
mixins:o.default,start:function(){var e=c.default.populate();e.done(function(){var e=c.default.get("heartbeatTime")-c.default.get("startTime"),t=Math.round(e/1e3),n=c.default.get("playbackCount");u.default.trackEvent({eventCategory:"App",eventAction:"Shutdown",eventValue:t,metric1:n})}),e.always(function(){c.default.startSession(),u.default.trackEvent({eventCategory:"App",eventAction:"Start",eventValue:1,sessionControl:"start"})})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(32),i=r(a),s=n(35),o=r(s),l=n(12),u=r(l),d=n(56),c=r(d),f=n(41),p=r(f),h=n(40),v=r(h),g=n(108),m=r(g),y=n(63),b=r(y),P=n(160),w=r(P),S=o.default.extend({mixins:c.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},r=["isSignedIn","isLocked","isUnlocked","hasInvalidToken"];r.forEach(function(r){var a=t.get(r),i=r.charAt(0).toUpperCase()+r.slice(1),s=e["on"+i+"Change"];
n["change:"+r]=s,a&&s.call(e,t,a)}),this.listenTo(t,n);var a=b.default.get("proxied")||v.default.get("autoLogin")||t.get("isUnlocked");(0,i.default)("[UserManager] autoLogin",a),a||this._lockIfInHome()},_lockIfInHome:function(){var e=m.default.getActiveUser();e&&e.get("home")&&this.user.set("lockState",w.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=m.default.getActiveUser();if(t)t.copyFromUser(e);else{var n=m.default.get("users");n.add(e.toJSON(),{parse:!0})}m.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=S,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(35),i=r(a),s=n(56),o=r(s),l=i.default.extend({mixins:o.default,start:function(){}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(79).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(35),s=a(i),o=n(12),l=a(o),u=n(56),d=a(u),c=n(89),f=a(c),p=n(1033),h=a(p),v="manualServer",g=s.default.extend({mixins:[d.default],initialize:function(e){this.appModel=e.appModel,this.servers=this.appModel.get("servers");
},start:function(){this.listenTo(h.default,"change",this.onManualConnectionChange),this.initManualServer()},stop:function(){this.stopListening()},initManualServer:function(){function e(e){var t=h.default.get("ip"+e),n=h.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 r=this.appModel.get("primaryServer"),a=v+n,i=this.servers.find(function(e){return e.hasSource(a)});if(i){i.removeSource("internal"),i.removeSource(a);
var s=i.get("connections").findWhere({isConnected:!0});s||i!==r||l.default.trigger("navigate","dashboard",{replace:!0})}},addManualConnection:function(e,t,n){var r=v+n,a={scheme:"http",address:e,port:t.toString(),sources:{id:r}},i=new f.default({friendlyName:e});i.addConnection(a),this.servers.add(i)},onManualConnectionChange:function(e){var t=r(e.changed)[0],n=t.slice(-1),a="ip"+n,i="port"+n,s=e.previous(a),o=e.previous(i),l=e.get(a),u=e.get(i);s&&o&&this.removeManualConnection(s,o,n),l&&u&&this.addManualConnection(l,u,n);
}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(14),i=n(35),s=r(i),o=n(56),l=r(o),u=s.default.extend({mixins:l.default,start:function(){var e=(0,a.resolve)("appModel").get("user");this.listenTo(e,"change:id",this.onUserIDChange)},onUserIDChange:function(e,t){(0,a.resolve)("metrics").set({userId:t})}});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(8),i=r(a),s=n(35),o=r(s),l=n(56),u=r(l),d=n(32),c=r(d),f=n(63),p=(r(f),n(14)),h=n(590),v=n(1065),g=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,"change:primaryServer.change:isRelayed":this.onPrimaryServerIsRelayedChange}),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;var t=(0,p.resolve)("appStore");t.dispatch((0,h.resetPrimaryServer)());
var n=this._waitForPrimaryServer();return this._primaryServerPromise=n,n.done(function(r){if(n===e._primaryServerPromise){if(e._primaryServerPromise=null,e.appModel.get("primaryServer"))return;var a="0.9.16.0",i=!r.get("version")&&!r.get("isRejected");a&&(r.get("isOutOfDate")||i)?((0,c.default)("[Primary Server] The server, %s, is waiting for a version",r.get("debugName")),e._setPrimaryServer()):t.dispatch((0,h.changePrimaryServer)(r.id))}}).fail(function(){n===e._primaryServerPromise&&(e._primaryServerPromise=null,
e.appModel.set("isWaitingForPrimaryServer",!1))}),n},_waitForPrimaryServer:function(){var e=this,t=this.appModel.get("user"),n=t.get("lastPrimaryServerID"),r=void 0;return n?((0,c.default)("[Primary Server] Waiting for the last primary server, %s, to connect",n),r=this.servers.populateServer({machineIdentifier:n,isPrimaryEligible:!0,isOutOfDate:!1})):r=i.default.Deferred().reject().promise(),r=r.then(null,function(){return(0,c.default)("[Primary Server] Waiting for any owned server to connect"),e.servers.populateServer({
isFullOwnedServer:!0,isPrimaryEligible:!0,isOutOfDate:!1})}),r=r.then(null,function(){return(0,c.default)("[Primary Server] Waiting for any eligible server to connect"),e.servers.populateServer({isPrimaryEligible:!0,isOutOfDate:!1})}),r=r.then(null,function(){return(0,c.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){c.default.info("[Primary Server] %s is now the primary server",t.get("debugName"));
var r=e.get("user");if(r.set("lastPrimaryServerID",t.id),t.get("isConnected")?this.fetchPrimaryRelations(t):this.listenTo(t,"change:isConnected",this.onPrimaryServerConnectedChange),t.get("isRelayed")){var a=(0,p.resolve)("appStore");a.dispatch((0,v.confirmRelayConnection)({serverEntityID:t.entityID()}))}}else e.get("isWaitingForPrimaryServer")?(0,c.default)("[Primary Server] Waiting to set the primary server"):c.default.warn("[Primary Server] No primary server found")},onPrimaryServerEligibleChange:function(e,t){
var n=this.appModel.get("user");t||((0,c.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,c.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"),r=!n||!this.servers.get(n.id),a=e.get("isWaitingForPrimaryServer");r&&!a&&this._setPrimaryServer()}},onPrimaryServerIsRelayedChange:function(e,t){if(t){var n=(0,p.resolve)("appStore");n.dispatch((0,v.confirmRelayConnection)({serverEntityID:e.entityID()}))}},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,c.default)("[Primary Server] The previous primary server, %s, was removed",t.get("debugName")),
e.unset("lastPrimaryServerID"),this._setPrimaryServer())}else this._setPrimaryServer()}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(11).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(12),d=a(u),c=n(35),f=a(c),p=n(550),h=a(p),v=n(551),g=a(v),m=n(56),y=a(m),b=n(32),P=a(b),w=n(108),S=a(w),_=n(89),T=a(_),I=f.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 h.default(t),this._primaryServerRetryManager=new g.default(r({},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(d.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=S.default.getActiveServers();if((0,P.default)("[Connections] Removed connection %s from %s",e.id,t.get("debugName")),t.abortConnectionTest(e),
n){var r=n.get(t.id),a=r&&r.get("connections");a&&a.get(e.id)&&(a.remove(e.id),a.length||n.remove(t.id),S.default.debouncedSave())}},onBrowserConnectionChange:function(e){var t=this;(0,P.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=S.default.getActiveServers(),n=void 0;if(e.abortAllConnectionTests(),this._stopFailedServerRetries(e),t)if(e.get("isMerged")){var r=e.previous("machineIdentifier");r&&(n=t.get(r),n&&(n.set("machineIdentifier",e.id),S.default.debouncedSave()))}else n=t.get(e.id),n&&(t.remove(e.id),S.default.debouncedSave())},onServersReset:function(e,t){var n=this,r=t.previousModels;
s.default.each(r,function(t){e.contains(t)||(t.abortAllConnectionTests(),n._stopFailedServerRetries(t))})},onServerConnectionError:function(e){if(P.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,P.default)("[Connections] Added connection %s for %s",e.id,t.get("debugName")),e.get("relay")&&!t.get("connections").hasFailedEveryDirectConnection()||t.testConnection(e);
},onServerConnectionRemove:function(e){this._removeConnection(e)},onServerConnectionsReset:function(e,t){var n=this,r=t.previousModels;s.default.each(r,function(t){e.contains(t)||n._removeConnection(t)})},onServerConnectionConnectedChange:function(e,t){var n=e.server,r=e.get("isBundled"),a=e.get("isFallback"),i=t&&!r&&!a,o=S.default.getActiveServers();if(n.id&&!n.get("isCloud")&&i&&o){var l=o.get(n.id);if(l)l.copyFromServer(n);else{var u=s.default.omit(n.toJSON(),"connections");l=o.add(u,{merge:!0,
parse:!0})}l.get("connections").add(e.toJSON(),{merge:!0,parse:!0}),S.default.debouncedSave()}},onServerConnectionSourcesChange:function(e,t){var n=e.server,r=S.default.getActiveServers(),a=r&&r.get(n.id);if(a){var i=a.get("connections"),s=i.get(e.id);if(s){var o=s.get("sources");o.set(t.toJSON()),S.default.debouncedSave()}}},onServerAccessTokenChange:function(e,t){e.get("isCloud")||((0,P.default)("[Connections] Access token for %s changed to %s",e.get("debugName"),t),e.get("isUnauthorized")&&e.set("connectionTestResult",T.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=I,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){return function(r){return r.server===e&&r.connection.id===t.id&&r.url===n}}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(14),d=n(32),c=a(d),f=n(35),p=a(f),h=n(141),v=a(h),g=n(63),m=a(g),y=p.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,r=e.url,a=this._queuedOrExecuting(t,n,r);if(a)return a.deferred.promise();var i=l.default.Deferred();return this.queued.push({server:t,connection:n,url:r,deferred:i}),this._sortQueue(),
this.throttledStartProcessing(),i.promise()},abortConnectionTest:function(e){var t=e.server,n=e.connection,r=e.url;return this._abortCurrentTest(t,n,r),this._removeQueuedOrExecuting(t,n,r),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,r){var a=n.server,i=r.server,s=n.connection,o=r.connection,l=e._isManualConnection(s),u=e._isManualConnection(o),d=e._isMatchingLocation(a,s),c=e._isMatchingLocation(i,o);
return a.id===t&&i.id!==t?-1:i.id===t&&a.id!==t?1:a.get("isCloud")&&!i.get("isCloud")?-1:i.get("isCloud")&&!a.get("isCloud")?1:!s.get("relay")&&o.get("relay")?-1:!o.get("relay")&&s.get("relay")?1:!s.get("isConnected")&&o.get("isConnected")?-1:!o.get("isConnected")&&s.get("isConnected")?1:!a.get("isShared")&&i.get("isShared")?-1:!i.get("isShared")&&a.get("isShared")?1:a.get("isFullServer")&&!i.get("isFullServer")?-1:i.get("isFullServer")&&!a.get("isFullServer")?1:!a.get("isCloudSyncServer")&&i.get("isCloudSyncServer")?-1:!i.get("isCloudSyncServer")&&a.get("isCloudSyncServer")?1:l&&!u?-1:u&&!l?1:s.get("isBundled")&&!o.get("isBundled")?-1:o.get("isBundled")&&!s.get("isBundled")?1:d&&!c?-1:c&&!d?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(),n=t.server,r=t.connection,a=t.url;this._abortCurrentTest(n,r,a);var i=(0,u.resolve)("testServerConnection"),s=i({server:n,connection:r,url:a});this.executing.push(t),s.done(function(e,n){t.deferred.resolve(e,n)}),s.fail(function(e,n){t.deferred.reject(e,n);
}),s.always(function(){var n=e.executing.indexOf(t);e.executing.splice(n,1),e._process()})}},_abortCurrentTest:function(e,t,n){var r=t.get("currentTest"),a=e.resolveUrl(n||"/",{connection:t});r&&"pending"===r.state()&&((0,c.default)("[Connections] Aborting pending connection test for %s at %s",e.get("debugName"),a),v.default.abort(r.rid),r.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"),r=t.get("isPrivate");return n&&r||!n&&!r},_queuedOrExecuting:function(e,t,n){var a=r(e,t,n);return s.default.find(this.executing,a)||s.default.find(this.queued,a)},_removeQueuedOrExecuting:function(e,t,n){var a=r(e,t,n),i=s.default.findIndex(this.executing,a),o=s.default.findIndex(this.queued,a);i>=0&&this.executing.splice(i,1),o>=0&&this.queued.splice(o,1)}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(79).default,a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),s=a(i),o=n(35),l=a(o),u=n(12),d=a(u),c=n(32),f=a(c),p=n(56),h=a(p),v=n(89),g=a(v),m=n(577),y=a(m),b=n(108),P=a(b),w=r(y.default.prototype.syncedAttrs),S=l.default.extend({mixins:[h.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,"change:resources.change:presence":this.onResourcesPresenceChange}),w.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,f.default)("[Servers] Finding resources through %s",e.get("debugName")),this._waitForServers();var n=e.get("resources"),r=n.fetch().done(function(){(0,f.default)("[Servers] Found %s resources through %s",n.length,e.get("debugName")),e.set({hasFailedResources:!1,
isDownForMaintenance:!1})}).fail(function(t,n){f.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 r},_convertResourceToServer:function(e){(0,f.default)("[Servers] %s was found through %s",e.get("name"),e.server.get("debugName"));var t="Plex Media Server"===e.get("product"),n=new g.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"),platform:e.get("platform"),platformVersion:e.get("platformVersion"),presence:e.get("presence"),home:e.get("home"),synced:e.get("synced"),serverClass:t?void 0:g.default.serverClasses.SECONDARY,createdAt:e.get("createdAt"),lastSeenAt:e.get("lastSeenAt")},{parent:this.appModel});return e.get("connections").each(function(t){
var r=[{id:e.server.id}],a=s.default.extend(t.toJSON(),{sources:r});n.addConnection(a)}),n},_removeResource:function(e){(0,f.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 r=this.servers.at(n),a=t.get(r.id);if(a)for(var i=r.get("connections"),s=i.length-1;s>=0;){var o=i.at(s),l=o.get("sources");if(l.get(e.id)){
var u=a.get("connections");u.get(o.id)||o.get("sources").remove(e.id)}s--}else r.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===g.default.promiseStates.RESOLVED){var n=e.get("resources");
n&&this._fetchResources(e)}this._setAuthorized(),this._setMultiServer(),this._checkFoundAllServers()},onStoredServerAttributeChange:function(e,t,n){var r=P.default.getActiveServers(),a=r&&r.get(t.id);a&&null!=n&&a.get(e)!==n&&(a.set(e,n),P.default.debouncedSave())},onServerRemove:function(e){f.default.warn("[Servers] %s was removed",e.get("debugName")),e.cache.remove(e),d.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,r=t.previousModels;s.default.each(r,function(t){e.contains(t)||n._removeResource(t)}),this._checkFoundAllServers()},onResourcesPresenceChange:function(e){var t=this.servers.get(e.id);
t&&t.set("presence",e.get("presence"))}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){var r=_.default.writeXml({Response:{_code:t,_status:n}});return{commandID:e,body:r,responseCode:t}}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(8),u=a(l),d=n(14),c=i(d),f=n(35),p=a(f),h=n(12),v=a(h),g=n(51),m=a(g),y=n(37),b=a(y),P=n(316),w=a(P),S=n(655),_=a(S),T=n(27),I=a(T),M=n(32),C=a(M),x=n(576),E=a(x),k=n(57),D=a(k),A=n(85),O=a(A),R=n(236),L=a(R),N=p.default.extend({
initialize:function(){o.default.bindAll(this,"onSignal"),this.handlers={"/player/timeline/subscribe":[this.startTimeline],"/player/timeline/unsubscribe":[this.stopTimeline],"/player/mirror/details":[this.onMirrorDetails],"/player/playback/playMedia":[this.onPlayMedia],"/player/playback/pause":[this.onPlaybackAction,"pause"],"/player/playback/play":[this.onPlaybackAction,"play"],"/player/playback/stop":[this.onPlaybackAction,"stop"],"/player/playback/skipNext":[this.onPlaybackAction,"skipNext"],"/player/playback/skipPrevious":[this.onPlaybackAction,"skipPrevious"],
"/player/playback/stepForward":[this.onPlaybackAction,"stepForward"],"/player/playback/stepBack":[this.onPlaybackAction,"stepBack"],"/player/playback/skipTo":[this.onSkipTo],"/player/playback/seekTo":[this.onSeekTo],"/player/playback/refreshPlayQueue":[this.onRefreshPlayQueue],"/player/playback/setParameters":[this.onSetParameters],"/player/playback/setStreams":[this.onSetStreams],"/player/navigation/moveLeft":[this.onKey,"moveLeft"],"/player/navigation/moveRight":[this.onKey,"moveRight"],"/player/navigation/moveUp":[this.onKey,"moveUp"],
"/player/navigation/moveDown":[this.onKey,"moveDown"],"/player/navigation/select":[this.onKey,"select"],"/player/navigation/back":[this.onKey,"back"],"/player/navigation/home":[this.onNavigateHome],"/player/application/setText":[this.onSetText]}},startTimeline:function(){var e=c.resolve("appModel");e.has("primaryPlayer")&&e.set("primaryPlayer",null),w.default.start()},stopTimeline:function(){w.default.stop();var e=c.resolve("appModel");e.has("transientServer")&&e.unset("transientServer")},onSignal:function(e){
var t=!(arguments.length<=1||void 0===arguments[1])&&arguments[1],n=u.default.Deferred();this._signalInputActivity();var a=this.handlers[e.path];if(a){var i=a[0],s=o.default.rest(a,1);s.push(e.query,t);var l=i.apply(this,s)||u.default.Deferred().resolve().promise();l.done(function(t){var a=r(e.commandID,200,"OK");n.resolve({controllerResponse:a,deferredAction:t})}),l.fail(function(){var a=r(e.commandID,400,"Bad Request"),i=void 0;(t&&"/player/mirror/details"===e.path||"/player/playback/playMedia"===e.path)&&(i={}),
n.resolve({controllerResponse:a,deferredAction:i})})}else C.default.warn("[Companion] controller manager found no handler for",e.path);return n.promise()},_signalInputActivity:function(){var e=c.resolve("appModel"),t=e.get("inputActivity");t&&t.notice()},_buildTransientServer:function(e){var t=c.resolve("appModel"),n=new E.default({accessToken:o.default.first(e.token),machineIdentifier:"transient-"+e.machineIdentifier[0],originalMachineIdentifier:e.machineIdentifier[0]});n.addConnection({scheme:e.protocol[0],
address:o.default.first(e.address),port:o.default.first(e.port),sources:[{id:"companion"}]});var r=n.populate();return r.done(function(e){t.set("transientServer",e)}),r.fail(function(){t.unset("transientServer")}),r},_populatePlayItem:function(e,t){var n=this,r=u.default.Deferred(),a=t.containerKey;a=a&&a[0]?decodeURIComponent(a[0]):null;var i=t.key[0]?decodeURIComponent(t.key[0]):null,s=new D.default({key:i},{server:e});return s.populate().done(function(){var t=void 0,i=e.get("playQueueManager"),o=b.default.getChildMediaType(s.get("type")).element,l=L.default.prototype.getIdFromKey(a);
null!==l?t=i.populateQueue(l,o):!function(){var n=new O.default({containerKey:a},{server:e});t=n.populate(),t=t.then(function(){var e=i.createForType(o,{onServer:!1});return e.addContent(n.get("metadataItems"))})}(),t.done(function(){r.resolve(s)}).fail(function(){r.reject(n)})}).fail(function(){r.reject(n)}),r.promise()},_shouldReplaceRoute:function(){return/\/server\/transient-/.test(window.location.hash)},onMirrorDetails:function(e,t){var n=this;if(!w.default.isPlaybackActive()){var r={server:null,
key:decodeURIComponent(e.key[0]).replace("children","")},a=I.default.execute("remoteUnlock");return a=a.then(function(){return n._buildTransientServer(e)}),a=a.then(function(e){r.server=e;var t=new D.default({key:r.key},{server:e});return t.fetch()}),a=a.then(function(e){return"season"===e.get("type")&&(r.key=e.get("parentKey")),u.default.Deferred().resolve().promise()}),a=a.then(function(){var e={serverID:r.server.id,key:r.key,replace:n._shouldReplaceRoute()};return t?u.default.Deferred().resolve({
route:{name:"details",options:e}}).promise():void v.default.trigger("navigate","details",e)})}},onPlayMedia:function(e,t){function n(t){return I.default.execute("playMedia",{item:t,siblings:t.get("type")===m.default.types.PHOTO,offset:o.default.first(e.offset),isFromCompanion:!0,replace:a})}var r=this,a=this._shouldReplaceRoute(),i=I.default.execute("remoteUnlock");return i=i.then(function(){return r._buildTransientServer(e)}),i=i.then(function(t){return r._populatePlayItem(t,e)}),i=i.then(function(e){
return t?{route:{name:"noop"},command:function(){return n(e)}}:n(e)})},onPlaybackAction:function(e){v.default.trigger("companion:"+e)},onSeekTo:function(e){var t=parseInt(e.offset[0],10);v.default.trigger("companion:setPosition",t)},onRefreshPlayQueue:function(e){var t=c.resolve("appModel"),n=t.get("transientServer"),r=u.default.Deferred().reject().promise();if(!n)return r;var a=n.get("playQueueManager"),i=a.get(e.playQueueID[0]);return i?i.fetch():r},onSetParameters:function(e){var t=o.default.first(e.volume),n=o.default.first(e.repeat);
null!=t&&v.default.trigger("companion:setVolume",parseInt(t,10)),null!=n&&v.default.trigger("companion:setRepeat",parseInt(n,10))},onSetStreams:function(e){var t=o.default.first(e.subtitleStreamID);null!=t&&v.default.trigger("companion:setSubtitleStreamID",parseInt(t,10))},onSkipTo:function(e){var t=decodeURIComponent(e.key[0]);v.default.trigger("companion:skipTo",t)},onKey:function(e){v.default.trigger("companion:"+e),v.default.trigger("companion:key",e)},onNavigateHome:function(){var e=I.default.execute("remoteUnlock");
return e.done(function(){v.default.trigger("navigate:refresh:dashboard")}),e},onSetText:function(e){v.default.trigger("companion:setText",e.text[0])}});t.default=new N,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(132),o=r(s),l={bindings:i.default.extend({".artist-title":{modelAttribute:"parentTitle"},".album-title":{modelAttribute:"title"}},i.default.pick(o.default.defaultBindings,[".item-year",".item-genre"]))
};t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(132),o=r(s),l={bindings:i.default.pick(o.default.defaultBindings,[".item-title",".item-genre"])};t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(132),o=r(s),l={bindings:i.default.pick(o.default.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"])
};t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(132),o=r(s),l=n(118),u=r(l),d={bindings:i.default.extend({".show-title":{modelAttribute:"grandparentTitle"},".episode-title":{modelAttribute:"title"},".episode-index":{modelAttribute:"index",formatter:function(e){return(0,u.default)({seasonIndex:this.model.get("parentIndex"),episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0,
separator:" \xb7 "})}}},i.default.pick(o.default.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"]))};t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(132),o=r(s),l={bindings:i.default.pick(o.default.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"])
};t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(132),o=r(s),l={bindings:i.default.pick(o.default.defaultBindings,[".item-title",".item-year",".item-duration",".item-genre",".item-content-rating",".details-unwatched-count-badge",".content-rating-flag-container",".studio-flag-container"])};t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(415),u=r(l),d=n(12),c=r(d),f={},p={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(e){if(this.loadingLanguage&&this.loadingLanguage===e)return this.loadingPromise;var t,n=this.getLanguages();
return t=i.default.has(n,e)?i.default.has(this.translations,e)?o.default.Deferred().resolve().promise():o.default.ajax({dataType:"json",url:this.basePath+n[e]}):o.default.Deferred().reject().promise(),this.loadingLanguage=e,this.loadingPromise=t,t.done(i.default.bind(this.onLoadSuccess,this,t)),t.fail(i.default.bind(this.onLoadError,this,t)),t},t:function(e){if(!e)return"";var t,n,r=1,a=arguments.length;i.default.isObject(arguments[a-1])&&(n=arguments[a-1],a-=1);var s=this.getTranslation(e)||e;for(n&&n.escape&&(s=i.default.escape(s));r<a;)t=f[r],
t||(t=new RegExp((0,u.default)("{"+r+"}"),"g"),f[r]=t),s=s.replace(t,arguments[r]),r++;return s},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),c.default.trigger("change:language",n))},onLoadError:function(e){e===this.loadingPromise&&(this.loadingPromise=null,this.loadingLanguage=null)}};t.default=p,e.exports=t.default},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,r){r&&t.each(function(t){t.set(e,t===n&&r)})})}};t.default=n,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(2541),u=r(l),d=n(41),c=r(d),f=0,p=100,h={createASSRenderer:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];i.default.bindAll(this,"renderSubtitles","resizeSubtitles","getPosition","onSubtitleFailure"),
(0,c.default)(e.element,"No element defined for ASS renderer"),this.delay=e.delay||f,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=i.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=i.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=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(47),o=r(s),l=n(118),u=r(l),d={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 o.default.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=(0,u.default)({seasonIndex:e.get("parentIndex"),episodeIndex:e.get("index"),date:e.get("originallyAvailableAt"),noLeadingZero:!0,separator:" \xb7 "})),t},updateCountdown:function(){var e=(new Date).getTime(),t=e-(this.startTime||e);this.startTime=e,this.secondsLeft-=t/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(i.default.bind(this.updateCountdown,this))):this.trigger("next")},onClose:function(){window.cancelAnimationFrame(this.countdownAnimator)}};t.default=d,e.exports=t.default},,function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(235),i=r(a),s=n(973),o=i.default.extend({defaults:s.defaultValues});t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(12),i=r(a),s=n(41),o=r(s),l=n(20),u=r(l),d=n(22),c=r(d),f=n(1025),p=r(f),h=n(89),v=r(h),g=n(1016),m=r(g),y=n(576),b=r(y),P=n(160),w=r(P),S=c.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:v.default,deferred:!0},primaryServer:{relationClass:v.default,deferred:!0},transientServer:{relationClass:b.default,deferred:!0},user:{relationClass:w.default,deferred:!0}},defaults:function(){var e=new m.default({machineIdentifier:"myPlex"},{parent:this});return{authorized:!1,multiserver:!1,skipSignIn:!1,isWaitingForServers:!1,isWaitingForPrimaryServer:!1,history:[],forwardHistory:[],
cloudServer:e,user:new w.default({},{server:e,parent:this})}},constructor:function(){this._pendingEntities=[],this.listenTo(i.default,"change:entity",this.onEntityChange),c.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,r=e.model,a=this.get("entities");(0,o.default)(a,"Use `createEntitiesModelClass` to create an `entities` session relation in a platform's app model"),a.get(t).add({
id:n,model:r},{merge:!0})},onEntityChange:function(e){this.has("entities")?this._addEntity(e):this._pendingEntities.push(e)}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(970),o=r(s),l=i.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 r=n(11).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(20),s=a(i),o=n(22),l=a(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=r({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){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(47),o=r(s),l=n(35),u=r(l),d=n(56),c=r(d),f=u.default.extend({mixins:[c.default],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,t){this.superset=e,this._collection=new o.default.Collection(e.toArray()),this._proxyCollection(this._collection),this.resetFilters(),this.listenTo(e,{add:this.onSupersetAdd,remove:this.onSupersetRemove,
reset:this.onSupersetReset}),this.initialize(t)},_proxyCollection:function(e){this.models=e.models,this._proxyCollectionMethods(e),this._proxyCollectionLength(e),this._proxyCollectionEvents(e)},_proxyCollectionMethods:function(e){var t={};i.default.each(i.default.functions(o.default.Collection.prototype),function(n){i.default.contains(this.blacklistedMethods,n)||(t[n]=function(){return e[n].apply(e,arguments)})},this),i.default.extend(this,t)},_proxyCollectionLength:function(e){var t=function(){this.length=e.length;
};this.listenTo(e,"all",t),t.call(this)},_proxyCollectionEvents:function(e){var t=function(t){var n=i.default.toArray(arguments),r="change"===t||"change:"===t.slice(0,7);"reset"===t&&(this.models=e.models),i.default.contains(this.whitelistedEvents,t)?(i.default.contains(["add","remove","destroy"],t)?n[2]=this:i.default.contains(["reset","sort"],t)&&(n[1]=this),this.trigger.apply(this,n)):r&&this.contains(n[1])&&this.trigger.apply(this,n)};this.listenTo(e,"all",t)},addFilter:function(e,t){return t||(t=e,
e=this.defaultFilterName),i.default.has(this._filters,e)&&this._invalidateCacheForFilter(e),this._filters[e]=this._createFilter(t),this._execFilters(),this.trigger("filtered:add",e),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 i.default.keys(this._filters)},hasFilter:function(e){return i.default.contains(this.getFilters(),e)},refilter:function(e){return i.default.isObject(e)&&e.cid?this.onSupersetAdd(e):(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(e,t){if(i.default.isFunction(e))return e;throw new Error("Unsupported filter type")},_execFilters:function(e){
e||(e={});var t=[];this.superset&&(t=this.superset.filter(i.default.bind(this._execFiltersOnModel,this))),e.reset?this._collection.reset(t):this._collection.set(t),this.length=this._collection.length},_execFiltersOnModel:function(e){this._filterResultCache[e.cid]||(this._filterResultCache[e.cid]={});var t=this._filterResultCache[e.cid];for(var n in this._filters)if(i.default.has(this._filters,n)&&(i.default.has(t,n)||(t[n]=this._filters[n](e)),!t[n]))return!1;return!0},_invalidateCache:function(){
this._filterResultCache={}},_invalidateCacheForFilter:function(e){for(var t in this._filterResultCache)i.default.has(this._filterResultCache,t)&&delete this._filterResultCache[t][e]},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,r=t-1;r>=0;r-=1)if(this.contains(this.superset.at(r))){n=this.indexOf(this.superset.at(r))+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})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(83),i=r(a),s=i.default.extend({pageSize:10,pages:function(){return Math.max(Math.ceil(this.length/this.pageSize),1)},page:function(e,t){t||(t={});var n,r=0;
return n=t.reverse?this.length-e*this.pageSize:e*this.pageSize-this.pageSize,n<0&&(r=n,n=0),this.models.slice(n,n+this.pageSize+r)}});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(20),o=r(s),l=n(1099),u=r(l),d=n(1098),c=r(d),f=n(606),p=r(f),h=window.PLEXWEB_INLINE&&window.PLEXWEB_INLINE.acceptLanguage,v=window.navigator,g=void 0;h?g=(0,u.default)(h):v.languages?g=v.languages:v.language?g=[v.language]:v.userLanguage&&(g=[v.userLanguage]);
var m=(0,c.default)(g)||"en",y={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:p.default.DISABLED}},b=i.default.mapObject(y,function(e){return e.type});t.defaultTypes=b;var P=i.default.mapObject(y,function(e){return e.defaultValue});t.defaultValues=P,t.default=y},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(12),i=r(a),s=n(28),o=r(s),l=n(558),u=r(l),d=o.default.extend({name:"ChannelCollection",context:["server","channel"],model:u.default,url:function(){return this.containerKey},initialize:function(){this.listenTo(i.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=d,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(47),u=r(l),d=n(12),c=r(d),f=n(40),p=r(f),h=n(977),v=r(h),g=n(976),m=r(g),y=/(auth_token=|accessToken=|X-Plex-Token=)(\"?\w+\"?)/g,b=/(email=)(\"?[^&]+\"?)/g,P=/(password=)([^&]+)/,w=/(address=|host=|uri=)(\"?[^&]+\"?)/g,S=function(e){return e=e.replace(y,"$1TOKEN"),e.replace(P,"$1PASSWORD")},_=function(e){return e&&e.hasOwnProperty("X-Plex-Token")&&(e["X-Plex-Token"]="TOKEN"),
e&&e.hasOwnProperty("Authorization")&&(e.Authorization="BASIC AUTHORIZATION"),e},T=function(e){if(e)return e=e.replace(y,'$1"TOKEN"'),e=e.replace(b,'$1"EMAIL"'),e=e.replace(w,'$1"IP ADRRESS"')},I=u.default.Collection.extend({model:m.default,initialize:function(e,t){i.default.bindAll(this,"onAjaxComplete"),this.parent=t.parent,v.default.parent=t.parent,this.listenTo(p.default,"change:instance",this.onSettingsAdapterInstanceChange),p.default.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(c.default,"log:message",this.onLogMessage),u.default.history.on("route",this.onRoute,this),(0,o.default)(document).on("ajaxComplete",this.onAjaxComplete))},stop:function(){this.enabled&&(this.enabled=!1,this.reset(),this.stopListening(c.default),u.default.history.off("route",this.onRoute,this),(0,o.default)(document).off("ajaxComplete",this.onAjaxComplete));
},destroy:function(){this.stop(),this.stopListening()},add:function(){this.length>200&&this.shift(),u.default.Collection.prototype.add.apply(this,arguments)},toJSON:function(){var e=u.default.Collection.prototype.toJSON.apply(this,arguments);return e.unshift(i.default.extend({type:"info"},v.default.toJSON())),e},toJSONString:function(){return JSON.stringify(this.toJSON(),null,2)},onSettingsAdapterInstanceChange:function(){this.settings&&(this.stopListening(this.settings),this.settings=null),p.default.hasInstance()&&(this.settings=p.default.getInstance(),
this.listenTo(this.settings,"change:debugLevel",this.reconfigure)),this.reconfigure()},onLogMessage:function(e){this.add(e)},onRoute:function(e,t,n){var r={type:"navigation",route:t,args:n,fragment:window.location.hash};this.add(r)},onAjaxComplete:function(e,t,n){var r={type:"ajax",url:S(n.url),status:t.status};i.default.isEmpty(n.headers)||(r.headers=_(n.headers)),i.default.isEmpty(n.data)||(r.params=n.data),200===t.status?2===this.settings.get("debugLevel")?r.response=T(t.responseText):r.responseLength=t.responseText?t.responseText.length:0:(r.statusText=t.statusText,
r.response=T(t.responseText)),this.add(r)}});t.default=I,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(47),i=r(a),s=i.default.Model.extend({initialize:function(e,t){this.set("time",new Date)}});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(47),o=r(s),l=n(76),u=r(l),d=o.default.Model.extend({initialize:function(e,t){
this.set("host",window.location.host),this.set("userAgent",window.navigator.userAgent),this.set("browser",u.default)},toJSON:function(){var e=this.parent.get("primaryServer"),t=this.parent.get("user"),n=t.get("features");return this.set("version","2.8.1"),e&&(e.get("activeConnection")&&this.set("primaryServerUrl",e.url()),this.set("primaryServerAuthToken",!!e.get("accessToken")),this.set("primaryServerVersion",e.get("versionFull"))),this.set("username",t.get("username")),this.set("cloudUrl",t.server.get("connections")),
this.set("cloudAccessToken",!!t.server.get("accessToken")),n&&this.set("userFeatures",i.default.keys(n).join(", ")),o.default.Model.prototype.toJSON.apply(this,arguments)}});t.default=new d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(561),o=r(s),l=o.default.extend({initialize:function(e){this.playQueue=e.playQueue,this.addFilter(i.default.bind(this.filterAfterUpNext,this)),this.listenForUpNextChanges();
},filterAfterUpNext:function(e){var t=this.superset.indexOf(e),n=this.playQueue.getUpNextRange();return t>n.end}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(26),d=a(u),c=n(162),f=r(c),p=n(165),h=r(p),v=n(59),g=r(v),m=n(237),y=r(m),b=n(46),P=r(b),w=g.default.extend({idAttribute:"ratingKey",whitelistedAttrs:["guid","addedAt","composite","duration","key","leafCount","playlistType","ratingKey","smart","summary","title","type","allowSync"],
defaults:function(){return{children:new y.default([],{server:this.server,parent:this,url:function(){var e,t="/playlists/"+this.parent.id+"/items";return"audio"===this.parent.get("playlistType")&&(e={includeRelated:1}),d.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 r=h.default.addVersionHeader(2,n);return g.default.prototype.sync.call(this,e,t,r)},parse:function(e){var t=this.convert(e);return t.Playlist&&(t=t.Playlist),P.default.parseInteger(t,["duration","leafCount","addedAt"]),P.default.parseBoolean(t,["smart","allowSync"]),t.isPlaylist=!0,t},findItem:function(e){return this.get("children").findWhere({playlistItemID:e})},moveItem:function(e,t){var n=t?{after:t}:{},r=d.join([s.default.result(this,"url"),"/items/",e,"/move"],n),a=s.default.extend(this.server.getXHROptions(r),{
type:"PUT"}),i=l.default.ajax(a),o=this.get("children"),u=this.findItem(e);o.remove(u);var c=this.findItem(t),f=c?o.indexOf(c)+1:0;return o.add(u,{at:f}),i},removeItem:function(e){e=e.toString();var t=d.join([s.default.result(this,"url"),"/items/",e]),n=s.default.extend(this.server.getXHROptions(t),{type:"DELETE"}),r=l.default.ajax(n);r.then(s.default.bind(function(e){this.set(this.parse(e))},this));var a=this.get("children"),i=this.findItem(e);return a.remove(i),r},addContent:function(e,t){var n=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=f.default.uri(e,t);var i=d.join(r,a),o=s.default.extend(e.server.getXHROptions(i),{type:n}),u=l.default.ajax(o);return u.then(s.default.bind(function(e){this.set(this.parse(e))},this)),u.promise()},isLibraryItem:function(){return!0},isPlexMusicItem:function(){return!1}});t.default=w,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(59),i=r(a),s=n(383),o=r(s),l=n(568),u=r(l),d=i.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=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"FilterOptionModel",context:["server","section","type","standalone"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{key:i.default.string,type:i.default.string,title:i.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(28),o=r(s),l=n(983),u=r(l),d=o.default.extend({name:"LinearFilterCollection",context:["server","section"],
model:u.default,url:function(){return i.default.result(this.section,"url")},filterBySecondary:function(){var e=this.filter(function(e){return e.get("secondary")});return this.clone(e)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(296),u=r(l),d=o.default.extend({name:"LinearFilterModel",context:["server","section"],idAttribute:"key",rootPropertyName:"Directory",syncedAttrs:{
secondary:i.default.boolean,key:i.default.string,title:i.default.string},syncedRelations:{options:{relationClass:u.default}},defaults:{secondary:!1}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(985),o=r(s),l=i.default.extend({name:"LocationCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"LocationModel",context:["server","section"],rootPropertyName:"Location",syncedAttrs:{id:i.default.integer,path:{type:i.default.string,save:!0}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(564),o=r(s),l=i.default.extend({name:"MediaTypeCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(562),u=r(l),d=n(383),c=r(d),f=o.default.extend({name:"MetadataTypeModel",context:["server"],idAttribute:"type",rootPropertyName:"Type",syncedAttrs:{type:i.default.integer,key:i.default.string,title:i.default.string},syncedRelations:{filters:{relationClass:u.default,rootPropertyName:"Filter"},sorts:{relationClass:c.default,rootPropertyName:"Sort"}}});t.default=f,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(28),o=r(s),l=n(382),u=r(l),d=o.default.extend({name:"SectionSubsetCollection",context:["server","section"],model:u.default,url:function(){return i.default.result(this.section,"url")},filterPrimaries:function(){var e=this.filter(function(e){return e.get("primary")});return this.clone(e)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(140),u=r(l),d=n(654),c=r(d),f=n(37),p=r(f),h=n(382),v=r(h),g=n(59),m=r(g),y=m.default.extend({initialize:function(e,t){this.storage=t.storage,this.section=t.section,this.type=t.type,this.filters=t.filters,this.sortKey=t.sortKey,this.sortDirection=t.sortDirection,this.subset=t.subset,this.debouncedStorageSave=i.default.debounce(i.default.bind(this.storage.save,this.storage),300)},_fetch:function(e){e=e||{};var t=(0,
u.default)(this.storage.fetch());return t=t.done(i.default.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)),t=t.then(i.default.bind(function(){return this.fetchSort().then(i.default.bind(function(e){e&&e.set("direction",this.storage.get("sortDirection")||e.get("defaultDirection"));
},this))},this)),t=t.done(i.default.bind(this.storage.save,this.storage)),t.then(i.default.constant(this))},fetchSort:function(){if(!this.section.server.get("isFullServer"))return o.default.Deferred().reject().promise();var e=this.section.get("sorts");e.typeID=this.storage.get("typeID");var t=e.fetch();return e.typeID=null,t=t.then(i.default.bind(function(){var t,n=this.storage.get("sortKey");return n&&(t=e.findWhere({key:n})),this.sort=t||e.findWhere({isDefault:!0}),this.sort},this))},getType:function(){
var e=this.storage.get("typeID")||p.default.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=c.default.get(t)),e||(this.storage.set("subset","all"),e=c.default.get("all"));var n=new v.default(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 r=this.section.get("currentFilters");this.storage.set("filters",r)},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();
}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(653),i=r(a),s=n(235),o=r(s),l=n(555),u=r(l),d=7776e6,c=o.default.extend({storageKey:"sectionViewState",serialize:function(e){return o.default.prototype.serialize.call(this,i.default.augmentDictionary(e,{ttl:d}))}}),f=u.default.extend({initialize:function(e,t){u.default.prototype.initialize.apply(this,arguments),this.section=t.section,this.storage=new c},storageKey:function(){
return this.section.getScopedKey("attrs")},toJSON:function(){var e=u.default.prototype.toJSON.apply(this,arguments);return i.default.augmentObj(e,d,!0)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(992),o=r(s),l=i.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"ChapterModel",context:["server","section"],syncedAttrs:{id:i.default.integer,tag:i.default.string,index:i.default.integer,startTimeOffset:i.default.integer,endTimeOffset:i.default.integer,thumb:i.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(994),o=r(s),l=i.default.extend({
name:"ConcertCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"ConcertModel",context:["server","section"],syncedAttrs:{id:i.default.integer,at:i.default.integer,tag:i.default.string,venue:i.default.string,city:i.default.string,country:i.default.string,url:i.default.string}});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"OverlayModel",context:["server","section"],syncedAttrs:{key:i.default.string,marginTop:i.default.integer,marginRight:i.default.integer,marginBottom:i.default.integer,marginLeft:i.default.integer,width:i.default.integer,height:i.default.integer,alignHorizontal:i.default.string,alignVertical:i.default.string,relative:i.default.string,imageScaling:i.default.string,
marginScaling:i.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(385),o=r(s),l=i.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(999),o=r(s),l=i.default.extend({
name:"PlaylistItemCollection",context:["server","playlist"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(49),i=r(a),s=n(195),o=r(s),l=n(20),u=r(l),d=n(62),c=r(d),f=n(22),p=r(f),h=n(997),v=r(h),g=p.default.extend({mixins:[o.default],name:"PlaylistItemListModel",context:["server","playlist"],idAttribute:"key",collectionName:"metadataItems",url:function(){return this.getPaginatedUrl(this.get("containerKey"));
},sessionAttrs:{containerKey:u.default.string,currentPageStart:u.default.integer,currentPageSize:u.default.integer,populatedRange:u.default.object},syncedAttrs:{totalSize:u.default.integer},syncedRelations:{metadataItems:{relationClass:v.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===c.default.xml?i.default.replaceMetadataXMLElementNames(e):e;
}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(57),u=r(l),d=o.default.extend({name:"PlaylistItemModel",context:["server","playlist"],idAttribute:"playlistItemID",syncedAttrs:{playlistItemID:i.default.integer,key:i.default.string,type:i.default.string},syncedRelations:{metadataItem:{relationClass:u.default,deferred:!0}},augmentResponse:function(e){return{playlistItemID:e.playlistItemID,
key:e.key,type:e.type,metadataItem:e}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(26),l=a(o),u=n(37),d=r(u),c=n(85),f=r(c),p={unviewedLeafCount:">="},h=f.default.extend({name:"SectionMetadataListModel",context:["server","section","identifier","mediaTagPrefix","mediaTagVersion","allowSync"],url:function v(){var e=[],t=void 0,n=void 0,r=this.section.get("currentFolderKey");if(r)e.push(r);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 a=this.section.get("currentFilters");a.length?e=[a[0].values[0]]:e.push(t)}var v=l.join(e,n);return v=this.replaceSpecialFilterOperators(v),this.set("containerKey",v),this.server.get("isFullServer")?this.getPaginatedUrl(v):v},getParams:function(){var e=this.getFilterParams(),t=this.getMediaTypeID(),n=this.getSort();return t&&t!==d.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||d.default.get(this.section.get("type")).id;return/^(onDeck|recentlyAdded|recentlyViewed|newest)$/.test(e)?t===d.default.get("show").id||t===d.default.get("season").id?t=d.default.get("episode").id:t!==d.default.get("artist").id&&t!==d.default.get("track").id||(t=d.default.get("album").id):/^recentlyViewedShows$/.test(e)&&(t=d.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=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(569),o=r(s),l=i.default.extend({
name:"TagCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=0;return e?(e.forEach(function(e){var n=e.Part;n&&n.forEach(function(e){var n=e.Stream;n&&(t+=n.length)})}),t):t}function a(e,t,n){if(c.hasOwnProperty(e))return n;if(f.hasOwnProperty(e)&&n&&n.length){if(!t||n.length>t.length)return n;if(n.length===t.length){var a=i(l.default.first(t)).length,s=i(l.default.first(n)).length;if(s>a)return n}}return"Media"===e&&r(n)>=r(t)?n:(0,
d.default)(e,t,n)}var i=n(79).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var o=n(3),l=s(o),u=n(574),d=s(u),c={subscriptionID:!0,grandparentSubscriptionID:!0,subscriptionType:!0,grandparentSubscriptionType:!0},f={Director:!0,Producer:!0,Writer:!0,Genre:!0,Mood:!0,Country:!0,Label:!0,Role:!0,Location:!0};e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1004),o=r(s),l=i.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(1005),u=r(l),d=o.default.extend({name:"LyricsLineModel",context:["server","section"],syncedAttrs:{startOffset:i.default.integer,endOffset:i.default.integer},syncedRelations:{spans:{relationClass:u.default,
rootPropertyName:"Span"}},defaults:{startOffset:-1,endOffset:-1}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1006),o=r(s),l=i.default.extend({name:"LyricsSpanCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=-1,u=-1,d=o.default.extend({
name:"LyricsSpanModel",context:["server","section"],sessionAttrs:{active:i.default.boolean},syncedAttrs:{startOffset:i.default.integer,endOffset:i.default.integer,text:i.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 r=e>=t,a=e<=n||n===u;return r&&a}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(963),o=r(s),l=n(1008),u=r(l),d=i.default.extend({
mixins:[o.default],name:"LyricsStreamCollection",context:["server","section"],model:u.default,initialize:function(){this.exclusiveBoolAttr("selected")}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(9).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(26),s=r(i),o=n(20),l=a(o),u=n(22),d=a(u),c=n(1003),f=a(c),p=d.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:f.default,rootPropertyName:"Line"}},defaults:{follow:!0,selected:!1}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(14),i=n(28),s=r(i),o=n(573),l=r(o),u=s.default.extend({name:"PlexPlayerCollection",context:["server"],model:l.default,url:"/clients",augmentResponse:function(e){var t=(0,a.resolve)("appModel"),n=t.get("clientID"),r=parseInt(e.size,10);return 1===r&&e.Server.machineIdentifier===n?(delete e.Server,e.size="0"):r>1&&(e.Server=e.Server.filter(function(e){return e.machineIdentifier!==n}),e.size=e.Server.length.toString()),e}});t.default=u,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(5),o=r(s),l=n(59),u=r(l),d=36e5,c=u.default.extend({defaults:function(){return{canSkipNext:!0,stationSkipsPerHour:1/0,skips:[]}},initialize:function(){var e=[this.get("stationSkipsPerHour"),0];e=i.default.reject(e,function(e){return e===1/0}),this.maxLength=Math.max.apply(Math,e)},updateTimeout:function(e){this.timeout&&(this.timeout=clearTimeout(this.timeout));
var t=this.get("stationSkipsPerHour");if(t!==1/0){var n=e-d,r=i.default.filter(this.get("skips"),function(e){return e>=n}),a=r.length>=t?d-(e-i.default.last(r)):null,s=!a,l=s?"":(0,o.default)("You can skip {1} songs an hour per mix.",this.get("stationSkipsPerHour"));this.set({canSkipNext:s,canSkipNextMessage:l}),a>0&&(this.timeout=setTimeout(i.default.bind(function(){this.updateTimeout((new Date).getTime())},this),a))}},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"]});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),i=r(a),s=n(84),o=r(s),l=o.default.extend({name:"LegacyChannelProviderModel",defaults:function(){return{identifier:s.providerIdentifiers.CHANNEL_PROVIDER_IDENTIFIER,title:(0,i.default)("Channel"),
types:["video","audio","photo"],protocols:["stream"]}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),i=r(a),s=n(84),o=r(s),l=n(575),u=r(l),d=n(158),c=o.default.extend({name:"LegacyLibraryProviderModel",defaults:function(){var e=this.server,t=e.get("isFullServer"),n=e.get("isFullOwnedServer"),r=[{type:d.providerFeatureTypes.CONTENT,key:"/library/sections"},{type:d.providerFeatureTypes.MATCH,key:"/library/matches"
},{type:d.providerFeatureTypes.METADATA,key:"/library/metadata"}];return t&&r.push({type:d.providerFeatureTypes.SEARCH,key:"/hubs/search"},{type:d.providerFeatureTypes.PLAY_QUEUE,key:"/playQueues"},{type:d.providerFeatureTypes.RATE,key:"/:/rate"},{type:d.providerFeatureTypes.TIMELINE,key:"/:/timeline",scrobbleKey:"/:/scrobble",unscrobbleKey:"/:/unscrobble"}),n&&r.push({type:d.providerFeatureTypes.MANAGE}),{identifier:s.providerIdentifiers.LIBRARY_PROVIDER_IDENTIFIER,title:(0,i.default)("Library"),
types:["video","audio","photo"],protocols:n?["stream","download"]:["stream"],features:new u.default(r,{parse:!0,server:e})}}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(84),o=r(s),l=n(1012),u=r(l),d=n(1011),c=r(d),f=i.default.extend({name:"ProviderCollection",context:["server"],model:o.default,url:"/media/providers",fetch:function(){var e=this,t=i.default.prototype.fetch.apply(this,arguments),n=this.server;
return t.always(function(){n.get("isCloud")||e.get(s.providerIdentifiers.LIBRARY_PROVIDER_IDENTIFIER)||e.add(new u.default({},{server:n})),e.get(s.providerIdentifiers.CHANNEL_PROVIDER_IDENTIFIER)||e.add(new c.default({},{server:n}))}),t}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1015),o=r(s),l=i.default.extend({name:"ProviderDirectoryCollection",context:["server","provider"],model:o.default
});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"ProviderDirectoryModel",context:["server","provider"],syncedAttrs:{key:i.default.string,hubKey:i.default.string,title:i.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(9).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(26),s=r(i),o=n(32),l=a(o),u=n(27),d=a(u),c=n(20),f=a(c),p=n(63),h=a(p),v=n(89),g=a(v),m=n(389),y=a(m),b=n(133),P=a(b),w=n(560),S=a(w),_=n(1019),T=a(_),I=n(1132),M=a(I),C=g.default.connectionTestResults,x=g.default.promiseStates,E=g.default.extend({
name:"CloudServerModel",connectionTestUrl:"/pms/:/ip",sessionAttrs:{connectionTestResult:f.default.oneOf(C.PENDING,C.CONNECTED,C.UNAVAILABLE,C.UNAUTHORIZED).isRequired,promiseState:f.default.oneOf(x.PENDING,x.RESOLVED,x.REJECTED).isRequired,playQueueManager:f.default.instanceOf(S.default).isRequired,isShared:f.default.boolean.isRequired,isBundled:f.default.boolean.isRequired,isCloud:f.default.boolean.isRequired,isMerged:f.default.boolean.isRequired,isDownForMaintenance:f.default.boolean.isRequired,
hasFailedResources:f.default.boolean.isRequired,friendlyName:f.default.string,accessToken:f.default.string,baseUrl:f.default.string.isRequired,plexPassUrl:f.default.string.isRequired,accountUrl:f.default.string.isRequired,cloudSyncUrl:f.default.string.isRequired,appsUrl:f.default.string.isRequired,helpUrl:f.default.string.isRequired},sessionRelations:{activeConnection:{relationClass:P.default,deferred:!0},connections:{relationClass:y.default,options:function(){return{server:this}}},resources:{relationClass:T.default,
options:function(){return{server:this}}}},defaults:function(){var e=h.default.get("myPlexScheme")+"://"+h.default.get("myPlexUrl");return{connectionTestResult:C.PENDING,promiseState:x.PENDING,playQueueManager:new S.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 P.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,M.default)(n)},testConnection:function(e){var t={server:this,connection:e,url:this.connectionTestUrl},n=d.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};d.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:C.CONNECTED,activeConnection:t}),this.releaseCapturedChangeEvents()},onConnectionTestError:function(e,t){e.get("isAborted")||this.get("connections").hasOnlyFailedConnections()&&this._reject({isDownForMaintenance:503===t.status
})}});t.default=E,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1018),o=r(s),l=i.default.extend({name:"ConnectionSourceCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"ConnectionSourceModel",context:["server"],sessionAttrs:{
id:i.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(9).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(26),s=r(i),o=n(63),l=a(o),u=n(28),d=a(u),c=n(1020),f=a(c),p=d.default.extend({model:f.default,context:["server"],url:function(){var e={};return l.default.get("allowHttpsMediaServerConnections")&&(e.includeHttps=1),l.default.get("allowMediaServerRelayConnections")&&(e.includeRelay=1),s.join("/api/resources",e)}});t.default=p,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(389),u=r(l),d=o.default.extend({name:"ResourceModel",context:["server"],idAttribute:"clientIdentifier",rootPropertyName:"Device",urlRoot:"/api/resources",syncedAttrs:{clientIdentifier:i.default.string,name:i.default.string,sourceTitle:i.default.string,accessToken:i.default.string,product:i.default.string,productVersion:i.default.string,platform:i.default.string,
platformVersion:i.default.string,device:i.default.string,provides:i.default.list,owned:i.default.boolean,home:i.default.boolean,synced:i.default.boolean,presence:i.default.boolean,publicAddressMatches:i.default.boolean,httpsRequired:i.default.boolean,createdAt:i.default.integer,lastSeenAt:i.default.integer,ownerId:i.default.integer},syncedRelations:{connections:{relationClass:u.default,rootPropertyName:"Connection"}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(46),o=r(s),l=n(59),u=r(l),d=u.default.extend({idAttribute:"key",whitelistedAttrs:["key","name","defaultAudioLanguage","autoSelectAudio","defaultSubtitleLanguage","subtitleMode"],url:function(){return this.get("key")},convert:function(e){var t=i.default.isObject(e)?e:o.default.parseXML(e);return t.Account&&(t=t.Account),o.default.parseBoolean(t,"autoSelectAudio"),t},parse:function(e){var t=this.convert(e);return t=i.default.pick(t,this.whitelistedAttrs);
}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(972),o=r(s),l=n(1023),u=r(l),d=o.default.extend({model:u.default,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)),o.default.prototype.add.apply(this,arguments)},onSettingChange:function(e){e.label&&this.add(i.default.extend({_type:"setting"},e),{parse:!0})},onTimeline:function(e){1===e.state||e.sectionID<0||this.add(i.default.extend({_type:"timeline"},e),{parse:!0})},onStatus:function(e){"ProgressNotification"!==e._elementType&&this.add(i.default.extend({_type:"status"},e),{parse:!0
})},onPlaying:function(e){this.add(i.default.extend({_type:"playing"},e),{parse:!0})},onWebSocket:function(e){this.add(i.default.extend({_type:"websocket"},e),{parse:!0})}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(59),i=r(a),s=0,o=i.default.extend({idAttribute:"id",parse:function(e){var t=e;return t.time=new Date,t.id="evt"+s++,"preference"===t._type&&(t.value=String(t.value)),t}});t.default=o,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(46),o=r(s),l=n(59),u=r(l),d=u.default.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(e){var t=i.default.isObject(e)?e:o.default.parseXML(e);return i.default.defaults(t,i.default.result(this,"defaults")),t},parse:function(e){var t=this.convert(e);return t=i.default.pick(t,this.whitelistedAttrs),"ok"===t.signInState?t.signedIn=!0:(t.signedIn=!1,t.username=""),t.signedIn&&"mapped"===t.mappingState&&!t.mappingError?t.remoteAccessState="ok":t.signedIn&&!t.mappingError||(t.remoteAccessState="unreachable"),
t},isWaiting:function(){var e=this.get("remoteAccessState");return"connecting"===e||"disconnecting"===e}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(!e.length)return"(none)";var t=s.default.map(e,function(e){return e.get("debugName")});return t.join(", ")}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(32),d=a(u),c=n(386),f=a(c),p=n(28),h=a(p),v=n(89),g=a(v),m=h.default.extend({mixins:[f.default],name:"ServerCollection",
model:g.default,initialize:function(){this._resetPopulate()},comparator:function(e){var t=e.get("isFullOwnedServer"),n=e.get("isShared"),r=e.get("friendlyName")||"",a=t?"0":"1";return a+=n?"1":"0",a+=r.toLowerCase()},shouldWaitForInitialServers:function(){var e=this.filter(function(e){var t=!e.id||!!e.get("resources");return t&&e.hasPendingPopulate()});return!!e.length&&((0,d.default)("[Servers] Waiting for initial servers =",r(e)),!0)},shouldWaitForResources:function(){var e=this.reduce(function(e,t){
var n=t.get("isResolved"),r=t.get("resources"),a=r&&r.hasPendingPopulate();return n&&a&&e.push(t),e},[]);return!!e.length&&((0,d.default)("[Servers] Waiting for additional resources from",r(e)),!0)},shouldWaitForPendingServers:function(){if(this.findWhere({isConnected:!0}))return!1;var e=this.filter(function(e){return e.hasPendingPopulate()});return!!e.length&&((0,d.default)("[Servers] Waiting for pending servers =",r(e)),!0)},waitForServers:function(){this._resetPopulate()},foundAllServers:function(){
var e=this.where({isConnected:!0}),t=r(e);(0,d.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 a=this,i=arguments.length<=0||void 0===arguments[0]?this.models:arguments[0],o=l.default.Deferred(),u=i.slice(0),c=s.default.find(u,function(e){
return e.get("isResolved")});return c?((0,d.default)("[Servers] Populate any server chose %s where servers = %s",c.get("debugName"),r(u)),o.resolve(c).promise()):this.hasOnlyRejectedServers(u)?o.reject().promise():(this.on({remove:e,"change:isResolved":t,"change:isRejected":n},this),o.always(function(){a.off("change:isResolved",t,a),a.off("change:isRejected",n,a)}),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,r=this.filterServers(a,t);r?(c=r,r.done(function(e){c===r&&o.resolve(e)}),r.fail(function(){c===r&&(i||!e.hasPendingPopulate()?o.reject():e.populate().always(n.bind(e)))})):this.hasPendingPopulate()||o.reject()}var r=this,a=s.default.isString(e)?{machineIdentifier:e}:e,i=s.default.has(a,"machineIdentifier"),o=l.default.Deferred(),u=s.default.map(s.default.keys(a),function(e){return"change:"+e}),d="add "+u.join(" "),c=void 0;return n.call(this),this.on(d,n,this),this.populate().always(function(){
c||o.reject()}),o.always(function(){r.off(d,n,r)}),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=m,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(46),o=r(s),l=n(59),u=r(l),d=u.default.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(e){var t=i.default.isObject(e)?e:o.default.parseXML(e);
return"bool"===t.type?o.default.parseBoolean(t,"value"):"int"!==t.type&&"enum"!==t.type||o.default.parseInteger(t,"value"),o.default.parseBoolean(t,["advanced","hidden"]),t},parse:function(e){var t=this.convert(e);if(t=i.default.pick(t,this.whitelistedAttrs),t.enumValues&&!i.default.isArray(t.enumValues)&&(t.enumValues=i.default.map(t.enumValues.split("|"),function(e){var n=e.indexOf(":"),r=n>0?e.slice(n+1):e,a=n>0?e.slice(0,n):e;return"int"===t.type&&(a=parseInt(a,10)),{label:r,value:a}})),"enum"===t.type&&t.values&&!i.default.isArray(t.values)){
var n=0;t.enumValues=i.default.map(t.values.split("|"),function(e){return{label:e,value:n++}})}return t},getSaveParams:function(e,t){if(i.default.has(e,"FriendlyName")&&this.server.set("friendlyName",e.FriendlyName),i.default.has(e,"allowMediaDeletion")&&this.server.set("allowMediaDeletion","1"===String(e.allowMediaDeletion)),i.default.isEmpty(e)){var n={};return n[this.get("id")]=this.get("value"),n}return"value"in e&&(e[this.get("id")]=e.value,delete e.value),e}});t.default=d,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(46),u=r(l),d=n(59),c=r(d),f=c.default.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")?c.default.prototype.fetch.apply(this,arguments):o.default.Deferred().reject().promise();
},convert:function(e){var t=i.default.isObject(e)?e:u.default.parseXML(e);return u.default.parseBoolean(t,"canInstall"),u.default.parseInteger(t,"status"),t.Release&&u.default.parseInteger(t.Release,"progress"),t},parse:function(e,t){var n=this.convert(e);return n=i.default.extend(n,n.Release),n=i.default.pick(n,this.whitelistedAttrs),0!==n.status&&(n.state="error"),n}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var a=n(237),i=r(a),s=n(1029),o=r(s),l=i.default.extend({name:"SessionCollection",model:o.default,url:"/status/sessions"});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(72),l=a(o),u=n(66),d=r(u),c=n(136),f=r(c),p=n(20),h=r(p),v=n(57),g=r(v),m=g.default.extend({name:"SessionModel",entityType:l.SESSION,entityID:function(){var e=arguments.length<=0||void 0===arguments[0]?this.state:arguments[0];
return(0,d.default)(this.entityType,e.sessionKey,this.server.entityID())},idAttribute:"sessionKey",cache:new f.default,cacheKey:function(e){return this.server&&this.server.getScopedKey(e.sessionKey)},syncedAttrs:s.default.extend({},g.default.prototype.syncedAttrs,{sessionKey:h.default.string,Player:h.default.object,User:h.default.object,TranscodeSession:h.default.object,TranscodeSessionDelegated:h.default.object}),derivedAttrs:{VirtualTranscodeSession:function(){return this.get("TranscodeSession")||this.get("TranscodeSessionDelegated");
}}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(83),i=r(a),s=n(1031),o=r(s),l=i.default.extend({model:o.default,url:"/sync/transcodeQueue",parse:function(e){return this.convert(e,"TranscodeJob")}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(46),o=r(s),l=n(59),u=r(l),d=u.default.extend({idAttribute:"syncItemId",
whitelistedAttrs:["syncItemId","syncItemTitle","key","type","progress","speed","remaining","size","title","thumb"],convert:function(e){var t=i.default.isObject(e)?e:o.default.parseXML(e);return o.default.parseInteger(t,"syncItemId"),o.default.parseFloat(t,["progress","speed"]),t},parse:function(e){var t=this.convert(e);return t=i.default.pick(t,this.whitelistedAttrs)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});
var a=n(3),i=r(a),s=n(46),o=r(s),l=n(59),u=r(l),d=u.default.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(e){var t=i.default.isObject(e)?e:o.default.parseXML(e);return t.TranscodeSession&&(t=t.TranscodeSession),o.default.parseBoolean(t,"throttled"),o.default.parseInteger(t,["duration","audioChannels"]),
t.progress=parseFloat(t.progress),t.speed=parseFloat(t.speed),t},parse:function(e){var t=this.convert(e);return t=i.default.pick(t,this.whitelistedAttrs)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(235),i=r(a),s=i.default.extend({storageKey:"manualServers",defaults:{port1:"32400",port2:"32400"}});t.default=new s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(28),i=r(a),s=n(1035),o=r(s),l=i.default.extend({name:"StoredConnectionCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(1036),u=r(l),d=o.default.extend({name:"StoredConnectionModel",idAttribute:"uri",syncedAttrs:{uri:i.default.string,scheme:i.default.string,address:i.default.string,port:i.default.string,relay:i.default.boolean},syncedRelations:{
sources:{relationClass:u.default}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1037),o=r(s),l=i.default.extend({name:"StoredConnectionSourceCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"StoredConnectionSourceModel",syncedAttrs:{
id:i.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(577),o=r(s),l=i.default.extend({name:"StoredServerCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(246),o=r(s),l=n(22),u=r(l),d=u.default.extend({name:"MediaSubscriptionTargetModel",context:["server"],
syncedAttrs:{guid:i.default.string,grandparentGuid:i.default.string,title:i.default.string,type:i.default.string,grandparentTitle:i.default.string,index:i.default.integer,parentIndex:i.default.integer,year:i.default.string,grandparentYear:i.default.integer,originallyAvailableAt:i.default.string,thumb:i.default.string,parentThumb:i.default.string,grandparentThumb:i.default.string},derivedAttrs:{thumbTranscodeUrl:function(){var e=this.get("thumb");if(e)return(0,o.default)(this.server,e)},parentThumbTranscodeUrl:function(){
var e=this.get("parentThumb");if(e)return(0,o.default)(this.server,e)},grandparentThumbTranscodeUrl:function(){var e=this.get("grandparentThumb");if(e)return(0,o.default)(this.server,e)}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(391),o=r(s),l=i.default.extend({name:"SyncItemCollection",context:["server","device"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(165),i=r(a),s=n(20),o=r(s),l=n(22),u=r(l),d=n(1040),c=r(d),f="active",p="snoozed",h="dead",v={ACTIVE:f,SNOOZED:p,DEAD:h},g=u.default.extend({name:"SyncListModel",context:["server","device"],url:function(){return this.device?"/devices/"+this.device.get("clientIdentifier")+"/sync_items":"/servers/"+this.server.id+"/sync_lists"},syncedAttrs:{status:o.default.oneOf(f,p,h),clientIdentifier:o.default.string,version:o.default.integer,
itemsCompleteCount:o.default.integer,totalSize:o.default.integer},syncedRelations:{syncItems:{relationClass:c.default,rootPropertyName:"SyncItems"}},derivedAttrs:{isActive:function(){return this.get("status")===f}},augmentResponse:function(e){return e.SyncItems&&(e.SyncItems=e.SyncItems.SyncItem),e},sync:function(e,t,n){var r=i.default.addVersionHeaderForDevice(this.get("device"),n);return u.default.prototype.sync.call(this,e,t,r)},getCollection:function(){return this.get("syncItems")},resetToServer:function(e){
var t=this.getCollection(),n=t.filter(function(t){var n=t.get("Server");return n&&n.machineIdentifier===e});t.reset(t.clone(n).models)}},{statuses:v});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1043),o=r(s),l=i.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 r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"AnnouncementModel",context:["server"],rootPropertyName:"Announcement",syncedAttrs:{id:i.default.integer,title:i.default.string,content:i.default.string,imageUrl:i.default.string,style:i.default.string,url:i.default.string,expireAt:i.default.string,notifyAt:i.default.string,read:{type:i.default.boolean,save:!0}},markAsRead:function(){this.get("read")||this.save("read",!0)}});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(28),o=r(s),l=n(1045),u=r(l),d=o.default.extend({name:"DeviceCollection",context:["server"],model:u.default,url:"/devices.xml",filterSyncDevices:function(e){var t=!(!e||!e.channel),n=e&&e.get("isPlaylist"),r=this.filter(function(e){var r=e.get("syncList"),a=r&&r.get("version")>=2,i=t&&e.get("isCloudSync"),s=n&&!a;return e.supports("sync-target")&&!i&&!s}),a=i.default.sortBy(r,function(e){
return!e.get("isCloudSync")});return this.clone(a)},filterByProducts:function(e){var t=this.filter(function(t){return i.default.contains(e,t.get("product"))});return this.clone(t)},products:function c(){var c=this.map(function(e){return e.get("product")});return i.default.uniq(c)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(1041),u=r(l),d=o.default.extend({name:"DeviceModel",
context:["server"],rootPropertyName:"Device",url:function(){return"/devices/"+this.id+".xml"},syncedAttrs:{id:i.default.string,clientIdentifier:i.default.string,name:i.default.string,product:i.default.string,productVersion:i.default.string,platform:i.default.string,platformVersion:i.default.string,device:i.default.string,model:i.default.string,provides:i.default.list,screenResolution:i.default.string,screenDensity:i.default.string,lastSeenAt:i.default.integer},syncedRelations:{syncList:{relationClass:u.default,
rootPropertyName:"SyncList",deferred:!0,options:function(){return{device:this}}}},derivedAttrs:{isCloudSync:function(){return"cloudsync"===this.get("platform")}},supports:function(e){return this.get("provides").indexOf(e)!==-1}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(289),i=r(a),s=n(83),o=r(s),l=n(583),u=r(l),d=o.default.extend({model:u.default,url:"/api/users",parse:function(e){return this.convert(e,"User");
},filterByHome:function(){var e=new i.default(this);return e.filterBy(function(e){return e.get("home")}),e},filterByUnrestricted:function(){var e=new i.default(this);return e.filterBy(function(e){return!e.get("restricted")}),e},filterByServerShares:function(e){var t=new i.default(this);return t.filterBy(function(t){var n=t.get("serverShares");return!!n.findWhere({machineIdentifier:e})}),t}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),i=r(a),s=n(46),o=r(s),l=n(59),u=r(l),d=u.default.extend({url:"/api/home",whitelistedAttrs:["id","guestUserID","guestEnabled","name"],convert:function(e){var t=i.default.isObject(e)?e:o.default.parseXML(e);return o.default.parseInteger(t,"id"),o.default.parseBoolean(t,["guestEnabled"]),t},parse:function(e){var t=this.convert(e);return t=i.default.pick(t,this.whitelistedAttrs)},getSaveParams:function(e,t){return i.default.isEmpty(e)?{guestEnabled:this.get("guestEnabled")?"1":"0"
}:u.default.prototype.getSaveParams.apply(this,arguments)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(289),i=r(a),s=n(83),o=r(s),l=n(1049),u=r(l),d=o.default.extend({model:u.default,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 e=new i.default(this);return e.filterBy(function(e){
return e.get("home")}),e},filterByFriends:function(){var e=new i.default(this);return e.filterBy(function(e){return!e.get("home")}),e}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(46),l=r(o),u=n(26),d=a(u),c=n(59),f=r(c),p=f.default.extend({whitelistedAttrs:["id","friend","server","home","friendlyName","username","email","thumb","createdAt","Server"],urlRoot:"/api/invites/requests",
url:function h(){var e=this,h=void 0;return this.isNew()?h=s.default.result(this,"urlRoot"):!function(){var t=e.pick("friend","server","home");s.default.each(s.default.keys(t),function(e){t[e]=t[e]?"1":"0"}),h=e.collection?s.default.result(e.collection,"url"):s.default.result(e,"urlRoot"),h=h.replace(/([^\/])$/,"$1/")+encodeURIComponent(e.get("id")),h=d.join(h,t)}(),h},convert:function(e){var t=s.default.isObject(e)?e:l.default.parseXML(e);l.default.parseInteger(t,"createdAt"),l.default.parseBoolean(t,["friend","server","home"]),
l.default.parseArray(t,"Server");var n=t.Server;return s.default.each(n,function(e){l.default.parseInteger(e,"numLibraries")}),t},parse:function(e){var t=this.convert(e);return t=s.default.pick(t,this.whitelistedAttrs)}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(83),o=r(s),l=n(1051),u=r(l),d=o.default.extend({model:u.default,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(e){var t=this.where(e);return i.default.reduce(t,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)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(46),o=r(s),l=n(59),u=r(l),d=u.default.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(e){var t=i.default.isObject(e)?e:o.default.parseXML(e);t.SharedServer&&(t=t.SharedServer),o.default.parseInteger(t,["id","serverId","lastSeenAt","invitedAt","acceptedAt","numLibraries"]),o.default.parseBoolean(t,["owned","admin","pending","allLibraries","allowSync","allowCameraUpload","allowChannels"]),o.default.parseArray(t,"Section");var n=t.Section;return i.default.each(n,function(e){o.default.parseInteger(e,"id"),
o.default.parseBoolean(e,"shared")}),t},parse:function(e){var t=this.convert(e);return t=i.default.pick(t,this.whitelistedAttrs),!t.numLibraries&&t.Section.length&&(t.numLibraries=i.default.where(t.Section,{shared:!0}).length),t}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(83),i=r(a),s=n(1053),o=r(s),l=i.default.extend({model:o.default,url:"/pms/social/networks",parse:function(e){return this.convert(e,"Directory");
}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(46),o=r(s),l=n(59),u=r(l),d=u.default.extend({idAttribute:"key",whitelistedAttrs:["key","title","linked","maxLength"],convert:function(e){var t=i.default.isObject(e)?e:o.default.parseXML(e);return o.default.parseBoolean(t,["linked","maxLength"]),t},parse:function(e){var t=this.convert(e);return t=i.default.pick(t,this.whitelistedAttrs)}});t.default=d,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"UserEntitlementModel",syncedAttrs:{id:i.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1056),o=r(s),l=i.default.extend({name:"UserFeatureCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"UserFeatureModel",syncedAttrs:{id:i.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(586),o=r(s),l=i.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"UserProviderModel",syncedAttrs:{id:i.default.string,territory:i.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"UserRoleModel",syncedAttrs:{
id:i.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1061),o=r(s),l=i.default.extend({name:"StoredUserCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(20),o=r(s),l=n(22),u=r(l),d=n(1038),c=r(d),f=n(393),p=r(f),h=n(589),v=r(h),g=n(585),m=r(g),y=n(588),b=r(y),P=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:v.default},entitlements:{relationClass:m.default
},providers:{relationClass:b.default},servers:{relationClass:c.default}},copyFromUser:function(e){var t=this,n={};i.default.each(this.syncedAttrs,function(t,r){n[r]=e.get(r)}),i.default.each(this.syncedRelations,function(n,r){if(!i.default.contains(t.additionalRelations,r)){var a=t.get(r),s=e.get(r);if(s){var o=s.toJSON();a.set(a.parse(o))}}}),this.set(n)},clearSensitiveAttributes:function(){this.unset("authToken"),this.unset("pin"),this.get("servers").reset()}});t.default=P,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(14),o=n(116),l=r(o),u=n(12),d=r(u),c=n(63),f=r(c),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"),r=n.findWhere({cloud:!0});d.default.trigger("show:loading"),r.populate().done(function(){
d.default.trigger("navigate","dashboard")}).fail(function(){var t=r.get("available");if(t!==!0&&t!==!1)return void e.listenToOnce(r,"change:available",e.login);var n=t?e.viewFor("signIn"):e.viewFor("unavailable",{model:r});d.default.trigger("show:view",n)})},error:function(){d.default.trigger("show:view",this.viewFor("notFound",{type:"404"}))},unauthorized:function(e){var t=this,n=i.default.some(this.getUnauthorizedHandlers(),function(n){return n.call(t,e)});n||d.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}),r=!n&&!t.get("skipSignIn");return r&&this.populateServersThenRecover(),r},handlePrimaryServer:function(e){var t=e.server,n=e.options;
return!(t||!n.primaryServer)&&(d.default.trigger("show:view",this.viewFor("serverRequired")),!0)},handleServer:function(e){var t=e.server,n=e.options,r=this.viewFor,a=(0,s.resolve)("appModel"),i=a.get("cloudServer"),o=void 0,l=void 0;return!(!n.serverID&&!n.primaryServer)&&(t?t.get("available")?t.get("authorized")||"resolved"!==i.populatePromise.state()?t.get("authorized")||(o=this.populateServersThenRecover()):l=r("unauthorized"):l=r("unavailable",{model:t}):l=r("notFound",{type:"server"}),l&&d.default.trigger("show:view",l),
!(!l&&!o))},handleChannelError:function(e){var t=e.options,n=!!t.channelID;return n&&d.default.trigger("show:view",this.viewFor("channelError")),n},populateServersThenRecover:function(){var e=(0,s.resolve)("appModel"),t=e.get("skipSignIn"),n=e.get("servers"),r=n.findWhere({cloud:!0}),a=this.viewFor;return n.populate().done(function(){var e=n.filter(function(e){return e.get("hasManualConnection")})[0];r.get("authorized")?d.default.trigger("navigate:refresh"):e?e.get("authorized")?d.default.trigger("navigate","dashboard"):d.default.trigger("show:view",a("unavailable",{
model:e})):t?d.default.trigger("show:view",a("serverRequired")):d.default.trigger("navigate","login",{silent:!0})}).fail(function(){f.default.get("requiresSignIn")?d.default.trigger("show:view",a("unavailable",{model:r})):d.default.trigger("show:view",a("serverRequired"))})}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(47),l=r(o),u=n(14),d=a(u),c=n(12),f=r(c),p=n(117),h=r(p),v=h.default.extend({
initialize:function(){h.default.prototype.initialize.apply(this,arguments),this.listenTo(f.default,{"navigate:back":this.onNavigateBack,"navigate:forward":this.onNavigateForward,"navigate:refresh":this.onNavigateRefresh,"navigate:refresh:dashboard":this.onNavigateRefreshDashboard})},onNavigateBack:function(){var e=d.resolve("appModel"),t=e.get("history"),n=e.get("forwardHistory");return t.length<2?this.navigate("",{trigger:!0}):(n.unshift(t.pop()),void this.navigate(s.default.last(t),{trigger:!0}));
},onNavigateForward:function(){var e=d.resolve("appModel"),t=e.get("forwardHistory");t.length&&this.navigate(t[0],{trigger:!0})},onNavigateRefresh:function(){l.default.history.loadUrl(l.default.history.getFragment())}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.key,n=e.getModel,r=e.pages,i=void 0===r?1:r,s=e.reloadThreshold,l=void 0===s?4:s,d=(0,u.default)(t),c="is"+d+"Pending",f="is"+d+"Populated",p=t?t+"Error":"error";return function(e,r){var s=r.startIndex,u=r.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 d=u-s,h=n(e,r),v=t?h.get(t):h,g=h.sessionAttrs;(0,o.default)(g&&g.hasOwnProperty(c),h.name+" is missing a session attribute for "+c),(0,o.default)(g&&g.hasOwnProperty(f),h.name+" is missing a session attribute for "+f),(0,o.default)(g&&g.hasOwnProperty(p),h.name+" is missing a session attribute for "+p),
h.set(c,!0),v.populateRange({start:s,end:s+d*i+1,reloadThreshold:d*l}).done(function(){var e;h.set((e={},a(e,c,!1),a(e,f,!0),a(e,p,null),e))}).fail(function(e,t){var n;h.set((n={},a(n,c,!1),a(n,p,t),n))})}}var a=n(38).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(41),o=i(s),l=n(200),u=i(l);e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(64),s=r(i),o=n(394),l=a(o),u=(0,
s.default)(l.CONFIRM_RELAY_CONNECTION);t.confirmRelayConnection=u},function(e,t,n){"use strict";function r(e,t,n){function a(){h===p&&(h=p.slice())}function i(){return t.getState()}function o(e){(0,l.default)("function"==typeof e,"Expected listener to be a function");var t=!0;return a(),h.push(e),function(){if(t){t=!1,a();var n=h.indexOf(e);h.splice(n,1)}}}function u(e){(0,l.default)((0,s.default)(e),"Actions must be plain objects");var n=e.type,r=!1;return(0,l.default)(null!=n,'Actions must have a "type" property. Have you misspelled a constant?'),
v.forEach(function(n){n(t,e,u)&&(r=!0)}),(0,l.default)(r,'The type "'+n+'" does not have a registered action handler'),e}function c(e){(0,l.default)(Array.isArray(e),"Action handlers must be contained within an array"),v=e}function f(){for(var e=p=h,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 d.default,"A store's model must extend `AbstractModel`"),n)return(0,l.default)("function"==typeof n,"Expected enhancer to be a function"),
n(r)(e,t);var p=[],h=p,v=e;return t.on("statechange",f),{dispatch:u,subscribe:o,getState:i,replaceActionHandlers:c}}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(199),s=a(i),o=n(41),l=a(o),u=n(22),d=a(u);e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,i.createSelector)(function(e,t){var n=t.libraryEntityID;return n},o.default,function(e,t){return t[e]})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;
var i=n(15),s=n(596),o=a(s);e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,i.createSelector)(function(e,t){var n=t.hubEntityID;return n},o.default,function(e,t){return t[e]})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(15),s=n(597),o=a(s);e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,i.createSelector)(function(e,t){var n=t.mediaSubscriptionEntityID;return n},o.default,function(e,t){return t[e]})}var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(15),s=n(603),o=a(s);e.exports=t.default},function(e,t,n){"use strict";function r(e){for(var t=a(null),n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t}var a=n(788).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(35),u=i(l),d=u.default.extend({initialize:function(){this.pool=[],this.index={}},lockOrCreate:function(e,t,n){var a=r(e);o.default.each(e,function(e){if(!this.find(e)){var r=o.default.find(this.pool,function(e){
return!a[e.id]},this);r||(r={},this.pool.push(r),r.view=t.call(n,r)),this.index[r.id]=void 0,this.index[e]=r,r.id=e}},this)},each:function(e,t){o.default.each(this.pool,e,t)},filter:function(e,t){var n=o.default.partition(this.pool,e,t),r=n[0],a=n[1];o.default.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(e){return o.default.find(this.pool,function(t){return t.view.model===e})},close:function(){
o.default.each(this.pool,function(e){e.view.close()}),this.pool=[],this.index={}},reindex:function(){var e=this.index={};o.default.each(this.pool,function(t){e[t.id]=t})}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.get("metadataList").getCollection(),n=t.length,r=e.get("viewGroup");if("Pictures"===r)return o.tileList;if("List"===r)return o.list;if(t.findWhere({type:"photo"}))return o.tileList;var a=s.default.compact(t.pluck("summary")),i=s.default.uniq(t.pluck("thumb")),l=t.reduce(function(e,t){
var n=t.get("title");return n?e+n.length:e},0),u=l/n;return i.length>n/2&&u<30?o.tileList:a.length>n/2?o.detailsList:o.list}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o={tileList:"media-tile-list",detailsList:"media-details-list",list:"media-list"},l={types:o,getListType:r};t.default=l,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="playPause,stop,skipPrevious,skipNext,seekTo,stepBack,stepForward,subtitleStream";
t.VIDEO=n;var r=n+",volume";t.VIDEO_WITH_VOLUME=r;var a="playPause,stop,skipPrevious,skipNext,seekTo,repeat";t.MUSIC=a;var i=a+",volume";t.MUSIC_WITH_VOLUME=i;var s="playPause,stop,skipPrevious,skipNext";t.PHOTO=s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="analyzing";t.ANALYZING=n;var r="thumbnailing";t.THUMBNAILING=r},function(e,t,n){"use strict";function r(e,t){if(null==e)return"";var n=(0,y.default)(e,"h:mma"),r=void 0;return r=(0,l.default)(e)?(0,s.default)("Yesterday"):(0,
d.default)(e)?(0,f.default)(e)?(0,s.default)("Tonight"):(0,s.default)("Today"):(0,h.default)(e)?(0,s.default)("Tomorrow"):(0,g.default)(e)?(0,y.default)(e,"dddd"):(0,y.default)(e,"ddd, MMM D"),t?(0,s.default)("{1} at {2} on {3}",r,n,t):(0,s.default)("{1} at {2}",r,n)}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(5),s=a(i),o=n(308),l=a(o),u=n(243),d=a(u),c=n(615),f=a(c),p=n(614),h=a(p),v=n(613),g=a(v),m=n(242),y=a(m);e.exports=t.default},function(e,t,n){"use strict";
function r(e,t){if(null==e)return"";var n=s.default.unix(e);if((0,d.default)(e))return(0,l.default)("Yesterday");var r=n.minutes(),a="h"+(0===r?"":":mm")+"a",i=(0,P.default)(e,a),o=void 0;return o=(0,f.default)(e)?(0,h.default)(e)?(0,l.default)("Tonight"):(0,l.default)("Today"):(0,g.default)(e)?(0,l.default)("Tomorrow"):(0,y.default)(e)?(0,P.default)(e,"dddd"):(0,P.default)(e,"MMM D"),t?(0,l.default)("{1} at {2} on {3}",o,i,t):(0,l.default)("{1} at {2}",o,i)}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=r;var i=n(53),s=a(i),o=n(5),l=a(o),u=n(308),d=a(u),c=n(243),f=a(c),p=n(615),h=a(p),v=n(614),g=a(v),m=n(613),y=a(m),b=n(242),P=a(b);e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=arguments.length<=1||void 0===arguments[1]?"HH:mm:ss":arguments[1];return e?(0,s.default)(e).format(t):""}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(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 a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=u[e]||s.default.last(u);return{times:e+1,remindAfter:(0,l.default)().add(t,"days").unix()}}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),s=a(i),o=n(53),l=a(o),u=[7,30,60,90,180];t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(196),i=r(a);t.formatDate=i.default;var s=n(609),o=r(s);t.formatDays=o.default;var l=n(610),u=r(l);t.formatDaysHours=u.default;var d=n(163),c=r(d);t.formatDuration=c.default;var f=n(198),p=r(f);t.formatHoursMinutes=p.default;var h=n(611),v=r(h);t.formatMinutes=v.default;var g=n(197),m=r(g);t.formatDurationLeft=m.default;
var y=n(137),b=r(y);t.formatPlayerTime=b.default;var P=n(138),w=r(P);t.formatTimeAgo=w.default;var S=n(242),_=r(S);t.formatTimestamp=_.default;var T=n(1076),I=r(T);t.formatTime=I.default},function(e,t,n){"use strict";function r(e,t){if(null==e||null==t)return!1;var n=(0,s.default)().unix();return n>=e&&n<=t}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(53),s=a(i);e.exports=t.default},function(e,t,n){"use strict";function r(e){return function(t,n,r){var i=r.value;
return r.value=(0,a.after)(e,i),r}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var a=n(3);e.exports=t.default},function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n,r){var i=r.value;return r.value=a.compose.apply(void 0,[i].concat(t)),r}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var a=n(3);e.exports=t.default},function(e,t,n){"use strict";function r(e){return function(t,n,r){var i=r.value;
return r.value=(0,a.debounce)(i,e),r}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var a=n(3);e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){var r=n.value;return n.value=(0,a.memoize)(r),n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var a=n(3);e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){var r=n.value;return n.value=s.default.once(r),n}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(3),s=a(i);
e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){var r=l.default.extend(!0,{},e),a=r[t];if(a&&n.type!==c.BOOLEAN){var i=s.default.findWhere(a,{value:n.value});i||a.push(n)}else r[t]=[n];return r}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(3),s=a(i),o=n(8),l=a(o),u=n(41),d=(a(u),n(199)),c=(a(d),n(164));e.exports=t.default},function(e,t,n){"use strict";function r(e){if(!e)return{};var t=decodeURIComponent(e).match(b);if(!t)return{};var n=t.reduce(function(e,t){
var n=t.match(P),r=a(n,4),i=r[1],s=r[2],o=r[3],u=l.default.uniq(o.split(p.OR));return 1===u.length&&(u=u[0]),(0,g.default)(e,i,{value:u,type:w[i]?h.BOOLEAN:h.OTHER,operator:s})},{});return n}var a=n(93).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(3),l=i(o),u=n(415),d=i(u),c=n(619),f=s(c),p=n(620),h=n(164),v=n(1086),g=i(v),m=l.default.values(f).map(d.default).join("|"),y="([^&!=<>]+)(["+m+"]+)([^&!=<>]+)",b=new RegExp(y,"g"),P=new RegExp(y),w={
unwatched:!0,unwatchedLeaves:!0,duplicate:!0};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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(242),i=r(a),s=n(86),o=r(s);t.default=(0,o.default)(i.default),e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(405),i=r(a),s=n(86),o=r(s);
t.default=(0,o.default)(i.default),e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(406),i=r(a),s=n(86),o=r(s);t.default=(0,o.default)(i.default),e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(414),i=r(a),s=n(86),o=r(s);t.default=(0,o.default)(i.default),e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(651),i=r(a),s=n(86),o=r(s);t.default=(0,o.default)(i.default),e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(26),i=n(86),s=r(i);t.default=(0,s.default)(a.getLastSegment),e.exports=t.default},,,,function(e,t,n){"use strict";function r(e){e=e||[];for(var t=0,n=e.length;t<n;t++){var a=e[t];if("xx"!==a&&"xn"!==a){if(s.default[a])return a;var i=a.match(o),l=i&&r([i[1]]);if(l)return l}}}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=r;var i=n(309),s=a(i),o=/(^[^-]+)\-/;e.exports=t.default},function(e,t){"use strict";function n(e){return e&&e.match(/[a-zA-Z\-]{2,10}/g)||[]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(35),i=r(a),s=n(12),o=r(s),l=n(56),u=r(l),d=n(65),c=r(d),f=i.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(c.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=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(38).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i,s=n(1100),o=a(s),l=n(65),u=a(l),d=n(32),c=a(d),f=(i={},
r(i,c.default.LEVEL_LOG,{method:"log",color:"black"}),r(i,c.default.LEVEL_DEBUG,{method:"debug",color:"#d500ff"}),r(i,c.default.LEVEL_INFO,{method:"info",color:"blue"}),r(i,c.default.LEVEL_WARN,{method:"warn",color:"#ff6600"}),r(i,c.default.LEVEL_ERROR,{method:"error",color:"red"}),i);t.config=f;var p=o.default.extend({name:"ConsoleReporter",hasSupport:function(){return u.default.hasConsole},onLogMessage:function(e){var t=e.message,n=f[e.level],r=console[n&&n.method]||console.log;n&&n.color?r.call(console,"%c"+t,"color: "+n.color+";"):r.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 r=n;if(e.Part.length>1)for(var a=0,i=e.Part.length;a<i;a++){var s=e.Part[a];if(!s.duration)break;if(t.key===s.key)break;r+=s.duration}return r}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 r(e,t){if(e.indexes){var n=e.indexes.split(",");if(n.length)return s.default.indexOf(n,t)>-1?t:n[0]}}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(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 a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),s=a(i),o=n(408),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e?s.default.first(e.get("Media")):null;return!(!t||t.container)}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(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 a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i),o=n(32),l=a(o);r.DELAY=3e4,t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){if(!t)return l.default.Deferred().resolve().promise();(0,d.default)("[playMedia] stop transcoder");
var r=e.supports("universalTranscoder")?"/video/:/transcode/universal/stop?session="+t:"/video/:/transcode/segmented/stop?session="+t;return n=s.default.extend(e.getXHROptions(r),n),l.default.ajax(n)}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(32),d=a(u);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=e.playQueueItem,r=e.metadataItem,a=e.media,i=e.part,s=r.get("ratingKey"),l=r.get("type");if(!s)return u.default.Deferred().resolve().promise();
var d={ratingKey:s,key:r.get("key"),state:e.state};if(e.continuing&&(d.continuing="1"),n.get("playQueueItemID")&&(d.playQueueItemID=n.get("playQueueItemID")),!("photo"===l||a&&i))return u.default.Deferred().resolve().promise();if("photo"!==l){var f=r.get("viewOffset")||0,h=a.duration;if(o.default.isNumber(e.position)&&(f=e.position,f=(0,v.default)(a,i,f)),h||o.default.isNumber(e.duration)&&(h=e.duration,a.duration=h),!h)return u.default.Deferred().resolve().promise();f>h&&(f=h),d.time=f,d.duration=h,
(0,m.default)(r,f,h)}var g="[Timeline] "+d.state;null!=d.time&&(g+=", "+d.time+"/"+d.duration),(0,p.default)(g);var y=c.join("/:/timeline",d);return t=o.default.extend(r.server.getXHROptions(y),t),e.playbackSessionID&&(t.headers["X-Plex-Session-Identifier"]=e.playbackSessionID),u.default.ajax(t)}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(8),u=a(l),d=n(26),c=i(d),f=n(32),p=a(f),h=n(1102),v=a(h),g=n(404),m=a(g);r.DELAY=1e4,t.default=r,e.exports=t.default;
},function(e,t,n){"use strict";function r(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 a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(294),l=a(o),u=0;t.default=r,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)+" "+r[t]}Object.defineProperty(t,"__esModule",{
value:!0});var r=["B","KB","MB","GB","TB"];t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e){if(!e)return"";var t=e.indexOf("/");return t!==-1?e.substr(t+1):e}Object.defineProperty(t,"__esModule",{value:!0}),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 r(e){return e instanceof s.default.Collection?e:e.getCollection?e.getCollection():e.has("childrenKey")?e.get("children").getCollection():void 0;
}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(47),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(405),i=r(a);t.formatAudioChannels=i.default;var s=n(406),o=r(s);t.formatAudioCodec=o.default;var l=n(407),u=r(l);t.formatBitrate=u.default;var d=n(1111),c=r(d);t.formatBytes=c.default;var f=n(312),p=r(f);t.formatResolution=p.default;var h=n(640),v=r(h);t.formatStreamLanguage=v.default;
var g=n(1113),m=r(g);t.formatVideoLevel=m.default;var y=n(641),b=r(y);t.formatVideoQuality=b.default;var P=n(246),w=r(P);t.createImageTranscodeUrl=w.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 r(e){var t=e.get("type"),n="channelDirectory"===t,r=n||t&&"directory"===s.default.get(t).element||e.get("isFolder"),a=void 0===e.length;return a&&!r}var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(37),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=t.itemDecision,r=s.default.pick(t,"shuffle","unwatched","continuous","items","excludeSeedItem"),a="movie"===e.get("type")&&!e.get("viewOffset");return a&&t.supportsContinuous&&(r.extrasPrefixCount=l.default.get("extrasPrefixCount")),n.toPlay&&(r.firstItemKey=n.toPlay.get("key")),r}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});
var i=n(3),s=a(i),o=n(40),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=s.default.Deferred(),r=e.server.get("playQueueManager"),a=r.getFor(t.itemDecision.toPlay||t.itemDecision.toAdd),i=(0,l.default)(e,t);return i.model=a.get("selectedItem"),i.playQueue=a,n.resolve(i).promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i),o=n(409),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){
var n=t.itemDecision,r=e.server.get("playQueueManager"),a=r.getFor(n.toPlay||n.toAdd);return a&&a.get("hasUserAdditions")?t.confirmClearPlayQueue():s.default.Deferred().resolve().promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=s.default.Deferred();if(t.siblings&&e.collection){var r=e.playlist||e.collection,a=e.get("metadataItem")||e;return n.resolve({toPlay:a,toAdd:r
}).promise()}var i=e.get("type"),o="show"===i&&!e.get("isSection"),u="season"===i;return t.unwatched&&(o||u)?!function(){var r=o?e:new l.default({key:e.get("parentKey")},{server:e.server}),a=r.fetch({data:{includeOnDeck:"1"}});a.then(function(){var a=r.get("onDeck"),i=a&&o,s=a&&u&&a.get("parentRatingKey")===e.id;i||s?(t.offset=a.get("viewOffset"),n.resolve({toPlay:a,toAdd:e})):n.resolve({toAdd:e})}),a.fail(n.reject)}():n.resolve({toAdd:e}),n.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(8),s=a(i),o=n(57),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(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 a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(37),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){
var n=e.get("selectedItem"),r="track"===n.get("type");if(!r)return o.default.Deferred().resolve(e).promise();var a=n.server,i=n.get("librarySectionID")||n.section&&n.section.get("key");return a.get("sections").populate().then(function(e){var t=e.findWhere({key:i});return t&&t.get("settings").populate()}).then(function(e){var n=e&&e.findWhere({id:"enableTrackOffsets"});t.enableTrackOffsets=n&&n.get("value")}).then(function(){return e})}function a(e,t){if(t.playQueue)return r(t.playQueue,t);var n=t.itemDecision,a=e.server.get("playQueueManager").createFor(n.toAdd,n.toPlay);
if(!a){var i="Couldn't create play queue";return u.default.warn("[PlayMedia]",i),(0,c.default)(),o.default.Deferred().reject(i).promise()}var s=a.addContent(n.toAdd,(0,p.default)(e,t)).then(function(){if(a.get("collection").length)return r(a,t);var e=a.get("message");return o.default.Deferred().reject("Couldn't queue item; empty play queue. "+e).promise()});return s.fail(function(e){u.default.warn("[PlayMedia]",e),(0,c.default)()}),s}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var s=n(8),o=i(s),l=n(32),u=i(l),d=n(644),c=i(d),f=n(1118),p=i(f);t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return(0,h.default)(e,t)?t.isFromCompanion?(0,g.default)(e,t):(d.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,P.default)(e,t)))}).then(function(){return(0,S.default)(e,t)}).then(function(n){
return t.playQueue=n,(0,P.default)(e,t)}).done(function(){f.default.execute("persistPlayQueue",null)})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(3),s=a(i),o=n(8),l=a(o),u=n(32),d=a(u),c=n(27),f=a(c),p=n(1125),h=a(p),v=n(1119),g=a(v),m=n(1120),y=a(m),b=n(409),P=a(b),w=n(1123),S=a(w);e.exports=t.default},function(e,t){"use strict";function n(e,t){var n=t.itemDecision,r=e.server.get("playQueueManager"),a=r.getFor(n.toPlay||n.toAdd);return a&&a.get("selectedItem")&&a.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){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(35),u=r(l),d=n(101),c=r(d),f=n(1128),p=r(f),h=n(32),v=r(h),g=n(56),m=r(g),y=n(1032),b=r(y),P=u.default.extend({mixins:m.default,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(e){i.default.bindAll(this,"onSyncCheck"),e||(e={}),this.warningThreshold=e.warningThreshold||this.warningThreshold,this.startDelay=e.startDelay||this.startDelay,this.syncDelay=e.syncDelay||this.syncDelay,this.resyncDelay=e.resyncDelay||this.resyncDelay,
this._clock=new p.default,this.setModel(e.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 e=o.default.Deferred(),t=this.determineReasonFromBuffer(),n=this.fetchTranscodeSession();return n.done(i.default.bind(function(n){var r=this.determineReasonFromTranscode(n);r===this.reasons.UNKNOWN&&(r=t),e.resolve(r)},this)),n.fail(i.default.bind(function(){e.resolve(t)},this)),e.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 o.default.Deferred().reject().promise();var e=this.model.get("transcodeSessionID"),t=this.model.get("transcodeServer"),n=new b.default({key:e},{server:t});return n.fetch()},determineRecommendation:function(e){var t,n=this.model.get("qualityIndex");if(e===this.reasons.TRANSCODER)n>=0&&(t=this.recommendations.ORIGINAL_QUALITY);else if(e===this.reasons.NETWORK){
var r=this.model.get("transcodeServer"),a=this.model.get("media"),s=c.default.getAvailableQualitiesFor(a,r);if(s.length&&this.model.get("canSetQuality")){var o=i.default.reduce(s,function(e,t){return e&&e.index<t.index?e:t});(n<0||n>o.index)&&(t=this.recommendations.LOWER_QUALITY)}}return t?t: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 e=this._clock,t=e.now(),n=e.getPosition(),r=this.model.get("position"),a=n-r;this._startedAt+this.startDelay>t?e.setPosition(r):a>this.warningThreshold?(e.setPosition(r),
this.model.get("buffering")||this.trigger("buffering"),this._hasWarned||(this._hasWarned=!0,this.determineReason().done(i.default.bind(function(e){v.default.warn("Player: Excessive buffering detected; "+e),this.trigger("warn",{reason:e,recommendation:this.determineRecommendation(e)})},this)))):this._resyncedAt?t-this._resyncedAt>this.resyncDelay&&(this._resyncedAt=null,e.setPosition(r)):this._resyncedAt=t,this._syncChecker=null,this._scheduleSyncCheck()}});t.default=P,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(35),o=r(s),l=o.default.extend({_position:0,_timestamp:null,now:function(){return i.default.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());
}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(410),o=r(s),l=i.default.extend({},o.default,{type:"music",qualities:{bitrate:[96,128,192,320]},getNearestIndexToBitrate:function(e){return this.getNearestIndex(this.qualities.bitrate,e)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(5),o=r(s),l=n(410),u=r(l),d=i.default.extend({},u.default,{
type:"photo",qualities:{photoResolution:["720x480","1280x720","1920x1080","3840x2160"],photoQuality:[24,49,74,99],title:function(){return[(0,o.default)("Low"),(0,o.default)("Medium"),(0,o.default)("High"),(0,o.default)("Highest")]}},getNearestIndexToQuality:function(e){return this.getNearestIndex(this.qualities.photoQuality,e)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";function r(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 a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(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 a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(14),d=a(u),c=n(35),f=r(c),p=n(65),h=r(p),v=n(141),g=r(v),m=n(46),y=r(m),b=n(56),P=r(b),w=n(27),S=r(w),_=n(133),T=r(_),I=n(89),M=r(I),C=f.default.extend({lastModified:null,eTag:null,mixins:P.default,url:function x(){var e=d.resolve("appModel"),t=e.get("user"),n="/sub/"+this.requestType+"/"+t.id+"/"+e.get("clientID"),r=new T.default({
scheme:"websockets"===this.requestType?"wss":"https",address:"pubsub.plex.tv"}),x=this.server.resolveUrl(n,{connection:r,appendToken:!0});return x},initialize:function(e){s.default.bindAll(this,"onSocketOpen","onSocketClose","onSocketError","onSocketMessage","onPollSuccess","onPollError"),this.server=e.server},open:function(){return(this.socket||this.pollRequest)&&this.close(),h.default.hasWebSocket?(this._deferred=l.default.Deferred(),this.requestType="websockets",this.socket=new WebSocket(s.default.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&&(g.default.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=s.default.result(this,"url");var e=this.server.getXHROptions(this.pollUrl);return e.headers["If-Modified-Since"]=this.lastModified?this.lastModified:"Thu, 01 Jan 1970 00:00:00 GMT",this.eTag&&(e.headers["If-None-Match"]=this.eTag),this.pollRequest=l.default.ajax(e).done(this.onPollSuccess).fail(this.onPollError),this.pollRequest.promise()},handleResponse:function(e){if(e){var t=y.default.parseXML(e);if(s.default.isObject(t)){
var n=this[t.command];s.default.isFunction(n)&&n.call(this,t)}}},addUnclaimedServer:function(e){var t=d.resolve("appModel"),n=new M.default({},{parent:t}),r=s.default.isArray(e.Device.Connection)?e.Device.Connection:[e.Device.Connection];s.default.each(r,function(e){var t=e.uri,r=e.port,a=e.address,i=e.protocol;n.addConnection({uri:t,port:r,address:a,scheme:i,sources:[{id:this.server.id}]})},this),h.default.isHostedHttps&&!n.get("isSecure")?S.default.execute("showClaimServerAlertBar",n):t.get("servers").add(n);
},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)}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t={};for(var n in e){var r=e[n];t[r]={relationClass:l.default}}return s.default.extend({sessionRelations:t})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(22),s=a(i),o=n(969),l=a(o);e.exports=t.default},function(e,t,n){
"use strict";function r(e,t){return(0,f.default)(e)?a(e,t):d.default.isArray(e)?i(e,t):e===t}function a(e,t){for(var n=e.possibleEntityContainers,a=n?n.length:0,i=0;i<a;i++){var s=n[i],o=e[s];if(r(o,t))return!0}return!1}function i(e,t){for(var n=0,a=e.length;n<a;n++){var i=e[n];if(r(i,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:v,a=(0,h.default)(),i=e.entities,s=o(i),l=s.length,u={};++g<l;){var d=s[g],c=i[d],f=o(c),p=f.length;
for(m+1>=p&&g+1>=l&&(g=-1);++m<p;){var y=f[m];if(r(e,y)||(u[d]||(u[d]=[]),u[d].push(y)),(0,h.default)()-a>=n)return g--,u}m=-1}return g=-1,u}var o=n(79).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var u=n(3),d=l(u),c=n(199),f=l(c),p=n(646),h=l(p),v=1e3/60,g=-1,m=-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 r=n[1];t=t.replace(r+"S",r+"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="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r={
encode:function(e){var t="",r=void 0,a=void 0,i="",s=void 0,o=void 0,l=void 0,u="",d=0;do r=e.charCodeAt(d++),a=e.charCodeAt(d++),i=e.charCodeAt(d++),s=r>>2,o=(3&r)<<4|a>>4,l=(15&a)<<2|i>>6,u=63&i,isNaN(a)?l=u=64:isNaN(i)&&(u=64),t=t+n.charAt(s)+n.charAt(o)+n.charAt(l)+n.charAt(u),r=a=i="",s=o=l=u="";while(d<e.length);return t},decode:function(e){var t="",r=void 0,a=void 0,i="",s=void 0,o=void 0,l=void 0,u="",d=0,c=/[^A-Za-z0-9\+\/\=]/g;if(c.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(d++)),o=n.indexOf(e.charAt(d++)),l=n.indexOf(e.charAt(d++)),u=n.indexOf(e.charAt(d++)),r=s<<2|o>>4,a=(15&o)<<4|l>>2,i=(3&l)<<6|u,t+=String.fromCharCode(r),64!==l&&(t+=String.fromCharCode(a)),64!==u&&(t+=String.fromCharCode(i)),r=a=i="",s=o=l=u="";while(d<e.length);return unescape(t)}};t.default=r,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,r=0;r<e.length;r++){
var a=e.charCodeAt(r);a<128||(a<2048?(r>n&&(t+=e.substring(n,r)),n=r+1,t+=String.fromCharCode(192|a>>>6),t+=String.fromCharCode(128|63&a)):(r>n&&(t+=e.substring(n,r)),n=r+1,t+=String.fromCharCode(224|a>>>12),t+=String.fromCharCode(128|a>>>6&63),t+=String.fromCharCode(128|63&a)))}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,r=e.length;n<r;n++){var a=e.charAt(n),i=a.toUpperCase();t+=0===n?i:a===i?" "+i:a;
}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(415),i=r(a);t.escapeRegExp=i.default;var s=n(248),o=r(s);t.pluralize=o.default;var l=n(416),u=r(l);t.random=u.default;var d=n(1145),c=r(d);t.toStableJSON=c.default;var f=n(648),p=r(f);t.formatActionType=p.default;var h=n(649),v=r(h);t.formatBoolean=v.default;var g=n(1141),m=r(g);t.formatPropertyLabel=m.default;
var y=n(1136),b=r(y);t.toLowerCase=b.default;var P=n(1137),w=r(P);t.toLowerCaseFirstLetter=w.default;var S=n(647),_=r(S);t.toTitleCase=_.default;var T=n(414),I=r(T);t.toUpperCase=I.default;var M=n(200),C=r(M);t.toUpperCaseFirstLetter=C.default;var x=n(1139),E=r(x);t.base64=E.default;var k=n(1140),D=r(k);t.utf8=D.default;var A=n(417),O=r(A);t.truncate=O.default;var R=n(651),L=r(R);t.truncateFilename=L.default;var N=n(418),j=r(N);t.truncateMiddle=j.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 r(e){return e?(0,s.default)("<p>"+e+"<p>").text():""}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(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 a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(t){var n=s.default.escape((0,l.default)(t.tag,e.maxLen));if(!i||!t.id)return n;var r=["#!/server/"+encodeURIComponent(a.server.id),"/section/"+encodeURIComponent(a.id),"/filter","/"+encodeURIComponent(o.id),"/"+encodeURIComponent(e.key),"/"+encodeURIComponent(t.id),"/"+encodeURIComponent(t.tag)];return'<a class="pivot-link" href="'+r.join("")+'">'+n+"</a>";
}var n=s.default.reject(e.tags,function(e){return!e.tag}),r=e.model,a=r.section,i=a&&a.get("allowAdvancedFilters"),o=d.default.get(r.get("type")),u=e.separator||", ",c="";if(n&&n.length){var f=e.maxTags||n.length;f>n.length&&(f=n.length);for(var p=0;p<f;p++)c+=t(n[p]),p+1<f&&(c+=u)}return c}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(417),l=a(o),u=n(37),d=a(u);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=(0,l.default)(t);
if(!n)return e;var r=e.indexOf("?"),a=e.length;return e+=r>-1?r<a-1?"&":"":"?",e+n}function a(e,t){var n=t.type,a=t.filters,i=t.sort,s=d.join(e),o={};return n&&(o.type=n),i&&(o.sort=i),d.join(r(s,a),o)}var i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var o=n(623),l=i(o),u=n(26),d=s(u);e.exports=t.default},function(e,t,n){"use strict";function r(e){var t={},n={};for(var r in e){var a=m.test(r)?n:t;a[r]=e[r]}return i({},t,n)}function a(e){var t=e.type,n=e.contentType,a=e.headers;
if(h[t]){var i={},s=!1;if(u.default.each(a,function(e,t){v[t]||(m.test(t)?(s=!0,i[t]=e,delete a[t]):p.default.warn('Did not move header "%s" to query string. This can result in an unnecessary OPTIONS preflight request.',t))}),s){var o=c.parseUrl(e.url),l=u.default.extend({},i,o.params);"GET"===t&&e.data&&(u.default.extend(l,c.parseParams(e.data)),delete e.data);var d=r(l),f=o.origin,y=o.isAbsolute?f:"";e.url=c.join([y,o.pathname],d)}n&&!g.test(n)&&p.default.warn('Sending %s request with Content-Type "%s". This can result in an unnecessary OPTIONS preflight request.',t,n);
}}var i=n(11).default,s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var l=n(3),u=s(l),d=n(26),c=o(d),f=n(32),p=s(f),h={GET:!0,POST:!0,HEAD:!0},v={Accept:!0,"Accept-Language":!0,"Content-Language":!0,"Content-Type":!0},g=/^(text\/plain|multipart\/form-data|application\/x-www-form-urlencoded)/,m=/^X-Plex/i;e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(13),o=r(s),l=n(652),u=r(l),d=n(1070),c=r(d),f=o.default.View.extend({
constructor:function(){o.default.View.prototype.constructor.apply(this,arguments)},initialize:function(){o.default.View.prototype.initialize.apply(this,arguments),this.pool=new c.default(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(e){
var t=o.default.getOption(this,"itemView"),n=o.default.getOption(this,"itemViewOptions");i.default.isFunction(n)&&(n=n.call(this,e));var r=new t(n);return r._parentView=this,r.render(),this.$el.append(r.$el),r},scheduleFilling:function(e){u.default.cancel(this.cid),i.default.each(e,function(e){var t=this.pool.find(e);t.filledWithIndex!==t.id&&u.default.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,r=t.filledWithIndex===-1,a=t.id>=e.from&&t.id<=e.to;!a||n||r||(this.clearCell(t),t.filledWithIndex=-1)},this)},_getImmediateChildren:function(){return i.default.pluck(this.pool.pool,"view")},onClose:function(){u.default.cancel(this.cid),this.pool.close()}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2257),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(964),c=r(d),f=u.default.ItemView.extend({mixins:[c.default],className:"video-subtitles-renderer",template:i.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=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(2258),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(95),p=r(f),h=c.default.ItemView.extend({className:"video-image-overlay",template:i.default,initialize:function(e){this.videoAspectRatio=e.videoAspectRatio,this.overscan=e.overscan,this.throttledSetStyles=o.default.throttle(this.whenRendered(this.setStyles),100),this.image=new p.default({model:this.model,modelAttribute:"key",width:this.model.get("width"),height:this.model.get("height"),
background:!0}),this.setStyles(),"video"===this.model.get("relative")&&(0,u.default)(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"),r=this.model.get("height"),a=0,i=0,s=this.getOffset(),o={position:"absolute",top:"auto",right:"auto",bottom:"auto",left:"auto",backgroundSize:n+"px "+r+"px",
backgroundRepeat:"no-repeat",width:n,height:r};"center"===e?(o.left="50%",a="-50%"):"left"===e?o.left=s.x:"right"===e&&(o.right=s.x),"middle"===t?(o.top="50%",i="-50%"):"top"===t?o.top=s.y:"bottom"===t&&(o.bottom=s.y),o.transform="translate("+a+", "+i+")",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=(0,u.default)(window).width(),n=(0,u.default)(window).height(),r=t/n;if(this.videoAspectRatio>r){var a=t/this.videoAspectRatio;e.y=(n-a)/2}else{var i=n*this.videoAspectRatio;e.x=(t-i)/2}}return this.overscan&&(e.x+=this.overscan.x,e.y+=this.overscan.y),e},onRender:function(){this.image.setElement(this.$el)},onClose:function(){(0,u.default)(window).off("resize",this.throttledSetStyles),this.image.close()}});t.default=h,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2259),i=r(a),s=n(13),o=r(s),l=n(567),u=r(l),d=n(1151),c=r(d),f=o.default.CompositeView.extend({className:"video-image-overlays-container",template:i.default,itemView:c.default,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 u.default,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())})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),i=r(a),s=n(203),o=r(s),l=o.default.extend({serializeData:function(){return{title:(0,i.default)("This channel is not responding.")}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(203),i=r(a),s=i.default.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}}});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),i=r(a),s=n(203),o=r(s),l=o.default.extend({initialize:function(e){this.type=e.type||"404"},serializeData:function(){var e,t;
return"404"===this.type?(e=(0,i.default)("You must be lost."),t=(0,i.default)("This page doesn't exist.")):"server"===this.type?(e=(0,i.default)("Media server not found."),t=(0,i.default)("The server you're trying to access doesn't seem to exist.")):(e=(0,i.default)("Media not found."),t=(0,i.default)("The media you're trying to access doesn't seem to exist.")),{title:e,subtitle:t}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(203),i=r(a),s=i.default.extend({});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),i=r(a),s=n(203),o=r(s),l=o.default.extend({serializeData:function(){return{title:(0,i.default)("No soup for you!"),subtitle:(0,i.default)("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.")}}});t.default=l,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(5),o=r(s),l=n(12),u=r(l),d=n(203),c=r(d),f=c.default.extend({modelEvents:{"change:isResolved":"onResolvedChange"},serializeData:function(){var e,t,n=this.model,r=n.get("friendlyName");return n.get("cloud")?n.get("isDownForMaintenance")?(e=(0,o.default)("Plex is down for maintenance."),t=(0,o.default)("Don't worry, it'll be back soon.")):(e=(0,o.default)("Plex is not reachable."),t=(0,o.default)("Make sure your server has an internet connection and any firewalls or other programs are set to allow access.")):(e=(0,
o.default)("Server unavailable."),t=r?(0,o.default)("We couldn't reach \"{1}\". Make sure it's online and try again.",i.default.escape(r)):(0,o.default)("We couldn't reach this server. Make sure it's online and try again.")),{title:e,subtitle:t}},onResolvedChange:function(e,t){t&&u.default.trigger("navigate:refresh")}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(){function e(){var e=void 0;return r.length?e=r.shift():(e=n+o,o++),e}function t(e){delete a[e]}var n=arguments.length<=0||void 0===arguments[0]?"":arguments[0],r=[],a={},i={},o=0;
return{getKeys:function(n,o,l,u,d){void 0===u&&(u=0),s.default.each(a,function(e,t){var a=e.item;if(null===a)r.push(t);else{var c=s.default.isString(a)?a:a[d],f=l.indexOf(a)+u;(f<n||f>o)&&(r.push(t),delete i[c])}});for(var c=n;c<=o;c++){var f=l[c-u]||null,p=f&&(s.default.isString(f)?f:f[d]),h=f&&i[p];h||(h=e(),f&&(i[p]=h)),a[h]={index:c,item:f}}return r.forEach(t),r.length=0,s.default.extend({},a)}}}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(3),s=a(i);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={},r={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=r,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{
value:!0});var n="up";t.UP=n;var r="right";t.RIGHT=r;var a="down";t.DOWN=a;var i="left";t.LEFT=i;var s=[n,r,a,i];t.all=s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="none";t.NONE=n;var r="vertical";t.VERTICAL=r;var a="horizontal";t.HORIZONTAL=a;var i="omni";t.OMNI=i;var s=[n,r,a,i];t.all=s},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="topLeft";t.TOP_LEFT=n;var r="topCenter";t.TOP_CENTER=r;var a="topRight";t.TOP_RIGHT=a;var i="bottomLeft";
t.BOTTOM_LEFT=i;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 d=[n,r,a,i,s,o,l,u];t.all=d},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(12),i=r(a),s=n(35),o=r(s),l=n(708),u=r(l),d=o.default.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(e){var t="shortcut:"+e;if(i.default.hasListener(t))return i.default.trigger(t),!1},help:function(e){i.default.trigger("show:modal",new u.default({shortcuts:this.shortcuts}))},escape:function(e){i.default.hasListener("shortcut:escape")?i.default.trigger("shortcut:escape"):i.default.hasListener("shortcut:stop")&&i.default.trigger("shortcut:stop")},sidebar:function(e){i.default.trigger("shortcut:sidebar")},dashboard:function(e){
i.default.trigger("navigate","dashboard")},settings:function(e){i.default.trigger("navigate","settings")},activity:function(e){i.default.trigger("navigate","activity")},watchLater:function(e){i.default.trigger("navigate","userPlaylist",{key:"queue"})},recommendations:function(e){i.default.trigger("navigate","userPlaylist",{key:"recommendations"})},users:function(e){i.default.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")}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(35),i=r(a),s=n(962),o=r(s),l=n(40),u=r(l),d=i.default.extend({mixins:o.default,constructor:function(){this.basePath="translations/",this.translations={},u.default.getInstance().on("change:language",function(e,t){
this.load(t)},this)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(840),o=r(s),l=n(908),u=r(l),d=i.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=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(9).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(14),s=r(i),o=n(374),l=a(o),u=n(1167),d=a(u),c=n(547),f=a(c),p=n(911),h=a(p),v=n(51),g=a(v),m=n(234),y=a(m),b=n(1178),P=a(b),w=n(1172),S=a(w),_=n(913),T=a(_),I=n(1179),M=a(I),C=n(373),x=a(C),E=n(910),k=a(E),D={registerAll:function(){l.default.register(d.default),f.default.register(new h.default);var e=new P.default,t=new S.default;y.default.register({protocol:"plex",type:"*",create:function(t,n){return e.createController(t,n)}}),y.default.register({protocol:"cast",type:"*",create:function(e,n){
return t.createController(e,n)}}),y.default.register({protocol:"local",type:g.default.types.PHOTO,create:function(e){return new T.default({type:e})}}),s.register("companionPlayerProfile",M.default),x.default.register(k.default)}};t.default=D,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(1168),i=r(a),s=n(99),o=r(s),l=n(292),u=r(l),d=n(915),c=r(d),f=n(916),p=r(f),h=n(192),v=r(h),g=n(1170),m=r(g),y=n(191),b=r(y),P=n(904),w=r(P),S=n(375),_=r(S),T=n(1165),I=r(T),M=n(376),C=r(M),x=n(1180),E=r(x),k=n(51),D=r(k),A=n(234),O=r(A),R=n(1176),L=r(R),N=n(1175),j=r(N),U={
registerAll:function(){var e=m.default.init();e.done(function(e){return v.default.register(e)});var t=new c.default;return o.default.register(t),u.default.register(new p.default),b.default.register(w.default),_.default.register(new I.default),C.default.register(E.default),O.default.register({protocol:"local",type:D.default.types.VIDEO,create:function(e){return new L.default({type:e})}}),O.default.register({protocol:"local",type:D.default.types.MUSIC,create:function(e){return new j.default({type:e
})}}),i.default.registerAll(),e}};t.default=U,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),i=r(a),s=n(14),o=n(76),l=r(o),u={init:function(){var e=(0,s.resolve)("appModel"),t=window.innerWidth+"x"+window.innerHeight,n=window.screen.width+"x"+window.screen.height,r={"X-Plex-Product":"Plex Web","X-Plex-Version":"2.8.1","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+")","X-Plex-Device-Screen-Resolution":t+","+n};return e.on("change:clientID",function(e,t){r["X-Plex-Client-Identifier"]=t}),i.default.Deferred().resolve(r).promise()}};t.default=u,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(14),d=a(u),c=n(51),f=r(c),p=n(101),h=r(p),v=n(404),g=r(v),m=n(411),y=r(m),b=n(420),P=r(b),w=n(40),S=r(w),_=n(661),T=r(_),I=n(662),M=r(I),C=M.default.extend({
modelDefaults:function(){var e=M.default.prototype.modelDefaults.apply(this,arguments),t=this.model.get("playQueue");return s.default.extend(e,{canPlayPause:!0,canStop:!0,canSeek:!0,canSetVolume:this.type!==f.default.types.PHOTO,canSetAudioStream:!0,canSetSubtitleStream:!0,canSetQuality:!0,showPlayQueue:t.supports({remoteRefresh:!0})})},load:function(e){this.model=e.model,this.mediaElement=e.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 t=this.model.get("playQueue");if(this.listenTo(t.get("collection"),"reset",this.onPlayQueueChange),
e.silent)return this.manager.updatePlayer(),l.default.Deferred().resolve().promise();var n=this.model.get("metadataItem"),r=n.server,a=d.resolve("appModel"),i=a.get("primaryServer"),o=e.offset/1e3||0,u=h.default.getCurrentQuality(n,S.default.getInstance()),c=a.get("user"),f={offset:o,directPlay:S.default.get("directPlay"),directStream:S.default.get("directStream"),bitrate:u.bitrate,subtitleSize:S.default.get("subtitleSize"),audioBoost:S.default.get("audioBoost"),server:this.getServerInfo(r,{isRequired:!0
}),user:{username:c.get("username")}};if(!f.server)return l.default.Deferred().reject().promise();var p=[];p.push(this.getTransientTokenFor(r,f.server)),i&&r.id!==i.id&&(f.primaryServer=this.getServerInfo(i),f.primaryServer&&p.push(this.getTransientTokenFor(i,f.primaryServer)));var v=l.default.Deferred().resolve().promise();return v=t.yieldOwnership({absoluteUrl:!0}).then(function(e){f.containerKey=e}),v=v.then(function(){return(0,y.default)(p)}),v.done(s.default.bind(function(){var e=new chrome.cast.media.MediaInfo(n.get("key"),this.type);
e.customData=f;var t=new chrome.cast.media.LoadRequest(e);t.currentTime=o,t.autoplay=!0,this.manager.loadMedia(t)},this)),v},mirror:function(e){var t=e.item,n=t.server,r=d.resolve("appModel"),a=r.get("primaryServer"),i=r.get("user"),o={server:this.getServerInfo(n,{isRequired:!0}),user:{username:i.get("username")}};if(!o.server)return l.default.Deferred().reject().promise();var u=[];u.push(this.getTransientTokenFor(n,o.server)),a&&n.id!==a.id&&(o.primaryServer=this.getServerInfo(a),o.primaryServer&&u.push(this.getTransientTokenFor(a,o.primaryServer)));
var c=(0,y.default)(u);return c.done(s.default.bind(function(){var e=new chrome.cast.media.MediaInfo(t.get("key"),this.type);e.customData=o;var n={type:T.default.SHOWDETAILS};n.media=e,this.manager.sendCustomMessage(n)},this)),c},getServerInfo:function(e,t){var n=this.getServerConnection(e,t);if(n){var r=s.default.extend({machineIdentifier:e.id,transcoderVideo:e.get("transcoderVideo")||!1,transcoderVideoRemuxOnly:e.get("transcoderVideoRemuxOnly")||!1,transcoderAudio:e.get("transcoderAudio")||!1,version:e.get("shortVersion"),
myPlexSubscription:e.get("myPlexSubscription"),isVerifiedHostname:"https"===n.protocol&&!P.default.isValidAddress(n.address)},n);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",f.default.states.PLAYING),this.manager.sendCustomMessage({type:T.default.PLAY})},pause:function(){this.model.set("state",f.default.states.PAUSED),this.manager.sendCustomMessage({type:T.default.PAUSE})},setPosition:function(e){
if(this.canSeek(e)){this.model.set({state:f.default.states.BUFFERING,position:e});var t=e/1e3;this.manager.startSeek(t),this.sendPositionRequest(t)}},sendPositionRequest:s.default.debounce(function(e){this.manager.sendCustomMessage({type:T.default.SEEK,currentTime:e})},500),setVolume:function(e){this.model.set("volume",e),this.sendVolumeRequest(e/100)},sendVolumeRequest:s.default.debounce(function(e){this.manager.sendSessionCommand("setReceiverVolumeLevel",e),e||this.manager.sendSessionCommand("setReceiverMuted",!0);
},200),skipPrevious:function(){this.manager.sendCustomMessage({type:T.default.PREVIOUS})},skipNext:function(){this.manager.sendCustomMessage({type:T.default.NEXT})},skipTo:function(e){this.manager.sendCustomMessage({type:T.default.SKIPTO,key:e})},stop:function(e){M.default.prototype.stop.apply(this,arguments),this.manager.sendCustomMessage({type:T.default.STOP})},refreshRemotePlayQueue:function(){this.manager.sendCustomMessage({type:T.default.REFRESHPLAYQUEUE})},setStream:function(e,t){this.manager.sendCustomMessage({
type:T.default.SETSTREAM,stream:{type:e,id:t}})},setQualityIndex:function(){var e=this.model.get("metadataItem"),t=h.default.getCurrentQuality(e,S.default.getInstance());this.manager.sendCustomMessage({type:T.default.SETQUALITY,bitrate:t.bitrate})},onTimeline:function(e){var t=this.model.get("playQueue"),n=this.model.get("playQueueItem");if(e.containerKey){var r=e.containerKey.split("?")[0],a=s.default.result(t,"url");if(a&&a!==r)return}if(e.key&&e.key!==n.get("key")){var i=t.get("collection");if(n=i.findWhere({
key:e.key}),!n)return;this.reset(n)}var o=null;if(e.transcodeServerID){var l=d.resolve("appModel"),u=l.get("servers");o=u.get(e.transcodeServerID)}var c=h.default.getNearestIndexToBitrate(e.bitrate),p=s.default.isNumber(e.audioStreamID)?e.audioStreamID:null,v=s.default.isNumber(e.subtitleStreamID)?e.subtitleStreamID:null;this.isTimelineChange=!0,this.model.set({mediaIndex:e.mediaIndex,partIndex:e.partIndex,qualityIndex:c,audioStreamID:p,subtitleStreamID:v,transcodeServer:o,state:e.state,ready:!0,
loaded:"photo"!==this.type,finished:e.state===f.default.states.STOPPED,errorMessage:e.errorMessage,duration:Math.round(1e3*e.duration),volume:Math.round(e.volume)}),this.model.hasAttr("slideshowState")&&this.model.set("slideshowState",f.default.getSlideshowStateByState(e.state)),this.isTimelineChange=!1,this.onProgress(e.position)},onProgress:function(e){var t=this.model.get("metadataItem"),n=this.model.get("duration"),r=Math.round(1e3*e);(0,g.default)(t,r,n),this.model.set("position",r)},onError:function(e){
this.model.set({state:f.default.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))}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(14),l=a(o),u=n(5),d=r(u),c=n(12),f=r(c),p=n(76),h=r(p),v=n(305),g=r(v),m=n(51),y=r(m),b=n(201),P=r(b),w=n(687),S=r(w),_=n(661),T=r(_),I=n(32),M=r(I),C=n(40),x=r(C),E=n(663),k=r(E),D=n(570),A=r(D),O=n(1171),R=r(O),L=k.default.extend({
protocol:"cast",namespace:"urn:x-cast:plex",progressDelay:100,controller:R.default,sessionWrapped:["loadMedia","sendSessionCommand","sendCustomMessage"],mediaSessionWrapped:["sendMediaCommand","startSeek"],appID:function(){var e=x.default.get("chromecastAppID"),t=x.default.get("chromecastCustomAppID");return e===S.default.CUSTOM&&t?t:e||S.default.PRODUCTION},initialize:function(){if("chrome"===h.default.id){s.default.bindAll(this,"onApiAvailable","onApiLoadSuccess","onApiLoadError","onReceiverAvailable","onReceiverAction","onCustomReceiversError","onSessionAvailable","onSessionError","onSessionUpdate","onMediaSessionDiscovered","onMediaSessionError","onMediaSessionUpdate"),
k.default.prototype.initialize.apply(this,arguments),this.sessionBacklog=new g.default,this.sessionBacklog.wrapAll(this.sessionWrapped,function(){return!!this.session},this),this.mediaSessionBacklog=new g.default,this.mediaSessionBacklog.wrapAll(this.mediaSessionWrapped,function(){return!!this.mediaSession},this),this.listenTo(f.default,"cast:launch",this.onLaunch),window.__onGCastApiAvailable=this.onApiAvailable;var e=document.createElement("script");e.src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js",
document.head.appendChild(e)}},load:function(){x.default.populate({reset:!0}).always(s.default.bind(function(){var e=s.default.result(this,"appID"),t=new chrome.cast.SessionRequest(e),n=new chrome.cast.ApiConfig(t,this.onSessionAvailable,this.onReceiverAvailable);chrome.cast.initialize(n,this.onApiLoadSuccess,this.onApiLoadError)},this))},loadCustomReceivers:function(){var e=l.resolve("appModel"),t=e.get("players");t.length&&(this.customReceivers=[],t.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),k.default.prototype.stop.apply(this,arguments)},loadMedia:function(e){(0,M.default)("[Cast] Load media command"),this.session.loadMedia(e,this.onMediaSessionDiscovered,this.onMediaSessionError);
},sendSessionCommand:function(e,t){(0,M.default)("[Cast] Sending session command: "+e),this.session[e](t,null,this.onMessageError)},sendMediaCommand:function(e,t){(0,M.default)("[Cast] Sending media command: "+e),this.mediaSession[e](t,null,this.onMessageError)},sendCustomMessage:function(e){(0,M.default)("[Cast] Sending custom message: "+e.type),e.type===T.default.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=l.resolve("appModel");f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem connecting to this player.")}),e.set("primaryPlayer",null)},updatePlayer:function(){clearInterval(this.progressInterval);var e=this.mediaSession.media,t=this.mediaSession.customData;if(e&&t){var n=s.default.extend({machineIdentifier:t.server.machineIdentifier,state:y.default.getStateByCastState(this.mediaSession.playerState),duration:e.duration,
position:this.mediaSession.currentTime,volume:this.getVolumeLevel(this.session.receiver.volume)},s.default.omit(t,["server","primaryServer","user"]));n.state===y.default.states.PLAYING&&"photo"!==e.contentType&&(this.progressInterval=setInterval(s.default.bind(this.onProgress,this),this.progressDelay)),this.mediaSession.idleReason===chrome.cast.media.IdleReason.ERROR&&(n.state=y.default.states.ERROR,n.errorMessage=t.errorMessage),this.trigger("timeline",n),this.updateNowPlaying(n)}},updateCustomReceiverDisplayStatus:function(e,t){
var n,r,a=l.resolve("appModel");if(t){var i=P.default.image(t.server,t.get("thumb"),{fallbackServer:a.get("primaryServer"),width:32,height:32,minSize:1});n=t.get("title"),r=[new chrome.cast.Image(i)]}else{var s=a.get("primaryPlayer");n=s.get("product")||"Plex"}e.displayStatus=new chrome.cast.ReceiverDisplayStatus(n,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(e,t){
k.default.prototype.onPrimaryPlayerChange.apply(this,arguments);var n=l.resolve("appModel");if(this.activeCustomReceiver){var r=n.previous("primaryPlayer");r&&this.stopListening(r.get("nowPlaying")),this.resetCustomReceiverDisplayStatus(this.activeCustomReceiver),this.activeCustomReceiver=null}if(t){var a=s.default.findWhere(this.customReceivers,{label:this.getCustomReceiverLabel(t)});if(a){var i=t.get("nowPlaying");this.updateCustomReceiverDisplayStatus(a),this.activeCustomReceiver=a,this.listenTo(i,"add",this.onCustomNowPlayingAdd),
this.listenTo(i,"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():M.default.warn("[Cast] "+t)},onApiLoadSuccess:function(){var e=l.resolve("appModel");(0,M.default)("[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 t=l.resolve("appModel");M.default.error("[Cast] Unable to load the cast api: "+JSON.stringify(e)),t.set("isCastApiAvailable",!1)},onReceiverAvailable:function(e){var t=l.resolve("appModel");e===chrome.cast.ReceiverAvailability.AVAILABLE?((0,M.default)("[Cast] Receivers are available"),t.set("isCastDeviceAvailable",!0)):(M.default.warn("[Cast] No receivers are available"),
t.set("isCastDeviceAvailable",!1))},onReceiverAction:function(e,t){(0,M.default)("[Cast] "+e.friendlyName+" -> "+t);var n=l.resolve("appModel"),r=/^custom-(.*)/.exec(e.label);if(r){M.default.info("[Cast] "+e.friendlyName+" is a custom receiver");var a=n.get("players"),i=a.get(r[1]);"cast"===t?n.set("primaryPlayer",i):"stop"===t&&n.set("primaryPlayer",null)}},onCustomReceiversSuccess:function(){(0,M.default)("[Cast] Custom receivers success")},onCustomReceiversError:function(e){M.default.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){(0,M.default)("[Cast] Session: "+JSON.stringify(e));var t=l.resolve("appModel");if(this.session=e,e.sessionId===chrome.cast.Session.CUSTOM_RECEIVER_SESSION_ID){M.default.info("[Cast] Custom receiver: "+e.receiver.friendlyName);var n=/^custom-(.*)/.exec(e.receiver.label);if(n){var r=t.get("players");t.set("primaryPlayer",r.get(n[1]));
}}else t.set("primaryPlayer",new A.default(e.receiver,{parse:!0})),e.addUpdateListener(this.onSessionUpdate),e.addMediaListener(this.onMediaSessionDiscovered),e.media.length&&((0,M.default)("[Cast] Found existing media sessions."),this.onMediaSessionDiscovered(e.media[0])),this.sessionBacklog.process()},onSessionError:function(e){"cancel"!==e.code&&M.default.error("[Cast] Unable to launch new session: "+JSON.stringify(e))},onSessionUpdate:function(e){if(e)return void this.updateVolumeState();if((0,
M.default)("[Cast] Session ended"),this.resetSession(),this.resetMediaSession(),!this.activeCustomReceiver){var t=l.resolve("appModel");t.set("primaryPlayer",null)}},onSessionStopError:function(e){M.default.error("[Cast] Unable to stop session: "+JSON.stringify(e))},onMediaSessionDiscovered:function(e){return(0,M.default)("[Cast] Media session discovered: "+JSON.stringify(e)),e.playerState===y.default.castStates.STOPPED?void this.resetMediaSession():(this.mediaSession=e,e.addUpdateListener(this.onMediaSessionUpdate),
this.updatePlayer(),void this.mediaSessionBacklog.process())},onMediaSessionError:function(e){M.default.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){M.default.warn("[Cast] Message error: "+JSON.stringify(e));
},onProgress:function(){this.trigger("progress",this.mediaSession.getEstimatedTime())}});t.default=L,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(2039),o=r(s),l=n(5),u=r(l),d=n(35),c=r(d),f=n(51),p=r(f),h=n(305),v=r(h),g=n(32),m=r(g);o.default.key="fv2ELs9q2gEZxE9uuiAGfhbE9Qhc4DyhZjt1j0GaxUI=";var y=c.default.extend({wrapped:["play","pause","playPause","getState","setVolume","setPosition","resume","stop"],
initialize:function(e){i.default.bindAll(this,"onReady","onPlay","onTime","onBuffer","onPause","onVolume","onComplete","onError"),this.type=e,this.backlog=new v.default,this.backlog.wrapAll(this.wrapped,function(){return!!this.video},this)},load:function(e){this.model=e.model,this.offset=this.model.get("position"),this.backlog.clear(),i.default.defer(i.default.bind(function(){var t=(0,o.default)("flash-video-placeholder"),n=this.model.get("url");return i.default.isFunction(t.setup)?(m.default.group("Flash Player"),
(0,m.default)("URL: "+n),(0,m.default)("Autoplay: true"),(0,m.default)("Offset: "+this.offset),m.default.groupEnd(),this.model.set("ready",!0),void(this.video=t.setup({file:n,skin:"swf/jwplayer/plex.xml",flashplayer:"swf/jwplayer/jwplayer.swf",stretching:"uniform",width:"100%",height:"100%",volume:100,mute:!1,autostart:e.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:p.default.states.ERROR,errorMessage:(0,u.default)("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(){(0,m.default)("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",p.default.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",p.default.states.BUFFERING)},onPause:function(){this.model.set("state",p.default.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:p.default.states.ERROR,errorMessage:e.message})}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(76),o=r(s),l=n(32),u=r(l),d=n(548),c=r(d),f=c.default.extend({load:function(e){c.default.prototype.load.apply(this,arguments),o.default.mobile&&this.model.set("ready",!0);
},resume:function(){(0,u.default)("resuming at "+this.offset);var e=this.offset;this.offset=0,this.autoplay&&(this.mediaElement.resume_pending=!0,this.pause()),this.resumePositionTimeout=setTimeout(i.default.bind(function(){this.setPosition(e)},this),1e3),this.autoplay&&(this.resumePlayTimeout=setTimeout(i.default.bind(function(){this.mediaElement.resume_pending=!1,this.play()},this),1500))},stop:function(){c.default.prototype.stop.apply(this,arguments),this.resumePositionTimeout=clearTimeout(this.resumePositionTimeout),
this.resumePlayTimeout=clearTimeout(this.resumePlayTimeout)},onReady:function(){c.default.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})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(14),l=a(o),u=n(76),d=r(u),c=n(51),f=r(c),p=n(313),h=r(p),v=n(311),g=r(v),m=n(201),y=r(m),b=n(912),P=r(b),w=P.default.extend({
type:f.default.types.MUSIC,modelDefaults:function(){var e=P.default.prototype.modelDefaults.apply(this,arguments);return s.default.extend(e,{canPlayPause:!0,canStop:!0,canSetVolume:!d.default.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,t){t=t||{};var n=l.resolve("appModel");return h.default.getPlayerDecision({type:this.type,profile:this.profile,item:e,offset:t.offset,fallbackServer:n.get("primaryServer"),transcoder:y.default,profileExtra:function(e){if(e.transcodeServer.supports("replaceTranscodeTarget"))return g.default.canPlayType("audio",'audio/ogg; codecs="opus"')?"add-transcode-target(replace=true&type=musicProfile&context=streaming&protocol=http&container=ogg&audioCodec=opus)":g.default.canPlayType("audio",'audio/ogg; codecs="vorbis"')?"add-transcode-target(replace=true&type=musicProfile&context=streaming&protocol=http&container=ogg&audioCodec=vorbis)":void 0;
}})}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(2040),l=r(o),u=n(14),d=a(u),c=n(5),f=r(c),p=n(65),h=r(p),v=n(76),g=r(v),m=n(51),y=r(m),b=n(629),P=r(b),w=n(101),S=r(w),_=n(313),T=r(_),I=n(311),M=r(I),C=n(240),x=r(C),E=n(201),k=r(E),D=n(40),A=r(D),O=n(549),R=r(O),L=n(1174),N=r(L),j=n(1173),U=r(j),$=n(159),z=r($),F=R.default.extend({type:y.default.types.VIDEO,modelDefaults:function(){
var e=R.default.prototype.modelDefaults.apply(this,arguments);return s.default.extend(e,{canPlayPause:!0,canStop:!0,canSeek:!0,canSetVolume:!g.default.mobile,canSetAudioStream:!0,canSetSubtitleStream:!0,canSetQuality:!0,showSeekBar:!0,showPlayQueue:!0,showEnterFullscreen:h.default.hasFullscreen})},modelOverrides:function(){var e=R.default.prototype.modelOverrides.apply(this,arguments);return this.model.get("playQueue").get("collection").length<1&&(e.showPlayQueue=!1),e},getPlayerDecision:function(e,t){
this.backlog.clear();var n=this.populateItem(e);return n=n.then(s.default.bind(function(){var n=d.resolve("appModel"),r=S.default.getCurrentQuality(e,A.default.getInstance()),a=T.default.getPlayerDecision({type:this.type,profile:this.profile,item:e,media:t.media,part:t.part,offset:t.offset,fallbackServer:n.get("primaryServer"),allowDirectPlay:A.default.get("directPlay"),allowedAC3Containers:A.default.get("allowAC3")?"mp4":null,subtitlesBurnLevel:this.model.get("softSubtitlesFailed")?x.default.ALWAYS:A.default.get("subtitlesBurnLevel"),
hasFlash:this.canPlayFlash(),hasNativeHLS:this.canPlayHLS(),useOffsetHLS:!1,hasDASH:this.canPlayDASH(),hasStreamingMKV:this.canPlayStreamingMKV(),minVersionForStreamingMKV:z.default.streamingMKV,quality:r,transcoder:k.default,transcoderOptions:{directStream:A.default.get("directStream")?1:0,subtitleSize:A.default.get("subtitleSize"),audioBoost:A.default.get("audioBoost")},profileExtra:function(e){var t=[];return A.default.get("preferAAC")&&t.push("add-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=aac)"),
"safari"===g.default.id&&"osx"===g.default.platformID&&(0,P.default)(g.default.platformVersion,"10.11")&&t.push("append-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=ac3,eac3)"),t.length?t.join("+"):null}});return a.done(this.onDecisionSuccess),a.fail(this.onDecisionError),a},this),s.default.bind(function(){this.model.set({state:"error",errorMessage:(0,f.default)("Plex Media Server is not responding.")})},this))},getSubcontrollerByType:function(e){return d.resolve("metrics").trackEvent({
event:"playback:init",properties:{player:e}}),"flash"===e?new U.default(this.type):new N.default(this.type)},canPlayFlash:function(){return l.default.hasFlashPlayerVersion("10")},canPlayHLS:function B(){var e=this.profile.protocols;if(!e||!e.hls)return!1;var B=M.default.canPlayType("video",e.hls.mimeType),t="Android"===g.default.platform;return B||t},canPlayDASH:function(){var e=this.profile.directPlay;if(!e.hasOwnProperty("mp4"))return!1;var t=M.default.canPlayType("video",e.mp4.mimeType);return A.default.get("dash")&&t&&h.default.hasMediaSource;
},canPlayStreamingMKV:function(){var e=this.profile.directPlay,t=M.default.canPlayType("video",e.mp4.mimeType);return A.default.get("dash")&&"chrome"===g.default.id&&!g.default.mobile&&t},getErrorMessage:function(e){var t=R.default.prototype.getErrorMessage.apply(this,arguments);if(e.transcodeServer&&e.transcodeServer.get("isCloudSyncServer"))switch(e.canDirectPlayFailedCheck){case"allowDirectPlay":t+=" "+(0,f.default)("Please allow Direct Play in Settings > Web > Player > Show Advanced.");break;case"validateProfileProperty:maxBitrate":
default:t+=" "+(0,f.default)("Please increase the Streaming Quality in Settings > Web > Player.")}return t},onDecisionSuccess:function(e){var t=this.getMaxVideoBitrateQualityIndex(e);if(!t){var n=S.default.getCurrentQuality(e.item,A.default.getInstance());t=n.index}this.model.set("qualityIndex",t),R.default.prototype.onDecisionSuccess.apply(this,arguments)}});t.default=F,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(26),d=a(u),c=n(51),f=r(c),p=n(404),h=r(p),v=n(90),g=r(v),m=n(140),y=r(m),b=n(662),P=r(b),w=P.default.extend({modelDefaults:function(){var e=P.default.prototype.modelDefaults.apply(this,arguments),t=this.player.get("protocolCapabilities"),n=s.default.contains(t,"playqueues"),r=this.model.get("playQueue");return s.default.extend(e,{canStop:!0,showPlayQueue:!!(n&&r&&r.supports({remoteRefresh:!0}))})},load:function(e){this.model=e.model,this.mediaElement=e.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,"change:repeatAll change:repeatItem":this.onRepeatChange});var t=this.model.get("metadataItem"),n=t.server,r=this.getServerInfo(n,{
isRequired:!0});if(!r)return l.default.Deferred().reject().promise();var a=this.model.get("playQueue");if(this.listenTo(a.get("collection"),"reset",this.onPlayQueueChange),e.silent)return l.default.Deferred().resolve().promise();var i=s.default.extend({key:t.get("key"),offset:e.offset||0},r),o=l.default.Deferred().resolve().promise(),u=this.getTransientTokenFor(n,i);return o=a.yieldOwnership().then(function(e){i.containerKey=e}),o=o.then(function(){return(0,y.default)(u)}),o=o.then(s.default.bind(function(){
var e=d.join("/player/playback/playMedia",i);return this.manager.request(this.player,e)},this))},mirror:function(e){if(s.default.contains(this.player.get("protocolCapabilities"),"mirror")){var t=e.item,n=t.server,r=this.getServerInfo(n,{isRequired:!0});if(!r)return l.default.Deferred().reject().promise();var a=s.default.extend({type:this.type,key:t.get("key")},r),i=(0,y.default)(this.getTransientTokenFor(n,a));return i=i.then(s.default.bind(function(){return this.manager.request(this.player,d.join("/player/mirror/details",a));
},this))}},getServerInfo:function(e,t){var n=this.getServerConnection(e,t);if(n){var r=s.default.extend({machineIdentifier:e.id},n);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,P.default.prototype.reset.apply(this,arguments)},play:function(){return this.model.set("state",f.default.states.PLAYING),
this.manager.request(this.player,"/player/playback/play?type="+this.type)},pause:function(){return this.model.set("state",f.default.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:s.default.throttle(function(e){var t={type:this.type,offset:e},n=d.join("/player/playback/seekTo",t);return this.manager.request(this.player,n)},500),
setVolume:function(e){this.model.set("volume",e),this.sendVolumeRequest(e)},sendVolumeRequest:s.default.throttle(function(e){var t={type:this.type,volume:e},n=d.join("/player/playback/setParameters",t);return this.manager.request(this.player,n)},500),setRepeat:s.default.debounce(function(e){var t={type:this.type,repeat:e},n=d.join("/player/playback/setParameters",t);return this.manager.request(this.player,n)},50),setStream:function(e,t){var n=g.default.get(e).key;return this.manager.request(this.player,"/player/playback/setStreams?"+n+"="+t+"&type="+this.type);
},refreshRemotePlayQueue:function(){var e=this.model.get("playQueue"),t=this.manager.player.get("protocolCapabilities");if(s.default.contains(t,"playqueues")){var n=e.get("playQueueID");return this.manager.request(this.player,"/player/playback/refreshPlayQueue?playQueueID="+n)}return l.default.Deferred().resolve().promise()},skipPrevious:function(){return P.default.prototype.skipPrevious.apply(this,arguments),this.manager.request(this.player,"/player/playback/skipPrevious?type="+this.type)},skipNext:function(){
return P.default.prototype.skipNext.apply(this,arguments),this.manager.request(this.player,"/player/playback/skipNext?type="+this.type)},skipTo:function(e){return P.default.prototype.skipTo.apply(this,arguments),this.manager.request(this.player,"/player/playback/skipTo?type="+this.type+"&key="+e)},stop:function(e){return P.default.prototype.stop.apply(this,arguments),this.manager.request(this.player,"/player/playback/stop?type="+this.type)},removeItem:function(){var e=P.default.prototype.removeItem.apply(this,arguments);
return e.then(s.default.bind(this.refreshRemotePlayQueue,this))},moveItem:function(){var e=P.default.prototype.moveItem.apply(this,arguments);return e.then(s.default.bind(this.refreshRemotePlayQueue,this))},onTimeline:function(e){if(this.type===e.type&&!e.continuing){var t=this.model.get("playQueue"),n=this.model.get("playQueueItem");if(e.key&&e.key!==n.get("key")){if(n=t.get("collection").findWhere({key:e.key}),!n)return;this.reset(n)}var r=parseInt(e.playQueueVersion,10);r&&r>t.get("playQueueVersion")&&t.fetch(),
e.state!==f.default.states.STOPPED&&(this.hasStarted=!0);var a=parseInt(e.audioStreamID,10),i=parseInt(e.subtitleStreamID,10);this.isTimelineChange=!0,this.model.set({mediaIndex:e.mediaIndex,partIndex:e.partIndex,partCount:e.partCount,audioStreamID:s.default.isNaN(a)?null:a,subtitleStreamID:s.default.isNaN(i)?null:i,state:e.state,ready:!0,loaded:"photo"!==this.type,finished:this.hasStarted&&e.state===f.default.states.STOPPED,duration:e.duration,position:e.time,volume:e.volume,shuffled:e.shuffle,repeatAll:2===e.repeat,
repeatItem:1===e.repeat,canPlayPause:e.controllable.indexOf("playPause")>-1,canStop:e.controllable.indexOf("stop")>-1,canSeek:e.controllable.indexOf("seekTo")>-1,canSetVolume:e.controllable.indexOf("volume")>-1,canSetVideoStream:e.controllable.indexOf("videoStream")>-1,canSetAudioStream:e.controllable.indexOf("audioStream")>-1,canSetSubtitleStream:e.controllable.indexOf("subtitleStream")>-1,canShuffle:e.controllable.indexOf("shuffle")>-1,canRepeat:e.controllable.indexOf("repeat")>-1,canSkipPrevious:e.controllable.indexOf("skipPrevious")>-1,
canSkipNext:e.controllable.indexOf("skipNext")>-1}),this.isTimelineChange=!1,null!=e.time&&(0,h.default)(n.get("metadataItem"),e.time,e.duration)}}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(14),d=a(u),c=n(5),f=r(c),p=n(12),h=r(p),v=n(46),g=r(v),m=n(65),y=r(m),b=n(26),P=a(b),w=n(663),S=r(w),_=n(1177),T=r(_),I=S.default.extend({protocol:"plex",controller:T.default,
playerRequestedDisconnect:!1,initialize:function(){s.default.bindAll(this,"error","stop"),S.default.prototype.initialize.apply(this,arguments)},start:function(e){S.default.prototype.start.apply(this,arguments),this.commandID=0,this.stopPolling=!1,this.poll({ignoreDisconnected:!0})},stop:function(){this.stopPolling=!0,this.pollRequest&&this.pollRequest.abort(),this.player&&!this.playerRequestedDisconnect&&this.request(this.player,"/player/timeline/unsubscribe"),this.playerRequestedDisconnect=!1,S.default.prototype.stop.apply(this,arguments);
},request:function(e,t,n){n||(n={}),n.skipIncrement||this.commandID++,t=P.join(t,{commandID:this.commandID});var r=y.default.isHostedHttps?e.server:e,a=r.getXHROptions(t);return a.headers["X-Plex-Target-Client-Identifier"]=e.id,l.default.ajax(a).fail(s.default.bind(function(e){if(!this.stopPolling){var t,n=e.responseText,r=g.default.parseXML(n);t=r&&r.status?r.status:(0,f.default)("The player is unable to perform this action."),h.default.trigger("show:alert",{type:"error",message:t})}},this))},poll:function(e){
e||(e={});var t=P.join("/player/timeline/poll",{wait:e.wait?1:0});this.pollRequest=this.request(this.player,t,{skipIncrement:!0}),this.pollRequest.done(s.default.bind(function(t,n,r){if(this.player.id===r.getResponseHeader("X-Plex-Client-Identifier")){var a=g.default.parseXML(t);if(g.default.parseArray(a,"Timeline"),a.commandID>=this.commandID&&(this.onTimeline(a.Timeline),!e.ignoreDisconnected&&a.disconnected)){var i=d.resolve("appModel");return this.playerRequestedDisconnect=!0,void i.set("primaryPlayer",null);
}}this.poll({wait:!0})},this)),this.pollRequest.fail(s.default.bind(function(e){this.stopPolling||this.error()},this))},error:function(){var e=d.resolve("appModel");h.default.trigger("show:alert",{type:"error",message:(0,f.default)("There was a problem connecting to this player.")}),e.set("primaryPlayer",null),e.get("players").fetch({reset:!0})},onTimeline:function(e){s.default.each(e,function(e){g.default.parseInteger(e,["time","duration","volume","repeat"]),g.default.parseBoolean(e,["shuffle","continuing"]),
e.controllable?e.controllable=e.controllable.split(","):e.controllable=[],this.trigger("timeline",e),this.updateNowPlaying(e)},this)}});t.default=I,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1072),a={video:r.VIDEO_WITH_VOLUME,music:r.MUSIC_WITH_VOLUME,photo:r.PHOTO};t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(76),i=r(a),s={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}}}};"ie"===i.default.id&&"9.0"===i.default.version&&(s.video.directPlay.mp4.optimizedForStreaming=!0),t.default=s,
e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.channel,n=t.get("identifier"),r=n?"/system/appstore/apps/"+n:t.get("key"),a=r+"/install",i=t.server.getXHROptions(a),o=s.default.ajax(i);return o.done(function(){t.set("installed",!0)}),o.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.channel,n=t.get("identifier"),r=n?"/system/appstore/apps/"+n:t.get("key"),a=r+"/reset",i=t.server.getXHROptions(a),o=l.default.ajax(i);
return o.done(function(e){var t,n=s.default.isObject(e)?e:h.default.parseXML(e);t=n.message?n.message:(0,d.default)("This channel was successfully reset."),f.default.trigger("show:alert",{type:"success",message:t})}),o.fail(function(){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem resetting this channel.")})}),o.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(46),h=a(p);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.channel,n=t.get("identifier"),r=n?"/system/appstore/apps/"+n:t.get("key"),a=r+"/restart",i=t.server.getXHROptions(a),o=l.default.ajax(i);return o.done(function(e){var t,n=s.default.isObject(e)?e:h.default.parseXML(e);t=n.message?n.message:(0,d.default)("This channel was successfully restarted."),f.default.trigger("show:alert",{type:"success",message:t})}),o.fail(function(){f.default.trigger("show:alert",{type:"error",
message:(0,d.default)("There was a problem restarting this channel.")})}),o.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(46),h=a(p);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var t=l.default.ajax(u);t.done(function(t){var a=s.default.isObject(t)?t:h.default.parseXML(t);r.set("installed",!1),a.message&&!e.skipConfirmation&&f.default.trigger("show:alert",{type:"success",
message:a.message}),n.resolve()}),t.fail(function(e){if(400===e.status){var t=new g.default({title:(0,d.default)("Unable to Uninstall Channel"),message:(0,d.default)("This channel could not be uninstalled, but you can disable it in the server settings."),confirmLabel:(0,d.default)("OK"),cancelLabel:(0,d.default)("Ignore")});t.promise.done(function(){f.default.trigger("navigate","serverSettings",{serverID:r.server.id,group:"channels"})}),f.default.trigger("show:modal",t)}else f.default.trigger("show:alert",{
type:"error",message:(0,d.default)("This channel could not be uninstalled.")});n.reject(e)})}var n=l.default.Deferred(),r=e.channel,a=r.get("identifier"),i=a?"/system/appstore/apps/"+a:r.get("key"),o=i+"/uninstall",u=r.server.getXHROptions(o);if(e.skipConfirmation)t();else{var c=new g.default({title:(0,d.default)("Uninstall Channel"),message:(0,d.default)("Are you sure you want to uninstall this channel?")}),p=c.promise;p.done(t),p.fail(function(){n.reject()}),f.default.trigger("show:modal",c)}return n.promise();
}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(46),h=a(p),v=n(45),g=a(v);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(e){var r=s.default.isObject(e)?e:h.default.parseXML(e);if(!r||!r.message&&!r.Directory)return void n();if(r.message)u||f.default.trigger("show:alert",{type:"success",message:r.message}),a.resolve();else{h.default.parseArray(r,"Directory");var i=r.Directory[0].key,d=l.default.ajax(o.getXHROptions(i));
d.done(t),d.fail(n)}}function n(e){u||f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem checking for updates.")}),a.reject(e)}var r,a=l.default.Deferred(),i=e.channel,o=i?i.server:e.server,u=e.silent;if(i){var c=i.get("identifier"),p=c?"/system/appstore/apps/"+c:i.get("key");r=p+"/update"}else r="/system/appstore/updates";var v=l.default.ajax(o.getXHROptions(r));return v.done(t),v.fail(n),a.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(46),h=a(p);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=c.resolve("appModel"),n=t.get("user"),r=n.server,a={url:e.item.get("url")},i=v.join("/pms/playlists/queue/items",a),s=o.default.extend(r.getXHROptions(i),{type:"POST"}),l=u.default.ajax(s).promise();return l.done(function(){m.default.trigger("show:alert",{type:"success",message:(0,p.default)("{1} added to Watch Later.",e.item.get("title"))
})}),l.fail(function(){m.default.trigger("show:alert",{type:"error",message:(0,p.default)("There was a problem adding to Watch Later.")})}),l}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(8),u=a(l),d=n(14),c=i(d),f=n(5),p=a(f),h=n(26),v=i(h),g=n(12),m=a(g);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(222).default,a=n(223).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(918);r(t,a(s,r));
var o=n(1211),l=i(o);t.refreshMetadata=l.default;var u=n(1188),d=i(u);t.analyzeItems=d.default;var c=n(1189),f=i(c);t.analyzeSection=f.default;var p=n(1206),h=i(p);t.markWatched=h.default;var v=n(1205),g=i(v);t.markUnwatched=g.default;var m=n(1213),y=i(m);t.unmatch=y.default;var b=n(1212),P=i(b);t.splitApart=P.default;var w=n(1208),S=i(w);t.merge=S.default;var _=n(1198),T=i(_);t.deleteItems=T.default;var I=n(1199),M=i(I);t.deleteMediaItem=M.default;var C=n(1203),x=i(C);t.deleteVersions=x.default;var E=n(1201),k=i(E);
t.deleteSection=k.default;var D=n(1202),A=i(D);t.deleteSectionThumbnails=A.default;var O=n(1200),R=i(O);t.deletePlaylist=R.default;var L=n(1214),N=i(L);t.updateLibrary=N.default;var j=n(1209),U=i(j);t.optimize=U.default;var $=n(1192),z=i($);t.cleanBundles=z.default;var F=n(1204),B=i(F);t.emptyTrash=B.default;var V=n(1207),H=i(V);t.match=H.default;var q=n(1190),W=i(q);t.autoMatch=W.default;var G=n(1191),Y=i(G);t.changeArtwork=Y.default;var Q=n(1210),K=i(Q);t.rate=K.default;var X=n(1196),Z=i(X);t.enableVersionGenerator=Z.default;
var J=n(1195),ee=i(J);t.disableVersionGenerator=ee.default;var te=n(1197),ne=i(te);t.reprocessVersionGenerator=ne.default;var re=n(1194),ae=i(re);t.deleteVersionGenerator=ae.default;var ie=n(1193),se=i(ie);t.deleteAllVersionGenerators=se.default;var oe=n(1181),le=i(oe);t.installChannel=le.default;var ue=n(1185),de=i(ue);t.updateChannel=de.default;var ce=n(1183),fe=i(ce);t.restartChannel=fe.default;var pe=n(1182),he=i(pe);t.resetChannel=he.default;var ve=n(1184),ge=i(ve);t.uninstallChannel=ge.default;
var me=n(1186),ye=i(me);t.watchLater=ye.default;var be=n(1216),Pe=i(be);t.playMedia=Pe.default;var we=n(1215),Se=i(we);t.playBackgroundMedia=Se.default;var _e=n(1217),Te=i(_e);t.queueMedia=Te.default;var Ie=n(1220),Me=i(Ie);t.connectServer=Me.default;var Ce=n(1222),xe=i(Ce);t.reconnectServer=xe.default;var Ee=n(1224),ke=i(Ee);t.signInServer=ke.default;var De=n(1226),Ae=i(De);t.signUpServer=Ae.default;var Oe=n(1225),Re=i(Oe);t.signOutServer=Re.default;var Le=n(1223),Ne=i(Le);t.removeServer=Ne.default;
var je=n(1219),Ue=i(je);t.checkForServerUpdates=Ue.default;var $e=n(1221),ze=i($e);t.installServerUpdates=ze.default;var Fe=n(1227),Be=i(Fe);t.testServerImage=Be.default;var Ve=n(1218),He=i(Ve);t.getTransientToken=He.default;var qe=n(1229),We=i(qe);t.showTermsOfService=We.default;var Ge=n(1228),Ye=i(Ge);t.showClaimServerAlertBar=Ye.default;var Qe=n(1244),Ke=i(Qe);t.showSyncModal=Ke.default;var Xe=n(1243),Ze=i(Xe);t.showHomeWarningsModal=Ze.default;var Je=n(1231),et=i(Je);t.deleteSyncItem=et.default;
var tt=n(1234),nt=i(tt);t.refreshSyncLists=nt.default;var rt=n(1237),at=i(rt);t.removeDevice=at.default;var it=n(1238),st=i(it);t.removeFriend=st.default;var ot=n(1230),lt=i(ot);t.acceptInvite=lt.default;var ut=n(1235),dt=i(ut);t.rejectInvite=dt.default;var ct=n(1242),ft=i(ct);t.shareServer=ft.default;var pt=n(1240),ht=i(pt);t.removeServerShare=ht.default;var vt=n(1239),gt=i(vt);t.removeHomeUser=gt.default;var mt=n(1247),yt=i(mt);t.validateUsername=yt.default;var bt=n(1246),Pt=i(bt);t.toggleGuest=Pt.default;
var wt=n(1232),St=i(wt);t.lockUser=St.default;var _t=n(1245),Tt=i(_t);t.signUp=Tt.default;var It=n(1241),Mt=i(It);t.share=Mt.default;var Ct=n(1233),xt=i(Ct);t.recommend=xt.default;var Et=n(1236),kt=i(Et);t.remoteUnlock=kt.default},function(e,t,n){"use strict";function r(e){var t=e.items;return l.default.when.apply(l.default,s.default.map(t,function(e){var t="/library/metadata/"+e.id+"/analyze",n=s.default.extend(e.server.getXHROptions(t),{type:"PUT"});return l.default.ajax(n).promise()}))}var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var e=l.default.ajax(i);e.done(function(){n.resolve()}),e.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem analyzing the library.")}),n.reject(e)}),e.always(function(e){o.hide()})}var n=l.default.Deferred(),r=e.section,a="/library/sections/"+r.id+"/analyze",i=s.default.extend(r.server.getXHROptions(a),{
type:"PUT"}),o=new h.default({title:(0,d.default)("Analyze Library"),message:(0,d.default)("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:(0,d.default)("Analyze"),cancelLabel:(0,d.default)("Cancel"),async:!0}),u=o.promise;return u.done(t),u.fail(function(){n.reject()}),f.default.trigger("show:modal",o),n.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(45),h=a(p);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=u.default.Deferred(),n=e.item,r=e.agent,a={agent:r.id,manual:0},i=m.join(["/library/metadata/",n.id,"/matches"],a),s=o.default.extend(n.server.getXHROptions(i)),l=u.default.ajax(s);return l.done(function(e){var r=o.default.isObject(e)?e:v.default.parseXML(e);if(r.SearchResult){var i=r.SearchResult;o.default.isArray(r.SearchResult)&&(i=r.SearchResult[0]),
a={guid:i.guid,name:i.name};var s=m.join(["/library/metadata/",n.id,"/match"],a),l=o.default.extend(n.server.getXHROptions(s),{type:"PUT"}),d=u.default.ajax(l);d.done(function(){t.resolve()}),d.fail(function(){p.default.trigger("show:alert",{type:"error",message:(0,c.default)("There was a problem matching this item.")}),t.reject()})}else p.default.trigger("show:alert",{type:"error",message:(0,c.default)("No matches were found using this agent.")}),t.reject()}),l.fail(function(e){p.default.trigger("show:alert",{
type:"error",message:(0,c.default)("There was a problem searching for matches.")}),t.reject(e)}),t.promise()}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(8),u=a(l),d=n(5),c=a(d),f=n(12),p=a(f),h=n(46),v=a(h),g=n(26),m=i(g);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.item,n={url:e.artworkRatingKey},r=c.join(["/library/metadata/",t.id,e.artworkType],n),a=o.default.extend(t.server.getXHROptions(r),{type:"PUT"
}),i=u.default.ajax(a);return i.done(function(n){t.set(f[e.artworkType],n)}),i.promise()}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(8),u=a(l),d=n(26),c=i(d),f={poster:"thumb",art:"art",banner:"banner"};t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var e=l.default.ajax(i);e.done(function(){f.default.trigger("show:alert",{type:"success",message:(0,d.default)("Unused bundles are being removed.")}),
n.resolve()}),e.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem removing unused bundles.")}),n.reject(e)}),e.always(function(e){o.hide()})}var n=l.default.Deferred(),r=e.server,a="/library/clean/bundles",i=s.default.extend(r.getXHROptions(a),{type:"PUT"}),o=new h.default({title:(0,d.default)("Clean Bundles"),message:(0,d.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,d.default)("Clean"),cancelLabel:(0,d.default)("Cancel"),async:!0}),u=o.promise;return u.done(t),u.fail(function(){n.reject()}),f.default.trigger("show:modal",o),n.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(45),h=a(p);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=a(),n=t.promise;return n=n.then(function(){var n="/playlists/generators?type="+v.default.LOCAL,r=o.default.extend(e.server.getXHROptions(n),{
type:"DELETE"}),a=u.default.ajax(r).promise();return a.fail(function(e){p.default.trigger("show:alert",{type:"error",message:(0,c.default)("There was a problem deleting all versions.")})}),a.always(function(){t.hide()}),a.promise()})}function a(){var e=new m.default({title:(0,c.default)("Delete All Versions"),message:(0,c.default)("Are you sure you want to delete all versions? This cannot be undone."),confirmLabel:(0,c.default)("Delete"),cancelLabel:(0,c.default)("Cancel"),async:!0,hasDanger:!0});
return p.default.trigger("show:modal",e),e}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(8),u=i(l),d=n(5),c=i(d),f=n(12),p=i(f),h=n(161),v=i(h),g=n(45),m=i(g);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.generator,n=a(e),r=n.promise.then(function(){var e=t.destroy();return e.fail(function(e){u.default.trigger("show:alert",{type:"error",message:(0,o.default)("Unable to stop generating these versions.")})}),e.always(function(){
n.hide()}),e});return r}function a(e){var t=e.generator.get("title"),n=t?(0,o.default)("Removing this item will delete all versions created by {1}. Are you sure you want to continue?",t):(0,o.default)("Removing this item will delete all related versions. Are you sure you want to continue?"),r=new c.default({title:(0,o.default)("Delete Versions"),message:n,confirmLabel:(0,o.default)("Remove"),cancelLabel:(0,o.default)("Cancel"),async:!0,hasDanger:!0});return u.default.trigger("show:modal",r),r}var i=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var s=n(5),o=i(s),l=n(12),u=i(l),d=n(45),c=i(d);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.generator,n=o.default.result(t,"url")+"/"+e.ratingKey+"/disable",r=a(),i=r.promise.then(function(){var e=o.default.extend(t.server.getXHROptions(n),{type:"PUT"}),a=u.default.ajax(e).promise();return a.fail(function(e){p.default.trigger("show:alert",{type:"error",message:(0,c.default)("There was a problem disabling this version.")
})}),a.always(function(){r.hide()}),a});return i}function a(){var e=new v.default({title:(0,c.default)("Remove Version"),message:(0,c.default)("Are you sure you want to delete this version? You can enable it again in Optimized Versions Settings."),confirmLabel:(0,c.default)("Remove"),cancelLabel:(0,c.default)("Cancel"),async:!0,hasDanger:!0});return p.default.trigger("show:modal",e),e}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(8),u=i(l),d=n(5),c=i(d),f=n(12),p=i(f),h=n(45),v=i(h);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.generator,n=s.default.result(t,"url")+"/"+e.ratingKey+"/enable",r=s.default.extend(t.server.getXHROptions(n),{type:"PUT"}),a=l.default.ajax(r).promise();return a.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem enabling this version.")})}),a}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.generator,n=e.ratingKey,r=s.default.result(t,"url");n&&(r+="/"+n),r+="/reprocess";var a=s.default.extend(t.server.getXHROptions(r),{type:"PUT"}),i=l.default.ajax(a).promise();return i.fail(function(e){var t=n?(0,d.default)("There was a problem processing this item."):(0,d.default)("There was a problem processing these items.");f.default.trigger("show:alert",{type:"error",message:t})}),i}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.items,n=e.item;t||(t=[n]),n||(n=o.default.first(t));var r=n.get("Media");if(1===t.length&&r.length>1&&n.server.supports("specificMediaDeletion"))return m.default.execute("deleteMediaItem",{item:n});var i=a({item:n,items:t}),s=i.promise,l=s.then(function(){var n=o.default.map(t,function(t){return m.default.execute("deleteItem",{item:t,skipRedirect:e.skipRedirect
})});return u.default.when.apply(u.default,n).always(function(){i.hide()})});return l}function a(e){var t,n,r=e.item,a=e.items,i=a.length>1,s=v.default.get(r.get("type"));i?(t=s.plural,n=(0,c.default)("Are you sure you want to delete {1} items from your filesystem?",a.length)):(t=s.title,n=(0,c.default)("Are you sure you want to delete this item from your filesystem?"));var o={title:(0,c.default)("Delete {1}",t),message:n,confirmLabel:(0,c.default)("Delete"),cancelLabel:(0,c.default)("Cancel"),async:!0,
hasDanger:!0};(i||s.child)&&(o.requireDoubleConfirm=!0,o.doubleConfirmMessage=(0,c.default)("Multiple files may be deleted."),o.doubleConfirmLabel=(0,c.default)("Yes, I'm sure"));var l=new b.default(o);return p.default.trigger("show:modal",l),l}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(8),u=i(l),d=n(5),c=i(d),f=n(12),p=i(f),h=n(37),v=i(h),g=n(27),m=i(g),y=n(45),b=i(y);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=a(e);
return t=t.then(function(t){var n=i(),r=n.promise.then(function(){return h.default.execute("deleteFile",{item:e.item,media:t}).always(function(){n.hide()})});return r})}function a(e){var t=l.default.Deferred(),n=e.item,r=n.get("Media");if(e.index in r)return t.resolve(r[e.index]).promise();var a=new g.default({model:n}),i=a.promise;return i.done(function(e){t.resolve(r[e])}),i.fail(function(){t.reject()}),f.default.trigger("show:modal",a),t.promise()}function i(){var e=new y.default({title:(0,d.default)("Delete File"),
message:(0,d.default)("Are you sure you want to delete this file from your filesystem?"),confirmLabel:(0,d.default)("Delete"),cancelLabel:(0,d.default)("Cancel"),async:!0,hasDanger:!0});return f.default.trigger("show:modal",e),e}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(8),l=s(o),u=n(5),d=s(u),c=n(12),f=s(c),p=n(27),h=s(p),v=n(1578),g=s(v),m=n(45),y=s(m);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var t=e.item.destroy();
t.done(function(){d.default.trigger("navigate","playlists",{serverID:r.id}),n.resolve()}),t.fail(function(e){d.default.trigger("show:alert",{type:"error",message:(0,l.default)("There was a problem deleting the playlist.")}),n.reject(e)}),t.always(function(e){a.hide()})}var n=s.default.Deferred(),r=e.item.server,a=new f.default({title:(0,l.default)("Delete Playlist"),message:(0,l.default)("Are you sure you want to delete {1}? This cannot be undone.",e.item.get("title")),confirmLabel:(0,l.default)("Delete"),
cancelLabel:(0,l.default)("Cancel"),async:!0,hasDanger:!0}),i=a.promise;return i.done(t),i.fail(function(){n.reject()}),d.default.trigger("show:modal",a),n.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i),o=n(5),l=a(o),u=n(12),d=a(u),c=n(45),f=a(c);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var e=r.destroy({wait:!0});return e?(e.done(function(){var e=u.resolve("appStore");e.dispatch(v.repopulatePage()),n.resolve();
}),void e.fail(function(e){p.default.trigger("show:alert",{type:"error",message:(0,c.default)("There was a problem deleting the library.")}),n.reject(e)})):void n.resolve()}var n=o.default.Deferred(),r=e.section,a=new m.default({title:(0,c.default)("Delete Library"),message:(0,c.default)("Are you sure you want to delete {1}?",r.get("title")),confirmLabel:(0,c.default)("Delete"),cancelLabel:(0,c.default)("Cancel"),requireDoubleConfirm:!0,doubleConfirmMessage:(0,c.default)("This cannot be undone."),
doubleConfirmLabel:(0,c.default)("Yes, I'm sure"),async:!0,hasDanger:!0}),i=a.promise;return i.done(t),i.fail(function(){n.reject()}),p.default.trigger("show:modal",a),n.promise().always(function(){a.hide()}),n.promise()}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(8),o=a(s),l=n(14),u=i(l),d=n(5),c=a(d),f=n(12),p=a(f),h=n(208),v=i(h),g=n(45),m=a(g);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var e=l.default.ajax(a);
return e.done(function(e){f.default.trigger("show:alert",{type:"success",message:(0,d.default)("The preview thumbnails for items in this library were deleted.")})}),e.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem deleting the preview thumbnails for items in this library.")})}),e.always(function(e){i.hide()}),e}var n=e.section,r="/library/sections/"+n.id+"/indexes",a=s.default.extend(n.server.getXHROptions(r),{type:"DELETE"}),i=new h.default({
title:(0,d.default)("Delete Preview Thumbnails"),message:(0,d.default)("Are you sure you want to delete the preview thumbnails for items in this library? This cannot be undone."),confirmLabel:(0,d.default)("Delete"),cancelLabel:(0,d.default)("Cancel"),async:!0,hasDanger:!0}),o=i.promise;return o=o.then(function(){return t()}),f.default.trigger("show:modal",i),o}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(45),h=a(p);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.item,n=t.server,r=t.get("Media"),i=l.default.filter(r,function(e){return!!e.proxyType}),s=a({item:t,versions:i}),o=s.promise,u=o.then(function(){var e=g.join(["/library/metadata/",t.id],{proxy:1}),a=l.default.extend(n.getXHROptions(e),{type:"DELETE"}),o=d.default.ajax(a);return o.done(function(){l.default.each(i,function(e){r.splice(l.default.indexOf(r,e),1)}),t.trigger("change:Media",t,t.get("Media"))}),o.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 a problem deleting these versions.");h.default.trigger("show:alert",{type:"error",message:t})}),o.always(function(){s.hide()}),o.promise()});return u}function a(e){var t,n=e.item,r=e.versions,a=r.length>1;if(a)t=(0,f.default)("Are you sure you want to delete {1} versions of {2}?",r.length,n.get("title"));else{var i=l.default.first(r);t=(0,f.default)("Are you sure you want to delete the {1} version of {2}?",i.title,n.get("title"));
}var s=new y.default({title:a?(0,f.default)("Delete Versions"):(0,f.default)("Delete Version"),message:t,confirmLabel:(0,f.default)("Delete"),cancelLabel:(0,f.default)("Cancel"),async:!0,hasDanger:!0});return h.default.trigger("show:modal",s),s}var i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=i(o),u=n(8),d=i(u),c=n(5),f=i(c),p=n(12),h=i(p),v=n(26),g=s(v),m=n(45),y=i(m);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){
s.default.each(i,function(e){var t="/library/sections/"+e+"/emptyTrash",n=s.default.extend(a.getXHROptions(t),{type:"PUT"});o.push(l.default.ajax(n))});var e=l.default.when.apply(l.default,o);e.done(function(){f.default.trigger("show:alert",{type:"success",message:(0,d.default)("The trash was emptied.")}),n.resolve()}),e.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem emptying the trash.")}),n.reject(e)}),e.always(function(e){c.hide()})}var n=l.default.Deferred(),r=e.section,a=r?r.server:e.server,i=[],o=[];
if(r)i.push(r.id);else{var u=a.get("sections");u.each(function(e){i.push(e.id)})}var c=new h.default({title:(0,d.default)("Empty Trash"),message:(0,d.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,d.default)("Empty"),cancelLabel:(0,d.default)("Cancel"),async:!0}),p=c.promise;return p.done(t),p.fail(function(){
n.reject()}),f.default.trigger("show:modal",c),n.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(45),h=a(p);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t,n,r;e.item?(n=e.item,r=[n]):e.items&&(r=e.items,n=r[0]);var a=s.default.extend({},e,{watched:!1}),i=n.get("type"),o=f.default.get(i),u=o&&"directory"===o.element,c=(u||r.length>1)&&!e.force,p=1===r.length,v=p&&n.get("isSection")?n.getSyncTitle():n.get("title");
if(c){var m;switch(n.get("type")){case"movie":m=p?(0,l.default)("Are you sure you want to mark {1} as unwatched?",v):(0,l.default)("Are you sure you want to mark these movies as unwatched?");break;case"show":case"season":case"episode":m=p?(0,l.default)("Are you sure you want to mark all episodes of {1} as unwatched?",v):(0,l.default)("Are you sure you want to mark these episodes as unwatched?");break;default:m=p?(0,l.default)("Are you sure you want to mark {1} as unwatched?",v):(0,l.default)("Are you sure you want to mark these items as unwatched?");
}var y=new g.default({title:(0,l.default)("Mark as Unwatched"),message:m}),b=y.promise;t=b.then(function(){return h.default.execute("updateWatchedStatus",a)}),d.default.trigger("show:modal",y)}else t=h.default.execute("updateWatchedStatus",a);return t}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(5),l=a(o),u=n(12),d=a(u),c=n(37),f=a(c),p=n(27),h=a(p),v=n(45),g=a(v);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t,n,r;e.item?(n=e.item,
r=[n]):e.items&&(r=e.items,n=r[0]);var a=s.default.extend({},e,{watched:!0}),i=n.get("type"),o=f.default.get(i),u=o&&"directory"===o.element,c=(u||r.length>1)&&!e.force,p=1===r.length,v=p&&n.get("isSection")?n.getSyncTitle():n.get("title");if(c){var m;switch(n.get("type")){case"movie":m=p?(0,l.default)("Are you sure you want to mark {1} as watched?",v):(0,l.default)("Are you sure you want to mark these movies as watched?");break;case"show":case"season":case"episode":m=p?(0,l.default)("Are you sure you want to mark all episodes of {1} as watched?",v):(0,
l.default)("Are you sure you want to mark these episodes as watched?");break;default:m=p?(0,l.default)("Are you sure you want to mark {1} as watched?",v):(0,l.default)("Are you sure you want to mark these items as watched?")}var y=new g.default({title:(0,l.default)("Mark as Watched"),message:m}),b=y.promise;t=b.then(function(){return h.default.execute("updateWatchedStatus",a)}),d.default.trigger("show:modal",y)}else t=h.default.execute("updateWatchedStatus",a);return t}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),s=a(i),o=n(5),l=a(o),u=n(12),d=a(u),c=n(37),f=a(c),p=n(27),h=a(p),v=n(45),g=a(v);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.item,n={guid:e.guid,name:e.name};"album"===t.get("type")&&e.children&&e.children.reduce(function(e,t){var n=t.get("id");return n&&(e["guid["+n+"]"]=t.get("guid")),e},n);var r=c.join(["/library/metadata/",t.id,"/match"],n),a=o.default.extend(t.server.getXHROptions(r),{type:"PUT"});return u.default.ajax(a).promise();
}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(8),u=a(l),d=n(26),c=i(d);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var e=l.default.ajax(o);e.done(function(){n.resolve()}),e.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem merging these items.")}),n.reject(e)}),e.always(function(e){u.hide()})}var n=l.default.Deferred(),r=e.item,a=s.default.pluck(e.items,"id").join(","),i="/library/metadata/"+r.id+"/merge?ids="+a,o=s.default.extend(r.server.getXHROptions(i),{
type:"PUT"}),u=new h.default({title:(0,d.default)("Merge"),message:(0,d.default)("Are you sure you want to merge these items together?"),async:!0}),c=u.promise;return c.done(t),c.fail(function(){n.reject()}),f.default.trigger("show:modal",u),n.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(45),h=a(p);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var e=l.default.ajax(i);
e.done(function(){f.default.trigger("show:alert",{type:"success",message:(0,d.default)("The database was optimized.")}),n.resolve()}),e.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem optimizing this database.")}),n.reject(e)}),e.always(function(e){o.hide()})}var n=l.default.Deferred(),r=e.server,a="/library/optimize",i=s.default.extend(r.getXHROptions(a),{type:"PUT"}),o=new h.default({title:(0,d.default)("Optimize Database"),message:(0,d.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,d.default)("Optimize"),cancelLabel:(0,d.default)("Cancel"),async:!0}),u=o.promise;return u.done(t),u.fail(function(){n.reject()}),f.default.trigger("show:modal",o),n.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(45),h=a(p);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.item,n=e.rating,r=t.get("userRating");if(t.set("userRating",n),e.passive)return o.default.Deferred().resolve().promise();
var a={key:t.get("ratingKey"),identifier:t.get("identifier"),rating:n},i=p.join("/:/rate",a),s=o.default.ajax(t.server.getXHROptions(i));return s.fail(function(){t.set("userRating",r),c.default.trigger("show:alert",{type:"error",message:(0,u.default)("There was a problem rating this item.")})}),s.promise()}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(8),o=a(s),l=n(5),u=a(l),d=n(12),c=a(d),f=n(26),p=i(f);t.default=r,e.exports=t.default},function(e,t,n){
"use strict";function r(e){var t,n;return e.item?(t=e.item,n=[t]):(n=e.items,t=n[0]),l.default.when.apply(l.default,s.default.map(n,function(e){var n="/library/metadata/"+e.id+"/refresh",r=s.default.extend(t.server.getXHROptions(n),{type:"PUT"});return l.default.ajax(r).promise()})).fail(function(e){503===e.status?f.default.trigger("show:modal",new h.default({model:t.server})):f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem refreshing.")})})}var a=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(330),h=a(p);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var t=s.default.extend(r.server.getXHROptions(a),{type:"PUT"}),o=l.default.ajax(t);o.done(function(){var t,a=r.get("type");t="show"===a||"artist"===a||"album"===a?"Location":"Media",r.set(t,r.get(t).slice(0,1)),e.skipNavigate||f.default.trigger("navigate:back"),n.resolve()}),o.fail(function(e){
f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem splitting this item apart.")}),n.reject(e)}),o.always(function(e){i.hide()})}var n=l.default.Deferred(),r=e.item,a="/library/metadata/"+r.id+"/split",i=new h.default({title:(0,d.default)("Split Apart"),message:(0,d.default)("Are you sure you want to split this item apart?"),async:!0}),o=i.promise;return o.done(t),o.fail(function(){n.reject()}),f.default.trigger("show:modal",i),n.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(45),h=a(p);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.item,n="/library/metadata/"+t.id+"/unmatch",r=s.default.extend(t.server.getXHROptions(n),{type:"PUT"}),a=l.default.ajax(r);return a.fail(function(){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem unmatching this item.")})}),a.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var e=l.default.ajax(v);e.done(function(){n.resolve()}),e.fail(function(e){if(503===e.status)f.default.trigger("show:modal",new g.default({model:o}));else{var t=i?(0,d.default)("There was a problem canceling the update."):(0,d.default)("There was a problem updating the library.");f.default.trigger("show:alert",{type:"error",message:t})}n.reject(e);
})}var n=l.default.Deferred(),r=e.section,a=r?r.id:"all",i=e.cancel,o=r?r.server:e.server,u=e.params||{},c={};u.force&&(c.force=1);var p="/library/sections/"+a+"/refresh",v=s.default.extend(o.getXHROptions(p),{data:c});if(i&&(v.type="DELETE",r&&r.set("refreshing",!1)),c.force){var m=new h.default({title:(0,d.default)("Refresh All"),message:(0,d.default)("Forces a download of fresh media information from the internet. This can take a long time. Any locked fields are not modified."),confirmLabel:(0,
d.default)("Refresh"),cancelLabel:(0,d.default)("Cancel")}),y=m.promise;y.done(t),y.fail(function(){n.reject()}),f.default.trigger("show:modal",m)}else t();return n.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(45),h=a(p),v=n(330),g=a(v);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){v&&(v.stop(),v.stopListening())}function a(e){r(),v=f.default.getInstance(e.type,{forceLocal:!0
});var t=new h.default({playQueueItem:e.model,playQueue:e.playQueue,volume:e.volume}),n=v.load({model:t,autoplay:e.autoplay,offset:e.offset});return v.listenTo(l.default,"audio:fadeOut",function(t){t.exceptKey!==e.model.get("key")&&v.fadeOut()}),v.listenTo(l.default,"audio:stop",function(){v.stop()}),v.listenTo(t,"change:stopped",function(e,t){t&&r()}),n}function i(e){return e?void(g||(0,d.default)(e).then(a)):r()}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),l=s(o),u=n(643),d=s(u),c=n(234),f=s(c),p=n(387),h=s(p),v=null,g=!1;
l.default.on("show:player",function(){g=!0}),l.default.on("hide:player",function(){g=!1}),t.default=i,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=(0,o.resolve)("appModel").get("primaryPlayer");return e=s.default.extend({},e,{confirmClearPlayQueue:function(){var e=new v.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 c.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 c.default.trigger("show:playerLoading",e)}).then(function(e){return c.default.trigger("show:player",e)}).fail(function(e){return c.default.trigger("hide:playerLoading",e)})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(14),l=n(5),u=a(l),d=n(12),c=a(d),f=n(643),p=a(f),h=n(45),v=a(h);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){
var t=e.item,n=t.server.get("playQueueManager").getFor(t);if(n){var r=c.resolve("appModel"),a=r.get("primaryPlayer");if(a){var i=a.get("protocolCapabilities");if(!o.default.contains(i,"playqueues"))return v.default.trigger("show:alert",{type:"error",message:(0,p.default)("The connected player doesn't support queueing.")}),u.default.Deferred().resolve().promise()}return n.queueContent(t,e)}return m.default.execute("playMedia",{item:t})}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(3),o=a(s),l=n(8),u=a(l),d=n(14),c=i(d),f=n(5),p=a(f),h=n(12),v=a(h),g=n(27),m=a(g);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=o.default.Deferred(),n=e.server;if(!n.supports("transientToken"))return t.resolve(n.get("accessToken")).promise();var r={type:e.type||"delegation",scope:e.scope||"all"},a=c.join("/security/token",r),i=o.default.ajax(n.getXHROptions(a));return i.done(function(e){var n=u.default.parseXML(e);t.resolve(n.token)}),i.fail(function(e){
t.reject(e)}),t.promise()}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(8),o=a(s),l=n(46),u=a(l),d=n(26),c=i(d);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.server,n={download:e.download===!1?"0":"1"},r=c.join("/updater/check",n),a=o.default.extend(t.getXHROptions(r),{type:"PUT"}),i=e.initialState||"checking",s=t.get("update");s.set("state",i);var l=u.default.ajax(a).promise();return l.fail(function(){s.set("state","error");
}),l}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(8),u=a(l),d=n(26),c=i(d);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var a=r.fetch();a.done(function(){var a=r.get("mappingState"),i=e.value&&"unknown"===a,s=!e.value&&"mapped"===a;"waiting"===a||i||s?n||(n=setInterval(t,u)):(n=clearInterval(n),r.isWaiting()&&r.set("remoteAccessState",""),o.resolve())})}var n,r=e.cloudAccount,a=r.server.get("settings"),i=a.get("PublishServerOnPlexOnlineKey"),o=s.default.Deferred(),u=500;
if(!r.isWaiting()){var c=e.value?"connecting":"disconnecting";r.set("remoteAccessState",c)}var f=r.previous("remoteAccessState"),p=i.save({PublishServerOnPlexOnlineKey:e.value},{timeout:0});return p.done(t),p.fail(function(t){var n;n=e.value?(0,l.default)("There was a problem connecting your server."):(0,l.default)("There was a problem disconnecting your server."),d.default.trigger("show:alert",{type:"error",message:n}),r.set("remoteAccessState",f),o.reject(t)}),o.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(8),s=a(i),o=n(5),l=a(o),u=n(12),d=a(u);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var e=r.get("update");e.set("state","installing");var t=l.default.ajax(i).promise();return t.fail(function(){e.set("state","error")}),t}var n,r=e.server,a="/updater/apply",i=s.default.extend(r.getXHROptions(a),{type:"PUT"});r.get("activeConnection").get("isLoopback")||(n=new h.default({title:(0,d.default)("Remote Installation"),confirmLabel:(0,d.default)("Continue"),
cancelLabel:(0,d.default)("Cancel"),message:(0,d.default)("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}),f.default.trigger("show:modal",n));var o=n?n.promise:l.default.Deferred().resolve().promise();return o=o.then(function(){return t()})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(45),h=a(p);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.cloudAccount,n={cloudAccount:t,value:!1},r=l.default.execute("connectServer",n);return r=r.then(function(){return n.value=!0,l.default.execute("connectServer",n)}),r=r.then(function(){if(t.get("mappingError"))return s.default.Deferred().reject().promise()})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i),o=n(27),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";
function r(e){var t=new P.default({machineIdentifier:e},{onlyIfCached:!0});if(!d.default.isEmpty(t))return t}function a(e){var t=e.get("cloudAccount"),n=t.destroy();return n.done(function(){e.set({myPlexSigninState:"none",myPlexSubscription:!1})}),n}function i(e){e.trigger("destroy",e,e.collection),e.cache.remove(e)}function s(e){function t(){var e;if(l)e=l.destroy({wait:!0});else{var t="/api/servers/"+u.id,n=d.default.extend(o.server.getXHROptions(t),{type:"DELETE"});e=f.default.ajax(n)}if(u){if(u.get("connected")&&"ok"===u.get("myPlexSigninState")){
var r=u.get("cloudAccount");e=e.then(function(){return r.fetch()}),e=e.then(function(){return a(u)})}u.get("connected")===!1?i(u):e.always(function(){y.default.trigger("test:server",u),u.populate().fail(function(){i(u)})})}return e.always(function(){p.hide()}),e.promise()}var n,s=h.resolve("appModel"),o=s.get("user"),l=e.device,u=e.server||r(l.get("clientIdentifier"));n=l?(0,g.default)("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."):(0,
g.default)("Are you sure you want to remove this server?");var c={title:(0,g.default)("Remove Server"),message:n,confirmLabel:(0,g.default)("Remove"),cancelLabel:(0,g.default)("Cancel"),async:!0,hasDanger:!0};l&&(c.requireDoubleConfirm=!0,c.doubleConfirmMessage=(0,g.default)("Are you sure you want to remove this server?"),c.doubleConfirmLabel=(0,g.default)("Yes, I'm sure"));var p=new S.default(c),v=p.promise;return v=v.then(function(){return t()}),y.default.trigger("show:modal",p),v}var o=n(1).default,l=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0});var u=n(3),d=o(u),c=n(8),f=o(c),p=n(14),h=l(p),v=n(5),g=o(v),m=n(12),y=o(m),b=n(89),P=o(b),w=n(45),S=o(w);t.default=s,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=d.default.Deferred(),n=e.cloudAccount,r=e.claim,i=void 0!==r&&r,s=(0,c.resolve)("appModel").get("cloudServer"),o=n.server,u=void 0;if(i){var f=s.getXHROptions("/api/claim/token");u=d.default.ajax(a({},f,{type:"GET"})),u=u.then(function(e){var t=b.default.parseXML(e),n=t.token,r=o.getXHROptions(p.join("/myplex/claim",{
token:n}));return d.default.ajax(a({},r,{type:"POST"}))})}else{var h=e.username,g=e.password,y=o.getXHROptions(p.join("/myplex/account",{username:h,password:g}));u=d.default.ajax(a({},y,{type:"PUT"}))}return u.done(function(r){var a=l.default.isObject(r)?r:b.default.parseXML(r);a&&"invalid"===a.signInState?(m.default.trigger("show:alert",{type:"error",message:(0,v.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 r=void 0;r=401===e.status?(0,v.default)("The username or password is incorrect."):(0,v.default)("There was a problem signing in to Plex."),m.default.trigger("show:alert",{type:"error",message:r}),t.reject(e)}),t.promise()}var a=n(11).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=i(o),u=n(8),d=i(u),c=n(14),f=n(26),p=s(f),h=n(5),v=i(h),g=n(12),m=i(g),y=n(49),b=i(y);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.cloudAccount,n=t.destroy({timeout:0});return n.done(function(){t.server.set({myPlexSigninState:"none",myPlexSubscription:!1})}),n.fail(function(){l.default.trigger("show:alert",{type:"error",message:(0,s.default)("There was a problem signing the server out.")})}),n.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),s=a(i),o=n(12),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){
"use strict";function r(e){var t=l.default.Deferred(),n=e.cloudAccount;n.set("signedIn",!1),n.set({username:"",email:"",password:""});var r=n.save({username:e.username,email:e.email,password:e.password});return r.done(function(e){var r=s.default.isObject(e)?e:h.default.parseXML(e);if(r&&"invalid"===r.signInState){var a;h.default.parseArray(r,"Error"),a=r.Error.length?s.default.first(r.Error).error:(0,d.default)("This account information is invalid."),f.default.trigger("show:alert",{type:"error",message:a
}),t.reject()}else n.set("signedIn",!0),t.resolve()}),r.fail(function(e){f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem signing up for a Plex account.")}),t.reject(e)}),t.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c),p=n(46),h=a(p);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t,n=e.server,r=e.connection,a=n.get("friendlyName"),i=(new Date).getTime(),o=n.resolveUrl("/web/img/blank.png?cb="+i,{
connection:r}),u=s.default.Deferred();(0,l.default)("[Servers] Testing image for %s at %s",a,o);var d=new Image;return d.onload=function(){d.onload=d.onerror=d.onabort=null,t=clearTimeout(t),l.default.info("[Servers] Image test for %s at %s was successful",a,o),u.resolve(n,r)},d.onerror=d.onabort=function(){d.onload=d.onerror=d.onabort=null,t=clearTimeout(t),l.default.warn("[Servers] %s at %s unavailable",a,o),u.reject(n,r)},t=setTimeout(function(){d.onload=d.onerror=d.onabort=null,d.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
l.default.warn("[Servers] %s at is unavailable (Timeout)",a,o),u.reject(n,r)},5e3),d.src=o,u.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i),o=n(32),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=d.default.get("dismissedUnclaimedServers"),n=t.indexOf(e.id)>-1,r=s.default.history.getFragment();n||/^\!\/setup/.test(r)||l.default.trigger("show:bar","alertbar",new f.default({model:e}))}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=r;var i=n(47),s=a(i),o=n(12),l=a(o),u=n(40),d=a(u),c=n(1427),f=a(c);e.exports=t.default},function(e,t,n){"use strict";function r(e){s.default.trigger("show:modal",new l.default({collection:e.collection}))}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),s=a(i),o=n(1582),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var e=n.save(null,{force:!0});n.trigger("destroy",n,r),e.done(function(){d.fetch(),
l.get("friends").fetch(),l.get("sentInvites").fetch(),n.get("server")&&l.server.get("resources").fetch(),f.resolve()}),e.fail(function(e){m.default.trigger("show:alert",{type:"error",message:(0,v.default)("There was a problem accepting this invite.")}),r.add(n,{at:s}),f.reject(e)})}var n=e.invite,r=n.collection,s=r.indexOf(n),o=p.resolve("appModel"),l=o.get("user"),d=l.get("homeUsers"),f=c.default.Deferred();u.default.extend(e,{homeUsers:d,signedInHomeUser:d.get(l.id)});var h=a(e);return h.done(function(){
i(e).always(t)}),h.fail(function(){f.reject()}),f.promise}function a(e){if(!e.invite.get("home"))return c.default.Deferred().resolve().promise();var t;t=e.homeUsers.length>1?e.signedInHomeUser.get("admin")?(0,v.default)("You are the admin in your current home. If you leave, the remaining users will be removed and managed users will be deleted."):(0,v.default)("Are you sure you want to join this home? You will leave your current home."):(0,v.default)("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 n=new b.default({title:(0,v.default)("Join Home"),message:t,confirmLabel:(0,v.default)("Join"),cancelLabel:(0,v.default)("Cancel"),hasDanger:!0});return m.default.trigger("show:modal",n),n.promise}function i(e){if(e.invite.get("home")&&!e.signedInHomeUser.get("protected")){var t=new w.default({model:e.signedInHomeUser,isEditing:!0,isEditWarning:!0});return m.default.trigger("show:modal",t),t.promise}return c.default.Deferred().resolve().promise()}var s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var l=n(3),u=s(l),d=n(8),c=s(d),f=n(14),p=o(f),h=n(5),v=s(h),g=n(12),m=s(g),y=n(45),b=s(y),P=n(266),w=s(P);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.syncItem,n=e.server;if(!t.server.get("connected"))return c.default.trigger("show:alert",{type:"error",message:(0,u.default)("Please sign in to remove sync items.")}),o.default.Deferred().reject().promise();var r=a(),i=r.promise.then(function(){var e=t.destroy();return e.fail(function(e){c.default.trigger("show:alert",{
type:"error",message:(0,u.default)("There was a problem removing this sync item.")})}),e.always(function(){r.hide()}),e});return i=i.then(function(){return p.default.execute("refreshSyncLists",{server:n,silent:!0,skipContent:!0})})}function a(){var e=new v.default({title:(0,u.default)("Stop Syncing"),message:(0,u.default)("Are you sure you want to stop syncing this item? All files created by this job will be removed from the device."),confirmLabel:(0,u.default)("Remove"),cancelLabel:(0,u.default)("Cancel"),
async:!0,hasDanger:!0});return c.default.trigger("show:modal",e),e}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(8),o=i(s),l=n(5),u=i(l),d=n(12),c=i(d),f=n(27),p=i(f),h=n(45),v=i(h);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return a().then(i).then(s)}function a(){var e=d.default.Deferred(),t=f.resolve("appModel"),n=t.get("user"),r=!!n.get("subscription").get("features").get("home");if(r||n.get("homeUsers").length>1){var a=n.get("homeUsers").findWhere({
guest:!0}),i=n.get("homeDetails");if(a)e.resolve(a);else{var s=i.populate();s.done(function(){a=new g.default({id:i.get("guestUserID"),guest:!0},{server:n.server}),e.resolve(a)}),s.fail(function(){e.reject()})}}else e.reject();return e.promise()}function i(e){return h.default.execute("authenticateWithServer",{homeUser:e})}function s(e){var t=d.default.Deferred(),n=f.resolve("appModel"),r=n.get("user"),a=r.clearAccessToken();return a.always(function(){var n=r.signIn(e);n.always(function(){t.resolve();
})}),t.promise()}var o=n(1).default,l=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(8),d=o(u),c=n(14),f=l(c),p=n(27),h=o(p),v=n(392),g=o(v);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=c.resolve("appModel"),n=t.get("user"),r=[],a={url:e.item.get("url"),message:e.message};u.default.each(e.playlistIDs,function(e){var t=m.join(["/pms/playlists/",e,"/items"],a),i=u.default.extend(n.server.getXHROptions(t),{type:"POST"});r.push(o.default.ajax(i));
});var i=o.default.when.apply(o.default,r);return i.fail(function(e){v.default.trigger("show:alert",{type:"error",message:(0,p.default)("There was a problem recommending this item.")})}),i.promise()}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(8),o=a(s),l=n(3),u=a(l),d=n(14),c=i(d),f=n(5),p=a(f),h=n(12),v=a(h),g=n(26),m=i(g);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.server,n="/sync/refreshSynclists",r=s.default.extend(t.getXHROptions(n),{
type:"PUT"}),a=l.default.ajax(r);return e.skipContent||(a=a.then(function(e){var n="/sync/refreshContent",r=s.default.extend(t.getXHROptions(n),{type:"PUT"});return l.default.ajax(r)})),a.done(function(){e.silent||f.default.trigger("show:alert",{type:"success",message:(0,d.default)("Synced items were refreshed.")})}),a.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(5),d=a(u),c=n(12),f=a(c);t.default=r,e.exports=t.default},function(e,t,n){
"use strict";function r(e){function t(){var t=n.destroy({wait:!0});return t.done(function(){if(n.get("server")){var e=u.resolve("appModel"),t=e.get("user");t.get("friends").fetch()}}),t.fail(function(){i(e)}),t.always(function(){r.hide()}),t.promise()}var n=e.invite,r=a(e),s=r.promise;return s=s.then(function(){return t()}),p.default.trigger("show:modal",r),s}function a(e){var t,n;"requests"===e.subset?(t=(0,c.default)("Reject Invite"),n=(0,c.default)("Are you sure you want to reject this invite?")):(t=(0,
c.default)("Cancel Invite"),n=(0,c.default)("Are you sure you want to cancel this invite?"));var r=new v.default({title:t,message:n,async:!0});return r}function i(e){var t;t="requests"===e.subset?(0,c.default)("There was a problem rejecting this invite."):(0,c.default)("There was a problem canceling this invite."),p.default.trigger("show:alert",{type:"error",message:t})}var s=n(9).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(14),u=s(l),d=n(5),c=o(d),f=n(12),p=o(f),h=n(45),v=o(h);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){var e=s.default.Deferred(),t=(0,o.resolve)("appModel"),n=t.get("user");return n.get("isLocked")?e.reject():e.resolve(),e.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i),o=n(14);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var e=r.destroy({wait:!0});return e.fail(function(){l.default.trigger("show:alert",{type:"error",message:(0,s.default)("There was a problem removing this device.")
})}),e.always(function(){a.hide()}),e.promise()}var n,r=e.device;n=r.get("isCloudSync")?(0,s.default)("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."):(0,s.default)("If you remove this device, you will need to sign in again on the device to restore access to Plex.");var a=new d.default({title:(0,s.default)("Remove Device"),message:n,confirmLabel:(0,s.default)("Remove"),cancelLabel:(0,s.default)("Cancel"),
async:!0,hasDanger:!0}),i=a.promise;return i=i.then(function(){return t()}),l.default.trigger("show:modal",a),i}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),s=a(i),o=n(12),l=a(o),u=n(45),d=a(u);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){r&&n.set("home",!1);var e=n.destroy({wait:!0});return e.done(function(){var e=l.resolve("appModel"),t=e.get("user"),a=n.get("serverShares");if(t.get("invites").fetch(),t.get("sentInvites").fetch(),
r){var i=t.get("homeUsers");i.fetch()}a.getLibraryCount({owned:!1})&&t.server.get("resources").fetch()}),e.fail(function(){r&&n.set("home",!0),f.default.trigger("show:alert",{type:"error",message:(0,d.default)("There was a problem removing this friend.")})}),e.always(function(){i.hide()}),e.promise()}var n=e.friend,r=n.get("home"),i=a(e),s=i.promise;return s=s.then(function(){return t()}),f.default.trigger("show:modal",i),s}function a(e){var t=e.friend,n=t.get("serverShares"),r=n.getLibraryCount({
owned:!0}),a=n.getLibraryCount({owned:!1}),i=r+a,s=t.get("title"),o=(0,d.default)("Are you sure you want to remove {1}?",s),u=(0,h.default)((0,d.default)("library"),i,(0,d.default)("libraries"));if(r&&a?o+=" "+(0,d.default)("You are sharing {1} {2} with each other.",i,u):r?o+=" "+(0,d.default)("You are sharing {1} {2} with this friend.",r,u):a&&(o+=" "+(0,d.default)("This friend is sharing {1} {2} with you.",a,u)),t.get("home")){var c=l.resolve("appModel"),f=c.get("user"),p=f.get("homeUsers"),v=p.get(f.id);
o+=v.get("admin")?" "+(0,d.default)("This friend will be removed from your home."):" "+(0,d.default)("You will be leaving your home.")}var m=new g.default({title:(0,d.default)("Remove Friend"),message:o,confirmLabel:(0,d.default)("Remove"),cancelLabel:(0,d.default)("Cancel"),async:!0,hasDanger:!0});return m}var i=n(9).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(14),l=i(o),u=n(5),d=s(u),c=n(12),f=s(c),p=n(248),h=s(p),v=n(45),g=s(v);t.default=r,e.exports=t.default;
},function(e,t,n){"use strict";function r(e){function t(){var t=u.default.extend(n.server.getXHROptions(n.url()),{type:"DELETE"}),r=c.default.ajax(t);return r.done(function(){var e=l.get(n.id);e?(n.trigger("destroy",n,o),n.get("restricted")?e.trigger("destroy",e,l):e.set("home",!1)):(o.reset([n]),n.set("admin",!0),l.each(function(e){e.set("home",!1)}));var t=s.hasHome();if(s.set("home",t),!t){var r=s.get("homeDetails");r.clear()}}),r.fail(function(){i(e)}),r.always(function(){d.hide()}),r.promise();
}var n=e.homeUser,r=p.resolve("appModel"),s=r.get("user"),o=s.get("homeUsers"),l=s.get("friends"),d=a(e),f=d.promise;return f=f.then(function(){return t()}),m.default.trigger("show:modal",d),f}function a(e){var t,n,r,a=e.homeUser;e.isSignedInUser?(t=(0,v.default)("Leave Home"),r=(0,v.default)("Leave"),n=a.get("admin")?(0,v.default)("You are the admin in this home. If you leave, the remaining users will be removed and managed users will be deleted."):(0,v.default)("Are you sure you want to leave this home?")):(t=(0,
v.default)("Remove User"),r=(0,v.default)("Remove"),n=a.get("restricted")?(0,v.default)("Removing a managed user from your home will delete the managed user. Watched status for this user will be lost. This cannot be undone."):(0,v.default)("You will no longer be able to switch to this user."));var i=new b.default({title:t,message:n,confirmLabel:r,cancelLabel:(0,v.default)("Cancel"),async:!0,hasDanger:!0});return i}function i(e){var t;t=e.isSignedInUser?(0,v.default)("There was a problem leaving this home."):(0,
v.default)("There was a problem removing this user."),m.default.trigger("show:alert",{type:"error",message:t})}var s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=s(l),d=n(8),c=s(d),f=n(14),p=o(f),h=n(5),v=s(h),g=n(12),m=s(g),y=n(45),b=s(y);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(){var e=a.destroy({wait:!0});return e.done(function(){var e=o.resolve("appModel"),t=e.get("user");t.get("friends").fetch(),t.get("invites").fetch(),
t.server.get("resources").fetch()}),e.fail(function(){var e;e=a.get("owned")?(0,u.default)("There was a problem removing this share."):(0,u.default)("There was a problem leaving this server."),c.default.trigger("show:alert",{type:"error",message:e})}),e.always(function(){i.hide()}),e.promise()}var n,r,a=e.serverShare;a.get("owned")?(n=(0,u.default)("Stop Sharing"),r=(0,u.default)("Are you sure you want to stop sharing with this friend?")):(n=(0,u.default)("Leave Server"),r=(0,u.default)("Are you sure you want to leave this server? You can rejoin at any time."));
var i=new p.default({title:n,message:r,async:!0,hasDanger:!0}),s=i.promise;return s=s.then(function(){return t()}),c.default.trigger("show:modal",i),s}var a=n(9).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(14),o=a(s),l=n(5),u=i(l),d=n(12),c=i(d),f=n(45),p=i(f);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=c.resolve("appModel"),n=t.get("user"),r=[],a={url:e.item.get("url"),message:e.message};u.default.each(e.networkIDs,function(e){
var t=m.join(["/pms/social/networks/",e,"/share"],a),i=u.default.extend(n.server.getXHROptions(t),{type:"POST"});r.push(o.default.ajax(i))});var i=o.default.when.apply(o.default,r);return i.fail(function(e){v.default.trigger("show:alert",{type:"error",message:(0,p.default)("There was a problem sharing this item.")})}),i.promise()}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(8),o=a(s),l=n(3),u=a(l),d=n(14),c=i(d),f=n(5),p=a(f),h=n(12),v=a(h),g=n(26),m=i(g);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t,n=e.user,r=e.serverShare,a=r.get("Section");if(!a||!a.length)return l.default.Deferred().resolve().promise();t=r.get("allLibraries")?[]:s.default.pluck(s.default.where(a,{shared:!0}),"id");var i={server_id:r.get("machineIdentifier"),shared_server:{library_section_ids:t}};n.isNew()&&(i.sharing_settings=n.getSaveParams()),r.isNew()&&(n.isNew()?i.shared_server.invited_email=n.get("username"):i.shared_server.invited_id=n.id);
var o=r.url(),u=s.default.extend(n.server.getXHROptions(o),{type:r.isNew()?"POST":"PUT",contentType:"application/json",data:JSON.stringify(i)});return l.default.ajax(u).promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=(0,o.resolve)("appModel").get("user"),n=t.get("homeUsers"),r=n.get(t.id);if(r.get("protected")||n.length>1)return s.default.Deferred().reject().promise();
var a=new c.default({model:r,isEditing:!0,isEditWarning:!0});return a.promise.always(function(e){e||u.default.trigger("show:modal",new p.default({type:"home"}))}),u.default.trigger("show:modal",a),a.promise}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i),o=n(14),l=n(12),u=a(l),d=n(266),c=a(d),f=n(712),p=a(f);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=u.resolve("appModel"),n=t.get("user"),r=e.item.server;if("ok"!==r.get("myPlexSigninState")){
var a=(0,c.default)("This server needs to be connected to Plex to sync its content.");return void p.default.trigger("show:alert",{type:"error",message:a})}if(!r.get("allowSync"))return void p.default.trigger("show:modal",new v.default({model:r}));var i=n.get("devices"),s=i.filterSyncDevices(e.item),l=o.default.clone(e);if(s.length>1){var d=new b.default({collection:s}),f=d.promise;f.done(function(e){l.device=s.get(e),p.default.trigger("show:modal",new m.default(l))}),p.default.trigger("show:modal",d);
}else l.device=s.first(),p.default.trigger("show:modal",new m.default(l))}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=a(s),l=n(14),u=i(l),d=n(5),c=a(d),f=n(12),p=a(f),h=n(709),v=a(h),g=n(711),m=a(g),y=n(1577),b=a(y);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){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"),r=t.server.getXHROptions("/api/v2/users",{
type:"POST",data:n}),a=l.default.ajax(r).promise();return a=a.then(function(n){return e.remember?c.default.restorePrevious():c.default.register(p.default.getInstance()),t.signIn(n,{lockState:S.default.lockStates.UNLOCKED})}),a.fail(function(e){var t=void 0;if(422===e.status){var n=e.responseText&&b.default.parseXML(e.responseText),r=n&&n.error,a=s.default.isArray(r)?s.default.first(r):r;t=a?s.default.isObject(a)?(0,P.getErrorText)(a):a:(0,v.default)("This account information is invalid.")}else t=(0,
v.default)("There was a problem connecting to Plex.");m.default.trigger("show:alert",{type:"error",message:t})}),a}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(14),d=n(99),c=a(d),f=n(292),p=a(f),h=n(5),v=a(h),g=n(12),m=a(g),y=n(49),b=a(y),P=n(307),w=n(160),S=a(w);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.user,n=t.get("homeDetails"),r=t.get("homeSize");n.set("guestEnabled",e.enable);var a=n.save();return a.done(function(){
t.get("homeUsers").fetch(),t.get("friends").fetch(),t.hasHome()||h.default.execute("showHomeWarningsModal"),e.enable||2!==r||n.clear()}),a.fail(function(t){var n=f.default.parseXML(t.responseText),r=n&&n.status;s.default.isString(r)||(r=e.enable?(0,l.default)("Unable to enable guest account"):(0,l.default)("Unable to disable guest account")),d.default.trigger("show:alert",{type:"error",message:r})}),a}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(5),l=a(o),u=n(12),d=a(u),c=n(46),f=a(c),p=n(27),h=a(p);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=l.default.Deferred(),n="/api/users/validate?invited_email="+encodeURIComponent(e.username),r=s.default.extend(e.server.getXHROptions(n),{type:"POST"}),a=l.default.ajax(r);return a.done(function(){t.resolve()}),a.fail(function(e){var n=e.responseText,r=d.default.parseXML(n);t.reject(e,r&&r.status)}),t.promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(8),l=a(o),u=n(46),d=a(u);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(13),i=r(a),s=n(1254),o=r(s),l=n(1250),u=r(l);n(1253);var d=new i.default.Application;d.addInitializer(function(){return(0,o.default)().then(function(){return(0,u.default)()})}),t.default=d,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={allowFlash:!0,allowServerUpdates:!0,allowHttpsMediaServerConnections:!0,
allowMediaServerRelayConnections:!0,allowCloudSyncServers:!0,shouldCreateFlexModels:!0,shouldCreateStateTree:!0};t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(){l.default.trigger("initialize:app");var e=(0,d.default)();return e=e.then(f.default),e=e.then(h.default),e=e.then(g.default),e=e.then(y.default),e=e.then(P.default),e=e.then(S.default),e=e.then(T.default),e=e.then(M.default),e=e.then(x.default),e=e.then(k.default),e=e.then(A.default),e=e.then(R.default),s.default.mobile&&(e=e.then(N.default)),
e=e.then(z.default),e=e.then(U.default),e=e.then(B.default)}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(76),s=a(i),o=n(12),l=a(o),u=n(1256),d=a(u),c=n(1265),f=a(c),p=n(1252),h=a(p),v=n(1260),g=a(v),m=n(936),y=a(m),b=n(934),P=a(b),w=n(1255),S=a(w),_=n(1257),T=a(_),I=n(1259),M=a(I),C=n(1261),x=a(C),E=n(937),k=a(E),D=n(1264),A=a(D),O=n(1258),R=a(O),L=n(1263),N=a(L),j=n(1262),U=a(j),$=n(938),z=a($),F=n(1266),B=a(F);n(898),n(895),n(897),n(894),n(896),e.exports=t.default;
},function(e,t,n){"use strict";function r(){u.default.register(new c.default),p.default.register(new v.default),(0,o.registerAll)({metrics:[b.default,m.default],testServerConnection:w.default}),(0,o.registerAll)({UserFlexModel:C.default,ServerFlexModel:E.default});var e=new I.default;return(0,o.registerAll)({appModel:e,appStore:(0,_.default)(e),logs:new D.default([],{parent:e})}),(0,o.registerAll)({serverManager:new O.default({appModel:e}),primaryServerManager:new L.default({appModel:e}),manualServerManager:new j.default({
appModel:e}),serverConnectionManager:new $.default({appModel:e}),serverConnectionTestManager:new F.default({appModel:e}),serverUpdateManager:new V.default({appModel:e})}),s.default.Deferred().resolve().promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(8),s=a(i),o=n(14),l=n(40),u=a(l),d=n(1276),c=a(d),f=n(291),p=a(f),h=n(1166),v=a(h),g=n(909),m=a(g),y=n(907),b=a(y),P=n(917),w=a(P),S=n(1393),_=a(S),T=n(1275),I=a(T),M=n(1350),C=a(M),x=n(1334),E=a(x),k=n(975),D=a(k),A=n(1272),O=a(A),R=n(1271),L=a(R),N=n(949),j=a(N),U=n(952),$=a(U),z=n(953),F=a(z),B=n(1274),V=a(B);
e.exports=t.default},function(e,t,n){"use strict";function r(){return u.default.registerAll(c),o.default.Deferred().resolve().promise()}var a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(8),o=a(s),l=n(27),u=a(l),d=n(1187),c=i(d);e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(2477),i=r(a),s=n(2475),o=r(s),l=n(2476),u=r(l),d=n(2474),c=r(d),f=n(2478),p=r(f),h=n(2472),v=r(h),g=n(2473),m=r(g),y=n(6),b=r(y);b.default.registerPartial("setting",i.default),
b.default.registerPartial("lockableTagInput",o.default),b.default.registerPartial("lockableTextInput",u.default),b.default.registerPartial("lockableNumericInput",c.default),b.default.registerPartial("textInput",p.default),b.default.registerPartial("autocompleteTextInput",v.default),b.default.registerPartial("connectError",m.default)},function(e,t,n){"use strict";function r(){return(0,l.default)().then(function(){return s.default.registerAll()})}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=r;var i=n(1169),s=a(i),o=n(1251),l=a(o);e.exports=t.default},function(e,t,n){"use strict";function r(){var e=(0,s.default)();return e.done(function(){var e=new l.default;e.start()}),e}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(935),s=a(i),o=n(1268),l=a(o);e.exports=t.default},function(e,t,n){"use strict";function r(){var e=(0,s.default)();return e.done(function(){var e=new l.default;e.start()}),e}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=r;var i=n(939),s=a(i),o=n(1269),l=a(o);e.exports=t.default},function(e,t,n){"use strict";function r(){var e=(0,s.default)();return e.done(function(){var e=new l.default;e.start()}),e}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(940),s=a(i),o=n(1270),l=a(o);e.exports=t.default},function(e,t,n){"use strict";function r(){var e=(0,o.default)();return e.done(function(){(0,i.resolve)("serverUpdateManager").start()}),e}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=r;var i=n(14),s=n(942),o=a(s);e.exports=t.default},function(e,t,n){"use strict";function r(){var e=(0,i.resolve)("appModel").get("experienceSettings"),t=(0,u.default)();return t=t.then(function(){return(0,o.default)(e.populate())})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(14),s=n(140),o=a(s),l=n(943),u=a(l);e.exports=t.default},function(e,t,n){"use strict";function r(){var e=l.default.Deferred(),t=f.default.get("myPlexAccessToken");
return t.done(function(){window.PLEXWEB&&window.PLEXWEB.myPlexAccessToken||d.default.register(f.default.getInstance())}),t.always(function(){e.resolve()}),e.promise()}function a(){var e=l.default.Deferred(),t=d.default.set("plexTestToken",1);return t.done(function(){d.default.remove("plexTestToken")}),t.fail(function(e){var t=new h.default;g.default.warn("Storage module swapped for "+t.name+' due to exception: "'+e+'"'),f.default.register(t),d.default.register(t,{ignorePrevious:!0})}),t.always(function(){
e.resolve()}),e.promise()}function i(){return r().then(a).then(y.default)}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(8),l=s(o),u=n(99),d=s(u),c=n(292),f=s(c),p=n(914),h=s(p),v=n(32),g=s(v),m=n(944),y=s(m);e.exports=t.default},function(e,t,n){"use strict";function r(){var e=(0,i.resolve)("appModel").get("user"),t=(0,o.default)();return t.done(function(){var t=new u.default(e);t.start();var n=new c.default;n.start()}),t}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0}),t.default=r;var i=n(14),s=n(945),o=a(s),l=n(1273),u=a(l),d=n(1267),c=a(d);e.exports=t.default},function(e,t,n){"use strict";function r(){function e(e){if((n||arguments[1]instanceof KeyboardEvent&&"esc"===arguments[2])&&f.default.get("keyboardShortcuts"))return e.apply(t,s.default.toArray(arguments).slice(1))}var t=h.default.getInstance(),n=!0;return g.default.on("anyModalOpen",function(){n=!1}),g.default.on("allModalsClosed",function(){n=!0}),s.default.each(t.shortcuts,function(n){d.default.bind(n.keys,s.default.wrap(t[n.fn],e));
}),l.default.Deferred().resolve().promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(3),s=a(i),o=n(8),l=a(o),u=n(2601),d=a(u),c=n(40),f=a(c),p=n(375),h=a(p),v=n(12),g=a(v);e.exports=t.default},function(e,t,n){"use strict";function r(){function e(){s.default.each(v,function(t){document.body.removeEventListener(t,e,!0)});var n=t.src.slice(-h.default.length)===h.default;n&&t.play()}var t=(0,f.default)("audio",!0);try{t.style.cssText="position:absolute;width:1px;height:1px;",
t.setAttribute("src",h.default)}catch(n){d.default.error("An error occurred trying to initialize the audio element.")}return s.default.each(v,function(t){document.body.addEventListener(t,e,!0)}),l.default.Deferred().resolve().promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(3),s=a(i),o=n(8),l=a(o),u=n(32),d=a(u),c=n(608),f=a(c),p=n(2255),h=a(p),v=["touchstart","mousedown","mousemove","click","keydown","keypress"];e.exports=t.default},function(e,t,n){
"use strict";function r(e){var t=!e.get("isShared")||e.supports("sharedSyncStatus");return e.get("isFullServer")&&t}function a(){var e=new f.default({name:"MediaServerEventManager",appModel:(0,l.resolve)("appModel"),isValidServer:r,supportsLongPolling:!1,showTimelineStatus:!0,ServerEventConnection:d.default,ServerRetryManager:h.default});return e.start(),o.default.Deferred().resolve().promise()}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=n(8),o=i(s),l=n(14),u=n(1406),d=i(u),c=n(552),f=i(c),p=n(551),h=i(p);
e.exports=t.default},function(e,t,n){"use strict";function r(){return new l.default,s.default.Deferred().resolve().promise()}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(8),s=a(i),o=n(1101),l=a(o);e.exports=t.default},function(e,t,n){"use strict";function r(){return new d.default,new f.default,new h.default,new g.default,new y.default,new P.default,new S.default,new T.default,new M.default,l.default.history.start(),s.default.Deferred().resolve().promise();
}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(8),s=a(i),o=n(47),l=a(o),u=n(1357),d=a(u),c=n(1367),f=a(c),p=n(1359),h=a(p),v=n(1355),g=a(v),m=n(1361),y=a(m),b=n(1365),P=a(b),w=n(1353),S=a(w),_=n(1369),T=a(_),I=n(1363),M=a(I);e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(14),o=n(35),l=r(o),u=n(12),d=r(u),c=n(56),f=r(c),p=n(1426),h=r(p),v=l.default.extend({mixins:f.default,
announcementsUpdateDelay:36e5,initialize:function(){this.user=(0,s.resolve)("appModel").get("user"),i.default.bindAll(this,"updateAnnouncements","onSignedInChange")},start:function(){var e=i.default.debounce(this.onAnnouncementsChange),t=i.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&&d.default.trigger("show:bar","alertbar",new h.default({model:t}))}}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(12),i=r(a),s=n(191),o=r(s),l=n(946),u=r(l),d=n(429),c=r(d),f=u.default.extend({mixins:c.default,
start:function(){u.default.prototype.start.apply(this,arguments),this.listenTo(i.default,"show:modal",this.onShowModal),this.handleCollectUsageData(o.default)},onShowModal:function(e){e.name&&o.default.trackView(e.name)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(374),i=r(a),s=n(948),o=r(s),l=n(429),u=r(l),d=o.default.extend({mixins:u.default,start:function(){o.default.prototype.start.apply(this,arguments),
this.handleCollectUsageData(i.default)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(14),i=n(950),s=r(i),o=n(429),l=r(o),u=s.default.extend({mixins:l.default,start:function(){s.default.prototype.start.apply(this,arguments),this.handleCollectUsageData((0,a.resolve)("metrics"))}});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var a=n(27),i=r(a),s=n(951),o=r(s),l=o.default.extend({fetchPrimaryRelations:function(e){var t=this,n=e.get("isFullOwnedServer"),r=e.get("isShared")&&e.supports("sharedSettings");if((n||r)&&!function(){var n=e.get("settings");n.populate().done(function(){var r=t.appModel.get("primaryServer");r&&r.id===e.id&&t.handlePrimarySettings(e,n)})}(),n){var a=e.get("sessions");a.fetch({reset:!0})}var i=e.get("home"),s=e.get("activeConnection"),o=s.get("isPrivate")||n||i;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"),r=t.get("AcceptedEULA"),a=r&&r.get("value")===!1;!n&&a&&i.default.execute("showTermsOfService",{collection:t})}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(954),i=r(a),s=n(27),o=r(s),l=i.default.extend({start:function(){i.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"),r=t===!1&&!e.previous("isClaimed");n&&r&&o.default.execute("showClaimServerAlertBar",e)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(11).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=a(i),o=n(12),l=a(o),u=n(5),d=a(u),c=n(27),f=a(c),p=n(947),h=a(p),v=n(45),g=a(v),m=n(266),y=a(m),b=h.default.prototype,P=h.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(r({},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&&f.default.execute("resumePlayQueue",e)},onHasInvalidTokenChange:function(e,t){if(t){var n=new g.default({title:(0,d.default)("Invalid Credentials"),
message:(0,d.default)("Your credentials have expired. Please sign in again."),confirmLabel:(0,d.default)("OK"),cancelLabel:(0,d.default)("Ignore")});n.promise.done(function(){l.default.trigger("navigate","login",{silent:!0})}),l.default.trigger("show:modal",n)}}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(35),o=r(s),l=n(12),u=r(l),d=n(40),c=r(d),f=n(56),p=r(f),h=n(27),v=r(h),g=n(1428),m=r(g),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=i.default.last(t);return!(!n||!n.indexOf("fragment"))},isLastDismissedVersion:function(e){var t=e.get("shortVersion")||"unknown";
return t===c.default.get("serverUpdateDismissedVersion")},checkForServerUpdates:function(e){if(e.get("isConnected")&&e.get("updater")){var t=e.get("update");e.supports("updater")?t.fetch().then(function(){v.default.execute("checkForServerUpdates",{server:e,download:!1})}):this.isLastDismissedVersion(t)||u.default.trigger("show:bar","alertbar",new m.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 m.default({model:e}))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(11).default,a=n(9).default,i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(211),o=a(s),l=n(1134),u=i(l),d=n(20),c=i(d),f=n(968),p=i(f),h=n(1009),v=i(h),g=n(573),m=i(g),y=n(570),b=i(y),P=n(1323),w=i(P),S=n(1337),_=i(S),T=n(1339),I=i(T),M=p.default.extend({name:"DesktopAppModel",sessionAttrs:r({},p.default.prototype.sessionAttrs,{isFirstRun:c.default.boolean.isRequired,isCastApiAvailable:c.default.boolean.isRequired,isCastDeviceAvailable:c.default.boolean.isRequired,primaryPlayer:c.default.instanceOf(m.default,b.default)}),sessionRelations:r({},p.default.prototype.sessionRelations,{
entities:{relationClass:(0,u.default)(o)},players:{relationClass:v.default},multiSelect:{relationClass:w.default},experienceSettings:{relationClass:_.default},ui:{relationClass:I.default}}),defaults:function(){var e=p.default.prototype.defaults.apply(this,arguments);return r({},e,{isFirstRun:!1,isCastApiAvailable:!1,isCastDeviceAvailable:!1})}});t.default=M,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(76),o=r(s),l=n(240),u=r(l),d=n(306),c=r(d),f=n(967),p=r(f),h=p.default.extend({
storageKey:"settingsv2",defaults:i.default.extend({},p.default.prototype.defaults,{playThemeMusic:!1,keyboardShortcuts:!0,showUnwatchedIcons:!1,showAdvancedSettings:!1,allowHttpFallback:c.default.NEVER,companion:!0,localQuality:-1,remoteQuality:8,channelQuality:-1,dash:!0,directPlay:!0,directStream:!0,preferAAC:"wiiu"===o.default.id||"edge"===o.default.id,allowAC3:!1,subtitleSize:100,subtitlesBurnLevel:u.default.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",relayConfirmed:!1,suppressLimitedPlaybackMessage:!1}),getListTypeKey:function(e){var t="listType";return e&&(t+="!"+e.get("typeString")),t},getListType:function(e){var t,n;return e=e||{},i.default.has(e,"mediaType")&&i.default.isObject(e.mediaType)&&(n=this.getListTypeKey(e.mediaType)),
t=this.get(n)||this.get(e.fallbackKey)||this.get("listType")},saveListType:function(e,t){var n=this.getListTypeKey(e);this.save(n,t),i.default.isEqual(n,"listType")||this.trigger("change:listType",this,t)},getSectionListType:function(e,t){var n;return e&&(t=t||e.get("currentType"),n=e.getScopedKey("listType")),this.getListType({mediaType:t,fallbackKey:n})}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(3),s=r(i),o=n(26),l=a(o),u=n(28),d=r(u),c=n(1278),f=r(c),p=d.default.extend({name:"DownloadServerCollection",context:["server"],url:function(){var e=s.default.result(this.server,"url");return l.join([e,"api/downloads/1"])},model:f.default});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(1279),u=r(l),d=o.default.extend({name:"DownloadServerModel",context:["server"],rootPropertyName:"Type",
idAttribute:"name",syncedAttrs:{name:i.default.string},syncedRelations:{platforms:{rootPropertyName:"Platform",relationClass:u.default,options:function(e){return{type:e.name}}}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1280),o=r(s),l=i.default.extend({name:"DownloadServerPlatformCollection",context:["server","type"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";
var r=n(11).default,a=n(19).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(20),o=i(s),l=n(22),u=i(l),d=n(1281),c=i(d),f=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:c.default}},derivedAttrs:{type:function(){return this.type}},augmentResponse:function(e){var t=e.release_date,n=e.extra_info,i=e.items_fixed,s=e.items_added,o=a(e,["release_date","extra_info","items_fixed","items_added"]);return r({},o,{info:n,fixed:i,added:s,date:t+"000"})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1282),o=r(s),l=i.default.extend({
name:"DownloadServerReleaseCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"DownloadServerReleaseModel",context:["server"],modelId:function(){return this.get("build")+"-"+this.get("distro")},syncedAttrs:{label:i.default.string,build:i.default.string,distro:i.default.string,url:i.default.string}});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(28),o=r(s),l=n(1284),u=r(l),d=o.default.extend({name:"ArtworkCollection",context:["server","artworkType"],model:u.default,url:function(){var e=i.default.result(this.parent,"url");return e+"/"+this.artworkType+"s"}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l={
POSTER:"poster",ART:"art",BANNER:"banner"},u=o.default.extend({name:"ArtworkModel",context:["server","artworkType"],idAttribute:"ratingKey",rootPropertyName:"Photo",syncedAttrs:{key:i.default.string,ratingKey:i.default.string,thumb:i.default.string,selected:i.default.boolean}},{types:l});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(666),u=r(l),d=o.default.extend({name:"FilePathModel",
context:["server"],idAttribute:"key",rootPropertyName:"Path",sessionAttrs:{isBackShortcut:i.default.boolean},sessionRelations:{children:function(){return{relationClass:u.default,options:{url:this.id}}}},syncedAttrs:{key:i.default.string,title:i.default.string,path:i.default.string,home:i.default.boolean,network:i.default.boolean}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(667),u=r(l),d=o.default.extend({
name:"MatchResultModel",context:["server"],idAttribute:"guid",rootPropertyName:"SearchResult",syncedAttrs:{id:i.default.integer,guid:i.default.string,name:i.default.string,parentGUID:i.default.string,parentName:i.default.string,type:i.default.string,index:i.default.integer,score:i.default.integer,thumb:i.default.string,year:i.default.integer,matched:i.default.boolean},syncedRelations:{children:function(){return{relationClass:u.default,rootPropertyName:"SearchResult"}}},derivedAttrs:{normalizedScore:function(){
var e=this.get("score");if(null!=e)return Math.min(Math.max(e,0),100)}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(26),d=a(u),c=n(979),f=r(c),p=n(1292),h=r(p),v=f.default.extend({defaults:function(){return{children:new h.default([],{server:this.server,parent:this})}},findItem:function(e){return this.get("children").get(e)},addContent:function(e){var t=[s.default.result(this,"url"),"items",e.id],n=d.join(t,e.getSaveParams()),r=s.default.extend(e.server.getXHROptions(n),{
type:"PUT"}),a=l.default.ajax(r);return a.then(s.default.bind(function(e){this.set(this.parse(e))},this)),a.promise()}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(12),d=r(u),c=n(46),f=r(c),p=n(26),h=a(p),v=n(236),g=r(v),m=n(379),y=r(m),b=g.default.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(e){var t=s.default.isObject(e)?e:f.default.parseXML(e);return f.default.parseBoolean(t,"playQueueShuffled"),f.default.parseInteger(t,["playQueueSelectedItemID","playQueueSelectedItemOffset","playQueueTotalCount","playQueueVersion"]),
f.default.parseArray(t,"Metadata"),t},parse:function(e,t){s.default.isString(e)&&(e=f.default.replaceXMLElementNames(e,this.metadataElementNames,"Metadata"));var n=this.convert(e);n.id&&(n.playQueueID=n.id);var r=s.default.pick(n,this.whitelistedAttrs);return this.set(r,{silent:!0}),this.pendingChanges=this.changed,this.parseItems(n),r},parseItems:function(e){var t=this.get("collection"),n=e.Metadata,r=!!n.length,a=s.default.pluck(n,"playQueueItemID").indexOf(e.playQueueSelectedItemID),i=e.playQueueSelectedItemOffset,o=i-a;
s.default.each(n,function(t,n){t.queueIndex=o+n,e.identifier&&(t.identifier=e.identifier),e.mediaTagPrefix&&(t.mediaTagPrefix=e.mediaTagPrefix),e.mediaTagVersion&&(t.mediaTagVersion=e.mediaTagVersion)}),t?t.set(n,{parse:r}):(t=new y.default(n,{server:this.server,parent:this,parse:r}),this.set("collection",t)),t.totalSize=e.playQueueTotalCount,t.availableRange={start:o,end:o+t.length}},moveItem:function(e,t){if(e===this.get("playQueueSelectedItemID"))return l.default.Deferred().resolve().promise();
this.set("hasUserAdditions",!0);var n={after:t||-1},r=h.join([s.default.result(this,"url"),"/items/",e,"/move"],n);return this._ajax("PUT",r)},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),r=Math.max(n,0),a=r,i=this.get("playQueueLastAddedItemID");if(null!=i){var s=e.get(i),o=e.indexOf(s);o>r&&(a=o)}return{start:r,end:a}},_ajax:function(e,t){var n=s.default.extend(this.server.getXHROptions(t),{type:e}),r=l.default.ajax(n);
return r.done(s.default.bind(function(e){this.set(this.parse(e)),s.default.isEmpty(this.pendingChanges)||(s.default.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)),r.promise()},onMessageChange:function(e,t){t&&d.default.trigger("show:alert",{type:"error",message:t})}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),i=r(a),s=n(46),o=r(s),l=n(59),u=r(l),d=u.default.extend({idAttribute:"key",whitelistedAttrs:["queueItemID","generatorID","targetTagID","syncItemId","syncItemTitle","key","type","progress","speed","remaining","size","ratingKey","title","thumb"],convert:function(e){var t=i.default.isObject(e)?e:o.default.parseXML(e);return o.default.parseInteger(t,["queueItemID","generatorID","targetTagID","syncItemId","remaining","size"]),o.default.parseFloat(t,["progress","speed"]),t},parse:function(e){
var t=this.convert(e);return t=i.default.pick(t,this.whitelistedAttrs)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(161),i=r(a),s=n(83),o=r(s),l=n(1291),u=r(l),d=o.default.extend({model:u.default,url:"/clients/profiles?type="+i.default.LOCAL,parse:function(e){return this.convert(e,"Profile")}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(3),i=r(a),s=n(46),o=r(s),l=n(59),u=r(l),d=u.default.extend({idAttribute:"title",whitelistedAttrs:["title","selected"],convert:function(e){var t=i.default.isObject(e)?e:o.default.parseXML(e);return o.default.parseBoolean(t,"selected"),t},parse:function(e,t){var n=this.convert(e);return n=i.default.pick(n,this.whitelistedAttrs)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(9).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(26),s=r(i),o=n(161),l=a(o),u=n(28),d=a(u),c=n(254),f=a(c),p=d.default.extend({
name:"VersionGeneratorCollection",context:["server"],model:f.default,url:function(){return s.join(["playlists",this.parent.id,"items"],{type:l.default.LOCAL})}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"VersionGeneratorMediaSettingsModel",context:["server"],syncedAttrs:{videoQuality:{type:i.default.integer,save:!0},videoResolution:{type:i.default.string,
save:!0},maxVideoBitrate:{type:i.default.integer,save:!0},audioBoost:{type:i.default.integer,save:!0},subtitleSize:{type:i.default.integer,save:!0},musicBitrate:{type:i.default.integer,save:!0},photoQuality:{type:i.default.integer,save:!0},photoResolution:{type:i.default.string,save:!0}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1296),o=r(s),l=i.default.extend({name:"VersionGeneratorMetadataCollection",
context:["server","generator"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(49),l=r(o),u=n(26),d=a(u),c=n(195),f=r(c),p=n(20),h=r(p),v=n(62),g=r(v),m=n(22),y=r(m),b=n(1294),P=r(b),w=y.default.extend({mixins:[f.default],name:"VersionGeneratorMetadataListModel",context:["server","generator"],collectionName:"metadataItems",url:function S(){var S=d.join([s.default.result(this.generator,"url"),"items"]);
return this.getPaginatedUrl(S)},sessionAttrs:{currentPageStart:h.default.integer,currentPageSize:h.default.integer,populatedRange:h.default.object},syncedAttrs:{totalSize:h.default.integer,identifier:h.default.string,mediaTagPrefix:h.default.string,mediaTagVersion:h.default.string,viewGroup:h.default.string,title:h.default.string},syncedRelations:{metadataItems:{relationClass:P.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===g.default.xml?l.default.replaceMetadataXMLElementNames(e):e}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(20),o=r(s),l=n(22),u=r(l),d=n(57),c=r(d),f=u.default.extend({name:"VersionGeneratorMetadataModel",context:["server","generator"],idAttribute:"ratingKey",
syncedAttrs:i.default.extend({},c.default.prototype.syncedAttrs,{processingState:o.default.string,processingStateContext:o.default.string})});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"VersionGeneratorPolicyModel",context:["server"],syncedAttrs:{scope:{type:i.default.string,save:!0},value:{type:i.default.integer,save:!0},unwatched:{type:i.default.boolean,
save:!0}},defaults:{unwatched:!1}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"VersionGeneratorStatusModel",context:["server"],syncedAttrs:{state:i.default.string,failureCode:i.default.string,failure:i.default.string,itemsCount:i.default.integer,itemsCompleteCount:i.default.integer,itemsSuccessfulCount:i.default.integer,itemsFailedCount:i.default.integer,
itemsDisabledCount:i.default.integer,totalSize:i.default.integer}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(161),i=r(a),s=n(83),o=r(s),l=n(1300),u=r(l),d=o.default.extend({model:u.default,url:"/library/tags?type="+i.default.LOCAL,comparator:function(e){return e.get("MediaSettings").maxVideoBitrate},parse:function(e){return this.convert(e,"Tag")}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(46),o=r(s),l=n(59),u=r(l),d=u.default.extend({name:"VersionTargetModel",whitelistedAttrs:["id","tag","tagType","MediaSettings","Device"],convert:function(e){var t=i.default.isObject(e)?e:o.default.parseXML(e);return o.default.parseInteger(t,"id"),t},parse:function(e,t){var n=this.convert(e);return n=i.default.pick(n,this.whitelistedAttrs)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1302),o=r(s),l=i.default.extend({name:"LockedFieldCollection",context:["server","section"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"LockedFieldModel",context:["server","section"],idAttribute:"name",syncedAttrs:{name:{type:i.default.string,save:!0},locked:{type:i.default.boolean,
save:!0}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"MetadataAutocompleteResultModel",context:["server","section","multiMetadataItem","query"],idAttribute:"ratingKey",rootPropertyName:"Metadata",syncedAttrs:{elementName:i.default.string,ratingKey:i.default.string,parentRatingKey:i.default.string,grandparentRatingKey:i.default.string,type:i.default.string,
title:i.default.string,parentTitle:i.default.string,grandparentTitle:i.default.string,tag:i.default.string,tagType:i.default.integer}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(38).default,a=n(224).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=i(o),u=n(162),d=i(u),c=n(26),f=s(c),p=n(37),h=i(p),v=n(20),g=i(v),m=n(22),y=i(m),b=n(1001),P=i(b),w=n(297),S=i(w),_=n(1301),T=i(_),I={album:{title:"title",parentRatingKey:"artist.id",
parentTitle:"artist.title"},track:{parentRatingKey:"album.id",parentTitle:"album.title",grandparentRatingKey:"artist.id",grandparentTitle:"artist.title"}},M=y.default.extend({name:"MultiMetadataModel",context:["server","section"],rootPropertyName:"Common",isNew:function(){return!1},url:function(){return f.join([this.sectionUrl(),"common"],this.getUrlParams())},saveUrl:function(){return f.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:g.default.array.isRequired,originalSaveParams:g.default.object,poster:g.default.string,banner:g.default.string,art:g.default.string},syncedAttrs:{mixedFields:g.default.list.isRequired,key:{type:g.default.string,save:!0},ratingKey:{type:g.default.string,save:!0},parentRatingKey:{type:g.default.string,save:!0},grandparentRatingKey:{type:g.default.string,save:!0},
title:{type:g.default.string,save:!0},titleSort:{type:g.default.string,save:!0},originalTitle:{type:g.default.string,save:!0},parentTitle:{type:g.default.string,save:!0},grandparentTitle:{type:g.default.string,save:!0},year:{type:g.default.string,save:!0},tagline:{type:g.default.string,save:!0},summary:{type:g.default.string,save:!0},studio:{type:g.default.string,save:!0},contentRating:{type:g.default.string,save:!0},originallyAvailableAt:{type:g.default.string,save:!0},rating:{type:g.default.float,
save:!0},userRating:{type:g.default.float,save:!0},index:{type:g.default.integer,save:!0},parentIndex:{type:g.default.integer,save:!0}},sessionRelations:{preferences:{relationClass:S.default}},syncedRelations:{collections:{relationClass:P.default,rootPropertyName:"Collection",save:!0},directors:{relationClass:P.default,rootPropertyName:"Director",save:!0},producers:{relationClass:P.default,rootPropertyName:"Producer",save:!0},writers:{relationClass:P.default,rootPropertyName:"Writer",save:!0},genres:{
relationClass:P.default,rootPropertyName:"Genre",save:!0},moods:{relationClass:P.default,rootPropertyName:"Mood",save:!0},countries:{relationClass:P.default,rootPropertyName:"Country",save:!0},labels:{relationClass:P.default,rootPropertyName:"Label",save:!0},similar:{relationClass:P.default,rootPropertyName:"Similar",save:!0},roles:{relationClass:P.default,rootPropertyName:"Role",save:!0},lockedFields:{relationClass:T.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 d.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=h.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 r={};if(l.default.each(t,function(t,a){var i=n[a];l.default.isEqual(t,i)||l.default.extend(r,e.getSaveParam(a,t,i))}),r.isReparenting){delete r.isReparenting;var a=I[this.get("type")];l.default.each(a,function(t,n){var a=t+".value",i=e.getQueryAttrSibling(t),s=i+".value",o=l.default.has(r,a),u=l.default.has(r,s);
if(o&&u&&a!==s&&delete r[s],!o&&!u){var d=e.get(n);d&&(r[a]=d)}})}return r},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 a=I[this.get("type")];{if(!a||!l.default.has(a,e))return r({},e+".value",t);var i=a[e];if(t)return r({isReparenting:!0},i+".value",t)}},getFieldSaveParams:function(e,t,n){var r=t.reduce(function(e,t){return e[t.name+".locked"]=t.locked,e},{});return r},getTagSaveParams:function(e,t,n){
var r=l.default.map(t,function(e){return e.tag}),i=l.default.map(n,function(e){return e.tag}),s=l.default.without.apply(l.default,[i].concat(a(r))),o=e.toLowerCase(),u={};return r.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=I[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=M,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(49),i=r(a),s=n(62),o=r(s),l=n(28),u=r(l),d=n(670),c=r(d),f=u.default.extend({name:"SyncMetadataCollection",context:["server","device","syncItemId"],model:c.default,url:function(){return"/sync/items/"+this.syncItemId},augmentResponseText:function(e,t){return t===o.default.xml?i.default.replaceMetadataXMLElementNames(e):e}});t.default=f,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1307),o=r(s),l=i.default.extend({name:"MediaGrabberDeviceChannelCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),i=r(a),s=n(20),o=r(s),l=i.default.extend({name:"MediaGrabberDeviceChannelModel",rootPropertyName:"DeviceChannel",idAttribute:"identifier",syncedAttrs:{
identifier:o.default.string,name:o.default.string,drm:o.default.boolean,hd:o.default.boolean}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(674),o=r(s),l=i.default.extend({name:"EPGCountryCollection",context:["server"],model:o.default,url:"/livetv/epg/countries"});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var a=n(28),i=r(a),s=n(675),o=r(s),l=i.default.extend({name:"EPGCountryRegionCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(432),o=r(s),l=i.default.extend({name:"EPGCountryRegionCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(22),i=r(a),s=n(20),o=r(s),l=n(1310),u=r(l),d=i.default.extend({name:"EPGLineupGroupModel",context:["server"],idAttribute:"uuid",syncedAttrs:{uuid:o.default.string},syncedRelations:{lineups:{relationClass:u.default,rootPropertyName:"Lineup"}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),i=r(a),s=n(20),o=r(s),l=n(1308),u=r(l),d=n(674),c=r(d),f=n(1315),p=r(f),h=n(433),v=r(h),g=n(1311),m=r(g),y=n(432),b=r(y),P=n(1309),w=r(P),S=n(675),_=r(S),T=i.default.extend({
name:"EPGSettingsModel",context:["server"],sessionAttrs:{baseUrl:o.default.string,postalCode:o.default.string,isFetching:o.default.boolean,isPopulated:o.default.boolean},sessionRelations:{countries:{relationClass:u.default},languages:{relationClass:p.default},regions:{relationClass:w.default},lineupGroup:{relationClass:m.default},selectedCountry:{relationClass:c.default,deferred:!0},selectedLanguage:{relationClass:v.default,deferred:!0},selectedRegion:{relationClass:_.default,deferred:!0},selectedLineup:{
relationClass:b.default,deferred:!0}},defaults:{baseUrl:"/livetv/epg/countries",isFetching:!1,isPopulated:!1,postalCode:""}});t.default=T,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1314),o=r(s),l=i.default.extend({name:"EPGChannelCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var a=n(22),i=r(a),s=n(20),o=r(s),l=i.default.extend({name:"EPGChannelModel",context:["server"],rootPropertyName:"Channel",idAttribute:"identifier",syncedAttrs:{identifier:o.default.string,callSign:o.default.string,thumb:o.default.string,title:o.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(433),o=r(s),l=i.default.extend({name:"EPGLanguageCollection",context:["server"],model:o.default,
url:"/livetv/epg/languages"});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),i=r(a),s=n(20),o=r(s),l=i.default.extend({name:"ChannelMappingModel",context:["server"],rootPropertyName:"ChannelMapping",idAttribute:"deviceIdentifier",syncedAttrs:{deviceIdentifier:o.default.string,lineupIdentifier:o.default.string,enabled:o.default.boolean},defaults:{enabled:!1}});t.default=l,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1318),o=r(s),l=i.default.extend({name:"SearchHubCollection",context:["server","provider"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(1319),u=r(l),d=o.default.extend({name:"SearchHubModel",context:["server","provider"],idAttribute:"hubIdentifier",syncedAttrs:{
hubIdentifier:i.default.string,size:i.default.integer,type:i.default.string,title:i.default.string},syncedRelations:{results:{relationClass:u.default,rootPropertyName:"Metadata"}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1320),o=r(s),l=i.default.extend({name:"SearchResultCollection",context:["server","provider"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";
var r=n(11).default,a=n(38).default,i=n(19).default,s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(20),u=s(l),d=n(211),c=o(d),f=n(66),p=s(f),h=n(22),v=s(h),g=n(569),m=s(g),y=n(57),b=s(y),P=v.default.extend({name:"SearchResultModel",context:["server","provider"],entityType:c.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:m.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=i(e,["key","reason","reasonTitle","reasonID"]),u=l.tag?"tagItem":"metadataItem";return a({key:t,reason:n,reasonTitle:s,reasonID:o},u,r({key:t},l))}});t.default=P,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1322),o=r(s),l=i.default.extend({name:"MultiSelectItemCollection",model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"MultiSelectItemModel",sessionAttrs:{id:i.default.any.isRequired,type:i.default.string.isRequired},sessionRelations:{model:{
relationClass:o.default,deferred:!0}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(20),o=r(s),l=n(22),u=r(l),d=n(1321),c=r(d),f=u.default.extend({name:"MultiSelectModel",sessionAttrs:{activeSelectionRange:o.default.object},sessionRelations:{activeSelectionItems:{relationClass:c.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"),r=t.previousModels;i.default.each(r,function(t){e.contains(t)||n.remove(t.id)})},onCollectionRemove:function(e){
var t=this.get("activeSelectionItems");t.remove(e.id)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(62),o=r(s),l=n(168),u=r(l),d=i.default.extend({name:"ActivityCollection",responseType:o.default.json,context:["server"],model:u.default,url:"/activities"});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(62),o=r(s),l=n(22),u=r(l),d=u.default.extend({
name:"AgentAttributionModel",context:["server"],responseType:o.default.text,syncedAttrs:{content:i.default.string},url:function(){return"/system/agents/attribution?identifier="+this.parent.id},augmentResponse:function(e){return{content:e}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(1325),u=r(l),d=n(1328),c=r(d),f=o.default.extend({name:"AgentModel",context:["server"],idAttribute:"identifier",
rootPropertyName:"Agent",sessionAttrs:{isPrimary:i.default.boolean,selected:i.default.boolean},sessionRelations:{attribution:{relationClass:u.default}},syncedAttrs:{identifier:i.default.string,name:i.default.string,enabled:i.default.boolean,hasPrefs:i.default.boolean,order:i.default.string},syncedRelations:{languages:{relationClass:c.default,rootPropertyName:"Language"}}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var a=n(3),i=r(a),s=n(289),o=r(s),l=o.default.extend({constructor:function(e,t,n,r){this.exclusiveScanners=t,this.scannerName=n,o.default.call(this,e,r),this.filterBy(i.default.bind(this.filterExclusiveScanner,this))},filterExclusiveScanner:function(e){var t=e.get("name"),n=this.exclusiveScanners;if(!n)return!0;var r=this.scannerName,a=n.indexOf(r)!==-1,i=n.indexOf(t)!==-1,s=a?t===r:!i;return s}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(28),i=r(a),s=n(1329),o=r(s),l=i.default.extend({name:"LanguageCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(630),i=r(a),s=n(20),o=r(s),l=n(22),u=r(l),d=u.default.extend({name:"LanguageModel",context:["server"],idAttribute:"code",rootPropertyName:"Language",syncedAttrs:{code:o.default.string},derivedAttrs:{name:function(){return(0,i.default)(this.get("code"));
}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(28),o=r(s),l=n(1331),u=r(l),d=o.default.extend({name:"ScannerCollection",context:["server","sectionTypeID"],model:u.default,url:function(){return"/system/scanners/"+this.sectionTypeID},hasExclusiveScanner:function(e){return!!i.default.intersection(this.pluck("name"),e).length}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"ScannerModel",context:["server"],rootPropertyName:"Scanner",syncedAttrs:{name:i.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1333),o=r(s),l=i.default.extend({name:"SectionOverviewCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"SectionOverviewModel",context:["server"],rootPropertyName:"Section",syncedAttrs:{id:i.default.integer,key:i.default.string,type:i.default.string,title:i.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(1013),u=r(l),d=n(381),c=r(d),f=n(1324),p=r(f),h=o.default.extend({
name:"ServerFlexModel",context:["server"],sessionAttrs:{isProvidersPending:i.default.boolean.isRequired,isProvidersPopulated:i.default.boolean.isRequired,providersError:i.default.object,isLibrariesPending:i.default.boolean.isRequired,isLibrariesPopulated:i.default.boolean.isRequired,librariesError:i.default.object},sessionRelations:{providers:{relationClass:u.default},libraries:{relationClass:c.default},activities:{relationClass:p.default}},defaults:{isProvidersPending:!0,isProvidersPopulated:!1,
providersError:null,isLibrariesPending:!0,isLibrariesPopulated:!1,librariesError:null}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1336),o=r(s),l=i.default.extend({name:"ServerOverviewCollection",context:["server"],model:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(1332),u=r(l),d=o.default.extend({
name:"ServerOverviewModel",context:["server"],idAttribute:"machineIdentifier",rootPropertyName:"Server",urlRoot:"/api/servers",syncedAttrs:{machineIdentifier:i.default.string,name:i.default.string,address:i.default.string,port:i.default.string,version:i.default.string,createdAt:i.default.integer,updatedAt:i.default.integer},syncedRelations:{sections:{relationClass:u.default,rootPropertyName:"Section"}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(20),i=r(a),s=n(554),o=r(s),l=n(30),u=o.default.extend({name:"ExperienceSettingsModel",storageKey:"experience",syncedAttrs:{columnAdjustment:i.default.integer,searchAllServers:i.default.boolean,relayReminders:i.default.object,calendarViewType:i.default.string},defaults:function(){return{columnAdjustment:0,searchAllServers:!1,relayReminders:{},calendarViewType:l.recordingScheduleViewTypes.CALENDAR}}});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(194),u=r(l),d=o.default.extend({name:"DashboardPageModel",sessionAttrs:{isPagePopulated:i.default.boolean.isRequired,isHubsPending:i.default.boolean.isRequired,isHubsPopulated:i.default.boolean.isRequired,hubsError:i.default.object},sessionRelations:{hubs:{relationClass:u.default,deferred:!0}},defaults:{isPagePopulated:!1,isHubsPending:!0,isHubsPopulated:!1,hubsError:null}});t.default=d,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),i=r(a),s=n(57),o=r(s),l=n(1338),u=r(l),d=n(1343),c=r(d),f=n(1340),p=r(f),h=n(1344),v=r(h),g=n(1341),m=r(g),y=n(1346),b=r(y),P=n(1342),w=r(P),S=n(1347),_=r(S),T=n(1345),I=r(T),M=i.default.extend({name:"DesktopUIModel",sessionRelations:{dashboardPage:{relationClass:u.default},metadataListPage:{relationClass:c.default},libraryPage:{relationClass:p.default},prePlayPage:{relationClass:v.default},metadataItem:{
relationClass:o.default,deferred:!0},liveTVSettingsPage:{relationClass:m.default},recordingSchedulePage:{relationClass:b.default},mediaSubscriptionModal:{relationClass:w.default},searchPage:{relationClass:_.default},quickSearch:{relationClass:I.default}}});t.default=M,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(85),u=r(l),d=n(565),c=r(d),f=n(380),p=r(f),h=n(296),v=r(h),g=o.default.extend({
name:"LibraryPageModel",sessionAttrs:{isPagePopulated:i.default.boolean.isRequired,isMetadataTypesPending:i.default.boolean.isRequired,isMetadataTypesPopulated:i.default.boolean.isRequired,metadataTypesError:i.default.object,isFirstCharactersPending:i.default.boolean.isRequired,isFirstCharactersPopulated:i.default.boolean.isRequired,firstCharactersError:i.default.object,selectedFilterKey:i.default.string,filterOptionQuery:i.default.string,isSelectedFilterOptionsPending:i.default.boolean.isRequired,
isSelectedFilterOptionsPopulated:i.default.boolean.isRequired,selectedFilterOptionsError:i.default.object},sessionRelations:{metadataList:{relationClass:u.default,deferred:!0},metadataTypes:{relationClass:c.default,deferred:!0},firstCharacters:{relationClass:p.default,deferred:!0},selectedFilterOptions:{relationClass:v.default,deferred:!0}},defaults:{isPagePopulated:!1,isMetadataTypesPending:!0,isMetadataTypesPopulated:!1,metadataTypesError:null,isFirstCharactersPending:!0,isFirstCharactersPopulated:!1,
firstCharactersError:null,selectedFilterKey:null,filterOptionQuery:"",isSelectedFilterOptionsPending:!0,isSelectedFilterOptionsPopulated:!1,selectedFilterOptionsError:null}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(672),u=r(l),d=n(207),c=r(d),f=o.default.extend({name:"LiveTVSettingsPageModel",sessionAttrs:{isDvrsPending:i.default.boolean,isDvrsPopulated:i.default.boolean,
dvrsError:i.default.object,isPagePopulated:i.default.boolean},sessionRelations:{dvrs:{relationClass:u.default,deferred:!0},dvrSetup:{relationClass:c.default,deferred:!0}},defaults:{isDvrsPending:!1,isDvrsPopulated:!1,dvrsError:null,isPagePopulated:!1}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(582),u=r(l),d=n(298),c=r(d),f=o.default.extend({name:"MediaSubscriptionModalModel",
sessionAttrs:{isMediaSubscriptionPending:i.default.boolean,isMediaSubscriptionPopulated:i.default.boolean,mediaSubscriptionError:i.default.object,isMediaSubscriptionSaving:i.default.boolean,mediaSubscriptionSaveError:i.default.object,isMediaSubscriptionMoving:i.default.boolean,mediaSubscriptionMoveError:i.default.object,isMediaSubscriptionDeleting:i.default.boolean,mediaSubscriptionDeleteError:i.default.object},sessionRelations:{templates:{relationClass:u.default,deferred:!0},mediaSubscription:{relationClass:c.default,
deferred:!0}},defaults:{isMediaSubscriptionPending:!0,isMediaSubscriptionPopulated:!1,mediaSubscriptionError:null,isMediaSubscriptionSaving:!1,mediaSubscriptionSaveError:null,isMediaSubscriptionMoving:!1,mediaSubscriptionMoveError:null,isMediaSubscriptionDeleting:!1,mediaSubscriptionDeleteError:null}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(85),u=r(l),d=o.default.extend({
name:"MetadataListPageModel",sessionAttrs:{isPagePopulated:i.default.boolean.isRequired},sessionRelations:{metadataList:{relationClass:u.default,deferred:!0}},defaults:{isPagePopulated:!1}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(57),u=r(l),d=n(85),c=r(d),f=n(194),p=r(f),h=o.default.extend({name:"PrePlayPageModel",sessionAttrs:{isPagePopulated:i.default.boolean.isRequired,
isMetadataItemPending:i.default.boolean.isRequired,isMetadataItemPopulated:i.default.boolean.isRequired,metadataItemError:i.default.object,isRelatedHubsPending:i.default.boolean.isRequired,isRelatedHubsPopulated:i.default.boolean.isRequired,relatedHubsError:i.default.object},sessionRelations:{metadataItem:{relationClass:u.default,deferred:!0},descendantList:{relationClass:c.default,deferred:!0},relatedHubs:{relationClass:p.default,deferred:!0}},defaults:{isPagePopulated:!1,isMetadataItemPending:!0,
isMetadataItemPopulated:!1,metadataItemError:null,isRelatedHubsPending:!0,isRelatedHubsPopulated:!1,relatedHubsError:null}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(677),u=r(l),d=o.default.extend({name:"QuickSearchModel",sessionAttrs:{query:i.default.string,providerIdentifier:i.default.string,sectionID:i.default.string,selectedResultEntityID:i.default.string,channelPlaceholder:i.default.string,
channelID:i.default.string,channelSearchKey:i.default.string},sessionRelations:{searches:{relationClass:u.default}},defaults:{query:"",selectedResultEntityID:null}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(581),u=r(l),d=n(679),c=r(d),f=o.default.extend({name:"RecordingSchedulePageModel",sessionAttrs:{isPagePopulated:i.default.boolean,isMediaSubscriptionsPending:i.default.boolean,
isMediaSubscriptionsPopulated:i.default.boolean,mediaSubscriptionsError:i.default.object,isCalendarPending:i.default.boolean,isCalendarPopulated:i.default.boolean,calendarError:i.default.object},sessionRelations:{mediaSubscriptions:{relationClass:u.default,deferred:!0},calendar:{relationClass:c.default,deferred:!0}},defaults:{isPagePopulated:!1,isMediaSubscriptionsPending:!1,isMediaSubscriptionsPopulated:!1,mediaSubscriptionsError:null,isCalendarPending:!1,isCalendarPopulated:!1,calendarError:null
}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(22),i=r(a),s=n(677),o=r(s),l=i.default.extend({name:"SearchPageModel",sessionRelations:{searches:{relationClass:o.default}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(28),i=r(a),s=n(1349),o=r(s),l=i.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=o.default.extend({name:"SubscriptionPlanModel",context:["server"],rootPropertyName:"plan",syncedAttrs:{id:i.default.string,name:i.default.string,price:i.default.float,formattedPrice:i.default.string,currency:i.default.string}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(20),i=r(a),s=n(22),o=r(s),l=n(587),u=r(l),d=n(1348),c=r(d),f=o.default.extend({name:"UserFlexModel",context:["server"],sessionAttrs:{isPlansPending:i.default.boolean.isRequired,isPlansPopulated:i.default.boolean.isRequired,plansError:i.default.object,isDeletingAvatar:i.default.boolean.isRequired,isUpdatingUser:i.default.boolean.isRequired,updateUserError:i.default.object,isUnwatchedWatchLaterListPending:i.default.boolean.isRequired,
isUnwatchedWatchLaterListPopulated:i.default.boolean.isRequired,unwatchedWatchLaterListError:i.default.object,isUnwatchedRecommendedListPending:i.default.boolean.isRequired,isUnwatchedRecommendedListPopulated:i.default.boolean.isRequired,unwatchedRecommendedListError:i.default.object},sessionRelations:{plans:{relationClass:c.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=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=u.default.Region.extend({resizeSubscribersCallbacks:[],scrollSubscribersCallbacks:[],sidebarDelay:200,scrollDelay:100,initialize:function(e){i.default.bindAll(this,"onResize","onScroll","onScrollEvent","onSidebarChange"),this.$el=(0,o.default)(this.el),this.channelName=e.channelName;var t={};t[this.channelName+".subscribe:resize"]=this.onResizeSubscribe,t[this.channelName+".unsubscribe:resize"]=this.onResizeUnsubscribe,
t[this.channelName+".subscribe:scroll"]=this.onScrollSubscribe,t[this.channelName+".unsubscribe:scroll"]=this.onScrollUnsubscribe,this.listenTo(c.default,t)},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(c.default,{resize:this.onResize,"show:bar hide:bar":this.onSidebarChange})),e(this.size)},onResizeUnsubscribe:function(e){this.resizeSubscribersCallbacks.splice(i.default.indexOf(this.resizeSubscribersCallbacks,e),1),0===this.resizeSubscribersCallbacks.length&&this.stopListening(c.default,"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(e){this.scrollSubscribersCallbacks.splice(i.default.indexOf(this.scrollSubscribersCallbacks,e),1),0===this.scrollSubscribersCallbacks.length&&this.$el.off("scroll",this.onScroll)},onResize:function(){this.updateSize(),i.default.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(),i.default.each(this.scrollSubscribersCallbacks,function(e){e(this.scrollPosition)},this)},onSidebarChange:function(e){"sidebar"===e&&i.default.delay(this.onResize,this.sidebarDelay)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(14),d=a(u),c=n(5),f=r(c),p=n(12),h=r(p),v=n(116),g=r(v),m=n(668),y=r(m),b=n(253),P=r(b),w=n(430),S=r(w),_=n(1420),T=r(_),I=n(172),M=r(I),C=g.default.extend({activity:function(){var e=this.populateView({primaryServer:!0});e.done(s.default.bind(function(e){var t=e.server;t.get("shared")?this.sync(t.id):h.default.trigger("show:view",new T.default({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;h.default.trigger("show:view",new T.default({model:t,collection:t.get("alerts"),subset:"alerts"}))})},sync:function(e,t){var n=this.populateView({serverID:"myPlex"});n=n.then(s.default.bind(function(t){var n;return n=e?{serverID:e}:{primaryServer:!0},this.populateView(n)},this)),n.done(function(e){var n=d.resolve("appModel"),r=n.get("user"),a=r.get("devices"),i=a.populate();i.done(function(){var n=a.filterSyncDevices(),r=t?n.get(t):null;
h.default.trigger("show:view",new T.default({model:e.server,collection:n,selectedDevice:r,subset:"sync"}))}),i.fail(function(){h.default.trigger("show:view",new M.default({title:(0,f.default)("Sync status is unavailable.")}))})})},conversion:function(e){var t;t=e?{serverID:e}:{primaryServer:!0};var n=this.populateView(t);n.done(function(e){var t,n,r=e.server,a=new y.default([],{server:r,allowInCache:!0}),i=new P.default([],{server:r,allowInCache:!0}),s=new S.default([],{server:r,allowInCache:!0}),o=l.default.when(a.populate(),i.fetch(),r.get("settings").fetch(),s.populate()).then(function(){
t=a.first();var e=s.first();return t&&e?(n=e.get("children"),l.default.when(t.fetch(),n.fetch())):l.default.Deferred().reject().promise()});o.done(function(){h.default.trigger("show:view",new T.default({model:r,playQueue:t,transcodeJobs:i,generators:n,subset:"conversion"}))}),o.fail(function(){h.default.trigger("show:view",new M.default({title:(0,f.default)("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;h.default.trigger("show:view",new T.default({model:t,collection:t.get("sessions"),subset:"nowPlaying"}))})}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(117),i=r(a),s=n(1352),o=r(s),l=i.default.extend({controller:new o.default,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"}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),i=r(a),s=n(12),o=r(s),l=n(116),u=r(l),d=n(557),c=r(d),f=n(1436),p=r(f),h=n(1437),v=r(h),g=n(1435),m=r(g),y=n(327),b=r(y),P=n(172),w=r(P),S=u.default.extend({
channel:function(e,t,n){var r=this.populateView({serverID:e,channelID:t,channelKey:n});r.done(function(e){var t=e.channelItem?e.channelItem:e.channel;o.default.trigger("show:view",new p.default({model:t,listModel:t.get("metadataList")}))})},channelDetails:function(e,t,n){var r=this.populateView({serverID:e,channelID:t,channelKey:n});r.done(function(e){var t=e.channelItem.get("metadataList").getCollection(),n=t.first();o.default.trigger("show:view",new b.default({model:n}))})},channels:function(e){
var t=this.populateView({serverID:e});t.done(function(e){var t=new c.default({subset:"all"},{server:e.server}),n=t.get("channels");n.comparator=n.sortByTitle;var r=t.fetch({scope:"page"});r.done(function(){o.default.trigger("show:view",new v.default({collection:n}))}),r.fail(function(){o.default.trigger("show:view",new w.default({title:(0,i.default)("Your channels are unavailable.")}))})})},directory:function(e,t,n){var r=this.populateView({serverID:e});r.done(function(e){if(e.server.get("shared"))return void o.default.trigger("show:view",new w.default({
title:(0,i.default)("The channel directory is restricted from shared users.")}));var r=new c.default({key:"/system/appstore"},{server:e.server}),a=r.fetch({scope:"page"});a.done(function(){o.default.trigger("show:view",new m.default({collection:r.get("channels"),currentKey:t,currentPath:n}))}),a.fail(function(){o.default.trigger("show:view",new w.default({title:(0,i.default)("The channel directory is unavailable.")}))})})}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(117),i=r(a),s=n(1354),o=r(s),l=i.default.extend({controller:new o.default,appRoutes:{"!/server/:serverID/channel/:channelID(/:key)":"channel","!/server/:serverID/channel/:channelID/details/:key":"channelDetails","!/server/:serverID/channels":"channels","!/server/:serverID/directory(/:key)(/:path)":"directory"}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(12),s=r(i),o=n(26),l=a(o),u=n(14),d=a(u),c=n(27),f=r(c),p=n(1062),h=r(p),v=n(1409),g=r(v),m=n(1440),y=r(m),b=n(1439),P=r(b),w=n(1438),S=r(w),_=n(689),T=r(_),I=n(1413),M=r(I),C=n(1412),x=r(C),E=n(1478),k=r(E),D=n(172),A=r(D),O=n(1479),R=r(O),L=n(1480),N=r(L),j=n(1481),U=r(j),$=n(1482),z=r($),F=h.default.extend({viewsByType:{signIn:T.default,error:A.default,channelError:k.default,notFound:R.default,serverRequired:N.default,unauthorized:U.default,unavailable:z.default},initialize:function(){
h.default.prototype.initialize.apply(this,arguments),this.listenTo(s.default,"initialize:app",this.onAppInitialize)},dashboard:function(e,t){this.populateView().done(function(){s.default.trigger("show:view",new y.default({selectedServerID:e,params:l.parseParams(t)}))})},list:function(e,t,n){var r=l.parseParams(n);this.populateView().done(function(){s.default.trigger("show:view",new P.default({selectedServerID:e,selectedProviderID:t,params:r}))})},needsUpdate:function(e){this.populateView().done(function(){
var e=d.resolve("appModel");e.get("servers").findWhere({isOutOfDate:!0})?s.default.trigger("show:view",new S.default):s.default.trigger("navigate","dashboard",{replace:!0})})},logout:function(){var e=this.viewFor;f.default.execute("signOut").done(function(){s.default.trigger("navigate","login",{silent:!0})}).fail(function(){s.default.trigger("show:view",e("logoutError"))})},logs:function(){s.default.trigger("show:view",new M.default({collection:d.resolve("logs")}))},info:function(){s.default.trigger("show:view",new x.default);
},onAppInitialize:function(){this.appView=new g.default,this.appView.render()}});t.default=F,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(47),i=r(a),s=n(12),o=r(s),l=n(1063),u=r(l),d=n(1356),c=r(d),f=u.default.extend({controller:new c.default,appRoutes:{"!/dashboard":"dashboard","!(/server/:serverID)/dashboard":"dashboard","!(/server/:serverID)(/provider/:providerID)/list":"list","!/needsUpdate":"needsUpdate","":"dashboard",
"!/login":"login","!/unauthorized":"unauthorized","!/logs":"logs","!/info":"info","*404":"error"},onNavigateRefreshDashboard:function(){var e=i.default.history.getFragment();""===e||"!/dashboard"===e?i.default.history.loadUrl(""):o.default.trigger("navigate","dashboard")}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),s=r(i),o=n(26),l=a(o),u=n(116),d=r(u),c=n(1414),f=r(c),p=n(1638),h=r(p),v=n(327),g=r(v),m=n(1635),y=r(m),b=n(1634),P=r(b),w=d.default.extend({
search:function(e,t){var n=this.populateView();n.done(function(){s.default.trigger("show:view",new f.default({selectedServerID:e,query:t}))})},section:function(e,t,n){var r=this.populateView({serverID:e,sectionID:t});r.done(function(e){s.default.trigger("show:view",new h.default({model:e.section,subset:n}))})},sectionFolder:function(e,t,n){var r=this.populateView({serverID:e,sectionID:t});r.done(function(e){var t=e.section.get("items");t.scrollPosition=0,s.default.trigger("show:view",new h.default({
model:e.section,subset:"folder",folderKey:n}))})},sectionFilter:function(e,t,n,r,a,i){var o=this.populateView({serverID:e,sectionID:t});o.done(function(e){var t=e.section.get("currentFilters");t.length=0,i||(i=a),t.push({key:r,values:a.split(","),titles:i.split(",")}),s.default.trigger("show:view",new h.default({model:e.section,type:parseInt(n,10)}))})},sectionType:function(e,t,n,r,a){var i=this.populateView({serverID:e,sectionID:t});i.done(function(e){s.default.trigger("show:view",new h.default({
model:e.section,type:n,sortKey:r,sortDirection:a}))})},details:function(e,t){var n=this.populateView({serverID:e,key:t,populateData:{includeRelatedCount:"5",includePopularLeaves:"1",includeConcerts:"1",includePreferences:"1"}});n.done(function(e){s.default.trigger("show:view",new g.default({model:e.item}))})},provider:function(e,t,n){this.populateView().done(function(){s.default.trigger("show:view",new y.default({selectedServerID:e,selectedProviderID:t,params:l.parseParams(n)}))})},prePlay:function(e,t,n){
this.populateView().done(function(){s.default.trigger("show:view",new P.default({selectedServerID:e,selectedProviderID:t,params:l.parseParams(n)}))})}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(117),i=r(a),s=n(1358),o=r(s),l=i.default.extend({controller:new o.default,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","!/server/:serverID/provider/:providerID":"provider","!/server/:serverID/provider/:providerID/details":"prePlay"}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),i=r(a),s=n(5),o=r(s),l=n(12),u=r(l),d=n(116),c=r(d),f=n(385),p=r(f),h=n(172),v=r(h),g=n(1633),m=r(g),y=n(327),b=r(y),P=c.default.extend({
playlists:function(e){var t=this.populateView({serverID:e});t.done(function(e){var t=e.server.get("playlists"),n=e.server.get("sections").populate({scope:"page"}),r=t.get("items").fetch({scope:"page"}),a=t.get("sorts").populate().then(function(e){var n=e.get("titleSort");n&&(t.set("currentSort",n),n.set("selected",!0))}),s=i.default.when(n,r,a);s.done(function(){u.default.trigger("show:view",new m.default({model:t}))}),s.fail(function(){u.default.trigger("show:view",new v.default({title:(0,o.default)("Playlists are unavailable for this server.")
}))})})},playlist:function(e,t){var n=this.populateView({serverID:e});n.done(function(e){var n=e.server.get("sections").populate({scope:"page"}),r=new p.default({ratingKey:t},{server:e.server}),a=r.fetch({scope:"page"});a.fail(function(){u.default.trigger("show:view",new v.default({title:(0,o.default)("Playlist not found.")}))}),i.default.when(n,a).done(function(){u.default.trigger("show:view",new b.default({model:r}))})})}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(117),i=r(a),s=n(1360),o=r(s),l=i.default.extend({controller:new o.default,appRoutes:{"!/server/:serverID/playlists":"playlists","!/server/:serverID/playlist/:key":"playlist"}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),s=r(i),o=n(26),l=a(o),u=n(116),d=r(u),c=n(1636),f=r(c),p=d.default.extend({schedule:function(e,t){this.populateView().done(function(){
s.default.trigger("show:view",new f.default({selectedServerID:e,params:l.parseParams(t)}))})}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(117),i=r(a),s=n(1362),o=r(s),l=i.default.extend({controller:new o.default,appRoutes:{"!(/server/:serverID)/schedule":"schedule"}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0
});var i=n(8),s=r(i),o=n(14),l=a(o),u=n(5),d=r(u),c=n(12),f=r(c),p=n(40),h=r(p),v=n(116),g=r(v),m=n(1021),y=r(m),b=n(134),P=r(b),w=n(1643),S=r(w),_=n(172),T=r(_),I=g.default.extend({settings:function(){return this.webSettings()},webSettings:function(){var e=this.populateView();e.done(function(){function e(){f.default.trigger("show:view",new S.default({model:h.default.getInstance(),subset:"web"}))}var t=l.resolve("appModel"),n=t.get("user"),r=n.get("homeUsers"),a=n.server.populate();a.done(function(){
n.get("signedIn")?r.populate().always(e):e()}),a.fail(e)})},serverSettings:function(e,t){var n;n=e?{serverID:e}:{primaryServer:!0};var r=this.populateView(n);r.done(function(e){var n=e.server;if(n.get("shared"))return void f.default.trigger("show:view",new T.default({title:(0,d.default)("Server settings are restricted from shared users.")}));var r=n.get("settings"),a=new y.default({key:"/accounts/1"},{server:n}),i=n.get("cloudAccount"),o=new P.default([],{server:n,url:"/system/:/prefs"}),l=s.default.when(r.fetch(),a.fetch({
scope:"page"}),i.fetch({scope:"page"}),o.fetch({scope:"page"}));l.done(function(){f.default.trigger("show:view",new S.default({model:n,collection:n.get("settings"),account:a,cloudAccount:i,channelSettings:o,subset:"server",group:t}))}),l.fail(function(){f.default.trigger("show:view",new T.default({title:(0,d.default)("Server settings are unavailable.")}))})})},users:function(e){var t=this.populateView({serverID:"myPlex"});t.done(function(t){var n=l.resolve("appModel"),r=n.get("user"),a=r.get("homeUsers"),i=r.get("friends"),o=r.get("invites"),u=r.get("sentInvites"),c=r.get("homeDetails"),p=s.default.Deferred(),h=c.fetch();
h.done(function(){p.resolve()}),h.fail(function(e,t){404===t.status?p.resolve():p.reject()});var v=s.default.when(r.fetch({scope:"page"}),a.fetch({scope:"page"}),i.fetch({scope:"page"}),o.fetch({scope:"page"}),u.fetch({scope:"page"}),p.promise());v.done(function(){var t=!1;"pin"===e?(e="home",t=!0):e||(e=o.length&&!o.findWhere({home:!0})?"friends":"home"),f.default.trigger("show:view",new S.default({model:n.get("user"),subset:"users",usersSubset:e,promptPIN:t}))}),v.fail(function(){var t;t="friends"===e?(0,
d.default)("Your friends are unavailable."):(0,d.default)("Your home is unavailable."),f.default.trigger("show:view",new T.default({title:t}))})})},devices:function(){var e=this.populateView({serverID:"myPlex"});e.done(function(e){var t=l.resolve("appModel"),n=t.get("user"),r=n.get("devices"),a=r.fetch({scope:"page"});a.done(function(){f.default.trigger("show:view",new S.default({model:n,collection:r,subset:"devices"}))}),a.fail(function(){f.default.trigger("show:view",new T.default({title:(0,d.default)("Your devices are unavailable.")
}))})})}});t.default=I,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(117),i=r(a),s=n(1364),o=r(s),l=i.default.extend({controller:new o.default,appRoutes:{"!/settings":"settings","!/settings/web":"webSettings","!/settings/server(/:serverID)(/:group)":"serverSettings","!/settings/users":"users","!/settings/users(/:subset)":"users","!/settings/devices":"devices"}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(12),i=r(a),s=n(116),o=r(s),l=n(1666),u=r(l),d=o.default.extend({setupBasic:function(e){var t;t=e?{serverID:e}:{primaryServer:!0};var n=this.populateView(t);n.done(function(e){i.default.trigger("show:view",new u.default({model:e.server,subset:"setupBasic"}))})},setupLibrary:function(){var e=this.populateView({primaryServer:!0});e.done(function(e){i.default.trigger("show:view",new u.default({model:e.server,subset:"setupLibrary"
}))})},setupChannels:function(){var e=this.populateView({primaryServer:!0});e.done(function(e){i.default.trigger("show:view",new u.default({model:e.server,subset:"setupChannels"}))})},setupComplete:function(){var e=this.populateView({primaryServer:!0});e.done(function(e){i.default.trigger("show:view",new u.default({model:e.server,subset:"setupComplete"}))})}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(117),i=r(a),s=n(1366),o=r(s),l=i.default.extend({
controller:new o.default,appRoutes:{"!/setup/library":"setupLibrary","!/setup/channels":"setupChannels","!/setup/complete":"setupComplete","!/setup(/:serverID)":"setupBasic"}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),s=r(i),o=n(14),l=a(o),u=n(5),d=r(u),c=n(12),f=r(c),p=n(50),h=a(p),v=n(116),g=r(v),m=n(1416),y=r(m),b=n(586),P=r(b),w=n(587),S=r(w),_=n(1671),T=r(_),I=n(1669),M=r(I),C=n(327),x=r(C),E=n(172),k=r(E),D=n(1670),A=r(D),O=g.default.extend({
account:function(){var e=s.default.Deferred(),t=e.promise();n.e(0,function(){e.resolve()}),t=t.then(function(){return this.populateView({serverID:"myPlex"})}.bind(this)),t.done(function(){h.scheduleImmediateUpdate(),f.default.trigger("show:view",new y.default)})},userPlaylist:function(e,t){var n=this.populateView({serverID:"myPlex"});n.done(function(n){var r=l.resolve("appModel"),a=r.get("user"),i=new S.default({key:e},{server:a.server,parent:a}),s=i.fetch({scope:"page"});s.done(function(){f.default.trigger("show:view",new T.default({
model:r.get("user"),listModel:i,subset:t}))}),s.fail(function(){f.default.trigger("show:view",new k.default({title:(0,d.default)("This playlist is unavailable.")}))})})},userPlaylistDetails:function(e,t){var n=this.populateView({serverID:"myPlex"});n.done(function(n){var r=l.resolve("appModel"),a=r.get("user"),i=new P.default({id:parseInt(t,10)},{server:n.server,parent:a,containerKey:e}),s=i.fetch({scope:"page"});s.done(function(){f.default.trigger("show:view",new x.default({model:i}))}),s.fail(function(){
f.default.trigger("show:view",new k.default({title:(0,d.default)("This playlist item is unavailable.")}))})})},queueHelp:function(){var e=this.populateView({serverID:"myPlex"});e.done(function(){var e=l.resolve("appModel"),t=e.get("user");f.default.trigger("show:view",new A.default({queueEmail:t.get("queueEmail")}))})},announcements:function(){var e=this.populateView();e.done(function(){var e=l.resolve("appModel"),t=e.get("user"),n=t.get("announcements"),r=n.fetch({scope:"page"});r.done(function(){
f.default.trigger("show:view",new M.default({collection:n}))}),r.fail(function(){f.default.trigger("show:view",new k.default({title:(0,d.default)("Announcements are not available.")}))})})}});t.default=O,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(117),i=r(a),s=n(1368),o=r(s),l=i.default.extend({controller:new o.default,appRoutes:{"!/account":"account","!/playlist/queue/help":"queueHelp","!/playlist/:key(/:subset)":"userPlaylist",
"!/playlist/:key/details/:itemID":"userPlaylistDetails","!/announcements":"announcements"}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(1371),i=r(a),s=n(1377),o=r(s),l=n(1392),u=r(l),d=n(1378),c=r(d),f=n(1373),p=r(f),h=n(1376),v=r(h),g=n(1375),m=r(g),y=n(1391),b=r(y),P=n(1379),w=r(P),S=n(1385),_=r(S),T=n(1382),I=r(T),M=n(1387),C=r(M),x=n(1383),E=r(x),k=n(1381),D=r(k),A=n(1372),O=r(A),R=n(1389),L=r(R),N=n(1384),j=r(N),U=n(1388),$=r(U),z=n(1390),F=r(z),B=[i.default,o.default,u.default,c.default,p.default,v.default,m.default,b.default,w.default,_.default,I.default,C.default,E.default,D.default,O.default,L.default,j.default,$.default,F.default];
t.default=B,e.exports=t.default},function(e,t,n){"use strict";var r=n(38).default,a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s,o=n(3),l=a(o),u=n(12),d=a(u),c=n(69),f=a(c),p=n(1135),h=a(p),v=n(1580),g=a(v),m=n(42),y=i(m),b=n(91),P=(0,f.default)((s={},r(s,y.SHOW_ALERT,function(e,t){d.default.trigger("show:alert",t)}),r(s,y.SAVE_SETTINGS,function(e,t){var n=t.name,r=t.settings;e.get(n).save(r)}),r(s,y.DOWNLOAD_SERVER,function(e,t){var n=new g.default({downloadType:t
});d.default.trigger("show:modal",n)}),r(s,y.DISCOVER_SERVERS,function(e){var t=e.get("cloudServer");t.get("isResolved")&&t.get("resources").fetch(),d.default.trigger("test:servers")}),r(s,y.RESET_PRIMARY_SERVER,function(e){e.set({primaryServer:null,isWaitingForPrimaryServer:!0})}),r(s,y.CHANGE_PRIMARY_SERVER,function(e,t,n){var r=e.get("servers");r.findServer(t).done(function(t){t.get("isOutOfDate")?n((0,b.redirectToRoute)({route:"needsUpdate",options:{replace:!0}})):t.get("isPrimaryEligible")?e.set({
primaryServer:t,isWaitingForPrimaryServer:!1}):n((0,b.redirectToRoute)({route:"dashboard"}))}).fail(function(){n((0,b.redirectToRoute)({route:"dashboard"}))})}),r(s,y.REDIRECT_TO_ROUTE,function(e,t){var n=t.route,r=t.options;l.default.defer(function(){d.default.trigger("navigate",n,r)})}),r(s,y.REDIRECT_TO_HTTP,function(e){var t=window.location.href.replace("https://","http://");window.location=t}),r(s,y.GARBAGE_COLLECT_ENTITIES,function(e){var t=(0,h.default)(e.getState()),n=e.get("entities");l.default.each(t,function(e,t){
n.get(t).remove(e)})}),s));t.default=P,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=t.serverEntityID;return(0,b.default)(e,m.SERVER,n)}function a(e){return e.get("ui").get("liveTVSettingsPage").get("dvrSetup")}function i(e,t){var n=a(e,t);return n.get("epgSettings")}function s(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],s=a(e,t),o=i(e,t),l=o.get(n);return l.abortPendingPopulate(),s.set("setupErrorMessage",null),o.set("isFetching",!0),l.fetch(r).done(function(){
o.set({isFetching:!1,isPopulated:!0})}).fail(function(){o.set({isFetching:!1,isPopulated:!1}),s.set("setupErrorMessage",(0,p.default)("Unable to fetch Program Guide settings"))})}var o=n(11).default,l=n(38).default,u=n(1).default,d=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var c,f=n(5),p=u(f),h=n(26),v=d(h),g=n(72),m=d(g),y=n(412),b=u(y),P=n(69),w=u(P),S=n(680),_=n(42),T=d(_),I=(0,w.default)((c={},l(c,T.RESET_EPG_SETTINGS,function(e,t){var n=i(e,t);n.restoreDefaults()}),l(c,T.FETCH_EPG_COUNTRIES,function(e,t,n){
var a=r(e,t);s(e,t,"countries").done(function(){var e=a.get("countryCode");e&&n((0,S.selectEPGCountry)(o({},t,{countryCode:e})))})}),l(c,T.FETCH_EPG_LANGUAGES,function(e,t,n){var r=i(e,t);s(e,t,"languages").done(function(){var e=r.get("selectedCountry");e&&n((0,S.selectEPGLanguage)(o({},t,{languageCode:e.get("language")})))})}),l(c,T.SELECT_EPG_COUNTRY,function(e,t,n){var r=i(e,t),a=r.get("countries").get(t.countryCode);if(r.set({selectedCountry:a,postalCode:""}),r.get("regions").reset(),r.get("lineupGroup").get("lineups").reset(),
a){var l=a.get("flavor"),u=v.join([r.get("baseUrl"),a.get("key")]);if(n((0,S.fetchEPGLanguages)(o({},t,{languageCode:a.get("language")}))),0===l)s(e,t,"regions",{url:u});else if(2===l){var d=a.get("example");r.set("postalCode",d),s(e,t,r.get("lineupGroup"),{url:v.join(u,{postalCode:d})})}}}),l(c,T.SELECT_EPG_LANGUAGE,function(e,t,n){var r=i(e,t),a=r.get("languages").get(t.languageCode);r.set("selectedLanguage",a)}),l(c,T.SELECT_EPG_REGION,function(e,t,n){var r=i(e,t),a=r.get("selectedCountry"),o=r.get("regions").get(t.regionKey);
if(r.set("selectedRegion",o),r.get("lineupGroup").get("lineups").reset(),o){var l=v.join([r.get("baseUrl"),a.get("key"),o.get("key")]);s(e,t,"lineupGroup",{url:l})}}),l(c,T.SET_EPG_POSTAL_CODE,function(e,t,n){var r=i(e,t),a=r.get("selectedCountry"),o=t.postalCode;if(r.set("postalCode",o),r.get("lineupGroup").get("lineups").reset(),o){var l=v.join([r.get("baseUrl"),a.get("key")],{postalCode:o});s(e,t,"lineupGroup",{url:l})}}),c));t.default=I,e.exports=t.default},function(e,t,n){"use strict";var r=n(38).default,a=n(1).default,i=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0});var s=n(12),o=a(s),l=n(92),u=n(69),d=a(u),c=n(174),f=a(c),p=n(42),h=i(p),v=(0,d.default)(r({},h.EDIT_LIBRARY,function(e,t){var n=(0,l.findLibraryModel)(e,t),r=new f.default({server:n.server,model:n});o.default.trigger("show:modal",r)}));t.default=v,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(64),s=r(i),o=n(42),l=a(o),u=(0,s.default)(l.EDIT_LIBRARY);t.editLibrary=u;
},function(e,t,n){"use strict";var r=n(11).default,a=n(38).default,i=n(19).default,s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var l,u=n(5),d=s(u),c=n(12),f=s(c),p=n(92),h=n(27),v=s(h),g=n(69),m=s(g),y=n(593),b=s(y),P=n(592),w=s(P),S=n(445),_=s(S),T=n(146),I=s(T),M=n(57),C=s(M),x=n(173),E=s(x),k=n(330),D=s(k),A=n(707),O=s(A),R=n(175),L=s(R),N=n(444),j=s(N),U=n(265),$=s(U),z=n(264),F=s(z),B=n(263),V=s(B),H=n(91),q=n(208),W=n(42),G=o(W),Y=(0,m.default)((l={},a(l,G.ADD_METADATA_ITEM_TO_PLAYLIST,function(e,t){
var n=(0,p.findMetadataItemModel)(e,t),r=new I.default({model:n,title:n.get("title")});f.default.trigger("show:modal",r)}),a(l,G.ANALYZE_METADATA_ITEM,function(e,t,n){var r=(0,p.findMetadataItemModel)(e,t);(0,w.default)(r).fail(function(e){n((0,H.showAlert)((0,d.default)("There was a problem analyzing this item.")))})}),a(l,G.DOWNLOAD_METADATA_ITEM_VERSION,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),r=new j.default({model:n});f.default.trigger("show:modal",r)}),a(l,G.DELETE_METADATA_ITEM,function(e,t){
var n=t.metadataItemEntityID,a=i(t,["metadataItemEntityID"]),s=(0,p.findMetadataItemModel)(e,{metadataItemEntityID:n});v.default.execute("deleteItems",r({item:s},a))}),a(l,G.DELETE_METADATA_ITEM_VERSION,function(e,t){var n=(0,p.findMetadataItemModel)(e,t);v.default.execute("deleteVersions",{item:n})}),a(l,G.EDIT_METADATA_ITEM,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),r=new E.default({model:n});f.default.trigger("show:modal",r)}),a(l,G.FIX_METADATA_ITEM_MATCH,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),r=new O.default({
model:n});f.default.trigger("show:modal",r)}),a(l,G.GET_METADATA_ITEM_INFO,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),r=new V.default({model:n});f.default.trigger("show:modal",r)}),a(l,G.MARK_METADATA_ITEM_WATCHED,function(e,t,n){var r=(0,p.findMetadataItemModel)(e,t);v.default.execute("markWatched",{item:r}).done(function(){n((0,q.repopulatePage)())})}),a(l,G.MARK_METADATA_ITEM_UNWATCHED,function(e,t,n){var r=(0,p.findMetadataItemModel)(e,t);v.default.execute("markUnwatched",{item:r}).done(function(){
n((0,q.repopulatePage)())})}),a(l,G.OPTIMIZE_METADATA_ITEM,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),r=new L.default({item:n});f.default.trigger("show:modal",r)}),a(l,G.PLAY_METADATA_ITEM,function(e,t){var n=t.metadataItemEntityID,a=i(t,["metadataItemEntityID"]),s=(0,p.findMetadataItemModel)(e,{metadataItemEntityID:n}),o=s.get("type"),l={};"show"!==o&&"season"!==o||(l.unwatched=!0),"episode"===o&&(l.continuous=!0),"track"!==o&&"photo"!==o||(l.siblings=!0),v.default.execute("playMedia",r({
item:s},l,a))}),a(l,G.PLAY_METADATA_ITEM_VERSION,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),r=new _.default({model:n});f.default.trigger("show:modal",r)}),a(l,G.PLAY_PRIMARY_EXTRA,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),r=new C.default({key:n.get("primaryExtraKey"),type:"clip"},{server:n.server,section:n.section});v.default.execute("playMedia",{item:r})}),a(l,G.PLAY_RELATED_MIX,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),r=n.get("related"),a=r.findWhere({browse:!1});
a.set("type","track"),v.default.execute("playMedia",{item:a})}),a(l,G.QUEUE_METADATA_ITEM,function(e,t){var n=t.metadataItemEntityID,a=i(t,["metadataItemEntityID"]),s=(0,p.findMetadataItemModel)(e,{metadataItemEntityID:n});v.default.execute("queueMedia",r({item:s},a))}),a(l,G.RATE_METADATA_ITEM,function(e,t){var n=t.metadataItemEntityID,a=i(t,["metadataItemEntityID"]),s=(0,p.findMetadataItemModel)(e,{metadataItemEntityID:n});v.default.execute("rate",r({item:s},a))}),a(l,G.RECOMMEND_METADATA_ITEM,function(e,t){
var n=(0,p.findMetadataItemModel)(e,t),r=new F.default({model:n});f.default.trigger("show:modal",r)}),a(l,G.REFRESH_METADATA_ITEM,function(e,t,n){var r=(0,p.findMetadataItemModel)(e,t);(0,b.default)(r).fail(function(e){503===e.status?f.default.trigger("show:modal",new D.default({model:r.server})):n((0,H.showAlert)((0,d.default)("There was a problem refreshing this item.")))})}),a(l,G.SHARE_METADATA_ITEM,function(e,t){var n=(0,p.findMetadataItemModel)(e,t),r=new $.default({model:n});f.default.trigger("show:modal",r);
}),a(l,G.SPLIT_METADATA_ITEM_APART,function(e,t,n){var r=(0,p.findMetadataItemModel)(e,t);v.default.execute("splitApart",{item:r,skipNavigate:!0}).done(function(){n((0,q.repopulatePage)())})}),a(l,G.SYNC_METADATA_ITEM,function(e,t){var n=(0,p.findMetadataItemModel)(e,t);v.default.execute("showSyncModal",{item:n})}),a(l,G.UNMATCH_METADATA_ITEM,function(e,t){var n=(0,p.findMetadataItemModel)(e,t);v.default.execute("unmatch",{item:n})}),a(l,G.WATCH_METADATA_ITEM_LATER,function(e,t){var n=(0,p.findMetadataItemModel)(e,t);
v.default.execute("watchLater",{item:n})}),l));t.default=Y,e.exports=t.default},function(e,t,n){"use strict";var r=n(11).default,a=n(38).default,i=n(19).default,s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var l,u=n(12),d=s(u),c=n(92),f=n(27),p=s(f),h=n(69),v=s(h),g=n(1064),m=s(g),y=n(591),b=s(y),P=n(146),w=s(P),S=n(175),_=s(S),T=n(435),I=n(42),M=o(I),C=(0,v.default)((l={},a(l,M.POPULATE_METADATA_LIST_RANGE,(0,m.default)({getModel:c.findMetadataListModel})),a(l,M.REPOPULATE_METADATA_LIST_RANGE,(0,
b.default)({getModel:c.findMetadataListModel})),a(l,M.PLAY_METADATA_LIST,function(e,t){var n=t.metadataListEntityID,a=i(t,["metadataListEntityID"]),s=(0,c.findMetadataListModel)(e,{metadataListEntityID:n});p.default.execute("playMedia",r({item:s},a))}),a(l,M.ADD_METADATA_LIST_TO_PLAYLIST,function(e,t){var n=(0,c.findMetadataListModel)(e,t),r=new w.default({model:n,title:n.get("title")});d.default.trigger("show:modal",r)}),a(l,M.SYNC_METADATA_LIST,function(e,t){var n=(0,c.findMetadataListModel)(e,t);
p.default.execute("showSyncModal",{item:n})}),a(l,M.OPTIMIZE_METADATA_LIST,function(e,t){var n=(0,c.findMetadataListModel)(e,t),r=new _.default({item:n});d.default.trigger("show:modal",r)}),a(l,M.SELECT_METADATA_LIST_ITEM,function(e,t,n){var r=t.id,a=t.type,i=t.isRangeSelect,s=(0,c.findMetadataListModel)(e,t),o=(0,c.findMetadataItemModel)(e,{metadataItemEntityID:r}),l=s.getCollection();o&&n((0,T.selectItem)({type:a,model:o,collection:l,isRangeSelect:i}))}),a(l,M.DESELECT_METADATA_LIST_ITEM,function(e,t,n){
var r=(0,c.findMetadataItemModel)(e,{metadataItemEntityID:t.id});r&&n((0,T.deselectModels)([r.id]))}),a(l,M.DESELECT_ALL_METADATA_LIST_ITEMS,function(e,t,n){var r=(0,c.findMetadataListModel)(e,t),a=r.getCollection();n((0,T.deselectCollection)(a))}),a(l,M.RESET_METADATA_LIST,function(e,t){var n=(0,c.findMetadataListModel)(e,t);n.abortPendingPopulate(),n.resetPopulatePromise(null),n.restoreDefaults({listIdentifier:n.get("listIdentifier"),containerKey:n.get("containerKey"),containerTitle:n.get("containerTitle")
})}),l));t.default=C,e.exports=t.default},function(e,t,n){"use strict";var r=n(11).default,a=n(38).default,i=n(1953).default,s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var l,u=n(3),d=s(u),c=n(8),f=s(c),p=n(5),h=s(p),v=n(12),g=s(v),m=n(315),y=s(m),b=n(27),P=s(b),w=n(69),S=s(w),_=n(593),T=s(_),I=n(592),M=s(I),C=n(146),x=s(C),E=n(173),k=s(E),D=n(175),A=s(D),O=n(91),R=n(435),L=n(208),N=n(42),j=o(N),U=(0,S.default)((l={},a(l,j.SELECT_ITEM,function(e,t,n){var r=t.type,a=t.model,i=t.collection,s=t.isRangeSelect,o=void 0!==s&&s,l=e.get("multiSelect"),u=l.get("activeSelectionType"),d=l.get("activeSelectionRange");
if(!u||u===r){if(l.listenToCollection(i),!o||!d||d.collection!==i)return l.set("activeSelectionRange",{collection:i,startModel:a}),void n((0,R.selectModels)([{id:a.id,type:r,model:a}]));var c=d.startModel,f=d.endModel,p=i.indexOf(c),h=i.indexOf(a);if(f){var v=i.indexOf(f);n((0,R.deselectRange)({collection:i,range:{start:p,end:v}}))}l.set("activeSelectionRange",{collection:i,startModel:c,endModel:a}),n((0,R.selectRange)({type:r,collection:i,range:{start:p,end:h}}))}}),a(l,j.SELECT_MODELS,function(e,t){
var n=e.get("multiSelect"),r=n.get("activeSelectionItems");r.add(t)}),a(l,j.DESELECT_ALL_ITEMS,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems");n.reset()}),a(l,j.DESELECT_MODELS,function(e,t){var n=e.get("multiSelect"),r=n.get("activeSelectionItems");r.remove(t)}),a(l,j.DESELECT_COLLECTION,function(e,t,n){var r=e.get("multiSelect"),a=r.get("activeSelectionItems"),i=[];r.stopListening(t),t.each(function(e){a.get(e.id)&&i.push(e.id)}),i.length&&n((0,R.deselectModels)(i))}),a(l,j.SELECT_RANGE,function(e,t,n){
var r=t.type,a=t.collection,i=t.range,s=e.get("multiSelect"),o=s.get("activeSelectionItems"),l=[];y.default.each(i,function(e){var t=a.at(e);t&&!o.get(t.id)&&l.push({id:t.id,type:r,model:t})}),l.length&&n((0,R.selectModels)(l))}),a(l,j.DESELECT_RANGE,function(e,t,n){var r=t.collection,a=t.range,i=e.get("multiSelect"),s=i.get("activeSelectionItems"),o=[];y.default.each(a,function(e){var t=r.at(e);t&&s.get(t.id)&&o.push(t.id)}),o.length&&n((0,R.deselectModels)(o))}),a(l,j.PLAY_SELECTED_ITEMS,function(e,t){
var n=e.get("multiSelect"),a=n.get("activeSelectionItems").pluck("model");P.default.execute("playMedia",r({items:a},t))}),a(l,j.ADD_SELECTED_ITEMS_TO_PLAYLIST,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),r=new x.default({model:d.default.first(n),items:n});g.default.trigger("show:modal",r)}),a(l,j.UPDATE_SELECTED_ITEMS_WATCHED_STATUS,function(e,t,n){var a=e.get("multiSelect"),i=a.get("activeSelectionItems").pluck("model"),s=f.default.Deferred().resolve().promise();
i.forEach(function(e){s=s.then(function(){return P.default.execute("updateWatchedStatus",r({item:e},t))})}),s.fail(function(){var e=t.watched?(0,h.default)("There was an unexpected error marking an item watched."):(0,h.default)("There was an unexpected error marking an item unwatched.");n((0,O.showAlert)(e))}),s.always(function(){n((0,L.repopulatePage)())})}),a(l,j.EDIT_SELECTED_ITEMS,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),r=new k.default({items:n});g.default.trigger("show:modal",r);
}),a(l,j.REFRESH_SELECTED_ITEMS,function(e,t,n){var r=e.get("multiSelect"),a=r.get("activeSelectionItems").pluck("model"),i=f.default.Deferred().resolve().promise();a.forEach(function(e){i=i.then(function(){return(0,T.default)(e)})}),i.fail(function(){n((0,O.showAlert)((0,h.default)("There was an unexpected error refreshing an item.")))})}),a(l,j.ANALYZE_SELECTED_ITEMS,function(e,t,n){var r=e.get("multiSelect"),a=r.get("activeSelectionItems").pluck("model"),i=f.default.Deferred().resolve().promise();
a.forEach(function(e){i=i.then(function(){return(0,M.default)(e)})}),i.fail(function(){n((0,O.showAlert)((0,h.default)("There was an unexpected error analyzing an item.")))})}),a(l,j.SYNC_METADATA_ITEMS,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model");P.default.execute("showSyncModal",{item:d.default.first(n),items:n})}),a(l,j.OPTIMIZE_METADATA_ITEMS,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),r=new A.default({item:d.default.first(n),
items:n});g.default.trigger("show:modal",r)}),a(l,j.MERGE_SELECTED_ITEMS,function(e){var t=e.get("multiSelect"),n=t.get("activeSelectionItems").pluck("model"),r=i(n),a=r[0],s=r.slice(1);P.default.execute("merge",{item:a,items:s})}),a(l,j.DELETE_SELECTED_ITEMS,function(e,t,n){var r=e.get("multiSelect"),a=r.get("activeSelectionItems").pluck("model"),i=f.default.Deferred().resolve().promise();a.forEach(function(e){i=i.then(function(){return e.destroy({wait:!0})})}),i.fail(function(e){var t=403===e.status?(0,
h.default)("Ensure that media deletion is enabled for library content in your server settings."):(0,h.default)("There was an unexpected error deleting an item.");n((0,O.showAlert)(t))})}),l));t.default=U,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=(0,P.findServerModel)(e,t);return n.get("desktop")}var a=n(11).default,i=n(38).default,s=n(224).default,o=n(1).default,l=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var u,d=n(8),c=o(d),f=n(53),p=o(f),h=n(5),v=o(h),g=n(12),m=o(g),y=n(26),b=l(y),P=n(92),w=n(605),S=l(w),_=n(306),T=o(_),I=n(1078),M=o(I),C=n(40),x=o(C),E=n(69),k=o(E),D=n(109),A=o(D),O=n(299),R=o(O),L=n(1575),N=o(L),j=n(174),U=o(j),$=n(212),z=o($),F=n(1573),B=o(F),V=n(91),H=n(110),q=l(H),W=n(42),G=l(W),Y=(0,
k.default)((u={},i(u,G.TEST_SERVER,function(e,t){var n=(0,P.findServerModel)(e,t);m.default.trigger("test:server",n)}),i(u,G.CONFIRM_RELAY_CONNECTION,function(e,t,n){var r=(0,P.findServerModel)(e,t),a=e.get("experienceSettings"),i=a.get("relayReminders"),s=i[r.id]||{},o=s.remindAfter;if(!o||!p.default.unix(o).isAfter((0,p.default)())){var l=new N.default;m.default.trigger("show:modal",l),n(q.setRelayReminder(t))}}),i(u,G.SET_RELAY_REMINDER,function(e,t){var n=(0,P.findServerModel)(e,t),r=e.get("experienceSettings"),i=r.get("relayReminders"),s=i[n.id]||{};
i[n.id]=(0,M.default)(s.times),r.save("relayReminders",a({},i))}),i(u,G.FETCH_PROVIDERS,(0,A.default)({key:"providers",getModel:r})),i(u,G.POPULATE_PROVIDERS,(0,R.default)({key:"providers",getModel:r})),i(u,G.FETCH_LIBRARIES,(0,A.default)({key:"libraries",getModel:r})),i(u,G.POPULATE_LIBRARIES,(0,R.default)({key:"libraries",getModel:r})),i(u,G.ADD_LIBRARY,function(e,t){var n=(0,P.findServerModel)(e,t),r=t.options,i=void 0===r?{}:r,s=new U.default(a({server:n,redirect:!0},i));m.default.trigger("show:modal",s);
}),i(u,G.START_LIBRARY_REFRESH,function(e,t,n){var a=(0,P.findServerModel)(e,t),i=r(e,t),s=i.get("libraries"),o=t.libraryID||"all",l=t.force?{force:1}:void 0,u=b.join(["/library/sections",o,"refresh"],l),d=a.getXHROptions(u);if(t.cancel&&(d.type="DELETE"),c.default.ajax(d).done(function(){n(q.fetchLibraries({serverEntityID:t.serverEntityID}))}).fail(function(e){var r=t.cancel?(0,v.default)("There was a problem canceling the update."):(0,v.default)("There was a problem updating a library.");n((0,V.showAlert)(r));
}),t.libraryID){var f=s.get(o);f&&f.set("refreshing",!t.cancel)}else t.cancel&&s.each(function(e){return e.set("refreshing",!1)})}),i(u,G.SHARE_LIBRARIES,function(e,t){var n=(0,P.findServerModel)(e,t);m.default.trigger("show:modal",new z.default({defaultPaneType:"ownedServer",defaultPaneID:n.id}))}),i(u,G.ENABLE_HTTP_FALLBACK,function(e,t,n){var r=(0,P.findServerModel)(e,t),a=new B.default({server:r}),i=a.promise.then(function(){var e=r.get("publicAddressMatches")?T.default.SAME_NETWORK:T.default.ALWAYS;
return x.default.save("allowHttpFallback",e)});i.done(function(){n(q.testServer({serverEntityID:t.serverEntityID}))}),m.default.trigger("show:modal",a)}),i(u,G.OPTIMIZE_DATABASE,function(e,t,n){var r=(0,P.findServerModel)(e,t),a=r.getXHROptions("/library/optimize",{type:"PUT"});c.default.ajax(a).done(function(){n((0,V.showAlert)({type:S.SUCCESS,message:(0,v.default)("The database was optimized.")}))}).fail(function(e){n((0,V.showAlert)((0,v.default)("There was a problem optimizing the database.")));
})}),i(u,G.CLEAN_BUNDLES,function(e,t,n){var r=(0,P.findServerModel)(e,t),a=r.getXHROptions("/library/clean/bundles",{type:"PUT"});c.default.ajax(a).done(function(){n((0,V.showAlert)({type:S.SUCCESS,message:(0,v.default)("Unused bundles are being removed.")}))}).fail(function(e){n((0,V.showAlert)((0,v.default)("There was a problem removing unused bundles.")))})}),i(u,G.EMPTY_TRASH,function(e,t,n){var a=(0,P.findServerModel)(e,t),i=r(e,t),o=i.get("libraries"),l=t.libraryID,u=l?[l]:o.map(function(e){
return e.id}),d=u.map(function(e){var t=a.getXHROptions("/library/sections/"+e+"/emptyTrash",{type:"PUT"});return c.default.ajax(t)});c.default.when.apply(c.default,s(d)).done(function(){n((0,V.showAlert)({type:S.SUCCESS,message:(0,v.default)("The trash was emptied.")}))}).fail(function(e){n((0,V.showAlert)((0,v.default)("There was a problem emptying the trash.")))})}),i(u,G.DELETE_SERVER,function(e,t,n){var r=(0,P.findServerModel)(e,t),a=e.get("cloudServer");if(r){if(a.get("isResolved")){var i=a.getXHROptions("/api/servers/"+r.id,{
type:"DELETE"});c.default.ajax(i)}var s=a.get("resources"),o=s.get(r.id);if(o&&o.trigger("destroy",o,o.collection),r.get("isFullOwnedServer")&&r.get("isConnected")){var l=r.get("cloudAccount");l.destroy().done(function(){r.set({myPlexSigninState:"none",myPlexSubscription:!1})}).always(function(){n(q.testServer({serverEntityID:t.serverEntityID})),r.populate().fail(function(){r.trigger("destroy",r,r.collection)})})}else r.trigger("destroy",r,r.collection)}}),i(u,G.START_ACTIVITY,function(e,t){var n=r(e,t),a=n.get("activities");
a.add([t.activity],{parse:!0})}),i(u,G.UPDATE_ACTIVITY,function(e,t){var n=r(e,t),a=n.get("activities");a.add([t.activity],{parse:!0,merge:!0})}),i(u,G.FINISH_ACTIVITY,function(e,t){var n=r(e,t),a=n.get("activities");a.remove(t.activity.uuid)}),i(u,G.EVENT_CONNECTION_OPEN,function(e,t){var n=(0,P.findServerModel)(e,t),a=r(e,t),i=a.get("activities");n.get("isFullOwnedServer")&&i.fetch()}),u));t.default=Y,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e.get("ui").get("dashboardPage");
}var a=n(38).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o,l=n(92),u=n(194),d=i(u),c=n(109),f=i(c),p=n(299),h=i(p),v=n(69),g=i(v),m=n(169),y=n(42),b=s(y),P=(0,g.default)((o={},a(o,b.INIT_DASHBOARD_PAGE,function(e,t){var n=r(e),a=n.get("hubs"),i=(0,l.findServerModel)(e,t),s=t.hubKey;if(a&&a.server===i&&a.hubKey===s)return void n.set("isPagePopulated",!0);var o=new d.default([],{server:i,hubKey:s,count:12,includeEmpty:!0,excludes:["playlists"]});o.reset(),
o.abortPendingPopulate(),o.resetPopulatePromise(null),n.restoreDefaults({isPagePopulated:!0,hubs:o})}),a(o,b.CLEAR_DASHBOARD_PAGE,function(e){var t=r(e);t.set("isPagePopulated",!1)}),a(o,b.FETCH_HUBS,(0,f.default)({key:"hubs",getModel:r})),a(o,b.POPULATE_HUBS,(0,h.default)({key:"hubs",getModel:r})),a(o,b.REPOPULATE_PAGE,function(e,t,n){var a=r(e),i=a.get("hubs");i&&i.each(function(e){var t=e.get("metadataList");!e.get("random")&&t.get("containerKey")&&n((0,m.repopulateMetadataListRange)({metadataListEntityID:t.entityID(),
count:i.count}))})}),o));t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(64),s=r(i),o=n(42),l=a(o),u=(0,s.default)(l.INIT_DASHBOARD_PAGE);t.initDashboardPage=u;var d=(0,s.default)(l.CLEAR_DASHBOARD_PAGE);t.clearDashboardPage=d;var c=(0,s.default)(l.FETCH_HUBS);t.fetchHubs=c;var f=(0,s.default)(l.POPULATE_HUBS);t.populateHubs=f},function(e,t,n){"use strict";function r(e){return e.get("ui").get("liveTVSettingsPage").get("dvrs");
}function a(e){return e.get("ui").get("liveTVSettingsPage").get("dvrSetup")}function i(e,t){var n=r(e,t),i=a(e);return t.dvrID&&t.deviceID?n.get(t.dvrID).get("devices").get(t.deviceID):t.deviceID?i.get("devices").get(t.deviceID):i.get("selectedDevice")}function s(e,t){if(t.dvrID&&t.deviceID){var n=i(e,t);return n.get("channelMappings")}var r=a(e);return r.get("channelMappings")}function o(e,t){return s(e,t).get(t.deviceIdentifier)}function l(e,t){var n=(0,C.findServerModel)(e,t),r=s(e,t),a=[],i={};
r.forEach(function(e){var t=e.get("deviceIdentifier"),n=e.get("enabled"),r=e.get("lineupIdentifier");n&&r&&a.push(t),r&&(i["channelMapping["+t+"]"]=r)});var o=P.join(["/media/grabbers/devices",t.deviceID,"channelmap"],u({channelsEnabled:a.toString()},i)),l=n.getXHROptions(o,{type:"PUT"});return g.default.ajax(l)}var u=n(11).default,d=n(38).default,c=n(79).default,f=n(1).default,p=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var h,v=n(8),g=f(v),m=n(5),y=f(m),b=n(26),P=p(b),w=n(49),S=f(w),_=n(69),T=f(_),I=n(109),M=f(I),C=n(92),x=n(168),E=n(207),k=n(110),D=n(103),A=n(42),O=p(A),R=(0,
T.default)((h={},d(h,O.CLEAR_DVR_SETUP,function(e){var t=a(e);t.restoreDefaults()}),d(h,O.DVR_SETUP_NEXT_STEP,function(e){var t=a(e),n=void 0;switch(t.get("step")){case E.dvrSetupSteps.DEVICE:n=E.dvrSetupSteps.DEVICE_CHANNELS;break;case E.dvrSetupSteps.DEVICE_CHANNELS:n=E.dvrSetupSteps.EPG;break;case E.dvrSetupSteps.EPG:n=E.dvrSetupSteps.EPG_MAPPING;break;case E.dvrSetupSteps.EPG_MAPPING:n=E.dvrSetupSteps.CHANNEL_MAPPING;break;case E.dvrSetupSteps.CHANNEL_MAPPING:n=E.dvrSetupSteps.EPG_DOWNLOAD}t.set({
step:n,setupErrorMessage:null})}),d(h,O.DVR_SETUP_PREVIOUS_STEP,function(e){var t=a(e),n=void 0;switch(t.get("step")){case E.dvrSetupSteps.DEVICE_CHANNELS:n=E.dvrSetupSteps.DEVICE;break;case E.dvrSetupSteps.EPG:n=E.dvrSetupSteps.DEVICE_CHANNELS;break;case E.dvrSetupSteps.CHANNEL_MAPPING:n=E.dvrSetupSteps.EPG}t.set({step:n,setupErrorMessage:null})}),d(h,O.FETCH_DEVICES,function(e,t,n){var r=a(e),i=r.get("devices");r.set("isDevicesPending",!0),i.fetch().done(function(){r.set({isDevicesPending:!1,isDevicesPopulated:!0,
devicesError:null});var e=i.filter(function(e){return!e.get("parentID")});1!==e.length||e[0].get("parentID")||n((0,D.selectDevice)({serverEntityID:t.serverEntityID,deviceID:e[0].id}))}).fail(function(e,t){r.set({isDevicesPending:!1,devicesError:t})})}),d(h,O.DISCOVER_DEVICES,function(e,t,n){var r=(0,C.findServerModel)(e,t),i=a(e),s="/media/grabbers/devices/discover",o=r.getXHROptions(s,{type:"POST"});g.default.ajax(o).done(function(e){var r=i.get("devices"),a=r.add(e,{parse:!0}),s=a.filter(function(e){
return!e.get("parentID")});1!==s.length||a[0].get("parentID")||n((0,D.selectDevice)({serverEntityID:t.serverEntityID,deviceID:s[0].id}))}).fail(function(e){i.set("setupErrorMessage",(0,y.default)("There was a problem discovering devices"))})}),d(h,O.ADD_DEVICE,function(e,t,n){var r=(0,C.findServerModel)(e,t),i=a(e),s=P.join(["/media/grabbers","tv.plex.grabbers.hdhomerun","devices"],{uri:t.uri}),o=r.getXHROptions(s,{type:"POST"});i.set("addDevicePending",!0),g.default.ajax(o).done(function(e,n){var r=i.get("devices"),a=r.add(e,{
parse:!0});if(0===a.length){var s=S.default.parseXML(e),o=s&&s.message||(0,y.default)("No device found at {1}",t.uri);i.set({addDevicePending:!1,setupErrorMessage:o})}else i.set({addDevicePending:!1,setupErrorMessage:null,selectedDevice:1===a.length?a[0]:i.get("selectedDevice")})}).fail(function(){i.set({addDevicePending:!1,setupErrorMessage:(0,y.default)("There was a problem adding the device: {1}",t.uri)})})}),d(h,O.SELECT_DEVICE,function(e,t){var n=a(e),r=n.get("devices");n.set("selectedDevice",r.get(t.deviceID));
}),d(h,O.SELECT_DEVICE_SOURCE,function(e,t){var n=a(e),r=n.get("selectedDevice");r.set("selectedSource",t.source)}),d(h,O.FETCH_DEVICE_DETAILS,function(e,t){var n=a(e),r=i(e,t);r.fetch().fail(function(e){n.set("setupErrorMessage",(0,y.default)("There was a problem getting the details for your device"))})}),d(h,O.FETCH_DEVICE_CHANNELS,function(e,t){var n=a(e),r=i(e,t),s=P.join(["/media/grabbers/devices",r.get("key"),"channels"]);r.set("isChannelsPending",!0),r.get("channels").fetch({url:s}).done(function(){
r.set({isChannelsPending:!1,isChannelsPopulated:!0,channelsError:null})}).fail(function(e){r.set({isChannelsPending:!1,isChannelsPopulated:!0,channelsError:null}),n.set("setupErrorMessage",(0,y.default)("There was a problem getting the channels for your device"))})}),d(h,O.SCAN_DEVICE_CHANNELS,function(e,t,n){var r=(0,C.findServerModel)(e,t),i=a(e),s=i.get("selectedDevice"),o=s.get("selectedSource"),l=P.join(["/media/grabbers/devices",s.get("key"),"scan"],{source:o}),u=r.getXHROptions(l,{type:"POST"
});g.default.ajax(u).done(function(e,t,n){var r=n.getResponseHeader("X-Plex-Activity");r&&(i.set("channelScanActivityID",r),s.get("channels").reset())}).fail(function(e){i.set("setupErrorMessage",(0,y.default)("There was a problem scanning channels"))})}),d(h,O.CANCEL_SCAN_DEVICE_CHANNELS,function(e,t,n){var r=(0,C.findServerModel)(e,t),i=a(e),s=i.get("selectedDevice"),o=P.join(["/media/grabbers/devices",s.get("key"),"scan"]),l=r.getXHROptions(o,{type:"DELETE"});g.default.ajax(l).done(function(){
i.unset("channelScanActivityID"),n((0,D.fetchDeviceChannels)({serverEntityID:t.serverEntityID}))}).fail(function(e){i.set("setupErrorMessage",(0,y.default)("There was a problem canceling the current channel scan"))})}),d(h,O.FIND_BEST_EPG_LINEUP,function(e,t,n){var r=(0,C.findServerModel)(e,t),i=a(e),s=i.get("selectedDevice"),o=i.get("epgSettings").get("lineupGroup"),l=P.join("/livetv/epg/lineup",{device:s.get("uuid"),lineupGroup:o.get("uuid")}),u=r.getXHROptions(l);g.default.ajax(u).done(function(e,t,n){
var r=n.getResponseHeader("X-Plex-Activity");i.set("epgLineupActivityID",r)}).fail(function(e){i.set("setupErrorMessage",(0,y.default)("There was a problem mapping channels"))})}),d(h,O.SELECT_EPG_LINEUP,function(e,t){var n=a(e),r=n.get("epgSettings"),i=r.get("lineupGroup"),s=i.get("lineups"),o=s.get(t.lineupUUID);n.set("selectedLineup",o)}),d(h,O.FETCH_LINEUP_CHANNELS,(0,M.default)({key:"lineupChannels",getModel:a})),d(h,O.FETCH_CHANNEL_MAP,function(e,t){var n=a(e,t),r=n.get("channelMappings");n.set("isChannelMappingsPending",!0),
r.fetch(t.options).done(function(){t.forceEnabled&&r.each(function(e){e.set("enabled",e.has("lineupIdentifier"))}),n.set({isChannelMappingsPending:!1,isChannelMappingsPopulated:!0,channelMappingsError:null})}).fail(function(e,t){n.set({isChannelMappingsPending:!1,channelMappingsError:t})})}),d(h,O.ENABLE_DEVICE_CHANNEL,function(e,t){var n=o(e,t);n&&n.set("enabled",t.enabled)}),d(h,O.UPDATE_CHANNEL_MAPPING,function(e,t){var n=o(e,t);n&&n.set("lineupIdentifier",t.lineupIdentifier)}),d(h,O.SAVE_CHANNEL_MAP,function(e,t,n){
l(e,t).done(function(){n((0,D.fetchDeviceDetails)(t))})}),d(h,O.SAVE_DVR,function(e,t,n){l(e,t).done(function(){var i=(0,C.findServerModel)(e,t),s=r(e,t),o=a(e),l=o.get("selectedDevice"),u=o.get("selectedLineup"),d=o.get("epgSettings").get("selectedLanguage"),c=P.join("/livetv/dvrs",{device:l.get("uuid"),lineup:u.get("uuid"),language:d.get("code")}),f=i.getXHROptions(c,{type:"POST"});g.default.ajax(f).done(function(e,r,a){var i=a.getResponseHeader("X-Plex-Activity"),l=s.add(e,{parse:!0})[0];o.set({
epgDownloadActivityID:i,selectedDVR:l}),n((0,D.dvrSetupNextStep)({serverEntityID:t.serverEntityID})),n((0,k.fetchProviders)({serverEntityID:t.serverEntityID}))}).fail(function(e){o.set("setupErrorMessage",(0,y.default)("There was a problem saving your DVR"))})})}),d(h,O.SAVE_DEVICE_SETTINGS,function(e,t){var n=(0,C.findServerModel)(e,t),r=i(e,t),a=t.prefs,s=P.join(["/media/grabbers/devices",t.deviceID,"prefs"],a);r.set("isSaving",!0);var o=n.getXHROptions(s,{type:"PUT"}),l=g.default.ajax(o);l.done(function(){
var e=r.get("prefs");c(a).forEach(function(t){e.get(t).set("value",a[t])}),r.set({isSaving:!1,saveError:null})}),l.fail(function(e){r.set({isSaving:!1,saveError:e})})}),d(h,O.CLEAR_DEVICE_SETTINGS_SAVE_ERROR,function(e,t){var n=i(e,t);n.set("saveError",null)}),d(h,O.UPDATE_ACTIVITY,function(e,t){var n=a(e);if(n){var r=n.get("selectedDevice"),i=t.activity;r&&i.type===x.activityTypes.PROVIDER_DEVICE_CHANNELSCAN&&parseInt(i.context.deviceID,10)===r.id&&n.set("channelScanActivityID",i.uuid)}}),d(h,O.FINISH_ACTIVITY,function(e,t,n){
var r=a(e);if(r)if(t.activity.uuid===r.get("channelScanActivityID"))r.set("channelScanActivityID",""),n((0,D.fetchDeviceChannels)({serverEntityID:t.serverEntityID}));else if(t.activity.uuid===r.get("epgLineupActivityID")){var i=t.activity,s=r.get("epgSettings").get("lineupGroup").get("lineups");r.set({selectedLineup:s.get(i.response.lineup),epgLineupActivityID:""}),n((0,D.dvrSetupNextStep)({serverEntityID:t.serverEntityID}))}else t.activity.uuid===r.get("epgDownloadActivityID")&&r.set("epgDownloadActivityID","");
}),h));t.default=R,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e.get("ui").get("libraryPage")}var a=n(38).default,i=n(9).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o,l=n(26),u=i(l),d=n(1147),c=s(d),f=n(92),p=n(85),h=s(p),v=n(565),g=s(v),m=n(380),y=s(m),b=n(296),P=s(b),w=n(69),S=s(w),_=n(109),T=s(_),I=n(299),M=s(I),C=n(322),x=n(169),E=n(42),k=i(E),D=(0,S.default)((o={},a(o,k.INIT_LIBRARY_PAGE,function(e,t){var n=r(e),a=n.get("metadataList"),i=n.get("metadataTypes"),s=(0,
f.findServerModel)(e,t),o=t.libraryKey,l=t.activeType,d=t.activeFilters,p=t.activeSort,v={type:l,filters:d,sort:p},m="/"===o.charAt(0),b=m?o:"/library/sections/"+o,P=u.join(b,{includeAdvanced:1}),w=(0,c.default)([b,"all"],v),S=(0,c.default)([b,"firstCharacter"],v);if(a&&a.server===s&&a.get("containerKey")===w)return void n.set("isPagePopulated",!0);var _=new h.default({containerKey:w},{server:s}),T=new y.default([],{server:s,url:S}),I={isPagePopulated:!0,metadataList:_,firstCharacters:T};i&&i.url===P?(I.metadataTypes=i,
I.isMetadataTypesPending=n.get("isMetadataTypesPending"),I.isMetadataTypesPopulated=n.get("isMetadataTypesPopulated"),I.metadataTypesError=n.get("metadataTypesError")):I.metadataTypes=new g.default([],{server:s,url:P}),n.restoreDefaults(I)}),a(o,k.CLEAR_LIBRARY_PAGE,function(e){var t=r(e);t.set("isPagePopulated",!1)}),a(o,k.FETCH_LIBRARY_METADATA_TYPES,(0,T.default)({key:"metadataTypes",getModel:r})),a(o,k.POPULATE_LIBRARY_METADATA_TYPES,(0,M.default)({key:"metadataTypes",actionSuffix:"libraryMetadataTypes",
getModel:r})),a(o,k.FETCH_LIBRARY_FIRST_CHARACTERS,(0,T.default)({key:"firstCharacters",getModel:r})),a(o,k.POPULATE_LIBRARY_FIRST_CHARACTERS,(0,M.default)({key:"firstCharacters",actionSuffix:"libraryFirstCharacters",getModel:r})),a(o,k.REPOPULATE_PAGE,function(e,t,n){var a=r(e),i=a.get("metadataList");i&&(n((0,x.repopulateMetadataListRange)({metadataListEntityID:i.entityID()})),n((0,C.fetchLibraryFirstCharacters)()))}),a(o,k.SELECT_LIBRARY_FILTER,function(e,t){var n=r(e),a=n.get("selectedFilterOptions"),i=(0,
f.findServerModel)(e,t),s=t.key,o={selectedFilterKey:s};a&&a.url===s||(o.selectedFilterOptions=new P.default([],{server:i,url:s}),o.isSelectedFilterOptionsPending=!0,o.isSelectedFilterOptionsPopulated=!1,o.selectedFilterOptionsError=null),n.set(o)}),a(o,k.DESELECT_LIBRARY_FILTER,function(e){var t=r(e);t.set({selectedFilterKey:null,filterOptionQuery:""})}),a(o,k.FETCH_LIBRARY_FILTER_OPTIONS,(0,T.default)({key:"selectedFilterOptions",getModel:r})),a(o,k.POPULATE_LIBRARY_FILTER_OPTIONS,(0,M.default)({
key:"selectedFilterOptions",actionSuffix:"libraryFilterOptions",getModel:r})),a(o,k.SEARCH_LIBRARY_FILTER_OPTIONS,function(e,t){var n=r(e);n.set("filterOptionQuery",t)}),o));t.default=D,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e.get("ui").get("liveTVSettingsPage")}var a=n(38).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o,l=n(8),u=i(l),d=n(5),c=i(d),f=n(26),p=s(f),h=n(672),v=i(h),g=n(207),m=i(g),y=n(69),b=i(y),P=n(109),w=i(P),S=n(92),_=n(91),T=n(42),I=s(T),M=(0,
b.default)((o={},a(o,I.FETCH_DVRS,(0,w.default)({key:"dvrs",getModel:r})),a(o,I.INIT_LIVE_TV_SETTINGS_PAGE,function(e,t){var n=r(e),a=n.get("dvrSetup"),i=n.get("dvr"),s=(0,S.findServerModel)(e,t),o={isPagePopulated:!0};i&&i.server===s||(o.dvrs=new v.default([],{server:s})),a&&a.server===s?a.restoreDefaults():o.dvrSetup=new m.default({},{server:s}),n.set(o)}),a(o,I.CLEAR_LIVE_TV_SETTINGS_PAGE,function(e){var t=r(e);t.set("isPagePopulated",!1)}),a(o,I.REMOVE_DVR,function(e,t,n){var a=r(e,t),i=a.get("dvrs"),s=i.get(t.dvrID);
s&&s.destroy().fail(function(){return n((0,_.showAlert)((0,c.default)("There was a problem removing your DVR")))})}),a(o,I.RELOAD_GUIDE,function(e,t,n){var r=(0,S.findServerModel)(e,t),a=p.join(["/livetv/dvrs",t.dvrID,"reloadGuide"]),i=r.getXHROptions(a,{type:"POST"});u.default.ajax(i)}),o));t.default=M,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e.get("ui").get("mediaSubscriptionModal")}var a=n(38).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var o,l=n(3),u=i(l),d=n(8),c=i(d),f=n(26),p=s(f),h=n(37),v=i(h),g=n(413),m=n(594),y=i(m),b=n(69),P=i(b),w=n(109),S=i(w),_=n(582),T=i(_),I=n(298),M=i(I),C=n(681),x=s(C),E=n(42),k=s(E),D=(0,P.default)((o={},a(o,k.INIT_MEDIA_SUBSCRIPTION_MODAL,function(e,t,n){var a=r(e);a.set("isMediaSubscriptionPending",!0);var i={};if(t.showConflicts&&(i.options={data:{includeGrabs:1}}),t.mediaSubscriptionEntityID)return a.set({mediaSubscription:(0,g.findMediaSubscriptionModel)(e,t)}),void n(x.fetchMediaSubscription(i));
var s=(0,g.findServerModel)(e,t),o=(0,g.findMetadataItemModel)(e,t),l=o.get("grandparentSubscriptionID")||o.get("subscriptionID");if(l)return a.set({mediaSubscription:new M.default({key:l},{server:s})}),void n(x.fetchMediaSubscription(i));var u=p.join("/media/subscriptions/template",{guid:o.get("guid")}),d=s.getXHROptions(u),f=c.default.ajax(d);f.done(function(e){var t=new T.default(e,{parse:!0,server:s}),n=t.findWhere({selected:!0});a.set({isMediaSubscriptionPending:!1,isMediaSubscriptionPopulated:!0,
mediaSubscriptionError:null,templates:t,mediaSubscription:n})}).fail(function(e){a.set({isMediaSubscriptionPending:!1,mediaSubscriptionError:e})})}),a(o,k.CLEAR_MEDIA_SUBSCRIPTION_MODAL,function(e){var t=r(e);t.restoreDefaults()}),a(o,k.FETCH_MEDIA_SUBSCRIPTION,(0,S.default)({key:"mediaSubscription",getModel:r})),a(o,k.SAVE_MEDIA_SUBSCRIPTION,function(e,t){var n=r(e),i=(0,g.findServerModel)(e,t),s=n.get("mediaSubscription"),o=t.targetLibrarySectionID,l=t.targetSectionLocationID,d=void 0===l?null:l,f=t.prefs;
n.set({isMediaSubscriptionSaving:!0,mediaSubscriptionSaveError:null});var h=s.get("key"),m=s.getSaveParams(),y=c.default.extend(!0,{},m,{includeGrabs:1,targetLibrarySectionID:o,targetSectionLocationID:d,prefs:f}),b=p.join(u.default.result(s,"url"),y);if(!h){var P=v.default.get(s.get("target").get("type"));b=b+"&"+s.get("parameters")+"&type="+P.id}var w=i.getXHROptions(b,{type:h?"PUT":"POST"}),S=c.default.ajax(w);S.done(function(r){if(s.set(s.parse(r)),n.set({templates:void 0,isMediaSubscriptionSaving:!1
}),t.metadataItemEntityID){var i=(0,g.findMetadataItemModel)(e,t);if(i){var o,l=s.get("target").get("type"),u=v.default.typeHasChildMedia(l),d=u?"grandparentSubscriptionID":"subscriptionID",c=u?"grandparentSubscriptionType":"subscriptionType";i.set((o={},a(o,d,s.id),a(o,c,l),o))}}}).fail(function(e){n.set({isMediaSubscriptionSaving:!1,mediaSubscriptionSaveError:e})})}),a(o,k.CHANGE_MEDIA_SUBSCRIPTION_TEMPLATE_MODE,function(e,t){var n=r(e),a=n.get("templates"),i=t.modeIndex;n.set("mediaSubscription",a.at(i));
}),a(o,k.CLEAR_MEDIA_SUBSCRIPTION_MODAL_ERROR,function(e,t){var n=r(e);n.set({mediaSubscriptionSaveError:null,mediaSubscriptionError:null,mediaSubscriptionMoveError:null,mediaSubscriptionDeleteError:null})}),a(o,k.MOVE_MEDIA_SUBSCRIPTION_MODAL,function(e,t){var n=r(e),a=n.get("mediaSubscription");n.set({isMediaSubscriptionMoving:!0,mediaSubscriptionMoveError:null});var i=(0,y.default)(a);i.done(function(){n.set({isMediaSubscriptionMoving:!1})}).fail(function(e){n.set({isMediaSubscriptionMoving:!1,
mediaSubscriptionMoveError:e})})}),a(o,k.DELETE_MEDIA_SUBSCRIPTION_MODAL,function(e,t,n){var a=r(e),i=a.get("mediaSubscription");a.set({isMediaSubscriptionDeleting:!0,mediaSubscriptionDeleteError:null}),i.destroy({wait:!0}).done(function(){if(a.set({isMediaSubscriptionDeleting:!1}),t.metadataItemEntityID){var n=(0,g.findMetadataItemModel)(e,t),r=i.get("key");n.get("subscriptionID")===r?(n.unset("subscriptionID"),n.unset("subscriptionType")):n.get("grandparentSubscriptionID")===r&&(n.unset("grandparentSubscriptionID"),
n.unset("grandparentSubscriptionType"))}}).fail(function(e){a.set({isMediaSubscriptionDeleting:!1,mediaSubscriptionDeleteError:e})})}),o));t.default=D,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e.get("ui").get("metadataListPage")}var a=n(38).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o,l=n(92),u=n(85),d=i(u),c=n(69),f=i(c),p=n(169),h=n(42),v=s(h),g=(0,f.default)((o={},a(o,v.INIT_METADATA_LIST_PAGE,function(e,t){var n=r(e),a=n.get("metadataList"),i=(0,
l.findServerModel)(e,t),s=t.key,o=t.title;if(a&&a.server===i&&a.get("containerKey")===s)return void n.set("isPagePopulated",!0);var u=new d.default({containerKey:s,containerTitle:o},{server:i});n.restoreDefaults({isPagePopulated:!0,metadataList:u})}),a(o,v.CLEAR_METADATA_LIST_PAGE,function(e){var t=r(e);t.set("isPagePopulated",!1)}),a(o,v.REPOPULATE_PAGE,function(e,t,n){var a=r(e),i=a.get("metadataList");i&&n((0,p.repopulateMetadataListRange)({metadataListEntityID:i.entityID()}))}),o));t.default=g,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(64),s=r(i),o=n(42),l=a(o),u=(0,s.default)(l.INIT_METADATA_LIST_PAGE);t.initMetadataListPage=u;var d=(0,s.default)(l.CLEAR_METADATA_LIST_PAGE);t.clearMetadataListPage=d},function(e,t,n){"use strict";function r(e){return e.get("ui").get("prePlayPage")}var a=n(38).default,i=n(9).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o,l=n(26),u=i(l),d=n(92),c=n(57),f=s(c),p=n(85),h=s(p),v=n(194),g=s(v),m=n(69),y=s(m),b=n(109),P=s(b),w=n(42),S=i(w),_=(0,
y.default)((o={},a(o,S.INIT_PRE_PLAY_PAGE,function(e,t){var n=r(e),a=n.get("metadataItem"),i=(0,d.findServerModel)(e,t),s=t.metadataKey;if(a&&a.server===i&&a.get("key")===s)return void n.set("isPagePopulated",!0);var o=new f.default({key:s},{server:i}),l=u.join([s.replace("/metadata","/hubs/metadata"),"related"]),c=new g.default([],{server:i,metadataItem:o,hubKey:l,count:12});c.reset(),c.abortPendingPopulate(),c.resetPopulatePromise(null),n.restoreDefaults({isPagePopulated:!0,metadataItem:o,relatedHubs:c
})}),a(o,S.INIT_PRE_PLAY_DESCENDANT_LIST,function(e,t){var n=r(e),a=n.get("metadataItem"),i=n.get("descendantList"),s=(0,d.findServerModel)(e,t);if(a.has("childrenKey")){var o=a.get("key"),l=a.get("skipChildren"),c=u.join([o,l?"grandchildren":"children"]);if(!i||i.server!==s||i.get("containerKey")!==c){var f=new h.default({containerKey:c},{server:s});n.set({descendantList:f})}}}),a(o,S.CLEAR_PRE_PLAY_PAGE,function(e){var t=r(e);t.set("isPagePopulated",!1)}),a(o,S.FETCH_PRE_PLAY_METADATA_ITEM,(0,P.default)({
key:"metadataItem",getModel:r})),a(o,S.FETCH_PRE_PLAY_RELATED_HUBS,(0,P.default)({key:"relatedHubs",getModel:r})),o));t.default=_,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e.get("ui").get("quickSearch")}function a(e){return e.reduce(function(e,t){var n=t.get("hubs").pluck("results");return e.concat(n.reduce(function(e,t){return e.concat(t.map(function(e){return e.entityID()}))},[]))},[])}var i=n(38).default,s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var l,u=n(12),d=s(u),c=n(26),f=o(c),p=n(92),h=n(317),v=s(h),g=n(158),m=n(434),y=s(m),b=n(69),P=s(b),w=n(152),S=s(w),_=n(785),T=s(_),I=n(122),M=o(I),C=n(255),x=n(42),E=o(x),k=(0,P.default)((l={},i(l,E.INIT_QUICK_SEARCH,function(e,t,n){var a=(0,p.findServerModel)(e,t),i=r(e),s=i.get("searches"),o=t.providerEntityIDs,l=t.providerIdentifier;s.reset(o.reduce(function(t,n){var r=(0,p.findProviderModel)(e,{providerEntityID:n}),i=r.get("identifier"),s=r.get("isLibraryProvider"),o=r.get("features").get(g.providerFeatureTypes.SEARCH);
if(o&&(s||i===l)){var u=l===i?"unshift":"push";t[u](new y.default({providerEntityID:n,key:o.get("key")},{server:a,provider:r}))}return t},[])),i.get("query")&&n(M.fetchQuickSearch())}),i(l,E.RESET_QUICK_SEARCH,function(e){var t=r(e),n=t.get("searches");t.set({query:"",selectedResultEntityID:null}),n.each(function(e){e.restoreDefaults({providerEntityID:e.get("providerEntityID"),key:e.get("key")})})}),i(l,E.FETCH_QUICK_SEARCH,function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=r(e),a=n.get("searches"),i=t.query,s=void 0===i?n.get("query"):i,o=t.limit;
a.each(function(e){var t=e.server;t.supports("quickSearch")&&t.get("isConnected")&&(e.abortPendingPopulate(),e.set("isSearchPending",!0),e.fetch({data:{sectionId:n.get("sectionID"),query:s,limit:o}}).done(function(){e.set({isSearchPending:!1,isSearchPopulated:!0,searchError:null})}).fail(function(t){e.set({isSearchPending:!1,searchError:t})}))})}),i(l,E.CHANGE_QUICK_SEARCH_QUERY,function(e,t,n){var a=r(e);""===t.trim()?n(M.resetQuickSearch()):(a.get("query").length>1&&t.length<2&&n(M.resetQuickSearch()),
a.set("query",t))}),i(l,E.CHANGE_QUICK_SEARCH_SETTINGS,function(e,t){var n=r(e),a=t.providerIdentifier,i=void 0===a?n.get("providerIdentifier"):a,s=t.sectionID,o=void 0===s?n.get("sectionID"):s,l=t.channelPlaceholder,u=void 0===l?n.get("channelPlaceholder"):l,d=t.channelID,c=void 0===d?n.get("channelID"):d,f=t.channelSearchKey,p=void 0===f?n.get("channelSearchKey"):f;n.set({providerIdentifier:i,sectionID:o,channelPlaceholder:u,channelID:c,channelSearchKey:p})}),i(l,E.SELECT_QUICK_SEARCH_RESULT,function(e,t){
var n=r(e),i=t.searchResultEntityID,s=t.offset;if(i)return void n.set("selectedResultEntityID",i);var o=a(n.get("searches")),l=o.indexOf(n.get("selectedResultEntityID")),u=o.length-1,d=-1,c=s>0?d:u,f=l+s,p=f<d||f>u,h=p?c:f,v=h===-1?null:o[h];n.set("selectedResultEntityID",v)}),i(l,E.NAVIGATE_QUICK_SEARCH_RESULT,function(e,t,n){var a=r(e),i=t.serverEntityID,s=null!=t.searchResultEntityID?t.searchResultEntityID:a.get("selectedResultEntityID"),o=(0,p.findSearchResultModel)(e,{searchResultEntityID:s}),l=(0,
p.findServerModel)(e,t),u=l.id;if(!o){var c=a.pick("query","channelID","channelSearchKey"),h=c.query,g=c.channelID,m=c.channelSearchKey;return null!=g&&null!=m?d.default.trigger("navigate","channel",{serverID:u,channelID:g,key:f.join(m,{query:h})}):d.default.trigger("navigate","search",{serverID:u,query:h}),void n(M.resetQuickSearch({serverEntityID:i}))}var y=o.pick("tagItem","metadataItem"),b=y.tagItem,P=y.metadataItem;if(b){var w=v.default.get(b.get("tagType")),_=w.typeString,I=o.provider.get("isLibraryProvider")?o.get("reasonID"):b.get("librarySectionKey"),C=(0,
S.default)(l.attributes,o.provider.attributes,I,{filters:b.has("filter")?b.get("filter"):_+"="+b.get("id"),filterLabel:b.get("tag")});return window.location.hash=C,void n(M.resetQuickSearch({serverEntityID:i}))}var x=(0,T.default)(l.attributes,o.provider.attributes,P.attributes);return x?(window.location.hash=x,void n(M.resetQuickSearch())):void n(M.playQuickSearchItem({searchResultEntityID:s}))}),i(l,E.PLAY_QUICK_SEARCH_RESULT,function(e,t,n){var a=r(e),i=t.serverEntityID,s=t.shuffle,o=void 0!==s&&s,l=null!=t.searchResultEntityID?t.searchResultEntityID:a.get("selectedResultEntityID"),u=(0,
p.findSearchResultModel)(e,{searchResultEntityID:l});return u?void(u.get("metadataItem")&&(n((0,C.playMetadataItem)({metadataItemEntityID:u.get("metadataItem").entityID(),shuffle:o})),n(M.resetQuickSearch({serverEntityID:i})))):void n(M.navigateQuickSearchResult(t.searchResultEntityID))}),l));t.default=k,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e.get("ui").get("recordingSchedulePage")}function a(e){return r(e).get("calendar")}var i=n(38).default,s=n(1).default,o=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0});var l,u=n(53),d=s(u),c=n(69),f=s(c),p=n(109),h=s(p),v=n(594),g=s(v),m=n(413),y=n(57),b=s(y),P=n(581),w=s(P),S=n(679),_=s(S),T=n(168),I=n(255),M=n(256),C=n(42),x=o(C),E=(0,f.default)((l={},i(l,x.INIT_RECORDING_SCHEDULE_PAGE,function(e,t){var n=r(e),a=n.get("mediaSubscriptions"),i=n.get("calendar"),s=(0,m.findServerModel)(e,t),o={isPagePopulated:!0,isCalendarPending:!1,isCalendarPopulated:!1,calendarError:null};a&&a.server===s||(o.mediaSubscriptions=new w.default([],{
server:s})),i&&i.server===s?i.restoreDefaults():o.calendar=new _.default({},{server:s}),n.set(o)}),i(l,x.CLEAR_RECORDING_SCHEDULE_PAGE,function(e){var t=r(e);t.set("isPagePopulated",!1)}),i(l,x.FETCH_MEDIA_SUBSCRIPTIONS,(0,h.default)({key:"mediaSubscriptions",getModel:r})),i(l,x.MOVE_MEDIA_SUBSCRIPTION,function(e,t){var n=r(e),a=n.get("mediaSubscriptions"),i=(0,m.findMediaSubscriptionModel)(e,t),s=i&&a.indexOf(i),o=t.moveIndex;if(s!==o&&s!==o-1){var l=o>s?o-1:o;a.remove(i),a.add(i,{at:l});var u=l>0?a.at(l-1).id:void 0;
(0,g.default)(i,u).fail(function(){a.remove(i),a.add(i,{at:s})})}}),i(l,x.SET_VISIBLE_DAYS,function(e,t,n){var r=a(e,t);r.set("visibleDays",t.visibleDays)}),i(l,x.GO_TO_TODAY,function(e,t,n){var r=a(e,t);r.set("time",(0,d.default)().toISOString())}),i(l,x.GO_TO_PREVIOUS_RANGE,function(e,t,n){var r=a(e,t),i=r.get("visibleDays"),s=(0,d.default)(r.get("time")).subtract(i,"days").toISOString();r.set("time",s)}),i(l,x.GO_TO_NEXT_RANGE,function(e,t,n){var r=a(e,t),i=r.get("visibleDays"),s=(0,d.default)(r.get("time")).add(i,"days").toISOString();
r.set("time",s)}),i(l,x.FETCH_CALENDAR,(0,h.default)({key:"calendar",getModel:r})),i(l,x.PLAY_RECORDING,function(e,t,n){var r=t.serverEntityID,a=t.linkedKey,i=(0,m.findServerModel)(e,t),s=new b.default({key:a},{server:i});s.populate().done(function(){n((0,I.playMetadataItem)({serverEntityID:r,metadataItemEntityID:s.entityID()}))})}),i(l,x.FINISH_ACTIVITY,function(e,t,n){var a=t.activity;if(a.type===T.activityTypes.PROVIDER_SUBSCRIPTION_PROCESS){var i=r(e),s=(0,m.findServerModel)(e,t);if(i.get("isPagePopulated")){
var o=i.get("calendar"),l=i.get("mediaSubscriptions");o&&o.server===s&&n((0,M.fetchCalendar)()),l&&l.server===s&&n((0,M.fetchMediaSubscriptions)())}}}),l));t.default=E,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e.get("ui").get("searchPage")}var a=n(38).default,i=n(79).default,s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var l,u=n(92),d=n(158),c=n(434),f=s(c),p=n(69),h=s(p),v=n(110),g=n(42),m=o(g),y=(0,h.default)((l={},a(l,m.POPULATE_SEARCH_PROVIDERS,function(e,t,n){
t.forEach(function(e){n((0,v.populateProviders)({serverEntityID:e}))})}),a(l,m.FETCH_SEARCH_PAGE,function(e,t,n){var a=r(e),s=a.get("searches"),o=t.availableProviders,l=t.query,c=t.limit;i(o).forEach(function(t){var n=o[t],r=(0,u.findServerModel)(e,{serverEntityID:n.serverEntityID}),a=(0,u.findProviderModel)(e,{providerEntityID:t}),i=a.get("features").get(d.providerFeatureTypes.SEARCH);i&&!s.get(t)&&s.add(new f.default({providerEntityID:t,key:i.get("key")},{server:r,provider:a}))}),s.each(function(e){
e.populatePromise||(e.set("isSearchPending",!0),e.fetch({data:{query:l,limit:c}}).done(function(){e.set({isSearchPending:!1,isSearchPopulated:!0,searchError:null})}).fail(function(t){e.set({isSearchPending:!1,searchError:t})}))})}),a(l,m.CLEAR_SEARCH_PAGE,function(e,t,n){var a=r(e);a.get("searches").each(function(e){e.abortPendingPopulate()}),a.restoreDefaults()}),l));t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(38).default,a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(92),o=n(69),l=a(o),u=n(109),d=a(u),c=n(42),f=i(c),p=(0,l.default)(r({},f.VIEW_ITEM_DETAILS,(0,d.default)({getModel:function(e,t){var n=(0,s.findMetadataItemModel)(e,{metadataItemEntityID:t});return e.get("ui").set("metadataItem",n),n.get("children")}})));t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e.get("user").get("desktop")}var a=n(38).default,i=n(19).default,s=n(93).default,o=n(1).default,l=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var u,d=n(3),c=o(d),f=n(8),p=o(f),h=n(49),v=o(h),g=n(69),m=o(g),y=n(109),b=o(y),P=n(299),w=o(P),S=n(591),_=o(S),T=n(42),I=l(T),M=(0,m.default)((u={},a(u,I.FETCH_PLANS,(0,b.default)({key:"plans",getModel:r})),a(u,I.POPULATE_PLANS,(0,w.default)({key:"plans",getModel:r})),a(u,I.REPOPULATE_UNWATCHED_WATCH_LATER_LIST,(0,_.default)({key:"unwatchedWatchLaterList",getModel:r})),a(u,I.REPOPULATE_UNWATCHED_RECOMMENDED_LIST,(0,_.default)({key:"unwatchedRecommendedList",getModel:r})),a(u,I.CLEAR_UPDATE_USER_ERROR,function(e){
var t=r(e);t.set("updateUserError",null)}),a(u,I.UPDATE_USER,function(e,t,n){var a=r(e),o=e.get("user"),l=t.avatar,u=i(t,["avatar"]);if(a.set({isUpdatingUser:!0,updateUserError:null}),l){for(var d=l.split(","),f=s(d,2),h=f[0],g=f[1],m=h.substr(5),y=atob(g),b=[],P=0;P<y.length;P++)b.push(y.charCodeAt(P));var w=new Uint8Array(b),S=new Blob([w],{type:m});u.avatar=S}var _=new FormData;c.default.each(u,function(e,t){_.append(t,e)});var T=o.server.getXHROptions(c.default.result(o,"url"),{type:"PUT",processData:!1,
contentType:!1,data:_});p.default.ajax(T).done(function(e){t.avatar&&o.fetch();var n=c.default.reduce(t,function(e,t,n){return o.hasAttr(n)&&(e[n]=t),e},{});o.set(n),a.set({isUpdatingUser:!1,updateUserError:null})}).fail(function(e){var t=v.default.parseXML(e.responseText),n=c.default.isArray(t)?t:[t.error],r=c.default.groupBy(n,function(e){return e.field?e.field:"request"});a.set({isUpdatingUser:!1,updateUserError:r})})}),u));t.default=M,e.exports=t.default},function(e,t,n){"use strict";function r(e){
var t=(0,s.default)(l.default,e);return t}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(1066),s=a(i),o=n(1370),l=a(o);e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,l.createSelector)(function(e,t){var n=t.activeFilters;return n},function(e,t){var n=t.selectedType;return n},function(e){return e.ui.libraryPage.selectedFilterKey},function(e){return e.ui.libraryPage.filterOptionQuery},function(e){return e.ui.libraryPage.selectedFilterOptions;
},function(e,t,n,r){var i=arguments.length<=4||void 0===arguments[4]?[]:arguments[4],s=t&&t.filters,l=o.default.findWhere(s,{key:n}),u=i;return r&&!function(){var e=r.trim().toLowerCase();u=u.filter(function(t){var n=t.title.toLowerCase();return n.indexOf(e)>-1})}(),l&&!function(){var t=e[l.filter],n=u.reduce(function(e,n){var r=(0,d.default)(t,n.key),i=r?e.selected:e.unselected;return i.push(a({},n,{isSelected:r})),e},{selected:[],unselected:[]});u=n.selected.concat(n.unselected)}(),u})}var a=n(11).default,i=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(3),o=i(s),l=n(15),u=n(621),d=i(u);e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,l.createSelector)(function(e,t){var n=t.activeFilters;return n},function(e,t){var n=t.activeFilterLabel;return n},(0,p.default)(),function(e,t,n){if(o.default.isEmpty(e)||!n)return(0,d.default)("All");var r=[],i=a(e),s=i.reduce(function(t,n){var r=e[n];return r.forEach(function(e){var r=e.type===c.BOOLEAN?t.boolean:t.other;r.push(n);
}),t},{"boolean":[],other:[]}),l=s.boolean,u=s.other;if(1===l.length){var f=l[0],p=o.default.findWhere(n.filters,{filter:f,filterType:c.BOOLEAN});p&&r.push(p.title)}return 1===u.length&&t&&r.push(t),r.length?r.join(" "):(0,d.default)("Filtered")})}var a=n(79).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(3),o=i(s),l=n(15),u=n(5),d=i(u),c=n(164),f=n(323),p=i(f);e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,o.createSelector)(function(e,t){
var n=t.activeSort;return n},(0,u.default)(),function(e,t){if(t){var n=e&&s.default.first(e.split(":")),r=s.default.find(t.sorts,function(t){return e?t.key===n||t.descKey===e:t.isDefault});return r||(r=s.default.first(t.sorts)),r}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(3),s=a(i),o=n(15),l=n(323),u=a(l);e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,u.createSelector)(function(e,t){var n=t.deviceIdentifier;return n},p.default,(0,
v.default)(),function(e,t,n){var r=n?n.channels:t.selectedDevice.channels,a=n?n.channelMappings:t.channelMappings,s=l.default.findWhere(a,{deviceIdentifier:e}),o=l.default.findWhere(r,{identifier:e});return i({name:o?o.name:void 0},s)})}function a(){return(0,c.default)(r(),function(e){return e})}var i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var o=n(3),l=s(o),u=n(15),d=n(238),c=s(d),f=n(96),p=s(f),h=n(257),v=s(h);e.exports=t.default},function(e,t,n){
"use strict";function r(){return(0,o.createSelector)((0,f.default)(),(0,d.default)(),function(e,t){return s.default.find(e,function(e){return e.type===l.activityTypes.GRABBER_GRAB&&e.context.itemKey&&e.context.itemKey===t.key})})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(15),l=n(168),u=n(48),d=a(u),c=n(210),f=a(c);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),i=n(238),s=r(i),o=n(96),l=r(o),u=(0,
a.createSelector)(l.default,function(e){return e.lineupChannels.reduce(function(e,t){var n=t.identifier+" "+t.callSign;return t.title&&(n+=" ("+t.title+")"),e[t.identifier]=n,e},{})}),d=(0,s.default)(u,function(e){return e});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(15),i=n(135),s=r(i),o=(0,a.createSelector)(s.default,function(e){return e.searchResults});t.default=o,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(15),o=n(170),l=r(o),u=void 0,d=(0,s.createSelector)(l.default,function(e){var t=i.default.pluck(e.activeSelectionItems,"id");return u&&i.default.isEqual(u,t)?u:(u=t,t)});t.default=d,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={NONE:100,SMALL:150,LARGE:200,HUGE:250};n.settings=[{value:n.NONE,title:"None"},{value:n.SMALL,title:"Small"},{value:n.LARGE,
title:"Large"},{value:n.HUGE,title:"Huge"}],t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={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"}};t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={PENDING:"pending",FAILED:"failed",COMPLETE:"complete",failureCodes:{INVALID_PATH:"invalidPath",DISK_FULL:"diskFull",DISK_UNWRITABLE:"diskUnwritable"}};t.default=n,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={TINY:50,SMALL:75,NORMAL:100,LARGE:125,HUGE:200};n.settings=[{value:n.TINY,title:"Tiny"
},{value:n.SMALL,title:"Small"},{value:n.NORMAL,title:"Normal"},{value:n.LARGE,title:"Large"},{value:n.HUGE,title:"Huge"}],t.default=n,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i),o=n(8),l=r(o),u=n(5),d=r(u),c=n(35),f=r(c),p=n(12),h=r(p),v=n(51),g=r(v),m=n(165),y=r(m),b=n(49),P=r(b),w=n(56),S=r(w),_=n(14),T=a(_),I=n(110),M=a(I),C=n(208),x=a(C),E=n(57),k=r(E),D=n(193),A=r(D),O=n(133),R=r(O),L=n(84),N=n(670),j=r(N),U=n(254),$=r(U),z=n(668),F=r(z),B=n(253),V=r(B),H=f.default.extend({
mixins:S.default,url:function q(){var e=this.server.get("activeConnection"),t=e.id.replace(/^http/,"ws"),q=this.server.resolveUrl("/:/websockets/notifications",{connection:new R.default({uri:t}),appendToken:!0});return q},initialize:function(e){s.default.bindAll(this,"onOpen","onClose","onError","onMessage"),this.server=e.server},open:function(){return this.socket&&this.close(),this._deferred=l.default.Deferred(),this.socket=new WebSocket(s.default.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(e){if(!L.providerIdentifiers.EPG_IDENTIFIER.test(e.identifier)){e.server=this.server;var t={server:this.server,onlyIfCached:!0},n=new A.default({key:e.sectionID},t);if(!s.default.isEmpty(n)){t.section=n,e.section=n;var r="/library/metadata/"+e.itemID,a=new k.default({key:r},t);if(s.default.isEmpty(a)||(e.item=a,a.set({metadataState:e.metadataState,
mediaState:e.mediaState}),a.trigger("socket:timeline",e)),e.rootItemID){var i="/library/metadata/"+e.rootItemID,o=new k.default({key:i},t);s.default.isEmpty(o)||(o.fetch(),o.refreshChildren())}if(e.parentItemID){var l="/library/metadata/"+e.parentItemID,u=new k.default({key:l},t);s.default.isEmpty(u)||(u.fetch(),u.refreshChildren())}n.trigger("socket:timeline",e)}e.server.trigger("socket:timeline",e),h.default.trigger("timeline",e)}},status:function W(e){var W=e.title+(e.description?": "+e.description:"");
if(h.default.trigger("show:status",this.server,W),this.server.trigger("socket:status",e),"LIBRARY_UPDATE"===e.notificationName){var t=T.resolve("appStore"),n=this.server.entityID();n&&(t.dispatch(M.fetchLibraries({serverEntityID:n})),t.dispatch(x.repopulatePage()))}},progress:function(e){h.default.trigger("show:status",this.server,e.message),this.server.trigger("socket:status",e)},playing:function(e){if(e.sessionKey&&!this.server.get("shared")){var t=this.server.get("sessions"),n=t.get(e.sessionKey);
if(n&&n.get("key")===e.key)if(e.state===g.default.states.STOPPED){n.trigger("destroy",n,n.collection),n.cache.remove(n);var r=T.resolve("appStore"),a=this.server.entityID();a&&r.dispatch(x.repopulatePage())}else{var i=n.get("Player");i&&(i.state=e.state,n.trigger("change:Player",n,i)),n.set("viewOffset",e.viewOffset)}else{if(t.hasPendingPopulate())return;var o=t.fetch();o.done(s.default.bind(function(){if(n=t.get(e.sessionKey)){var r=T.resolve("appModel"),a=r.get("user"),i=n.get("Player").title,o=n.get("User").title,l=n.get("grandparentTitle"),u=n.get("title");
l&&(u=l+" - "+u);var c=(0,d.default)("{1} started playing {2} on {3}.",o,u,i);o&&o!==a.get("username")&&h.default.trigger("show:status",this.server,c),this.server.trigger("socket:playing",s.default.extend(e,{username:o||(0,d.default)("Unknown"),title:u,player:i}))}},this))}}},syncState:function(e){var t=new j.default({key:e.key},{server:this.server,syncItemId:e.syncItemId,onlyIfCached:!0});if(!s.default.isEmpty(t)){var n=t.get("Media");s.default.each(n,function(n){var r=n.Part;s.default.each(r,function(n){
n.transcodeState=e.syncFileState,n.transcodeStateContext=e.syncFileStateContext,n.syncState=e.syncState,n.syncStateContext=e.syncStateContext;var r=y.default.getSyncStateFromPart(n);y.default.waitingRegex.test(r)&&(n.key="placeholder"),t.trigger("change:Media",t,t.get("Media"))})})}},backgroundGeneratorState:function(e){var t={server:this.server,onlyIfCached:!0},n=new $.default({id:e.generatorID},t);s.default.isEmpty(n)||n.fetch()},versionState:function(e){var t={server:this.server,onlyIfCached:!0
},n=new $.default({id:e.generatorID},t);if(!s.default.isEmpty(n)){var r=n.get("children").getCollection(),a=r.get(e.metadataItemID);a&&a.set({processingState:e.state,processingStateContext:e.stateContext})}},backgroundProcessingQueue:function(e){var t=new F.default([],{server:this.server,allowInCache:!0,onlyIfCached:!0});if(!s.default.isEmpty(t)){var n=t.first();n&&n.fetch()}},"transcodeSession.start":function(e){if("static"===e.context){var t=new V.default([],{server:this.server,allowInCache:!0,
onlyIfCached:!0});s.default.isEmpty(t)||t.fetch()}},"transcodeSession.update":function(e){if("static"===e.context){var t=new V.default([],{server:this.server,allowInCache:!0,onlyIfCached:!0});if(!s.default.isEmpty(t)){var n=t.get(e.key);n?n.set(n.parse(e)):t.fetch()}}},"transcodeSession.end":function(e){this["transcodeSession.start"].apply(this,arguments)},"update.statechange":function(e){var t=this.server.get("update"),n=s.default.pick(e,t.whitelistedAttrs);s.default.defaults(n,s.default.result(t,"defaults")),
"downloading"===t.get("state")&&"available"===n.state&&(n.state="downloading"),t.set(n)},reachability:function(e){var t=this.server.get("cloudAccount");t.fetch()},account:function(e){if(this.server.set("myPlexSubscription",e.hasPlexPass),this.server.supports("reachability")){var t="/myplex/refreshReachability",n=s.default.extend(this.server.getXHROptions(t),{type:"PUT"});l.default.ajax(n)}var r=T.resolve("appModel"),a=r.get("cloudServer"),i=r.get("user");i.get("isSignedIn")&&a.get("resources").fetch();
},activity:function G(e){P.default.splitChildren(e);var t=T.resolve("appStore"),n=this.server.entityID(),G=e.Activity?e.Activity[0]:e;G.Context?(G.context=G.Context[0],delete G.Context):G.context={},G.Response?(G.response=G.Response[0],delete G.Response):G.response={},n&&("started"===e.event?t.dispatch(M.startActivity({serverEntityID:n,activity:G})):"updated"===e.event?t.dispatch(M.updateActivity({serverEntityID:n,activity:G})):"ended"===e.event&&t.dispatch(M.finishActivity({serverEntityID:n,activity:G
})))},onOpen:function(e){this.server.trigger("socket:websocket",{opened:!0}),this.trigger("open",this.server,e),this._deferred.resolve(this.server,e);var t=T.resolve("appStore"),n=this.server.entityID();n&&t.dispatch(M.eventConnectionOpen({serverEntityID:n,event: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(e){var t;try{t=JSON.parse(e.data)}catch(n){return}var r=t.type,a=this[r];s.default.each(t._children,function(e){this.trigger("message",e),s.default.isFunction(a)&&a.call(this,e)},this)}});t.default=H,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2269),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({
tagName:"span",template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2270),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=n(32),p=r(f),h=n(95),v=r(h),g=u.default.ItemView.extend({className:"background-container",template:i.default,ui:{background:".background"},onlyAfterRender:["onTransitionIn","onTransitionOut","onImageLoad"],initialize:function(){o.default.bindAll(this,"onImageLoad"),this.image=new v.default({
width:1280,height:720}),this.listenTo(c.default,"show:background",this.onTransitionIn),this.listenTo(c.default,"hide:background",this.onTransitionOut)},load:function(e){if(!this.model)return void p.default.warn("A background cannot be loaded without a model, current key: "+this.currentKey);if(this.currentBackground!==e||!o.default.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}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2271),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(14),h=a(p),v=n(12),g=r(v),m=n(51),y=r(m),b=n(63),P=r(b),w=n(688),S=r(w),_=n(1408),T=r(_),I=n(690),M=r(I),C=n(1429),x=r(C),E=n(1617),k=r(E),D=n(1616),A=r(D),O=n(1611),R=r(O),L=n(1610),N=r(L),j=n(1614),U=r(j),$=n(1612),z=r($),F=n(1608),B=r(F),V=n(258),H=r(V),q=n(1351),W=r(q),G=f.default.Layout.extend({
el:"#plex",template:s.default,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(){l.default.bindAll(this,"triggerResizeEvent","onResize","onScroll");var e=h.resolve("appModel");this.user=e.get("user"),this.modals=[],this.playerConstructors={full:{},mini:{}},this.playerConstructors.full[y.default.types.VIDEO]=k.default,this.playerConstructors.full[y.default.types.PHOTO]=U.default,
this.playerConstructors.mini[y.default.types.VIDEO]=A.default,this.playerConstructors.mini[y.default.types.MUSIC]=R.default,this.playerConstructors.mini[y.default.types.PHOTO]=z.default,l.default.each(l.default.keys(this.customRegions),function(e){var t=this.customRegions[e],n=t.selector||l.default.uniqueId("r");t.scrollable?this.addRegion(e,new W.default({el:n,channelName:t.channelName})):this.addRegion(e,n)},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(g.default,{"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}),(0,d.default)(window).on("resize",this.onResize)},showCustomRegion:function(e,t){var n=this.customRegions[e],r=this[e];return this.user.get("locked")?(r.lockedView=t,void t.close()):void(n.append?r.append(t,this.$el):n.prepend?r.prepend(t,this.$el):r.show(t))},showLoading:function(){this.hideBar("alertbar"),this.user.get("locked")&&this.resetContentLockedRegions(),this.showCustomRegion("content",new S.default);
},showView:function(e){(0,d.default)(".tooltip").remove(),this.hideBackground(this.currentView,e),g.default.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 M.default(e);this.openAlerts[t]=!0,this.listenToOnce(n,"close",function(){delete this.openAlerts[t]}),this.$el.append(n.render().el)}},showAlertBar:function(){var e=P.default.get("alerts");e&&e.length&&(P.default.set("alerts",null),
this.showBar("alertbar",new H.default({alert:l.default.first(e)})))},showBar:function(e,t){var n=this.customRegions[e],r=n.modifier;r&&this.$el.addClass(this.customRegions[e].modifier),t&&this.showCustomRegion(e,t)},hideBar:function(e,t){t||(t={});var n=this.customRegions[e],r=n.modifier;r&&this.$el.removeClass(r),t.preserve||(this[e].lockedView=null,this[e].close())},showModal:function(e){this.modals.push(e);var t=(0,d.default)("body");e.transparent&&t.addClass("show-modal-transparent"),t.append(e.render().el);
},hideModal:function(e){var t=l.default.indexOf(this.modals,e);t>-1&&this.modals.splice(t,1)[0].close(),e.transparent&&!l.default.findWhere(this.modals,{transparent:!0})&&(0,d.default)("body").removeClass("show-modal-transparent")},showPlayer:function(e){this.hideLoadingMiniPlayerView(),(0,d.default)(".tooltip").remove();var t=this.player.currentView,n=t&&t.playQueue===e.playQueue;if(e.controller||!n){var r=e.useMiniPlayer||e.type===y.default.types.MUSIC,a=h.resolve("appModel"),i=a.get("primaryPlayer"),s=i&&"cast"===i.get("protocol"),o=s||e.type===y.default.types.VIDEO;
(o||e.isSwitchingPlayers)&&this.hidePlayer();var l=this.playerConstructors[r?"mini":"full"][e.type],u=new l(e);r?(this.showCustomRegion("miniPlayer",u),this.$el.addClass("show-mini-player")):this.showCustomRegion("player",u)}},showPlayerLoading:function(){this.showCustomRegion("miniPlayer",new N.default)},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;g.default.trigger("audio:fadeOut",{exceptKey:n}),e&&e.model&&g.default.trigger("hide:background",this.currentView.model)},hideLoadingMiniPlayerView:function(){this.miniPlayer.currentView instanceof N.default&&(this.miniPlayer.currentView.$el.remove(),this.miniPlayer.close())},lockAll:function(){
var e=l.default.map(l.default.keys(this.customRegions),function(e){return this[e]},this);l.default.each(e,function(e){e.close()},this)},resetContentLockedRegions:function(){l.default.each(l.default.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=h.resolve("appModel");e.get("authorized")&&this.showBar("navbar",new B.default({model:e}),{prepend:!0}),this.showCustomRegion("background",this.backgroundView),
this.showCustomRegion("status",new x.default)},triggerResizeEvent:function(){g.default.trigger("resize")},onRender:function(){this.backgroundView=new T.default,this.restoreAll()},onAuthorizedChange:function(e,t){if(t){var n=h.resolve("appModel");this.showBar("navbar",new B.default({model:n}),{prepend:!0});var r=this.user.get("locked");r!==!1&&null!==r||this.showAlertBar()}else this.hideBar("navbar"),this.hidePlayer(),g.default.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 T.default),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}});t.default=G,e.exports=t.default},function(e,t,n){"use strict";var r=n(11).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2272),s=a(i),o=n(13),l=a(o),u=l.default.ItemView.extend({template:s.default,className:"download-server-pane",serializeData:function(){
var e=this.model.toJSON();return r({shouldUseDropup:e.releases.length>4},e)}});t.default=u,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2273),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=n(27),p=r(f),h=10,v=1,g=-1,m=u.default.ItemView.extend({tagName:"span",className:"rating heart-rating",template:i.default,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")===h;t.toggleClass("user-rating",n)}},".like-meh-btn > i":{modelAttribute:"userRating",formatter:function(e,t){var n=this.model.get("userRating")===h;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")===v;t.toggleClass("user-rating",n)}}},persistRating:function(e){return p.default.execute("rate",{
item:this.model,rating:e})},onUserRatingChange:function(e,t){this.render()},onLikeMehClick:function(e){this.persistRating(this.model.get("userRating")===h?g:h)},onDislikeClick:function(){return this.model.get("userRating")===v?void this.persistRating(g):void this.persistRating(v).done(o.default.bind(function(){var e=this.model.server.get("playQueueManager"),t=e.getFor(this.model);t.fetch().then(function(){c.default.trigger("shortcut:skipNext")})},this))}});t.default=m,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2274),s=r(i),o=n(13),l=r(o),u=n(14),d=a(u),c=n(76),f=r(c),p=l.default.ItemView.extend({template:s.default,initialize:function(){var e=d.resolve("appModel");this.listenTo(e,"change:primaryServer",this.render),this.listenTo(e.get("user"),"change:signedIn",this.render)},serializeData:function(){var e=d.resolve("appModel"),t=e.get("user"),n=e.get("primaryServer"),r={host:window.location.host,userAgent:window.navigator.userAgent,
browser:f.default,user:t.toJSON(),hasPlexPass:t.hasPlexPass(),cloudServer:t.server.toJSON(),cloudServerUrl:t.server.url()};return n&&(r.primaryServer=n.toJSON(),r.primaryServerUrl=n.url()),r}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2276),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({className:"logs-container",template:i.default,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())}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,a=n(7).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(i(o),n(61)),u=i(l),d=n(21),c=n(14),f=n(72),p=s(f),h=n(66),v=i(h),g=n(143),m=i(g),y=n(183),b=i(y),P=n(184),w=i(P),S=n(1868),_=i(S),T=n(186),I=i(T),M=m.default.extend({
mountReact:function(){var e=(0,c.resolve)("appStore"),t=this.options.selectedServerID,n=this.options.query,i=(0,v.default)(p.SERVER,this.options.serverID);u.default.render({$$typeof:a,type:d.Provider,key:null,ref:null,props:r(d.Provider.defaultProps,{children:{$$typeof:a,type:I.default,key:null,ref:null,props:r(I.default.defaultProps,{serverEntityID:i}),_owner:null},store:e}),_owner:null},this.ui.sidebar[0]),u.default.render({$$typeof:a,type:d.Provider,key:null,ref:null,props:r(d.Provider.defaultProps,{
children:{$$typeof:a,type:b.default,key:null,ref:null,props:r(b.default.defaultProps,{children:{$$typeof:a,type:w.default,key:null,ref:null,props:r(w.default.defaultProps,{children:{$$typeof:a,type:_.default,key:null,ref:null,props:r(_.default.defaultProps,{machineIdentifier:t,serverEntityID:i,query:n}),_owner:null}}),_owner:null},machineIdentifier:this.options.selectedServerID}),_owner:null},store:e}),_owner:null},this.ui.page[0])}});t.default=M,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(2277),s=r(i),o=n(3),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=d.default.ItemView.extend({className:"sign-in-form",template:s.default,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,f.resolve("metrics").trackView({page:"signIn",firstRun:this.isFirstRun})},serializeData:function(){return{showRememberMe:this.showRememberMe}},validateAll:function(e,t,n){var r=!0;return t||(t=this.validationFields),l.default.each(t,l.default.bind(function(t){var a=e[t];this.validate(a,n[t],n)||(r=!1)},this)),r},validate:function(e,t,n){var r,a=e.id;if(l.default.indexOf(this.validationFields,a)<0)return!0;
var i=this.ui[a];return r="confirm"===e.id?t===e.form.password.value:!!t,i.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"),f.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"),f.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)}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(61)),l=i(o),u=n(21),d=n(14),c=n(143),f=i(c),p=n(1905),h=i(p),v=n(1774),g=i(v),m={
$$typeof:a,type:h.default,key:null,ref:null,props:r(h.default.defaultProps,{}),_owner:null},y={$$typeof:a,type:g.default,key:null,ref:null,props:r(g.default.defaultProps,{}),_owner:null},b=f.default.extend({mountReact:function(){var e=(0,d.resolve)("appStore");l.default.render({$$typeof:a,type:u.Provider,key:null,ref:null,props:r(u.Provider.defaultProps,{children:m,store:e}),_owner:null},this.ui.sidebar[0]),l.default.render({$$typeof:a,type:u.Provider,key:null,ref:null,props:r(u.Provider.defaultProps,{
children:y,store:e}),_owner:null},this.ui.page[0])}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2280),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(5),h=r(p),v=n(12),g=r(v),m=n(26),y=a(m),b=n(27),P=r(b),w=n(445),S=r(w),_=n(444),T=r(_),I=n(146),M=r(I),C=n(173),x=r(C),E=n(706),k=r(E),D=n(707),A=r(D),O=n(265),R=r(O),L=n(264),N=r(L),j=n(263),U=r(j),$=n(175),z=r($),F=["episode","movie","clip","userPlaylistItem"],B={
preventDefault:!0,stopPropagation:!1},V=f.default.ItemView.extend({className:"action-bar",template:s.default,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":l.default.extend({
event:"playVersion"},B),"click .download-btn":l.default.extend({event:"download"},B),"click .play-all-btn":l.default.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":l.default.extend({event:"analyze"},B),"click .mark-watched-btn":"markWatched","click .mark-unwatched-btn":"markUnwatched","click .match-btn":l.default.extend({
event:"fixMatch"},B),"click .select-btn":"select","click .deselect-btn":"deselect","click .fix-match-btn":l.default.extend({event:"fixMatch"},B),"click .unmatch-btn":l.default.extend({event:"unmatch"},B),"click .split-apart-btn":l.default.extend({event:"splitApart"},B),"click .merge-btn":l.default.extend({event:"merge"},B),"click .sync-btn":"sync","click .convert-btn":l.default.extend({event:"convert"},B),"click .watch-later-btn":l.default.extend({event:"watchLater"},B),"click .share-btn":l.default.extend({
event:"share"},B),"click .recommend-btn":l.default.extend({event:"recommend"},B),"click .delete-btn":l.default.extend({event:"delete"},B),"click .delete-versions-btn":l.default.extend({event:"deleteVersions"},B),"click .delete-from-user-playlist-btn":l.default.extend({event:"deleteFromUserPlaylist"},B),"click .info-btn":l.default.extend({event:"info"},B),"click .play-next-btn":l.default.extend({event:"playNext"},B),"click .add-to-queue-btn":l.default.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",l.default.throttle(this.updateDropdown,50)),this.listenTo(this.mediaActions,"change:selectedItems",this.onSelectedItemsChange),
this.listenTo(g.default,{"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(g.default,"shortcut:play",this.onPlayUnwatched),this.listenTo(g.default,"shortcut:delete",this.onDeleteFromUserPlaylist)},serializeData:function(){var e=l.default.extend({},this.mediaActions.attributes);
if(e.isSingleItem=l.default.contains(F,this.type),this.mediaActions.get("showDownload")){e.downloadUrl=this.model.getDownloadUrl();var t=this.model.getFilepath();t&&(e.downloadName=y.getLastSegment(t))}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 r=this.ui.secondaryDivider,a=r.prevAll(":not(:has(.hidden))").length,i=r.nextAll(":not(:has(.hidden))").length;
r.toggleClass("hidden",!a||!i)}},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()||P.default.execute("playMedia",{items:this.mediaActions.getActionTargets()})},onPlayVersion:function(){this.ui.playVersionBtn.isDisabled()||g.default.trigger("show:modal",new S.default({model:this.model}))},onDownload:function(){this.model.get("Media").length>1?g.default.trigger("show:modal",new T.default({model:this.model})):window.location.href=this.model.getDownloadUrl()},onPlayUnwatched:function(){this.ui.playUnwatchedBtn.isDisabled()||P.default.execute("playMedia",{
items:this.mediaActions.getActionTargets(),unwatched:!0})},onPlayShuffled:function(){this.ui.playShuffledBtn.isDisabled()||P.default.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")});P.default.execute("playMedia",{items:[n]})}},onEdit:function(){this.ui.editBtn.isDisabled()||(this.model.get("isPlaylist")?g.default.trigger("show:modal",new k.default({
model:this.model})):g.default.trigger("show:modal",new x.default({mediaActions:this.mediaActions})))},onRefresh:function(){this.ui.refreshBtn.isDisabled()||P.default.execute("refreshMetadata",{items:this.mediaActions.getActionTargets()})},onAnalyze:function(){this.ui.analyzeBtn.isDisabled()||P.default.execute("analyzeItems",{items:this.mediaActions.getActionTargets()})},onMarkWatched:function(){this.ui.markWatchedBtn.isDisabled()||P.default.execute("markWatched",{items:this.mediaActions.getActionTargets()
})},onMarkUnwatched:function(){this.ui.markUnwatchedBtn.isDisabled()||P.default.execute("markUnwatched",{items:this.mediaActions.getActionTargets()})},onSelect:function(){this.mediaActions.set("selecting",!0)},onDeselect:function(){this.mediaActions.set("selecting",!1)},onFixMatch:function(){g.default.trigger("show:modal",new A.default({model:this.model}))},onUnmatch:function(){P.default.execute("unmatch",{item:this.model})},onSplitApart:function(){P.default.execute("splitApart",{item:this.model});
},onSync:function(){this.ui.syncBtn.isDisabled()||P.default.execute("showSyncModal",{item:this.model,items:this.mediaActions.getActionTargets()})},onConvert:function(){g.default.trigger("show:modal",new z.default({item:this.model,items:this.mediaActions.getActionTargets()}))},onWatchLater:function(){this.ui.watchLaterBtn.isDisabled()||P.default.execute("watchLater",{item:this.model})},onShare:function(){this.ui.shareBtn.isDisabled()||g.default.trigger("show:modal",new R.default({model:this.model}));
},onRecommend:function(){this.ui.recommendBtn.isDisabled()||g.default.trigger("show:modal",new N.default({model:this.model}))},onDelete:function(){this.ui.deleteBtn.isDisabled()||(this.model.get("playlistType")?P.default.execute("deletePlaylist",{item:this.model}):P.default.execute("deleteItems",{items:this.mediaActions.getActionTargets()}))},onDeleteVersions:function(){this.ui.deleteBtn.isDisabled()||P.default.execute("deleteVersions",{item:this.model})},onDeleteFromUserPlaylist:function(){if(!this.ui.deleteFromUserPlaylistBtn.isDisabled()){
var e=this.model.destroy();e.done(l.default.bind(function(){(0,d.default)(".tooltip").remove(),g.default.trigger("navigate","userPlaylist",{key:this.model.userPlaylistKey})},this))}},onInfo:function(){this.ui.infoBtn.isDisabled()||g.default.trigger("show:modal",new U.default({model:this.model}))},onPlayNext:function(){this.ui.playNextBtn.isDisabled()||P.default.execute("queueMedia",{item:this.model,next:!0})},onAddToQueue:function(){this.ui.addToQueueBtn.isDisabled()||P.default.execute("queueMedia",{
item:this.model,next:!1})},onAddToPlaylist:function(){this.ui.addToPlaylistBtn.isDisabled()||g.default.trigger("show:modal",new M.default({model:this.model,items:this.mediaActions.getActionTargets(),title:this.mediaActions.getActionTargetsTitle()}))},onMerge:function(){if(!this.ui.mergeBtn.isDisabled()){var e=this.mediaActions.getActionTargets(),t=l.default.first(e),n=e.slice(1);P.default.execute("merge",{item:t,items:n})}},onSelectedItemsChange:function(e,t){var n=t&&t.length?(0,h.default)("Play selected"):(0,
h.default)("Play All");this.ui.playBtn.attr("data-original-title",n)}});t.default=V,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2281),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=n(1667),p=r(f),h=u.default.Layout.extend({className:"playlists-side-bar-container",template:i.default,regions:{sidebar:".side-bar"},triggers:{"click .options-btn":"toggleSidebar"},onlyAfterRender:["onToggleSidebar"],initialize:function(){
this.listenTo(c.default,{"shortcut:sidebar":this.onToggleSidebar})},onRender:function(){this.$el.tooltip({selector:".nav > li > a",container:"body",placement:"right"}),this.sidebar.append(new p.default({model:this.model}),this.$el)},onToggleSidebar:function(){(0,o.default)(".tooltip").remove();var e=this.sidebar.currentView;e.hidden?e.open():e.hide()}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2282),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(14),h=a(p),v=n(5),g=r(v),m=n(12),y=r(m),b=n(27),P=r(b),w=n(1668),S=r(w),_=n(1570),T=r(_),I=n(146),M=r(I),C=n(173),x=r(C),E=n(174),k=r(E),D=n(175),A=r(D),O={
preventDefault:!0,stopPropagation:!1},R=f.default.Layout.extend({className:"section-side-bar-container",template:s.default,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":l.default.extend({event:"refresh"},O),"click .analyze-btn":l.default.extend({event:"analyze"},O),"click .mark-watched-btn":"markWatched","click .mark-unwatched-btn":"markUnwatched","click .add-to-collection-btn":l.default.extend({event:"addToCollection"
},O),"click .add-to-playlist-btn":"addToPlaylist","click .merge-btn":l.default.extend({event:"merge"},O),"click .sync-btn":"sync","click .convert-btn":l.default.extend({event:"convert"},O),"click .delete-btn":l.default.extend({event:"delete"},O)},initialize:function(e){this.bindAllWhenRendered("updateDropdown");var t=h.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(y.default,{"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 S.default({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,t){if(t){var n=t&&t.length?(0,g.default)("Play selected"):(0,g.default)("Play All");this.ui.playBtn.attr("data-original-title",n),l.default.defer(this.updateDropdown);
}},onToggleSidebar:function(){(0,d.default)(".tooltip").remove();var e=this.sidebar.currentView;e.hidden?e.open():e.hide()},onPlay:function(){this.ui.playBtn.isDisabled()||P.default.execute("playMedia",{items:this.mediaActions.getActionTargets()})},onPlayShuffled:function(){this.ui.playShuffledBtn.isDisabled()||P.default.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;y.default.trigger("show:modal",new x.default({mediaActions:this.mediaActions}))}else y.default.trigger("show:modal",new k.default({server:this.model.server,model:this.model}))}},onRefresh:function(){return this.ui.refreshBtn.isDisabled()?void P.default.execute("updateLibrary",{section:this.model}):void P.default.execute("refreshMetadata",{
items:this.mediaActions.getActionTargets()})},onAnalyze:function(){return this.ui.analyzeBtn.isDisabled()?void P.default.execute("analyzeSection",{section:this.model}):void P.default.execute("analyzeItems",{items:this.mediaActions.getActionTargets()})},onMarkWatched:function(){this.ui.markWatchedBtn.isDisabled()||P.default.execute("markWatched",{items:this.mediaActions.getActionTargets()}).then(l.default.bind(function(){this.mediaActions.updateAll()},this))},onMarkUnwatched:function(){this.ui.markUnwatchedBtn.isDisabled()||P.default.execute("markUnwatched",{
items:this.mediaActions.getActionTargets()}).then(l.default.bind(function(){this.mediaActions.updateAll()},this))},onAddToCollection:function(){this.ui.addToCollectionBtn.isDisabled()||y.default.trigger("show:modal",new T.default({items:this.mediaActions.getActionTargets()}))},onAddToPlaylist:function(e){if(!this.ui.addToPlaylistBtn.isDisabled()){var t=this.mediaActions.getActionTargets();y.default.trigger("show:modal",new M.default({model:t[0],items:t,title:this.mediaActions.getActionTargetsTitle()
}))}},onMerge:function(){if(!this.ui.mergeBtn.isDisabled()){var e=this.mediaActions.getActionTargets(),t=l.default.first(e),n=e.slice(1);P.default.execute("merge",{item:t,items:n})}},onSync:function(){if(!this.ui.syncBtn.isDisabled()){var e=this.mediaActions.getActionTargets();P.default.execute("showSyncModal",{item:e[0],items:e})}},onConvert:function(){var e=this.mediaActions.getActionTargets();y.default.trigger("show:modal",new A.default({item:e[0],items:e}))},onDelete:function(){this.ui.deleteBtn.isDisabled()||P.default.execute("deleteItems",{
items:this.mediaActions.getActionTargets(),skipRedirect:!0})}});t.default=R,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2283),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(253),c=r(d),f=n(1421),p=r(f),h=n(1425),v=r(h),g=n(1422),m=r(g),y=n(1423),b=r(y),P={alerts:p.default,sync:v.default,conversion:m.default,nowPlaying:b.default},w=u.default.Layout.extend({className:"container",template:i.default,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 c.default([],{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};o.default.each(o.default.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=P[this.subset];this.container.show(new e(this.options)),this.updateBadges()}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2284),s=r(i),o=n(13),l=r(o),u=n(14),d=a(u),c=n(5),f=r(c),p=n(12),h=r(p),v=n(260),g=r(v),m=n(1484),y=r(m),b=l.default.Layout.extend({
className:"alerts-container",template:s.default,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=d.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((0,f.default)("{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 g.default),this.shared||this.list.append(new y.default({collection:this.listCollection}))},onPrimaryServerChange:function(e,t){t&&h.default.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())}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2285),s=r(i),o=n(3),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=n(5),h=r(p),v=n(12),g=r(v),m=n(159),y=r(m),b=n(561),P=r(b),w=n(978),S=r(w),_=n(260),T=r(_),I=n(1493),M=r(I),C=n(1494),x=r(C),E=d.default.Layout.extend({
className:"conversion-container",template:s.default,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=f.resolve("appModel");this.playQueue=e.playQueue,
this.transcodeJobs=e.transcodeJobs,this.generators=e.generators,this.items=this.playQueue.get("collection"),this.upNextItems=new P.default(this.items,{playQueue:this.playQueue,includeSelectedItem:!0}),this.afterUpNextItems=new S.default(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:y.default.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 x.default({
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.get("state")?e+=Math.max(n.get("itemsCount"),1):n.get("itemsFailedCount")&&(e+=n.get("itemsFailedCount")),e},0);if(e)return 1===e?(0,h.default)("There was a problem converting 1 item."):(0,h.default)("There were problems converting {1} items.",e)},onRender:function(){this.filterBar.append(new T.default);
var e={playQueue:this.playQueue},t={playQueue:this.playQueue,transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting};this.upNextList.show(new M.default(l.default.extend({},e,{collection:this.upNextItems,itemViewOptions:t,sortableOptions:{sort:!0,group:{name:"upNext",pull:!1,put:["afterUpNext"]}}}))),this.afterUpNextList.show(new M.default(l.default.extend({},e,{collection:this.afterUpNextItems,itemViewOptions:l.default.extend({},t,{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&&g.default.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)}});t.default=E,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2286),s=r(i),o=n(13),l=r(o),u=n(14),d=a(u),c=n(12),f=r(c),p=n(159),h=r(p),v=n(260),g=r(v),m=n(1486),y=r(m),b=l.default.Layout.extend({className:"now-playing-container",template:s.default,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=d.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:h.default.publicNowPlaying}},onRender:function(){this.filterBar.append(new g.default),this.shouldShowList()&&this.list.show(new y.default({collection:this.collection}))},onPrimaryServerChange:function(e,t){t&&f.default.trigger("navigate","nowPlaying",{serverID:t.id})},onSharedChange:function(e,t){this.shared=t,this.render()}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(2287),i=r(a),s=n(13),o=r(s),l=n(5),u=r(l),d=n(138),c=r(d),f=n(1489),p=r(f),h=o.default.Layout.extend({className:"sync-device-items-container",template:i.default,ui:{loading:".row-loading",empty:".sync-empty-message",deviceMessage:".sync-device-message",deviceMessageText:".sync-device-message-text"},regions:{list:".sync-item-list-container"},onlyAfterRender:["updateLoading","updateEmptyMessage","updateStatusMessage","updateSyncList"],initialize:function(e){
var t=this;this.server=e.server;var n=this.model.get("syncList");n?n.fetch({scope:"page"}).done(function(){t.onSyncItemsReset()}):this.onSyncItemsReset()},updateLoading:function(){this.ui.loading.addClass("hidden")},updateEmptyMessage:function(){var e=this.syncList,t=!e||0===e.getCollection().length;this.ui.empty.toggleClass("hidden",!t)},updateStatusMessage:function(){var e=this.syncList,t=!e||e.get("isActive");if(this.ui.deviceMessage.toggleClass("hidden",t),!t){var n=this.syncList.device,r=n.get("lastSeenAt");
if(!r)return;this.ui.deviceMessageText.text((0,u.default)("{1} was last seen {2}. Syncing will resume next time you launch Plex on this device.",n.get("name"),(0,c.default)(r)))}},updateSyncList:function(){var e=this.syncList;e&&this.list.show(new p.default({collection:e.getCollection(),itemViewOptions:{server:this.server}}))},onSyncItemsReset:function(){var e=this.model.get("syncList");e&&(this.syncList=e.clone(),this.syncList.resetToServer(this.server.id),this.listenTo(this.syncList,"reset update",this.onSyncItemsChange)),
this.updateLoading(),this.updateEmptyMessage(),this.updateStatusMessage(),this.updateSyncList()},onSyncItemsChange:function(){this.updateEmptyMessage()}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2288),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(14),h=a(p),v=n(5),g=r(v),m=n(12),y=r(m),b=n(65),P=r(b),w=n(27),S=r(w),_=n(260),T=r(_),I=n(1424),M=r(I),C=f.default.Layout.extend({className:"sync-container",
template:s.default,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=h.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:P.default.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(l.default.bind(this.fetchTranscodeJobs,this),this.transcodeJobDelay)},showList:function(){this.selectedDevice?this.container.show(new M.default({model:this.selectedDevice,server:this.model})):this.container.close()},getPlexPassInfo:function(){return this.signedIn||this.shared?{url:this.user.server.get("plexPassUrl"),
message:(0,g.default)("The server needs a Plex Pass to use sync."),buttonText:(0,g.default)("Learn More"),target:"_blank",showButton:!this.shared}:{url:"#!/settings/server",message:(0,g.default)("The server needs to be signed in with a Plex Pass to use sync."),buttonText:(0,g.default)("Sign In"),target:"_self",showButton:!0}},onRender:function(){this.filterBar.append(new T.default({showSharedServers:!0})),this.allowSync&&this.showList()},onClose:function(){clearTimeout(this.transcodeJobTimeout)},
onPrimaryServerChange:function(e,t){t&&y.default.trigger("navigate","sync",{serverID:t.id})},onSharedChange:function(e,t){this.shared=t,this.render()},onDeviceClick:function(e){e.preventDefault();var t=(0,d.default)(e.currentTarget),n=t.data("id");this.ui.devices.removeClass("selected"),t.addClass("selected"),this.selectedDevice=this.collection.get(n),this.showList()},onEditClick:function(e){e.preventDefault(),(0,d.default)(e.currentTarget).toggleClass("selected"),this.$el.toggleClass("force-hover");
},onRefreshClick:function(e){e.preventDefault();var t=S.default.execute("refreshSyncLists",{server:this.model});this.selectedDevice&&t.always(this.whenRendered(function(){var e=this.selectedDevice.get("syncList");e.fetch({reset:!0,scope:"page"})}))},onCloudSyncSettingsClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=h.resolve("appModel"),n=t.get("user");window.open(n.server.get("cloudSyncUrl"))}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(2291),i=r(a),s=n(3),o=r(s),l=n(1144),u=r(l),d=n(258),c=r(d),f=c.default.extend({className:"alert-bar notify",template:i.default,events:o.default.extend({"click .info-link":"onInfoClick"},c.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){c.default.prototype.onCloseClick.apply(this,arguments),this.model.markAsRead()}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2292),s=r(i),o=n(3),l=r(o),u=n(14),d=a(u),c=n(12),f=r(c),p=n(65),h=r(p),v=n(40),g=r(v),m=n(258),y=r(m),b=y.default.extend({name:"ClaimServerAlertBarView",className:"claim-server-alert-bar alert-bar notify",template:s.default,events:l.default.extend({
"click .claim-link":"onClaimClick","click .reload-link":"onReloadClick"},y.default.prototype.events),initialize:function(){y.default.prototype.initialize.apply(this,arguments);var e=g.default.get("viewedUnclaimedServers");this.model.id&&e.indexOf(this.model.id)===-1&&(d.resolve("metrics").trackView({page:"unclaimedServer",mode:"banner"},{interaction:!1}),g.default.save("viewedUnclaimedServers",e.concat(this.model.id)))},serializeData:function(){return{showInsecureMessage:h.default.isHostedHttps&&!this.model.get("isSecure")
}},onClaimClick:function(e){e.preventDefault(),d.resolve("metrics").trackClick({action:"claim",page:"unclaimedServer",mode:"banner"}),f.default.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){y.default.prototype.onCloseClick.apply(this,arguments);var t=g.default.get("dismissedUnclaimedServers");
this.model.id&&t.indexOf(this.model.id)===-1&&(d.resolve("metrics").trackClick({action:"dismiss",page:"unclaimedServer",mode:"banner"}),g.default.save("dismissedUnclaimedServers",t.concat(this.model.id)))}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2293),s=r(i),o=n(3),l=r(o),u=n(14),d=a(u),c=n(12),f=r(c),p=n(40),h=r(p),v=n(27),g=r(v),m=n(258),y=r(m),b=y.default.extend({className:"alert-bar notify",
template:s.default,events:l.default.extend({"click .download-link":"onDownloadClick","click .install-link":"onInstallClick"},y.default.prototype.events),initialize:function(){this.server=this.model.server},serializeData:function(){var e=d.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(),g.default.execute("checkForServerUpdates",{server:this.server,download:!0,
initialState:"downloading"}),f.default.trigger("navigate","serverSettings",{serverID:this.server.id})},onInstallClick:function(e){e.preventDefault(),this.model.set("shouldInstall",!0),f.default.trigger("navigate","serverSettings",{serverID:this.server.id})},onCloseClick:function(e){y.default.prototype.onCloseClick.apply(this,arguments);var t=this.model.get("shortVersion")||"unknown";h.default.save("serverUpdateDismissedVersion",t)}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(2294),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=u.default.ItemView.extend({className:"alert alert-status transition-out",template:i.default,coolDown:!1,alertDuration:5e3,coolDownDuration:5e3,ui:{status:".status"},events:{mouseover:"onMouseOver"},onlyAfterRender:["onShowStatus"],initialize:function(e){o.default.bindAll(this,"hide"),this.listenTo(c.default,"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(o.default.bind(function(){this.coolDown=!1},this),this.coolDownDuration)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2295),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=n(241),p=r(f),h=n(1538),v=r(h),g=u.default.Layout.extend({className:"action-bar alpha-bar",template:i.default,regions:{list:".alpha-bar-list"},modelEvents:{"change:currentFilters":"onListRefresh","socket:timeline":"onTimeline"},collectionEvents:{reset:"onReset"},initialize:function(e){this.listenTo(c.default,"resize",this.onResize),this.collection.clear(),this.updateCollection(),
this.debouncedUpdateCollection=o.default.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 v.default({collection:this.collection
}),this.$el),o.default.defer(o.default.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 c.default.trigger("hide:bar","alphabar",{preserve:!0})):(this.containerHeight&&this.updateLineHeight(),this.$el.removeClass("hidden"),this.list.currentView.$el.removeClass("hidden"),void c.default.trigger("show:bar","alphabar"))},onResize:function(){this.updateContainerHeight(),
this.updateLineHeight()},onTimeline:function(e){e.state!==p.default.CREATED&&e.state!==p.default.DELETED||this.debouncedUpdateCollection()}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2296),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(12),p=r(f),h=n(134),v=r(h),g=n(329),m=r(g),y=c.default.Layout.extend({className:"breadcrumb-bar",template:i.default,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"),r="#!/server/"+encodeURIComponent(this.model.server.id);
r+="/channel/"+encodeURIComponent(n);var a=this.model.channel?this.model.get("title"):null;return{channelTitle:t,channelUrl:r,title:a,totalSize:this.model.get("metadataList").getCollection().length,showSettings:!!this.prefsKey&&!this.shared,listType:this.currentListType}},onSettingsClick:function(e){e.preventDefault();var t=new v.default([],{server:this.model.server,url:this.prefsKey});t.fetch().done(o.default.bind(function(){p.default.trigger("show:modal",new m.default({model:this.model.channel||this.model,
collection:t}))},this))},onListClick:function(e){e.preventDefault();var t=(0,u.default)(e.currentTarget),n=t.data("type");this.trigger("change:listType",n),this.ui.listSelectedIcons.addClass("hidden"),t.find(".dropdown-selected-icon").removeClass("hidden")}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2297),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=n(40),p=r(f),h=n(57),v=r(h),g=n(1453),m=r(g),y=u.default.Layout.extend({
className:"details-breadcrumb-bar breadcrumb-bar",template:i.default,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,r={server:this.model.server,section:this.model.section},a=this.parent=new v.default({key:t},r),i=a.populate({scope:"page"});i=i.then(function(){return n=a.get("children"),n.populate({scope:"page"})}),i.done(this.onSiblingsPopulate);var s=this.model.get("grandparentKey");if(s){var o=this.grandparent=new v.default({key:s},r),l=o.populate({
scope:"page"});l=l.then(function(){var e=o.get("children");return e.populate({scope:"page"})}),l.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")?p.default.get(this.getListTypeSettingKey())||"episode-tile-list":null},previous:function(){this.previousSibling&&c.default.trigger("navigate","details",{serverID:this.model.server.id,key:this.previousSibling.get("key")})},next:function(){this.nextSibling&&c.default.trigger("navigate","details",{
serverID:this.model.server.id,key:this.nextSibling.get("key")})},onSiblingsPopulate:function(e){if(!e)return this.currentItem.show(new m.default({model:this.model,isLeaf:!0})),void this.currentItem.$el.removeClass("hidden");var t=e.get("metadataItems"),n=t.get(this.model.id),r=t.indexOf(n);r>0&&(this.previousSibling=t.at(r-1)),r<t.length-1&&(this.nextSibling=t.at(r+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 m.default({model:this.parent})),this.grandparentItem.$el.removeClass("hidden")),this.siblingsDropdown.show(new m.default({id:"siblings-dropdown",model:this.model,collection:t})),this.siblingsDropdown.$el.removeClass("hidden")},onParentsPopulate:function(e){this.grandparentItem.show(new m.default({model:this.grandparent})),this.grandparentItem.$el.removeClass("hidden"),this.parentsDropdown.show(new m.default({id:"parents-dropdown",
model:this.parent,collection:e.get("metadataItems")})),this.parentsDropdown.$el.removeClass("hidden")},onSectionClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget),n=t.data("key");c.default.trigger("navigate","section",{serverID:this.model.server.id,sectionID:n})},onPlaylistsClick:function(e){e.preventDefault(),c.default.trigger("navigate","playlists",{serverID:this.model.server.id})},onListClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget),n=t.data("type");
p.default.save(this.getListTypeSettingKey(),n),this.ui.listSelectedIcons.addClass("hidden"),t.find(".dropdown-selected-icon").removeClass("hidden")},onPreviousClick:function(e){e.preventDefault(),this.previous()},onNextClick:function(e){e.preventDefault(),this.next()}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2298),i=r(a),s=n(13),o=r(s),l=n(5),u=r(l),d=n(12),c=r(d),f=n(693),p=r(f),h=n(1456),v=r(h),g=n(1574),m=r(g),y=o.default.Layout.extend({
className:"breadcrumb-bar",template:i.default,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 p.default({title:(0,u.default)("Playlists"),model:this.model,collection:this.model.server.get("sections")})),this.typeDropdown.show(new v.default({model:this.model}))},onSizeChange:function(){this.ui.itemsBadge.text(this.model.get("items").get("playlists").length)},onImportClick:function(e){this.limited||(e.preventDefault(),c.default.trigger("show:modal",new m.default({
server:this.model.server})))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2299),i=r(a),s=n(8),o=r(s),l=n(3),u=r(l),d=n(13),c=r(d),f=n(5),p=r(f),h=n(12),v=r(h),g=n(40),m=r(g),y=n(27),b=r(y),P=n(693),w=r(P),S=n(1458),_=r(S),T=n(1459),I=r(T),M=n(174),C=r(M),x=n(212),E=r(x),k=c.default.Layout.extend({className:"breadcrumb-bar",template:i.default,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=(0,p.default)("Update Library"),this.updateTitleAlt=(0,p.default)("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:m.default.getInstance().getSectionListType(this.model),refreshing:this.refreshing,updateTitle:this.refreshing?this.updateTitleAlt:this.updateTitle,updateTitleAlt:this.refreshing?this.updateTitle:this.updateTitleAlt}},updateListViewDropdown:function(e){u.default.isString(e)||(e=m.default.getInstance().getSectionListType(this.model)),this.ui.listSelectedIcons.each(function(t,n){var r=(0,
o.default)(n),a=r.closest(".list-btn").data("type");r.toggleClass("hidden",!u.default.isEqual(e,a))})},onRender:function(){this.$el.tooltip({selector:".breadcrumb-actions > a",container:"body",placement:"bottom"}),this.sectionDropdown.show(new w.default({model:this.model,collection:this.model.server.get("sections")})),this.subsetDropdown.show(new _.default({model:this.model.get("currentSubset"),collection:this.model.get("subsets")})),this.typeDropdown.show(new I.default({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||v.default.trigger("show:modal",new C.default({server:this.model.server,model:this.model}))},onUpdateClick:function(e){e.preventDefault(),this.limited||b.default.execute("updateLibrary",{section:this.model,cancel:this.model.get("refreshing")})},onShareClick:function(e){e.preventDefault(),this.limited||v.default.trigger("show:modal",new E.default({
defaultPaneType:"ownedServer",defaultPaneID:this.model.server.id}))},onAnalyzeClick:function(e){e.preventDefault(),this.limited||b.default.execute("analyzeSection",{section:this.model})},onForceRefreshClick:function(e){e.preventDefault(),this.limited||b.default.execute("updateLibrary",{section:this.model,params:{force:!0}})},onEmptyTrashClick:function(e){e.preventDefault(),this.limited||b.default.execute("emptyTrash",{section:this.model})},onDeleteClick:function(e){e.preventDefault(),this.onDelete();
},onListClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget),n=t.data("type"),r=this.model.get("currentType");m.default.getInstance().saveListType(r,n),this.updateListViewDropdown(n)},onDelete:function(){if(!this.limited){var e=b.default.execute("deleteSection",{section:this.model});e.done(function(){v.default.trigger("navigate","dashboard")})}},onRefreshingChange:function(e,t){var n=this.ui.updateBtn,r=this.ui.updateBtn.attr("data-original-title");if(this.ui.updateBtn.toggleClass("active",this.model.get("refreshing")),
r){var a=(0,o.default)(".tooltip > .tooltip-inner").html();u.default.contains([this.updateTitle,this.updateTitleAlt],a)&&(0,o.default)(".tooltip > .tooltip-inner").html(n.attr("data-title-alt")),n.attr("data-original-title",n.attr("data-title-alt")),n.attr("data-title-alt",r)}}});t.default=k,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2300),i=r(a),s=n(13),o=r(s),l=n(557),u=r(l),d=n(1496),c=r(d),f=n(1498),p=r(f),h=o.default.Layout.extend({
className:"container",template:i.default,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 u.default({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 p.default(t):new c.default(t),this.list.show(e)}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2301),s=r(i),o=n(13),l=r(o),u=n(12),d=r(u),c=n(14),f=a(c),p=n(1071),h=r(p),v=n(122),g=a(v),m=n(1431),y=r(m),b=n(701),P=r(b),w=n(699),S=r(w),_=n(700),T=r(_),I=l.default.Layout.extend({
className:"channel-container",template:s.default,regions:{list:".channel-list-container"},initialize:function(e){this.listModel=e.listModel,this.collection=this.listModel.get("metadataItems");var t=this.model.get("header"),n=this.model.get("message");(t||n)&&d.default.trigger("show:alert",{message:n||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"));
var r=this.model.channel||this.model,a=r.id?r.id:r.get("identifier");this.searchKey&&f.resolve("appStore").dispatch(g.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),channelPlaceholder:this.searchPlaceholder,channelID:a,channelSearchKey:this.searchKey})),this.listType=h.default.getListType(this.model);var i=new y.default({model:this.model,currentListType:this.listType});this.listenTo(i,"change:listType",this.onListTypeChange),d.default.trigger("show:bar","breadcrumbbar",i),
d.default.trigger("show:background",{model:this.model,dim:!0})},getListConstructor:function(){switch(this.listType){case h.default.types.tileList:return P.default;case h.default.types.detailsList:return S.default;default:return T.default}},onRender:function(){var e=this.getListConstructor();this.list.append(new e({listModel:this.listModel,collection:this.collection,paginated:!1}),this.$el)},onClose:function(){f.resolve("appStore").dispatch(g.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),
channelPlaceholder:null,channelID:null,channelSearchKey:null})),d.default.trigger("hide:bar","breadcrumbbar")},onListTypeChange:function(e){this.listType=e,this.listModel.scrollPosition=0,this.list.currentView.scrollPosition=0,this.render()}});t.default=I,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2302),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(27),p=r(f),h=n(1500),v=r(h),g=c.default.Layout.extend({className:"container",
template:i.default,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 v.default({collection:this.collection}))},onNavClick:function(e){this.ui.navLinks.removeClass("selected"),(0,u.default)(e.currentTarget).addClass("selected")},onAllClick:function(e){
e.preventDefault(),this.list.show(new v.default({collection:this.collection}))},onVideoClick:function(e){e.preventDefault(),this.list.show(new v.default({collection:this.videoCollection}))},onMusicClick:function(e){e.preventDefault(),this.list.show(new v.default({collection:this.musicCollection}))},onPhotoClick:function(e){e.preventDefault(),this.list.show(new v.default({collection:this.photoCollection}))},onCheckUpdatesClick:function(e){e.preventDefault();var t=this.ui.checkUpdatesBtn;if(!t.hasClass("active")){
t.addClass("active");var n=p.default.execute("updateChannel",{server:this.collection.server});n.always(o.default.bind(function(){t.removeClass("active")},this))}}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(61)),l=i(o),u=n(21),d=n(14),c=n(143),f=i(c),p=n(759),h=i(p),v=n(186),g=i(v),m={$$typeof:a,type:g.default,key:null,ref:null,props:r(g.default.defaultProps,{}),
_owner:null},y={$$typeof:a,type:h.default,key:null,ref:null,props:r(h.default.defaultProps,{}),_owner:null},b=f.default.extend({mountReact:function(){var e=(0,d.resolve)("appStore");l.default.render({$$typeof:a,type:u.Provider,key:null,ref:null,props:r(u.Provider.defaultProps,{children:m,store:e}),_owner:null},this.ui.sidebar[0]),l.default.render({$$typeof:a,type:u.Provider,key:null,ref:null,props:r(u.Provider.defaultProps,{children:y,store:e}),_owner:null},this.ui.page[0])}});t.default=b,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(10).default,a=n(7).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(i(o),n(61)),u=i(l),d=n(21),c=n(14),f=n(72),p=s(f),h=n(66),v=i(h),g=n(143),m=i(g),y=n(186),b=i(y),P=n(183),w=i(P),S=n(184),_=i(S),T=n(1809),I=i(T),M={$$typeof:a,type:b.default,key:null,ref:null,props:r(b.default.defaultProps,{}),_owner:null},C=m.default.extend({mountReact:function(){var e=(0,c.resolve)("appStore"),t=this.options.selectedServerID,n=this.options.selectedProviderID,i=this.options.params||{},s=(0,
v.default)(p.SERVER,t),o=(0,v.default)(p.PROVIDER,n,s);u.default.render({$$typeof:a,type:d.Provider,key:null,ref:null,props:r(d.Provider.defaultProps,{children:M,store:e}),_owner:null},this.ui.sidebar[0]),u.default.render({$$typeof:a,type:d.Provider,key:null,ref:null,props:r(d.Provider.defaultProps,{children:{$$typeof:a,type:w.default,key:null,ref:null,props:r(w.default.defaultProps,{children:{$$typeof:a,type:_.default,key:null,ref:null,props:r(_.default.defaultProps,{children:{$$typeof:a,type:I.default,
key:null,ref:null,props:r(I.default.defaultProps,{machineIdentifier:t,serverEntityID:s,providerEntityID:o,listKey:i.key,listTitle:i.title,listType:i.type}),_owner:null},providerEntityID:o}),_owner:null},machineIdentifier:t}),_owner:null},store:e}),_owner:null},this.ui.page[0])}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,a=n(7).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(i(o),n(61)),u=i(l),d=n(21),c=n(14),f=n(211),p=s(f),h=n(66),v=i(h),g=n(143),m=i(g),y=n(183),b=i(y),P=n(184),w=i(P),S=n(758),_=i(S),T=n(186),I=i(T),M={
$$typeof:a,type:I.default,key:null,ref:null,props:r(I.default.defaultProps,{}),_owner:null},C=m.default.extend({mountReact:function(){var e=(0,c.resolve)("appStore"),t=this.options.selectedServerID,n=this.options.params||{},i=(0,v.default)(p.SERVER,t);u.default.render({$$typeof:a,type:d.Provider,key:null,ref:null,props:r(d.Provider.defaultProps,{children:M,store:e}),_owner:null},this.ui.sidebar[0]),u.default.render({$$typeof:a,type:d.Provider,key:null,ref:null,props:r(d.Provider.defaultProps,{children:{
$$typeof:a,type:b.default,key:null,ref:null,props:r(b.default.defaultProps,{children:{$$typeof:a,type:w.default,key:null,ref:null,props:r(w.default.defaultProps,{children:{$$typeof:a,type:_.default,key:null,ref:null,props:r(_.default.defaultProps,{machineIdentifier:t,serverEntityID:i,directoryKey:n.key}),_owner:null}}),_owner:null},machineIdentifier:this.options.selectedServerID}),_owner:null},store:e}),_owner:null},this.ui.page[0])}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2303),i=r(a),s=n(956),o=r(s),l=n(145),u=r(l),d=n(144),c=r(d),f=n(171),p=r(f),h=n(58),v=r(h),g=n(1531),m=r(g),y=u.default.extend({mixins:o.default,className:"album-details-row details-row",template:i.default,allowMirror:!0,initialize:function(){u.default.prototype.initialize.apply(this,arguments),this.ListConstructor=m.default,this.listItemViewOptions={artistTitle:this.model.get("parentTitle"),mediaActions:this.mediaActions
},this.starRatingView=new c.default({model:this.model}),this.summaryView=new p.default({model:this.model}),this.posterImage=new v.default({model:this.model,type:this.model.get("type"),width:this.posterWidth})}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2304),i=r(a),s=n(3),o=r(s),l=n(12),u=r(l),d=n(241),c=r(d),f=n(957),p=r(f),h=n(145),v=r(h),g=n(1451),m=r(g),y=n(171),b=r(y),P=n(58),w=r(P),S=n(1504),_=r(S),T=n(1502),I=r(T),M=n(698),C=r(M),x=v.default.extend({
mixins:p.default,className:"artist-details-row details-row",template:i.default,allowMirror:!0,ui:o.default.extend({concertRegion:".concert-region",popularTracksRegion:".popular-tracks-region",extrasRegion:".extras-region",similarArtistsRegion:".similar-artists-region"},v.default.prototype.ui),regions:o.default.extend({concert:".concert-region",popularTracksList:".popular-tracks-region",extrasList:".extras-region",similarArtistsList:".similar-artists-region"},v.default.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(){v.default.prototype.initialize.apply(this,arguments),this.bindAllWhenRendered("updateConcerts","showConcert","updatePopularTracks","updateExtras","updateSimilarArtists","showSimilarArtistsList"),this.ListConstructor=I.default,this.listItemViewOptions={mediaActions:this.mediaActions},this.summaryView=new b.default({model:this.model}),this.posterImage=new w.default({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 _.default({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 C.default({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 m.default({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 I.default({collection:this.similarArtists.get("metadataItems")})),this.listenTo(this.similarArtists.get("metadataItems"),"reset update",this.updateSimilarArtists))}this.updateSimilarArtists()},onRender:function(){v.default.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===c.default.DELETED&&u.default.trigger("navigate","section",{serverID:this.model.server.id,sectionID:this.model.section.id})}});t.default=x,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2305),s=r(i),o=n(14),l=a(o),u=n(958),d=r(u),c=n(145),f=r(c),p=n(144),h=r(p),v=n(171),g=r(v),m=n(439),y=r(m),b=n(58),P=r(b),w=n(318),S=r(w),_=f.default.extend({
mixins:d.default,className:"clip-details-row details-row",template:s.default,allowMirror:!0,initialize:function(){f.default.prototype.initialize.apply(this,arguments),this.starRatingView=new h.default({model:this.model,disabled:!0}),this.summaryView=new g.default({model:this.model});var e=this.getPreferredMedia();this.audioDropdown=new y.default({type:"audio",model:this.model,media:e}),this.subtitlesDropdown=new y.default({type:"subtitles",model:this.model,media:e}),this.posterImage=new P.default({
model:this.model,type:this.model.get("type"),width:this.posterWidth});var t=this.model.server.get("isCloud"),n=l.resolve("appModel"),r=n.get("primaryServer");(!t||r&&!r.get("isCloudSyncServer"))&&(this.contentRatingFlag=new S.default({model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new S.default({model:this.model,flag:"videoResolution",className:"media-flag",width:100,height:20}),this.audioCodecFlag=new S.default({model:this.model,
flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new S.default({model:this.model,flag:"audioChannels",className:"media-flag",width:100,height:20}),this.studioFlag=new S.default({model:this.model,modelAttribute:"studio",className:"studio-flag",width:200,height:40}))}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2307),i=r(a),s=n(959),o=r(s),l=n(145),u=r(l),d=n(144),c=r(d),f=n(171),p=r(f),h=n(439),v=r(h),g=n(58),m=r(g),y=n(318),b=r(y),P=u.default.extend({
mixins:o.default,className:"episode-details-row details-row",template:i.default,allowMirror:!0,initialize:function(){u.default.prototype.initialize.apply(this,arguments),this.starRatingView=new c.default({model:this.model}),this.summaryView=new p.default({model:this.model});var e=this.getPreferredMedia();this.audioDropdown=new v.default({type:"audio",model:this.model,media:e}),this.subtitlesDropdown=new v.default({type:"subtitles",model:this.model,media:e}),this.posterImage=new m.default({model:this.model,
type:this.model.get("type"),width:this.posterWidth}),this.contentRatingFlag=new b.default({model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new b.default({model:this.model,flag:"videoResolution",className:"media-flag",width:100,height:20}),this.audioCodecFlag=new b.default({model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new b.default({model:this.model,flag:"audioChannels",
className:"media-flag",width:100,height:20})}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2308),i=r(a),s=n(3),o=r(s),l=n(960),u=r(l),d=n(145),c=r(d),f=n(144),p=r(f),h=n(171),v=r(h),g=n(439),m=r(g),y=n(58),b=r(y),P=n(318),w=r(P),S=n(698),_=r(S),T=c.default.extend({mixins:u.default,className:"movie-details-row details-row",template:i.default,allowMirror:!0,ui:o.default.extend({extrasRegion:".extras-region"
},c.default.prototype.ui),regions:o.default.extend({extrasList:".extras-region"},c.default.prototype.regions),initialize:function(){c.default.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 p.default({model:this.model}),this.summaryView=new v.default({model:this.model});var t=this.getPreferredMedia();this.audioDropdown=new m.default({
type:"audio",model:this.model,media:t}),this.subtitlesDropdown=new m.default({type:"subtitles",model:this.model,media:t}),this.posterImage=new b.default({model:this.model,type:this.model.get("type"),width:this.posterWidth}),this.contentRatingFlag=new w.default({model:this.model,modelAttribute:"contentRating",className:"content-rating-flag",width:70,height:30}),this.videoResolutionFlag=new w.default({model:this.model,flag:"videoResolution",className:"media-flag",width:100,height:20}),this.audioCodecFlag=new w.default({
model:this.model,flag:"audioCodec",className:"media-flag",width:100,height:20}),this.audioChannelsFlag=new w.default({model:this.model,flag:"audioChannels",className:"media-flag",width:100,height:20}),this.studioFlag=new w.default({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(){c.default.prototype.onRender.apply(this,arguments),this.extras&&(this.extrasList.append(new _.default({
collection:this.extras})),this.updateExtras())}});t.default=T,e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,a=n(7).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(2309),l=i(o),u=n(13),d=i(u),c=n(4),f=(i(c),n(61)),p=i(f),h=n(21),v=n(14),g=s(v),m=n(1788),y=i(m),b=n(2045),P=i(b),w=d.default.Layout.extend({className:"photo-album-details",template:l.default,ui:{photoAlbumPage:".photo-album-page"},serializeData:function(){return{styles:P.default
}},mountReact:function(){var e=g.resolve("appStore"),t=this.model.entityID({key:this.model.get("key")});p.default.render({$$typeof:a,type:h.Provider,key:null,ref:null,props:r(h.Provider.defaultProps,{children:{$$typeof:a,type:y.default,key:null,ref:null,props:r(y.default.defaultProps,{metadataItemEntityID:t}),_owner:null},store:e}),_owner:null},this.ui.photoAlbumPage[0])},unmountReact:function(){this.isRendered&&p.default.unmountComponentAtNode(this.ui.photoAlbumPage[0])},onBeforeRender:function(){
this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2310),i=r(a),s=n(3),o=r(s),l=n(5),u=r(l),d=n(247),c=r(d),f=n(163),p=r(f),h=n(132),v=r(h),g=n(145),m=r(g),y=n(328),b=r(y),P=n(1524),w=r(P),S=m.default.extend({className:"playlist-details-row details-row",template:i.default,posterWidth:200,pageSize:50,compositeOptions:{
audio:{media:"art",stripRatio:c.default.ratios.landscape,posterRatio:c.default.ratios.square},photo:{media:"thumb",stripRatio:c.default.ratios.square,posterRatio:c.default.ratios.square},video:{media:"thumb",stripRatio:c.default.ratios.portrait,posterRatio:c.default.ratios.portrait}},ui:o.default.extend({sideStrip:".item-side-strip"},m.default.prototype.ui),bindings:o.default.extend(o.default.pick(v.default.defaultBindings,[".item-title",".item-summary"]),{".item-duration":{modelAttribute:"duration",
autohide:!0,formatter:function(e){return e?(0,p.default)(e):0}},".item-count":{modelAttribute:"leafCount",formatter:function(e){return 0===e?(0,u.default)("This playlist has no items."):1===e?(0,u.default)("1 Item"):(0,u.default)("{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(){m.default.prototype.initialize.apply(this,arguments),this.ListConstructor=w.default,this.listItemViewOptions={canEdit:!this.model.get("smart")};var e=this.compositeOptions[this.model.get("playlistType")];this.posterWidth=200,this.sideStripImage=new b.default({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 b.default({model:this.model,width:this.posterWidth,height:this.posterWidth/e.posterRatio,noPlaceholder:!0})},onRender:function(){m.default.prototype.onRender.apply(this,arguments),this.sideStripImage.setElement(this.ui.sideStrip)},onClose:function(){return this.posterImage&&this.sideStripImage.close(),m.default.prototype.onClose.apply(this,arguments)}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(2311),i=r(a),s=n(40),o=r(s),l=n(145),u=r(l),d=n(171),c=r(d),f=n(1512),p=r(f),h=n(1508),v=r(h),g=n(1510),m=r(g),y=u.default.extend({className:"season-details-row details-row",template:i.default,allowMirror:!0,initialize:function(){u.default.prototype.initialize.apply(this,arguments),this.ListConstructor=this.getListConstructor(),this.summaryView=new c.default({model:this.model}),this.listenTo(o.default.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=o.default.get(this.getListTypeSettingKey())),e){case"episode-details-list":return v.default;case"episode-list":return m.default;default:return p.default}},bindings:{".show-title":{modelAttribute:"parentTitle"},".season-title":{modelAttribute:"title"}},onListTypeChange:function(e,t){this.ListConstructor=this.getListConstructor(t),this.render();
}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2312),i=r(a),s=n(961),o=r(s),l=n(145),u=r(l),d=n(144),c=r(d),f=n(171),p=r(f),h=n(58),v=r(h),g=n(318),m=r(g),y=n(1527),b=r(y),P=u.default.extend({mixins:o.default,className:"show-details-row details-row",template:i.default,allowMirror:!0,initialize:function(){u.default.prototype.initialize.apply(this,arguments),this.ListConstructor=b.default,this.starRatingView=new c.default({
model:this.model}),this.summaryView=new p.default({model:this.model}),this.posterImage=new v.default({model:this.model,type:this.model.get("type"),width:this.posterWidth}),this.contentRatingFlag=new m.default({model:this.model,modelAttribute:"contentRating",className:"show-content-rating content-rating-flag",width:70,height:30}),this.studioFlag=new m.default({model:this.model,modelAttribute:"studio",className:"show-studio studio-flag",width:200,height:40})}});t.default=P,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2313),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({className:"container",template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2314),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(53),c=r(d),f=u.default.ItemView.extend({className:"concert",template:i.default,bindings:{".concert-link":{modelAttribute:"url",manual:!0,
formatter:function(e,t){t.attr("href",e)}},".concert-month":{modelAttribute:"at",formatter:function(e){return c.default.unix(e).format("MMM")}},".concert-day":{modelAttribute:"at",formatter:function(e){return c.default.unix(e).format("DD")}},".concert-name":{modelAttribute:"tag"},".concert-venue":{modelAttribute:"venue"},".concert-city":{modelAttribute:"city",modelListeners:["city","country"],formatter:function(e){var t=o.default.compact([e,this.model.get("country")]);return t.join(", ")}}}});t.default=f,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2316),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=n(27),c=r(d),f=u.default.ItemView.extend({id:"auto-match-dropdown",tagName:"span",className:"dropdown",template:i.default,collectionEvents:{reset:"render"},events:{"click .auto-match-agent":"onClick"},serializeData:function(){return{agents:this.collection.toJSON()}},onClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget).data("id"),n=this.model.agents.get(t);
c.default.execute("autoMatch",{item:this.model,agent:n})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2317),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=u.default.ItemView.extend({tagName:"span",className:"details-breadcrumb dropdown",template:i.default,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 t=(0,o.default)(e.currentTarget).data("key");t&&c.default.trigger("navigate","details",{serverID:this.model.server.id,key:t})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2319),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({
tagName:"li",className:"play-queue-list-item",template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2323),s=r(i),o=n(8),l=r(o),u=n(13),d=r(u),c=n(5),f=r(c),p=n(12),h=r(p),v=n(26),g=a(v),m=n(37),y=r(m),b=n(27),P=r(b),w=n(121),S=r(w),_=n(146),T=r(_),I=n(265),M=r(I),C=n(263),x=r(C),E=n(264),k=r(E),D=d.default.ItemView.extend({tagName:"ul",className:"dropdown-menu",template:s.default,
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=y.default.get(this.model.get("type")),this.mediaActions=new S.default({},{item:this.model,playQueue:e.playQueue}),(0,l.default)(".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=g.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"),r=n.findWhere({browse:!1}),a=r.get("title");a&&t.text((0,f.default)("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"),P.default.execute("queueMedia",{item:n,excludeSeedItem:!0,next:!0})},onAddToPlaylistClick:function(e){return e.preventDefault(),(0,l.default)(e.currentTarget).isDisabled()?void e.stopImmediatePropagation():void h.default.trigger("show:modal",new T.default({model:this.model,items:this.mediaActions.getActionTargets(),title:this.mediaActions.getActionTargetsTitle()}))},onSyncClick:function(e){e.preventDefault(),
P.default.execute("showSyncModal",{item:this.model})},onShareClick:function(e){e.preventDefault(),h.default.trigger("show:modal",new M.default({model:this.model}))},onRecommendClick:function(e){e.preventDefault(),h.default.trigger("show:modal",new k.default({model:this.model}))},onInfoClick:function(e){e.preventDefault(),h.default.trigger("show:modal",new x.default({model:this.model}))}});t.default=D,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2324),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=c.default.ItemView.extend({id:"playlist-type-dropdown",tagName:"span",className:"dropdown",template:i.default,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:(0,o.default)(this.types).findWhere({key:this.model.get("currentType")
}),types:this.types}},onClick:function(e){e.preventDefault();var t=(0,u.default)(e.currentTarget).data("key");this.model.set("currentType",t)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2326),s=r(i),o=n(8),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=n(27),h=r(p),v=d.default.ItemView.extend({tagName:"ul",className:"dropdown-menu pull-right",template:s.default,events:{"click .local-player-btn":"onLocalPlayerClick",
"click .plex-player-btn":"onPlexPlayerClick","click .now-playing-btn":"onNowPlayingClick","click .refresh-btn":"onRefreshPlayersClick"},initialize:function(e){e||(e={});var t=f.resolve("appModel");this.showNowPlaying=e.showNowPlaying,this.players=t.get("players"),this.listenTo(this.players,"update reset",this.render)},serializeData:function(){var e=f.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()}},onRefreshPlayersClick:function(e){e.preventDefault(),e.stopPropagation(),this.players.fetch()},onLocalPlayerClick:function(e){e.preventDefault();var t=f.resolve("appModel");t.set("primaryPlayer",null)},onPlexPlayerClick:function(e){e.preventDefault();var t=(0,l.default)(e.currentTarget).data("id"),n=this.players.get(t),r=f.resolve("appModel");r.set("primaryPlayer",n)},onNowPlayingClick:function(e){e.preventDefault();var t=f.resolve("appModel"),n=t.get("primaryPlayer"),r=n.get("nowPlaying"),a=(0,
l.default)(e.currentTarget).data("id"),i=r.get(a);h.default.execute("playMedia",{item:i})}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2329),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({id:"section-subset-dropdown",tagName:"span",className:"dropdown",template:i.default,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}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2330),i=r(a),s=n(13),o=r(s),l=n(1460),u=r(l),d=o.default.CompositeView.extend({id:"section-type-dropdown",tagName:"span",className:"dropdown",
template:i.default,itemView:u.default,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)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2331),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({tagName:"li",template:i.default,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)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2261),i=r(a),s=n(13),o=r(s),l=n(1630),u=r(l),d=o.default.Layout.extend({
template:i.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=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2333),i=r(a),s=n(440),o=r(s),l=o.default.extend({template:i.default,serializeData:function(){var e=this.model.get("preferences"),t=this.model.getSingleMetadataItem().get("preferences");return e.length?t.reduce(function(t,n){var r=e.get(n.id);
return r?t.push(r.toJSON()):t.push(n.toJSON()),t},[]):t.toJSON()},flushChanges:function(){var e=this.ui.form,t=e.serializeArray(),n=this.model.getSingleMetadataItem().get("preferences"),r=this.model.get("preferences");t.forEach(function(e){var t=r.get(e.name)||n.get(e.name),a=t.clone();a.parseAndSetValue(e.value),a.get("value")!==t.get("value")&&r.add(a,{merge:!0})})}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});
var a=n(2338),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(65),p=r(f),h=n(57),v=r(h),g=n(1283),m=r(g),y=n(1506),b=r(y),P=c.default.Layout.extend({template:i.default,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 m.default([],{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:p.default.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 t=this.collection.url(),n=o.default.extend(this.model.server.getXHROptions(t),{type:"POST",processData:!1}),r=[],a=o.default.bind(function(e){/image\//.test(e.type)&&(n.data=e,r.push(u.default.ajax(n)))},this);if(o.default.each(e,a),!r.length)return void this.ui.upload.addClass("show-error");
this.ui.upload.addClass("show-progress"),this.monitorUpload(u.default.when.apply(u.default,r))}},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 t=o.default.extend(this.model.server.getXHROptions(e),{type:"POST"});this.monitorUpload(u.default.ajax(t))},monitorUpload:function(e){e.done(o.default.bind(function(){this.isClosed||this.ui.upload.addClass("show-success");
var e={server:this.model.server,onlyIfCached:!0},t=new v.default({key:this.metadataItem.get("key")},e);o.default.isEmpty(t)||t.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 b.default({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=(0,u.default)(e.currentTarget),n=t.data("ratingKey");
this.$(".artwork-option.selected").removeClass("selected"),t.addClass("selected"),this.changes[this.type]=n}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2341),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(83),p=r(f),h=n(1465),v=r(h),g=c.default.CompositeView.extend({template:i.default,className:"files",itemView:v.default,itemViewContainer:"ul",initialize:function(){this.collection=new p.default,
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 o.default.each(n,t),n}function t(e){o.default.each(e.Part,n)}function n(e){r.push(e)}var r=this.collection,a=this.model.getSingleMetadataItem();if(e(a))return u.default.Deferred().resolve();var i=a.populate().then(function(){if(!e(a)&&a.has("childrenKey")){var t=a.get("children"),n=t.get("metadataItems");if(!n.length)return t.populate().then(function(){
n.each(e)});n.each(e)}});return i},flushChanges:function(){}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2342),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({template:i.default,tagName:"li",className:"well",serializeData:function(){var e={file:this.model.get("file")};return e}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(2349),s=r(i),o=n(3),l=r(o),u=n(14),d=a(u),c=n(159),f=r(c),p=n(695),h=r(p),v=h.default.extend({templatesByType:{movie:s.default,show:s.default,album:s.default,photo:s.default},serializeData:function(){var e=d.resolve("appModel"),t=e.get("user"),n=h.default.prototype.serializeData.apply(this,arguments);return l.default.extend(n,{showLabels:this.model.server.supports("labels"),labelsMinVersion:f.default.labels,hasContentFilterFeature:t.get("subscription").get("features").get("content_filter"),
plexPassUrl:t.server.get("plexPassUrl")}),n}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(5),u=r(l),d=n(669),c=r(d),f=function(e,t){var n=(0,o.default)(t),r=n.attr("name"),a=r.replace(/parentTitle$/,"parentRatingKey");a===r&&(a=null);var s,l=e.model.getQueryAttr(r),d=e.model.getQueryAttrSibling(r),f=l!==r,p=f?"title":r,h=f?"ratingKey":p,v=e.model.get("type");s=f?l.match(/(^.*)\./)[1]:"title"===p?v:null;
var g=n.data("scopeToAttr"),m=n.data("scopeToParam"),y=n.data("ratingKey"),b=!y;y&&(y=y.toString());var P=!f,w={};m&&e.listenTo(e,"reset_selectize:"+m,function(){k.loadedSearches={}});var S,_,T=e.model["original.updateValues."+r];T?(S=T.updateAttr,_=T.altUpdateAttr):(S=e.model.get(r),a&&(_=parseInt(e.model.get(a),10)),e.model["original.updateValues."+r]={updateAttr:S,altUpdateAttr:_});var I=e.model["original.general."+r];if(!I){I=[];var M={};M[p]=S,M.ratingKey=y,I=[M],e.model["original.general."+r]=I;
}var C=[e.model.get(a)||e.model.get(r)],x=function(){var e=k.$dropdown_content.children();k.$dropdown.toggleClass("hidden",e.length<=1)},E=function(){i.default.defer(x)};n.data("autocompleteAttr",p),n.data("updateAttr",r),a&&n.data("altUpdateAttr",a);var k=n.selectize({options:I,items:C,plugins:["restore_on_focus"],delimiter:null,create:!0,maxItems:1,labelField:p,valueField:h,sortField:p,searchField:[p],selectOnTab:!0,hideSelected:!1,highlight:!1,openOnFocus:!0,selectOnBlur:!0,createOnBlur:!0,persist:!0,
addPrecedence:!0,allowEmptyOption:!0,allowCreateEmpty:P,manualInputWidth:!0,loadingClass:"",onFocus:function(){k.preloaded||(k.preloaded=!0,k.onSearchChange(k.$control_input.val()))},createFilter:function(e){w[p]=e;var t=(0,i.default)(this.options).findWhere(w);return!t},load:function(t,n){if(!t.length)return void n();var r={};if(r[l]=t,g){var a=e.model.get(g);if(!a)return void n();r[m]=a}var i=new c.default([],{server:e.model.server,multiMetadataItem:e.model,query:r});i.fetch().done(function(e){
n(e.map(function(e){return e.toJSON()})),x()})},render:{option:function(e,t){var n,r=a?e.ratingKey===String(_):e[p]===S;return n=r?'<small class="autocomplete-annotate pull-right">('+(s&&!b?(0,u.default)("this {1}",s):(0,u.default)("original value"))+")</small>":"","<div>"+t(e[p])+n+"</div>"},option_create:function(e,t){return e.input?'<div class="create">'+t(e.input)+"</div>":'<div class="create hidden"></div>'}},onDropdownClose:function(){k.$dropdown.addClass("hidden")},onDropdownOpen:function(){
k.$dropdown.addClass("hidden"),E()},onType:i.default.bind(function(e){if(k.canCreate(e)){var t=(0,o.default)(k.$dropdown_content[0].childNodes[0]);k.setActiveOption(t)}E(),this.onLockableFieldChange({currentTarget:k.$input,force:!0})},e),onOptionAdd:function(e,t){var n=i.default.pick(t,p,"ratingKey"),r=i.default.findWhere(I,n);r||I.splice(I.length,0,t)},onChange:function(t){var a=this.options[t];if(a){if(f){var s=a.ratingKey===a[p];n.data("isText",s)}e.flushChanges();var o=e.model.changedAttributes();
i.default.has(o,l)||i.default.has(o,d)?e.trigger("focusSubmit"):i.default.defer(function(){k.onBlur()}),e.trigger("reset_selectize:"+r),x()}}})[0].selectize;k.$dropdown.addClass("hidden")};t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(8),o=r(s),l=n(5),u=r(l),d=n(37),c=r(d),f=n(295),p=r(f),h=n(669),v=r(h),g=function(e,t){var n=(0,o.default)(t),r=n.data("name"),a=n.data("query")||n.data("name"),s=n.data("attr"),l=e.model.get(s).toJSON(),d=i.default.pluck(l,"tag"),f=e.model["original.tag."+r];
f||(f=i.default.clone(l),e.model["original.tag."+r]=f);var h=i.default.difference(d,i.default.pluck(f,"tag"));if(h.length){var g=i.default.map(h,function(e){return{tag:e}});g.unshift(f.length,0),f.splice.apply(f,g)}var m=function(t){e.model["original.allTagsRequested."+r]=!0;var n=new p.default({filter:r,filterType:"string"},{server:e.model.server,section:e.section,type:c.default.get(e.model.get("type")).id}),a=n.get("options");a.populate().then(i.default.bind(function(n){e.model["original.allTagsAvailable."+r]=!0,
t(n.map(function(e){return{tag:e.attributes.title}}))},e))};n.data("original-value",n.val()),n.selectize({options:f,items:d,plugins:["remove_button"],create:!0,labelField:"tag",valueField:"tag",sortField:"tag",searchField:["tag"],highlight:!1,createFilter:function(e){var t=(0,i.default)(this.options).findWhere({tag:e});return!t},onChange:function(){e.onLockableFieldChange(n)},onFocus:function(){this.onSearchChange("")},loadingClass:"",load:function(t,n){var i=!(a!==r||t.length&&e.canAutocomplete);
if(i)return void(e.model["original.allTagsRequested."+r]?n():m.call(e,n));var s=e.model["original.allTagsAvailable."+r]||0===t.length;if(s)return void n();var o={};o[a]=t;var l=new v.default([],{server:e.model.server,multiMetadataItem:e.model,query:o}),u=a===r?function(e){return e.toJSON()}:function(e){return{tag:e.get(a)}};l.fetch().done(function(e){var t=e.map(u);n(t)}).fail(function(){n()})},render:{item:function(e,t){var n=e.tag?t(e.tag):'<span class="autocomplete-annotate">('+(0,u.default)("blank")+")</span>";
return'<div class="item">'+n+"</div>"},option:function(e,t){var n;return n=e.tag?t(e.tag):'<small class="autocomplete-annotate">('+(0,u.default)("blank")+")</small>",'<div class="item">'+n+"</div>"}}})};t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2499),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(27),c=r(d),f=n(261),p=r(f),h=n(1476),v=r(h),g=n(1470),m=r(g),y=p.default.extend({template:i.default,ui:o.default.extend({
sectionAgent:"#edit-section-agent",sectionScanner:"#edit-section-scanner",thumbnailsCheckbox:'input[name="enableBIFGeneration"]',agentGroup:".agent-group",scannerGroup:".scanner-group"},p.default.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(p.default.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 v.default({model:this.model,collection:this.model.settings
});this.sectionSettingsRegion.show(e)},renderSectionAgentSettings:function(){var e=new m.default({model:this.model,collection:this.model.agentSettings});this.agentSettingsRegion.show(e)},populateCollections:function(){var e=this.populateAgents(),t=this.populateScanners(),n=this.populateSectionSettings(),r=this.populateSectionAgentSettings();return this.populateAgentsProxy(),this.populateScannersProxy(),e.then(o.default.bind(this.onAgentsPopulate,this)),t.then(o.default.bind(this.onScannersPopulate,this)),
n.then(o.default.bind(this.renderSectionSettings,this)),r.then(o.default.bind(this.renderSectionAgentSettings,this)),u.default.when(e,t,n,r).then(o.default.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 t=(0,u.default)(e.currentTarget),n=t.val();this.model.set("agent",n),this.agentSettingsRegion.close();var r=this.model.agents.get(n);if(r){var a=r.get("languages"),i=this.model.get("language");a.get(i)||this.model.set("language",a.first().get("code")),this.model.agentSettings=null,this.populateSectionAgentSettings().then(o.default.bind(this.renderSectionAgentSettings,this));
}this.showValidationResult(this.validate(this.model))},onEditSectionScannerChange:function(e){var t=(0,u.default)(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=c.default.execute("deleteSectionThumbnails",{section:this.model});t.done(this.whenRendered(function(){this.ui.thumbnailsCheckbox.prop("checked",!1);
}))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2354),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=u.default.ItemView.extend({template:i.default,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=(0,o.default)(e.currentTarget),n=t.is(":checkbox")?t.prop("checked"):t.val(),r=this.collection.findWhere({id:t.attr("name")});r.set("value",n)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2355),i=r(a),s=n(261),o=r(s),l=o.default.extend({template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2500),i=r(a),s=n(8),o=r(s),l=n(12),u=r(l),d=n(261),c=r(d),f=n(1474),p=r(f),h=n(1569),v=r(h),g=c.default.extend({
template:i.default,fieldNames:["Location"],regions:{pathsRegion:".paths-region"},events:{"click .add-folder-btn":"onAddFolderClick","change input[name=path]":"onFolderChange"},onlyAfterRender:["renderSectionLocation"].concat(c.default.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 p.default({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 v.default({server:this.model.server});this.listenToOnce(t,"add:folder",this.onAddFolder),u.default.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=(0,o.default)(e.currentTarget),n=t.prop("defaultValue"),r=t.val();if(!r)return void t.val(n);var a=this.model.get("locations").findWhere({path:n});a.set("path",r),t.prop("defaultValue",r)}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2501),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({template:i.default,className:"row",events:{"click .remove-path-btn":"onRemovePathClick"
},onRemovePathClick:function(e){e.preventDefault(),this.model.trigger("destroy",this.model,this.model.collection)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(13),i=r(a),s=n(1473),o=r(s),l=i.default.CollectionView.extend({itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2502),s=r(i),o=n(8),l=r(o),u=n(14),d=a(u),c=n(12),f=r(c),p=n(261),h=r(p),v=n(709),g=r(v),m=h.default.extend({
template:s.default,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=d.resolve("appModel"),t=e.get("user"),n={hasPremiumMusic:this.hasPremiumMusic,plexPassUrl:t.server.get("plexPassUrl"),
hasLyrics:this.model.server.get("transcoderLyrics")};return n},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 t=(0,l.default)(e.currentTarget),n=t.data("agent"),r=t.data("scanner");
return!n&&!r||this.hasPremiumMusic?(this.model.agentSettings=null,void this.model.set({agent:n||this.getSectionType().defaultAgent,scanner:r||this.getSectionType().defaultScanner})):void f.default.trigger("show:modal",new g.default({model:this.model.server}))},onSectionAgentChange:function(){this.updateSelectedOffering()},onSectionScannerChange:function(){this.updateSelectedOffering()}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2503),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=u.default.ItemView.extend({template:i.default,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 t=(0,o.default)(e.currentTarget),n=t.attr("name");if("importFromiTunes"===n)return void this.model.set(n,!0);
var r=t.is(":checkbox")?t.prop("checked"):t.val(),a=this.collection.findWhere({id:n});a.set("value",r)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2504),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(102),c=r(d),f=n(138),p=r(f),h=n(261),v=r(h),g=v.default.extend({template:i.default,ui:o.default.extend({sectionTypes:".wizard-block",sectionTitle:"#edit-section-title",sectionLanguage:"#edit-section-language"},v.default.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(v.default.prototype.onlyAfterRender),
initialize:function(e){this.populateCollections(),this.isDefaultSection=e.isDefaultSection},serializeData:function(){var e=v.default.prototype.serializeData.apply(this,arguments);e.sectionTypes=c.default.getAll();var t=this.getSectionType();t&&(e.currentSectionKey=t.key);var n=this.model.get("updatedAt");return n&&(e.updatedAt=(0,p.default)(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(),t=this.populateScanners(),n=this.getSectionType(),r=u.default.when(n,e,t,this.model.server.get("myPlexSubscription")&&this.model.server.supports("premiumMusic"));return this.model.isNew()&&(r=r.then(o.default.bind(this.model.setAgentAndScanner,this.model))),r=r.then(e).then(o.default.bind(this.onAgentsPopulate,this)).then(o.default.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 r=this.model.get("type"),a=c.default.get(r),i=a.defaultLanguage;this.model.set("language",i,{silent:!0}),e=i}var s=n.map(function(e){return{label:e.get("name"),value:e.id}});this.updateSectionLanguage(),this.ui.sectionLanguage.html(this.createMenuOptions(s,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=(0,u.default)(e.currentTarget);if(t.hasClass("selectable")){var n=t.data("key"),r={type:n},a=c.default.get(n);
this.model.get("title")||(r.title=a.title),this.model.set(r)}},onEditSectionTitleChange:function(e){var t=(0,u.default)(e.currentTarget);this.model.set("title",t.val()),this.showValidationResult(this.validate(this.model))},onEditSectionLanguageChange:function(e){var t=(0,u.default)(e.currentTarget);this.model.set("language",t.val()),this.showValidationResult(this.validate(this.model))},onSectionTypeChange:function(e,t){this.updateSectionTypesWizardBlocks();var n=c.default.get(t);if(!this.model.get("language")){
var r=n.defaultLanguage;this.model.set("language",r)}var a=this.model.get("title"),i=this.model.previous("type"),s=c.default.get(i),o=s&&s.title;a&&a!==o||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()}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(230),i=r(a),s=n(1153),o=r(s),l=o.default.extend({className:"container",template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(230),i=r(a),s=n(1155),o=r(s),l=o.default.extend({className:"container",template:i.default});t.default=l,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(230),i=r(a),s=n(5),o=r(s),l=n(1156),u=r(l),d=u.default.extend({className:"container",template:i.default,serializeData:function(){return{title:(0,o.default)("You don't have any media servers yet."),subtitle:(0,o.default)("{1}Download and install{2} one and try again.",'<a href="https://plex.tv/downloads" target="_blank">',"</a>")}}});t.default=d,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(230),i=r(a),s=n(1157),o=r(s),l=o.default.extend({className:"container",template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(230),i=r(a),s=n(1158),o=r(s),l=o.default.extend({className:"container",template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2356),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=u.default.ItemView.extend({className:"filter-bar filter-bar-fixed",template:i.default,events:{"click .clear-filters-btn":"onClearFiltersClick"},serializeData:function(){var e=this.model.get("currentFilters"),t=[];return o.default.each(e,function(e){t.push(e.titles.join(", "))}),{titles:t.join(", ")}},onClearFiltersClick:function(e){e.preventDefault();var t=this.model.get("currentFilters");t.length=0,this.model.trigger("change:currentFilters",this.model,t),
c.default.trigger("navigate","section",{serverID:this.model.server.id,sectionID:this.model.id,subset:this.model.get("subset"),trigger:!1})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1485),o=r(s),l=i.default.extend({tagName:"ul",className:"list card-list alert-list",itemView:o.default,reversed:!0});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2357),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(5),c=r(d),f=u.default.ItemView.extend({tagName:"li",className:"card-collapsed striped-list-item alert-list-item",template:i.default,serializeData:function(){var e=this.model.toJSON(),t={serverID:this.model.server.id,serverName:o.default.escape(this.model.server.get("friendlyName")),itemKey:"/library/metadata/"+this.model.get("itemID"),event:e};if(e.label=o.default.escape(e.label),e.value=o.default.escape(e.value),"playing"===e._type&&(e.username=o.default.escape(e.username),
e.title=o.default.escape(e.title),e.player=o.default.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=(0,c.default)("Created");break;case 1:e.stateString=(0,c.default)("Progress for");break;case 2:e.stateString=(0,c.default)("Matching");break;case 3:e.stateString=(0,c.default)("Downloading metadata for");
break;case 4:e.stateString=(0,c.default)("Loading metadata for");break;case 5:e.stateString=(0,c.default)("Finished processing");break;case 6:e.stateString=(0,c.default)("Analyzing");break;case 9:e.stateString=(0,c.default)("Deleted")}return t}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1488),o=r(s),l=n(1487),u=r(l),d=i.default.extend({tagName:"ul",className:"tile-list session-tile-list",
itemView:o.default,emptyView:u.default});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2358),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2359),i=r(a),s=n(3),o=r(s),l=n(5),u=r(l),d=n(617),c=r(d),f=n(51),p=r(f),h=n(637),v=r(h),g=n(647),m=r(g),y=n(27),b=r(y),P=n(123),w=r(P),S=n(58),_=r(S),T=w.default.extend({
className:"poster-item session-tile-list-item",template:i.default,screenshotPreferredIndex:"hd",screenshotInterval:null,screenshotIntervalDelay:2e3,screenshotCount:0,ui:{poster:".media-poster",posterFade:".media-poster-fade",userPoster:".user-poster"},events:o.default.extend({"click .info-btn":"onInfoClick","click .close-btn":"onInfoClick"},w.default.prototype.events),modelEvents:{"change:viewOffset":"onViewOffsetChange","change:Player":"onPlayerChange"},initialize:function(e){w.default.prototype.initialize.apply(this,arguments);
var t=this.getScreenshotUrl(this.model.get("Media"));this.image=new _.default({model:this.model,modelAttribute:"ratingKey",type:"clip",getUrl:this.getPosterUrl,width:350,url:t?t:null}),this.userImage=new _.default({model:this.model,modelAttribute:"User",type:"friend",getUrl:this.getUserPosterUrl,width:44}),this.posterFade=new _.default({model:this.model,modelAttribute:"Media",type:"clip",getUrl:o.default.bind(this.getScreenshotUrl,this),width:350});var n=this.model.get("Player");n&&n.state===p.default.states.PLAYING&&(this.screenshotInterval=setInterval(o.default.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&&e.thumb},getScreenshotUrl:function(e){var t=o.default.first(e);if(t){var n=this.model.get("viewOffset")||0,r=this.screenshotCount*this.screenshotIntervalDelay+n+4e3;return(0,v.default)(t,r,this.screenshotPreferredIndex)}},updateScreenshot:function(){
if(this.screenshotCount++,this.posterFade){var e=this.posterFade.screenshotUrl,t=this.getScreenshotUrl(this.model.get("Media"));t&&(this.posterFade.screenshotUrl=t,this.posterFade.load(t).done(this.whenRendered(function(t){this.posterFade.showImage(t),this.ui.posterFade.removeClass("invisible"),this.posterFadeDelay=o.default.delay(this.whenRendered(function(){if(this.image.showImage(t),this.ui.posterFade.addClass("invisible"),e){var n=this.posterFade.cache,r=this.image.getTranscodeUrl(e),a=n.get(n.getItemCacheKey({
url:r}));a&&n.remove(a)}}),800)})))}},bindings:o.default.extend({},w.default.prototype.bindings,{".media-subtitle-1":{modelAttribute:"year",modelListeners:["title","year"],autohide:!0,formatter:function(e){var t=w.default.prototype.bindings[".media-subtitle-1"].formatter.apply(this,arguments),n=w.default.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=c.default.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(0,m.default)(e.state)}},".session-transcode":{modelAttribute:"VirtualTranscodeSession",formatter:function(e){return e?(0,u.default)("Transcoding"):(0,u.default)("Direct Play")}},".session-transcode-throttled":{modelAttribute:"VirtualTranscodeSession",autohide:!0,formatter:function(e){return e&&"1"===e.throttled?(0,u.default)("(throttled)"):"";
}},".session-transcode-video-decision":{modelAttribute:"VirtualTranscodeSession",formatter:function(e,t){var n=!(!e||!e.videoCodec);return t.parent().toggleClass("hidden",!n),n?"copy"===e.videoDecision?(0,u.default)("Direct Stream"):(0,u.default)("Transcode ({1})",e.videoCodec):""}},".session-transcode-audio-decision":{modelAttribute:"VirtualTranscodeSession",formatter:function(e,t){var n=!(!e||!e.audioCodec);return t.parent().toggleClass("hidden",!n),n?"copy"===e.audioDecision?(0,u.default)("Direct Stream"):(0,
u.default)("Transcode ({1})",e.audioCodec):""}},".session-username":{modelAttribute:"User",formatter:function(e){return e.title}}}),onRender:function(){w.default.prototype.onRender.apply(this,arguments),this.userImage.setElement(this.ui.userPoster),this.posterFade.setElement(this.ui.posterFade)},onClose:function(){w.default.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,t){t&&(t.state!==p.default.states.PLAYING&&this.screenshotInterval?(this.screenshotInterval=clearInterval(this.screenshotInterval),this.screenshotCount=0):t.state!==p.default.states.PLAYING||this.screenshotInterval||(this.screenshotInterval=setInterval(o.default.bind(this.updateScreenshot,this),this.screenshotIntervalDelay)))},onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),b.default.execute("playMedia",{item:this.model,offset:this.model.get("viewOffset")
})},onInfoClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.$el.toggleClass("dim")}});t.default=T,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1490),o=r(s),l=i.default.extend({tagName:"ul",className:"tile-list media-tile-list sync-tile-list show-context",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2360),i=r(a),s=n(3),o=r(s),l=n(47),u=r(l),d=n(13),c=r(d),f=n(5),p=r(f),h=n(12),v=r(h),g=n(165),m=r(g),y=n(197),b=r(y),P=n(27),w=r(P),S=n(1305),_=r(S),T=n(58),I=r(T),M=n(421),C=r(M),x=n(1581),E=r(x),k=n(711),D=r(k),A=c.default.Layout.extend({tagName:"li",className:"poster-item media-tile-list-item sync-tile-list-item",template:i.default,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 t=this.type,n=this.contentType,r=150;"episode"===t?t="show":"clip"===t||"userPlaylistItem"===t?r=250:"directory"===t&&(t="audio"===n?"track":"photo"===n?"photo":"movie"),this.$el.addClass(t),this.image=new I.default({server:this.server,type:t,width:r}),this.progressModel=new u.default.Model({current:0});var a=this.server.get("transcodeJobs");this.metadataItems=new _.default([],{server:this.server,device:this.model.device,syncItemId:this.model.id}),
this.listenTo(this.metadataItems,"reset",this.onMetadataItemsReset),this.listenTo(a,"reset",this.onTranscodeJobsReset),this.metadataItems.fetch({reset:!0}),this.server.supports("syncNotifications")?this.listenTo(this.metadataItems,"change:Media",this.onMediaChange):this.metadataItemsInterval=setInterval(o.default.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").get("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").get("failure"))return"failed";var t=e.models,n=t.length;if(!n)return"unknown";for(var r="complete",a=[],i=[],s=0;s<n;s++){var l=t[s],u=l.get("Media");if(a.push(l.get("grandparentKey")),i.push(l.get("parentKey")),u.length||(r="unknown"),"failed"!==r&&"unknown"!==r)for(var d=0,c=u.length;d<c;d++)for(var f=u[d].Part,p=0,h=f.length;p<h;p++){var v=f[p],g=m.default.getSyncStateFromPart(v);m.default.failedRegex.test(g)&&(r="failed"),m.default.processingRegex.test(g)&&(r="processing"),
m.default.waitingRegex.test(g)&&"processing"!==r&&(r=v.key?"waiting":"processing")}}return this.hasMultipleItems=n>1,this.hasSameGrandparents=1===o.default.compact(o.default.uniq(a)).length,this.hasSameParents=1===o.default.compact(o.default.uniq(i)).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 C.default({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],r=n.get("progress");if(this.ui.statusIcons.addClass("hidden"),r>0){this.ui.transcodeStatus.removeClass("hidden");var a=n.get("type"),i=(0,
b.default)(n.get("remaining"));if(this.progressModel.set("progress",r),"download"===a)this.progressModel.set("text",r.toString()+"%"),this.ui.transcodeTimeRemaining.text((0,p.default)("Downloading"));else if("upload"===a)this.progressModel.set("text",r.toString()+"%"),this.ui.transcodeTimeRemaining.text((0,p.default)("Uploading"));else{var s=n.get("speed");if(s){var o=Math.round(10*n.get("speed"))/10;o>10&&(o=Math.round(o)),this.progressModel.set("text",o.toString()+"x")}else this.progressModel.set("text","");
this.ui.transcodeTimeRemaining.text(i)}this.updatePoster(n.get("thumb"))}else this.ui.transcodeStatus.addClass("hidden"),this.ui.processingIcon.removeClass("hidden")},onClick:function(e){e.preventDefault(),v.default.trigger("show:modal",new E.default({model:this.model,collection:this.metadataItems}))},onEditClick:function(e){e.stopImmediatePropagation(),e.preventDefault(),v.default.trigger("show:modal",new D.default({model:this.model}))},onDeleteClick:function(e){e.stopImmediatePropagation(),e.preventDefault(),
w.default.execute("deleteSyncItem",{syncItem:this.model,server:this.server})}});t.default=A,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1492),o=r(s),l=i.default.extend({tagName:"ul",className:"list sync-status-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2361),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(5),c=r(d),f=n(165),p=r(f),h=n(197),v=r(h),g=n(58),m=r(g),y=u.default.ItemView.extend({
tagName:"li",className:"sync-status-list-item",template:i.default,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 m.default({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(o.default.bind(function(t){if(this.syncItem.id===t.get("syncItemId")){var n=this.model.get("thumb"),r=this.model.get("title"),a=t.get("transcodeThumb"),i=t.get("title"),s=i&&i.indexOf(r)>-1,o=!0;if(n&&a){var l=new RegExp("(.+)"+t.get("thumb")+"$");o=l.exec(n)}s&&o&&(e=t)}},this)),
e&&e.get("progress")>0){var t=Math.round(10*e.get("speed"))/10,n=(0,v.default)(e.get("remaining"))||(0,c.default)("done"),r=Math.round(10*e.get("progress"))/10;return{active:!0,speed:t,remaining:n,progress:r,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,r=t.length;n<r;n++)for(var a=t[n].Part,i=0,s=a.length;i<s;i++){var o=a[i],l=p.default.getSyncStateFromPart(o);p.default.failedRegex.test(l)&&(e=p.default.getSyncStateContextFromPart(o)),
p.default.processingRegex.test(l)&&(e="downloading"===l?"downloading":"processing"),p.default.waitingRegex.test(l)&&"processing"!==e&&(e=o.key?"waiting":"processing")}return e},getErrorMessage:function(e){switch(e){case"sourceFileUnavailable":return(0,c.default)("This media is inaccessible. Please check that the file exists with the correct permissions.");case"sourceFileMetadataError":return(0,c.default)("The metadata for this media is invalid. Please reanalyze the media and try again.");case"clientProfileError":
return(0,c.default)("The client profile for the sync target is invalid.");case"ioError":return(0,c.default)("An error occurred processing this media. Please check that the disk is not full.");case"transcoderError":return(0,c.default)("The transcoder was unable to process this media.");case"mediaAnalysisError":return(0,c.default)("This media was unable to be analyzed.");case"downloadFailed":return(0,c.default)("This media was unable to be downloaded. Please check that it is still available and try again.");
case"unknownError":return(0,c.default)("An error occurred while syncing this media.")}return(0,c.default)("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)}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),i=r(a),s=n(3),o=r(s),l=n(288),u=r(l),d=n(5),c=r(d),f=n(12),p=r(f),h=n(45),v=r(h),g=n(43),m=r(g),y=n(1495),b=r(y),P=m.default.extend({
tagName:"ol",className:"list media-list playlist-items",itemView:b.default,sorted:!0,itemEvents:{sort:"onSort"},initialize:function(){o.default.bindAll(this,"onItemMove")},onRender:function(){this.sortable&&this.sortable.destroy(),this.sortable=new u.default(this.el,o.default.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(e){var t=(0,i.default)(e.item).data("queue-item-id"),n=(0,i.default)(e.item).prev().data("queue-item-id"),r=this.options.playQueue;if(n)return void r.moveItem(t,n);var a=r.get("selectedItem").get("title"),s=new v.default({title:(0,c.default)("Convert Immediately"),message:(0,c.default)("Do you want to start converting this item immediately? Any conversion progress for '{1}' will be lost.",a)}),l=s.promise;l.done(function(){r.moveItem(t)}),l.fail(o.default.bind(this.render,this)),
p.default.trigger("show:modal",s)}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2362),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({template:i.default,serializeData:function(){return{serverID:this.model.id}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2363),s=r(i),o=n(3),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=n(5),h=r(p),v=n(162),g=r(v),m=n(314),y=r(m),b=n(27),P=r(b),w=n(391),S=r(w),_=n(254),T=r(_),I=n(58),M=r(I),C=n(696),x=r(C),E=d.default.Layout.extend({
className:"striped-list-item media-list-item playlist-item version-generator-item",tagName:"li",template:s.default,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=y.default[this.type];"movie"===this.type&&(t=y.default.art);var n="episode"===this.type?"show":this.type;this.image=new M.default({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 g.default.title(this.metadataItem)}},".generator-target":{modelAttribute:"target",
formatter:function(e){return this.model.get("syncItemId")?(0,h.default)("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=f.resolve("appModel"),t=new S.default({id:this.model.get("syncItemId"),clientIdentifier:this.model.get("clientIdentifier")},{server:e.get("user").server});return P.default.execute("deleteSyncItem",{syncItem:t,server:this.model.server})},deleteGenerator:function(){var e=new T.default({id:this.model.get("generatorID")},{server:this.model.server,playlistID:this.metadataItem.get("playlistID")
});return P.default.execute("disableVersionGenerator",{generator:e,ratingKey:this.metadataItem.get("ratingKey")})},onRender:function(){this.image.setElement(this.ui.poster),this.statusRegion.show(new x.default({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 t=this.playQueue.get("collection");this.listenToOnce(t,"sort",l.default.debounce(this.onCollectionSort));
var n=this.model.get("playQueueItemID"),r=this.playQueue.get("playQueueSelectedItemID");this.playQueue.moveItem(n,r)},onDeleteClick:function(e){e.preventDefault(),this.model.has("syncItemId")?this.deleteSyncItem():this.deleteGenerator()}});t.default=E,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1497),o=r(s),l=i.default.extend({tagName:"ul",className:"list card-list",itemView:o.default});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2365),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=n(27),p=r(f),h=n(134),v=r(h),g=n(329),m=r(g),y=u.default.ItemView.extend({tagName:"li",className:"striped-list-item",template:i.default,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(),p.default.execute("updateChannel",{server:this.model.server});else if(/\/prefs$/.test(this.model.id)){e.preventDefault();var t=new v.default([],{server:this.model.server,url:this.model.id});t.fetch().done(o.default.bind(function(){c.default.trigger("show:modal",new m.default({model:this.model,collection:t}))},this))}}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1499),o=r(s),l=i.default.extend({tagName:"ul",className:"tile-list media-tile-list channel-directory-tile-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2366),i=r(a),s=n(13),o=r(s),l=n(5),u=r(l),d=n(12),c=r(d),f=n(58),p=r(f),h=n(1572),v=r(h),g=o.default.ItemView.extend({tagName:"li",className:"poster-item media-tile-list-item channel-directory-tile-list-item channel",
template:i.default,ui:{poster:".media-poster",subtitle:".media-subtitle-1"},events:{"click a":"onClick"},initialize:function(e){this.closeOnInstall=e.closeOnInstall,this.image=new p.default({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 n=e?(0,u.default)("Installed"):"";return this.ui.subtitle.text(n),e}}},onRender:function(){this.image.setElement(this.ui.poster);
},onClose:function(){this.image.close()},onClick:function(e){e.preventDefault(),c.default.trigger("show:modal",new v.default({model:this.model,closeOnInstall:this.closeOnInstall}))}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1501),o=r(s),l=i.default.extend({tagName:"ul",className:"tile-list media-tile-list channel-tile-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2367),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(5),c=r(d),f=n(12),p=r(f),h=n(27),v=r(h),g=n(134),m=r(g),y=n(58),b=r(y),P=n(329),w=r(P),S=u.default.ItemView.extend({tagName:"li",className:"poster-item media-tile-list-item channel",template:i.default,ui:{poster:".media-poster"},events:{"click .settings-btn":"onSettingsClick","click .uninstall-btn":"onUninstallClick"},initialize:function(e){this.skipFirstRender=e.skipFirstRender,
this.image=new b.default({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 u.default.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"video"===e?(0,c.default)("Video"):"music"===e?(0,c.default)("Music"):"photos"===e?(0,c.default)("Photo"):(0,c.default)("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 t=new m.default([],{server:this.model.server,url:this.model.id+"/:/prefs"}),n=t.fetch();n.done(o.default.bind(function(){p.default.trigger("show:modal",new w.default({model:this.model,collection:t}))},this)),n.always(o.default.bind(function(){this.$el.removeClass("active")},this))}},onUninstallClick:function(e){if(e.preventDefault(),!this.$el.hasClass("active")){this.$el.addClass("active");var t=v.default.execute("uninstallChannel",{channel:this.model});t.done(o.default.bind(function(){this.model.trigger("destroy",this.model,this.model.collection);
},this)),t.always(o.default.bind(function(){this.$el.removeClass("active")},this))}}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(205),i=r(a),s=n(43),o=r(s),l=n(1503),u=r(l),d=o.default.extend({mixins:[i.default],tagName:"ul",className:"tile-list media-tile-list album-tile-list",itemView:u.default});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2368),i=r(a),s=n(3),o=r(s),l=n(123),u=r(l),d=n(262),c=r(d),f=n(58),p=r(f),h=u.default.extend({className:"poster-item media-tile-list-item",template:i.default,ui:c.default.prototype.ui,initialize:function(e){u.default.prototype.initialize.apply(this,arguments),this.image=new p.default({model:this.model,type:"album",width:180})},bindings:o.default.extend({},u.default.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"year"}}),onMoreClick:function(e){
c.default.prototype.onMoreClick.apply(this,arguments)}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(443),i=r(a),s=n(1505),o=r(s),l=i.default.extend({tagName:"ul",className:"list media-list track-list show-context",itemView:o.default,itemViewOptions:function(){return{collection:this.collection}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2369),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(12),p=r(f),h=n(137),v=r(h),g=n(27),m=r(g),y=n(57),b=r(y),P=n(121),w=r(P),S=n(259),_=r(S),T=c.default.ItemView.extend({tagName:"li",className:"striped-list-item",template:i.default,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){o.default.bindAll(this,"onResize"),this.artistTitle=e.artistTitle,this.parentMediaActions=e.mediaActions,this.mediaActions=new w.default({},{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)),
p.default.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&&(0,v.default)(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(),p.default.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(),m.default.execute("playMedia",{item:this.model,siblings:!0})},onMusicVideoClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=this.model.server.getSectionForItem(this.model);if(!o.default.isEmpty(t)){var n=new b.default({key:this.model.get("primaryExtraKey"),type:"clip",librarySectionUUID:t.get("uuid")},{server:this.model.server,section:this.model.section
});m.default.execute("playMedia",{item:n})}},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new _.default({model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover");var t=(0,u.default)(e.currentTarget),n=this.ui.actions.position().top,r=this.dropdown.getPosition(t,this.containerSize,n);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")}});t.default=T,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(43),i=r(a),s=n(1507),o=r(s),l=i.default.extend({className:"artwork-options-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2370),i=r(a),s=n(13),o=r(s),l=n(247),u=r(l),d=n(314),c=r(d),f=n(95),p=r(f),h=o.default.Layout.extend({tagName:"span",template:i.default,regions:{poster:".media-poster"},initialize:function(e){var t=e.artworkType,n=150;"art"===t?n=240:"banner"===t&&(n=520),
this.$el.addClass(t),this.image=new p.default({className:"media-poster-image",model:this.model,modelAttribute:"thumb",placeholderClass:c.default[t],width:n,height:u.default.getPosterHeight(t,n)})},bindings:{".artwork-option":{modelAttribute:"selected",manual:!0,formatter:function(e,t){t.toggleClass("selected",e)}}},onRender:function(){this.poster.show(this.image)}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(1520),i=r(a),s=n(1509),o=r(s),l=i.default.extend({
tagName:"ul",className:"list media-list media-details-list episode-details-list show-context",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2371),i=r(a),s=n(3),o=r(s),l=n(245),u=r(l),d=n(442),c=r(d),f=n(58),p=r(f),h=c.default.extend({className:"striped-list-item media-list-item media-details-list-item episode-details-list-item",template:i.default,showRating:!0,bypassShowUnwatchedIconsSetting:!0,
createImageView:function(){this.image=new p.default({model:this.model,type:"episode",getUrl:this.getPosterUrl,height:110})},getPosterUrl:function(e){return e},bindings:o.default.extend({},c.default.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-index":{modelAttribute:"index",autohide:!0,formatter:function(e,t){return t.toggleClass("date",null==e),(0,u.default)({episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0})}}})});t.default=h,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(443),i=r(a),s=n(1511),o=r(s),l=i.default.extend({tagName:"ul",className:"list media-list episode-list show-context",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2372),i=r(a),s=n(3),o=r(s),l=n(245),u=r(l),d=n(123),c=r(d),f=c.default.extend({className:"striped-list-item media-list-item episode-list-item",
template:i.default,showRating:!0,bypassShowUnwatchedIconsSetting:!0,regions:{rating:".media-rating"},bindings:o.default.extend({},c.default.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-index":{modelAttribute:"index",autohide:!0,formatter:function(e,t){return t.toggleClass("date",null==e),(0,u.default)({episodeIndex:e,date:this.model.get("originallyAvailableAt"),noLeadingZero:!0})}}})});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(205),i=r(a),s=n(43),o=r(s),l=n(1513),u=r(l),d=o.default.extend({mixins:[i.default],tagName:"ul",className:"tile-list media-tile-list episode-tile-list",itemView:u.default});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2373),i=r(a),s=n(3),o=r(s),l=n(245),u=r(l),d=n(123),c=r(d),f=n(262),p=r(f),h=n(58),v=r(h),g=c.default.extend({className:"poster-item media-tile-list-item episode-tile-list-item",
template:i.default,ui:p.default.prototype.ui,bypassShowUnwatchedIconsSetting:!0,initialize:function(e){c.default.prototype.initialize.apply(this,arguments),this.image=new v.default({model:this.model,type:"episode",width:250})},bindings:o.default.extend({},c.default.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"index",formatter:function(e){return(0,u.default)({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){p.default.prototype.onMoreClick.apply(this,arguments)}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2374),i=r(a),s=n(419),o=r(s),l=n(123),u=r(l),d=n(262),c=r(d),f=n(58),p=r(f),h=u.default.extend({className:"poster-item media-tile-list-item extra-tile-list-item",
template:i.default,ui:c.default.prototype.ui,initialize:function(e){u.default.prototype.initialize.apply(this,arguments),this.image=new p.default({model:this.model,type:"clip",width:250})},bindings:{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"extraType",formatter:function(e){if(e){var t=o.default.get(e);return t&&t.title}}}}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1516),o=r(s),l=n(665),u=r(l),d=i.default.extend({
mixins:[u.default],tagName:"ul",itemView:o.default,className:"list"});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2375),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({tagName:"li",template:i.default,className:"striped-list-item",initialize:function(e){this.item=e.item}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1519),o=r(s),l=n(1518),u=r(l),d=i.default.extend({
tagName:"ul",className:"list match-result-list",itemView:o.default,emptyView:u.default});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2376),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2377),i=r(a),s=n(13),o=r(s),l=n(27),u=r(l),d=n(1515),c=r(d),f=o.default.Layout.extend({
tagName:"li",className:"striped-list-item match-result-list-item row",template:i.default,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 c.default({collection:e})))}},onClick:function(e){e.preventDefault(),
u.default.execute("match",{item:this.item,guid:this.model.id,name:this.model.get("name"),children:this.model.get("children")})}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(205),i=r(a),s=n(43),o=r(s),l=o.default.extend({mixins:[i.default]});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2380),i=r(a),s=n(13),o=r(s),l=n(635),u=r(l),d=o.default.ItemView.extend({
className:"hidden",template:i.default,bindings:{".media-progress-pct":{modelAttribute:"viewOffset",manual:!0,formatter:function(e,t){var n=this.model,r="track"===n.get("type")?0:(0,u.default)(e,n.get("duration"));r&&t.css("width",r+"%"),this.$el.toggleClass("hidden",!r)}}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2321),i=r(a),s=n(13),o=r(s),l=n(1523),u=r(l),d=o.default.Layout.extend({template:i.default,
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 u.default({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)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(11).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2322),s=a(i),o=n(118),l=a(o),u=n(198),d=a(u),c=n(697),f=a(c),p=f.default.extend({template:s.default,posterWidth:{video:70},bindings:r({},f.default.prototype.bindings,{".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=(0,d.default)(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=(0,l.default)({seasonIndex:this.model.get("parentIndex"),
episodeIndex:this.model.get("index"),date:this.model.get("originallyAvailableAt")})),t&&(t=" - "+t),t||""}}}),serializeData:function(){return{type:this.type}}});t.default=p,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),i=r(a),s=n(3),o=r(s),l=n(288),u=r(l),d=n(43),c=r(d),f=n(1525),p=r(f),h=c.default.extend({tagName:"ol",className:"list media-list playlist-items",itemView:p.default,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 u.default(this.el,{onUpdate:o.default.bind(this.onItemMove,this),draggable:".playlist-item",handle:".sortable-handle",animation:200,scroll:!0,scrollSensitivity:100,scrollSpeed:2}))},onItemRemove:function(e,t,n){this.model.removeItem(n)},onItemMove:function(e){var t=(0,i.default)(e.item).data("playlist-id"),n=(0,i.default)(e.item).prev().data("playlist-id");
this.model.moveItem(t,n)},onClose:function(){this.sortable&&this.sortable.destroy()}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2382),i=r(a),s=n(13),o=r(s),l=n(27),u=r(l),d=n(1526),c=r(d),f=o.default.Layout.extend({template:i.default,tagName:"li",className:"striped-list-item media-list-item playlist-item",events:{"click .delete-btn":"onDeleteClick","click .playlist-inner-item":"onClick"},attributes:function(){
return{"data-playlist-id":this.model.get("playlistItemID")}},regions:{metadataRegion:".playlist-metadata-region"},initialize:function(e){this.canEdit=e&&e.canEdit},onRender:function(){this.metadataRegion.show(new c.default({model:this.model.get("metadataItem"),canEdit:this.canEdit}))},onClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),u.default.execute("playMedia",{item:this.model,siblings:!0})},onDeleteClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.trigger("remove",this.model.get("playlistItemID"));
}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(11).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2383),s=a(i),o=n(12),l=a(o),u=n(118),d=a(u),c=n(196),f=a(c),p=n(198),h=a(p),v=n(137),g=a(v),m=n(697),y=a(m),b=y.default.extend({template:s.default,posterWidth:{video:103,photo:59},events:{"click .media-details":"onDetailsClick","click .media-primary-subtitle":"onGrandparentClick","click .media-secondary-subtitle":"onParentClick"},bindings:r({},y.default.prototype.bindings,{
".media-primary-subtitle":{modelAttribute:"grandparentTitle",formatter:function(e){return"movie"!==this.type&&e?e:""}},".media-secondary-subtitle":{modelAttribute:"parentTitle",modelListeners:["parentTitle","index","year"],formatter:function(e){var t=e;return"episode"===this.type?t=(0,d.default)({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?(0,f.default)(this.model.get("originallyAvailableAt")):"track"===this.type?(0,g.default)(e):(0,h.default)(e)}}}),initialize:function(e){y.default.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(),l.default.trigger("navigate","details",{serverID:this.model.server.id,key:e}))},onRender:function(){if(y.default.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")}},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")},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)}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(205),i=r(a),s=n(43),o=r(s),l=n(1528),u=r(l),d=o.default.extend({mixins:[i.default],tagName:"ul",className:"tile-list media-tile-list season-tile-list",
itemView:u.default});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2384),i=r(a),s=n(3),o=r(s),l=n(5),u=r(l),d=n(123),c=r(d),f=n(262),p=r(f),h=n(58),v=r(h),g=c.default.extend({className:"poster-item media-tile-list-item",template:i.default,ui:p.default.prototype.ui,initialize:function(e){c.default.prototype.initialize.apply(this,arguments),this.image=new v.default({model:this.model,type:"season",width:150});
},bindings:o.default.extend({},c.default.prototype.bindings,{".media-title":{modelAttribute:"title"},".media-subtitle-1":{modelAttribute:"leafCount",formatter:function(e){return null==e?"":1===e?(0,u.default)("{1} episode",e):(0,u.default)("{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){p.default.prototype.onMoreClick.apply(this,arguments);
}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1530),o=r(s),l=i.default.extend({tagName:"ul",className:"list select-list select-playlist-list minimal-scroll",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2385),i=r(a),s=n(13),o=r(s),l=n(328),u=r(l),d=o.default.ItemView.extend({tagName:"li",
className:"striped-list-item select-list-item",template:i.default,ui:{poster:".playlist-poster"},initialize:function(){this.image=new u.default({model:this.model,width:40})},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(665),o=r(s),l=n(443),u=r(l),d=n(1532),c=r(d),f=u.default.extend({mixins:[o.default],
initialize:function(){u.default.prototype.initialize.apply(this,arguments),this.listenTo(this.collection,"change:parentIndex",i.default.debounce(this.onParentIndexChange))},tagName:"ul",className:"list media-list track-list show-context",itemView:c.default,onParentIndexChange:function(e,t){null!=e.previous("parentIndex")&&this.listModel.fetch()}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2386),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(12),p=r(f),h=n(137),v=r(h),g=n(27),m=r(g),y=n(664),b=r(y),P=n(57),w=r(P),S=n(121),_=r(S),T=n(259),I=r(T),M=n(173),C=r(M),x=c.default.ItemView.extend({
mixins:[b.default],tagName:"li",template:i.default,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){o.default.bindAll(this,"onResize"),this.artistTitle=e.artistTitle,this.parentMediaActions=e.mediaActions,this.mediaActions=new _.default({},{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)),p.default.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&&(0,v.default)(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(),p.default.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e},onClick:function(e){this.stopTrackingSelecting(e,function(){e.preventDefault(),m.default.execute("playMedia",{item:this.model,siblings:!0})})},onMusicVideoClick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=this.model.server.getSectionForItem(this.model);
if(!o.default.isEmpty(t)){var n=new w.default({key:this.model.get("primaryExtraKey"),type:"clip",librarySectionUUID:t.get("uuid")},{server:this.model.server,section:this.model.section});m.default.execute("playMedia",{item:n})}},onEditClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),p.default.trigger("show:modal",new C.default({mediaActions:this.mediaActions}))},onMoreClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new I.default({model:this.model}),
this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover");var t=(0,u.default)(e.currentTarget),n=this.ui.actions.position().top,r=this.dropdown.getPosition(t,this.containerSize,n);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")}});t.default=x,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),i=r(a),s=n(3),o=r(s),l=n(288),u=r(l),d=n(43),c=r(d),f=n(1535),p=r(f),h=n(1534),v=r(h),g=c.default.extend({
tagName:"ol",className:"list media-list playlist-items",itemView:p.default,emptyView:v.default,sorted:!0,onRender:function(){this.sortable&&this.sortable.destroy(),this.sortable=new u.default(this.el,{onUpdate:o.default.bind(this.onItemMove,this),handle:".sortable-handle",animation:200,scroll:!0,scrollSensitivity:100,scrollSpeed:2})},onClose:function(){this.sortable&&this.sortable.destroy()},onItemMove:function(e){var t=(0,i.default)(e.item).data("generator-id"),n=(0,i.default)(e.item).prev().data("generator-id");
this.collection.parent.moveItem(t,n)}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2387),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2388),i=r(a),s=n(13),o=r(s),l=n(5),u=r(l),d=n(12),c=r(d),f=n(247),p=r(f),h=n(1404),v=r(h),g=n(27),m=r(g),y=n(328),b=r(y),P=n(175),w=r(P),S=n(1593),_=r(S),T=o.default.ItemView.extend({
className:"striped-list-item media-list-item playlist-item version-generator-item",tagName:"li",template:i.default,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,this.status=this.model.get("status");
var t=60;this.compositeImage=new b.default({model:this.model,width:p.default.getPosterWidth("movie",t),height:t,rows:1,columns:1}),this.listenTo(this.transcodeJobs,"reset add remove",this.onTranscodeJobsChange)},resetState:function(){var e=["converting",v.default.PENDING,v.default.COMPLETE,v.default.FAILED];this.ui.status.removeClass(e.join(" "))},getState:function(e){return this.transcodeJobs.findWhere({generatorID:this.model.id})?"converting":e.get("itemsFailedCount")>0?v.default.FAILED:e.get("state");
},bindings:{".generator-title":{modelAttribute:"title"},".generator-target":{modelAttribute:"target"},".generator-status":{model:"status",modelAttribute:"state",modelListeners:["state","itemsFailedCount"],manual:!0,formatter:function(e,t){this.resetState(),t.addClass(this.getState(this.status))}},".generator-status-failed-message":{model:"status",modelAttribute:"itemsFailedCount",formatter:function(e){return 1===e?(0,u.default)("1 failed item"):(0,u.default)("{1} failed items",e)}},".retry-btn":{
model:"status",modelAttribute:"state",modelListeners:["state","itemsFailedCount"],manual:!0,autohide:function(e){return this.getState(this.status)===v.default.FAILED}}},onRender:function(){this.compositeImage.setElement(this.ui.poster)},onClose:function(){this.compositeImage.close()},onTranscodeJobsChange:function(){var e=this.getState(this.status);this.resetState(),this.ui.status.addClass(e)},onClick:function(e){e.preventDefault(),c.default.trigger("show:modal",new _.default({model:this.model,listModel:this.model.get("children"),
transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}))},onRetryClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),m.default.execute("reprocessVersionGenerator",{generator:this.model})},onEditClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),c.default.trigger("show:modal",new w.default({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),m.default.execute("deleteVersionGenerator",{generator:this.model})}});t.default=T,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1537),o=r(s),l=i.default.extend({tagName:"ul",className:"list version-generator-metadata-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2389),i=r(a),s=n(13),o=r(s),l=n(5),u=r(l),d=n(118),c=r(d),f=n(1403),p=r(f),h=n(27),v=r(h),g=n(58),m=r(g),y=n(696),b=r(y),P=o.default.Layout.extend({
tagName:"li",className:"striped-list-item version-generator-metadata-list-item",template:i.default,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 m.default({
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(0,c.default)({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=p.default.contexts;switch(e){case t.FILE_UNAVAILABLE:return(0,u.default)("File unavailable");case t.METADATA_ERROR:return(0,u.default)("Invalid metadata");case t.PROFILE_ERROR:
return(0,u.default)("Invalid profile");case t.ANALYSIS_ERROR:return(0,u.default)("Unable to analyze")}return(0,u.default)("Unable to convert")},onRender:function(){this.image.setElement(this.ui.poster),this.statusRegion.show(new b.default({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(),v.default.execute("enableVersionGenerator",{generator:this.model.generator,ratingKey:this.model.id})},onRetryClick:function(e){e.preventDefault(),v.default.execute("reprocessVersionGenerator",{generator:this.model.generator,ratingKey:this.model.id})}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1539),o=r(s),l=i.default.extend({tagName:"ul",className:"list alpha-bar-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2390),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({tagName:"li",className:"alpha-bar-list-item",template:i.default,events:{"click a":"onClick"},onClick:function(e){e.preventDefault(),this.model.section.set("currentFirstCharacter",this.model);
}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2391),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=u.default.ItemView.extend({className:"label-list section-current-filters-list",template:i.default,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 t=(0,o.default)(e.currentTarget).data("key");this.trigger("removeAllFilters",t)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1542),o=r(s),l=i.default.extend({tagName:"ul",className:"list side-bar-list",itemView:o.default,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"})}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2392),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=u.default.ItemView.extend({tagName:"li",template:i.default,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!!o.default.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)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2393),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=n(1544),c=r(d),f=u.default.CompositeView.extend({classname:"filter-option-list-search-container",
template:i.default,itemView:c.default,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=o.default.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)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2394),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=u.default.ItemView.extend({tagName:"li",template:i.default,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"),t=o.default.findWhere(e,{
key:this.model.parent.id});if(!t)return!1;var n=t.values,r=o.default.find(n,o.default.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);
}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2395),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({tagName:"li",template:i.default,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)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(13),i=r(a),s=n(8),o=r(s),l=n(1547),u=r(l),d=i.default.CollectionView.extend({
tagName:"ul",className:"list browse-directory-list",itemView:u.default,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 t=(0,o.default)(e.currentTarget),n=t.data("key"),r=this.collection.get(n)||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)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2396),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({tagName:"li",className:"striped-list-item browse-directory-list-item",template:i.default,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");
}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1549),o=r(s),l=i.default.extend({tagName:"ul",className:"agents-nav nav nav-pills nav-pills-sm",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2397),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({tagName:"li",template:i.default,
bindings:{a:{modelAttribute:"selected",manual:!0,formatter:function(e){this.$el.toggleClass("active",!!e)}}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(288),i=r(a),s=n(43),o=r(s),l=n(1551),u=r(l),d=o.default.extend({tagName:"ul",className:"list contributor-list",itemView:u.default,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 i.default(this.$el[0],{draggable:".card-sortable",animation:200})},onClose:function(){this.sortable.destroy()}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2398),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=n(134),p=r(f),h=n(329),v=r(h),g=n(1571),m=r(g),y=u.default.ItemView.extend({tagName:"li",className:"card card-sortable",
template:i.default,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 t=new p.default([],{server:this.model.server,url:"/:/plugins/"+this.model.id+"/prefs"});t.fetch().done(o.default.bind(function(){c.default.trigger("show:modal",new v.default({model:this.model,collection:t}))},this))},onInfoClick:function(e){e.preventDefault(),c.default.trigger("show:modal",new m.default({model:this.model}))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1554),o=r(s),l=n(1553),u=r(l),d=i.default.extend({
tagName:"ul",className:"list card-tile-list",itemView:o.default,emptyView:u.default});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2399),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2400),i=r(a),s=n(13),o=r(s),l=n(617),u=r(l),d=n(248),c=r(d),f=n(138),p=r(f),h=n(642),v=r(h),g=n(27),m=r(g),y=o.default.ItemView.extend({
tagName:"li",className:"card-tile-list-item card-2-col-item",template:i.default,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 n=u.default.getIcon(e);t.addClass("device-icon-"+n)}},".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(0,p.default)(e)}},".sync-count":{modelAttribute:"syncList",
autohide:!1,formatter:function(e){if(e){var t,n=e.get("itemsCompleteCount");return n&&n>0&&(t=[n,(0,c.default)("item",n)].join(" "),this.ui.syncInfo.removeClass("hidden")),t}}},".sync-size":{modelAttribute:"syncList",autohide:!1,formatter:function(e){if(e){var t,n=e.get("totalSize");return n&&n>0&&(t=["(",(0,v.default)(n),")"].join("")),t}}}},onRemoveClick:function(e){e.preventDefault(),this.isMediaServer()?m.default.execute("removeServer",{device:this.model}):m.default.execute("removeDevice",{device:this.model
})}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1557),o=r(s),l=n(1556),u=r(l),d=i.default.extend({tagName:"ul",className:"list card-tile-list",itemView:o.default,emptyView:u.default,sorted:!0});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2401),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({template:i.default
});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2402),i=r(a),s=n(13),o=r(s),l=n(12),u=r(l),d=n(27),c=r(d),f=n(120),p=r(f),h=n(703),v=r(h),g=n(212),m=r(g),y=o.default.Layout.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:i.default,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 p.default({model:this.model,type:"friend",width:80})},bindings:{".username":{modelAttribute:"title"}},onRender:function(){this.image.setElement(this.ui.poster),this.details.show(new v.default({model:this.model}))},onClose:function(){this.image.close()},onEditClick:function(e){e.preventDefault(),u.default.trigger("show:modal",new m.default({model:this.model}))},onDeleteClick:function(e){e.preventDefault(),c.default.execute("removeFriend",{
friend:this.model})}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(704),o=r(s),l=n(1559),u=r(l),d=i.default.extend({tagName:"ul",className:"list card-tile-list",itemView:o.default,emptyView:u.default,sorted:!0,isEmpty:function(e){return!this.collection||this.collection.length<2},addChildView:function(e,t,n){this.isEmpty(this.collection)?this.showEmptyView():this._showingEmptyView?this.render():this.children.findByModel(e)||i.default.prototype.addChildView.apply(this,arguments);
},showEmptyView:function(){this._showingEmptyView||this.children.each(function(e){this.removeChildView(e)},this),i.default.prototype.showEmptyView.apply(this,arguments)}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2404),s=r(i),o=n(3),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=n(704),h=r(p),v=d.default.Layout.extend({template:s.default,regions:{card:".centered-home-user-container"},initialize:function(e){
this.itemViewOptions=e},serializeData:function(){var e=f.resolve("appModel"),t=e.get("user");return{hasHomeFeature:!!t.get("subscription").get("features").get("home"),plexPassUrl:t.server.get("plexPassUrl")}},onRender:function(){var e=f.resolve("appModel"),t=e.get("user"),n=t.get("homeUsers");n.length&&this.card.show(new h.default(l.default.extend({},this.itemViewOptions,{model:n.first()})))}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2406),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(5),c=r(d),f=n(248),p=r(f),h=n(138),v=r(h),g=n(27),m=r(g),y=n(120),b=r(y),P=u.default.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:i.default,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 b.default({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 t=this.model.get("createdAt");return t?(0,c.default)("invite sent {1}",(0,v.default)(t)):(0,c.default)("invite sent to {1}",this.model.get("email"))}var n=this.model.get("friend"),r=this.model.get("server"),a=this.model.get("home");if(r){var i=o.default.reduce(e,function(e,t){return e+=t.numLibraries;
},0),s=(0,p.default)((0,c.default)("library"),i,(0,c.default)("libraries"));return a?(0,c.default)("wants you to join their home and share {1} {2} with you",i,s):n?(0,c.default)("wants to be friends and share {1} {2} with you",i,s):(0,c.default)("wants to share {1} {2} with you",i,s)}return a?(0,c.default)("wants you to join their home"):(0,c.default)("wants to be friends")}}},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onAcceptClick:function(e){
e.preventDefault(),m.default.execute("acceptInvite",{invite:this.model})},onDeleteClick:function(e){e.preventDefault(),m.default.execute("rejectInvite",{invite:this.model,subset:this.subset})}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1562),o=r(s),l=i.default.extend({tagName:"ul",className:"list card-tile-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2407),i=r(a),s=n(13),o=r(s),l=n(12),u=r(l),d=n(27),c=r(d),f=n(174),p=r(f),h={artist:"music",movie:"film",photo:"picture",show:"display"},v=o.default.ItemView.extend({tagName:"li",className:"card-tile-list-item card-2-col-item",template:i.default,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:h[t.type]}},bindings:{".section-title":{modelAttribute:"title"}},onEditClick:function(e){e.preventDefault();var t=this.model,n=new p.default({model:t,server:t.server,isDefaultSection:t.isNew()});t.isNew()&&n.promise.always(function(){t.trigger("destroy",t,t.collection)}),u.default.trigger("show:modal",n)},onDeleteClick:function(e){e.preventDefault(),c.default.execute("deleteSection",{section:this.model})}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1564),o=r(s),l=i.default.extend({className:"list announcement-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2408),i=r(a),s=n(13),o=r(s),l=n(95),u=r(l),d=o.default.ItemView.extend({className:"announcement-list-item",template:i.default,ui:{thumb:".thumb",unread:".unread"},initialize:function(){this.image=new u.default({
url:this.model.get("imageUrl")})},onRender:function(){this.image.setElement(this.ui.thumb),this.model.markAsRead()},onClose:function(){this.image.close()}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1566),o=r(s),l=i.default.extend({tagName:"ul",className:"list select-list select-friends-list dark-scrollbar",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2409),i=r(a),s=n(13),o=r(s),l=n(120),u=r(l),d=o.default.ItemView.extend({tagName:"li",className:"striped-list-item select-list-item",template:i.default,ui:{poster:".user-poster"},initialize:function(e){this.image=new u.default({model:this.model,type:"friend",width:80})},onRender:function(){this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1568),o=r(s),l=i.default.extend({tagName:"ul",className:"list card-tile-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2410),i=r(a),s=n(3),o=r(s),l=n(27),u=r(l),d=n(442),c=r(d),f=c.default.extend({template:i.default,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=c.default.prototype.serializeData.apply(this,arguments);return e},bindings:o.default.extend({},c.default.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(),u.default.execute("playMedia",{item:this.model,siblings:this.canPlaySiblings()})},onMarkWatchedClick:function(e){e.preventDefault(),u.default.execute("markWatched",{item:this.model})},onMarkUnwatchedClick:function(e){e.preventDefault(),u.default.execute("markUnwatched",{item:this.model})},onDeleteClick:function(e){e.preventDefault(),this.model.destroy()}});t.default=f,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2411),i=r(a),s=n(3),o=r(s),l=n(5),u=r(l),d=n(12),c=r(d),f=n(141),p=r(f),h=n(666),v=r(h),g=n(54),m=r(g),y=n(1546),b=r(y),P=m.default.extend({name:"addFolderModal",className:"add-folder-modal modal fade",template:i.default,events:o.default.extend({"submit form":"onSubmitForm"},m.default.prototype.events),ui:{path:'input[name="path"]'},regions:{rootList:".home-directory-container",childrenList:".path-container"
},initialize:function(e){m.default.prototype.initialize.apply(this,arguments),this.rootPathCollection=new v.default([],{server:e.server}),this.childrenPathCollection=new v.default([],{server:e.server}),this.loadRootPaths()},loadRootPaths:function(){this.rootPathCollection.fetch().done(this.whenRendered(function(){var e=this.rootPathCollection.where({home:!0}),t=o.default.first(e)||this.rootPathCollection.first();this.rootList.currentView.startLoadingItem(t),this.loadChildrenPaths(t)}))},loadChildrenPaths:function(e){
p.default.abortAll("addFolderModal");var t=e.get("children"),n=t.fetch({scope:"addFolderModal"});n.done(this.whenRendered(function(){this.ui.path.val(e.get("path")),this.childrenPathCollection.reset(t.models)})),n.fail(this.whenRendered(function(){this.childrenList.currentView.unselectItem(e),c.default.trigger("show:alert",{type:"error",message:(0,u.default)("Unable to load contents of '{1}'",e.get("path"))})})),n.always(this.whenRendered(function(){this.rootList.currentView.stopLoadingItem(e)}));
},onRender:function(){m.default.prototype.onRender.apply(this,arguments);var e=new b.default({isRoot:!0,collection:this.rootPathCollection}),t=new b.default({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()}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2412),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(5),c=r(d),f=n(12),p=r(f),h=n(295),v=r(h),g=n(54),m=r(g),y=n(124),b=r(y),P=b.default.extend({name:"addToCollectionModal",
className:"add-to-collection-modal select-modal modal modal-sm fade",template:i.default,ui:{addBtn:".add-btn",message:".message"},events:o.default.extend({"click .collection":"onCollectionClick","keyup .message":"onMessageKeyUp","click .add-btn":"onAddClick"},m.default.prototype.events),onlyAfterRender:["onReset"],initialize:function(e){b.default.prototype.initialize.apply(this,arguments),this.loading=!0,this.models=e.items,this.model=o.default.first(this.models),this.collectionIDs=[],this.filter=new v.default({
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(o.default.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 t=(0,u.default)(e.currentTarget),n=t.data("value");t.hasClass("selected")?this.collectionIDs.splice(o.default.indexOf(this.collectionIDs,n),1):this.collectionIDs.push(n),t.toggleClass("selected"),this.toggleAddButton()},onMessageKeyUp:function(){this.toggleAddButton()},onAddClick:function(e){e.preventDefault();var t=this.ui.addBtn;if(!t.isDisabled()){t.addClass("active");var n=this.ui.message.val().trim(),r=[];n&&r.push(this.model.batchAdd(this.models,"collection",n)),
o.default.each(this.collectionIDs,function(e){var t=this.collections.get(e);r.push(this.model.batchAdd(this.models,"collection",t.get("title")))},this);var a=u.default.when.apply(u.default,r);a.done(o.default.bind(this.hide,this)),a.fail(function(){t.removeClass("active"),p.default.trigger("show:alert",{type:"error",message:(0,c.default)("There was a problem adding to this collection.")})})}}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2414),i=r(a),s=n(54),o=r(s),l=n(95),u=r(l),d=o.default.extend({name:"agentInfoModal",className:"agent-info-modal modal fade",template:i.default,regions:{icon:".agent-icon-container"},serializeData:function(){return{agent:this.model.toJSON(),attribution:this.model.get("attribution").get("content")}},onRender:function(){o.default.prototype.onRender.apply(this,arguments),this.icon.show(new u.default({model:this.model,url:"/system/agents/attribution/image?identifier="+this.model.id,
className:"agent-icon",width:100,height:100}))}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2415),i=r(a),s=n(3),o=r(s),l=n(12),u=r(l),d=n(27),c=r(d),f=n(54),p=r(f),h=n(58),v=r(h),g=p.default.extend({name:"channelModal",className:"channel-modal modal fade",template:i.default,ui:{poster:".media-poster",installBtn:".install-btn",updateBtn:".update-btn",uninstallBtn:".uninstall-btn"},events:o.default.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"},p.default.prototype.events),initialize:function(e){p.default.prototype.initialize.apply(this,arguments),this.closeOnInstall=e.closeOnInstall,this.image=new v.default({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(){p.default.prototype.onRender.apply(this,arguments),this.image.setElement(this.ui.poster)},onClose:function(){this.image.close()},onBrowseClick:function(e){e.preventDefault();var t=this.model.get("key"),n=o.default.last(t.split("/"));u.default.trigger("navigate","channel",{
serverID:this.model.server.id,channelID:n}),this.hide()},onInstallClick:function(e){e.preventDefault();var t=this.ui.installBtn;if(!t.hasClass("active")){t.addClass("active");var n=c.default.execute("installChannel",{channel:this.model});n.done(o.default.bind(function(){this.closeOnInstall&&this.hide()},this)),n.always(function(){t.removeClass("active")})}},onUpdateClick:function(e){e.preventDefault();var t=this.ui.updateBtn;if(!t.hasClass("active")){t.addClass("active");var n=c.default.execute("updateChannel",{
channel:this.model,skipConfirmation:!0});n.always(function(){t.removeClass("active")})}},onRestartClick:function(e){e.preventDefault(),c.default.execute("restartChannel",{channel:this.model})},onResetClick:function(e){e.preventDefault(),c.default.execute("resetChannel",{channel:this.model})},onUninstallClick:function(e){e.preventDefault();var t=this.ui.uninstallBtn;if(!t.hasClass("active")){t.addClass("active");var n=c.default.execute("uninstallChannel",{channel:this.model,skipConfirmation:!0});n.always(function(){
t.removeClass("active")})}}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2421),i=r(a),s=n(45),o=r(s),l=o.default.extend({template:i.default,initialize:function(e){o.default.prototype.initialize.apply(this,arguments),this.server=e.server},serializeData:function(){return this.server.toJSON()}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2422),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(5),c=r(d),f=n(12),p=r(f),h=n(54),v=r(h),g=v.default.extend({name:"importPlaylistsModal",className:"import-playlists-modal modal fade",template:i.default,ui:{importBtn:".import-btn",sections:"#section-list",importAll:"#import-all"},events:o.default.extend({"click .import-btn":"onImportClick"},v.default.prototype.events),initialize:function(e){v.default.prototype.initialize.apply(this,arguments),this.server=e.server,this.musicSections=e.server.get("sections").where({
type:"artist"})},serializeData:function(){var e=o.default.map(this.musicSections,function(e){return e.pick("key","title")});return{showSections:e.length>1,sections:e}},onImportClick:function(e){e.preventDefault();var t=this.ui.importBtn;t.addClass("active");var n=this.ui.sections.val(),r="/playlists/import/itunes?sectionID="+n;this.ui.importAll[0].checked&&(r+="&force=1");var a=o.default.extend(this.server.getXHROptions(r),{type:"PUT"}),i=u.default.ajax(a);i.done(o.default.bind(function(){p.default.trigger("show:alert",{
type:"success",message:(0,c.default)("Playlists have been imported.")}),this.server.get("playlists").get("items").fetch(),this.hide()},this)),i.fail(function(){p.default.trigger("show:alert",{type:"error",message:(0,c.default)("There was a problem importing.")})})}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2429),i=r(a),s=n(3),o=r(s),l=n(14),u=n(45),d=r(u),c=d.default.extend({template:i.default,events:o.default.extend({
"click .learn-more":"onLearnMoreClick"},d.default.prototype.events),onRender:function(){d.default.prototype.onRender.apply(this,arguments),(0,l.resolve)("metrics").trackView({page:"relayNotification",mode:"modal",action:"dismiss"},{interaction:!1})},onHide:function(e){d.default.prototype.onHide.apply(this,arguments),(0,l.resolve)("metrics").trackClick({page:"relayNotification",mode:"modal",action:"dismiss"})},onLearnMoreClick:function(){(0,l.resolve)("metrics").trackClick({page:"relayNotification",
mode:"modal",action:"learn"})}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e?e.split("\n"):[]}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2430),s=a(i),o=n(54),l=a(o),u=l.default.extend({name:"releaseNotesModal",template:s.default,serializeData:function(){var e=this.model.toJSON();return e.version=e.version.replace(/\-.*/gi,""),e.added=r(e.added),e.fixed=r(e.fixed),e}});t.default=u,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2431),i=r(a),s=n(124),o=r(s),l=o.default.extend({name:"selectDeviceModal",template:i.default,serializeData:function(){return{devices:this.collection.toJSON()}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2432),i=r(a),s=n(124),o=r(s),l=o.default.extend({name:"SelectMediaFileModal",template:i.default,serializeData:function(){var e=this.model.get("Media");
return{medias:e}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2433),i=r(a),s=n(137),o=r(s),l=n(124),u=r(l),d=u.default.extend({name:"selectOffsetModal",template:i.default,initialize:function(e){u.default.prototype.initialize.apply(this,arguments),this.offset=e.offset},serializeData:function(){return{offset:this.offset,formattedOffset:(0,o.default)(this.offset)}}});t.default=d,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2434),s=r(i),o=n(3),l=r(o),u=n(76),d=r(u),c=n(14),f=a(c),p=n(1277),h=r(p),v=n(54),g=r(v),m=n(252),y=r(m),b=n(1410),P=r(b),w={osx:"mac"},S=g.default.extend({mixins:[y.default],name:"serverDownloadModal",className:"server-download-modal modal modal-lg fade",template:s.default,ui:{downloadBtn:".download-btn",paneTabs:".show-pane-btn",loading:".server-download-loading"},regions:{paneRegion:".pane-region"
},events:l.default.extend({"click .show-pane-btn":"onShowPaneClick","click .download-btn":"onDownloadClick"},g.default.prototype.events),panesModel:"selectedModel",onlyAfterRender:["showPane"],initialize:function(e){var t=this;g.default.prototype.initialize.apply(this,arguments);var n=f.resolve("appModel");n.get("primaryServer")||this.listenTo(n,"change:primaryServer",function(e,n){n&&n.id&&t.hide()}),this.downloadType=e.downloadType;var r=new h.default([],{server:n.get("cloudServer")}),a=r.populate();
a.done(function(){t.collection=r.get(t.downloadType).get("platforms"),t.paneSetup(),t.render(),t.ui.loading.addClass("hidden")}),f.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:P.default},e},{});var e=d.default.platformID,t=w[e]||e;this.selectedModel=this.collection.get(t)||this.collection.first(),this.showPane(this.selectedModel.get("id"))},onRender:function(){g.default.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");f.resolve("metrics").trackClick({page:"downloads",firstRun:!0,action:"download",platform:this.downloadType,os:t})}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2436),i=r(a),s=n(54),o=r(s),l=n(1491),u=r(l),d=o.default.extend({name:"syncStatusModal",template:i.default,regions:{list:".sync-status-list-container"
},onRender:function(){o.default.prototype.onRender.apply(this,arguments),this.list.show(new u.default({collection:this.collection,itemViewOptions:{syncItem:this.model}}))}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2437),i=r(a),s=n(3),o=r(s),l=n(12),u=r(l),d=n(54),c=r(d),f=c.default.extend({name:"termsModal",template:i.default,isForced:!0,ui:{confirmBtn:".confirm-btn"},events:o.default.extend({"click .confirm-btn":"onConfirmClick"
},c.default.prototype.events),onConfirmClick:function(e){e.preventDefault();var t=this.ui.confirmBtn;if(!t.isDisabled()){t.addClass("active");var n=this.collection.first().save({AcceptedEULA:!0});n.always(o.default.bind(function(){this.hide(),u.default.trigger("navigate","setupBasic",{serverID:this.collection.server.id})},this))}}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2438),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({
className:"modal-body",template:i.default,events:{"click .try-again-link":"onTryAgainClick"},serializeData:function(){return{status:this.options.status}},onTryAgainClick:function(e){e.preventDefault(),this.triggerMethod("request:state","loading")}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2439),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({className:"convert-location-container form-group",template:i.default,
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))}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2441),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(101),c=r(d),f=u.default.ItemView.extend({
className:"convert-target-container form-group",template:i.default,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 t=this.model.get("Device").profile;t?this.selectedProfile=this.profiles.get(t):this.selectedProfile=this.profiles.findWhere({
selected:!0}),this.availableCustomQualities=c.default.getAvailableQualities().reverse();var n=this.model.get("mediaSettings").get("maxVideoBitrate");if(n){var r=c.default.getNearestIndexToBitrate(n);this.selectedCustomQuality=c.default.getQualityByIndex(r)}else this.selectedCustomQuality=o.default.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.set({videoQuality:e.videoQuality,videoResolution:e.videoResolution,maxVideoBitrate:e.bitrate})},onTargetChange:function(e){
var t=parseInt(e.currentTarget.value,10);t>-1?(this.model.unset("target"),this.model.set({targetTagID:t,Device:{}}),this.model.get("mediaSettings").restoreDefaults()):(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=c.default.getQualityByIndex(t),this.updateMediaSettings(this.selectedCustomQuality)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2442),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(5),c=r(d),f=n(46),p=r(f),h=n(162),v=r(h),g=n(193),m=r(g),y=n(254),b=r(y),P=n(710),w=r(P),S=n(1585),_=r(S),T=n(1584),I=r(T),M=u.default.Layout.extend({template:i.default,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.clone();var t=this.model.get("Location").librarySectionID;if(t){var n=new m.default({key:t},{server:this.model.server,onlyIfCached:!0});o.default.isEmpty(n)||(this.tempModel.section=n)}}else{var r,a=e.item,i=e.items,s=a.has("childrenKey")?a.get("children"):a,l=a.server;if(a.get("isSection"))r=a;else{var u=l.getSectionForItem(a);o.default.isEmpty(u)||(r=u)}this.tempModel=new b.default({title:v.default.title(a,{items:i
}),targetTagID:this.targets.first().id,Location:{uri:v.default.uri(s,{items:i})}},{server:l,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 w.default({model:this.tempModel,isSync:!1,isCloudSync:!1})),this.targetsRegion.show(new _.default({model:this.tempModel,targets:this.targets,profiles:this.profiles})),this.locationRegion.show(new I.default({
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",(0,c.default)("Custom: {1}",n.profile))}var r=this.playlist.addContent(this.tempModel);r.done(this.whenRendered(function(){if(this.model){var e=o.default.omit(this.tempModel.toJSON(),"children");
this.model.set(this.model.parse(e))}this.trigger("request:nextState")})),r.fail(this.whenRendered(function(e){var t=e.responseText,n=p.default.parseXML(t),r=n&&n.status;this.trigger("request:state","error",r)}))}}});t.default=M,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2443),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({className:"modal-body loading-container",template:i.default});t.default=l,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2445),i=r(a),s=n(13),o=r(s),l=n(12),u=r(l),d=o.default.ItemView.extend({className:"modal-body",template:i.default,events:{"click .status-link":"onStatusClick"},onStatusClick:function(e){e.preventDefault(),this.triggerMethod("request:nextState"),u.default.trigger("navigate","conversion",{serverID:this.options.server.id})}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(2446),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({className:"modal-body",template:i.default,events:{"click .try-again-link":"onTryAgainClick"},onTryAgainClick:function(e){e.preventDefault(),this.triggerMethod("request:state","form")}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2447),i=r(a),s=n(13),o=r(s),l=n(37),u=r(l),d=n(101),c=r(d),f=n(1129),p=r(f),h=n(1130),v=r(h),g=n(40),m=r(g),y=o.default.ItemView.extend({
className:"sync-quality-container form-group",template:i.default,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"),this.mediaSettings.has("audioBoost")||this.mediaSettings.set("audioBoost",m.default.get("audioBoost")),this.mediaSettings.has("subtitleSize")||this.mediaSettings.set("subtitleSize",m.default.get("subtitleSize")),
this.initVideoQuality(),this.initMusicQuality(),this.initPhotoQuality()},initVideoQuality:function(){this.availableVideoQualities=c.default.getAvailableQualities().reverse();var e=this.mediaSettings.get("maxVideoBitrate"),t=e?c.default.getNearestIndexToBitrate(e):m.default.get(c.default.getSyncQualityAttribute());this.updateVideoQuality(c.default.getQualityByIndex(t))},initMusicQuality:function(){this.availableMusicQualities=p.default.getAvailableQualities().reverse();var e=this.mediaSettings.get("musicBitrate"),t=e?p.default.getNearestIndexToBitrate(e):m.default.get(p.default.getSyncQualityAttribute());
this.updateMusicQuality(p.default.getQualityByIndex(t))},initPhotoQuality:function(){this.availablePhotoQualities=v.default.getAvailableQualities().reverse();var e=this.mediaSettings.get("photoQuality"),t=e?v.default.getNearestIndexToQuality(e):m.default.get(v.default.getSyncQualityAttribute());this.updatePhotoQuality(v.default.getQualityByIndex(t))},serializeData:function(){var e=this.model.get("metadataType"),t=u.default.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.set({videoQuality:e.videoQuality,videoResolution:e.videoResolution,maxVideoBitrate:e.bitrate})},updateMusicQuality:function(e){
this.selectedMusicQuality=e,this.mediaSettings.set({musicBitrate:e.musicBitrate})},updatePhotoQuality:function(e){this.selectedPhotoQuality=e,this.mediaSettings.set({photoQuality:e.photoQuality,photoResolution:e.photoResolution})},saveQualityIndex:function(e,t){var n=parseInt(t,10);return m.default.save(e.getSyncQualityAttribute(),n),e.getQualityByIndex(n)},onVideoQualityChange:function(e){var t=this.saveQualityIndex(c.default,e.currentTarget.value);this.updateVideoQuality(t)},onMusicQualityChange:function(e){
var t=this.saveQualityIndex(p.default,e.currentTarget.value);this.updateMusicQuality(t)},onPhotoQualityChange:function(e){var t=this.saveQualityIndex(v.default,e.currentTarget.value);this.updatePhotoQuality(t)}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2448),s=r(i),o=n(3),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=n(162),h=r(p),v=n(37),g=r(v),m=n(27),y=r(m),b=n(391),P=r(b),w=n(710),S=r(w),_=n(1590),T=r(_),I={
video:"movie",audio:"track",photo:"photo"},M=d.default.Layout.extend({template:s.default,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=f.resolve("appModel");if(this.device=e.device,this.model)this.tempModel=this.model.clone();else{var n,r,a=e.item,i=e.items;a.get("isPlaylist")?(n=a,r=I[a.get("playlistType")]):a.get("isMetadataList")?(n=a,
r=g.default.getChildMediaType(a.get("firstItemType")).typeString):(n=a.has("childrenKey")?a.get("children"):a,r=g.default.getChildMediaType(a.get("type")).typeString),this.tempModel=new P.default({metadataType:r,title:h.default.title(a,{items:i}),rootTitle:this.getRootTitle(a),machineIdentifier:a.server.id,clientIdentifier:this.device.get("clientIdentifier"),Location:{uri:h.default.uri(n,{items:i})}},{parent:a.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 S.default({model:this.tempModel,isSync:!0,isCloudSync:this.device.get("isCloudSync")})),this.qualityRegion.show(new T.default({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")){t.addClass("active");var n=this.tempModel.save();n.done(l.default.bind(function(){if(this.model){var e=this.model.get("version")||0,t=l.default.omit(this.tempModel.toJSON(),"children");t.version=e+1,this.model.set(this.model.parse(t))}},this)),n=n.then(l.default.bind(function(){return y.default.execute("refreshSyncLists",{server:this.tempModel.parent,silent:!0})},this)),n.done(this.whenRendered(function(){this.trigger("request:nextState")})),n.fail(this.whenRendered(function(){
this.trigger("request:state","error")}))}}});t.default=M,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2450),i=r(a),s=n(13),o=r(s),l=n(12),u=r(l),d=o.default.ItemView.extend({className:"modal-body",template:i.default,events:{"click .status-link":"onStatusClick"},onStatusClick:function(e){e.preventDefault(),this.triggerMethod("request:nextState"),u.default.trigger("navigate","sync",{serverID:this.options.server.id,deviceID:this.options.device.id
})}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2451),i=r(a),s=n(3),o=r(s),l=n(5),u=r(l),d=n(642),c=r(d),f=n(206),p=r(f),h=n(54),v=r(h),g=n(1536),m=r(g),y=v.default.extend({mixins:[p.default],name:"versionGeneratorMetadataModal",className:"version-generator-metadata-modal modal fade",template:i.default,pageSize:20,scrollThreshold:50,ui:{body:".modal-body",loading:".loading",errorMessage:".error-message"
},regions:{listRegion:".list-region"},initialize:function(e){this.status=this.model.get("status"),this.listModel=e.listModel,this.collection=this.listModel.get("metadataItems"),this.transcodeJobs=e.transcodeJobs,this.pausedSetting=e.pausedSetting,this.handleScroll=o.default.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":{model:"status",modelAttribute:"itemsCount",formatter:function(e){return 1===e?(0,u.default)("{1} item",e):(0,u.default)("{1} items",e)}},".generator-total-size":{model:"status",modelAttribute:"totalSize",formatter:function(e){return e?(0,c.default)(e):(0,u.default)("0 files")}},".generator-failure-container":{model:"status",modelAttribute:"failure",manual:!0,
autohide:function(e){return!!e}},".generator-failure-message":{model:"status",modelAttribute:"failure",formatter:function(e){return e}}},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(){v.default.prototype.onRender.apply(this,arguments),
this.ui.body.on("scroll",this.handleScroll),this.model.fetch(),this.populatePage(),this.listRegion.show(new m.default({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()}}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2454),i=r(a),s=n(13),o=r(s),l=n(120),u=r(l),d=o.default.ItemView.extend({template:i.default,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 u.default({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")}});t.default=d,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2455),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=n(1596),c=r(d),f=u.default.Layout.extend({tagName:"ul",className:"list modal-nav-list",template:i.default,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 c.default({collection:this.serverOverviews,itemViewOptions:{paneType:"ownedServer"}})),this.sharedServerList.show(new c.default({collection:this.sharedServerShares,itemViewOptions:{paneType:"sharedServer"}}))},onChangePaneClick:function(e){e.preventDefault();var t=(0,o.default)(e.currentTarget);
if(!t.isDisabled()){var n=t.data("pane"),r=t.data("pane-id"),a={};"ownedServer"===n?a.serverOverview=this.model.get("serverOverviews").get(r):"sharedServer"===n&&(a.serverShare=this.model.get("serverShares").get(r)),this.trigger("change:pane",n,r,a)}}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1597),o=r(s),l=i.default.extend({className:"server-nav-list",itemView:o.default});t.default=l,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2456),s=r(i),o=n(13),l=r(o),u=n(14),d=a(u),c=l.default.ItemView.extend({tagName:"a",className:"btn-gray change-pane-btn disabled",template:s.default,initialize:function(e){this.$el.attr({href:"#","data-pane":e.paneType,"data-pane-id":this.model.id});var t=d.resolve("appModel"),n=t.get("servers"),r=n.get(this.model.get("machineIdentifier"));r?this.attachServer(r):this.listenTo(n,"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())}});t.default=c,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(2457),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(14),h=a(p),v=n(138),g=r(v),m=n(1601),y=r(m),b=f.default.Layout.extend({template:s.default,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=h.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 t=e.get("sections"),n=this.$("#"+e.id+"-section-list"),r=n.find(":checked:visible"),a=[],i={machineIdentifier:e.id,
owned:!0,allLibraries:!1};return r.each(function(){return"all"===this.value?(i.allLibraries=!0,!1):void a.push(parseInt(this.value,10))}),i.allLibraries?i.numLibraries=t.length:i.numLibraries=a.length,i.Section=t.map(function(e){var t=e.toJSON();return t.shared=i.allLibraries||l.default.contains(a,t.id),t}),i},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=(0,g.default)(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 y.default({model:this.model,serverOverview:this.serverOverview,itemViewOptions:this.itemViewOptions}))},onServerStatusClick:function(e){e.preventDefault();var t=(0,d.default)(e.currentTarget);t.toggleClass("active"),this.ui.details.toggleClass("transition-out",!t.hasClass("active"));
}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2458),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(14),h=a(p),v=n(102),g=r(v),m=n(295),y=r(m);n(546);var b=f.default.ItemView.extend({className:"form-horizontal",template:s.default,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"]}},filterByType:{movie:"filterMovies",show:"filterTelevision",artist:"filterMusic"},ui:{tagInputs:".tag-input-hidden"},events:{"change input":"onInputChange"},initialize:function(e){this.paneID=e.paneID,this.type=e.type;var t=h.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:g.default.get("movies").sectionTypeIcon,showsIcon:g.default.get("tv").sectionTypeIcon,musicIcon:g.default.get("music").sectionTypeIcon}},loadPresets:function(){l.default.each(this.filters,function(e,t){l.default.isEmpty(e.presets)||l.default.each(e.presets,function(e,n){var r=this.getSelectizeInputByFilterName(t,n),a=l.default.map(e,function(e){return{title:e,key:e}});r.addOption(a)},this)},this)},loadSections:function(){
var e=h.resolve("appModel"),t=e.get("servers"),n=this.model.get("serverShares"),r=n.filter(function(e){return e.isActive()&&e.get("owned")}),a=l.default.compact(l.default.map(r,function(e){return t.get(e.get("machineIdentifier"))}));l.default.each(a,function(e){if(e.get("connected")){var t=e.get("sections");t.populate().done(l.default.bind(function(){this.loadFilters(t)},this))}},this)},loadFilters:function(e){e.each(function(e){var t=e.get("type");l.default.each(this.filters,function(n,r){l.default.contains(n.sectionTypes,t)&&this.loadFilterOptions(e,r);
},this)},this)},loadFilterOptions:function(e,t){var n=new y.default({filter:t,filterType:"string"},{server:e.server,section:e}),r=n.get("options");r.populate().done(l.default.bind(function(){var n=this.getSelectizeInputByFilterName(t,e.get("type"));n.addOption(r.toJSON())},this))},getSelectizeInputByFilterName:function(e,t){var n="#filter-"+t+"-"+e;return this.$(n)[0].selectize},resetAllPlaceholders:function(){var e=[];l.default.each(this.filters,function(t){e=l.default.union(e,t.sectionTypes)}),
l.default.each(e,function(e){var t=this.model.get(this.filterByType[e]);this.resetPlaceholders(e,{restore:l.default.isEmpty(t)})},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 t=e.currentTarget,n=(0,d.default)(t),r=t.value,a=n.data("filter"),i=n.data("sectionType");if(this.hasContentFilterFeature||"allowChannels"===t.name){if(a){var s=this.changes[t.name]||this.model.get(t.name)||{};r?s[a]=r:s.hasOwnProperty(a)&&delete s[a],
this.resetPlaceholders(i,{restore:l.default.isEmpty(s)}),r=s}else"checkbox"===t.type&&(r=t.checked);this.changes[t.name]=r}}});t.default=b,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2459),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(102),c=r(d),f=u.default.ItemView.extend({tagName:"li",className:"share-section-list-item",template:i.default,initialize:function(e){this.serverShare=e.serverShare},serializeData:function(){var e={
section:this.model.toJSON(),typeIcon:c.default.get(this.model.get("type")).sectionTypeIcon,isChecked:!1};if(this.serverShare&&!this.serverShare.get("allLibraries")){var t=this.serverShare.get("Section");e.isChecked=!!o.default.findWhere(t,{id:this.model.id,shared:!0})}return e}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2460),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(1600),p=r(f),h=c.default.CompositeView.extend({
className:"share-server-container",template:i.default,itemView:p.default,itemViewContainer:".share-section-list",ui:{list:".share-section-list"},events:{"change input[name=share-all-libraries-cb]":"onAllLibrariesChange"},initialize:function(e){o.default.bindAll(this,"render"),this.serverOverview=e.serverOverview,this.collection=this.serverOverview.get("sections");var t=this.model.get("serverShares");this.serverShare=t.findWhere({machineIdentifier:this.serverOverview.id});var n=[];n.push(this.serverOverview.populate()),
this.serverShare&&(this.itemViewOptions={serverShare:this.serverShare},this.serverShare.isNew()||n.push(this.serverShare.populate())),this.listPromise=u.default.when.apply(u.default,n),"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)}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2461),s=r(i),o=n(2462),l=r(o),u=n(3),d=r(u),c=n(8),f=r(c),p=n(13),h=r(p),v=n(14),g=a(v),m=n(5),y=r(m),b=n(138),P=r(b),w=n(102),S=r(w),_=h.default.ItemView.extend({template:s.default,
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=g.resolve("appModel"),n=t.get("servers"),r=n.get(this.serverShare.get("machineIdentifier"));r?this.attachServer(r):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(0,P.default)(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 t;return e.length||"pending"!==this.serverShare.populatePromise.state()?(t="",
d.default.each(d.default.where(e,{shared:!0}),function(e){var n={section:e,typeIcon:S.default.get(e.type).sectionTypeIcon};t+=(0,l.default)(n)})):t=(0,l.default)({section:{title:(0,y.default)("Loading...")},typeIcon:"hidden"}),t}}},onServerAdd:function(e){e.id===this.serverShare.get("machineIdentifier")&&(this.attachServer(e),this.unbindFromModel(),this.bindToModel())},onServerStatusClick:function(e){e.preventDefault();var t=(0,f.default)(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)}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2463),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(27),p=r(f),h=c.default.ItemView.extend({template:i.default,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=o.default.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 t=p.default.execute("validateUsername",{username:e,server:this.model.server});t.done(o.default.bind(function(){this.$el.addClass("is-valid-username"),this.$el.removeClass("is-invalid-username")},this)),t.fail(o.default.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(o.default.bind(this.focusInput,this),this.focusDelay)},onInputChange:function(e){var t=e.currentTarget,n=t.name,r=t.value;r!==this.changes[n]&&(this.changes[n]=r,this.trigger("change:errorMessage",""),this.trigger("enable:submit",!!r),"username"===n&&this.validate(r))},onAddExistingUserClick:function(e){e.preventDefault();var t=(0,u.default)(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=(0,u.default)(e.currentTarget);t.isDisabled()||(this.changes.restricted=!0,t.addClass("hidden"),this.ui.existingGroup.addClass("disabled"),this.ui.existingBtn.addClass("disabled"),this.focusInput())}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2466),i=r(a),s=n(258),o=r(s),l=o.default.extend({
className:"user-select-alert-bar",template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2467),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(14),h=a(p),v=n(5),g=r(v),m=n(12),y=r(m),b=n(76),P=r(b),w=n(27),S=r(w),_=n(713),T=r(_),I=n(712),M=r(I),C=f.default.Layout.extend({className:"user-select-modal-pin-container",template:s.default,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","input input":"onInput","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=h.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"),
y.default.trigger("show:alert",{type:"error",message:(0,g.default)("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"),y.default.trigger("show:alert",{type:"error",message:(0,g.default)("This PIN could not be removed.")})}))}},savePIN:function(e){this.ui.loading.removeClass("hidden");var t={pin:e};this.currentPin&&(t.currentPin=this.currentPin);
var n=this.model.save(t,{wait:!0});return n.done(l.default.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&&y.default.trigger("show:modal",new M.default({type:"pin"}))},this)),n.always(this.whenRendered(function(){this.ui.loading.addClass("hidden");
})),n},confirmUser:function(e){this.ui.loading.removeClass("hidden");var t=S.default.execute("switchUser",{homeUser:this.model,pin:e,allowGuestLock:!this.isEditing});t.done(l.default.bind(function(){this.isEditing?(this.isEditConfirmation=!1,this.currentPin=e,this.render()):this.trigger("resolve",e)},this)),t.fail(this.whenRendered(function(){this.ui.digitContainer.addClass("shake"),this.ui.input.val(""),this.focusInput()})),t.always(this.whenRendered(function(){this.ui.loading.addClass("hidden");
}))},renderPIN:function(){var e=this.getPIN(),t=e.length,n=this.isEditing&&!this.isEditConfirmation;this.ui.digits.each(function(r,a){var i=e[r]||"";i&&!n&&(i="&bull;"),(0,d.default)(a).toggleClass("current",r===t).html(i)})},onRender:function(){this.userList.show(new T.default({model:this.model,disabled:!0})),P.default.mobile||setTimeout(l.default.bind(this.focusInput,this),this.focusDelay)},onKeyDown:function(e){var t=e.which;if(13!==t&&8!==t&&46!==t&&229!==t){var n=t>=48&&t<=57,r=t>=96&&t<=105;
n||r||e.preventDefault()}},onInput:function(e){var t=(0,d.default)(e.currentTarget),n=t.val(),r=n.length,a=n.charAt(n.length-1);return/[0-9]/.test(a)?void(4===n.length&&(!this.isEditing||this.isEditConfirmation?(t.blur(),this.confirmUser(this.getPIN())):this.ui.saveBtn.focus())):void t.val(n.slice(0,r-1))},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){
(0,d.default)(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 y.default.trigger("show:alert",{type:"error",message:(0,g.default)("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()}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(713),o=r(s),l=i.default.extend({tagName:"ul",className:"tile-list user-select-list",itemView:o.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(2469),s=r(i),o=n(3),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=n(27),h=r(p),v=n(108),g=r(v),m=n(160),y=r(m),b=n(584),P=r(b),w=n(1606),S=r(w),_=d.default.Layout.extend({className:"user-select-modal-users-container",template:s.default,ui:{loading:".loading"},regions:{body:".modal-body"},onlyAfterRender:["onUserPopulated","onHomeUsersPopulated","onError"],initialize:function(e){var t=f.resolve("appModel");this.user=t.get("user"),this.homeUsers=this.user.get("homeUsers"),this.user.server.populate().done(l.default.bind(this.onUserPopulated,this)).fail(l.default.bind(this.onError,this));
},showList:function(e){this.ui.loading.addClass("hidden"),this.body.show(new S.default({collection:e})),this.listenTo(this.body.currentView,"itemview:selectUser",this.onUserSelect)},selectUser:function(e){this.ui.loading.removeClass("hidden");var t=h.default.execute("switchUser",{homeUser:e,switchUser:!0,allowGuestLock:!0});t.done(l.default.bind(function(){this.trigger("resolve")},this)),t.always(this.whenRendered(function(){this.ui.loading.addClass("hidden")}))},onUserPopulated:function(){this.homeUsers.fetch().done(l.default.bind(this.onHomeUsersPopulated,this)).fail(l.default.bind(this.onError,this));
},onHomeUsersPopulated:function(e){var t=h.default.execute("lockUser");t.always(l.default.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=g.default.getActiveUser();if(e&&e.get("home")){var t={id:e.id,title:e.get("title"),"protected":!!e.get("pin")};this.showList(new P.default([t],{server:this.user.server,parent:this.user}))}else this.user.set("lockState",y.default.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)}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,a=n(7).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(2470),l=i(o),u=n(3),d=i(u),c=n(13),f=i(c),p=n(4),h=(i(p),n(61)),v=i(h),g=n(21),m=n(12),y=i(m),b=n(14),P=s(b),w=n(253),S=i(w),_=n(1875),T=i(_),I=n(485),M=i(I),C=n(1609),x=i(C),E=n(692),k=i(E),D={
$$typeof:a,type:T.default,key:null,ref:null,props:r(T.default.defaultProps,{}),_owner:null},A=f.default.Layout.extend({className:"nav-bar",template:l.default,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(){d.default.bindAll(this,"onPlexPassModalClose"),this.isPlexPassModalOpen=!1,this.listenTo(this.model.get("user"),{"change:signedIn":this.onSignedInChange,"change:homeSize":this.onHomeSizeChange}),this.listenTo(y.default,"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 S.default([],{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(){v.default.render({$$typeof:a,type:g.Provider,key:null,ref:null,props:r(g.Provider.defaultProps,{children:D,store:P.resolve("appStore")}),_owner:null},this.ui.search[0]),
v.default.render({$$typeof:a,type:g.Provider,key:null,ref:null,props:r(g.Provider.defaultProps,{children:{$$typeof:a,type:M.default,key:null,ref:null,props:r(M.default.defaultProps,{metricsProperties:{context:"navBar"},isOpen:this.isPlexPassModalOpen,onModalClose:this.onPlexPassModalClose}),_owner:null},store:P.resolve("appStore")}),_owner:null},this.ui.modalContainer[0])},unmountReact:function(){this.isRendered&&(v.default.unmountComponentAtNode(this.ui.search[0]),v.default.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 k.default({
showNowPlaying:!0})),this.navDropdown.append(new x.default({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(),y.default.trigger("navigate:back")},onActivityClick:function(e){e.preventDefault(),this.transcodeJobs&&this.transcodeJobs.length?y.default.trigger("navigate","conversion"):this.sessions&&this.sessions.length?y.default.trigger("navigate","nowPlaying"):y.default.trigger("navigate","activity");
},onPlexPassClick:function(e){e.preventDefault(),this.isPlexPassModalOpen=!0,this.mountReact()},onPlexPassModalClose:function(){this.isPlexPassModalOpen=!1,this.mountReact()},onHomeSizeChange:function(){this.showOrHidePremiumNotice()}});t.default=A,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2471),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=n(27),p=r(f),h=n(120),v=r(h),g=n(160),m=r(g),y=u.default.ItemView.extend({
id:"nav-dropdown",tagName:"li",className:"nav-dropdown dropdown",template:i.default,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 v.default({model:this.user,type:"friend",width:34});var e=o.default.debounce(this.updateBadges),t=o.default.debounce(this.onSignedInChange);this.listenTo(this.user,{"change:signedIn":t,"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",m.default.lockStates.LOCKED)},onUsersClick:function(e){e.preventDefault(),c.default.trigger("navigate","users");
},onSignInClick:function(e){e.preventDefault(),c.default.trigger("navigate","login")},onSignOutClick:function(e){e.preventDefault(),p.default.execute("signOut").done(o.default.bind(function(){c.default.trigger("navigate:refresh:dashboard")},this))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2479),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({template:i.default,className:"player mini-player"});t.default=l,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2480),s=r(i),o=n(14),l=a(o),u=n(388),d=r(u),c=n(447),f=r(c),p=n(448),h=r(p),v=f.default.extend({template:s.default,volumeSettingsKey:"musicPlayerVolume",initialize:function(e){f.default.prototype.initialize.apply(this,arguments),this.controlsView=new h.default({model:this.playerModel,upNextCollection:new d.default(null,{parent:this.playerModel})}),this.addListeners();
},startPlayback:function(e){e||(e={});var t=l.resolve("appModel");return this.controller.load({model:this.playerModel,offset:e.offset,autoplay:e.autoplay,fallbackServer:t.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),f.default.prototype.onRender.apply(this,arguments)}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(2481),i=r(a),s=n(447),o=r(s),l=n(448),u=r(l),d=n(571),c=r(d),f=o.default.extend({template:i.default,initialize:function(e){e||(e={}),e.playerModelClass=c.default,o.default.prototype.initialize.apply(this,arguments),this.controlsView=new u.default({model:this.playerModel}),this.addListeners()},addListeners:function(){o.default.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),o.default.prototype.onRender.apply(this,arguments)},onPrimaryPlayerChange:function(e,t){o.default.prototype.onPrimaryPlayerChange.apply(this,arguments),this.maximize()},onPosterLoad:function(e){this.playerModel.set("loaded",!0)}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2482),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(27),p=r(f),h=n(5),v=r(h),g=n(12),m=r(g),y=n(51),b=r(y),P=n(121),w=r(P),S=n(95),_=r(S),T=n(173),I=r(T),M=n(259),C=r(M),x=c.default.Layout.extend({
className:"photo-player-container",template:i.default,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 w.default({},{
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 _.default({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(m.default,"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,r=this.collection.totalSize||this.collection.length;
return{player:this.playerModel.toJSON(),isVideo:"clip"===this.model.get("type"),index:n,total:r}},getImageSize:function(){return this.windowWidth=(0,u.default)(window).width(),this.windowHeight=(0,u.default)(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 o.default.delay(o.default.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:b.default.states.ERROR,errorMessage:(0,v.default)("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(),m.default.trigger("show:modal",new I.default({mediaActions:this.mediaActions}))},onMoreClick:function(e){
e.preventDefault(),e.stopImmediatePropagation(),this.dropdown=new C.default({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(),p.default.execute("playMedia",{item:this.model})},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.ui.details.removeClass("force-hover"))}});t.default=x,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2483),i=r(a),s=n(3),o=r(s),l=n(571),u=r(l),d=n(446),c=r(d),f=n(1613),p=r(f),h=c.default.extend({className:"photo-player dark-scrollbar",template:i.default,defaultTransition:{type:"fade"},ui:{loading:".loading",previousBtn:".previous-btn",nextBtn:".next-btn"},regions:{details:".photo-player-container"},events:o.default.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"},c.default.prototype.events),collectionEvents:{destroy:"onItemDestroy"},onlyAfterRender:["onPlayerCanSkipPreviousChange","onPlayerCanSkipNextChange"],initialize:function(e){e||(e={}),e.playerModelClass=u.default,c.default.prototype.initialize.call(this,e),this.addListeners()},addListeners:function(){
c.default.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 p.default({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(){c.default.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()}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2484),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(965),c=r(d),f=n(95),p=r(f),h=n(58),v=r(h),g=n(421),m=r(g);n(545);var y=u.default.Layout.extend({mixins:c.default,className:"video-post-play",template:i.default,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 v.default({model:this.previousMetadataItem,modelAttribute:n,
type:this.previousMetadataItem.get("type"),height:140}),this.nextPoster=new v.default({model:this.nextMetadataItem,modelAttribute:n,type:this.nextMetadataItem.get("type"),height:190}),this.backgroundImage=new p.default({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 m.default({
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(o.default.bind(this.updateCountdown,this),1e3))},onClose:function(){
c.default.onClose.apply(this,arguments),clearInterval(this.idleTimer)}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2485),i=r(a),s=n(388),o=r(s),l=n(447),u=r(l),d=n(448),c=r(d),f=u.default.extend({template:i.default,initialize:function(e){u.default.prototype.initialize.apply(this,arguments),this.controlsView=new c.default({model:this.playerModel,upNextCollection:new o.default(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),u.default.prototype.onRender.apply(this,arguments)},onPrimaryPlayerChange:function(e,t){u.default.prototype.onPrimaryPlayerChange.apply(this,arguments),this.maximize()}});t.default=f,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2486),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(14),f=a(c),p=n(5),h=r(p),v=n(12),g=r(v),m=n(65),y=r(m),b=n(76),P=r(b),w=n(141),S=r(w),_=n(51),T=r(_),I=n(419),M=r(I),C=n(27),x=r(C),E=n(446),k=r(E),D=n(45),A=r(D),O=n(1579),R=r(O),L=n(1620),N=r(L),j=n(1615),U=r(j),$=k.default.extend({className:"video-player dark-scrollbar buffering",template:s.default,volumeSettingsKey:"videoPlayerVolume",
controlsDelay:y.default.hasTouchScreen?4e3:2e3,ui:{container:".video-container"},regions:{controls:".video-controls-container",postPlay:".video-post-play-container"},events:l.default.extend({"click .player-close-btn":"onCloseClick",mousemove:"onMouseMove"},k.default.prototype.events),postPlayDuration:10,awakeTime:72e5,maximumDurationForAutoadvance:12e5,minimumDurationForPostPlay:3e5,initialize:function(e){this.playQueue=e.playQueue,k.default.prototype.initialize.apply(this,arguments),this.controlsView=new N.default({
model:this.playerModel}),x.default.execute("playBackgroundMedia"),this.startSleepProtection(),this.addListeners()},addListeners:function(){k.default.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(l.default.extend({},e,{silent:!0}));var t=d.default.Deferred(),n=this.resolveOffset(e);
return n.done(this.whenRendered(function(n){this.load(l.default.extend({},e,{offset:n,silent:!1})).done(l.default.bind(t.resolve,t)).fail(l.default.bind(t.reject,t))})),n.fail(l.default.bind(this.stop,this)).fail(l.default.bind(t.reject,t)),t.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 t=d.default.Deferred(),n=e.offset||this.offset;if(l.default.isNumber(n))return t.resolve(n).promise();var r=this.metadataItem.get("viewOffset");if(!r)return t.resolve(0).promise();var a=new R.default({offset:r}),i=a.promise;return i.done(function(e){t.resolve(e)}),i.fail(function(){t.reject()}),g.default.trigger("show:modal",a),t.promise()},load:function(e){var t=f.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,n=d.default.Deferred().resolve().promise(),r=f.resolve("appModel"),a=!r.get("primaryPlayer");if(this.metadataItem&&a&&(e=this.metadataItem.server.get("playQueueManager"),t=e.getFor(this.metadataItem)),t&&t.get("hasUserAdditions")){var i=new A.default({title:(0,h.default)("Finish Watching Queue"),message:(0,h.default)("This will clear the contents of your play queue.")});n=i.promise,g.default.trigger("show:modal",i);
}return n.then(function(){g.default.trigger("hide:player")}),n},canAutoplay:function(e){return!P.default.mobile&&(null==e||e!==T.default.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(l.default.bind(this.onSleep,this),this.awakeTime))},onRender:function(){this.controls.show(this.controlsView),k.default.prototype.onRender.apply(this,arguments);
},onClose:function(){k.default.prototype.onClose.apply(this,arguments),this.controlsTimeout=clearTimeout(this.controlsTimeout),this.sleepTimeout=clearTimeout(this.sleepTimeout),this.controller.model&&!this.isContinuing&&S.default.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){k.default.prototype.onPlayerStateChange.apply(this,arguments),
this.controller.companion||(t===T.default.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,r=this.metadataItem.get("extraType")===M.default.get("trailer").id;if(this.model===this.playQueue.get("collection").last())this.model.server.get("playQueueManager").remove("video"),g.default.trigger("hide:player");else if(n||r)this.controller.skipNext();else{this.hideVideo();var a={model:this.model,collection:this.playQueue.get("collection")},i=this.metadataItem.get("duration")<this.maximumDurationForAutoadvance;
(!this.isPotentiallyAsleep||this.isDefinitelyAwake||i)&&(a.countdown=this.postPlayDuration);var s=new U.default(a);this.listenTo(s,{replay:this.onPostPlayReplay,next:this.onPostPlayNext}),this.postPlay.show(s)}}},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}))}});t.default=$,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(690),i=r(a),s=i.default.extend({
className:"video-player-alert alert alert-sm transition-in",alertDuration:5e3});t.default=s,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2490),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(637),c=r(d),f=n(247),p=r(f),h=n(137),v=r(h),g=n(95),m=r(g),y=u.default.ItemView.extend({className:"player-scrub-preview",template:i.default,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=o.default.throttle(this.whenRendered(this.showThumbnail),200),this.thumbnailImage=new m.default({model:this.model.get("metadataItem"),width:this.thumbnailWidth,height:p.default.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((0,v.default)(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(0,c.default)(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}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2491),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(14),h=a(p),v=n(5),g=r(v),m=n(76),y=r(m),b=n(12),P=r(b),w=n(65),S=r(w),_=n(137),T=r(_),I=n(40),M=r(I),C=n(388),x=r(C),E=n(95),k=r(E),D=n(58),A=r(D),O=n(1150),R=r(O),L=n(1152),N=r(L),j=n(714),U=r(j),$=n(331),z=r($),F=n(1622),B=r(F),V=n(1623),H=r(V),q=n(1621),W=r(q),G=n(1619),Y=r(G),Q=n(1618),K=r(Q),X=n(691),Z=r(X),J=n(265),ee=r(J),te=n(264),ne=r(te),re=f.default.Layout.extend({
className:"video-controls transition-out",template:s.default,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(){l.default.bindAll(this,"onMobileVideoClose"),this.bindAllWhenRendered("transitionIn","transitionOut"),this.metadataItem=this.model.get("metadataItem"),this.upNextCollection=new x.default(null,{parent:this.model}),this.posterImage=new A.default({model:this.metadataItem,type:"movie",getUrl:this.getPosterUrl,
width:100}),this.backgroundImage=new k.default({server:this.metadataItem.server,width:1280,height:720}),this.seekBarView=new U.default({model:this.model}),this.playQueueDropdownView=new Z.default({model:this.model,collection:this.upNextCollection}),this.volumeSlider=new z.default({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=(0,d.default)(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(l.default.bind(this.onErrorSkipInterval,this),1e3)},updateErrorSkipMessage:function(e){this.ui.errorSkipMessage.text((0,g.default)("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,t){var n=e.get("art")||e.channel&&e.channel.get("art");if(t.css("background-image","none"),t.addClass("transition-out"),!n)return this.currentArt=null,void(this.currentArtSrc=null);var r=l.default.bind(function(e){this.currentArt=n,this.currentArtSrc=e,t.css("background-image","url("+e+")"),t.removeClass("transition-out");
},this);this.currentArt===n?r(this.currentArtSrc):this.backgroundImage.load(n,!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(0,T.default)(e)}},".player-duration":{modelAttribute:"duration",formatter:function(e){
return(0,T.default)(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 t=h.resolve("appModel"),n=t.get("user"),r=l.default.contains(["clip","userPlaylistItem"],e.get("type"));
return e.get("url")&&n.get("signedIn")&&r}},".primary-player-name":{modelAttribute:"friendlyName",autohide:!0,formatter:function(e){if(e)return(0,g.default)("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 Y.default({model:this.model})),this.qualityDropdown.append(new B.default({model:this.model}),this.ui.dropdowns),this.audioDropdown.append(new H.default({model:this.model,type:"audio"}),this.ui.dropdowns),this.subtitlesDropdown.append(new H.default({model:this.model,type:"subtitles"}),this.ui.dropdowns),this.playerDropdown.append(new W.default,this.ui.dropdowns),this.imageOverlaysRegion.show(new N.default({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 R.default({model:e,subtitleSize:M.default.get("subtitleSize"),rendererOptions:{enableSvg:"safari"!==y.default.id}})):this.subtitles.close()},onVolumeChange:function(e,t){this.volumeSlider.displayValue(t),this.updateVolumeBtn(t)},onErrorMessageChange:function(e,t){var n=h.resolve("appModel"),r=n.has("primaryPlayer");if(this.ui.errorMessage.text(t),
this.ui.errorSkipMessage.text(""),t&&!r){var a=e.get("playQueue").get("collection");if(a.length>1){var i=e.get("playQueueItem"),s=a.at(a.length-1);i.id!==s.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 K.default({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){P.default.trigger("hide:player")},onOverlayClick:function(e){e.preventDefault();var t=this.model.get("playing"),n=t?"pause":"play";return"pause"===n&&S.default.hasTouchScreen&&!this.visible?void this.trigger("toggleControls",{autohide:!0}):void this.trigger(n)},onShareClick:function(e){e.preventDefault(),P.default.trigger("show:modal",new ee.default({model:this.metadataItem}))},onRecommendClick:function(e){
e.preventDefault(),P.default.trigger("show:modal",new ne.default({model:this.metadataItem}))},onErrorMessageClick:function(e){e.preventDefault(),this.errorSkipInterval?this.trigger("next"):P.default.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)}});t.default=re,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2492),i=r(a),s=n(692),o=r(s),l=o.default.extend({
id:"player-primary-player-dropdown",tagName:"span",className:"dropdown",template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2493),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(101),p=r(f),h=n(40),v=r(h),g=n(310),m=r(g),y=c.default.ItemView.extend({id:"player-quality-dropdown",tagName:"span",className:"dropdown hidden",template:i.default,modelEvents:{"change:transcodeServer":"render",
"change:qualityIndex":"render","change:media":"render"},events:{"click .dropdown-menu a":"onQualityClick"},serializeData:function(){var e=this.model.get("transcodeServer"),t=this.model.get("media"),n=p.default.getAvailableQualitiesFor(t,e);if(!n.length||!this.model.get("canSetQuality"))return void this.model.set("showQuality",!1);this.model.set("showQuality",!0);var r=this.model.get("qualityIndex"),a=o.default.findWhere(n,{index:r}),i=e.get("maxUploadBitrate"),s=(0,m.default)(t),l=!(!s||!s.bitrate),u=!i||l&&i>s.bitrate;
return a&&(a.selected=!0),{availableQualities:n.reverse(),hasSelectedQuality:!!a,includeOriginal:u}},onQualityClick:function(e){e.preventDefault();var t=(0,u.default)(e.currentTarget);if(!t.hasClass("selected")){var n=p.default.getQualityAttribute(this.model.get("metadataItem")),r=parseInt(t.data("index"),10);v.default.save(n,r),this.model.set("qualityIndex",r)}}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(2494),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(14),h=a(p),v=n(119),g=r(v),m=n(403),y=r(m),b=n(90),P=r(b),w=n(27),S=r(w),_=f.default.ItemView.extend({id:"player-quality-dropdown",tagName:"span",className:"dropdown hidden",template:s.default,modelEvents:{"change:media":"render"},events:{"click .dropdown-menu a":"onStreamClick"},initialize:function(e){this.streamType=P.default.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=(0,g.default)(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 r,a=(0,g.default)(e,{streamType:this.streamType.id,selected:!0});return a.length&&(r=a[0]),{type:t,streams:n,selectedStream:r}},onStreamClick:function(e){e.preventDefault();var t=h.resolve("appModel"),n=(0,d.default)(e.currentTarget),r=n.data("id");if(t.has("primaryPlayer"))(0,y.default)(this.model.get("media"),this.streamType,r),this.model.set(this.streamType.key,r);else{
var a=S.default.execute("selectStream",{item:this.model.get("metadataItem"),media:this.model.get("media"),part:this.model.get("part"),streamType:this.streamType,streamID:r});a.done(l.default.bind(function(){this.model.set(this.streamType.key,r)},this))}}});t.default=_,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2262),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({initialize:function(e){this.reason=e.reason},template:i.default,
className:"lyrics-error",serializeData:function(){return{reason:this.reason}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2263),i=r(a),s=n(13),o=r(s),l=n(1628),u=r(l),d=o.default.CollectionView.extend({initialize:function(){this.collection=this.model.get("spans")},template:i.default,className:function(){return["lyrics-line",0===this.model.get("spans").length?"lyrics-line-blank":""].join(" ")},itemView:u.default
});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1952).default,a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2264),s=a(i),o=n(3),l=n(13),u=a(l),d=n(1625),c=a(d),f=n(616),p=a(f);n(899);var h=u.default.CollectionView.extend(r([{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 c.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(r){var a=r.isPositionWithin(e);a&&!r.get("active")&&(t=r),r.set("active",n&&a)}),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=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2265),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({template:i.default,className:"lyrics-loading"});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var a=n(2266),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({template:i.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2267),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({
template:i.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 r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2268),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=n(5),c=r(d),f=n(1629),p=r(f),h=n(1626),v=r(h),g=n(1624),m=r(g),y=n(1627),b=r(y),P=u.default.Layout.extend({template:i.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 r=this.getLyricsStreams();if(!r)return t.reject((0,c.default)("No lyrics available.")).promise();
var a=r.findWhere({selected:!0})||r.first();return this.populatingLyricsStream&&this.populatingLyricsStream!==a&&this.populatingLyricsStream.abortPendingPopulate(),a.populate().always(function(){a.set("selected",!0),e.listenTo(r,"change:selected",e.onLyricsSelectedChange)}).fail(function(){t.reject((0,c.default)("An error occurred loading these lyrics."))}).then(function(){return t.resolve(a)}),this.populatingLyricsStream=a,t.promise()},renderLyrics:function(){var e=this,t=this.getLyricsStreams(),n=this.streamsRegion.currentView&&this.streamsRegion.currentView.collection,r=t!==n,a=this.populateLyricsStream();
"pending"===a.state()&&this.renderLyricsLoading(),a.done(function(t){e.renderLyricsLines(t)}),a.fail(function(t){e.renderLyricsError(t)}),r&&a.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 v.default({model:this.model,collection:e.get("lines")});this.lyricsRegion.show(t),t.scrollToActive()},renderLyricsError:function(e){this.lyricsRegion.show(new m.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=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(43),i=r(a),s=n(1632),o=r(s),l=i.default.extend({tagName:"ul",className:"tile-list media-tile-list playlist-tile-list",itemView:o.default,modelEvents:{
"change:currentSort":"onListRefresh","change:currentType":"onListRefresh"},onListRefresh:function(){var e=this.model.get("items");e.get("playlists").reset(),e.fetch({scope:"page"})}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2495),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(5),p=r(f),h=n(12),v=r(h),g=n(163),m=r(g),y=n(27),b=r(y),P=n(328),w=r(P),S=n(259),_=r(S),T=n(706),I=r(T),M=c.default.ItemView.extend({
tagName:"li",className:"poster-item media-tile-list-item playlist-tile-list-item playlist",template:i.default,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?(0,m.default)(e):1===this.model.get("leafCount")?(0,p.default)("1 Item"):(0,p.default)("{1} Items",this.model.get("leafCount"))}}},initialize:function(){o.default.bindAll(this,"onResize"),this.compositeImage=new w.default({model:this.model,width:150}),v.default.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(),v.default.trigger("content.unsubscribe:resize",this.onResize)},onResize:function(e){this.containerSize=e},onPlayClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),b.default.execute("playMedia",{item:this.model})},onEditClick:function(e){e.preventDefault(),v.default.trigger("show:modal",new I.default({model:this.model}))},onMoreClick:function(e){e.preventDefault(),
e.stopImmediatePropagation(),this.dropdown=new _.default({model:this.model}),this.ui.dropdown.append(this.dropdown.render().el),this.ui.dropdown.addClass("open"),this.$el.addClass("force-hover");var t=(0,u.default)(e.currentTarget),n=this.ui.actions.position().top,r=this.dropdown.getPosition(t,this.containerSize,n);this.ui.dropdown.css(r)},onDropdownHide:function(e){this.dropdown&&(this.dropdown.close(),this.dropdown=null,this.$el.removeClass("force-hover"))}});t.default=M,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2496),i=r(a),s=n(13),o=r(s),l=n(12),u=r(l),d=n(1418),c=r(d),f=n(1433),p=r(f),h=n(1631),v=r(h),g=o.default.Layout.extend({className:"section-container",template:i.default,regions:{list:".playlists-container"},initialize:function(){u.default.trigger("show:bar","actionbar",new c.default({model:this.model})),u.default.trigger("show:bar","breadcrumbbar",new p.default({model:this.model}))},onRender:function(){this.list.append(new v.default({
model:this.model,collection:this.model.get("items").get("playlists")}),this.$el)},onClose:function(){u.default.trigger("hide:bar","actionbar"),u.default.trigger("hide:bar","breadcrumbbar")}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,a=n(7).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(i(o),n(61)),u=i(l),d=n(21),c=n(14),f=n(72),p=s(f),h=n(66),v=i(h),g=n(143),m=i(g),y=n(186),b=i(y),P=n(183),w=i(P),S=n(184),_=i(S),T=n(1813),I=i(T),M={
$$typeof:a,type:b.default,key:null,ref:null,props:r(b.default.defaultProps,{}),_owner:null},C=m.default.extend({mountReact:function(){var e=(0,c.resolve)("appStore"),t=this.options.selectedServerID,n=this.options.selectedProviderID,i=this.options.params||{},s=i.key,o=i.record,l=(0,v.default)(p.SERVER,t),f=(0,v.default)(p.PROVIDER,n,l);u.default.render({$$typeof:a,type:d.Provider,key:null,ref:null,props:r(d.Provider.defaultProps,{children:M,store:e}),_owner:null},this.ui.sidebar[0]),u.default.render({
$$typeof:a,type:d.Provider,key:null,ref:null,props:r(d.Provider.defaultProps,{children:{$$typeof:a,type:w.default,key:null,ref:null,props:r(w.default.defaultProps,{children:{$$typeof:a,type:_.default,key:null,ref:null,props:r(_.default.defaultProps,{children:{$$typeof:a,type:I.default,key:null,ref:null,props:r(I.default.defaultProps,{machineIdentifier:t,serverEntityID:l,providerEntityID:f,metadataKey:s,record:1===parseInt(o,10)}),_owner:null},providerEntityID:f}),_owner:null},machineIdentifier:t}),
_owner:null},store:e}),_owner:null},this.ui.page[0])}});t.default=C,e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,a=n(7).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(i(o),n(61)),u=i(l),d=n(21),c=n(14),f=n(1087),p=i(f),h=n(72),v=s(h),g=n(66),m=i(g),y=n(143),b=i(y),P=n(186),w=i(P),S=n(183),_=i(S),T=n(184),I=i(T),M=n(758),C=i(M),x={$$typeof:a,type:w.default,key:null,ref:null,props:r(w.default.defaultProps,{}),_owner:null
},E=b.default.extend({mountReact:function(){var e=(0,c.resolve)("appStore"),t=this.options.selectedServerID,n=this.options.selectedProviderID,i=this.options.params||{},s=i.key,o=i.type,l=i.filters,f=i.filterLabel,h=i.sort,g=(0,m.default)(v.SERVER,t),y=(0,m.default)(v.PROVIDER,n,g);u.default.render({$$typeof:a,type:d.Provider,key:null,ref:null,props:r(d.Provider.defaultProps,{children:x,store:e}),_owner:null},this.ui.sidebar[0]),u.default.render({$$typeof:a,type:d.Provider,key:null,ref:null,props:r(d.Provider.defaultProps,{
children:{$$typeof:a,type:_.default,key:null,ref:null,props:r(_.default.defaultProps,{children:{$$typeof:a,type:I.default,key:null,ref:null,props:r(I.default.defaultProps,{children:{$$typeof:a,type:C.default,key:null,ref:null,props:r(C.default.defaultProps,{machineIdentifier:t,serverEntityID:g,providerEntityID:y,directoryKey:s,activeType:o,activeFilters:(0,p.default)(l),activeFilterLabel:f,activeSort:h}),_owner:null},providerEntityID:y}),_owner:null},machineIdentifier:t}),_owner:null},store:e}),_owner:null
},this.ui.page[0])}});t.default=E,e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(61)),l=i(o),u=n(21),d=n(14),c=n(143),f=i(c),p=n(186),h=i(p),v=n(183),g=i(v),m=n(184),y=i(m),b=n(1836),P=i(b),w={$$typeof:a,type:h.default,key:null,ref:null,props:r(h.default.defaultProps,{}),_owner:null},S=f.default.extend({mountReact:function(){var e=(0,d.resolve)("appStore"),t=this.options.selectedServerID,n=this.options.params||{};
l.default.render({$$typeof:a,type:u.Provider,key:null,ref:null,props:r(u.Provider.defaultProps,{children:w,store:e}),_owner:null},this.ui.sidebar[0]),l.default.render({$$typeof:a,type:u.Provider,key:null,ref:null,props:r(u.Provider.defaultProps,{children:{$$typeof:a,type:g.default,key:null,ref:null,props:r(g.default.defaultProps,{children:{$$typeof:a,type:y.default,key:null,ref:null,props:r(y.default.defaultProps,{children:{$$typeof:a,type:P.default,key:null,ref:null,props:r(P.default.defaultProps,{
machineIdentifier:t,selectedViewType:n.view}),_owner:null}}),_owner:null},machineIdentifier:t}),_owner:null},store:e}),_owner:null},this.ui.page[0])}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2497),i=r(a),s=n(13),o=r(s),l=n(241),u=r(l),d=n(12),c=r(d),f=n(40),p=r(f),h=n(701),v=r(h),g=n(699),m=r(g),y=n(700),b=r(y),P=n(174),w=r(P),S=o.default.Layout.extend({className:"section-list-container",template:i.default,
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(p.default.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,r=this.listModel.getTotalSize();this.ui.loading.toggleClass("has-scrollbar",r>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"),r=this.model.get("currentFilters");n&&"folder"===n.id?this.ui.emptyMessageContainer.addClass("folder"):n&&"all"!==n.id?this.ui.emptyMessageContainer.addClass("filter"):r&&r.length?this.ui.emptyMessageContainer.addClass("filter"):this.model.get("refreshing")?this.ui.emptyMessageContainer.addClass("refreshing"):this.ui.emptyMessageContainer.addClass("default");
}},getListConstructor:function(){var e=p.default.getInstance().getSectionListType(this.model);switch(e){case"media-details-list":return m.default;case"media-list":return b.default;default:return v.default}},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=p.default.getInstance().getSectionListType(this.model),t=p.default.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"),r=0,a=0,i=n.length;a<i;a++){var s=n.at(a);if(t.id===s.id)break;r+=s.get("size")}this.list.currentView.scrollToIndex(r)},onTimeline:function(e){if(e.state===u.default.CREATED||e.state===u.default.DELETED){var t=this.model.get("currentSubset"),n=this.model.get("currentType");"folder"!==t.id&&e.type!==n.id||this.list.currentView.merge()}},onLoadingChange:function(e,t){
e?this.showLoading(t):this.hideLoading()},onAddToLibraryLinkClick:function(e){e.preventDefault(),c.default.trigger("show:modal",new w.default({server:this.model.server,model:this.model,selectedPane:"folders"}))}});t.default=S,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2498),s=r(i),o=n(3),l=r(o),u=n(13),d=r(u),c=n(12),f=r(c),p=n(14),h=a(p),v=n(122),g=a(v),m=n(121),y=r(m),b=n(989),P=r(b),w=n(990),S=r(w),_=n(1419),T=r(_),I=n(1434),M=r(I),C=n(1430),x=r(C),E=n(1637),k=r(E),D=d.default.Layout.extend({
className:"section-container",template:s.default,regions:{list:".section-list-container"},modelEvents:{"default:currentSort":"toggleAlphaBar","change:currentType":"toggleAlphaBar","change:currentSort":"toggleAlphaBar","change:currentSubset":"onCurrentSubsetChange"},initialize:function(e){h.resolve("appModel").get("primaryServer")===this.model.server&&h.resolve("appStore").dispatch(g.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),sectionID:this.model.id})),this.initViewState(e).always(l.default.bind(function(){
this.model.set("currentFolderKey",e.folderKey),f.default.trigger("show:bar","actionbar",new T.default({model:this.model,mediaActions:this.mediaActions})),f.default.trigger("show:bar","breadcrumbbar",new M.default({model:this.model})),this.toggleAlphaBar()},this))},initViewState:function(e){this.viewState=new P.default({},l.default.extend({storage:new S.default({},{section:this.model}),section:this.model,filters:this.model.get("currentFilters")},e));var t=this.model.get("currentSort");t&&t.set("selected",!1);
var n=this.viewState.fetch();return n.done(l.default.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)),n.always(l.default.bind(function(){this.mediaActions=new y.default({},{section:this.model,showAdvanced:!0})},this)),n.always(this.whenRendered(function(){var e=new k.default({model:this.model,
listModel:this.model.get("items"),mediaActions:this.mediaActions});this.list.append(e,this.$el)})),n},toggleAlphaBar:function(){this.supportsAlphaPagination()?f.default.trigger("show:bar","alphabar",new x.default({model:this.model,collection:this.model.get("firstCharacters")})):f.default.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 r=t.get("key"),a=t.get("direction");return"titleSort"===r&&"asc"===a},onCurrentSubsetChange:function(e,t){var n=e.previous("currentSubset"),r=n&&n.id,a=t&&t.id;r!==a&&(this.model.get("items").scrollPosition=0)},onClose:function(){f.default.trigger("hide:bar","actionbar"),f.default.trigger("hide:bar","breadcrumbbar"),f.default.trigger("hide:bar","alphabar"),h.resolve("appModel").get("primaryServer")===this.model.server&&h.resolve("appStore").dispatch(g.changeQuickSearchSettings({
serverEntityID:this.model.server.entityID(),sectionID:null})),this.viewState.removeListeners()}});t.default=D,e.exports=t.default},function(e,t,n){"use strict";function r(e){return f.default.map(e,function(e){return'<option value="'+e.value+'"'+(e.selected?" selected":"")+">"+e.label+"</option>"}).join("\n")}function a(e,t){return e.map(function(e){return{label:e.get("name"),value:e.get("identifier"),selected:t===e.get("identifier")}})}function i(e,t){if(!e)return[];var n=e.get("languages"),r=n.map(function(e){
return{label:e.get("name"),value:e.id,selected:e.id===t}});return r}var s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(2505),l=s(o),u=n(13),d=s(u),c=n(3),f=s(c),p=n(321),h=s(p),v=n(678),g=s(v),m=d.default.ItemView.extend({template:l.default,ui:{agentSelect:"#match-search-agent",languageSelect:"#match-search-language"},events:{"change #match-search-agent":"onAgentSelectChange"},onlyAfterRender:["updateAgents","updateLanguages"],initialize:function(){var e=this.model.server.getSectionForItem(this.model),t=e.get("agent"),n=this.setupAgents(t);
n.then(f.default.bind(this.updateAgents,this,t)),n.then(f.default.bind(this.updateLanguages,this,t))},serializeData:function(){var e=this.model.server.getSectionForItem(this.model),t=e.get("agent"),n=this.model.agentsProxy.findWhere({identifier:t}),r={item:this.model.toJSON(),agents:a(this.model.agentsProxy,t),languages:i(n)};return r},setupAgents:function(e){if(this.model.agentsPromise)return this.model.agentsPromise;var t=this.model.server.getSectionForItem(this.model),n=t.getSectionType(),r=new h.default([],{
server:this.model.server,mediaTypeID:n.typeID}),a=n.exclusiveAgents,i=new g.default(r,a,e);return this.model.agents=r,this.model.agentsProxy=i,this.model.agentsPromise=this.model.agents.populate({reset:!0,cancelable:!0}),this.model.agentsPromise},updateAgents:function(e){this.ui.agentSelect.html(r(a(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.server.getSectionForItem(this.model),a=n.get("language");
this.ui.languageSelect.html(r(i(t,a)))},onAgentSelectChange:function(e){this.updateLanguages(e.currentTarget.value)},onModalClose:function(){this.model.agents=null,this.model.agentsProxy=null,this.model.agentsPromise=null}});t.default=m,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2506),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(667),c=r(d),f=n(1517),p=r(f),h=u.default.Layout.extend({template:i.default,regions:{resultRegion:".result-region"
},onlyAfterRender:["updateResults"],initialize:function(){this.setupResults();var e=this.model.section,t={manual:1},n={reset:!0,timeout:0,data:t};/com\.plexapp\.agents\.none\:\/\//.test(this.model.get("guid"))&&o.default.extend(n,{data:o.default.extend(t,{agent:e.get("agent"),language:e.get("language")}),processData:!0}),this.model.results.populate(n).then(o.default.bind(this.updateResults,this))},setupResults:function(){if(!this.model.results){var e=this.model.results||new c.default([],{server:this.model.server,
parent:this.model});this.model.results=e}},updateResults:function(){this.resultRegion.show(new p.default({collection:this.model.results,itemViewOptions:{item:this.model}}))},onModalClose:function(){this.model.results=null}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2507),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(1552),p=r(f),h=c.default.Layout.extend({className:"devices-container row",template:i.default,
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 t=o.default.sortBy(e,function(e){return"all"===e.id?"":e.title.toLowerCase()});return t},getFilteredDeviceTypes:function(){var e=this.deviceTypes.filter(function(e){
return"all"===e.id||o.default.intersection(this.products,e.ids).length>0},this);return this.sortDeviceTypes(e)},addOtherIds:function(){var e=o.default.flatten(o.default.map(this.deviceTypes,function(e){return e.ids})),t=o.default.difference(this.products,e),n=o.default.find(this.deviceTypes,function(e){return"other"===e.id});o.default.each(t,function(e){n.ids.push(e)})},onRender:function(){this.list.show(new p.default({collection:this.collection}))},onDeviceTypeClick:function(e){e.preventDefault();
var t=(0,u.default)(e.currentTarget),n=t.data("id"),r=this.collection;if(this.ui.filters.removeClass("selected"),t.addClass("selected"),"all"!==n){var a=o.default.findWhere(this.deviceTypes,{id:n});r=this.collection.filterByProducts(a.ids)}this.list.show(new p.default({collection:r}))}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2509),s=r(i),o=n(14),l=a(o),u=n(715),d=r(u),c=n(705),f=r(c),p=n(1558),h=r(p),v=d.default.extend({
template:s.default,initialize:function(){var e=l.resolve("appModel"),t=e.get("user");this.collection=t.get("homeUsers"),this.invites=t.get("invites").filterByHome(),this.sentInvites=t.get("sentInvites").filterByHome(),this.signedInHomeUser=this.collection.get(t.id),this.itemViewOptions={isAdmin:!(!this.signedInHomeUser||!this.signedInHomeUser.get("admin"))},this.addListeners()},addListeners:function(){d.default.prototype.addListeners.apply(this,arguments),this.signedInHomeUser&&this.listenTo(this.signedInHomeUser,"change:admin",this.onAdminChange);
},onRender:function(){this.friendList.show(new h.default({collection:this.collection,itemViewOptions:this.itemViewOptions})),this.inviteList.show(new f.default({collection:this.invites})),this.pendingList.show(new f.default({collection:this.sentInvites})),this.updateHeaders()},onAdminChange:function(e,t){this.friendList.currentView&&(this.itemViewOptions.isAdmin=t)}});t.default=v,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(2510),s=r(i),o=n(3),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=n(12),h=r(p),v=n(1645),g=r(v),m=n(1659),y=r(m),b=n(1644),P=r(b),w=n(1641),S=r(w),_={web:g.default,server:y.default,users:P.default,devices:S.default},T=d.default.Layout.extend({className:"container",template:s.default,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=f.resolve("appModel"),n=t.get("user"),r=n.get("invites");this.subsets={users:r},this.listenTo(n,"change:signedIn",this.onSignedInChange),this.listenTo(t,"change:primaryServer",this.onPrimaryServerChange),this.listenTo(r,"reset add remove",this.onInvitesChange),this.listenTo(h.default,"change:language",this.render)},serializeData:function(){var e=f.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};l.default.each(l.default.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=_[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()}});t.default=T,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2511),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(14),h=a(p),v=n(5),g=r(v),m=n(12),y=r(m),b=n(32),P=r(b),w=n(27),S=r(w),_=n(1642),T=r(_),I=n(715),M=r(I),C=n(212),x=r(C),E=n(266),k=r(E),D={
home:T.default,friends:M.default},A=f.default.Layout.extend({className:"users-container",template:s.default,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=h.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&&y.default.trigger("show:modal",new k.default({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=D[this.subset];t?this.container.append(new t):P.default.warn("Invalid subset: "+this.subset)},updateBadges:function(){var e={home:this.proxies.home.length,friends:this.proxies.friends.length};l.default.each(l.default.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(),S.default.execute("toggleGuest",{
user:this.user,enable:t})},onRender:function(){this.showSubset(),this.updateBadges()},onClose:function(){l.default.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 t=(0,d.default)(e.currentTarget);t.hasClass("selected")||(this.ui.navLinks.removeClass("selected"),t.addClass("selected"),this.showSubset(l.default.last(e.currentTarget.href.split("/"))),y.default.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?y.default.trigger("show:modal",new x.default({
type:"home"})):y.default.trigger("show:alert",{type:"error",message:(0,g.default)("You have reached the {1} person home limit.",t)})},onLeaveHomeClick:function(e){e.preventDefault(),S.default.execute("removeHomeUser",{homeUser:this.signedInHomeUser,isSignedInUser:!0})},onInviteFriendClick:function(e){e.preventDefault(),y.default.trigger("show:modal",new x.default({type:"friend"}))},onEnableGuestClick:function(e){this.toggleGuestAccount(e,!0)},onDisableGuestClick:function(e){this.toggleGuestAccount(e,!1);
}});t.default=A,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2512),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(14),h=a(p),v=n(5),g=r(v),m=n(12),y=r(m),b=n(65),P=r(b),w=n(630),S=r(w),_=n(101),T=r(_),I=n(606),M=r(I),C=n(240),x=r(C),E=n(306),k=r(E),D=n(687),A=r(D),O=n(1405),R=r(O),L=n(1402),N=r(L),j=n(291),U=r(j),$=n(40),z=r($),F=n(63),B=r(F),V=n(375),H=r(V),q=n(708),W=r(q),G=[{value:0,title:"None"
},{value:1,title:"1"},{value:2,title:"2"},{value:3,title:"3"},{value:4,title:"4"},{value:5,title:"5"}],Y=f.default.ItemView.extend({className:"web-settings-container",template:s.default,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=h.resolve("appModel"),t=e.get("user");this.listenTo(t,"change:signedIn",this.onSignedInChange),this.listenTo(e,"change:primaryServer",this.render),this.listenTo(y.default,"shortcut:save",this.saveChanges);var n=z.default.get("showAdvancedSettings");this.$el.toggleClass("show-advanced",n);
},serializeData:function(){var e=[],t=this.model.toJSON(),n=h.resolve("appModel"),r=n.get("user"),a=r.hasPlexPass(),i=r.hasHome(),s=r.isNinja();return l.default.each(l.default.keys(U.default.getLanguages()),function(t){e.push({value:t,title:(0,S.default)(t)})}),{settings:t,hasPlexPass:a,hasHome:i,isNinja:s,showExperimentalPlayer:P.default.hasMediaSource&&B.default.get("allowFlash"),version:"2.8.1",languages:e,debugLevels:M.default.settings,subtitlesBurnLevels:x.default.settings,chromecastAppIDs:A.default.settings,
availableQualities:T.default.getAvailableQualities().reverse(),subtitleSizes:R.default.settings,audioBoostLevels:N.default.settings,httpFallbackOptions:k.default.settings,extrasPrefixCounts:G}},saveChanges:function(){var e=this.ui.submitBtn,t=this.ui.message;if(!e.isDisabled()){e.addClass("active");var n=!!this.changes.language,r=this.model.save(this.changes);r.done(l.default.bind(function(){this.changes={},n||(e.addClass("disabled"),t.text((0,g.default)("Your changes have been saved.")))},this)),
r.fail(l.default.bind(function(){t.text((0,g.default)("Your changes could not be saved."))},this)),r.always(l.default.bind(function(){n||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),z.default.save("showAdvancedSettings",!t)},onSettingsGroupClick:function(e){
e.preventDefault();var t=(0,d.default)(e.currentTarget),n=t.attr("href");this.$(".settings-group").removeClass("active"),this.$(n).addClass("active"),this.$(".nav a").removeClass("selected"),t.addClass("selected")},onKeyboardShortcutsClick:function(e){e.preventDefault(),y.default.trigger("show:modal",new W.default({shortcuts:H.default.prop("shortcuts")}))},onChromecastAppIDChange:function(e){var t=e.currentTarget.value===A.default.CUSTOM;this.ui.chromecastCustomGroup.toggleClass("hidden",!t)},onInputChange:function(e){
var t=(0,d.default)(e.currentTarget),n=e.currentTarget,r=n.value;"checkbox"===n.type&&(r=t.prop("checked")),"int"===t.data("type")&&(r=parseInt(r,10)),this.changes[n.id]=r,this.ui.submitBtn.removeClass("disabled"),this.ui.message.text("")},onSubmit:function(e){e.preventDefault(),this.saveChanges()}});t.default=Y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2513),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(37),p=r(f),h=n(321),v=r(h),g=n(1548),m=r(g),y=n(1550),b=r(y),P=c.default.Layout.extend({
template:i.default,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(p.default.get("movie")),this.agentTypes.push(p.default.get("show")),this.agentTypes.push(p.default.get("artist")),
this.agentTypes.push(p.default.get("album")),this.agentTypes.push(p.default.get("photo")),this.currentType=o.default.first(this.agentTypes),this.populateAgents()},serializeData:function(){return{currentType:this.currentType,agentTypes:this.agentTypes}},populateAgents:function(){this.agents=new v.default([],{server:this.model,mediaTypeID:this.currentType.id});var e=this.agents.populate({reset:!0,scope:"page"});e.done(o.default.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 v.default([],{server:this.model,mediaTypeID:this.currentType.id,relatedAgentID:e.id}),this.contributors=new v.default([],{server:this.model,mediaTypeID:this.currentType.id,primaryAgentID:e.id}),this.contributorsList.show(new b.default({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 t=u.default.when.apply(u.default,e);t.done(o.default.bind(this.onContributorsReset,this))},onAgentsReset:function(){if(this.agentsList.show(new m.default({collection:this.agents})),this.agents.length){var e=this.agents.findWhere({selected:!0})||this.agents.first();this.selectAgent(e)}},onContributorsReset:function(){var e=o.default.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=(0,u.default)(e.currentTarget),n=t.data("type");this.currentType=p.default.get(n),this.populateAgents(),this.ui.typeNavItems.removeClass("active"),t.parent("li").addClass("active")},onAgentClick:function(e){e.preventDefault();var t=(0,u.default)(e.target),n=t.data("identifier"),r=this.agents.get(n);this.selectAgent(r)},onContributorsSave:function(e){
this.currentAgent.url="system/agents/"+this.currentAgent.id+"/config/"+this.currentType.id;var t=this.currentAgent.save({order:e});t.done(o.default.bind(function(){this.additionalAgents.fetch({silent:!0}),this.contributors.fetch({silent:!0})},this))}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(176),o=r(s),l=o.default.extend({prefix:"channel.",serializeData:function(){var e=o.default.prototype.serializeData.apply(this,arguments),t=this.options.channelSettings.toJSON();
return i.default.each(t,function(e){e.id=this.prefix+e.id},this),e.unshift.apply(e,t),e},updateModel:function(e,t){var n=o.default.prototype.updateModel.apply(this,arguments);if(n)return n;var r=e.replace(this.prefix,""),a=this.options.channelSettings.get(r);return a?a.set("value",t):void 0}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2514),i=r(a),s=n(3),o=r(s),l=n(5),u=r(l),d=n(176),c=r(d),f=n(1655),p=r(f),h=n(1656),v=r(h),g=c.default.extend({
template:i.default,regions:{signIn:".sign-in-region",update:".update-region"},serializeData:function(){var e=c.default.prototype.serializeData.apply(this,arguments),t=o.default.findWhere(e,{id:"FriendlyName"});return t&&(t.placeholder=this.model.get("friendlyName")),e},bindings:{".version":{modelAttribute:"shortVersion",formatter:function(e){return(0,u.default)("Version {1}",e)}}},onRender:function(){c.default.prototype.onRender.apply(this,arguments),this.signIn.show(new p.default({model:this.model.get("cloudAccount"),
collection:this.collection})),this.model.get("updater")&&this.update.show(new v.default({model:this.model.get("update"),collection:this.collection}))}});t.default=g,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2515),i=r(a),s=n(176),o=r(s),l=o.default.extend({template:i.default,serializeData:function(){var e=this.model,t=e.get("diagnostics"),n=t&&t.indexOf("logs")!==-1,r=t&&t.indexOf("databases")!==-1,a=n||r;return{showDownloadLogs:n,
showDownloadDatabases:r,showDownloadLogsOrDatabases:a,downloadLogsUrl:e.resolveUrl("/diagnostics/logs",{appendToken:!0}),downloadDatabasesUrl:e.resolveUrl("/diagnostics/databases",{appendToken:!0})}}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(5),o=r(s),l=n(309),u=r(l),d=n(176),c=r(d),f=c.default.extend({prefix:"account.",serializeData:function(){var e=this.options.account,t=[],n=i.default.map(u.default,function(e,t){
return{value:t,label:e}});return t.push({id:this.prefix+"autoSelectAudio",label:(0,o.default)("Automatically select audio and subtitle tracks"),summary:(0,o.default)("Automatically select audio and subtitle tracks in your preferred language when possible."),"default":!1,value:e.get("autoSelectAudio"),type:"bool",group:"account.language",advanced:!1,hidden:!1}),t.push({id:this.prefix+"defaultAudioLanguage",label:(0,o.default)("Prefer audio tracks in"),"default":"en",value:e.get("defaultAudioLanguage"),
type:"text",group:"account.language",advanced:!1,hidden:!1,enumValues:n}),t.push({id:this.prefix+"subtitleMode",label:(0,o.default)("Subtitle mode"),"default":1,value:parseInt(e.get("subtitleMode"),10),type:"int",group:"account.language",advanced:!1,hidden:!1,enumValues:[{value:0,label:(0,o.default)("Manually selected")},{value:1,label:(0,o.default)("Shown with foreign audio")},{value:2,label:(0,o.default)("Always enabled")}]}),t.push({id:this.prefix+"defaultSubtitleLanguage",label:(0,o.default)("Prefer subtitles in"),
"default":"en",value:e.get("defaultSubtitleLanguage"),type:"text",group:"account.language",advanced:!1,hidden:!1,enumValues:n}),t},updateModel:function(e,t){var n=c.default.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}});t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(2516),o=i(s),l=n(13),u=i(l),d=n(4),c=(i(d),
n(61)),f=i(c),p=n(21),h=n(14),v=n(1684),g=i(v),m={$$typeof:a,type:g.default,key:null,ref:null,props:r(g.default.defaultProps,{}),_owner:null},y=u.default.ItemView.extend({className:"livetv-epg-settings",template:o.default,mountReact:function(){var e=(0,h.resolve)("appStore");f.default.render({$$typeof:a,type:p.Provider,key:null,ref:null,props:r(p.Provider.defaultProps,{children:m,store:e}),_owner:null},this.el)},unmountReact:function(){this.isRendered&&f.default.unmountComponentAtNode(this.el)},onBeforeRender:function(){
this.unmountReact()},onRender:function(){this.mountReact()},onClose:function(){this.unmountReact()}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(13),i=r(a),s=n(1653),o=r(s),l=i.default.CollectionView.extend({tagName:"ul",className:"nav nav-cards",itemView:o.default,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)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2517),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({tagName:"li",className:"server-settings-nav-list-item",template:i.default,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)}});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2519),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(27),c=r(d),f=n(176),p=r(f),h=p.default.extend({
className:"remote-access-container",template:i.default,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"),r=this.cloudAccount.toJSON(),a=!e.get("value"),i=!r.signedIn,s=a||i;return{isDisabled:a,isSignedOut:i,isUnavailable:s,hasPrivateAddress:!(!r.privateAddress||!r.privatePort),hasPublicAddress:!(!r.publicAddress||!r.publicPort),cloudAccount:r,hasMappingSettings:!(!t||!n),
mappingModeSetting:t?t.toJSON():null,mappingPortSetting:n?n.toJSON():null}},enable:function(){},connect:function(){return c.default.execute("connectServer",{cloudAccount:this.cloudAccount,value:!0})},disconnect:function(){return c.default.execute("connectServer",{cloudAccount:this.cloudAccount,value:!1})},reconnect:function(){return c.default.execute("reconnectServer",{cloudAccount:this.cloudAccount})},saveChanges:function(){if(o.default.isEmpty(this.changes))return u.default.Deferred().resolve().promise();
var e=this.collection.first().save(this.changes);return e.done(o.default.bind(function(){this.changes={}},this)),e},onInputChange:function(e){p.default.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(o.default.bind(this.reconnect,this))}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(11).default,a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(2520),o=a(s),l=n(3),u=a(l),d=n(8),c=a(d),f=n(13),p=a(f),h=n(14),v=i(h),g=n(27),m=a(g),y=n(120),b=a(y),P=p.default.ItemView.extend({className:"server-account-container",
template:o.default,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=v.resolve("appModel");this.user=e.get("user"),
this.image=new b.default({type:"friend",width:60}),this.listenTo(this.user,"change:isSignedIn",function(){this.isSigningIn||this.render()}),this.isSigningIn=!1,this.claimServerFailed=!1},serializeData:function(){var e=!this.claimServerFailed&&this.model.server.supports("claimServer")&&this.user.get("isSignedIn"),t=!this.model.server.get("isCloudPersonalServer");return{showClaimMessage:e,showSignOut:t}},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 t=r({cloudAccount:this.model},e),n=m.default.execute("signInServer",t);return n.done(u.default.bind(function(){this.model.fetch()},this)),n},signInUser:function(e){return this.user.get("isSignedIn")?c.default.Deferred().resolve().promise():m.default.execute("signIn",{username:e.username,
password:e.password})},signOut:function(){return this.ui.username.val(""),this.ui.password.val(""),m.default.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 t={username:e.target.username.value,password:e.target.password.value},n=this.signInUser(t);n=n.then(u.default.bind(function(){return this.signInServer(t)},this)),n.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 t=this.signOut();t.done(u.default.bind(function(){this.model.fetch()},this)),t.always(this.whenRendered(function(){
this.ui.signOutBtn.removeClass("active")}))}},onClaimClick:function(e){e.preventDefault(),this.ui.claimBtn.addClass("active");var t=v.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")}))}});t.default=P,
e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2521),s=r(i),o=n(3),l=r(o),u=n(13),d=r(u),c=n(14),f=a(c),p=n(5),h=r(p),v=n(12),g=r(v),m=n(27),y=r(m),b=n(1576),P=r(b),w=d.default.ItemView.extend({tagName:"span",className:"check-for-updates-container",template:s.default,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){y.default.execute("checkForServerUpdates",{server:this.model.server,download:e.download,initialState:e.initialState
})},installUpdates:function(){y.default.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 r;this.model.get("error")?(r=this.model.get("error"),this.ui.installManualLink.addClass("hidden")):this.model.get("canInstall")?(r=(0,h.default)("Something went wrong."),this.ui.installManualLink.removeClass("hidden")):(r=(0,h.default)("An update is available."),this.ui.installManualLink.removeClass("hidden"));var a=f.resolve("appModel"),i=a.get("user").server,s=this.model.get("downloadURL")||i.get("appsUrl");this.ui.installManualLink.attr("href",s),this.ui.updateErrorMessage.text(r)}},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,t){l.default.isNumber(t)?(this.ui.downloadUpdatesContainer.css({"background-size":t+"% 100%"}),this.ui.downloadProgressContainer.removeClass("hidden"),this.ui.downloadProgressLabel.text(t)):this.ui.downloadProgressContainer.addClass("hidden");
},onServerConnectedChange:function(e,t){t&&(this.stopListening(e,"change:isConnected",this.onServerConnectedChange),y.default.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(),g.default.trigger("show:modal",new P.default({model:this.model}))}});t.default=w,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2522),i=r(a),s=n(13),o=r(s),l=n(159),u=r(l),d=o.default.ItemView.extend({template:i.default,serializeData:function(){return{isTranscoderRequired:!this.model.get("transcoderVideo"),isUpgradeRequired:!this.model.supports("streamReady"),
minServerVersion:u.default.streamReady}}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2523),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(27),c=r(d),f=n(206),p=r(f),h=n(430),v=r(h),g=n(253),m=r(g),y=n(688),b=r(y),P=n(1533),w=r(P),S=n(176),_=r(S),T=n(1657),I=r(T),M=_.default.extend({mixins:[p.default],className:"versions-container",template:i.default,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 v.default([],{server:this.model,allowInCache:!0}),this.transcodeJobs=new m.default([],{server:this.model,allowInCache:!0})},initialState:"loading",states:{loading:{nextState:"list",onEnter:function(){var e=this.model.supports("streamReady"),t=this.model.get("transcoderVideo");if(this.listRegion.show(new b.default({inline:!0})),
!e||!t)return void this.enterState("error");var n=u.default.when(this.playlists.populate(),this.transcodeJobs.fetch());n=n.then(o.default.bind(function(){return this.playlist=this.playlists.first(),this.playlist?(this.generators=this.playlist.get("children"),this.generators.fetch()):u.default.Deferred().reject().promise()},this)),n.done(this.whenRendered(function(){this.enterNextState()})),n.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 w.default({collection:this.generators,itemViewOptions:{transcodeJobs:this.transcodeJobs,pausedSetting:this.pausedSetting}}))},onExit:function(){this.stopListening(this.generators)}},error:{onEnter:function(){this.listRegion.show(new I.default({model:this.model}))}}},toggleMessage:function(){this.ui.message.toggleClass("hidden",!this.generators.length)},onRender:function(){this.enterNextState()},onDeleteAllVersionsClick:function(e){
e.preventDefault(),c.default.execute("deleteAllVersionGenerators",{server:this.model}).then(o.default.bind(function(){return this.generators.fetch()},this))}});t.default=M,e.exports=t.default},function(e,t,n){"use strict";var r=n(79).default,a=n(1).default,i=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(2524),o=a(s),l=n(3),u=a(l),d=n(8),c=a(d),f=n(47),p=a(f),h=n(13),v=a(h),g=n(14),m=i(g),y=n(5),b=a(y),P=n(27),w=a(P),S=n(12),_=a(S),T=n(26),I=i(T),M=n(260),C=a(M),x=n(1652),E=a(x),k=n(1648),D=a(k),A=n(1649),O=a(A),R=n(1654),L=a(R),N=n(1658),j=a(N),U=n(1646),$=a(U),z=n(1647),F=a(z),B=n(1650),V=a(B),H=n(1651),q=a(H),W=n(176),G=a(W),Y=n(40),Q=a(Y),K=n(172),X=a(K),Z=v.default.Layout.extend({
className:"server-settings-container",template:o.default,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:D.default,group:"general",title:"General",isCustom:!0},remoteAccess:{constructor:L.default,group:"remoteAccess",title:"Remote Access",isCustom:!0},versions:{constructor:j.default,
group:"versions",title:"Optimized Versions",isCustom:!0},agents:{constructor:$.default,group:"agents",title:"Agents",isCustom:!0},library:{constructor:G.default,group:"library",title:"Library"},channels:{constructor:F.default,group:"channels",title:"Channels",isCustom:!0},network:{constructor:G.default,group:"network",title:"Network"},transcoder:{constructor:G.default,group:"transcoder",title:"Transcoder"},languages:{constructor:V.default,group:"account.language",title:"Languages",isCustom:!0},dlna:{
constructor:G.default,group:"dlna",title:"DLNA"},bonjour:{constructor:G.default,group:"bonjour",title:"Network Discovery"},butler:{constructor:G.default,group:"butler",title:"Scheduled Tasks"},extras:{constructor:G.default,group:"extras",title:"Extras"},dvr:{constructor:q.default,group:"dvr",title:"DVR (Beta)",isCustom:!0},help:{constructor:O.default,group:"help",title:"Help",isCustom:!0}},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 t=Q.default.get("showAdvancedSettings");if(this.$el.toggleClass("show-advanced",t),this.initGroups(),this.model.supports("reachability")){var n="/myplex/refreshReachability",r=u.default.extend(this.model.getXHROptions(n),{type:"PUT"});c.default.ajax(r)}var a=m.resolve("appModel");a.set("primaryServer",this.model),
this.listenTo(_.default,"shortcut:save",this.saveChanges),this.listenTo(a,"change:primaryServer",this.onPrimaryServerChange),this.listenTo(this.cloudAccount,"change:remoteAccessState",this.onRemoteAccessStatusChange),this.listenTo(this.model,"change:isClaimed",this.onClaimedChange)},initGroups:function(){var e=u.default.keys(this.panes),t=u.default.chain(this.collection.pluck("group")).unique().compact().value();if(!this.model.get("mediaProviders")||!this.model.hasOwnerFeature("dvr")){var n=u.default.indexOf(e,"dvr");
n>-1&&e.splice(n,1)}this.groups=new p.default.Collection,u.default.each(e,function(e){var n=this.panes[e];(n.isCustom||u.default.contains(t,e))&&this.addGroup(e,n)},this),u.default.each(t,function(t){if(!u.default.contains(e,t)){var n={constructor:G.default,group:t,title:t};this.panes[t]=n,this.addGroup(t,n)}},this)},addGroup:function(e,t){var n=u.default.omit(t,"constructor");n.id=e,this.groups.add(n)},showPane:function(e){if(this.currentPane){if(this.currentPane.isActive)return this.currentPane;
this.stopListening(this.currentPane),this.flushChanges()}var t=this.panes[e];if(!t||!this.groups.get(t.group)){var n=r(this.panes)[0];e=n,t=this.panes[n]}var a=t.constructor,i=new a({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}),_.default.trigger("navigate","serverSettings",{serverID:this.model.id,group:e,replace:!0,trigger:!1}),i},flushChanges:function(){this.currentPane.changes&&u.default.extend(this.changes,this.currentPane.changes)},saveChanges:function(){if(this.flushChanges(),!this.currentPane.isDisabled&&!this.currentPane.isActive){this.currentPane.triggerMethod("before:save");var e=[],t=this.getPrefixedChanges("channel."),n=this.getPrefixedChanges("account.");if(!u.default.isEmpty(t)){var r=this.channelSettings.first().getSaveParams(t),a=u.default.result(this.channelSettings,"url"),i=I.join([a,"/set"],r);
e.push(c.default.ajax(this.model.getXHROptions(i)))}u.default.isEmpty(n)||e.push(this.account.save(n)),u.default.isEmpty(this.changes)||e.push(this.collection.first().save(this.changes));var s=c.default.when.apply(c.default,e);s.done(u.default.bind(function(){var e=u.default.keys(this.changes);u.default.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)),s.fail(u.default.bind(function(){this.currentPane&&this.currentPane.triggerMethod("after:save",!1)},this))}},getPrefixedChanges:function(e){var t={};return u.default.each(this.changes,function(n,r){var a=0===r.lastIndexOf(e,0);a&&(t[r.substring(e.length)]=n,delete this.changes[r])},this),t},onRender:function(){this.serverDropdown.append(new C.default);var e=new E.default({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 _.default.trigger("navigate","serverSettings",{
serverID:t.id}):void _.default.trigger("show:view",new X.default({title:(0,b.default)("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=m.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),Q.default.save("showAdvancedSettings",!t)},onButlerUpdateChannelChange:function(){var e=this.collection.get("ButlerTaskCheckForUpdates"),t=e&&e.get("value");t&&w.default.execute("checkForServerUpdates",{server:this.model,download:!1})}});t.default=Z,e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,a=n(7).default,i=n(1).default,s=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(2525),l=i(o),u=n(3),d=i(u),c=n(8),f=i(c),p=n(13),h=i(p),v=n(4),g=(i(v),n(61)),m=i(g),y=n(14),b=s(y),P=n(5),w=i(P),S=n(12),_=i(S),T=n(27),I=i(T),M=n(485),C=i(M),x=h.default.ItemView.extend({className:"setup-basic-container",template:l.default,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(){d.default.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 t=b.resolve("appModel"),n=t.get("user").get("hasPlexPass");this.isPlexPassModalOpen=!this.model.get("isDesktop")&&!n},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(){m.default.render({$$typeof:a,type:C.default,key:null,ref:null,props:r(C.default.defaultProps,{store:b.resolve("appStore"),metricsProperties:{context:"setupWizard",firstRun:!0},isOpen:this.isPlexPassModalOpen,onModalClose:this.onPlexPassModalClose}),_owner:null},this.ui.modalContainer[0]);
},unmountReact:function(){this.isRendered&&m.default.unmountComponentAtNode(this.ui.modalContainer[0])},submit:function(){var e=this.ui.submitBtn;if(!e.hasClass("active")){e.addClass("active");var t=this.save();t=t.done(d.default.bind(function(){this.ui.nextBtn.click()},this)),t.always(function(){e.removeClass("active")})}},save:function(){var e=this,t=d.default.isEmpty(this.changes)?f.default.Deferred().resolve().promise():this.collection.first().save(this.changes),n=b.resolve("appModel"),r=n.get("user").get("isSignedIn");
return this.model.supports("claimServer")&&!this.model.get("superToken")&&r&&(t=t.then(function(){return e.model.get("isClaimed")?f.default.Deferred().resolve().promise():I.default.execute("signInServer",{claim:!0,cloudAccount:e.model.get("cloudAccount")})})),t=t.fail(function(){_.default.trigger("show:alert",{type:"error",message:(0,w.default)("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()}});t.default=x,e.exports=t.default},function(e,t,n){"use strict";var r=n(10).default,a=n(7).default,i=n(1).default,s=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(2526),l=i(o),u=n(3),d=i(u),c=n(8),f=i(c),p=n(13),h=i(p),v=n(4),g=(i(v),
n(61)),m=i(g),y=n(5),b=i(y),P=n(12),w=i(P),S=n(411),_=i(S),T=n(14),I=s(T),M=n(393),C=i(M),x=n(1929),E=i(x),k=n(2706),D=i(k),A=h.default.ItemView.extend({className:"setup-complete-container",template:l.default,ui:{modalContainer:".modal-container",submitBtn:".submit-btn",doneBtn:".done-btn"},collectionEvents:{reset:"render"},events:{"change input[id]":"onInputChange","submit #setup-complete-form":"onSubmit"},initialize:function(){d.default.bindAll(this,"onPlexPassLiteModalClose"),this.collection=this.model.get("settings"),
this.collection.populate({reset:!0}),this.changes={},this.isPlexPassLiteModalOpen=!1;var e=I.resolve("appModel"),t=e.get("user");t.get("isSignedIn")&&t.fetch().done(this.whenRendered(function(){t.get("subscription").get("plan")===C.default.plans.LITE&&(this.isPlexPassLiteModalOpen=!0,this.mountReact())}))},serializeData:function(){var e=this.collection.get("collectUsageData");return{devicesImg:D.default,collectUsageDataSetting:e?e.toJSON():null}},mountReact:function(){m.default.render({$$typeof:a,
type:E.default,key:null,ref:null,props:r(E.default.defaultProps,{metricsProperties:{context:"setupWizard",firstRun:!0},isOpen:this.isPlexPassLiteModalOpen,onModalClose:this.onPlexPassLiteModalClose}),_owner:null},this.ui.modalContainer[0])},unmountReact:function(){this.isRendered&&m.default.unmountComponentAtNode(this.ui.modalContainer[0])},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(){d.default.has(this.changes,"collectUsageData")&&!this.changes.collectUsageData&&I.resolve("metrics").trackClick({action:"optOutMetrics",page:"setupWizard",pane:"complete",firstRun:!0});var e=this.collection.first().save(this.changes),t=this.model.get("sections").filter(function(e){return e.isNew()}).map(function(e){return e.save()}),n=f.default.when(e,(0,_.default)(t));return n.fail(function(){w.default.trigger("show:alert",{type:"error",message:(0,b.default)("There was a problem saving these settings.")
})}),n},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()},onPlexPassLiteModalClose:function(){this.isPlexPassLiteModalOpen=!1,this.mountReact()}});t.default=A,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var a=n(2527),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({className:"setup-error-container",template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2528),i=r(a),s=n(13),o=r(s),l=n(2707),u=r(l),d=n(2708),c=r(d),f=n(2709),p=r(f),h=o.default.ItemView.extend({className:"setup-intro-container",template:i.default,serializeData:function(){return{computerImg:u.default,mediaImg:c.default,
playImg:p.default}}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2529),i=r(a),s=n(8),o=r(s),l=n(13),u=r(l),d=n(12),c=r(d),f=n(381),p=r(f),h=n(1561),v=r(h),g=n(174),m=r(g),y=u.default.Layout.extend({className:"setup-library-container",template:i.default,regions:{list:".setup-section-list-container"},events:{"click .add-section-btn":"onAddSectionClick"},metricsValue:function(){return this.collection.size();
},initialize:function(e){var t=this.model,n=t.get("sections"),r=new p.default([],{server:t,url:"/services/defaultLibraries"});this.collection=n,this.model.supports("defaultSections")&&e.isFirstVisitToSubset&&o.default.when(r.populate(),n.populate()).done(function(){n.length||r.forEach(function(e){e.collection=n,n.add(e)})})},onRender:function(){this.list.show(new v.default({collection:this.collection}))},onAddSectionClick:function(e){e.preventDefault(),c.default.trigger("show:modal",new m.default({
server:this.model}))}});t.default=y,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2530),i=r(a),s=n(13),o=r(s),l=o.default.ItemView.extend({className:"setup-loading-container",template:i.default});t.default=l,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2531),s=r(i),o=n(3),l=r(o),u=n(8),d=r(u),c=n(13),f=r(c),p=n(12),h=r(p),v=n(32),g=r(v),m=n(14),y=a(m),b=n(27),P=r(b),w=n(321),S=r(w),_=n(689),T=r(_),I=n(1665),M=r(I),C=n(1662),x=r(C),E=n(1663),k=r(E),D=n(1660),A=r(D),O=n(1664),R=r(O),L=n(1661),N=r(L),j={
setupIntro:k.default,setupSignIn:T.default,setupLoading:M.default,setupError:x.default,setupBasic:A.default,setupLibrary:R.default,setupComplete:N.default},U={setupIntro:"intro",setupError:"error",setupBasic:"name",setupLibrary:"library",setupComplete:"complete"},$=["com.plexapp.agents.imdb","com.plexapp.agents.thetvdb","com.plexapp.agents.lastfm"],z=f.default.Layout.extend({className:"container",template:s.default,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){l.default.bindAll(this,"start","onAgentsSuccess","onAgentsFail","onUpdatesComplete"),this.subset=e.subset||"setupIntro",this.attempts=0,this._visitedSubsets={},g.default.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 void this.navigate("setupIntro");var e=y.resolve("appModel"),t=e.get("user").server;t.populate().done(this.whenRendered(function(){this.navigate("setupIntro")})).fail(this.whenRendered(function(){t.get("isConnected")?this.navigate("setupSignIn"):this.navigate("setupIntro")}))},start:function(){if(this.attempts>=this.maxAttempts)return g.default.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)(0,g.default)("Waiting for server to start ("+e+")"),this.model.fetch().done(l.default.delay(this.start,500));else{var t=new S.default([],{server:this.model}),n=t.fetch({scope:"page",timeout:0});n.done(this.onAgentsSuccess),n.fail(this.onAgentsFail)}},navigate:function(e){var t="setupIntro"===e,n="setupSignIn"===e,r="setupLoading"===e,a=j[e],i=U[e];this.previousSubset=this.subset,this.subset=e,i&&y.resolve("metrics").trackView({page:"setupWizard",pane:i,firstRun:!0
});var s=!this._visitedSubsets[e];this._visitedSubsets[e]=!0;var o=new a({model:this.model,isFirstRun:!0,isFirstVisitToSubset:s});this.container.show(o),n&&this.listenTo(o,"skipSignIn",this.onSignInSkip),this.ui.header.toggleClass("hidden",t||n),this.$el.addClass(e),this.previousSubset!==e&&this.$el.removeClass(this.previousSubset),r&&this.start()},onRender:function(){var e=y.resolve("appModel");e.set("isFirstRun",!0),this.renderSubset()},onClose:function(){var e=y.resolve("appModel");e.set("isFirstRun",!1);
},onSignInSkip:function(){this.hasSkippedSignIn=!0,this.renderSubset()},onAgentsSuccess:function(e){(0,g.default)("Looking for a core agent");for(var t=0,n=$.length;t<n;t++){var r=$[t];if(e.get(r)){(0,g.default)(r+" found");var a=P.default.execute("updateChannel",{server:this.model,silent:!0});return void a.always(this.onUpdatesComplete)}}g.default.error("No core agents found"),this.navigate("setupError")},onAgentsFail:function(){g.default.warn("Unable to request agents"),l.default.delay(this.start,500);
},onUpdatesComplete:function(){this.navigate("setupBasic")},onNavClick:function(e){e.preventDefault();var t=(0,d.default)(e.currentTarget),n=t.data("subset"),r=t.hasClass("segment-btn")&&"setupBasic"===this.subset;r&&this.container.currentView?(e.preventDefault(),this.container.currentView.submit()):(this.navigate(n),h.default.trigger("navigate",n,{trigger:!1}))},onDoneClick:function(e){e.preventDefault(),y.resolve("metrics").trackClick({page:"setupWizard",action:"complete",firstRun:!0}),h.default.trigger("navigate","dashboard");
}});t.default=z,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2532),i=r(a),s=n(13),o=r(s),l=n(12),u=r(l),d=n(40),c=r(d),f=n(702),p=r(f),h=o.default.Layout.extend({className:"side-bar",template:i.default,ui:{sortContainer:".section-sort-container"},regions:{sort:".section-sort-list-container"},initialize:function(){this.hidden=!c.default.get("sidebarOpen"),this.hidden?this.$el.addClass("transition-out"):u.default.trigger("show:bar","sidebar");
},open:function(){this.hidden=!1,c.default.save("sidebarOpen",!0),this.$el.removeClass("transition-out"),u.default.trigger("show:bar","sidebar")},hide:function(){this.hidden=!0,c.default.save("sidebarOpen",!1),this.$el.addClass("transition-out"),u.default.trigger("hide:bar","sidebar")},onRender:function(){this.sort.show(new p.default({collection:this.model.get("sorts")}))},onClose:function(){u.default.trigger("hide:bar","sidebar")}});t.default=h,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,a=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0});var i=n(2533),s=r(i),o=n(3),l=r(o),u=n(13),d=r(u),c=n(12),f=r(c),p=n(14),h=a(p),v=n(40),g=r(v),m=n(122),y=a(m),b=n(1483),P=r(b),w=n(1540),S=r(w),_=n(1541),T=r(_),I=n(1543),M=r(I),C=n(702),x=r(C),E=d.default.Layout.extend({className:"side-bar",template:s.default,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=!g.default.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"):f.default.trigger("show:bar","sidebar"),this.supportsQuickSearch||h.resolve("appStore").dispatch(y.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),type:"section",placeholder:this.model.get("title"),query:this.getSearchValue()})),this.listenTo(f.default,"search:section",this.onSearch)},serializeData:function(){return{showNewFilterIconBtn:this.advancedFilters&&!!this.model.get("currentFilters").length
}},open:function(){this.hidden=!1,g.default.save("sidebarOpen",!0),this.$el.removeClass("transition-out"),f.default.trigger("show:bar","sidebar")},hide:function(){this.hidden=!0,g.default.save("sidebarOpen",!1),this.$el.addClass("transition-out"),f.default.trigger("hide:bar","sidebar")},getSearchValue:function(){var e=this.model.get("currentFilters"),t=l.default.findWhere(e,{key:"title"});return t&&t.values.length?t.values[0]:""},addFilter:function(e,t){t||(t={});var n=this.model.get("currentFilters");
this.linearFilters&&n.length&&(n.length=0);var r=l.default.findWhere(n,{key:e.key});if(r){if(l.default.indexOf(r.values,e.value)>-1)return;t.replace?(r.titles=[e.title],r.values=[e.value]):(r.titles.push(e.title),r.values.push(e.value))}else n.push({key:e.key,titles:[e.title],values:[e.value]});this.model.trigger("change:currentFilters",this.model,n)},removeFilter:function(e){var t=this.model.get("currentFilters"),n=l.default.findWhere(t,{key:e.key});n&&(n.titles=l.default.reject(n.titles,function(t){
return t===e.title}),n.values=l.default.reject(n.values,function(t){return t===e.value}),n.values.length||t.splice(l.default.indexOf(t,n),1)),this.model.trigger("change:currentFilters",this.model,t)},removeAllFilters:function(e){var t=this.model.get("currentFilters"),n=l.default.findWhere(t,{key:e});t.splice(l.default.indexOf(t,n),1),this.model.trigger("change:currentFilters",this.model,t)},onRender:function(){var e="all"!==this.model.get("currentSubset").id,t=this.model.get("currentFilters");e&&(t.length=0);
var n=new S.default({model:this.model,disabled:e}),r=new x.default({collection:this.model.get("sorts"),disabled:e});if(this.listenTo(n,"removeAllFilters",this.onRemoveAllFilters),this.listenToOnce(r,"collection:rendered",this.onSortListRender),this.currentFilters.show(n),this.sort.show(r),!e){var a=this.model.get("filters").populate({reset:!0,scope:"page"});a.done(l.default.bind(function(t){if(!this.isClosed){var n=this.linearFilters?t.filterBySecondary():t,r=new T.default({collection:n,disabled:e
});this.listenTo(r,"itemview:addFilter",this.onAddFilter),this.listenTo(r,"itemview:removeFilter",this.onRemoveFilter),this.listenTo(r,"itemview:showOptions",this.onFilterListShowOptions),this.filters.show(r)}},this))}t.length&&f.default.trigger("show:bar","filterbar",new P.default({model:this.model}))},onClose:function(){this.supportsQuickSearch||h.resolve("appStore").dispatch(y.changeQuickSearchSettings({serverEntityID:this.model.server.entityID(),type:void 0,placeholder:void 0})),f.default.trigger("hide:bar","sidebar"),
f.default.trigger("hide:bar","filterbar")},onCurrentFiltersChange:function(e,t){var n=!!t.length;this.ui.newFilterBtn.toggleClass("hidden",this.linearFilters||!n),this.supportsQuickSearch||h.resolve("appStore").dispatch(y.changeSearchQuery({serverEntityID:this.model.server.entityID(),query:this.getSearchValue()})),n?f.default.trigger("show:bar","filterbar",new P.default({model:this.model})):f.default.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")||h.resolve("appStore").dispatch(y.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 r=new M.default({collection:t.get("options")});this.listenTo(r,"addFilter",this.onAddFilter),this.listenTo(r,"removeAllFilters",this.onRemoveAllFilters),this.listenTo(r,"itemview:addFilter",this.onAddFilter),this.listenTo(r,"itemview:removeFilter",this.onRemoveFilter),this.filterOptions.show(r)},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");
}});t.default=E,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2534),i=r(a),s=n(13),o=r(s),l=n(1563),u=r(l),d=o.default.Layout.extend({className:"container",template:i.default,regions:{list:".announcements-container"},onRender:function(){this.list.show(new u.default({collection:this.collection}))}});t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var a=n(2535),i=r(a),s=n(3),o=r(s),l=n(13),u=r(l),d=n(5),c=r(d),f=n(76),p=r(f),h=n(45),v=r(h),g=n(12),m=r(g),y=n(2252),b=r(y),P=n(2253),w=r(P),S=n(2254),_=r(S),T=u.default.ItemView.extend({className:"container queue-help-container",template:i.default,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"===p.default.id?(this.stepsImgSrc=b.default,this.modalText=(0,c.default)('Right click the "Plex It!" button and choose Add to Favorites so you can save videos to Watch Later.'),this.firstStepText=(0,c.default)("Add the button above to your favorites bar.")):(this.stepsImgSrc=w.default,this.modalText=(0,c.default)('Drag the "Plex it!" button to your Bookmarks Bar so you can save videos to your Watch Later.'),this.firstStepText=(0,c.default)("Drag the button above to your bookmarks bar."));
var t=["OSX","Windows","Linux"];if(o.default.indexOf(t,p.default.platform)!==-1){var n="OSX"===p.default.platform?(0,c.default)("\u2318 C"):(0,c.default)("Ctrl C");this.copyCommand=(0,c.default)("{1} to copy",n)}},serializeData:function(){return{queueEmail:this.queueEmail,copyCommand:this.copyCommand,stepsImgSrc:this.stepsImgSrc,emailImgSrc:_.default,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 v.default({title:(0,c.default)("Plex It!"),message:this.modalText,confirmLabel:(0,c.default)("OK"),hideCancel:!0});m.default.trigger("show:modal",t)},onPlexitMouseDown:function(){this.ui.plexitBtn.css("user-select","text")},onPlexitMouseUp:function(){this.ui.plexitBtn.css("user-select","none")}});t.default=T,e.exports=t.default},function(e,t,n){
"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(2536),i=r(a),s=n(3),o=r(s),l=n(8),u=r(l),d=n(13),c=r(d),f=n(5),p=r(f),h=n(12),v=r(h),g=n(40),m=r(g),y=n(1567),b=r(y),P=c.default.Layout.extend({className:"container",template:i.default,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=m.default.get(n)),t||(t="unwatched"),m.default.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:(0,p.default)("All"),key:e,subset:"all"},{title:(0,p.default)("Unwatched"),key:e,subset:"unwatched"},{title:(0,p.default)("Watched"),key:e,subset:"watched"}]}},updateBadges:function(){var e={all:this.subsets.all.length,unwatched:this.subsets.unwatched.length,watched:this.subsets.watched.length};o.default.each(o.default.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 b.default({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"),
(0,u.default)(e.currentTarget).addClass("selected"),this.initSubset({subset:o.default.last(e.currentTarget.href.split("/"))}),this.list.show(new b.default({collection:this.subsets[this.subset]})),v.default.trigger("navigate","userPlaylist",{key:this.listModel.get("key"),subset:this.subset,trigger:!1})}});t.default=P,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.name,r=e.width,s=e.height,o=a(e,["className","name","width","height"]),u=n.toUpperCase().split(" "),c=u[0].charAt(0),p=u[u.length-1].charAt(0),h=u.length>1?""+c+p:n.charAt(0),v={
fontSize:Math.max(14,Math.min(Math.round(r/4),42)),lineHeight:s+"px"};return l.default.createElement("div",i({style:v,className:(0,d.default)(t,f.default.anagram)},o),h)}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(33),d=s(u),c=n(2046),f=s(c);r.propTypes={className:o.PropTypes.string,width:o.PropTypes.number,height:o.PropTypes.number,name:o.PropTypes.string.isRequired},r.defaultProps={width:13,height:13},t.default=r,e.exports=t.default;
},function(e,t,n){"use strict";function r(e){var t=e.children,n=a(e,["children"]);return o.default.createElement("div",n,t)}var a=n(19).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(2052),u=i(l);r.propTypes={children:s.PropTypes.node,className:s.PropTypes.string},r.defaultProps={className:u.default.dragLayer},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=a(e,["className"]);return l.default.createElement(f.default,i({
name:"plex-icon-pp-badge-560",className:(0,d.default)(h.default.plexPassIcon,t)},n))}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(33),d=s(u),c=n(36),f=s(c),p=n(2054),h=s(p);r.propTypes={className:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.name,n=e.labelText,r=e.helpText,u=e.showErrors,d=e.errors,f=s(e,["name","labelText","helpText","showErrors","errors"]),p=o(d,1),h=p[0];
return{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:[{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:[n,u&&h&&" \u2014 "+h],hasError:u,name:t}),_owner:null},c.default.createElement(w.default,l({className:_.default.input,name:t,type:"number",hasError:u},f)),r&&{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{children:r}),_owner:null}]}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(93).default,l=n(11).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(178),p=u(f),h=n(177),v=u(h),g=n(111),m=u(g),y=n(334),b=u(y),P=n(213),w=u(P),S=n(2069),_=u(S);r.propTypes={name:d.PropTypes.string.isRequired,labelText:d.PropTypes.node.isRequired,helpText:d.PropTypes.string,showErrors:d.PropTypes.bool,errors:d.PropTypes.arrayOf(d.PropTypes.string).isRequired},t.default=(0,p.default)(r),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.labelText,n=e.name,r=e.value,u=e.showErrors,d=e.errors,f=s(e,["labelText","name","value","showErrors","errors"]),h=""===r?null:T[(0,
p.default)(r).score],v=o(d,1),g=v[0];return{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{children:[{$$typeof:i,type:w.default,key:null,ref:null,props:a(w.default.defaultProps,{children:[t,h&&!u&&{$$typeof:i,type:"span",key:null,ref:null,props:{children:[" \u2014 ",{$$typeof:i,type:"span",key:null,ref:null,props:{children:h.translateFn(),style:{color:h.color}},_owner:null}]},_owner:null},u&&" \u2014 "+g],hasError:u,name:n}),_owner:null},c.default.createElement(_.default,l({
name:n,type:"password",value:r,hasError:u},f))]}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(93).default,l=n(11).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(543),p=u(f),h=n(5),v=u(h),g=n(178),m=u(g),y=n(177),b=u(y),P=n(111),w=u(P),S=n(213),_=u(S),T={0:{color:"#ff5533",translateFn:function(){return(0,v.default)("Too weak")}},1:{color:"#ee8833",translateFn:function(){return(0,v.default)("Very weak")}},2:{color:"#eebb00",translateFn:function(){
return(0,v.default)("Somewhat weak")}},3:{color:"#bbbb33",translateFn:function(){return(0,v.default)("Somewhat Strong")}},4:{color:"#66bb55",translateFn:function(){return(0,v.default)("Very Strong")}}};r.defaultProps={showErrors:!1},r.propTypes={labelText:d.PropTypes.node.isRequired,name:d.PropTypes.string.isRequired,value:d.PropTypes.string.isRequired,showErrors:d.PropTypes.bool,errors:d.PropTypes.arrayOf(d.PropTypes.string).isRequired},t.default=(0,m.default)(r),e.exports=t.default},function(e,t,n){
"use strict";function r(e){return{$$typeof:a,type:"div",key:null,ref:null,props:{children:l.default.createElement(d.default,i({},e,{background:!0})),className:f.default.avatar},_owner:null}}var a=n(7).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(422),d=s(u),c=n(2072),f=s(c);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.className,r=a(e,["children","className"]);return l.default.createElement("div",i({
role:"menu",className:(0,d.default)(n,f.default.menu)},r),t)}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(33),d=s(u),c=n(2077),f=s(c);r.propTypes={className:o.PropTypes.string,children:o.PropTypes.node.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=o(l),d=n(4),c=o(d),f=n(14),p=n(31),h=o(p),v=function(e){
function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"componentDidMount",value:function(){(0,f.resolve)("metrics").trackView(u.default.omit(this.props,"children"))}},{key:"shouldComponentUpdate",value:function(e,t){return(0,h.default)(this,e,t)}},{key:"render",value:function(){return c.default.Children.only(this.props.children)}}]),t}(d.Component);v.propTypes={children:d.PropTypes.element.isRequired,page:d.PropTypes.string.isRequired
},t.default=v,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.className,r=e.target,i=e.attachment,u=e.options,d=e.isOpen,c=(e.onMenuClose,l(e,["children","className","target","attachment","options","isOpen","onMenuClose"]));return{$$typeof:o,type:P.default,key:null,ref:null,props:s(P.default.defaultProps,{children:{$$typeof:o,type:y.default,key:null,ref:null,props:s(y.default.defaultProps,{children:d&&f.default.createElement("div",a({className:(0,h.default)(n,I.default.tooltip,I.default[i])
},c),t),isOpen:d,transitionName:C,transitionAppearTimeout:M,transitionEnterTimeout:M,transitionLeaveTimeout:M}),_owner:null},className:I.default.tooltipPortal,target:r,options:u||E[i],isOpen:d,closeTimeout:M}),_owner:null}}var a=n(11).default,i=n(38).default,s=n(10).default,o=n(7).default,l=n(19).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d,c=n(4),f=u(c),p=n(33),h=u(p),v=n(204),g=u(v),m=n(319),y=u(m),b=n(657),P=u(b),w=n(221),S=u(w),_=n(30),T=n(2092),I=u(T),M=(0,g.default)(S.default.tooltipSpeed),C={
appear:I.default.enter,appearActive:I.default.enterActive,enter:I.default.enter,enterActive:I.default.enterActive,leave:I.default.leave,leaveActive:I.default.leaveActive},x={skipMoveElement:!0,constraints:[{to:"window",attachment:"together",pin:!0}]},E=(d={},i(d,_.tooltipAttachments.TOP_LEFT,a({},x,{attachment:"bottom left",targetAttachment:"top left"})),i(d,_.tooltipAttachments.TOP_CENTER,a({},x,{attachment:"bottom center",targetAttachment:"top center"})),i(d,_.tooltipAttachments.TOP_RIGHT,a({},x,{
attachment:"bottom right",targetAttachment:"top right"})),i(d,_.tooltipAttachments.BOTTOM_LEFT,a({},x,{attachment:"top left",targetAttachment:"bottom left"})),i(d,_.tooltipAttachments.BOTTOM_CENTER,a({},x,{attachment:"top center",targetAttachment:"bottom center"})),i(d,_.tooltipAttachments.BOTTOM_RIGHT,a({},x,{attachment:"top right",targetAttachment:"bottom right"})),i(d,_.tooltipAttachments.MIDDLE_LEFT,a({},x,{attachment:"middle right",targetAttachment:"middle left"})),i(d,_.tooltipAttachments.MIDDLE_RIGHT,a({},x,{
attachment:"middle left",targetAttachment:"middle right"})),d);r.propTypes={children:c.PropTypes.node,className:c.PropTypes.string,target:c.PropTypes.object,attachment:c.PropTypes.string,options:c.PropTypes.object,isOpen:c.PropTypes.bool.isRequired,onMenuClose:c.PropTypes.func},r.defaultProps={attachment:_.tooltipAttachments.BOTTOM_CENTER},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(19).default,l=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=o(e,["children"]);return d.default.createElement("div",n,t)}}]),t}(u.Component);c.propTypes={children:u.PropTypes.node},t.default=c,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(5)),f=u(c),p=n(24),h=n(658),v=u(h),g=n(30),m=n(81),y=u(m),b=n(1691),P=u(b),w=n(1699),S=u(w),_=n(2093),T=u(_),I={context:"settings"},M=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isDVRSetupModalOpen:!1}}return a(t,e),i(t,[{key:"onCreateDVRPress",decorators:[p.autobind],value:function(){this.setState({isDVRSetupModalOpen:!0})}},{key:"onModalClose",decorators:[p.autobind],
value:function(){this.setState({isDVRSetupModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.isDvrsPending,r=e.hasDVRs,a=!n&&!r;return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[a&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:v.default,key:null,ref:null,props:l(v.default.defaultProps,{text:"To get started recording TV, connect a tuner device to your network (here's a {1}list of supported devices{2}) and click below.",
args:['<a href="https://support.plex.tv/hc/en-us/articles/225877427-Supported-DVR-Devices-and-Antennas" target="_blank">',"</a>"]}),_owner:null},className:T.default.info},_owner:null},{$$typeof:o,type:P.default,key:null,ref:null,props:l(P.default.defaultProps,{serverEntityID:t}),_owner:null},a&&{$$typeof:o,type:y.default,key:null,ref:null,props:l(y.default.defaultProps,{children:(0,f.default)("DVR Setup"),kind:g.kinds.PRIMARY,size:g.sizes.LARGE,onPress:this.onCreateDVRPress}),_owner:null},{$$typeof:o,
type:S.default,key:null,ref:null,props:l(S.default.defaultProps,{serverEntityID:t,metricsProperties:I,isOpen:this.state.isDVRSetupModalOpen,onModalClose:this.onModalClose}),_owner:null}],className:T.default.liveTVSettings},_owner:null}}}]),t}(d.Component);M.propTypes={serverEntityID:d.PropTypes.string.isRequired,isDvrsPending:d.PropTypes.bool.isRequired,hasDVRs:d.PropTypes.bool.isRequired},t.default=M,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,f.createSelector)(function(e){
return e.ui.liveTVSettingsPage},function(e){var t=e.isDvrsPending,n=e.dvrs;return{isPagePopulated:e.isPagePopulated,isDvrsPending:t,hasDVRs:!(!n||!n.length)}})}var a=n(17).default,i=n(18).default,s=n(44).default,o=n(16).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(21),f=n(15),p=n(50),h=n(436),v=n(1682),g=l(v),m={initLiveTVSettingsPage:h.initLiveTVSettingsPage,clearLiveTVSettingsPage:h.clearLiveTVSettingsPage},y=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return i(t,e),s(t,[{key:"componentWillMount",value:function(){this._populate(this.props)}},{key:"componentWillUnmount",value:function(){this.props.clearLiveTVSettingsPage()}},{key:"_populate",value:function(e){(0,p.scheduleImmediateUpdate)(function(){e.initLiveTVSettingsPage({serverEntityID:e.serverEntityID})})}},{key:"render",value:function(){return this.props.isPagePopulated?d.default.createElement(g.default,this.props):null}}]),t}(u.Component);y.propTypes={serverEntityID:u.PropTypes.string.isRequired,
isPagePopulated:u.PropTypes.bool.isRequired,initLiveTVSettingsPage:u.PropTypes.func.isRequired,clearLiveTVSettingsPage:u.PropTypes.func.isRequired},t.default=(0,c.connect)(r,m)(y),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,f.createSelector)(function(e){return e.primaryServer},function(e){return{serverEntityID:e}})}var a=n(17).default,i=n(18).default,s=n(44).default,o=n(16).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(21),f=n(15),p=n(1683),h=l(p),v=function(e){
function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"render",value:function(){return this.props.serverEntityID?d.default.createElement(h.default,this.props):null}}]),t}(u.Component);v.propTypes={serverEntityID:u.PropTypes.string},t.default=(0,c.connect)(r)(v),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var d=n(4),c=(u(d),n(5)),f=u(c),p=n(24),h=n(36),v=u(h),g=n(30),m=n(34),y=u(m),b=n(125),P=u(b),w=n(1695),S=u(w),_=n(1687),T=u(_),I=n(456),M=u(I),C=n(2094),x=u(C),E={context:"settings"},k=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isManageChannelsModalOpen:!1,isDeviceSettingsModalOpen:!1}}return a(t,e),i(t,[{key:"onManageChannelsPress",decorators:[p.autobind],value:function(){this.setState({isManageChannelsModalOpen:!0
})}},{key:"onManageChannelsModalClose",decorators:[p.autobind],value:function(){this.setState({isManageChannelsModalOpen:!1})}},{key:"onDeviceSettingsPress",decorators:[p.autobind],value:function(){this.setState({isDeviceSettingsModalOpen:!0})}},{key:"onDeviceSettingsModalClose",decorators:[p.autobind],value:function(){this.setState({isDeviceSettingsModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.dvrID,r=e.deviceID,a=e.model,i=e.uri,s=e.channelMappings,u=e.hasPrefs,d=e.tuners,c=e.canRemoveDevice,p=e.onRemoveDevicePress,h=s.filter(function(e){
return e.enabled}).length,m=void 0;return m=1===h?(0,f.default)("1 channel enabled"):h>1?(0,f.default)("{1} channels enabled",h):(0,f.default)("No channels enabled"),{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:M.default,key:null,ref:null,props:l(M.default.defaultProps,{className:x.default.deviceImage,model:a,size:g.sizes.SMALL}),_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,
type:"div",key:null,ref:null,props:{children:a},_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:i,className:x.default.uri},_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:[m,{$$typeof:o,type:P.default,key:null,ref:null,props:l(P.default.defaultProps,{className:x.default.separator}),_owner:null},{$$typeof:o,type:y.default,key:null,ref:null,props:l(y.default.defaultProps,{children:(0,f.default)("Manage Channels"),className:x.default.isManageChannelsModalOpen,
kind:g.kinds.PRIMARY,size:g.sizes.SMALL,onPress:this.onManageChannelsPress}),_owner:null}],className:x.default.channelCount},_owner:null}],className:x.default.details},_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:d.map(function(e){return{$$typeof:o,type:"div",key:e.name,ref:null,props:{children:[e.name,{$$typeof:o,type:P.default,key:null,ref:null,props:l(P.default.defaultProps,{className:x.default.separator}),_owner:null},{$$typeof:o,type:"span",key:null,ref:null,props:{className:e.recording?x.default.recordingIndicator:x.default.availableIndicator
},_owner:null},e.recording?{$$typeof:o,type:"span",key:null,ref:null,props:{children:[e.recording.title," (",e.recording.progress,"%)",{$$typeof:o,type:P.default,key:null,ref:null,props:l(P.default.defaultProps,{className:x.default.separator}),_owner:null},e.recording.subtitle],className:x.default.recording},_owner:null}:(0,f.default)("Available")],className:x.default.tuner},_owner:null}}),className:x.default.tunerList},_owner:null},u&&{$$typeof:o,type:y.default,key:null,ref:null,props:l(y.default.defaultProps,{
children:[{$$typeof:o,type:v.default,key:null,ref:null,props:l(v.default.defaultProps,{className:x.default.deviceSettingsIcon,name:"plex-icon-settings-560","aria-label":(0,f.default)("Device Settings")}),_owner:null},(0,f.default)("Device Settings")],className:x.default.deviceSettings,kind:g.kinds.PRIMARY,onPress:this.onDeviceSettingsPress}),_owner:null}],className:x.default.info},_owner:null},c&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:y.default,key:null,ref:null,
props:l(y.default.defaultProps,{children:{$$typeof:o,type:v.default,key:null,ref:null,props:l(v.default.defaultProps,{name:"plex-icon-remove-560","aria-label":(0,f.default)("Remove Device")}),_owner:null},className:x.default.removeDevice,onPress:p}),_owner:null},className:x.default.removeDeviceContainer},_owner:null},{$$typeof:o,type:S.default,key:null,ref:null,props:l(S.default.defaultProps,{serverEntityID:t,dvrID:n,deviceID:r,metricsProperties:E,isOpen:this.state.isManageChannelsModalOpen,onModalClose:this.onManageChannelsModalClose
}),_owner:null},{$$typeof:o,type:T.default,key:null,ref:null,props:l(T.default.defaultProps,{serverEntityID:t,dvrID:n,deviceID:r,metricsProperties:E,isOpen:this.state.isDeviceSettingsModalOpen,onModalClose:this.onDeviceSettingsModalClose}),_owner:null}],className:x.default.device},_owner:null}}}]),t}(d.Component);k.propTypes={serverEntityID:d.PropTypes.string.isRequired,dvrID:d.PropTypes.number.isRequired,deviceID:d.PropTypes.number.isRequired,model:d.PropTypes.string.isRequired,uri:d.PropTypes.string.isRequired,
channelMappings:d.PropTypes.array.isRequired,hasPrefs:d.PropTypes.bool.isRequired,tuners:d.PropTypes.array.isRequired,canRemoveDevice:d.PropTypes.bool,onRemoveDevicePress:d.PropTypes.func.isRequired},t.default=k,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,v.createSelector)(function(e,t){var n=t.tunerCount;return n},(0,w.default)(),(0,_.default)(),function(e,t,n){for(var r=c.default.filter(n,function(e){return e.type===b.activityTypes.GRABBER_GRAB&&parseInt(e.context.deviceID,10)===t.key;
}),a=[],i=0;i<e;i++)a.push({name:(0,m.default)("Tuner {1}",i+1),recording:r[i]});return{hasPrefs:!(!t.prefs||!t.prefs.length),tuners:a}})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(11).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(3),c=u(d),f=n(4),p=u(f),h=n(21),v=n(15),g=n(5),m=u(g),y=n(24),b=n(168),P=n(257),w=u(P),S=n(210),_=u(S),T=n(1685),I=u(T),M=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return i(t,e),s(t,[{key:"onRemoveDevicePress",decorators:[y.autobind],value:function(){}},{key:"render",value:function(){return p.default.createElement(I.default,l({onRemoveDevicePress:this.onRemoveDevicePress},this.props))}}]),t}(f.Component);M.propTypes={serverEntityID:f.PropTypes.string.isRequired,deviceID:f.PropTypes.number.isRequired,tunerCount:f.PropTypes.number.isRequired},t.default=(0,h.connect)(r)(M),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.isOpen,n=e.metricsProperties,r=e.onModalClose,l=s(e,["isOpen","metricsProperties","onModalClose"]);
return{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{children:d.default.createElement(h.default,o({onModalClose:r},l)),isOpen:t,metricsPage:"dvrDeviceSettings",metricsProperties:n,onModalClose:r}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(148),f=l(c),p=n(1689),h=l(p);r.propTypes={isOpen:u.PropTypes.bool.isRequired,metricsProperties:u.PropTypes.object.isRequired,
onModalClose:u.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(11).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=d(c),p=n(5),h=d(p),v=n(30),g=n(105),m=d(g),y=n(113),b=d(y),P=n(82),w=d(P),S=n(112),_=d(S),T=n(179),I=d(T),M=n(451),C=d(M),x=n(335),E=d(x),k=n(723),D=d(k),A=n(81),O=d(A),R=n(269),L=d(R),N=n(456),j=d(N),U=n(2096),$=d(U),z=function(e){
function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"componentDidUpdate",value:function(e,t){var n=e.isSaving&&!this.props.isSaving&&null==this.props.saveError;n&&this.props.onModalClose()}},{key:"render",value:function(){var e=this.props,t=e.model,n=e.uri,r=e.prefs,a=e.isSaving,i=e.saveError,s=e.onSubmit,d=e.onErrorDismiss,c=e.onModalClose;return{$$typeof:l,type:m.default,key:null,ref:null,props:o(m.default.defaultProps,{children:{
$$typeof:l,type:C.default,key:null,ref:null,props:o(C.default.defaultProps,{children:[{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:(0,h.default)("Device Settings")}),_owner:null},i&&{$$typeof:l,type:E.default,key:null,ref:null,props:o(E.default.defaultProps,{errorMessage:(0,h.default)("There was a problem saving your changes. Please try again."),onErrorDismiss:d}),_owner:null},{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:{
$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:j.default,key:null,ref:null,props:o(j.default.defaultProps,{className:$.default.deviceImage,model:t,size:v.sizes.SMALL}),_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:t,className:$.default.model},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:n},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:r.map(function(e){
var t=e.id;return f.default.createElement(D.default,u({key:t},e))}),className:$.default.settings},_owner:null}],className:$.default.info},_owner:null}],className:$.default.container},_owner:null}}),_owner:null},{$$typeof:l,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{children:{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{children:[{$$typeof:l,type:O.default,key:null,ref:null,props:o(O.default.defaultProps,{children:(0,h.default)("Cancel"),kind:v.kinds.DEFAULT,
size:v.sizes.MEDIUM,onPress:c}),_owner:null},{$$typeof:l,type:L.default,key:null,ref:null,props:o(L.default.defaultProps,{children:(0,h.default)("Save"),type:"submit",isSpinning:a,kind:v.kinds.PRIMARY,size:v.sizes.MEDIUM}),_owner:null}]}),_owner:null}}),_owner:null}],className:$.default.form,onSubmit:s}),_owner:null},onModalClose:c}),_owner:null}}}]),t}(c.Component);z.propTypes={model:c.PropTypes.string.isRequired,uri:c.PropTypes.string.isRequired,prefs:c.PropTypes.arrayOf(c.PropTypes.object).isRequired,
isSaving:c.PropTypes.bool.isRequired,saveError:c.PropTypes.object,onSubmit:c.PropTypes.func.isRequired,onErrorDismiss:c.PropTypes.func.isRequired,onModalClose:c.PropTypes.func.isRequired},t.default=z,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,p.createSelector)(function(e,t){var n=t.dvrID;return n},(0,m.default)(),function(e,t){var n=t.key,r=t.model,a=t.uri,i=t.prefs,s=t.isSaving,o=t.saveError;return{dvrID:e,deviceID:n,model:r,uri:a,prefs:i,isSaving:s,saveError:o}})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(11).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(21),p=n(15),h=n(24),v=n(50),g=n(257),m=u(g),y=n(103),b=n(1688),P=u(b),w=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"onSubmit",decorators:[h.autobind],value:function(e){var t=this,n=this.props,r=n.serverEntityID,a=n.dvrID,i=n.deviceID;(0,v.scheduleImmediateUpdate)(function(){t.props.saveDeviceSettings({serverEntityID:r,dvrID:a,deviceID:i,
prefs:e})})}},{key:"onErrorDismiss",decorators:[h.autobind],value:function(){var e=this.props,t=e.dvrID,n=e.deviceID;this.props.clearDeviceSettingsSaveError({dvrID:t,deviceID:n})}},{key:"onModalClose",decorators:[h.autobind],value:function(){var e=this.props,t=e.dvrID,n=e.deviceID;this.props.clearDeviceSettingsSaveError({dvrID:t,deviceID:n}),this.props.onModalClose()}},{key:"render",value:function(){return c.default.createElement(P.default,l({},this.props,{onSubmit:this.onSubmit,onErrorDismiss:this.onErrorDismiss,
onModalClose:this.onModalClose}))}}]),t}(d.Component);w.propTypes={serverEntityID:d.PropTypes.string.isRequired,dvrID:d.PropTypes.number.isRequired,deviceID:d.PropTypes.number.isRequired,onModalClose:d.PropTypes.func.isRequired,saveDeviceSettings:d.PropTypes.func.isRequired,clearDeviceSettingsSaveError:d.PropTypes.func.isRequired},t.default=(0,f.connect)(r,{saveDeviceSettings:y.saveDeviceSettings,clearDeviceSettingsSaveError:y.clearDeviceSettingsSaveError})(w),e.exports=t.default},function(e,t,n){
"use strict";function r(e){var t=e.serverEntityID,n=e.isDvrsPending,r=e.dvrsError,s=e.dvrs;return r?{$$typeof:a,type:"div",key:null,ref:null,props:{children:(0,u.default)("Unable to load DVRs")},_owner:null}:n?{$$typeof:a,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{label:(0,u.default)("Loading DVRs")}),_owner:null}:{$$typeof:a,type:"div",key:null,ref:null,props:{children:s.map(function(e){return{$$typeof:a,type:p.default,key:e.key,ref:null,props:i(p.default.defaultProps,{dvrID:e.key,
serverEntityID:t,lineupTitle:e.lineupTitle,devices:e.devices}),_owner:null}})},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(55),c=s(d),f=n(1693),p=s(f);r.propTypes={serverEntityID:o.PropTypes.string.isRequired,isDvrsPending:o.PropTypes.bool.isRequired,dvrsError:o.PropTypes.object,dvrs:o.PropTypes.arrayOf(o.PropTypes.object).isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";
function r(e){var t=e.ui.liveTVSettingsPage,n=t.isDvrsPending,r=t.dvrsError,a=t.dvrs;return{isDvrsPending:n,dvrsError:r,dvrs:a}}var a=n(17).default,i=n(18).default,s=n(44).default,o=n(16).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(21),f=n(50),p=n(436),h=n(1690),v=l(h),g={fetchDVRs:p.fetchDVRs},m=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"componentWillMount",
value:function(){this._populate(this.props)}},{key:"_populate",value:function(e){(0,f.scheduleImmediateUpdate)(function(){e.fetchDVRs({serverEntityID:e.serverEntityID})})}},{key:"render",value:function(){return d.default.createElement(v.default,this.props)}}]),t}(u.Component);m.propTypes={fetchDVRs:u.PropTypes.func.isRequired},t.default=(0,c.connect)(r,g)(m),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(5)),f=u(c),p=n(24),h=n(30),v=n(31),g=u(v),m=n(36),y=u(m),b=n(34),P=u(b),w=n(125),S=u(w),_=n(271),T=u(_),I=n(1686),M=u(I),C=n(2097),x=u(C),E=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isRemoveDVRModalOpen:!1}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"onRemoveDVRPress",decorators:[p.autobind],
value:function(){this.setState({isRemoveDVRModalOpen:!0})}},{key:"onRemoveDVRConfirm",decorators:[p.autobind],value:function(){this.setState({isRemoveDVRModalOpen:!1}),this.props.onRemoveDVR()}},{key:"onRemoveDVRCancel",decorators:[p.autobind],value:function(){this.setState({isRemoveDVRModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.dvrID,r=e.lineupTitle,a=e.devices,i=e.epgDownloadActivity,s=e.onReloadGuidePress;return{$$typeof:o,type:"div",key:null,ref:null,
props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{children:[(0,f.default)("DVR"),{$$typeof:o,type:S.default,key:null,ref:null,props:l(S.default.defaultProps,{className:x.default.separator}),_owner:null},r],className:x.default.name},_owner:null},{$$typeof:o,type:P.default,key:null,ref:null,props:l(P.default.defaultProps,{children:(0,f.default)("Delete this DVR"),className:x.default.deleteLink,kind:h.kinds.PRIMARY,size:h.sizes.SMALL,
onPress:this.onRemoveDVRPress}),_owner:null}],className:x.default.header},_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{children:a.map(function(e){return{$$typeof:o,type:M.default,key:e.key,ref:null,props:l(M.default.defaultProps,{serverEntityID:t,dvrID:n,deviceID:e.key,canRemoveDevice:a.length>1,model:e.model,uri:e.uri,channelMappings:e.channelMappings,tunerCount:e.tuners}),_owner:null}}),className:x.default.devices},_owner:null
},!i&&{$$typeof:o,type:P.default,key:null,ref:null,props:l(P.default.defaultProps,{children:[{$$typeof:o,type:y.default,key:null,ref:null,props:l(y.default.defaultProps,{name:"plex-icon-reload-560",className:x.default.refreshProgramGuideIcon}),_owner:null},(0,f.default)("Refresh Program Guide")],kind:h.kinds.PRIMARY,onPress:s}),_owner:null},i&&{$$typeof:o,type:"span",key:null,ref:null,props:{children:[i.title," (",i.progress,"%)",{$$typeof:o,type:S.default,key:null,ref:null,props:l(S.default.defaultProps,{
className:x.default.separator}),_owner:null},i.subtitle]},_owner:null}],className:x.default.info},_owner:null},{$$typeof:o,type:T.default,key:null,ref:null,props:l(T.default.defaultProps,{isOpen:this.state.isRemoveDVRModalOpen,metricsPage:"confirmRemoveDVR",title:(0,f.default)("Delete DVR"),message:(0,f.default)("Deleting your DVR will remove the Program Guide, and all scheduled recordings will be suspended. Programming you've previously recorded will remain in your library."),confirmLabel:(0,f.default)("Delete"),
kind:h.kinds.DANGER,onConfirm:this.onRemoveDVRConfirm,onCancel:this.onRemoveDVRCancel}),_owner:null}],className:x.default.dvr},_owner:null}}}]),t}(d.Component);E.propTypes={serverEntityID:d.PropTypes.string.isRequired,dvrID:d.PropTypes.number.isRequired,lineupTitle:d.PropTypes.string.isRequired,devices:d.PropTypes.array.isRequired,epgDownloadActivity:d.PropTypes.object,onRemoveDVR:d.PropTypes.func.isRequired,onReloadGuidePress:d.PropTypes.func.isRequired},t.default=E,e.exports=t.default},function(e,t,n){
"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(21),f=n(24),p=n(15),h=n(685),v=l(h),g=n(436),m=n(1692),y=l(m),b=(0,p.createStructuredSelector)({epgDownloadActivity:(0,v.default)()}),P={removeDVR:g.removeDVR,reloadGuide:g.reloadGuide},w=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{
key:"onRemoveDVR",decorators:[f.autobind],value:function(){this.props.removeDVR({serverEntityID:this.props.serverEntityID,dvrID:this.props.dvrID})}},{key:"onReloadGuidePress",decorators:[f.autobind],value:function(){this.props.reloadGuide({serverEntityID:this.props.serverEntityID,dvrID:this.props.dvrID})}},{key:"render",value:function(){return d.default.createElement(y.default,o({onRemoveDVR:this.onRemoveDVR,onReloadGuidePress:this.onReloadGuidePress},this.props))}}]),t}(u.Component);w.propTypes={
serverEntityID:u.PropTypes.string.isRequired,dvrID:u.PropTypes.number.isRequired,removeDVR:u.PropTypes.func.isRequired,reloadGuide:u.PropTypes.func.isRequired},t.default=(0,c.connect)(b,P)(w),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.dvrID,r=e.deviceID,s=e.metricsProperties,o=e.isOpen,l=e.onModalClose;return{$$typeof:i,type:u.default,key:null,ref:null,props:a(u.default.defaultProps,{children:{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{
serverEntityID:t,dvrID:n,deviceID:r,onModalClose:l}),_owner:null},metricsPage:"dvrManageChannels",metricsProperties:s,isOpen:o,onModalClose:l}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(148)),u=s(l),d=n(1697),c=s(d);r.propTypes={serverEntityID:o.PropTypes.string.isRequired,dvrID:o.PropTypes.number.isRequired,deviceID:o.PropTypes.number.isRequired,isOpen:o.PropTypes.bool.isRequired,metricsProperties:o.PropTypes.object.isRequired,
onModalClose:o.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,p.createSelector)((0,g.default)(),(0,y.default)(),function(e,t){return{dvrID:e.key,deviceID:t.key}})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(11).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(21),p=n(15),h=n(24),v=n(438),g=u(v),m=n(257),y=u(m),b=n(103),P=n(1694),w=u(P),S=function(e){function t(){
o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"onModalClose",decorators:[h.autobind],value:function(){this.props.clearDVRSetup({serverEntityID:this.props.serverEntityID}),this.props.onModalClose()}},{key:"render",value:function(){return c.default.createElement(w.default,l({},this.props,{onModalClose:this.onModalClose}))}}]),t}(d.Component);S.propTypes={serverEntityID:d.PropTypes.string.isRequired,dvrID:d.PropTypes.number.isRequired,
deviceID:d.PropTypes.number.isRequired,onModalClose:d.PropTypes.func.isRequired,clearDVRSetup:d.PropTypes.func.isRequired},t.default=(0,f.connect)(r,{clearDVRSetup:b.clearDVRSetup})(S),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.dvrID,r=e.deviceID,o=e.channelMappings,l=e.isChannelMappingsPending,d=e.isLineupChannelsPending,p=e.isDeviceChannelsPending,v=e.channelMappingsError,m=e.lineupChannelsError,b=e.deviceChannelsError,w=e.onSavePress,_=e.onModalClose;
return v||m||b?{$$typeof:i,type:M.default,key:null,ref:null,props:a(M.default.defaultProps,{message:(0,c.default)("Unable to load channel mappings"),onModalClose:_}),_owner:null}:l||d||p?{$$typeof:i,type:x.default,key:null,ref:null,props:a(x.default.defaultProps,{onModalClose:_}),_owner:null}:{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:[{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:(0,c.default)("Edit Channel Mappings")
}),_owner:null},{$$typeof:i,type:P.default,key:null,ref:null,props:a(P.default.defaultProps,{children:[O,o.map(function(e){return u.default.createElement(A.default,s({key:e.deviceIdentifier,serverEntityID:t,dvrID:n,deviceID:r},e))})]}),_owner:null},{$$typeof:i,type:S.default,key:null,ref:null,props:a(S.default.defaultProps,{children:{$$typeof:i,type:T.default,key:null,ref:null,props:a(T.default.defaultProps,{children:[{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{children:(0,
c.default)("Cancel"),kind:f.kinds.DEFAULT,size:f.sizes.MEDIUM,onPress:_}),_owner:null},{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{children:(0,c.default)("Save"),kind:f.kinds.PRIMARY,size:f.sizes.MEDIUM,onPress:w}),_owner:null}]}),_owner:null}}),_owner:null}],onModalClose:_}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(30),p=n(81),h=o(p),v=n(105),g=o(v),m=n(113),y=o(m),b=n(82),P=o(b),w=n(112),S=o(w),_=n(179),T=o(_),I=n(728),M=o(I),C=n(729),x=o(C),E=n(734),k=o(E),D=n(733),A=o(D),O={
$$typeof:i,type:k.default,key:null,ref:null,props:a(k.default.defaultProps,{}),_owner:null};r.propTypes={serverEntityID:l.PropTypes.string.isRequired,dvrID:l.PropTypes.number.isRequired,deviceID:l.PropTypes.number.isRequired,channelMappings:l.PropTypes.arrayOf(l.PropTypes.object).isRequired,isChannelMappingsPending:l.PropTypes.bool.isRequired,isLineupChannelsPending:l.PropTypes.bool.isRequired,isDeviceChannelsPending:l.PropTypes.bool.isRequired,channelMappingsError:l.PropTypes.object,lineupChannelsError:l.PropTypes.object,
deviceChannelsError:l.PropTypes.object,onSavePress:l.PropTypes.func.isRequired,onModalClose:l.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,h.createSelector)((0,y.default)(),(0,P.default)(),S.default,function(e,t,n){var r=e.lineup,a=t.channelMappings||n.channelMappings,i=n.isChannelMappingsPending,s=n.isLineupChannelsPending,o=n.channelMappingsError,l=n.lineupChannelsError;return{lineupUUID:e.lineup,lineupTitle:r,channelMappings:a,isChannelMappingsPending:i,
isLineupChannelsPending:s,isDeviceChannelsPending:t.isChannelsPending,channelMappingsError:o,lineupChannelsError:l,deviceChannelsError:t.channelsError}})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(11).default,u=n(1).default,d=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=u(c),p=n(21),h=n(15),v=n(24),g=n(50),m=n(438),y=u(m),b=n(257),P=u(b),w=n(96),S=u(w),_=n(103),T=d(_),I=n(1696),M=u(I),C=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return i(t,e),s(t,[{key:"componentWillMount",value:function(){this._populate(this.props)}},{key:"_populate",value:function(e){var t=e.serverEntityID,n=e.dvrID,r=e.deviceID,a=e.lineupUUID;(0,g.scheduleImmediateUpdate)(function(){e.fetchLineupChannels({serverEntityID:t,lineupUUID:a}),e.fetchDeviceChannels({serverEntityID:t,dvrID:n,deviceID:r})})}},{key:"onSavePress",decorators:[v.autobind],value:function(){var e=this.props,t=e.serverEntityID,n=e.dvrID,r=e.deviceID;this.props.saveChannelMap({serverEntityID:t,
dvrID:n,deviceID:r}),this.props.onModalClose()}},{key:"render",value:function(){return f.default.createElement(M.default,l({},this.props,{onSavePress:this.onSavePress}))}}]),t}(c.Component);C.propTypes={serverEntityID:c.PropTypes.string.isRequired,dvrID:c.PropTypes.number.isRequired,deviceID:c.PropTypes.number.isRequired,onModalClose:c.PropTypes.func.isRequired,fetchLineupChannels:c.PropTypes.func.isRequired,fetchDeviceChannels:c.PropTypes.func.isRequired,fetchChannelMap:c.PropTypes.func.isRequired,
saveChannelMap:c.PropTypes.func.isRequired},t.default=(0,p.connect)(r,T)(C),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.machineIdentifier,n=e.isRefreshing;return n?{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{icon:"plex-icon-shows-broadcast-560",title:(0,u.default)("We're now building your Program Guide"),description:(0,u.default)("Hang tight while we download all the data for what's on")}),_owner:null}:{$$typeof:i,type:h.default,key:null,
ref:null,props:a(h.default.defaultProps,{children:{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{children:(0,u.default)("Go to DVR Settings"),to:"#!/settings/server/"+encodeURIComponent(t)+"/dvr",kind:d.kinds.PRIMARY}),_owner:null},icon:"plex-icon-shows-broadcast-560",title:(0,u.default)("The Program Guide is empty"),description:(0,u.default)("Please verify your channel mappings and refresh the Program Guide")}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(30),c=n(34),f=s(c),p=n(151),h=s(p);r.propTypes={machineIdentifier:o.PropTypes.string.isRequired,isRefreshing:o.PropTypes.bool.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(11).default,l=n(10).default,u=n(7).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=(d(c),n(24)),p=n(14),h=n(31),v=d(h),g=n(148),m=d(g),y=n(1701),b=d(y),P=n(2099),w=d(P),S="dvrSetup",_=function(e){
function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"onModalClose",decorators:[f.autobind],value:function(){var e=(0,p.resolve)("metrics");e.trackClick(o({},this.props.metricsProperties,{page:S,action:"dismiss"})),this.props.onModalClose()}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.isOpen,r=e.metricsProperties;return{
$$typeof:u,type:m.default,key:null,ref:null,props:l(m.default.defaultProps,{children:{$$typeof:u,type:b.default,key:null,ref:null,props:l(b.default.defaultProps,{serverEntityID:t,onModalClose:this.onModalClose}),_owner:null},className:w.default.modal,isOpen:n,metricsPage:S,metricsProperties:r,onModalClose:this.onModalClose}),_owner:null}}}]),t}(c.Component);_.propTypes={serverEntityID:c.PropTypes.string.isRequired,isOpen:c.PropTypes.bool.isRequired,metricsProperties:c.PropTypes.object.isRequired,
onModalClose:c.PropTypes.func.isRequired},t.default=_,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.step,r=e.setupErrorMessage,l=e.onModalClose,u=s(e,["serverEntityID","step","setupErrorMessage","onModalClose"]);return{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:[{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{children:(0,f.default)("DVR Setup")}),_owner:null},r&&{$$typeof:i,type:"div",
key:null,ref:null,props:{children:[{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{name:"plex-icon-alert-560",className:L.default.errorIcon}),_owner:null},r],className:L.default.errorMessage},_owner:null},n===p.dvrSetupSteps.DEVICE&&{$$typeof:i,type:E.default,key:null,ref:null,props:a(E.default.defaultProps,{serverEntityID:t}),_owner:null},n===p.dvrSetupSteps.DEVICE_CHANNELS&&{$$typeof:i,type:D.default,key:null,ref:null,props:a(D.default.defaultProps,{serverEntityID:t
}),_owner:null},n===p.dvrSetupSteps.EPG&&{$$typeof:i,type:w.default,key:null,ref:null,props:a(w.default.defaultProps,{serverEntityID:t}),_owner:null},n===p.dvrSetupSteps.EPG_MAPPING&&{$$typeof:i,type:_.default,key:null,ref:null,props:a(_.default.defaultProps,{serverEntityID:t}),_owner:null},n===p.dvrSetupSteps.CHANNEL_MAPPING&&{$$typeof:i,type:C.default,key:null,ref:null,props:a(C.default.defaultProps,{serverEntityID:t}),_owner:null},n===p.dvrSetupSteps.EPG_DOWNLOAD&&{$$typeof:i,type:I.default,key:null,
ref:null,props:a(I.default.defaultProps,{serverEntityID:t}),_owner:null},d.default.createElement(O.default,o({serverEntityID:t,onModalClose:l},u))],onModalClose:l}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(5),f=l(c),p=n(207),h=n(36),v=l(h),g=n(105),m=l(g),y=n(113),b=l(y),P=n(1714),w=l(P),S=n(1712),_=l(S),T=n(1710),I=l(T),M=n(1717),C=l(M),x=n(1708),E=l(x),k=n(1706),D=l(k),A=n(1703),O=l(A),R=n(2100),L=l(R);
r.propTypes={serverEntityID:u.PropTypes.string.isRequired,step:u.PropTypes.oneOf([p.dvrSetupSteps.DEVICE,p.dvrSetupSteps.DEVICE_CHANNELS,p.dvrSetupSteps.EPG,p.dvrSetupSteps.EPG_MAPPING,p.dvrSetupSteps.CHANNEL_MAPPING,p.dvrSetupSteps.EPG_DOWNLOAD]).isRequired,setupErrorMessage:u.PropTypes.string,onModalClose:u.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,h.createSelector)(m.default,function(e){return d.default.pick(e,"selectedDevice","step","setupErrorMessage");
})}var a=n(17).default,i=n(18).default,s=n(44).default,o=n(16).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(3),d=l(u),c=n(4),f=l(c),p=n(21),h=n(15),v=n(207),g=n(96),m=l(g),y=n(103),b=n(1700),P=l(b),w={clearDVRSetup:y.clearDVRSetup},S=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"componentWillUnmount",value:function(){this.props.clearDVRSetup()}},{key:"render",value:function(){
return f.default.createElement(P.default,this.props)}}]),t}(c.Component);S.propTypes={serverEntityID:c.PropTypes.string.isRequired,selectedDevice:c.PropTypes.object,step:c.PropTypes.oneOf([v.dvrSetupSteps.DEVICE,v.dvrSetupSteps.DEVICE_CHANNELS,v.dvrSetupSteps.EPG,v.dvrSetupSteps.EPG_MAPPING,v.dvrSetupSteps.CHANNEL_MAPPING,v.dvrSetupSteps.EPG_DOWNLOAD]),clearDVRSetup:c.PropTypes.func.isRequired},t.default=(0,p.connect)(r,w)(S),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.machineIdentifier,n=e.epgProviderIdentifier,r=e.isCancelButtonVisible,s=e.isSaveButtonVisible,o=e.isHideButtonVisible,l=e.isProgramGuideButtonVisible,c=e.isBackButtonVisible,p=e.isNextButtonVisible,v=e.isNextButtonDisabled,m=e.onSavePress,b=e.onPreviousStepPress,P=e.onNextStepPress,w=e.onModalClose,S=encodeURIComponent(t),_=encodeURIComponent(n);
return{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{children:[{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{children:r&&{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:(0,u.default)("Cancel"),kind:d.kinds.DEFAULT,size:d.sizes.MEDIUM,onPress:w}),_owner:null}}),_owner:null},{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{children:[c&&{$$typeof:i,type:g.default,key:null,ref:null,
props:a(g.default.defaultProps,{children:(0,u.default)("Previous"),className:y.default.backButton,kind:d.kinds.DEFAULT,size:d.sizes.MEDIUM,onPress:b}),_owner:null},p&&{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:(0,u.default)("Continue"),kind:d.kinds.PRIMARY,size:d.sizes.MEDIUM,isDisabled:v,onPress:P}),_owner:null},s&&{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:(0,u.default)("Continue"),kind:d.kinds.PRIMARY,size:d.sizes.MEDIUM,
onPress:m}),_owner:null},o&&{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:(0,u.default)("Close"),kind:d.kinds.DEFAULT,size:d.sizes.MEDIUM,onPress:w}),_owner:null},l&&{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:(0,u.default)("View Program Guide"),kind:d.kinds.PRIMARY,size:d.sizes.MEDIUM,to:"#!/server/"+S+"/provider/"+_,isDisabled:!n}),_owner:null}]}),_owner:null}],className:y.default.footer}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(30),c=n(112),f=s(c),p=n(179),h=s(p),v=n(81),g=s(v),m=n(2101),y=s(m);r.propTypes={machineIdentifier:o.PropTypes.string.isRequired,epgProviderIdentifier:o.PropTypes.string,isCancelButtonVisible:o.PropTypes.bool.isRequired,isSaveButtonVisible:o.PropTypes.bool.isRequired,isHideButtonVisible:o.PropTypes.bool.isRequired,isProgramGuideButtonVisible:o.PropTypes.bool.isRequired,isBackButtonVisible:o.PropTypes.bool.isRequired,
isNextButtonVisible:o.PropTypes.bool.isRequired,isNextButtonDisabled:o.PropTypes.bool.isRequired,onPreviousStepPress:o.PropTypes.func.isRequired,onSavePress:o.PropTypes.func.isRequired,onNextStepPress:o.PropTypes.func.isRequired,onModalClose:o.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,v.createSelector)(function(e,t){var n=t.serverEntityID;return n},(0,I.default)(),C.default,function(e,t,n){var r=n.selectedDVR;if(r&&t){var a=r.epgIdentifier,i=(0,
P.default)(y.PROVIDER,a,e);return t.indexOf(i)>-1?a:void 0}})}function a(){return(0,v.createSelector)((0,_.default)(),C.default,r(),function(e,t,n){var r=t.selectedDevice,a=t.step,i=t.epgSettings,s=t.channelScanActivityID,o={machineIdentifier:e.machineIdentifier,isCancelButtonVisible:!0,isSaveButtonVisible:!1,isHideButtonVisible:!1,isProgramGuideButtonVisible:!1,isBackButtonVisible:!1,isNextButtonVisible:!0,isNextButtonDisabled:!0};switch(a){case w.dvrSetupSteps.DEVICE:o.isNextButtonDisabled=!r;break;
case w.dvrSetupSteps.DEVICE_CHANNELS:o.isBackButtonVisible=!0,o.isNextButtonDisabled=!r||!r.channels.length||!!s;break;case w.dvrSetupSteps.EPG:o.isBackButtonVisible=!0,o.isNextButtonDisabled=!i.lineupGroup.lineups.length||i.isFetching;break;case w.dvrSetupSteps.EPG_MAPPING:o.isNextButtonVisible=!1;break;case w.dvrSetupSteps.CHANNEL_MAPPING:o.isBackButtonVisible=!0,o.isSaveButtonVisible=!0,o.isNextButtonVisible=!1;break;case w.dvrSetupSteps.EPG_DOWNLOAD:o.epgProviderIdentifier=n,o.isCancelButtonVisible=!1,
o.isHideButtonVisible=!0,o.isProgramGuideButtonVisible=!0,o.isNextButtonVisible=!1}return o})}var i=n(17).default,s=n(18).default,o=n(25).default,l=n(16).default,u=n(11).default,d=n(1).default,c=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=d(f),h=n(21),v=n(15),g=n(24),m=n(72),y=c(m),b=n(66),P=d(b),w=n(207),S=n(70),_=d(S),T=n(600),I=d(T),M=n(96),C=d(M),x=n(103),E=n(1702),k=d(E),D={dvrSetupNextStep:x.dvrSetupNextStep,dvrSetupPreviousStep:x.dvrSetupPreviousStep,saveDVR:x.saveDVR
},A=function(e){function t(){l(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return s(t,e),o(t,[{key:"onNextStepPress",decorators:[g.autobind],value:function(){this.props.dvrSetupNextStep({serverEntityID:this.props.serverEntityID})}},{key:"onPreviousStepPress",decorators:[g.autobind],value:function(){this.props.dvrSetupPreviousStep({serverEntityID:this.props.serverEntityID})}},{key:"onSavePress",decorators:[g.autobind],value:function(){this.props.saveDVR({
serverEntityID:this.props.serverEntityID,deviceID:this.props.selectedDevice.key})}},{key:"render",value:function(){return p.default.createElement(k.default,u({},this.props,{onNextStepPress:this.onNextStepPress,onPreviousStepPress:this.onPreviousStepPress,onSavePress:this.onSavePress}))}}]),t}(f.Component);A.propTypes={serverEntityID:f.PropTypes.string.isRequired,selectedDevice:f.PropTypes.object,step:f.PropTypes.oneOf([w.dvrSetupSteps.DEVICE,w.dvrSetupSteps.DEVICE_CHANNELS,w.dvrSetupSteps.EPG,w.dvrSetupSteps.EPG_MAPPING,w.dvrSetupSteps.CHANNEL_MAPPING,w.dvrSetupSteps.EPG_DOWNLOAD]),
dvrSetupNextStep:f.PropTypes.func.isRequired,dvrSetupPreviousStep:f.PropTypes.func.isRequired,saveDVR:f.PropTypes.func.isRequired},t.default=(0,h.connect)(a,D)(A),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.identifier,n=e.name;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:"div",key:null,ref:null,props:{children:t,className:l.default.channelIdentifier},_owner:null},{$$typeof:a,type:"div",key:null,ref:null,props:{children:n},_owner:null
}],className:l.default.channel},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(2103)),l=i(o);r.propTypes={identifier:s.PropTypes.string,name:s.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.selectedDevice,r=e.isChannelsPending,o=e.sourceOptions,l=e.channelScanActivity,d=e.onScanDeviceChannelsPress,f=e.onCancelScanDeviceChannelsPress,v=e.onDeviceSourceChange,m=n.selectedSource||n.sources[0],b=l?parseInt(l.response.channels,10):n.channels.length,w=!(b||l||r),_=!(!b||l||r);
return{$$typeof:i,type:T.default,key:null,ref:null,props:a(T.default.defaultProps,{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:[w&&{$$typeof:i,type:"div",key:null,ref:null,props:{children:(0,c.default)("Make sure your device is connected to your antenna or cable and click Scan Channels."),className:k.default.channelMessage},_owner:null},_&&{$$typeof:i,type:"div",key:null,ref:null,props:{children:{$$typeof:i,type:"div",key:null,ref:null,props:{children:(0,c.default)("We found {1} channels. If these don't look right, you can scan again.",b)
},_owner:null},className:k.default.channelMessage},_owner:null},r&&{$$typeof:i,type:"div",key:null,ref:null,props:{children:(0,c.default)("Fetching device channels"),className:k.default.channelMessage},_owner:null},l&&{$$typeof:i,type:"div",key:null,ref:null,props:{children:(0,c.default)("Scanning for channels... This make take some time."),className:k.default.channelMessage},_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:[l&&{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{
children:(0,c.default)("Stop scanning"),className:k.default.deviceChannelScanButton,kind:h.kinds.DEFAULT,size:h.sizes.MEDIUM,onPress:f}),_owner:null},!l&&{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:(0,c.default)("Scan channels"),className:k.default.deviceChannelScanButton,kind:b||r?h.kinds.DEFAULT:h.kinds.PRIMARY,size:h.sizes.MEDIUM,onPress:d}),_owner:null}]},_owner:null}],className:k.default.channelInfo},_owner:null},{$$typeof:i,type:"div",key:null,ref:null,
props:{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:[u.default.createElement(M.default,s({serverEntityID:t,deviceID:n.key,channelCount:b,includeChannelCount:!0},n)),{$$typeof:i,type:P.default,key:null,ref:null,props:a(P.default.defaultProps,{className:k.default.channelScanSourceSelect,name:"deviceSource",value:m,values:o,onChange:v}),_owner:null}],className:k.default.deviceDetails},_owner:null},{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:[w&&{
$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{className:k.default.emptyChannelsClockBackground},_owner:null},{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{className:k.default.emptyChannelsClockTime,name:"plex-icon-dvr-clock-hour-560"}),_owner:null},{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{className:k.default.emptyChannelsClock,
name:"plex-icon-dvr-clock-separator-560"}),_owner:null},{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{className:k.default.emptyChannelsClockTime,name:"plex-icon-dvr-clock-minutes-560"}),_owner:null}],className:k.default.emptyChannelsClockContainer},_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:(0,c.default)("Awaiting channel scan"),className:k.default.emptyMessage},_owner:null}],className:k.default.emptyChannelsContent},_owner:null},_&&n.channels.map(function(e){
return u.default.createElement(x.default,s({key:e.identifier},e))}),l&&{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:S.default,key:null,ref:null,props:a(S.default.defaultProps,{size:90,progress:l.progress}),_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:(0,c.default)("Scanning channels"),className:k.default.emptyMessage},_owner:null}],className:k.default.emptyChannelsContent},_owner:null}],className:_?k.default.deviceChannels:k.default.emptyChannels,
autoScroll:!0}),_owner:null}],className:k.default.channelDetails},_owner:null}],className:k.default.deviceInfoBody,scrollDirection:h.scrollDirections.NONE}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(36),p=o(f),h=n(30),v=n(81),g=o(v),m=n(78),y=o(m),b=n(270),P=o(b),w=n(267),S=o(w),_=n(82),T=o(_),I=n(732),M=o(I),C=n(1704),x=o(C),E=n(2104),k=o(E);r.propTypes={serverEntityID:l.PropTypes.string.isRequired,
selectedDevice:l.PropTypes.object.isRequired,isChannelsPending:l.PropTypes.bool.isRequired,sourceOptions:l.PropTypes.arrayOf(l.PropTypes.object).isRequired,channelScanActivity:l.PropTypes.object,onScanDeviceChannelsPress:l.PropTypes.func.isRequired,onCancelScanDeviceChannelsPress:l.PropTypes.func.isRequired,onDeviceSourceChange:l.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,m.createSelector)((0,I.default)(),_.default,function(e,t){
return p.default.find(e,{uuid:t.channelScanActivityID})})}function a(){return(0,m.createSelector)(_.default,r(),function(e,t){var n=e.selectedDevice,r=n.sources.reduce(function(e,t){switch(t){case"0":e.push(i({},t,(0,b.default)("Antenna")));break;case"1":e.push(i({},t,(0,b.default)("Cable")))}return e},[]);return{selectedDevice:n,isChannelsPending:n.isChannelsPending,sourceOptions:r,channelScanActivity:t}})}var i=n(38).default,s=n(17).default,o=n(18).default,l=n(25).default,u=n(16).default,d=n(11).default,c=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=c(f),h=n(4),v=c(h),g=n(21),m=n(15),y=n(5),b=c(y),P=n(24),w=n(50),S=n(96),_=c(S),T=n(210),I=c(T),M=n(103),C=n(1705),x=c(C),E={fetchDeviceDetails:M.fetchDeviceDetails,fetchDeviceChannels:M.fetchDeviceChannels,scanDeviceChannels:M.scanDeviceChannels,cancelScanDeviceChannels:M.cancelScanDeviceChannels,selectDeviceSource:M.selectDeviceSource},k=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(){this._populate(this.props)}},{key:"_populate",value:function(e){var t=e.serverEntityID;(0,w.scheduleImmediateUpdate)(function(){e.fetchDeviceDetails({serverEntityID:t}),e.fetchDeviceChannels({serverEntityID:t}),e.selectDeviceSource({serverEntityID:t,source:e.selectedDevice.sources[0]})})}},{key:"onScanDeviceChannelsPress",decorators:[P.autobind],value:function(){this.props.scanDeviceChannels({serverEntityID:this.props.serverEntityID});
}},{key:"onCancelScanDeviceChannelsPress",decorators:[P.autobind],value:function(){this.props.cancelScanDeviceChannels({serverEntityID:this.props.serverEntityID})}},{key:"onDeviceSourceChange",decorators:[P.autobind],value:function(e){this.props.selectDeviceSource({serverEntityID:this.props.serverEntityID,source:e})}},{key:"render",value:function(){return v.default.createElement(x.default,d({onScanDeviceChannelsPress:this.onScanDeviceChannelsPress,onCancelScanDeviceChannelsPress:this.onCancelScanDeviceChannelsPress,
onDeviceSourceChange:this.onDeviceSourceChange},this.props))}}]),t}(h.Component);k.propTypes={serverEntityID:h.PropTypes.string.isRequired,selectedDevice:h.PropTypes.object,fetchDeviceDetails:h.PropTypes.func.isRequired,fetchDeviceChannels:h.PropTypes.func.isRequired,scanDeviceChannels:h.PropTypes.func.isRequired,cancelScanDeviceChannels:h.PropTypes.func.isRequired,selectDeviceSource:h.PropTypes.func.isRequired},t.default=(0,g.connect)(a,E)(k),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(11).default,d=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=d(c),p=n(5),h=d(p),v=n(33),g=d(v),m=n(24),y=n(30),b=n(449),P=d(b),w=n(55),S=d(w),_=n(78),T=d(_),I=n(34),M=d(I),C=n(269),x=d(C),E=n(177),k=d(E),D=n(111),A=d(D),O=n(213),R=d(O),L=n(82),N=d(L),j=n(732),U=d(j),$=n(2105),z=d($),F={$$typeof:l,type:S.default,key:null,ref:null,props:o(S.default.defaultProps,{}),_owner:null},B=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={
showManualAddress:!1,manualDeviceAddress:""}}return a(t,e),i(t,[{key:"onShowDeviceAddressPress",decorators:[m.autobind],value:function(){this.setState({showManualAddress:!this.state.showManualAddress})}},{key:"onDeviceAddressChange",decorators:[m.autobind],value:function(e){this.setState({manualDeviceAddress:e})}},{key:"onAddDevicePress",decorators:[m.autobind],value:function(){this.props.onAddDevicePress(this.state.manualDeviceAddress)}},{key:"render",value:function(){var e=this.props,t=e.selectedDevice,n=e.addDevicePending,r=e.devices,a=e.onSelectDevicePress,i=this.state,s=i.showManualAddress,d=i.manualDeviceAddress,c=r.length>0;
return{$$typeof:l,type:N.default,key:null,ref:null,props:o(N.default.defaultProps,{children:[c&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:"div",key:null,ref:null,props:{children:(0,h.default)("We found hardware we recognize!")},_owner:null},className:z.default.message},_owner:null},!c&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:"div",key:null,ref:null,props:{children:(0,h.default)("Looking for compatible devices on your network...")},
_owner:null},className:z.default.message},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:M.default,key:null,ref:null,props:o(M.default.defaultProps,{children:[(0,h.default)("Don't see your device? Enter its network address manually"),{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{className:(0,g.default)(z.default.manualAddressArrow,s&&z.default.manualAddressArrowOpen),direction:s?y.directions.RIGHT:y.directions.DOWN,kind:y.kinds.PRIMARY
}),_owner:null}],kind:y.kinds.PRIMARY,onPress:this.onShowDeviceAddressPress}),_owner:null},className:z.default.manualDeviceButtonContainer},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:s&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:k.default,key:null,ref:null,props:o(k.default.defaultProps,{children:[{$$typeof:l,type:A.default,key:null,ref:null,props:o(A.default.defaultProps,{children:(0,h.default)("Device Address")}),_owner:null},{$$typeof:l,
type:R.default,key:null,ref:null,props:o(R.default.defaultProps,{type:"text",name:"manualDeviceInput",className:z.default.manualDeviceInput,value:this.state.manualDeviceAddress,placeholder:(0,h.default)("IP address or hostname"),onChange:this.onDeviceAddressChange}),_owner:null},{$$typeof:l,type:x.default,key:null,ref:null,props:o(x.default.defaultProps,{children:(0,h.default)("Connect"),className:z.default.addDeviceButton,kind:y.kinds.PRIMARY,size:y.sizes.LARGE,isDisabled:!d,isSpinning:n,onPress:this.onAddDevicePress
}),_owner:null}]}),_owner:null}},_owner:null},className:z.default.manualDeviceContainer},_owner:null},!c&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:F,className:z.default.spinnerContainer},_owner:null},c&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:1===r.length?(0,h.default)("1 device found"):(0,h.default)("{1} devices found",r.length),className:z.default.deviceCount},_owner:null},{$$typeof:l,type:T.default,key:null,
ref:null,props:o(T.default.defaultProps,{children:r.map(function(e){var n=t&&t.key===e.key;return f.default.createElement(U.default,u({key:e.key,className:z.default.device,deviceID:e.key,isSelectable:!0,isSelected:n,includeUri:!0,onSelectDevicePress:a},e))}),className:z.default.devices,scrollDirection:y.scrollDirections.HORIZONTAL}),_owner:null}],className:z.default.existingDevices},_owner:null}]}),_owner:null}}}]),t}(c.Component);B.propTypes={serverEntityID:c.PropTypes.string.isRequired,selectedDevice:c.PropTypes.object,
addDevicePending:c.PropTypes.bool.isRequired,devices:c.PropTypes.arrayOf(c.PropTypes.object).isRequired,onSelectDevicePress:c.PropTypes.func.isRequired,onAddDevicePress:c.PropTypes.func.isRequired},t.default=B,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,v.createSelector)(P.default,T,function(e,t){var n=e.selectedDevice,r=e.addDevicePending;return{selectedDevice:n,addDevicePending:r,devices:t}})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(11).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(3),c=u(d),f=n(4),p=u(f),h=n(21),v=n(15),g=n(24),m=n(50),y=n(431),b=n(96),P=u(b),w=n(103),S=n(1707),_=u(S),T=(0,v.createSelector)(function(e){return e.ui.liveTVSettingsPage.dvrSetup.devices},function(e){return c.default.filter(e,function(e){return!e.parentID&&e.status===y.deviceStatuses.ALIVE&&e.state===y.deviceStates.ENABLED})}),I={fetchDevices:w.fetchDevices,discoverDevices:w.discoverDevices,selectDevice:w.selectDevice,addDevice:w.addDevice
},M=function(e){function t(e){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this._discoverTimeoutID=null,this.discoverDelay=2e3}return i(t,e),s(t,[{key:"componentWillMount",value:function(){this._populate(this.props)}},{key:"componentDidMount",value:function(){this._discoverTimeoutID=setTimeout(this._discoverDevices,this.discoverDelay)}},{key:"componentWillUnmount",value:function(){this._discoverTimeoutID&&clearTimeout(this._discoverTimeoutID)}},{key:"_populate",
value:function(e){(0,m.scheduleImmediateUpdate)(function(){e.fetchDevices({serverEntityID:e.serverEntityID})})}},{key:"_discoverDevices",decorators:[g.autobind],value:function(){this.props.discoverDevices({serverEntityID:this.props.serverEntityID}),this._discoverTimeoutID=setTimeout(this._discoverDevices,this.discoverDelay)}},{key:"onSelectDevicePress",decorators:[g.autobind],value:function(e){this.props.selectDevice({serverEntityID:this.props.serverEntityID,deviceID:e})}},{key:"onAddDevicePress",
decorators:[g.autobind],value:function(e){this.props.addDevice({serverEntityID:this.props.serverEntityID,uri:e})}},{key:"render",value:function(){return p.default.createElement(_.default,l({onSelectDevicePress:this.onSelectDevicePress,onAddDevicePress:this.onAddDevicePress},this.props))}}]),t}(f.Component);M.propTypes={serverEntityID:f.PropTypes.string.isRequired,fetchDevices:f.PropTypes.func.isRequired,discoverDevices:f.PropTypes.func.isRequired,selectDevice:f.PropTypes.func.isRequired,addDevice:f.PropTypes.func.isRequired
},t.default=(0,h.connect)(r,I)(M),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.epgDownloadActivityID,n=e.progress,r=e.message;return{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:(0,u.default)("Setup complete!")},_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:(0,u.default)("You can now find your Program Guide and Recording Schedule in the sidebar under \"Manage\". While we're grabbing the guide data, you can start browsing; it will update automatically as we download what's on.")
},_owner:null}],className:v.default.message},_owner:null},t&&{$$typeof:i,type:"div",key:null,ref:null,props:{children:{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{size:90,progress:n}),_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:r,className:v.default.spinnerMessage},_owner:null}],className:v.default.spinnerContainer},_owner:null}},_owner:null}]}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(267),c=s(d),f=n(82),p=s(f),h=n(2106),v=s(h);r.propTypes={epgDownloadActivityID:o.PropTypes.string,progress:o.PropTypes.number,message:o.PropTypes.string},r.defaultProps={progress:0,message:""},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,u.createSelector)(c.default,(0,p.default)(),function(e,t){var n=t||{},r=n.progress,a=n.subtitle;return{epgDownloadActivityID:e.epgDownloadActivityID,
progress:r,message:a}})}function a(e){return o.default.createElement(v.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(21),u=n(15),d=n(96),c=i(d),f=n(685),p=i(f),h=n(1709),v=i(h);a.propTypes={serverEntityID:s.PropTypes.string.isRequired},t.default=(0,l.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.progress;return{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{children:[{$$typeof:i,
type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:(0,u.default)("We're finding the best program guide for your channels and location.")},_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:(0,u.default)("This should only take a few moments.")},_owner:null}],className:v.default.message},_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{
size:90,progress:t}),_owner:null},className:v.default.spinnerContainer},_owner:null}]}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(267),c=s(d),f=n(82),p=s(f),h=n(2107),v=s(h);r.propTypes={progress:o.PropTypes.number},r.defaultProps={progress:0},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,h.createSelector)(m.default,(0,b.default)(),function(e,t){var n=d.default.find(t,{
uuid:e.epgLineupActivityID}),r=n||{},a=r.progress;return{progress:a}})}var a=n(17).default,i=n(18).default,s=n(44).default,o=n(16).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(3),d=l(u),c=n(4),f=l(c),p=n(21),h=n(15),v=n(50),g=n(96),m=l(g),y=n(210),b=l(y),P=n(103),w=n(1711),S=l(w),_={findBestEPGLineup:P.findBestEPGLineup},T=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"componentWillMount",
value:function(){this._populate(this.props)}},{key:"_populate",value:function(e){(0,v.scheduleImmediateUpdate)(function(){e.findBestEPGLineup({serverEntityID:e.serverEntityID})})}},{key:"render",value:function(){return f.default.createElement(S.default,this.props)}}]),t}(c.Component);T.propTypes={serverEntityID:c.PropTypes.string.isRequired,findBestEPGLineup:c.PropTypes.func.isRequired},t.default=(0,p.connect)(r,_)(T),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(224).default,d=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=d(c),p=n(61),h=d(p),v=n(5),g=d(v),m=n(24),y=n(55),b=d(y),P=n(177),w=d(P),S=n(111),_=d(S),T=n(270),I=d(T),M=n(213),C=d(M),x=n(82),E=d(x),k=n(2108),D=d(k),A=function(e){function t(e){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={postalCode:""}}return a(t,e),i(t,[{key:"componentWillReceiveProps",value:function(e){this.state.postalCode!==e.postalCode&&this.setState({postalCode:e.postalCode})}},{
key:"focusInput",decorators:[m.autobind],value:function(e){e&&h.default.findDOMNode(e).focus()}},{key:"onCountrySelect",decorators:[m.autobind],value:function(e){this.props.onCountrySelect(e),this.setState({postalCode:""})}},{key:"onLanguageSelect",decorators:[m.autobind],value:function(e){this.props.onLanguageSelect(e)}},{key:"onRegionSelect",decorators:[m.autobind],value:function(e){this.props.onRegionSelect(e)}},{key:"onPostalCodeChange",decorators:[m.autobind],value:function(e){var t=this;this.setState({
postalCode:e},function(){t.props.onPostalCodeChange(e)})}},{key:"render",value:function(){var e=this.props,t=e.isFetching,n=e.selectedCountryCode,r=e.selectedLanguageCode,a=e.selectedRegionCode,i=e.countryOptions,s=e.languageOptions,d=e.regionOptions,c=e.countriesPopulated,p=e.languagesPopulated,h=e.regionsPopulated,v=e.postalCodeExample,m=this.state.postalCode,y=!(!c||!p),P=!(!p||!v),S=!(!p||!h),T=[{"":(0,g.default)("Select Country")}].concat(u(i)),M=[{"":(0,g.default)("Select Language")}].concat(u(s)),x=[{
"":(0,g.default)("Select Region")}].concat(u(d));return{$$typeof:l,type:E.default,key:null,ref:null,props:o(E.default.defaultProps,{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:"div",key:null,ref:null,props:{children:(0,g.default)("To download an electronic program guide we need to know your location.")},_owner:null},className:D.default.message},_owner:null},c&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:[{$$typeof:l,
type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{children:(0,g.default)("Country")}),_owner:null},{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{name:"countrySelect",values:T,value:n,onChange:this.onCountrySelect}),_owner:null}]}),_owner:null},y&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:[{$$typeof:l,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{children:(0,g.default)("Language")}),_owner:null
},{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{name:"languageSelect",values:M,value:r,onChange:this.onLanguageSelect}),_owner:null}]}),_owner:null},P&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:[{$$typeof:l,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{children:(0,g.default)("Postal Code")}),_owner:null},f.default.createElement(C.default,{ref:this.focusInput,name:"postalCodeInput",placeholder:"e.g. "+v,value:m,
onChange:this.onPostalCodeChange}),t&&{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{className:D.default.postalCodeFetchingSpinner}),_owner:null}]}),_owner:null},S&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:[{$$typeof:l,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{children:(0,g.default)("Region")}),_owner:null},{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{name:"regionSelect",
values:x,value:a,onChange:this.onRegionSelect}),_owner:null}]}),_owner:null}]}),_owner:null}}}]),t}(c.Component);A.propTypes={countryCode:c.PropTypes.string,isFetching:c.PropTypes.bool.isRequired,postalCodeExample:c.PropTypes.string,postalCode:c.PropTypes.string,selectedCountryCode:c.PropTypes.string,selectedLanguageCode:c.PropTypes.string,selectedRegionCode:c.PropTypes.string,countryOptions:c.PropTypes.arrayOf(c.PropTypes.object),languageOptions:c.PropTypes.arrayOf(c.PropTypes.object),regionOptions:c.PropTypes.arrayOf(c.PropTypes.object),
countriesPopulated:c.PropTypes.bool.isRequired,languagesPopulated:c.PropTypes.bool.isRequired,regionsPopulated:c.PropTypes.bool.isRequired,fetchEPGCountries:c.PropTypes.func.isRequired,onCountrySelect:c.PropTypes.func.isRequired,onLanguageSelect:c.PropTypes.func.isRequired,onRegionSelect:c.PropTypes.func.isRequired,onPostalCodeChange:c.PropTypes.func.isRequired},t.default=A,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,v.createSelector)((0,b.default)(),w.default,function(e,t){
var n=t.epgSettings,r=n.isFetching,i=n.postalCode,s=n.selectedCountry,o=n.selectedLanguage,l=n.selectedRegion,u=n.countries,d=n.languages,c=n.regions,f=s&&1===s.flavor?s.example:null,p=s?s.code:"",h=o?o.code:"",v=l?l.key:"",g=u.length>0,m=d.length>0,y=c.length>0,b=u.reduce(function(e,t){return e.push(a({},t.code,t.title)),e},[]),P=d.reduce(function(e,t){return e.push(a({},t.code,t.title)),e},[]),w=c.reduce(function(e,t){return e.push(a({},t.key,t.title)),e},[]);return{countryCode:e.countryCode,selectedCountryCode:p,
selectedLanguageCode:h,selectedRegionCode:v,countriesPopulated:g,languagesPopulated:m,regionsPopulated:y,countryOptions:b,languageOptions:P,regionOptions:w,isFetching:r,postalCode:i,postalCodeExample:f}})}var a=n(38).default,i=n(17).default,s=n(18).default,o=n(25).default,l=n(16).default,u=n(11).default,d=n(1).default,c=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=d(f),h=n(21),v=n(15),g=n(50),m=n(24),y=n(70),b=d(y),P=n(96),w=d(P),S=n(1713),_=d(S),T=n(680),I=c(T),M=function(e){
function t(){l(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return s(t,e),o(t,[{key:"componentWillMount",value:function(){this._populate(this.props)}},{key:"_populate",value:function(e){(0,g.scheduleImmediateUpdate)(function(){var t=e.serverEntityID;e.resetEPGSettings({serverEntityID:t}),e.fetchEPGCountries({serverEntityID:t}),e.fetchEPGLanguages({serverEntityID:t})})}},{key:"onCountrySelect",decorators:[m.autobind],value:function(e){this.props.selectEPGCountry({
serverEntityID:this.props.serverEntityID,countryCode:e})}},{key:"onLanguageSelect",decorators:[m.autobind],value:function(e){this.props.selectEPGLanguage({serverEntityID:this.props.serverEntityID,languageCode:e})}},{key:"onRegionSelect",decorators:[m.autobind],value:function(e){this.props.selectEPGRegion({serverEntityID:this.props.serverEntityID,regionKey:e})}},{key:"onPostalCodeChange",decorators:[m.autobind],value:function(e){this.props.setEPGPostalCode({serverEntityID:this.props.serverEntityID,
postalCode:e})}},{key:"render",value:function(){return p.default.createElement(_.default,u({onCountrySelect:this.onCountrySelect,onLanguageSelect:this.onLanguageSelect,onRegionSelect:this.onRegionSelect,onPostalCodeChange:this.onPostalCodeChange},this.props))}}]),t}(f.Component);M.propTypes={serverEntityID:f.PropTypes.string.isRequired,selectEPGCountry:f.PropTypes.func.isRequired,selectEPGLanguage:f.PropTypes.func.isRequired,selectEPGRegion:f.PropTypes.func.isRequired,setEPGPostalCode:f.PropTypes.func.isRequired,
resetEPGSettings:f.PropTypes.func.isRequired,fetchEPGCountries:f.PropTypes.func.isRequired,fetchEPGLanguages:f.PropTypes.func.isRequired},t.default=(0,h.connect)(r,I)(M),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=c(e).sort(function(e,t){return e===t?0:parseFloat(e,10)>parseFloat(t,10)?1:-1});return t.reduce(function(t,n){return t.push(a({},n,e[n])),t},[{"":(0,m.default)("Select Channel")}])}var a=n(38).default,i=n(17).default,s=n(18).default,o=n(25).default,l=n(16).default,u=n(7).default,d=n(10).default,c=n(79).default,f=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var p=n(4),h=(f(p),n(33)),v=f(h),g=n(5),m=f(g),y=n(24),b=n(31),P=f(b),w=n(30),S=n(720),_=f(S),T=n(270),I=f(T),M=n(2109),C=f(M),x=function(e){function t(e,n){l(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={showSelectOptions:!1}}return s(t,e),o(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,P.default)(this,e,t)}},{key:"onSelectPress",decorators:[y.autobind],value:function(e){this.setState({showSelectOptions:!0
})}},{key:"render",value:function(){var e=this.props,t=e.deviceIdentifier,n=e.enabled,i=e.name,s=e.lineupIdentifier,o=e.lineupChannels,l=e.onDeviceChannelEnabledChange,c=e.onLineupChannelChange;return{$$typeof:u,type:"div",key:null,ref:null,props:{children:[{$$typeof:u,type:"div",key:null,ref:null,props:{children:[{$$typeof:u,type:"div",key:null,ref:null,props:{children:{$$typeof:u,type:_.default,key:null,ref:null,props:d(_.default.defaultProps,{name:t+"Check",value:n,onChange:l}),_owner:null},className:C.default.channelEnabled
},_owner:null},{$$typeof:u,type:"label",key:null,ref:null,props:{children:t,className:(0,v.default)(C.default.deviceIdentifier,!n&&C.default.mappingDisabled),htmlFor:t+"Check"},_owner:null},{$$typeof:u,type:"div",key:null,ref:null,props:{children:i,className:(0,v.default)(C.default.channelName,!n&&C.default.mappingDisabled)},_owner:null}],className:C.default.deviceInfo},_owner:null},n&&{$$typeof:u,type:"div",key:null,ref:null,props:{children:{$$typeof:u,type:I.default,key:null,ref:null,props:d(I.default.defaultProps,{
name:i+"Select",value:s,values:this.state.showSelectOptions?r(o):[a({},s,o[s])],size:w.sizes.SMALL,onMouseDown:this.onSelectPress,onTouchStart:this.onSelectPress,onChange:c}),_owner:null},className:C.default.epgChannel},_owner:null}],className:C.default.channelMapping},_owner:null}}}]),t}(p.Component);x.propTypes={deviceIdentifier:p.PropTypes.string.isRequired,enabled:p.PropTypes.bool.isRequired,name:p.PropTypes.string,lineupIdentifier:p.PropTypes.string,lineupChannels:p.PropTypes.object.isRequired,
onDeviceChannelEnabledChange:p.PropTypes.func.isRequired,onLineupChannelChange:p.PropTypes.func.isRequired},x.defaultProps={lineupIdentifier:""},t.default=x,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(5),p=u(f),h=n(24),v=n(31),g=u(v),m=n(30),y=n(78),b=u(y),P=n(55),w=u(P),S=n(268),_=u(S),T=n(82),I=u(T),M=n(1718),C=u(M),x=n(734),E=u(x),k=n(733),D=u(k),A=n(2110),O=u(A),R={
$$typeof:l,type:E.default,key:null,ref:null,props:o(E.default.defaultProps,{}),_owner:null},L=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isLineupsMenuOpen:!1}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"onLineupsMenuButtonPress",decorators:[h.autobind],value:function(){this.setState({isLineupsMenuOpen:!this.state.isLineupMenuOpen})}},{key:"onLineupsMenuClose",
decorators:[h.autobind],value:function(){this.setState({isLineupsMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.selectedLineup,r=e.availableLineups,a=e.channelMappings,i=e.isChannelMappingsPending,s=e.isLineupChannelsPending,u=e.channelMappingsError,d=e.lineupChannelsError,f=e.onLineupSelect,h=u||d,v=i||s;return h?{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{children:{$$typeof:l,type:"div",key:null,ref:null,props:{children:(0,
p.default)("Unable to load channel mappings"),className:O.default.centeredContainer},_owner:null},className:O.default.channelMappingsBody,scrollDirection:m.scrollDirections.NONE}),_owner:null}:{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{children:[n&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:(0,p.default)("This seems like the best lineup. If everything looks good, let's continue."),className:O.default.message},_owner:null},!n&&{$$typeof:l,type:"div",
key:null,ref:null,props:{children:(0,p.default)("We couldn't determine the best lineup automatically, please select a lineup."),className:O.default.message},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:[c.default.createElement(_.default,{ref:"lineupsMenuButton",className:O.default.lineupsMenuButton,onPress:this.onLineupsMenuButtonPress},n?n.title:(0,p.default)("Select Lineup")),{$$typeof:l,type:C.default,key:null,ref:null,props:o(C.default.defaultProps,{target:this.refs.lineupsMenuButton,
isOpen:this.state.isLineupsMenuOpen,selectedLineupID:n?n.uuid:void 0,availableLineups:r,onMenuClose:this.onLineupsMenuClose,onLineupSelect:f}),_owner:null}],className:O.default.lineupInfo},_owner:null},v&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{label:(0,p.default)("Loading channel mappings")}),_owner:null},className:O.default.centeredContainer},_owner:null},!v&&{$$typeof:l,type:b.default,key:null,ref:null,
props:o(b.default.defaultProps,{children:[R,a.map(function(e){return{$$typeof:l,type:D.default,key:e.deviceIdentifier,ref:null,props:o(D.default.defaultProps,{serverEntityID:t,deviceIdentifier:e.deviceIdentifier}),_owner:null}})],className:O.default.scroller,autoScroll:!0}),_owner:null}],className:O.default.channelMappingsBody,scrollDirection:m.scrollDirections.NONE}),_owner:null}}}]),t}(d.Component);L.propTypes={serverEntityID:d.PropTypes.string.isRequired,selectedLineup:d.PropTypes.object,availableLineups:d.PropTypes.arrayOf(d.PropTypes.object),
channelMappings:d.PropTypes.arrayOf(d.PropTypes.object).isRequired,isChannelMappingsPending:d.PropTypes.bool,isLineupChannelsPending:d.PropTypes.bool,channelMappingsError:d.PropTypes.object,lineupChannelsError:d.PropTypes.object,onLineupSelect:d.PropTypes.func},t.default=L,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,p.createSelector)(m.default,function(e){var t=e.selectedDevice,n=e.selectedLineup,r=e.channelMappings,a=e.isChannelMappingsPending,i=e.isLineupChannelsPending,s=e.channelMappingsError,o=e.lineupChannelsError,l=e.epgSettings.lineupGroup.lineups;
return{selectedDevice:t,selectedLineup:n,availableLineups:l,channelMappings:r,isChannelMappingsPending:a,isLineupChannelsPending:i,channelMappingsError:s,lineupChannelsError:o}})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(11).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(21),p=n(15),h=n(50),v=n(24),g=n(96),m=u(g),y=n(103),b=n(1716),P=u(b),w={fetchLineupChannels:y.fetchLineupChannels,fetchChannelMap:y.fetchChannelMap,selectEPGLineup:y.selectEPGLineup,
enableDeviceChannel:y.enableDeviceChannel,updateChannelMapping:y.updateChannelMapping},S=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"componentWillMount",value:function(){this._populate(this.props)}},{key:"_populate",value:function(e){var t=e.serverEntityID,n=e.selectedDevice.uuid,r=e.selectedLineup.uuid;(0,h.scheduleImmediateUpdate)(function(){e.fetchLineupChannels({serverEntityID:t,lineupUUID:r}),e.fetchChannelMap({
serverEntityID:t,deviceUUID:n,lineupUUID:r,forceEnabled:!0})})}},{key:"onLineupSelect",decorators:[v.autobind],value:function(e){var t=this.props,n=t.serverEntityID,r=t.selectedDevice;this.props.selectEPGLineup({serverEntityID:n,lineupUUID:e}),this.props.fetchLineupChannels({serverEntityID:n,lineupUUID:e}),this.props.fetchChannelMap({serverEntityID:n,deviceUUID:r.uuid,lineupUUID:e,forceEnabled:!0})}},{key:"render",value:function(){return c.default.createElement(P.default,l({onLineupSelect:this.onLineupSelect
},this.props))}}]),t}(d.Component);S.propTypes={serverEntityID:d.PropTypes.string.isRequired,selectedDevice:d.PropTypes.object.isRequired,fetchLineupChannels:d.PropTypes.func.isRequired,fetchChannelMap:d.PropTypes.func.isRequired,selectEPGLineup:d.PropTypes.func.isRequired},t.default=(0,f.connect)(r,w)(S),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(19).default,d=n(11).default,c=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=c(f),h=n(5),v=c(h),g=n(24),m=n(104),y=c(m),b=n(126),P=c(b),w=n(2112),S=c(w),_="selected",T=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"onLineupSelect",decorators:[g.autobind],value:function(e){this.props.onLineupSelect(e.currentTarget.id)}},{key:"render",value:function(){var e=this,t=this.props,n=t.selectedLineupID,r=t.availableLineups,a=u(t,["selectedLineupID","availableLineups"]);
return p.default.createElement(y.default,d({className:S.default.menu},a),!n&&{$$typeof:l,type:P.default,key:_,ref:null,props:o(P.default.defaultProps,{children:(0,v.default)("Select Lineup"),isSelected:!0}),_owner:null},r.map(function(t){return{$$typeof:l,type:P.default,key:t.uuid,ref:null,props:o(P.default.defaultProps,{children:t.title,id:t.uuid,title:t.title,isSelected:n===t.uuid,onPress:e.onLineupSelect}),_owner:null}}))}}]),t}(f.Component);T.propTypes={selectedLineupID:f.PropTypes.string,availableLineups:f.PropTypes.array.isRequired,
onLineupSelect:f.PropTypes.func.isRequired},T.defaultProps={selectedLineupID:_},t.default=T,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,p.createSelector)((0,y.default)(),(0,P.default)(),(0,S.default)(),function(e,t,n){var r=u.default.pick(n,"hubIdentifier","title","type","size","more","random");return i({machineIdentifier:e.machineIdentifier,providerIdentifier:t.identifier},r,{metadataListEntityID:n.metadataList,containerKey:n.key})})}function a(e){var t=e.title,n=e.hubIdentifier,r=e.type,a=e.containerKey,s=e.machineIdentifier,o=e.providerIdentifier,l=n.indexOf("music.video")!==-1?"musicVideo":r,u="home.continue"===n?T.default.CONTINUE_WATCHING:T.default.LIBRARY,d=void 0;
if(a&&u!==T.default.CONTINUE_WATCHING){var f=encodeURIComponent(s),p=encodeURIComponent(o),h=o===g.providerIdentifiers.LIBRARY_PROVIDER_IDENTIFIER?"server/"+f:"server/"+f+"/provider/"+p;d=v.join(["#!",h,"list"],{key:a,type:l,title:t})}return c.default.createElement(M.default,i({listType:l,listContext:u,hubLink:d,component:x.default},e))}var i=n(11).default,s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=s(l),d=n(4),c=s(d),f=n(21),p=n(15),h=n(26),v=o(h),g=n(84),m=n(70),y=s(m),b=n(100),P=s(b),w=n(1068),S=s(w),_=n(114),T=s(_),I=n(337),M=s(I),C=n(1720),x=s(C);
a.propTypes={serverEntityID:d.PropTypes.string.isRequired,hubEntityID:d.PropTypes.string.isRequired,hubIdentifier:d.PropTypes.string.isRequired,type:d.PropTypes.string.isRequired,title:d.PropTypes.string.isRequired,containerKey:d.PropTypes.string,machineIdentifier:d.PropTypes.string.isRequired,providerIdentifier:d.PropTypes.string.isRequired},t.default=(0,f.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.metadataListEntityID,s=e.metadataItemEntityIDs,o=e.listType,u=e.listContext,d=e.columnAdjustment,c=e.populatedRange,p=a(e,["serverEntityID","providerEntityID","metadataListEntityID","metadataItemEntityIDs","listType","listContext","columnAdjustment","populatedRange"]),v=(0,
f.default)(o,u,{providerEntityID:n});return l.default.createElement(y.default,i({},p,{listType:o,listContext:u,keyPropName:"metadataItemEntityID",items:s,itemsOffset:c.start,layout:(0,h.default)(o,u,d,v.length),cellRenderer:(0,g.default)({serverEntityID:t,providerEntityID:n,metadataListEntityID:r,listType:o,listContext:u,titleComponents:v},P.default)}))}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(428),d=s(u),c=n(278),f=s(c),p=n(486),h=s(p),v=n(781),g=s(v),m=n(458),y=s(m),b=n(459),P=s(b);
r.propTypes={serverEntityID:o.PropTypes.string.isRequired,providerEntityID:o.PropTypes.string.isRequired,metadataListEntityID:o.PropTypes.string.isRequired,metadataItemEntityIDs:o.PropTypes.array.isRequired,listType:o.PropTypes.string.isRequired,listContext:o.PropTypes.string.isRequired,columnAdjustment:o.PropTypes.number.isRequired,populatedRange:d.default},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.serverEntityID,r=e.providerEntityID,l=e.metadataItemEntityID,u=e.searchResultEntityID,c=(e.cellIndex,
e.cellX),p=e.cellY,v=e.cellWidth,g=e.cellHeight,m=e.showScrollPlaceholder,b=e.showOffscreenPlaceholder,w=e.listType,_=e.listContext,I=e.titleComponents,C=e.isLoading,x=e.isContinueWatching,E=e.metadataKey,k=e.type,D=e.selectionType,A=e.activeSelectionType,O=e.isSelected,R=e.imageWidth,L=e.imageHeight,N=e.imageUrl,j=e.onSelectItem,U=e.onDeselectItem,$=s(e,["className","serverEntityID","providerEntityID","metadataItemEntityID","searchResultEntityID","cellIndex","cellX","cellY","cellWidth","cellHeight","showScrollPlaceholder","showOffscreenPlaceholder","listType","listContext","titleComponents","isLoading","isContinueWatching","metadataKey","type","selectionType","activeSelectionType","isSelected","imageWidth","imageHeight","imageUrl","onSelectItem","onDeselectItem"]),z=C||m,F="mixed"===w?(0,
h.default)(k,_).concat(I):I;return{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:[z?{$$typeof:i,type:S.default,key:null,ref:null,props:a(S.default.defaultProps,{imageWidth:R,imageHeight:L,activeSelectionType:A,isSelected:O}),_owner:null}:d.default.createElement(P.default,o({serverEntityID:n,providerEntityID:r,metadataItemEntityID:l,listContext:_,metadataKey:E,type:k,imageWidth:R,imageHeight:L,imageUrl:N,selectionType:D,activeSelectionType:A,isSelected:O,isOffscreen:b,
onSelectItem:j,onDeselectItem:U},$)),{$$typeof:i,type:"div",key:null,ref:null,props:{children:C?(0,f.default)("Loading..."):F.map(function(e,t){return{$$typeof:i,type:T.default,key:t,ref:null,props:a(T.default.defaultProps,{serverEntityID:n,providerEntityID:r,metadataItemEntityID:l,searchResultEntityID:u,component:e,isSecondary:t>0,isSplitLeft:x&&0===t,isSplitRight:x&&1===t}),_owner:null}}),className:x?M.default.continueWatchingTitleContainer:M.default.titleContainer},_owner:null}],className:t,cellX:c,
cellY:p,cellWidth:v,cellHeight:g}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(5),f=l(c),p=n(278),h=l(p),v=n(250),g=l(v),m=n(249),y=l(m),b=n(739),P=l(b),w=n(1743),S=l(w),_=n(461),T=l(_),I=n(2114),M=l(I);r.propTypes={className:u.PropTypes.string,serverEntityID:u.PropTypes.string.isRequired,providerEntityID:u.PropTypes.string.isRequired,metadataItemEntityID:u.PropTypes.string,searchResultEntityID:u.PropTypes.string,
cellIndex:u.PropTypes.number.isRequired,cellX:u.PropTypes.number.isRequired,cellY:u.PropTypes.number.isRequired,cellWidth:u.PropTypes.number.isRequired,cellHeight:u.PropTypes.number.isRequired,showScrollPlaceholder:u.PropTypes.bool,showOffscreenPlaceholder:u.PropTypes.bool,listType:u.PropTypes.string,listContext:u.PropTypes.string,titleComponents:u.PropTypes.array.isRequired,isLoading:u.PropTypes.bool,isContinueWatching:u.PropTypes.bool,metadataKey:u.PropTypes.string,type:u.PropTypes.string.isRequired,
selectionType:u.PropTypes.string,activeSelectionType:u.PropTypes.string,isSelected:u.PropTypes.bool,imageWidth:u.PropTypes.number,imageHeight:u.PropTypes.number,imageUrl:u.PropTypes.oneOfType([u.PropTypes.func,u.PropTypes.string]),onSelectItem:u.PropTypes.func,onDeselectItem:u.PropTypes.func},t.default=(0,g.default)(r),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var d=n(4),c=(u(d),n(31)),f=u(c),p=n(36),h=u(p),v=n(250),g=u(v),m=n(249),y=u(m),b=n(34),P=u(b),w=n(452),S=u(w),_=n(2115),T=u(_),I={$$typeof:l,type:h.default,key:null,ref:null,props:o(h.default.defaultProps,{name:"plex-icon-clips-560"}),_owner:null},M=function(e){function t(){s(this,n),r(Object.getPrototypeOf(n.prototype),"constructor",this).apply(this,arguments)}a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,f.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.cellX,n=e.cellY,r=e.cellWidth,a=e.cellHeight,i=e.metadataKey,s=e.machineIdentifier,u=e.type,d=e.title,c=e.url,f=e.showOffscreenPlaceholder,p="photoAlbum"===u,h="clip"===u,v=encodeURIComponent(s),g=encodeURIComponent(i);
return{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{children:{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:[!f&&{$$typeof:l,type:S.default,key:i,ref:null,props:o(S.default.defaultProps,{url:c,width:r,height:a}),_owner:null},h&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:I,className:T.default.badge},_owner:null}],className:T.default.image
},_owner:null},p?{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:{$$typeof:l,type:"span",key:null,ref:null,props:{children:d,className:T.default.albumTitle},_owner:null},className:T.default.albumLink,to:"#!/server/"+v+"/details/"+g}),_owner:null}:{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{className:T.default.photoLink,onPress:this.props.onPlayPress}),_owner:null}],className:T.default.photo},_owner:null},className:T.default.photoContainer
},_owner:null},cellX:t,cellY:n,cellWidth:r,cellHeight:a}),_owner:null}}}]);var n=t;return t=(0,g.default)(t)||t}(d.Component);M.propTypes={type:d.PropTypes.string.isRequired,title:d.PropTypes.string,metadataKey:d.PropTypes.string.isRequired,machineIdentifier:d.PropTypes.string.isRequired,cellX:d.PropTypes.number.isRequired,cellY:d.PropTypes.number.isRequired,cellWidth:d.PropTypes.number.isRequired,cellHeight:d.PropTypes.number.isRequired,showOffscreenPlaceholder:d.PropTypes.bool,url:d.PropTypes.func,
onPlayPress:d.PropTypes.func},t.default=M,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,p.createSelector)((0,v.default)(),(0,m.default)(),function(e,t){void 0===e&&(e={});var n=t.machineIdentifier,r=e.key,a=e.type,i=e.title,s=e.thumbTranscodeUrl;return{metadataKey:r,type:a,title:i,url:s,machineIdentifier:n}})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(11).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(21),p=n(15),h=n(48),v=u(h),g=n(70),m=u(g),y=n(24),b=n(255),P=n(1722),w=u(P),S=function(e){
function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(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 c.default.createElement(w.default,l({onPlayPress:this.onPlayPress},this.props))}}]),t}(d.Component);S.propTypes={serverEntityID:d.PropTypes.string.isRequired,
metadataItemEntityID:d.PropTypes.string,playMetadataItem:d.PropTypes.func.isRequired},t.default=(0,f.connect)(r,{playMetadataItem:b.playMetadataItem})(S),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(19).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=(d(c),n(5)),p=d(f),h=n(24),v=n(31),g=d(v),m=n(454),y=d(m),b=n(147),P=d(b),w=function(e){function t(){s(this,t),
r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"_getActionPayload",value:function(){return{metadataListEntityID:this.props.metadataListEntityID}}},{key:"onPlayAllPress",decorators:[h.autobind],value:function(e){this.props.playMetadataList(this._getActionPayload())}},{key:"onShufflePress",decorators:[h.autobind],value:function(e){this.props.shuffleMetadataList(this._getActionPayload());
}},{key:"onAddToPlaylistPress",decorators:[h.autobind],value:function(e){this.props.addMetadataListToPlaylist(this._getActionPayload())}},{key:"onSyncPress",decorators:[h.autobind],value:function(e){this.props.syncMetadataList(this._getActionPayload())}},{key:"onOptimizePress",decorators:[h.autobind],value:function(e){this.props.optimizeMetadataList(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"]);
return{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{children:[a.showPlayAll&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,p.default)("Play All"),onPress:this.onPlayAllPress}),_owner:null},a.showShuffle&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,p.default)("Shuffle"),onPress:this.onShufflePress}),_owner:null},a.showAddToPlaylist&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{
children:(0,p.default)("Add to Playlist..."),onPress:this.onAddToPlaylistPress}),_owner:null},a.showSync&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,p.default)("Sync..."),onPress:this.onSyncPress}),_owner:null},a.showOptimize&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,p.default)("Optimize..."),onPress:this.onOptimizePress}),_owner:null}],target:t,isOpen:n,onMenuClose:r}),_owner:null}}}]),t}(c.Component);w.propTypes={
metadataListEntityID:c.PropTypes.string.isRequired,target:c.PropTypes.object,isOpen:c.PropTypes.bool.isRequired,onMenuClose:c.PropTypes.func.isRequired,showPlayAll:c.PropTypes.bool,showShuffle:c.PropTypes.bool,showAddToPlaylist:c.PropTypes.bool,showSync:c.PropTypes.bool,showOptimize:c.PropTypes.bool,playMetadataList:c.PropTypes.func,shuffleMetadataList:c.PropTypes.func,addMetadataListToPlaylist:c.PropTypes.func,syncMetadataList:c.PropTypes.func,optimizeMetadataList:c.PropTypes.func},t.default=w,e.exports=t.default;
},function(e,t,n){"use strict";function r(e){var t=e.summary,n=e.error,r=e.mediaItem,o=e.hasSubscription,l=e.isComplete,u=e.hasError,f=e.isRecording,h=e.recordingProgress,g=e.onRecordingModify,y=e.onModalClose,P=s(e,["summary","error","mediaItem","hasSubscription","isComplete","hasError","isRecording","recordingProgress","onRecordingModify","onModalClose"]),S=r.beginsAt,T=r.endsAt,M=r.startOffsetSeconds,x=r.endOffsetSeconds,k=r.channelTitle,A=!(!M&&!x),R=M&&Math.round(M/60),N=x&&Math.round(x/60);return{
$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{children:[{$$typeof:i,type:w.default,key:null,ref:null,props:a(w.default.defaultProps,{children:(0,d.default)("Airing Details")}),_owner:null},{$$typeof:i,type:_.default,key:null,ref:null,props:a(_.default.defaultProps,{children:{$$typeof:i,type:O.default,key:null,ref:null,props:a(O.default.defaultProps,{children:[{$$typeof:i,type:E.default,key:null,ref:null,props:a(E.default.defaultProps,{children:{$$typeof:i,type:D.default,
key:null,ref:null,props:a(D.default.defaultProps,{children:{$$typeof:i,type:"div",key:null,ref:null,props:{children:[l&&{$$typeof:i,type:"span",key:null,ref:null,props:{children:[{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{className:L.default.completeIcon,name:"plex-icon-selected-560"}),_owner:null},(0,d.default)("Recorded successfully")]},_owner:null},f&&{$$typeof:i,type:"span",key:null,ref:null,props:{children:[{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{
className:L.default.recordingIcon,name:"plex-icon-dvr-single-560"}),_owner:null},(0,d.default)("Recording"),{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{className:L.default.separator}),_owner:null},(0,d.default)("{1}% complete",h)]},_owner:null},u&&{$$typeof:i,type:"span",key:null,ref:null,props:{children:[{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{className:L.default.errorIcon,name:"plex-icon-alert-560"}),_owner:null},n]},_owner:null
},!l&&!f&&!u&&A&&{$$typeof:i,type:"span",key:null,ref:null,props:{children:R?{$$typeof:i,type:"span",key:null,ref:null,props:{children:[(0,d.default)("Recording starts {1} min early",R),!!N&&{$$typeof:i,type:"span",key:null,ref:null,props:{children:[{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{className:L.default.separator}),_owner:null},(0,d.default)("Ends {1} min late",N)]},_owner:null}]},_owner:null}:{$$typeof:i,type:"span",key:null,ref:null,props:{children:(0,d.default)("Recording ends {1} min late",N)
},_owner:null}},_owner:null}]},_owner:null},beginsAt:S,endsAt:T,channel:k,showFullTime:!0,showChannel:!0}),_owner:null},mediaItem:r}),_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:t,className:L.default.summary},_owner:null}],target:P}),_owner:null}}),_owner:null},{$$typeof:i,type:I.default,key:null,ref:null,props:a(I.default.defaultProps,{children:{$$typeof:i,type:C.default,key:null,ref:null,props:a(C.default.defaultProps,{children:[o&&{$$typeof:i,type:m.default,key:null,ref:null,
props:a(m.default.defaultProps,{children:(0,d.default)("Modify Recording"),kind:c.kinds.DEFAULT,size:c.sizes.MEDIUM,onPress:g}),_owner:null},{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:(0,d.default)("Close"),kind:c.kinds.PRIMARY,size:c.sizes.MEDIUM,onPress:y}),_owner:null}]}),_owner:null}}),_owner:null}],onModalClose:y}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=(o(l),
n(5)),d=o(u),c=n(30),f=n(36),p=o(f),h=n(125),v=o(h),g=n(81),m=o(g),y=n(105),b=o(y),P=n(113),w=o(P),S=n(82),_=o(S),T=n(112),I=o(T),M=n(179),C=o(M),x=n(482),E=o(x),k=n(766),D=o(k),A=n(338),O=o(A),R=n(2116),L=o(R);r.propTypes={summary:l.PropTypes.string,error:l.PropTypes.string,mediaItem:l.PropTypes.shape({beginsAt:l.PropTypes.number.isRequired,endsAt:l.PropTypes.number.isRequired,startOffsetSeconds:l.PropTypes.number,endOffsetSeconds:l.PropTypes.number,channelTitle:l.PropTypes.string.isRequired}).isRequired,
hasSubscription:l.PropTypes.bool.isRequired,isComplete:l.PropTypes.bool.isRequired,hasError:l.PropTypes.bool.isRequired,isRecording:l.PropTypes.bool.isRequired,recordingProgress:l.PropTypes.number,onRecordingModify:l.PropTypes.func.isRequired,onModalClose:l.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,c.createSelector)((0,p.default)(),function(e){return o.default.pick(e,"type","title","parentTitle","grandparentTitle","thumbTranscodeUrl","parentThumbTranscodeUrl","grandparentThumbTranscodeUrl","index","parentIndex","originallyAvailableAt","summary");
})}function a(e){return u.default.createElement(v.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(4),u=i(l),d=n(21),c=n(15),f=n(48),p=i(f),h=n(1725),v=i(h);a.propTypes={metadataItemEntityID:l.PropTypes.string.isRequired},t.default=(0,d.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){switch(e){case"movie":return[f.default];case"show":return[f.default];case"episode":return[h.default,g.default];case"playlist":return[f.default];
default:return[f.default]}}function a(e){var t=(e.className,e.type),n=s(e,["className","type"]),a=r(t);return{$$typeof:i,type:"div",key:null,ref:null,props:{children:a.map(function(e,t){return d.default.createElement(y.default,o({key:t,component:e,isSecondary:t>0},n))}),className:P.default.container},_owner:null}}var i=n(7).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(465),f=l(c),p=n(1748),h=l(p),v=n(273),g=l(v),m=n(1729),y=l(m),b=n(2117),P=l(b);
a.propTypes={className:u.PropTypes.string,type:u.PropTypes.string.isRequired,reasonTitle:u.PropTypes.string},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,u.createSelector)((0,c.default)(),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return{type:e.type}})}function a(e){return o.default.createElement(p.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(21),u=n(15),d=n(48),c=i(d),f=n(1727),p=i(f);
a.propTypes={metadataItemEntityID:s.PropTypes.string.isRequired},t.default=(0,l.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.component,n=e.isSecondary,r=a(e,["component","isSecondary"]);return l.default.createElement(t,i({className:n?d.default.secondaryTitle:d.default.title},r))}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(2118),d=s(u);r.propTypes={component:o.PropTypes.func.isRequired,
isSecondary:o.PropTypes.bool},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.prefs;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:t.map(function(e){var t=e.id;return l.default.createElement(d.default,i({key:t},e))})},_owner:null}}var a=n(7).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(723),d=s(u);r.propTypes={prefs:o.PropTypes.arrayOf(o.PropTypes.object).isRequired},t.default=r,e.exports=t.default;
},function(e,t,n){"use strict";function r(e){var t=e.target,n=e.initialMode,r=e.modes,l=e.libraries,u=e.targetLibrarySectionID,c=e.targetSectionLocationID,p=e.selectedLibrarySectionID,v=e.prefs,m=v.onlyNewAirings;return{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:[{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{children:[{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:r&&{$$typeof:i,type:P.default,
key:null,ref:null,props:a(P.default.defaultProps,{labelText:(0,f.default)("Record"),name:"mode",initialValue:n,values:r,isDisabled:r.length<2}),_owner:null},flexBasis:230,maxWidth:230}),_owner:null},{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:m&&d.default.createElement(P.default,o({name:m.id,labelText:m.label,initialValue:m.value,values:m.enumValues.map(function(e){var t=e.label,n=e.value;return s({},n,t)})},v.onlyNewAirings)),flexBasis:230,maxWidth:230}),
_owner:null}],flexWrap:"wrap"}),_owner:null},{$$typeof:i,type:S.default,key:null,ref:null,props:a(S.default.defaultProps,{libraries:l,targetLibrarySectionID:u,targetSectionLocationID:c,selectedLibrarySectionID:p}),_owner:null}],target:t}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(38).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(5),f=l(c),p=n(718),h=l(p),v=n(717),g=l(v),m=n(338),y=l(m),b=n(738),P=l(b),w=n(1734),S=l(w);r.propTypes={
className:u.PropTypes.string,target:u.PropTypes.shape({thumbTranscodeUrl:u.PropTypes.func,title:u.PropTypes.string,grandparentTitle:u.PropTypes.string}),initialMode:u.PropTypes.number,modes:u.PropTypes.arrayOf(u.PropTypes.object),libraries:u.PropTypes.array.isRequired,targetLibrarySectionID:u.PropTypes.string.isRequired,targetSectionLocationID:u.PropTypes.string,selectedLibrarySectionID:u.PropTypes.string,prefs:u.PropTypes.object.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";
var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(5)),f=u(c),p=n(30),h=n(105),v=u(h),g=n(113),m=u(g),y=n(82),b=u(y),P=n(112),w=u(P),S=n(179),_=u(S),T=n(269),I=u(T),M=n(81),C=u(M),x=n(335),E=u(x),k=n(338),D=u(k),A=n(1728),O=u(A),R=n(2119),L=u(R),N=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),
i(t,[{key:"componentDidUpdate",value:function(e,t){var n=e.isMediaSubscriptionMoving&&!this.props.isMediaSubscriptionMoving&&null==this.props.mediaSubscriptionMoveError||e.isMediaSubscriptionDeleting&&!this.props.isMediaSubscriptionDeleting&&null==this.props.mediaSubscriptionDeleteError;n&&this.props.onModalClose()}},{key:"render",value:function(){var e=this.props,t=e.isRecordingSchedule,n=e.isMediaSubscriptionDeleting,r=e.mediaSubscriptionDeleteError,a=e.isMediaSubscriptionMoving,i=e.mediaSubscriptionMoveError,s=e.server,u=e.target,d=e.conflicts,c=e.onDelete,h=e.onMediaMove,g=e.onErrorDismiss,y=e.onModalClose,P=encodeURIComponent(s.machineIdentifier);
return{$$typeof:l,type:v.default,key:null,ref:null,props:o(v.default.defaultProps,{children:[{$$typeof:l,type:m.default,key:null,ref:null,props:o(m.default.defaultProps,{children:(0,f.default)("Conflict Detected")}),_owner:null},i&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:E.default,key:null,ref:null,props:o(E.default.defaultProps,{errorMessage:(0,f.default)("There was a problem saving your changes..."),onErrorDismiss:g}),_owner:null}},_owner:null},r&&{$$typeof:l,type:"div",
key:null,ref:null,props:{children:{$$typeof:l,type:E.default,key:null,ref:null,props:o(E.default.defaultProps,{errorMessage:(0,f.default)("There was a problem canceling..."),onErrorDismiss:g}),_owner:null}},_owner:null},{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:{$$typeof:l,type:D.default,key:null,ref:null,props:o(D.default.defaultProps,{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:1===d.length?(0,f.default)("Conflicts with 1 recording"):(0,
f.default)("Conflicts with {1} recordings",d.length),className:L.default.message},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:d.map(function(e,t){var n=e.metadataItem;return{$$typeof:l,type:O.default,key:t,ref:null,props:o(O.default.defaultProps,{metadataItemEntityID:n}),_owner:null}}),className:L.default.conflicts},_owner:null}],target:u}),_owner:null},autoScroll:!0}),_owner:null},{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:{$$typeof:l,
type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{children:[{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{children:(0,f.default)("Cancel This"),isSpinning:n,kind:p.kinds.DANGER,onPress:c}),_owner:null},{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{children:(0,f.default)("Prefer This"),isSpinning:a,kind:p.kinds.PRIMARY,onPress:h}),_owner:null},t?{$$typeof:l,type:C.default,key:null,ref:null,props:o(C.default.defaultProps,{
children:(0,f.default)("Close"),kind:p.kinds.PRIMARY,onPress:y}),_owner:null}:{$$typeof:l,type:C.default,key:null,ref:null,props:o(C.default.defaultProps,{children:(0,f.default)("Manage"),kind:p.kinds.PRIMARY,to:"#!/server/"+P+"/schedule"}),_owner:null}]}),_owner:null}}),_owner:null}],onModalClose:y}),_owner:null}}}]),t}(d.Component);N.propTypes={isRecordingSchedule:d.PropTypes.bool,isMediaSubscriptionDeleting:d.PropTypes.bool.isRequired,mediaSubscriptionDeleteError:d.PropTypes.object,isMediaSubscriptionMoving:d.PropTypes.bool.isRequired,
mediaSubscriptionMoveError:d.PropTypes.object,server:d.PropTypes.object,target:d.PropTypes.object,conflicts:d.PropTypes.arrayOf(d.PropTypes.object),onDelete:d.PropTypes.func.isRequired,onMediaMove:d.PropTypes.func.isRequired,onErrorDismiss:d.PropTypes.func.isRequired,onModalClose:d.PropTypes.func.isRequired},N.defaultProps={conflicts:[]},t.default=N,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(19).default,d=n(11).default,c=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=c(f),h=n(5),v=c(h),g=n(24),m=n(30),y=n(105),b=c(y),P=n(113),w=c(P),S=n(82),_=c(S),T=n(112),I=c(T),M=n(179),C=c(M),x=n(36),E=c(x),k=n(34),D=c(k),A=n(269),O=c(A),R=n(451),L=c(R),N=n(335),j=c(N),U=n(1731),$=c(U),z=n(1730),F=c(z),B=n(2120),V=c(B),H=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={selectedLibrarySectionID:e.targetLibrarySectionID,selectedMode:e.initialMode,
isAdvanced:!1}}return a(t,e),i(t,[{key:"componentDidUpdate",value:function(e,t){var n=e.isMediaSubscriptionSaving&&!this.props.isMediaSubscriptionSaving&&null==this.props.mediaSubscriptionSaveError||e.isMediaSubscriptionDeleting&&!this.props.isMediaSubscriptionDeleting&&null==this.props.mediaSubscriptionDeleteError;n&&this.props.onModalClose()}},{key:"onAdvancedPress",decorators:[g.autobind],value:function(){this.setState({isAdvanced:!this.state.isAdvanced})}},{key:"onFormChange",decorators:[g.autobind],
value:function(e){if(e.targetLibrarySectionID&&(e.targetLibrarySectionID.value!==this.state.selectedLibrarySectionID&&this.setState({selectedLibrarySectionID:e.targetLibrarySectionID.value}),e.mode&&e.mode.value!==this.state.selectedMode)){var t=e.mode.value;this.setState({selectedMode:t}),this.props.onModeChange(t)}}},{key:"render",value:function(){var e=this.props,t=e.mediaSubscriptionKey,n=e.isMediaSubscriptionSaving,r=e.mediaSubscriptionSaveError,a=e.isMediaSubscriptionDeleting,i=e.mediaSubscriptionDeleteError,s=e.prefGroups,c=e.onModalClose,f=e.onErrorDismiss,h=e.onSubmit,g=e.onDelete,y=u(e,["mediaSubscriptionKey","isMediaSubscriptionSaving","mediaSubscriptionSaveError","isMediaSubscriptionDeleting","mediaSubscriptionDeleteError","prefGroups","onModalClose","onErrorDismiss","onSubmit","onDelete"]);
return{$$typeof:l,type:L.default,key:null,ref:null,props:o(L.default.defaultProps,{children:{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:[{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,v.default)("Record Options")}),_owner:null},r&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:j.default,key:null,ref:null,props:o(j.default.defaultProps,{errorMessage:(0,v.default)("There was a problem saving your changes. Please try again."),
onErrorDismiss:f}),_owner:null}},_owner:null},i&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:j.default,key:null,ref:null,props:o(j.default.defaultProps,{errorMessage:(0,v.default)("There was a problem with canceling this subscription. Please Try again."),onErrorDismiss:f}),_owner:null}},_owner:null},{$$typeof:l,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{children:[{$$typeof:l,type:"div",key:"base",ref:null,props:{children:p.default.createElement($.default,d({
selectedLibrarySectionID:this.state.selectedLibrarySectionID,prefs:s.basic},y)),className:V.default.baseSettings},_owner:null},{$$typeof:l,type:"div",key:"advanced",ref:null,props:{children:p.default.createElement(F.default,d({prefs:s.advanced},y)),className:V.default.advancedSettings},_owner:null}]}),_owner:null},{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{children:[{$$typeof:l,type:C.default,key:null,ref:null,props:o(C.default.defaultProps,{children:{$$typeof:l,
type:D.default,key:null,ref:null,props:o(D.default.defaultProps,{children:[{$$typeof:l,type:E.default,key:null,ref:null,props:o(E.default.defaultProps,{className:V.default.advancedIcon,name:"plex-icon-settings-560"}),_owner:null},this.state.isAdvanced?(0,v.default)("Show Basic"):(0,v.default)("Show Advanced")],kind:m.kinds.PRIMARY,onPress:this.onAdvancedPress}),_owner:null}}),_owner:null},{$$typeof:l,type:C.default,key:null,ref:null,props:o(C.default.defaultProps,{children:[{$$typeof:l,type:O.default,
key:null,ref:null,props:o(O.default.defaultProps,{children:t?(0,v.default)("Cancel Recording"):(0,v.default)("Cancel"),isSpinning:a,kind:t?m.kinds.DANGER:m.kinds.DEFAULT,onPress:t?g:c}),_owner:null},{$$typeof:l,type:O.default,key:null,ref:null,props:o(O.default.defaultProps,{children:t?(0,v.default)("Save"):(0,v.default)("Record"),type:"submit",isSpinning:n,kind:m.kinds.PRIMARY}),_owner:null}]}),_owner:null}],className:V.default.footer}),_owner:null}],onModalClose:c}),_owner:null},className:this.state.isAdvanced?V.default.advancedForm:V.default.baseForm,
onChange:this.onFormChange,onSubmit:h}),_owner:null}}}]),t}(f.Component);H.propTypes={mediaSubscriptionKey:f.PropTypes.string,initialMode:f.PropTypes.number,libraries:f.PropTypes.array,targetLibrarySectionID:f.PropTypes.string,targetSectionLocationID:f.PropTypes.string,prefGroups:f.PropTypes.object.isRequired,isMediaSubscriptionSaving:f.PropTypes.bool.isRequired,mediaSubscriptionSaveError:f.PropTypes.object,isMediaSubscriptionDeleting:f.PropTypes.bool.isRequired,mediaSubscriptionDeleteError:f.PropTypes.object,
onModeChange:f.PropTypes.func.isRequired,onModalClose:f.PropTypes.func.isRequired,onErrorDismiss:f.PropTypes.func.isRequired,onSubmit:f.PropTypes.func.isRequired,onDelete:f.PropTypes.func.isRequired},t.default=H,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=f.default.find(e,function(e){var n=e.librarySectionID;return n===t});return n?n.locations.map(function(e){var t=e.id,n=e.path;return s({},t,n)}):[]}function a(e){var t=u(e,1),n=t[0];if(n){var r=f.default.keys(n),a=u(r,1),i=a[0];
return n[i]}}function i(e){var t=e.libraries,n=e.targetLibrarySectionID,i=e.targetSectionLocationID,u=e.selectedLibrarySectionID,d=r(t,u);return{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:[{$$typeof:l,type:S.default,key:null,ref:null,props:o(S.default.defaultProps,{children:{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{labelText:(0,v.default)("Add to Library"),name:"targetLibrarySectionID",initialValue:n,size:g.sizes.SMALL,values:t.map(function(e,t){
var n=e.title,r=e.librarySectionID;return s({},r,n)})}),_owner:null},flexBasis:230,maxWidth:230}),_owner:null},{$$typeof:l,type:S.default,key:null,ref:null,props:o(S.default.defaultProps,{children:d.length>1&&{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{labelText:(0,v.default)("Location"),name:"targetSectionLocationID",size:g.sizes.SMALL,initialValue:null==i?a(d):i,values:d}),_owner:null},flexBasis:230,maxWidth:230}),_owner:null}],flexWrap:"wrap"}),_owner:null}}var s=n(38).default,o=n(10).default,l=n(7).default,u=n(93).default,d=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var c=n(3),f=d(c),p=n(4),h=(d(p),n(5)),v=d(h),g=n(30),m=n(738),y=d(m),b=n(718),P=d(b),w=n(717),S=d(w);i.propTypes={libraries:p.PropTypes.array.isRequired,targetLibrarySectionID:p.PropTypes.string.isRequired,targetSectionLocationID:p.PropTypes.string,selectedLibrarySectionID:p.PropTypes.string},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,S.createSelector)(function(e,t){var n=t.subscriptionType;return n},function(e){
return"playlist"===e?"show":e})}function a(){return(0,S.createSelector)((0,R.default)(),r(),function(e,t){var n=x.default.getLibraryType(t);return e.filter(function(e){var t=x.default.get(e.type),r=t.id;return r===n.id}).map(function(e){return{librarySectionID:e.key,locations:e.locations,title:e.title}})})}function i(){return(0,S.createSelector)((0,A.default)(),function(e){return e.ui.mediaSubscriptionModal},K,X,r(),a(),function(e,t,n,r,a,i){void 0===n&&(n={});var l=y.default.omit(t,"templates","mediaSubscription"),u=n.key,d=n.grabOperations,c=void 0===d?[]:d,f=n.prefs,p=h(n,["key","grabOperations","prefs"]),v=void 0,g=void 0,m=void 0;
r.length>1?(g=y.default.findIndex(r,function(e){return e.selected}),v=r.map(function(e,t){var n=e.title;return s({},t,n)})):(g=0,v=p.title?[{0:p.title}]:null),c.length&&(m=c.reduce(function(e,t){return t.conflicts&&t.conflicts.length?e.concat(t.conflicts):e},[]));var b=y.default.groupBy(f,function(e){return e.advanced?"advanced":"basic"});return b.basic=y.default.indexBy(b.basic,"id"),o({mediaSubscriptionKey:u,prefGroups:b,metadataType:a,libraries:i,initialMode:g,modes:v,conflicts:m,server:e},l,p);
})}var s=n(38).default,o=n(11).default,l=n(17).default,u=n(18).default,d=n(25).default,c=n(16).default,f=n(10).default,p=n(7).default,h=n(19).default,v=n(1).default,g=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var m=n(3),y=v(m),b=n(4),P=v(b),w=n(21),S=n(15),_=n(5),T=v(_),I=n(24),M=n(50),C=n(37),x=v(C),E=n(102),k=v(E),D=n(70),A=v(D),O=n(395),R=v(O),L=n(603),N=v(L),j=n(110),U=n(681),$=g(U),z=n(728),F=v(z),B=n(729),V=v(B),H=n(1733),q=v(H),W=n(1732),G=v(W),Y=n(1736),Q=v(Y),K=(0,S.createSelector)(function(e){
return e.ui.mediaSubscriptionModal.mediaSubscription},N.default,function(e,t){return t[e]}),X=(0,S.createSelector)(function(e){return e.ui.mediaSubscriptionModal.templates},N.default,function(e,t){return void 0===e&&(e=[]),e.map(function(e){return t[e]})}),Z=o({addLibrary:j.addLibrary},$),J=function(e){function t(e,n){c(this,t),l(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={showConflicts:e.showConflicts}}return u(t,e),d(t,[{key:"componentDidMount",value:function(){
this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=this.state.showConflicts;this.props.isMediaSubscriptionSaving&&!e.isMediaSubscriptionSaving&&e.conflicts&&e.conflicts.length&&(t=!0),t!==this.state.showConflicts&&this.setState({showConflicts:t});var n=this.props.metadataItemEntityID!==e.metadataItemEntityID,r=this.props.mediaSubscriptionEntityID!==e.mediaSubscriptionEntityID;(n||r)&&this._populate(e)}},{key:"componentWillUnmount",value:function(){this.props.clearMediaSubscriptionModal();
}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],t=e.serverEntityID,n=e.mediaSubscriptionEntityID,r=e.metadataItemEntityID,a=e.showConflicts;(0,M.scheduleImmediateUpdate)(function(){e.initMediaSubscriptionModal({serverEntityID:t,mediaSubscriptionEntityID:n,metadataItemEntityID:r,showConflicts:a})})}},{key:"onSubmit",decorators:[I.autobind],value:function(e){var t=this,n=this.props,r=n.serverEntityID,a=n.metadataItemEntityID,i=e.targetLibrarySectionID,s=e.targetSectionLocationID,o=(e.mode,
h(e,["targetLibrarySectionID","targetSectionLocationID","mode"]));(0,M.scheduleImmediateUpdate)(function(){t.props.saveMediaSubscription({serverEntityID:r,metadataItemEntityID:a,targetLibrarySectionID:i,targetSectionLocationID:s,prefs:o})})}},{key:"onDelete",decorators:[I.autobind],value:function(){var e=this;(0,M.scheduleImmediateUpdate)(function(){e.props.deleteMediaSubscriptionModal({metadataItemEntityID:e.props.metadataItemEntityID})})}},{key:"onModeChange",decorators:[I.autobind],value:function(e){
var t=this;(0,M.scheduleImmediateUpdate)(function(){t.props.changeMediaSubscriptionTemplateMode({modeIndex:e})})}},{key:"onMediaMove",decorators:[I.autobind],value:function(){var e=this;(0,M.scheduleImmediateUpdate)(function(){e.props.moveMediaSubscriptionModal()})}},{key:"onErrorDismiss",decorators:[I.autobind],value:function(){this.props.clearMediaSubscriptionModalError()}},{key:"onCreatePress",decorators:[I.autobind],value:function(){var e=this.props,t=e.metadataType,n=e.serverEntityID,r=x.default.getLibraryType(t),a=r.typeString,i=k.default.get(a);
this.props.onModalClose(),this.props.addLibrary({serverEntityID:n,options:{redirect:!1,seedAttrs:{type:i.typeString,title:i.title,language:i.defaultLanguage}}})}},{key:"render",value:function(){return this.props.mediaSubscriptionError?{$$typeof:p,type:F.default,key:null,ref:null,props:f(F.default.defaultProps,{message:(0,T.default)("There was an unexpected error"),onModalClose:this.props.onModalClose}),_owner:null}:this.props.isMediaSubscriptionPending||!this.props.isMediaSubscriptionPopulated?{$$typeof:p,
type:V.default,key:null,ref:null,props:f(V.default.defaultProps,{onModalClose:this.props.onModalClose}),_owner:null}:this.props.libraries.length?this.state.showConflicts?P.default.createElement(G.default,o({},this.props,{onDelete:this.onDelete,onMediaMove:this.onMediaMove,onErrorDismiss:this.onErrorDismiss})):P.default.createElement(q.default,o({},this.props,{onModeChange:this.onModeChange,onSubmit:this.onSubmit,onDelete:this.onDelete,onErrorDismiss:this.onErrorDismiss})):P.default.createElement(Q.default,o({},this.props,{
onCreatePress:this.onCreatePress}))}}]),t}(b.Component);J.propTypes={serverEntityID:b.PropTypes.string.isRequired,subscriptionType:b.PropTypes.string.isRequired,mediaSubscriptionEntityID:b.PropTypes.string,mediaSubscriptionKey:b.PropTypes.string,metadataItemEntityID:b.PropTypes.string,metadataType:b.PropTypes.string.isRequired,libraries:b.PropTypes.arrayOf(b.PropTypes.object).isRequired,isMediaSubscriptionSaving:b.PropTypes.bool.isRequired,isMediaSubscriptionPending:b.PropTypes.bool.isRequired,isMediaSubscriptionPopulated:b.PropTypes.bool.isRequired,
mediaSubscriptionError:b.PropTypes.object,showConflicts:b.PropTypes.bool.isRequired,onModalClose:b.PropTypes.func.isRequired,initMediaSubscriptionModal:b.PropTypes.func.isRequired,clearMediaSubscriptionModal:b.PropTypes.func.isRequired,saveMediaSubscription:b.PropTypes.func.isRequired,changeMediaSubscriptionTemplateMode:b.PropTypes.func.isRequired,moveMediaSubscriptionModal:b.PropTypes.func.isRequired,clearMediaSubscriptionModalError:b.PropTypes.func.isRequired,deleteMediaSubscriptionModal:b.PropTypes.func.isRequired,
addLibrary:b.PropTypes.func.isRequired},J.defaultProps={showConflicts:!1},t.default=(0,w.connect)(i,Z)(J),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.target,n=e.metadataType,r=e.onCreatePress,s=e.onModalClose,o=f.default.getLibraryType(n),l=o.typeString,c=h.default.get(l),p=c.title;return{$$typeof:i,type:S.default,key:null,ref:null,props:a(S.default.defaultProps,{children:[{$$typeof:i,type:T.default,key:null,ref:null,props:a(T.default.defaultProps,{children:(0,u.default)("Record Options")
}),_owner:null},{$$typeof:i,type:M.default,key:null,ref:null,props:a(M.default.defaultProps,{children:{$$typeof:i,type:k.default,key:null,ref:null,props:a(k.default.defaultProps,{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:(0,u.default)("{1} Library Required",p),className:A.default.errorMessage},_owner:null},{$$typeof:i,type:"p",key:null,ref:null,props:{children:(0,u.default)("This recording cannot be scheduled because you don\u2019t yet have a library for {1}. Please try recording again after you have created your library.",p)
},_owner:null},{$$typeof:i,type:P.default,key:null,ref:null,props:a(P.default.defaultProps,{children:[{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{name:"plex-icon-add-560",className:A.default.addIcon}),_owner:null}," ",(0,u.default)("Create Library")],kind:d.kinds.PRIMARY,onPress:r}),_owner:null}],target:t}),_owner:null}}),_owner:null},{$$typeof:i,type:x.default,key:null,ref:null,props:a(x.default.defaultProps,{children:{$$typeof:i,type:y.default,key:null,ref:null,
props:a(y.default.defaultProps,{children:(0,u.default)("Cancel"),onPress:s}),_owner:null}}),_owner:null}],onModalClose:s}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(30),c=n(37),f=s(c),p=n(102),h=s(p),v=n(36),g=s(v),m=n(81),y=s(m),b=n(34),P=s(b),w=n(105),S=s(w),_=n(113),T=s(_),I=n(82),M=s(I),C=n(112),x=s(C),E=n(338),k=s(E),D=n(2121),A=s(D);r.propTypes={target:o.PropTypes.object,metadataType:o.PropTypes.string.isRequired,
onModalClose:o.PropTypes.func.isRequired,onCreatePress:o.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.component,n=e.isSecondary,r=a(e,["component","isSecondary"]);return l.default.createElement(t,i({className:n?d.default.secondaryTitle:d.default.title},r))}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(2123),d=s(u);r.propTypes={component:o.PropTypes.func.isRequired,
isSecondary:o.PropTypes.bool},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(33)),f=u(c),p=n(24),h=n(31),v=u(h),g=n(34),m=u(g),y=n(450),b=u(y),P=n(460),w=u(P),S=n(215),_=u(S),T=n(2124),I=u(T),M=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state={isSubscribeModalOpen:!1}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"onRecordPress",decorators:[p.autobind],value:function(e){this.setState({isSubscribeModalOpen:!0})}},{key:"onSubscribeModalClose",decorators:[p.autobind],value:function(){this.setState({isSubscribeModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.serverEntityID,r=e.metadataItemEntityID,a=e.route,i=e.type,s=e.title,u=e.subscriptionType,d=e.grandparentSubscriptionType,c=e.isSubscribed,p=e.showLink,h=this.state.isSubscribeModalOpen;
return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{className:I.default.background},_owner:null},c&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:w.default,key:null,ref:null,props:l(w.default.defaultProps,{type:d||u}),_owner:null},className:I.default.subscriptionBadge},_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:"div",key:null,ref:null,props:{className:I.default.subscriptionTag
},_owner:null},className:I.default.subscriptionTagContainer},_owner:null},p&&{$$typeof:o,type:m.default,key:null,ref:null,props:l(m.default.defaultProps,{className:I.default.link,to:a}),_owner:null},{$$typeof:o,type:b.default,key:null,ref:null,props:l(b.default.defaultProps,{className:p?I.default.recordButton:I.default.recordCoverButton,circleClassName:I.default.recordCircle,iconClassName:I.default.recordIcon,tabIndex:"-1",title:s,onPress:this.onRecordPress}),_owner:null},{$$typeof:o,type:_.default,
key:null,ref:null,props:l(_.default.defaultProps,{serverEntityID:n,metadataItemEntityID:r,isOpen:h,subscriptionType:i,onModalClose:this.onSubscribeModalClose}),_owner:null}],className:(0,f.default)(t,I.default.overlay)},_owner:null}}}]),t}(d.Component);M.propTypes={className:d.PropTypes.string,serverEntityID:d.PropTypes.string.isRequired,metadataItemEntityID:d.PropTypes.string.isRequired,route:d.PropTypes.string.isRequired,type:d.PropTypes.string.isRequired,title:d.PropTypes.string,subscriptionType:d.PropTypes.string,
grandparentSubscriptionType:d.PropTypes.string,isSubscribed:d.PropTypes.bool.isRequired,showLink:d.PropTypes.bool},t.default=M,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.type,r=e.width,s=e.height,o=d[n];if(!o)return null;var l={fontSize:Math.max(14,Math.min(Math.round(r/4),42)),lineHeight:s+"px"};return{$$typeof:i,type:u.default,key:null,ref:null,props:a(u.default.defaultProps,{name:o,className:t,style:l}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(36)),u=s(l),d={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"};r.propTypes={className:o.PropTypes.string,type:o.PropTypes.string,width:o.PropTypes.number.isRequired,
height:o.PropTypes.number.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.metadataItemEntityID,l=e.type,u=e.selectionType,c=e.activeSelectionType,p=e.isSelected,v=e.isOffscreen,m=e.visibleFace,b=e.imageWidth,P=e.imageHeight,w=e.imageUrl,S=e.imageTransitionProps,_=e.onImageLoad,T=e.onImageError,I=e.onSelectItem,M=e.onDeselectItem,C=s(e,["serverEntityID","providerEntityID","metadataItemEntityID","type","selectionType","activeSelectionType","isSelected","isOffscreen","visibleFace","imageWidth","imageHeight","imageUrl","imageTransitionProps","onImageLoad","onImageError","onSelectItem","onDeselectItem"]);
return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:h.default,key:null,ref:null,props:i(h.default.defaultProps,{type:l,isOffscreen:v,url:w,width:b,height:P,transitionProps:S,onLoad:_,onError:T}),_owner:null},d.default.createElement(g.default,o({serverEntityID:t,providerEntityID:n,metadataItemEntityID:r,type:l,selectionID:r,selectionType:u,activeSelectionType:c,isSelected:p,onSelectItem:I,onDeselectItem:M},C))],className:(0,f.default)(y.default.face,y.default[m],p&&y.default.isSelected)
},_owner:null}}var a=n(7).default,i=n(10).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(33),f=l(c),p=n(339),h=l(p),v=n(1742),g=l(v),m=n(2126),y=l(m);r.propTypes={serverEntityID:u.PropTypes.string.isRequired,providerEntityID:u.PropTypes.string.isRequired,metadataItemEntityID:u.PropTypes.string.isRequired,type:u.PropTypes.string.isRequired,selectionType:u.PropTypes.string,activeSelectionType:u.PropTypes.string,isSelected:u.PropTypes.bool,
isOffscreen:u.PropTypes.bool,visibleFace:u.PropTypes.string.isRequired,imageWidth:u.PropTypes.number.isRequired,imageHeight:u.PropTypes.number.isRequired,imageUrl:u.PropTypes.oneOfType([u.PropTypes.func,u.PropTypes.string]),imageTransitionProps:u.PropTypes.object,onImageLoad:u.PropTypes.func.isRequired,onImageError:u.PropTypes.func.isRequired,onSelectItem:u.PropTypes.func,onDeselectItem:u.PropTypes.func},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(19).default,d=n(11).default,c=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=c(f),h=n(33),v=c(h),g=n(5),m=c(g),y=n(24),b=n(31),P=c(b),w=n(30),S=n(1931),_=c(S),T=n(36),I=c(T),M=n(55),C=c(M),x=n(34),E=c(x),k=n(455),D=c(k),A=n(333),O=c(A),R=n(736),L=c(R),N=n(2128),j=c(N),U=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isActionsMenuOpen:!1}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,P.default)(this,e,t)}},{
key:"_getActionPayload",value:function(){return{serverEntityID:this.props.serverEntityID,metadataItemEntityID:this.props.metadataItemEntityID}}},{key:"onPlayPress",decorators:[y.autobind],value:function(e){this.props.playMetadataItem(this._getActionPayload())}},{key:"onEditPress",decorators:[y.autobind],value:function(e){this.props.editMetadataItem(this._getActionPayload())}},{key:"onActionsPress",decorators:[y.autobind],value:function(e){this.setState({isActionsMenuOpen:!this.state.isActionsMenuOpen
})}},{key:"onActionsMenuClose",decorators:[y.autobind],value:function(){this.setState({isActionsMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.route,r=e.title,a=e.viewCount,i=e.viewOffset,s=e.viewPercent,c=e.unviewedLeafCount,f=e.mediaCount,h=e.isLibraryVideo,g=e.isLibraryVideoDirectory,y=e.isMultiVersion,b=e.isMatching,P=e.isProcessing,S=e.isAnalyzing,_=e.isRefreshing,T=e.isTrash,M=e.showLink,x=e.showSelect,k=e.showPlay,A=e.showEdit,R=e.hasActiveSelection,N=e.isSelected,U=e.isOtherItemSelected,$=e.isConflictingTypeSelected,z=e.isModifierKeyPressed,F=e.onMouseEnter,B=e.onSelectPress,V=e.onDeselectPress,H=u(e,["className","route","title","viewCount","viewOffset","viewPercent","unviewedLeafCount","mediaCount","isLibraryVideo","isLibraryVideoDirectory","isMultiVersion","isMatching","isProcessing","isAnalyzing","isRefreshing","isTrash","showLink","showSelect","showPlay","showEdit","hasActiveSelection","isSelected","isOtherItemSelected","isConflictingTypeSelected","isModifierKeyPressed","onMouseEnter","onSelectPress","onDeselectPress"]),q=this.state.isActionsMenuOpen,W=x&&(z||U);
return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{className:j.default.background},_owner:null},h&&!a&&!i&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:"div",key:null,ref:null,props:{className:j.default.unwatchedTag},_owner:null},className:j.default.unwatchedTagContainer},_owner:null},g&&!!c&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:c,className:(0,v.default)(j.default.unwatchedBadge)},_owner:null
},y&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:I.default,key:null,ref:null,props:l(I.default.defaultProps,{name:"plex-icon-files-560",className:j.default.versionBadgeIcon}),_owner:null},f.length],className:(0,v.default)(j.default.versionBadge)},_owner:null},!!s&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{className:j.default.progressTrack},_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{style:{
width:s+"%"},className:j.default.progressBar},_owner:null}],className:j.default.progress},_owner:null},_&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:C.default,key:null,ref:null,props:l(C.default.defaultProps,{className:j.default.refreshingSpinner}),_owner:null},className:j.default.refreshingSpinnerContainer},_owner:null},b&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:I.default,key:null,ref:null,props:l(I.default.defaultProps,{name:"plex-icon-search-560",
"aria-label":(0,m.default)("Matching")}),_owner:null},className:(0,v.default)(j.default.refreshingCircle)},_owner:null},P&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:I.default,key:null,ref:null,props:l(I.default.defaultProps,{name:"plex-icon-tagging-560","aria-label":(0,m.default)("Downloading Metadata")}),_owner:null},className:(0,v.default)(j.default.refreshingCircle)},_owner:null},S&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:I.default,
key:null,ref:null,props:l(I.default.defaultProps,{name:"plex-icon-analyzing-560","aria-label":(0,m.default)("Analyzing")}),_owner:null},className:(0,v.default)(j.default.refreshingCircle)},_owner:null},T&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:I.default,key:null,ref:null,props:l(I.default.defaultProps,{name:"plex-icon-trash-560","aria-label":(0,m.default)("In Trash")}),_owner:null},className:(0,v.default)(j.default.trashCircle)},_owner:null},M&&{$$typeof:o,type:E.default,
key:null,ref:null,props:l(E.default.defaultProps,{className:j.default.link,to:n}),_owner:null},W&&!$&&{$$typeof:o,type:E.default,key:null,ref:null,props:l(E.default.defaultProps,{className:j.default.selectCoverButton,onPress:B}),_owner:null},W&&$&&{$$typeof:o,type:D.default,key:null,ref:null,props:l(D.default.defaultProps,{className:j.default.selectCoverButton,component:E.default,tooltip:(0,m.default)("A different type is selected"),tooltipAttachment:w.tooltipAttachments.TOP_CENTER,tooltipTarget:this.refs.selectButton,
showOnFocus:!1,hideOnPress:!1}),_owner:null},k&&{$$typeof:o,type:O.default,key:null,ref:null,props:l(O.default.defaultProps,{className:M?j.default.playButton:j.default.playCoverButton,circleClassName:j.default.playCircle,tabIndex:"-1",title:r,onPress:this.onPlayPress}),_owner:null},A&&{$$typeof:o,type:E.default,key:null,ref:null,props:l(E.default.defaultProps,{children:{$$typeof:o,type:I.default,key:null,ref:null,props:l(I.default.defaultProps,{name:"plex-icon-edit-560","aria-label":(0,m.default)("Edit {1}",r)
}),_owner:null},className:j.default.editButton,tabIndex:"-1",onPress:this.onEditPress}),_owner:null},p.default.createElement(E.default,{ref:"moreButton",className:j.default.moreButton,tabIndex:"-1","aria-haspopup":!0,onPress:this.onActionsPress},{$$typeof:o,type:I.default,key:null,ref:null,props:l(I.default.defaultProps,{name:"plex-icon-more-560","aria-label":(0,m.default)("More Actions")}),_owner:null}),p.default.createElement(L.default,d({target:this.refs.moreButton,isOpen:q,onMenuClose:this.onActionsMenuClose
},H)),x&&p.default.createElement(E.default,{ref:"selectButton",className:j.default.selectButton,isDisabled:$,onPress:B},{$$typeof:o,type:"div",key:null,ref:null,props:{className:j.default.selectCircle},_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:I.default,key:null,ref:null,props:l(I.default.defaultProps,{name:"plex-icon-selected-560",className:j.default.selectedIcon,"aria-label":(0,m.default)("Selected")}),_owner:null},className:j.default.selectedCircle},
_owner:null}),N&&{$$typeof:o,type:E.default,key:null,ref:null,props:l(E.default.defaultProps,{className:j.default.deselectCoverButton,onPress:V}),_owner:null}],className:(0,v.default)(t,j.default.overlay,R&&j.default.hasActiveSelection,N&&j.default.isSelected,U&&j.default.isOtherItemSelected,$&&j.default.isConflictingTypeSelected,x&&z&&j.default.isModifierKeyPressed,_&&j.default.isRefreshing,T&&j.default.isTrash,q&&j.default.isActionsMenuOpen),onMouseEnter:F},_owner:null}}}]),t}(f.Component);U.propTypes={
className:f.PropTypes.string,serverEntityID:f.PropTypes.string.isRequired,metadataItemEntityID:f.PropTypes.string.isRequired,route:f.PropTypes.string.isRequired,title:f.PropTypes.string.isRequired,viewCount:f.PropTypes.number,viewOffset:f.PropTypes.number,viewPercent:f.PropTypes.number,unviewedLeafCount:f.PropTypes.number,mediaCount:f.PropTypes.number.isRequired,isLibraryVideo:f.PropTypes.bool,isLibraryVideoDirectory:f.PropTypes.bool,isMultiVersion:f.PropTypes.bool,isMatching:f.PropTypes.bool,isProcessing:f.PropTypes.bool,
isAnalyzing:f.PropTypes.bool,isRefreshing:f.PropTypes.bool,isTrash:f.PropTypes.bool,showLink:f.PropTypes.bool,showSelect:f.PropTypes.bool,showPlay:f.PropTypes.bool,showEdit:f.PropTypes.bool,hasActiveSelection:f.PropTypes.bool,isSelected:f.PropTypes.bool,isOtherItemSelected:f.PropTypes.bool,isConflictingTypeSelected:f.PropTypes.bool,isModifierKeyPressed:f.PropTypes.bool,playMetadataItem:f.PropTypes.func.isRequired,editMetadataItem:f.PropTypes.func.isRequired,onMouseEnter:f.PropTypes.func,onSelectPress:f.PropTypes.func,
onDeselectPress:f.PropTypes.func},t.default=(0,_.default)(U),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,c.createSelector)(function(e,t){var n=t.type;return n},(0,m.default)(),(0,b.default)(),(0,w.default)(),function(e,t,n,r){var a=t.key,s=t.title,o=t.duration,l=t.viewCount,u=t.viewOffset,d=t.unviewedLeafCount,c=t.metadataState,f=t.mediaState,h=t.deletedAt,g=t.subscriptionID,m=t.subscriptionType,y=t.grandparentSubscriptionID,b=t.grandparentSubscriptionType,P=t.isLibraryItem,w=t.isExtra,S=t.Media,_=p.default.get(e),T=p.default.getChildMediaType(e),I=S.length,M=null!=g||null!=y,C=P&&!w&&"video"===_.element,x=P&&!w&&"directory"===_.element&&"video"===T.element,k=C&&I>1,A=c===v.MATCHING,O=c===v.PROCESSING||c===v.LOADING,R=!A&&!O&&!!f,L=A||O||R,N=!L&&!!h,j=u&&u/o*100,U=!w&&"photo"!==e&&"track"!==e,$=(0,
D.default)(i({server:n,provider:r},t));return i({server:n,provider:r,route:(0,E.default)(n,r,a),title:s,viewCount:l,viewOffset:u,viewPercent:j,unviewedLeafCount:d,mediaCount:I,subscriptionType:m,grandparentSubscriptionType:b,isSubscribed:M,isLibraryVideo:C,isLibraryVideoDirectory:x,isMultiVersion:k,isMatching:A,isProcessing:O,isAnalyzing:R,isRefreshing:L,isTrash:N,showLink:U},$)})}function a(e){return e.provider.protocols.livetv?u.default.createElement(L.default,e):u.default.createElement(O.default,e);
}var i=n(11).default,s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=s(l),d=n(21),c=n(15),f=n(37),p=s(f),h=n(607),v=o(h),g=n(48),m=s(g),y=n(67),b=s(y),P=n(73),w=s(P),S=n(255),_=o(S),T=n(784),I=s(T),M=n(74),C=s(M),x=n(153),E=s(x),k=n(487),D=s(k),A=n(1741),O=s(A),R=n(1738),L=s(R);a.propTypes={serverEntityID:l.PropTypes.string.isRequired,providerEntityID:l.PropTypes.string.isRequired,metadataItemEntityID:l.PropTypes.string.isRequired,provider:C.default.isRequired
},t.default=(0,d.connect)(r,_,I.default)(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.imageWidth,n=e.imageHeight,r=e.activeSelectionType,i=e.isSelected,s={width:t,height:n};return{$$typeof:a,type:"div",key:null,ref:null,props:{className:(0,l.default)(d.default.placeholder,i&&d.default.isSelected,!!r&&!i&&d.default.isOtherItemSelected),style:s},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(33)),l=i(o),u=n(2129),d=i(u);
r.propTypes={imageWidth:s.PropTypes.number,imageHeight:s.PropTypes.number,activeSelectionType:s.PropTypes.string,isSelected:s.PropTypes.bool},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){switch(e){case"artist":return"track";default:return e}}function a(e){var t=e.isOffscreen,n=e.tagType,a=e.librarySectionType,l=e.title,u=e.url,d=e.width,f=e.height,h=e.transitionProps,g=e.onLoad,y=e.onError;o(e,["isOffscreen","tagType","librarySectionType","title","url","width","height","transitionProps","onLoad","onError"]);
if(t)return null;if(u)return{$$typeof:s,type:b.default,key:null,ref:null,props:i(b.default.defaultProps,{url:u,width:d,height:f,transitionProps:h,backgroundPosition:"center center",onLoad:g,onError:y}),_owner:null};var P=p.default.get(n);if(P&&P.isPerson)return{$$typeof:s,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{name:l,width:d,height:f}),_owner:null};var w=c.default.get(a),S=w&&w.typeString,_=r(S);return{$$typeof:s,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{
type:_,width:d,height:f}),_owner:null}}var i=n(10).default,s=n(7).default,o=n(19).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=(l(u),n(102)),c=l(d),f=n(317),p=l(f),h=n(1672),v=l(h),g=n(740),m=l(g),y=n(452),b=l(y);a.propTypes={title:u.PropTypes.string.isRequired,tagType:u.PropTypes.oneOfType([u.PropTypes.number,u.PropTypes.string]).isRequired,librarySectionType:u.PropTypes.oneOfType([u.PropTypes.number,u.PropTypes.string]),isOffscreen:u.PropTypes.bool,width:u.PropTypes.number.isRequired,
height:u.PropTypes.number.isRequired,url:u.PropTypes.oneOfType([u.PropTypes.func,u.PropTypes.string]),transitionProps:u.PropTypes.object,onLoad:u.PropTypes.func,onError:u.PropTypes.func},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(5)),f=u(c),p=n(24),h=n(31),v=u(h),g=n(36),m=u(g),y=n(719),b=u(y),P=n(2132),w=u(P),S=function(e){
function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={sliderValue:e.columnAdjustment*-1}}return a(t,e),i(t,[{key:"componentWillReceiveProps",value:function(e){e.columnAdjustment!==this.props.columnAdjustment&&this.setState({sliderValue:e.columnAdjustment*-1})}},{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){this._clearTimeout()}},{key:"_clearTimeout",value:function(){
this._columnAdjustmentTimeoutID&&clearTimeout(this._columnAdjustmentTimeoutID)}},{key:"onSliderChange",decorators:[p.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{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:b.default,key:null,ref:null,props:l(b.default.defaultProps,{
className:w.default.slider,label:(0,f.default)("Poster Size"),value:this.state.sliderValue,min:-1,max:2,stepSize:1,onChange:this.onSliderChange}),_owner:null},{$$typeof:o,type:m.default,key:null,ref:null,props:l(m.default.defaultProps,{name:"plex-icon-toolbar-grid-560",className:w.default.sliderIcon}),_owner:null}],className:w.default.sliderContainer},_owner:null}}}]),t}(d.Component);S.propTypes={columnAdjustment:d.PropTypes.number.isRequired,columnAdjustmentTimeout:d.PropTypes.number.isRequired,
onColumnAdjustmentChange:d.PropTypes.func.isRequired},S.defaultProps={columnAdjustmentTimeout:500},t.default=S,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.server,n=e.provider,r=e.librarySectionKey,s=e.tag,o=e.filter,u=a(e,["server","provider","librarySectionKey","tag","filter"]);if(!s)return null;var c={filters:o,filterLabel:s},f=(0,d.default)(t,n,r,c);return f&&o?l.default.createElement(g.default,i({title:s,to:f},u),s):l.default.createElement("span",u,s)}var a=n(19).default,i=n(11).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(152),d=s(u),c=n(75),f=s(c),p=n(74),h=s(p),v=n(34),g=s(v);r.propTypes={server:f.default,provider:h.default,librarySectionKey:o.PropTypes.string,tag:o.PropTypes.string,filter:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.role;return{$$typeof:a,type:"span",key:null,ref:null,props:{children:n,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(4);i(s);r.propTypes={className:s.PropTypes.string,role:s.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return{grandparentTitle:e.grandparentTitle}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(48),l=a(o),u=n(463),d=a(u);t.default=(0,i.connect)(r)(d.default),e.exports=t.default;
},function(e,t,n){"use strict";function r(e){var t=e.grandparentKey,n=e.grandparentTitle,r=a(e,["grandparentKey","grandparentTitle"]);return l.default.createElement(d.default,i({},r,{metadataKey:t,title:n}))}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(274),d=s(u);r.propTypes={grandparentKey:o.PropTypes.string,grandparentTitle:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){
var t=e.parentKey,n=e.parentTitle,r=a(e,["parentKey","parentTitle"]);return l.default.createElement(d.default,i({},r,{metadataKey:t,title:n}))}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(274),d=s(u);r.propTypes={parentKey:o.PropTypes.string,parentTitle:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.skipChildren,r=e.childCount,s=e.leafCount;if(n)return{
$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{className:t,leafCount:s}),_owner:null};var o=void 0;return null!=r&&(o=1===r?(0,u.default)("{1} album",r):(0,u.default)("{1} albums",r)),{$$typeof:i,type:"span",key:null,ref:null,props:{children:o,className:t},_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(1761),c=s(d);r.propTypes={className:o.PropTypes.string,skipChildren:o.PropTypes.bool,
childCount:o.PropTypes.number,leafCount:o.PropTypes.number},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.date;return n?{$$typeof:a,type:"span",key:null,ref:null,props:{children:(0,l.default)(n),className:t},_owner:null}:null}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(196)),l=i(o);r.propTypes={className:s.PropTypes.string,date:s.PropTypes.number},t.default=r,e.exports=t.default},function(e,t,n){
"use strict";function r(e){var t=e.className,n=e.index,r=e.originallyAvailableAt,i=(0,l.default)({episodePrefix:"Episode {1}",episodeIndex:n,date:r,noLeadingZero:!0});return{$$typeof:a,type:"span",key:null,ref:null,props:{children:i,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(245)),l=i(o);r.propTypes={className:s.PropTypes.string,index:s.PropTypes.number,originallyAvailableAt:s.PropTypes.string},t.default=r,e.exports=t.default;
},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return{index:e.index,originallyAvailableAt:e.originallyAvailableAt}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(48),l=a(o),u=n(1753),d=a(u);t.default=(0,i.connect)(r)(d.default),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.leafCount,r=void 0;return null!=n&&(r=1===n?(0,
l.default)("{1} item",n):(0,l.default)("{1} items",n)),{$$typeof:a,type:"span",key:null,ref:null,props:{children:r,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(5)),l=i(o);r.propTypes={className:s.PropTypes.string,leafCount:s.PropTypes.number},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),(0,d.default)(),(0,f.default)(),function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];
return{server:e,provider:t,title:n.title,metadataKey:n.key}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(67),l=a(o),u=n(73),d=a(u),c=n(48),f=a(c),p=n(274),h=a(p);t.default=(0,i.connect)(r)(h.default),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.duration,r=e.viewOffset,i=void 0;if(n&&r){var s=(n-r)/1e3;s&&(i=(0,l.default)(s))}return{$$typeof:a,type:"div",key:null,ref:null,props:{children:i,className:t},_owner:null
}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(197)),l=i(o);r.propTypes={className:s.PropTypes.string,duration:s.PropTypes.number,viewOffset:s.PropTypes.number},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return{duration:e.duration,viewOffset:e.viewOffset}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(21),s=n(15),o=n(48),l=a(o),u=n(1757),d=a(u);t.default=(0,i.connect)(r)(d.default),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.skipChildren,r=e.childCount,s=e.leafCount;if(n)return{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{className:t,leafCount:s}),_owner:null};var o=void 0;return null!=r&&(o=1===r?(0,u.default)("{1} season",r):(0,u.default)("{1} seasons",r)),{$$typeof:i,type:"span",key:null,ref:null,props:{
children:o,className:t},_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(746),c=s(d);r.propTypes={className:o.PropTypes.string,skipChildren:o.PropTypes.bool,childCount:o.PropTypes.number,leafCount:o.PropTypes.number},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),(0,d.default)(),(0,f.default)(),function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];
return{server:e,provider:t,metadataKey:n.key,parentKey:n.parentKey,title:n.title,parentTitle:n.parentTitle,index:n.index,parentIndex:n.parentIndex,originallyAvailableAt:n.originallyAvailableAt}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(67),l=a(o),u=n(73),d=a(u),c=n(48),f=a(c),p=n(750),h=a(p);t.default=(0,i.connect)(r)(h.default),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.leafCount,r=void 0;return null!=n&&(r=1===n?(0,
l.default)("{1} track",n):(0,l.default)("{1} tracks",n)),{$$typeof:a,type:"span",key:null,ref:null,props:{children:r,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(5)),l=i(o);r.propTypes={className:s.PropTypes.string,leafCount:s.PropTypes.number},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.tabIndex,r=e.server,s=e.provider,o=e.parentKey,l=e.grandparentKey,u=e.parentTitle,d=e.grandparentTitle;
return{$$typeof:a,type:"span",key:null,ref:null,props:{children:[{$$typeof:a,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{tabIndex:n,server:r,provider:s,metadataKey:l,title:d}),_owner:null},g,{$$typeof:a,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{tabIndex:n,server:r,provider:s,metadataKey:o,title:u}),_owner:null}],className:t},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),
n(75)),u=s(l),d=n(74),c=s(d),f=n(125),p=s(f),h=n(274),v=s(h),g={$$typeof:a,type:p.default,key:null,ref:null,props:i(p.default.defaultProps,{}),_owner:null};r.propTypes={className:o.PropTypes.string,tabIndex:o.PropTypes.string,server:u.default,provider:c.default,parentKey:o.PropTypes.string,grandparentKey:o.PropTypes.string,parentTitle:o.PropTypes.string,grandparentTitle:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),(0,
d.default)(),(0,f.default)(),function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return{server:e,provider:t,parentKey:n.parentKey,grandparentKey:n.grandparentKey,parentTitle:n.parentTitle,grandparentTitle:n.grandparentTitle}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(67),l=a(o),u=n(73),d=a(u),c=n(48),f=a(c),p=n(1762),h=a(p);t.default=(0,i.connect)(r)(h.default),e.exports=t.default},function(e,t,n){"use strict";function r(e){
return u.default.createElement(v.default,s({tooltip:(0,c.default)("Edit")},e),{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{name:"plex-icon-toolbar-edit-560","aria-label":(0,c.default)("Edit")}),_owner:null})}var a=n(10).default,i=n(7).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(36),p=o(f),h=n(214),v=o(h);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(11).default,d=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=d(c),p=n(5),h=d(p),v=n(24),g=n(31),m=d(g),y=n(454),b=d(y),P=n(147),w=d(P),S=n(271),_=d(S),T=n(468),I=d(T),M=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isMenuOpen:!1,isMarkWatchedModalOpen:!1,isMarkUnwatchedModalOpen:!1}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t)}},{key:"onMenuButtonPress",decorators:[v.autobind],
value:function(e){this.setState({isMenuOpen:!this.state.isMenuOpen})}},{key:"onMenuClose",decorators:[v.autobind],value:function(){this.setState({isMenuOpen:!1})}},{key:"onMarkWatchedPress",decorators:[v.autobind],value:function(e){this.setState({isMarkWatchedModalOpen:!0})}},{key:"onMarkUnwatchedPress",decorators:[v.autobind],value:function(e){this.setState({isMarkUnwatchedModalOpen:!0})}},{key:"onMarkWatchedConfirm",decorators:[v.autobind],value:function(){this.setState({isMarkWatchedModalOpen:!1
}),this.props.onMarkWatchedConfirm()}},{key:"onMarkWatchedCancel",decorators:[v.autobind],value:function(){this.setState({isMarkWatchedModalOpen:!1})}},{key:"onMarkUnwatchedConfirm",decorators:[v.autobind],value:function(){this.setState({isMarkUnwatchedModalOpen:!1}),this.props.onMarkUnwatchedConfirm()}},{key:"onMarkUnwatchedCancel",decorators:[v.autobind],value:function(){this.setState({isMarkUnwatchedModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.numSelectedItems,n=e.showMarkWatched,r=e.showMarkUnwatched,a=this.state,i=a.isMenuOpen,s=a.isMarkWatchedModalOpen,d=a.isMarkUnwatchedModalOpen;
return f.default.createElement(I.default,u({ref:"watchedButton",icon:"plex-icon-toolbar-watched-toggle-560",label:(0,h.default)("Toggle Watched..."),isMenuOpen:i,onPress:this.onMenuButtonPress},this.props),{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:[n&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,h.default)("Mark Watched"),onPress:this.onMarkWatchedPress}),_owner:null},r&&{$$typeof:l,type:w.default,key:null,ref:null,
props:o(w.default.defaultProps,{children:(0,h.default)("Mark Unwatched"),onPress:this.onMarkUnwatchedPress}),_owner:null}],target:this.refs.watchedButton,isOpen:i,onMenuClose:this.onMenuClose}),_owner:null},{$$typeof:l,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{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}),_owner:null},{$$typeof:l,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{isOpen:d,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}),_owner:null})}}]),
t}(c.Component);M.propTypes={numSelectedItems:c.PropTypes.number.isRequired,showMarkWatched:c.PropTypes.bool.isRequired,showMarkUnwatched:c.PropTypes.bool.isRequired,onMarkWatchedConfirm:c.PropTypes.func.isRequired,onMarkUnwatchedConfirm:c.PropTypes.func.isRequired},t.default=M,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=a(e,["children"]);return l.default.createElement(d.default,i({className:f.default.page},n),t)}var a=n(19).default,i=n(11).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(78),d=s(u),c=n(2134),f=s(c);r.propTypes={children:o.PropTypes.node},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.machineIdentifier,r=e.isWaitingForPrimaryServer,l=e.primaryServerEntityID,u=s(e,["children","machineIdentifier","isWaitingForPrimaryServer","primaryServerEntityID"]),d=(0,m.default)(v.SERVER,n),f=!d||d===l;return l&&f?c.default.createElement(I.default,o({serverEntityID:l
},u),t):r||!f?{$$typeof:i,type:_.default,key:null,ref:null,props:a(_.default.defaultProps,{children:{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{label:(0,p.default)("Connecting")}),_owner:null}}),_owner:null}:M}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(11).default,l=n(1).default,u=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=l(d),f=n(5),p=l(f),h=n(72),v=u(h),g=n(66),m=l(g),y=n(55),b=l(y),P=n(759),w=l(P),S=n(149),_=l(S),T=n(1771),I=l(T),M={
$$typeof:i,type:w.default,key:null,ref:null,props:a(w.default.defaultProps,{}),_owner:null};r.propTypes={children:d.PropTypes.node.isRequired,machineIdentifier:d.PropTypes.string,isWaitingForPrimaryServer:d.PropTypes.bool.isRequired,primaryServerEntityID:d.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.isHubKey,s=e.selectedDirectory,o=e.activeType,l=e.activeFilters,u=e.activeFilterLabel,d=e.activeSort;return s&&r?{
$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{serverEntityID:t,providerEntityID:n,selectedDirectory:s}),_owner:null}:s?{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{serverEntityID:t,providerEntityID:n,selectedDirectory:s,activeType:o,activeFilters:l,activeFilterLabel:u,activeSort:d}),_owner:null}:h}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(760)),u=s(l),d=n(1777),c=s(d),f=n(1795),p=s(f),h={
$$typeof:i,type:u.default,key:null,ref:null,props:a(u.default.defaultProps,{}),_owner:null};r.propTypes={serverEntityID:o.PropTypes.string.isRequired,providerEntityID:o.PropTypes.string.isRequired,isHubKey:o.PropTypes.bool.isRequired,selectedDirectory:o.PropTypes.object,activeType:o.PropTypes.string,activeFilters:o.PropTypes.object,activeFilterLabel:o.PropTypes.string,activeSort:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.hasProvider,r=e.showSpinner,o=e.showError,l=s(e,["children","hasProvider","showSpinner","showError"]);
if(r)return{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{label:(0,c.default)("Loading libraries")}),_owner:null}}),_owner:null};if(o)return{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{title:(0,c.default)("There was an unexpected error loading libraries")}),_owner:null};if(!n)return P;var d=u.default.Children.only(t);return u.default.cloneElement(d,l);
}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(55),p=o(f),h=n(149),v=o(h),g=n(275),m=o(g),y=n(760),b=o(y),P={$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{}),_owner:null};r.propTypes={children:l.PropTypes.node.isRequired,hasProvider:l.PropTypes.bool.isRequired,showSpinner:l.PropTypes.bool.isRequired,showError:l.PropTypes.bool.isRequired},t.default=r,e.exports=t.default;
},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.friendlyName,r=e.isConnected,o=e.isUnavailable,l=e.isUnauthorized,d=e.isFullServer,f=e.isFullOwnedServer,h=e.hasHttpsConnections,g=e.requiresFullServer,y=e.requiresFullOwnedServer,P=s(e,["children","friendlyName","isConnected","isUnavailable","isUnauthorized","isFullServer","isFullOwnedServer","hasHttpsConnections","requiresFullServer","requiresFullOwnedServer"]);if(r){if(g&&!d||y&&!f)return{$$typeof:i,type:b.default,key:null,ref:null,
props:a(b.default.defaultProps,{title:(0,c.default)("You're not supposed to be here"),description:n?(0,c.default)('This page is restricted from the server "{1}"',n):(0,c.default)("This page is restricted from this server")}),_owner:null};var w=u.default.Children.only(t);return u.default.cloneElement(w,P)}if(o){var S=void 0;return p.default.isHostedHttps&&!h&&(S=(0,c.default)('Tip: If "Secure connections" in your server\'s network settings is disabled, select "Preferred" to use the secure web app')),
{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{title:n?(0,c.default)('The server "{1}" is unavailable',n):(0,c.default)("This server is unavailable"),description:(0,c.default)("Plex will automatically try to reconnect to this server"),footer:S}),_owner:null}}if(l)return{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{title:(0,c.default)("No soup for you!"),description:(0,c.default)("You do not have access to this server")}),_owner:null};var _=n?(0,
c.default)("Connecting to {1}",n):(0,c.default)("Connecting");return{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{label:_}),_owner:null}}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(65),p=o(f),h=n(55),v=o(h),g=n(149),m=o(g),y=n(150),b=o(y);r.propTypes={children:l.PropTypes.node.isRequired,
friendlyName:l.PropTypes.string,isConnected:l.PropTypes.bool.isRequired,isUnavailable:l.PropTypes.bool.isRequired,isUnauthorized:l.PropTypes.bool.isRequired,isFullServer:l.PropTypes.bool.isRequired,isFullOwnedServer:l.PropTypes.bool.isRequired,hasHttpsConnections:l.PropTypes.bool.isRequired,requiresFullServer:l.PropTypes.bool,requiresFullOwnedServer:l.PropTypes.bool},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,c.createSelector)((0,p.default)(),function(e){var t=o.default.pick(e,"friendlyName","isConnected","isUnavailable","isUnauthorized","isFullServer","isFullOwnedServer","hasHttpsConnections");
return t})}function a(e){return u.default.createElement(v.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(4),u=i(l),d=n(21),c=n(15),f=n(70),p=i(f),h=n(1770),v=i(h);a.propTypes={serverEntityID:l.PropTypes.string.isRequired},t.default=(0,d.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){return p.default.createElement(C.default,l({component:"div"},e))}function a(e){var t=e.className,n=e.children;return{$$typeof:s,type:"div",
key:null,ref:null,props:{children:n,className:t},_owner:null}}function i(e){var t=e.children,n=e.closedNode,i=e.title,l=e.isOpen,u=e.updateUserError,d=e.isUpdatingUser,f=e.onSubmit,p=e.onErrorDismiss,h=e.onTogglePress,g=l?a:r;return{$$typeof:s,type:"div",key:null,ref:null,props:{children:[l&&u&&{$$typeof:s,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{errorMessage:(0,y.getErrorText)(c.default.first(u.request)),onErrorDismiss:p}),_owner:null},{$$typeof:s,type:g,key:null,ref:null,
props:o(g.defaultProps,{children:[{$$typeof:s,type:C.default,key:null,ref:null,props:o(C.default.defaultProps,{children:l?(0,m.default)("Cancel"):(0,m.default)("Edit"),className:D.default.sectionEditLink,onPress:h}),_owner:null},l?{$$typeof:s,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:[t,{$$typeof:s,type:"div",key:null,ref:null,props:{children:{$$typeof:s,type:E.default,key:null,ref:null,props:o(E.default.defaultProps,{children:(0,m.default)("Save Changes"),type:"submit",
isSpinning:d,kind:b.PRIMARY}),_owner:null},className:D.default.submitButton},_owner:null}],onSubmit:f}),_owner:null}:{$$typeof:s,type:"div",key:null,ref:null,props:{children:[{$$typeof:s,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{children:i,className:D.default.sectionLabel}),_owner:null},n],className:D.default.sectionDetails},_owner:null}],onPress:l?null:h,className:(0,v.default)(D.default.section,l?D.default.isOpen:D.default.isClosed)}),_owner:null}],className:D.default.sectionWrapper
},_owner:null}}var s=n(7).default,o=n(10).default,l=n(11).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(3),c=u(d),f=n(4),p=u(f),h=n(33),v=u(h),g=n(5),m=u(g),y=n(307),b=n(426),P=n(451),w=u(P),S=n(111),_=u(S),T=n(335),I=u(T),M=n(34),C=u(M),x=n(269),E=u(x),k=n(2141),D=u(k);a.propTypes={className:f.PropTypes.string,children:f.PropTypes.node},i.propTypes={children:f.PropTypes.node,closedNode:f.PropTypes.node,title:f.PropTypes.string,isOpen:f.PropTypes.bool,isUpdatingUser:f.PropTypes.bool,
updateUserError:f.PropTypes.object,onSubmit:f.PropTypes.func,onTogglePress:f.PropTypes.func,onErrorDismiss:f.PropTypes.func},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.hasPlexPass;return t?{$$typeof:a,type:"h2",key:null,ref:null,props:{children:[(0,w.default)("Account")," \u2014 ",Z],className:X.default.header},_owner:null}:{$$typeof:a,type:"h2",key:null,ref:null,props:{children:(0,w.default)("Account"),className:X.default.header},_owner:null}}var a=n(7).default,i=n(17).default,s=n(18).default,o=n(25).default,l=n(16).default,u=n(11).default,d=n(38).default,c=n(10).default,f=n(19).default,p=n(224).default,h=n(1).default,v=n(9).default;
Object.defineProperty(t,"__esModule",{value:!0});var g=n(3),m=h(g),y=n(4),b=h(y),P=n(5),w=h(P),S=n(309),_=h(S),T=n(24),I=n(307),M=n(1933),C=v(M),x=n(111),E=h(x),k=n(721),D=h(k),A=n(724),O=h(A),R=n(1676),L=h(R),N=n(722),j=h(N),U=n(180),$=h(U),z=n(150),F=h(z),B=n(1677),V=h(B),H=n(1674),q=h(H),W=n(1772),G=h(W),Y=n(1775),Q=h(Y),K=n(2142),X=h(K),Z={$$typeof:a,type:q.default,key:null,ref:null,props:c(q.default.defaultProps,{}),_owner:null};r.propTypes={hasPlexPass:y.PropTypes.bool.isRequired};var J=function(e){
function t(e,n){l(this,t),i(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 s(t,e),o(t,[{key:"componentWillReceiveProps",value:function(e){if(this.props.isUpdatingUser&&!e.isUpdatingUser&&!e.updateUserError){var t=this.state.AccountFormSections;this.setState({AccountFormSections:m.default.mapObject(t,function(){return!1})})}}},{key:"onFormSubmit",
decorators:[T.autobind],value:function(e){this.props.updateUser(e)}},{key:"onErrorDismiss",decorators:[T.autobind],value:function(e){e.preventDefault(),this.props.clearUpdateUserError()}},{key:"createToggleHandler",decorators:[T.autobind],value:function(e){var t=this;return function(n){n.preventDefault();var r=t.state.AccountFormSections,a=r[e];t.props.updateUserError&&t.props.clearUpdateUserError(),t.setState({AccountFormSections:u({},m.default.mapObject(r,function(){return!1}),d({},e,!a))})}}},{
key:"getAccountFormSectionProps",decorators:[T.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=f(e,["user"]),i=m.default.mapObject(n.updateUserError,function(e){return e.map(function(e){return(0,I.getErrorText)(e);
})}),s=(0,w.default)("System Default"),o=m.default.map(_.default,function(e,t){return d({},t,e)});return t.restricted?{$$typeof:a,type:F.default,key:null,ref:null,props:c(F.default.defaultProps,{title:(0,w.default)("You're not supposed to be here"),description:(0,w.default)("Managed users are restricted from account settings")}),_owner:null}:{$$typeof:a,type:$.default,key:null,ref:null,props:c($.default.defaultProps,{children:{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:r,
key:null,ref:null,props:c(r.defaultProps,{hasPlexPass:t.hasPlexPass}),_owner:null},b.default.createElement(G.default,u({},this.getAccountFormSectionProps((0,w.default)("Photo"),"isPhotoOpen"),{closedNode:{$$typeof:a,type:V.default,key:null,ref:null,props:c(V.default.defaultProps,{url:this.props.user.thumbTranscodeUrl,width:80,height:80}),_owner:null}}),{$$typeof:a,type:E.default,key:null,ref:null,props:c(E.default.defaultProps,{children:(0,w.default)("Photo")}),_owner:null},{$$typeof:a,type:Q.default,
key:null,ref:null,props:c(Q.default.defaultProps,{name:"avatar",width:180,height:180,isDeletingAvatar:this.props.isDeletingAvatar,initialValue:this.props.user.thumb,thumb:this.props.user.thumbTranscodeUrl}),_owner:null}),b.default.createElement(G.default,u({},this.getAccountFormSectionProps((0,w.default)("Language"),"isLocaleOpen"),{closedNode:_.default[t.locale]||s}),{$$typeof:a,type:j.default,key:null,ref:null,props:c(j.default.defaultProps,{labelText:(0,w.default)("Language"),helpText:(0,w.default)("This sets the default language for Plex applications that do not provide their own language setting."),
name:"locale",initialValue:t.locale,values:[{"":s}].concat(p(o))}),_owner:null}),b.default.createElement(G.default,u({},this.getAccountFormSectionProps((0,w.default)("Username"),"isUsernameOpen"),{closedNode:t.username}),{$$typeof:a,type:O.default,key:null,ref:null,props:c(O.default.defaultProps,{labelText:(0,w.default)("Username"),helpText:(0,w.default)("Your username will be visible to friends with whom you have shared your server."),name:"username",initialValue:t.username,errors:i.username,validations:[C.isUsernameRequired]
}),_owner:null},{$$typeof:a,type:D.default,key:null,ref:null,props:c(D.default.defaultProps,{name:"emailOnlyAuth",checkboxText:(0,w.default)("Allow username to be used when signing in"),helpText:(0,w.default)("Your email address will be required to sign in when username sign-in is not allowed."),initialValue:t.emailOnlyAuth,checkedValue:!1,uncheckedValue:!0}),_owner:null}),b.default.createElement(G.default,u({},this.getAccountFormSectionProps((0,w.default)("Email Address"),"isEmailOpen"),{closedNode:t.email
}),{$$typeof:a,type:O.default,key:null,ref:null,props:c(O.default.defaultProps,{labelText:(0,w.default)("Email Address"),name:"email",initialValue:t.email,errors:i.email,validations:[C.isEmailRequired]}),_owner:null},{$$typeof:a,type:O.default,key:null,ref:null,props:c(O.default.defaultProps,{labelText:(0,w.default)("Password"),type:"password",name:"currentPassword",initialValue:"",validations:[C.isPasswordRequired]}),_owner:null}),b.default.createElement(G.default,u({},this.getAccountFormSectionProps((0,
w.default)("Password"),"isPasswordOpen"),{closedNode:"**********"}),{$$typeof:a,type:L.default,key:null,ref:null,props:c(L.default.defaultProps,{labelText:(0,w.default)("New Password"),name:"password",initialValue:"",errors:i.password,validations:[C.isPasswordRequired,C.password]}),_owner:null},{$$typeof:a,type:O.default,key:null,ref:null,props:c(O.default.defaultProps,{labelText:(0,w.default)("Confirm New Password"),type:"password",name:"passwordConfirmation",initialValue:"",validations:[C.isConfirmRequired,C.confirmPassword]
}),_owner:null},{$$typeof:a,type:O.default,key:null,ref:null,props:c(O.default.defaultProps,{labelText:(0,w.default)("Current Password"),type:"password",name:"currentPassword",initialValue:"",validations:[C.isCurrentPasswordRequired]}),_owner:null},{$$typeof:a,type:D.default,key:null,ref:null,props:c(D.default.defaultProps,{checkboxText:(0,w.default)("Sign out connected devices after password change"),name:"resetDevices",initialValue:!1}),_owner:null}),b.default.createElement(G.default,u({},this.getAccountFormSectionProps((0,
w.default)("Plex News"),"isNewsletterOpen"),{closedNode:t.mailingListActive?(0,w.default)("You are currently subscribed"):(0,w.default)("You are not subscribed")}),{$$typeof:a,type:D.default,key:null,ref:null,props:c(D.default.defaultProps,{name:"mailingListActive",initialValue:t.mailingListActive,labelText:(0,w.default)("Plex News"),checkboxText:(0,w.default)("Subscribe to our amazing, but infrequent email newsletter")}),_owner:null})],className:X.default.content},_owner:null},className:X.default.page
}),_owner:null}}}]),t}(y.Component);J.propTypes={isUpdatingUser:y.PropTypes.bool,isDeletingAvatar:y.PropTypes.bool,updateUserError:y.PropTypes.object,user:y.PropTypes.shape({thumb:y.PropTypes.string,thumbTranscodeUrl:y.PropTypes.func,username:y.PropTypes.string,email:y.PropTypes.string}),updateUser:y.PropTypes.func,clearUpdateUserError:y.PropTypes.func},t.default=J,e.exports=t.default},function(e,t,n){"use strict";function r(e){return l.default.createElement(v.default,e)}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(3),s=a(i),o=n(4),l=a(o),u=n(21),d=n(15),c=n(304),f=a(c),p=n(437),h=n(1773),v=a(h),g=(0,d.createSelector)(f.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}}),m={updateUser:p.updateUser,clearUpdateUserError:p.clearUpdateUserError};t.default=(0,u.connect)(g,m)(r),e.exports=t.default;
},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(11).default,l=n(7).default,u=n(10).default,d=n(1).default,c=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=d(f),h=n(4),v=d(h),g=n(24),m=n(26),y=c(m),b=n(5),P=d(b),w=n(244),S=d(w),_=n(31),T=d(_),I=n(36),M=d(I),C=n(719),x=d(C),E=n(81),k=d(E),D=n(178),A=d(D),O=n(2143),R=d(O),L={$$typeof:l,type:M.default,key:null,ref:null,props:u(M.default.defaultProps,{name:"plex-icon-avatar-crop-min-560"
}),_owner:null},N={$$typeof:l,type:M.default,key:null,ref:null,props:u(M.default.defaultProps,{name:"plex-icon-avatar-crop-max-560"}),_owner:null},j=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={drag:!1,thumb:p.default.result(this.props,"thumb"),dragX:0,dragY:0,minScale:.1,maxScale:1,scale:.1,offsetX:0,offsetY:0}}return a(t,e),i(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=p.default.result(this.props,"thumb");this.setState({thumb:t}),this.loadImage(t)}}},{key:"shouldComponentUpdate",value:function(e,t){return(0,T.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(r){var a=r.offsetX,i=r.offsetY,s=r.dragX,l=r.dragY,u=r.scale,d=n.image.width*u,c=n.image.height*u,f=n.props.width-d,p=n.props.height-c,h=Math.max(f,Math.min(a-(s-e),0)),v=Math.max(p,Math.min(i-(l-t),0));return o({},r,{dragX:e,dragY:t,offsetX:h,offsetY:v})})}},{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],r=new Image;r.onload=function(){return t.imageOnLoad(r)},/^https?:\/\//.test(e)&&r.setAttribute("crossOrigin","anonymous");var a=e;if(0!==e.indexOf("data:")){var i=(0,S.default)(),s={width:Math.round(n.width*i),height:Math.round(n.height*i),minSize:1},o=e.indexOf("?");o>-1?(a=y.join(e.substring(0,o),s),a+=a.indexOf("?")===-1?"?":"&",
a+=e.substring(o+1)):a=y.join(a,s)}r.src=a}},{key:"imageOnLoad",value:function(e){var t=this;this.image=e;var n=e.width>e.height?e.height:e.width,r=n>this.props.width?this.props.width/n:1,a=n<=this.props.width?2:1;this.setState({drag:!1,dragX:0,dragY:0,minScale:r,maxScale:a,scale:r,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,r=this.refs.canvas.getContext("2d");r.clearRect(0,0,t,n),this.image&&this.drawImage(r);
var a=document.createElement("canvas");a.width=t,a.height=n;var i=a.getContext("2d");i.fillStyle="rgba(0,0,0,0.6)",i.fillRect(0,0,a.width,a.height),i.globalCompositeOperation="destination-out",i.arc(t/2,n/2,t/2,0,2*Math.PI),i.fill(),r.drawImage(a,0,0)}},{key:"drawImage",decorators:[g.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:[g.autobind],value:function(e){e.preventDefault(),this.startDrag(e.clientX,e.clientY)}},{key:"onTouchStart",decorators:[g.autobind],value:function(e){e.preventDefault();var t=e.touches.item(0);t&&this.startDrag(t.clientX,t.clientY,!0)}},{key:"onTouchMove",decorators:[g.autobind],value:function(e){var t=e.touches.item(0);t&&this.drag(t.clientX,t.clientY)}},{key:"onMouseMove",decorators:[g.autobind],value:function(e){this.drag(e.clientX,e.clientY)}},{key:"onMouseUp",decorators:[g.autobind],
value:function(){this.stopDrag()}},{key:"onTouchEnd",decorators:[g.autobind],value:function(){this.stopDrag()}},{key:"onFileDrop",decorators:[g.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 r=new FileReader;r.onload=function(e){return t.loadImage(e.target.result)},r.readAsDataURL(n)}}},{key:"getImage",decorators:[g.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:[g.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{$$typeof:l,
type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:[v.default.createElement("canvas",{ref:"canvas",width:this.props.width,height:this.props.height,onTouchStart:this.onTouchStart,onMouseDown:this.onMouseDown}),{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"span",key:null,ref:null,props:{children:L,className:R.default.sliderEnd},_owner:null},{$$typeof:l,type:"span",key:null,ref:null,props:{children:{$$typeof:l,type:x.default,
key:null,ref:null,props:u(x.default.defaultProps,{className:R.default.slider,min:this.state.minScale,max:this.state.maxScale,step:.1,value:this.state.scale,onChange:this.onSliderChange}),_owner:null},className:R.default.sliderWrapper},_owner:null},{$$typeof:l,type:"span",key:null,ref:null,props:{children:N,className:R.default.sliderEnd},_owner:null}],className:R.default.sliderContainer},_owner:null}],className:R.default.avatarPane},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{
$$typeof:l,type:"p",key:null,ref:null,props:{children:{$$typeof:l,type:k.default,key:null,ref:null,props:u(k.default.defaultProps,{children:[(0,P.default)("Choose Photo"),{$$typeof:l,type:"input",key:null,ref:null,props:{style:{display:"none"},type:"file",onChange:this.onFileDrop,accept:"image/*"},_owner:null}],component:"label",className:R.default.avatarActionButtons}),_owner:null}},_owner:null},{$$typeof:l,type:"p",key:null,ref:null,props:{children:(0,P.default)("You can scale your photo using the slider below, and adjust the crop by dragging it within the circle."),
className:R.default.help},_owner:null}],className:R.default.avatarTextPane},_owner:null}],className:R.default.avatarContainer,onDrop:this.onFileDrop,onDragOver:this.onDragOver},_owner:null}}}]),t}(h.Component);j.propTypes={thumb:h.PropTypes.oneOfType([h.PropTypes.func,h.PropTypes.string]).isRequired,height:h.PropTypes.number,width:h.PropTypes.number,onChange:h.PropTypes.func},j.defaultProps={height:200,width:200,onChange:function(){}},t.default=(0,A.default)(j),e.exports=t.default},function(e,t,n){
"use strict";function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.providerIdentifier,o=e.isProgramGuide,l=e.selectedDirectory,d=e.activeSelectionType,f=e.hubEntityIDs,h=e.isHubsPending,g=e.hubsError,y=e.isEmpty;s(e,["serverEntityID","providerEntityID","providerIdentifier","isProgramGuide","selectedDirectory","activeSelectionType","hubEntityIDs","isHubsPending","hubsError","isEmpty"]);return{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{children:[d?{$$typeof:i,
type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{serverEntityID:t,providerEntityID:n}),_owner:null}:{$$typeof:i,type:I.default,key:null,ref:null,props:a(I.default.defaultProps,{serverEntityID:t,providerEntityID:n,selectedDirectory:l}),_owner:null},{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{children:[y?{$$typeof:i,type:_.default,key:null,ref:null,props:a(_.default.defaultProps,{serverEntityID:t,providerEntityID:n,providerIdentifier:r,isPending:h,error:g
}),_owner:null}:{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{serverEntityID:t,providerEntityID:n,hubEntityIDs:f}),_owner:null},o&&!y&&{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{className:C.default.attribution}),_owner:null}],innerClassName:C.default.dashboardPageContent}),_owner:null},o&&{$$typeof:i,type:w.default,key:null,ref:null,props:a(w.default.defaultProps,{serverEntityID:t,providerEntityID:n}),_owner:null}],scrollDirection:u.scrollDirections.NONE
}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=(o(l),n(30)),d=n(180),c=o(d),f=n(216),p=o(f),h=n(343),v=o(h),g=n(735),m=o(g),y=n(457),b=o(y),P=n(731),w=o(P),S=n(1782),_=o(S),T=n(1779),I=o(T),M=n(2144),C=o(M);r.propTypes={serverEntityID:l.PropTypes.string.isRequired,providerEntityID:l.PropTypes.string.isRequired,providerIdentifier:l.PropTypes.string.isRequired,isProgramGuide:l.PropTypes.bool.isRequired,
selectedDirectory:l.PropTypes.object.isRequired,activeSelectionType:l.PropTypes.string,hubEntityIDs:l.PropTypes.array.isRequired,isHubsPending:l.PropTypes.bool.isRequired,hubsError:l.PropTypes.object,isEmpty:l.PropTypes.bool.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,p.createSelector)((0,m.default)(),function(e){return e.ui.dashboardPage},M,w.default,function(e,t,n,r){return{isPagePopulated:t.isPagePopulated,providerIdentifier:e.identifier,isProgramGuide:v.providerIdentifiers.EPG_IDENTIFIER.test(e.identifier),
hubEntityIDs:t.hubs||[],isHubsPending:t.isHubsPending,hubsError:t.hubsError,isEmpty:n,activeSelectionType:r.activeSelectionType}})}var a=n(17).default,i=n(18).default,s=n(44).default,o=n(16).default,l=n(1).default,u=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=l(d),f=n(21),p=n(15),h=n(50),v=n(84),g=n(100),m=l(g),y=n(597),b=l(y),P=n(170),w=l(P),S=n(1380),_=u(S),T=n(1776),I=l(T),M=(0,p.createSelector)(b.default,function(e){return e.ui.dashboardPage.hubs},function(e){for(var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],n=t.length;n-- >0;){
var r=t[n],a=e[r];if(a.size||a.totalSize)return!1}return!0}),C=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=e.selectedDirectory;t!==this.props.selectedDirectory&&this._populate(e)}},{key:"componentWillUnmount",value:function(){this.props.clearDashboardPage()}},{key:"_populate",value:function(){
var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];(0,h.scheduleImmediateUpdate)(function(){e.initDashboardPage({serverEntityID:e.serverEntityID,hubKey:e.selectedDirectory.hubKey}),e.fetchHubs({options:{onlyTransient:!0}})})}},{key:"render",value:function(){return this.props.isPagePopulated?c.default.createElement(I.default,this.props):null}}]),t}(d.Component);C.propTypes={serverEntityID:d.PropTypes.string.isRequired,isPagePopulated:d.PropTypes.bool.isRequired,selectedDirectory:d.PropTypes.object.isRequired,
initDashboardPage:d.PropTypes.func.isRequired,clearDashboardPage:d.PropTypes.func.isRequired,fetchHubs:d.PropTypes.func.isRequired},t.default=(0,f.connect)(r,_)(C),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(5),p=u(f),h=n(24),v=n(31),g=u(v),m=n(30),y=n(55),b=u(y),P=n(272),w=u(P),S=n(181),_=u(S),T=n(182),I=u(T),M=n(341),C=u(M),x=n(217),E=u(x),k=n(469),D=u(k),A=n(757),O=u(A),R=n(470),L=u(R),N=n(2145),j=u(N),U={
$$typeof:l,type:D.default,key:null,ref:null,props:o(D.default.defaultProps,{}),_owner:null},$={$$typeof:l,type:E.default,key:null,ref:null,props:o(E.default.defaultProps,{children:{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{}),_owner:null}}),_owner:null},z=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isDirectoriesMenuOpen:!1}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){
return(0,g.default)(this,e,t)}},{key:"onDirectoriesMenuButtonPress",decorators:[h.autobind],value:function(e){this.setState({isDirectoriesMenuOpen:!this.state.isDirectoriesMenuOpen})}},{key:"onDirectoriesMenuClose",decorators:[h.autobind],value:function(){this.setState({isDirectoriesMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.machineIdentifier,n=e.providerIdentifier,r=e.isLibraryProvider,a=e.directories,i=e.selectedDirectory,s=e.isEPGRefreshing,u=e.epgActivityProgress,d=e.epgActivityTitle;
return{$$typeof:l,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{children:[{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{children:[r&&{$$typeof:l,type:"span",key:null,ref:null,props:{children:[(0,p.default)("Discover"),U]},_owner:null},c.default.createElement(O.default,{ref:"directoriesMenuButton",hasMenu:a.length>1,title:i.isHomeDirectory?(0,p.default)("All Libraries"):i.title,onPress:this.onDirectoriesMenuButtonPress}),{$$typeof:l,type:L.default,
key:null,ref:null,props:o(L.default.defaultProps,{target:this.refs.directoriesMenuButton,isOpen:this.state.isDirectoriesMenuOpen,machineIdentifier:t,providerIdentifier:n,isLibraryProvider:r,directories:a,selectedDirectory:i,onMenuClose:this.onDirectoriesMenuClose}),_owner:null}]}),_owner:null},s&&{$$typeof:l,type:C.default,key:null,ref:null,props:o(C.default.defaultProps,{children:[d," (",u,"%)",{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{className:j.default.refreshingSpinner,
size:m.sizes.SMALL}),_owner:null}]}),_owner:null},$]}),_owner:null}}}]),t}(d.Component);z.propTypes={machineIdentifier:d.PropTypes.string.isRequired,providerIdentifier:d.PropTypes.string.isRequired,isLibraryProvider:d.PropTypes.bool.isRequired,directories:d.PropTypes.array.isRequired,selectedDirectory:d.PropTypes.object.isRequired,isEPGRefreshing:d.PropTypes.bool,epgActivityProgress:d.PropTypes.number,epgActivityTitle:d.PropTypes.string},t.default=z,e.exports=t.default},function(e,t,n){"use strict";
function r(){return(0,u.createSelector)((0,c.default)(),(0,p.default)(),(0,v.default)(),(0,m.default)(),function(e,t,n,r){var a={machineIdentifier:e.machineIdentifier,providerIdentifier:t.identifier,isLibraryProvider:t.isLibraryProvider,directories:n};return r&&(a.isEPGRefreshing=!0,a.epgActivityProgress=r.progress,a.epgActivityTitle=r.title),a})}function a(e){return o.default.createElement(b.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(21),u=n(15),d=n(70),c=i(d),f=n(100),p=i(f),h=n(302),v=i(h),g=n(324),m=i(g),y=n(1778),b=i(y);
a.propTypes={serverEntityID:s.PropTypes.string.isRequired,providerEntityID:s.PropTypes.string.isRequired,libraryEntityID:s.PropTypes.string},t.default=(0,l.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.friendlyName,n=e.isFullServer,r=e.isFullOwnedServer,s=e.isPending,o=e.error,l=e.hasLibraries,c=e.onAddLibraryPress;return s?{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{
label:(0,u.default)("Loading dashboard")}),_owner:null}}),_owner:null}:o&&n?{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{title:(0,u.default)("There was an unexpected error loading the dashboard")}),_owner:null}:o&&!n?{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{title:(0,u.default)('The server "{1}" does not support the dashboard',t),description:(0,u.default)("Browse libraries using the sidebar")}),_owner:null}:l&&r?{$$typeof:i,type:g.default,
key:null,ref:null,props:a(g.default.defaultProps,{title:(0,u.default)("The dashboard is empty"),description:(0,u.default)("Browse and manage your libraries using the sidebar"),footer:(0,u.default)('Tip: The "Include in dashboard" advanced setting for each library allows content to be displayed here')}),_owner:null}:!l&&r?{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{children:(0,u.default)("Add Library"),
kind:d.kinds.PRIMARY,size:d.sizes.LARGE,onPress:c}),_owner:null},title:(0,u.default)("The dashboard is empty"),description:(0,u.default)("Add libraries with your media to make the most of Plex Media Server")}),_owner:null}:{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{title:(0,u.default)("The dashboard is empty"),description:(0,u.default)("Browse libraries using the sidebar")}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(30),c=n(55),f=s(c),p=n(81),h=s(p),v=n(151),g=s(v),m=n(185),y=s(m);r.propTypes={friendlyName:o.PropTypes.string.isRequired,isFullServer:o.PropTypes.bool.isRequired,isFullOwnedServer:o.PropTypes.bool.isRequired,hasLibraries:o.PropTypes.bool.isRequired,isPending:o.PropTypes.bool.isRequired,error:o.PropTypes.object,onAddLibraryPress:o.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,p.createSelector)((0,
g.default)(),function(e){return{friendlyName:e.friendlyName,isFullServer:e.isFullServer,isFullOwnedServer:e.isFullOwnedServer,hasLibraries:!!e.desktop.libraries.length}})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(11).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(21),p=n(15),h=n(24),v=n(70),g=u(v),m=n(110),y=n(1780),b=u(y),P=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments);
}return i(t,e),s(t,[{key:"onAddLibraryPress",decorators:[h.autobind],value:function(e){this.props.addLibrary({serverEntityID:this.props.serverEntityID})}},{key:"render",value:function(){return c.default.createElement(b.default,l({onAddLibraryPress:this.onAddLibraryPress},this.props))}}]),t}(d.Component);P.propTypes={serverEntityID:d.PropTypes.string.isRequired,addLibrary:d.PropTypes.func.isRequired},t.default=(0,f.connect)(r,{addLibrary:m.addLibrary})(P),e.exports=t.default},function(e,t,n){"use strict";
function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.providerIdentifier,s=e.isPending,o=e.error;return l.providerIdentifiers.EPG_IDENTIFIER.test(r)?{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{serverEntityID:t,providerEntityID:n,isPending:s,error:o}),_owner:null}:{$$typeof:i,type:d.default,key:null,ref:null,props:a(d.default.defaultProps,{serverEntityID:t,providerEntityID:n,isPending:s,error:o}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(84)),u=n(1781),d=s(u),c=n(1783),f=s(c);r.propTypes={serverEntityID:o.PropTypes.string.isRequired,providerEntityID:o.PropTypes.string.isRequired,providerIdentifier:o.PropTypes.string.isRequired,isPending:o.PropTypes.bool.isRequired,error:o.PropTypes.object},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.isPending,s=e.error;return r?{$$typeof:i,type:p.default,
key:null,ref:null,props:a(p.default.defaultProps,{children:{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{label:(0,u.default)("Loading guide")}),_owner:null}}),_owner:null}:s?{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{title:(0,u.default)("There was an unexpected error loading the Program Guide")}),_owner:null}:{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{serverEntityID:t,providerEntityID:n}),_owner:null
}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(55),c=s(d),f=n(151),p=s(f),h=n(185),v=s(h),g=n(730),m=s(g);r.propTypes={serverEntityID:o.PropTypes.string.isRequired,providerEntityID:o.PropTypes.string.isRequired,isPending:o.PropTypes.bool.isRequired,error:o.PropTypes.object},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.title,n=e.summary;return{$$typeof:a,type:"div",key:null,
ref:null,props:{children:[{$$typeof:a,type:"div",key:null,ref:null,props:{children:t,className:c.default.title},_owner:null},n&&{$$typeof:a,type:"div",key:null,ref:null,props:{children:{$$typeof:a,type:u.default,key:null,ref:null,props:i(u.default.defaultProps,{children:n}),_owner:null},className:c.default.summary},_owner:null}]},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(716)),u=s(l),d=n(2146),c=s(d);r.propTypes={
title:o.PropTypes.string,summary:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(11).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=d(c),p=n(5),h=d(p),v=n(24),g=n(423),m=d(g),y=n(166),b=d(y),P=n(1936),w=d(P),S=n(1937),_=d(S),T=n(55),I=d(T),M=n(78),C=d(M),x=n(185),E=d(x),k=n(1723),D=d(k),A=n(1784),O=d(A),R=n(2147),L=d(R),N=function(e){
function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n);var a=e.aspectRatios,i=e.columns,o=e.margin,l=e.cellMargin,u=null;a&&a.length&&(u=this.createLayout(a,i,o,l)),this.state={isHeaderMeasured:!1,headerHeight:null,scrollTop:0,layout:u}}return a(t,e),i(t,[{key:"componentWillReceiveProps",value:function(e){var t=e.aspectRatios,n=e.columns,r=e.margin,a=e.cellMargin;t===this.props.aspectRatios&&n===this.props.columns||this.setState({layout:this.createLayout(t,n,r,a)
})}},{key:"createLayout",value:function(e,t,n,r){var a=(0,_.default)({aspectRatios:e,columns:t});return(0,w.default)({columns:t,rows:a,margin:n,cellMargin:r})}},{key:"onHeaderMeasure",decorators:[v.autobind],value:function(e){var t=e.height;this.setState({isHeaderMeasured:!0,headerHeight:t})}},{key:"onScrollPositionChange",decorators:[v.autobind],value:function(e){var t=e.scrollTop;this.setState({scrollTop:t})}},{key:"renderCell",decorators:[v.autobind],value:function(e){return f.default.createElement(D.default,u({
serverEntityID:this.props.serverEntityID},e))}},{key:"render",value:function(){var e=this.props,t=e.metadataItems,n=e.width,r=e.height,a=e.summary,i=e.title,s=e.serverEntityID,u=e.itemsError,d=e.itemsIsPopulated,c=this.state,f=c.isHeaderMeasured,p=c.headerHeight,v=c.layout,g=c.scrollTop,y=v&&d&&f;return u?{$$typeof:l,type:E.default,key:null,ref:null,props:o(E.default.defaultProps,{title:(0,h.default)("There was an unexpected error loading the photo album")}),_owner:null}:{$$typeof:l,type:C.default,
key:null,ref:null,props:o(C.default.defaultProps,{children:[{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:{$$typeof:l,type:O.default,key:null,ref:null,props:o(O.default.defaultProps,{title:i,summary:a}),_owner:null},onMeasure:this.onHeaderMeasure}),_owner:null},y?{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:m.default,key:null,ref:null,props:o(m.default.defaultProps,{className:L.default.album,serverEntityID:s,items:t,keyPropName:"metadataItemEntityID",
size:t.length,cellRenderer:this.renderCell,viewportWidth:n,viewportHeight:r,scrollTop:g-p,layout:v}),_owner:null},className:L.default.body},_owner:null}:{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{label:(0,h.default)("Loading photos")}),_owner:null},className:L.default.spinner},_owner:null}],className:L.default.scroller,scrollTop:g,onScrollPositionChange:this.onScrollPositionChange}),_owner:null}}}]),t}(c.Component);
N.propTypes={serverEntityID:c.PropTypes.string,title:c.PropTypes.string,summary:c.PropTypes.string,metadataItems:c.PropTypes.array,aspectRatios:c.PropTypes.array,columns:c.PropTypes.number,margin:c.PropTypes.number,cellMargin:c.PropTypes.number,width:c.PropTypes.number,height:c.PropTypes.number,itemsError:c.PropTypes.object,itemsIsPopulated:c.PropTypes.bool},N.defaultProps={columns:1,margin:35,cellMargin:5},t.default=N,e.exports=t.default},function(e,t,n){"use strict";function r(){var e=(0,y.default)(),t=(0,
p.createSelector)(e,S.default,function(e,t){return void 0===e&&(e={}),t[e.children]}),n=(0,p.createSelector)(t,P.default,function(e,t){void 0===e&&(e={});var n=e.metadataItems;return n?n.map(function(e){var n=t[e],r=n.Media[0];if(!r||!r.Part[0])return 1;var a=r.width,i=r.height,s=l(r.Part,1),o=s[0].orientation;return(0,v.default)(o)?i/a:a/i}):[]});return(0,p.createSelector)(e,t,n,function(e,t,n){void 0===e&&(e={}),void 0===t&&(t={});var r=t.metadataItems,a=t.isPopulated,i=t.error,s=e.title,o=e.summary;
return{title:s,summary:o,metadataItems:r,aspectRatios:n,itemsError:i,itemsIsPopulated:a}})}var a=n(17).default,i=n(18).default,s=n(44).default,o=n(16).default,l=n(93).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(21),p=n(15),h=n(1116),v=u(h),g=n(50),m=n(48),y=u(m),b=n(301),P=u(b),w=n(598),S=u(w),_=n(208),T=n(1787),I=u(T),M=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(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,g.scheduleImmediateUpdate)(function(){e.viewItemDetails(e.metadataItemEntityID)})}},{key:"render",value:function(){return c.default.createElement(I.default,this.props)}}]),t}(d.Component);
M.propTypes={metadataItemEntityID:d.PropTypes.string.isRequired,viewItemDetails:d.PropTypes.func.isRequired},t.default=(0,f.connect)(r,{viewItemDetails:_.viewItemDetails})(M),e.exports=t.default},function(e,t,n){"use strict";function r(e){return{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{children:function(t){var n=t.isMeasured,r=t.width,a=t.height;if(!n)return null;var i=Math.ceil(r/g);return u.default.createElement(p.default,s({className:v.default.album,columns:i,
width:r,height:a},e))},className:v.default.container}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(166),c=o(d),f=n(1785),p=o(f),h=n(2148),v=o(h),g=400;t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{children:{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{
children:l.default.createElement(d.default,e)}),_owner:null},machineIdentifier:e.machineIdentifier}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(1786),d=s(u),c=n(183),f=s(c),p=n(184),h=s(p);r.propTypes={machineIdentifier:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return u.default.createElement(m.default,s({title:(0,c.default)("Plex is down for maintenance"),
description:(0,c.default)("Don't worry, it will be back soon")},e),{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:"status.plex.tv",to:f.SYSTEM_STATUS_URL,target:"_blank",kind:p.kinds.PRIMARY}),_owner:null})}var a=n(10).default,i=n(7).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(398),p=n(30),h=n(34),v=o(h),g=n(150),m=o(g);t.default=r,e.exports=t.default},function(e,t,n){"use strict";
function r(e){var t=e.outOfDateServers,n=e.isDownForMaintenance,r=e.hasFailedResources,s=e.hasPlexPass,o=e.isUserRestricted,l=e.onDownloadServer;return t.length?{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{outOfDateServers:t}),_owner:null}:n?P:r?w:o?{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{title:(0,u.default)("No shared libraries"),description:(0,u.default)("A user in your home needs to share a library with you")}),_owner:null}:{
$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{hasPlexPass:s,onDownloadServer:l}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(150),c=s(d),f=n(275),p=s(f),h=n(1789),v=s(h),g=n(1793),m=s(g),y=n(1792),b=s(y),P={$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{}),_owner:null},w={$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{}),
_owner:null};r.propTypes={outOfDateServers:o.PropTypes.array.isRequired,isDownForMaintenance:o.PropTypes.bool.isRequired,hasFailedResources:o.PropTypes.bool.isRequired,hasPlexPass:o.PropTypes.bool.isRequired,isUserRestricted:o.PropTypes.bool.isRequired,onDownloadServer:o.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return o.default.createElement(u.default,a({iconClassName:c.default.icon,icon:"plex-icon-alert-560"},e))}var a=n(11).default,i=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(151),u=i(l),d=n(2151),c=i(d);t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(5)),f=u(c),p=n(24),h=n(30),v=n(31),g=u(v),m=n(78),y=u(m),b=n(34),P=u(b),w=n(81),S=u(w),_=n(485),T=u(_),I=n(2152),M=u(I),C=n(2701),x=u(C),E={context:"serverDownload",
firstRun:!0},k=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isDownloadStep:!0,isPlexPassModalOpen:!e.hasPlexPass}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"onDownloadPress",decorators:[p.autobind],value:function(e){this.setState({isDownloadStep:!1}),this.props.onDownloadServer(e.currentTarget.dataset.type)}},{key:"onPlexPassModalClose",decorators:[p.autobind],
value:function(){this.setState({isPlexPassModalOpen:!1})}},{key:"render",value:function(){var e=this.state,t=e.isDownloadStep,n=e.isPlexPassModalOpen;return{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"img",key:null,ref:null,props:{className:M.default.pmsLogo,src:x.default},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:t?(0,f.default)("Get your Plex Media Server"):(0,
f.default)("Install your new server"),className:M.default.title},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:t?(0,f.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,f.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."),className:M.default.description},_owner:null},t&&{$$typeof:l,
type:S.default,key:null,ref:null,props:o(S.default.defaultProps,{children:(0,f.default)("Download Plex Media Server"),className:M.default.button,kind:h.kinds.PRIMARY,size:h.sizes.LARGE,"data-type":"computer",onPress:this.onDownloadPress}),_owner:null},!t&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:(0,f.default)("Need to download different server?"),className:M.default.downloadMessage},_owner:null},!t&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,
f.default)("Download for Computer Platforms"),className:M.default.link,kind:h.kinds.PRIMARY,"data-type":"computer",onPress:this.onDownloadPress}),_owner:null},{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:(0,f.default)("Download for NAS Platforms"),className:M.default.link,kind:h.kinds.PRIMARY,"data-type":"nas",onPress:this.onDownloadPress}),_owner:null}],className:M.default.content},_owner:null},{$$typeof:l,type:T.default,key:null,ref:null,props:o(T.default.defaultProps,{
metricsProperties:E,isOpen:n,onModalClose:this.onPlexPassModalClose}),_owner:null}],className:M.default.emptyPage}),_owner:null}}}]),t}(d.Component);k.propTypes={hasPlexPass:d.PropTypes.bool,onDownloadServer:d.PropTypes.func.isRequired},t.default=k,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.outOfDateServers,n="/web/index.html#!/settings/server",r="/web/index.html";return{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:{$$typeof:i,type:"div",
key:null,ref:null,props:{children:t.map(function(e){var t=e.activeConnection,s=e.isShared;return t?{$$typeof:i,type:v.default,key:e.machineIdentifier,ref:null,props:a(v.default.defaultProps,{children:e.friendlyName,className:b.default.updateLink,to:f.join([t.uri,s?r:n]),target:"_self",kind:p.kinds.PRIMARY,size:p.sizes.LARGE}),_owner:null}:{$$typeof:i,type:"span",key:e.machineIdentifier,ref:null,props:{children:(0,d.default)("{1} (Unavailable)",e.friendlyName),className:b.default.updateDisabledLink
},_owner:null}})},_owner:null},title:(0,d.default)("Update your Plex Media Server"),description:(0,d.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")}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=(s(l),n(5)),d=s(u),c=n(26),f=o(c),p=n(30),h=n(34),v=s(h),g=n(150),m=s(g),y=n(2153),b=s(y);r.propTypes={
outOfDateServers:l.PropTypes.array.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.metadataListEntityID,s=e.providerIdentifier,o=e.isProgramGuide,l=e.selectedDirectory,c=e.showLibrarySpinner,p=e.showLibraryError,v=e.listType,m=e.listTitle,b=e.activeSelectionType,w=e.activeType,_=e.activeFilters,I=e.activeFilterLabel,C=e.activeSort;return c?{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{
children:{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{label:(0,u.default)("Loading library")}),_owner:null}}),_owner:null}:p?{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{title:(0,u.default)("There was an unexpected error loading this library")}),_owner:null}:{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{children:[b?{$$typeof:i,type:S.default,key:null,ref:null,props:a(S.default.defaultProps,{serverEntityID:t,
providerEntityID:n}),_owner:null}:{$$typeof:i,type:x.default,key:null,ref:null,props:a(x.default.defaultProps,{serverEntityID:t,providerEntityID:n,selectedDirectory:l,metadataListEntityID:r,activeType:w,activeFilters:_,activeFilterLabel:I,activeSort:C}),_owner:null},{$$typeof:i,type:P.default,key:null,ref:null,props:a(P.default.defaultProps,{children:o&&{$$typeof:i,type:T.default,key:null,ref:null,props:a(T.default.defaultProps,{className:A.default.attribution}),_owner:null},component:k.default,serverEntityID:t,
providerEntityID:n,metadataListEntityID:r,providerIdentifier:s,listType:v,listTitle:m,activeType:w,activeFilters:_,activeSort:C,initialSize:50}),_owner:null},o&&{$$typeof:i,type:M.default,key:null,ref:null,props:a(M.default.defaultProps,{serverEntityID:t,providerEntityID:n}),_owner:null}],scrollDirection:d.scrollDirections.NONE}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(30),c=n(55),f=s(c),p=n(180),h=s(p),v=n(149),g=s(v),m=n(275),y=s(m),b=n(337),P=s(b),w=n(343),S=s(w),_=n(457),T=s(_),I=n(731),M=s(I),C=n(1798),x=s(C),E=n(1796),k=s(E),D=n(2154),A=s(D);
r.propTypes={serverEntityID:o.PropTypes.string.isRequired,providerEntityID:o.PropTypes.string.isRequired,metadataListEntityID:o.PropTypes.string.isRequired,providerIdentifier:o.PropTypes.string.isRequired,isProgramGuide:o.PropTypes.bool.isRequired,selectedDirectory:o.PropTypes.object.isRequired,showLibrarySpinner:o.PropTypes.bool.isRequired,showLibraryError:o.PropTypes.bool.isRequired,listType:o.PropTypes.string,listTitle:o.PropTypes.string,activeSelectionType:o.PropTypes.string,activeType:o.PropTypes.string,
activeFilters:o.PropTypes.object.isRequired,activeFilterLabel:o.PropTypes.string,activeSort:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,p.createSelector)(function(e){return e.ui.libraryPage},(0,y.default)(),(0,S.default)(),P.default,function(e,t,n,r){void 0===n&&(n={});var a=e.isPagePopulated,i=e.metadataList,s=e.isMetadataTypesPending,o=e.isMetadataTypesPopulated,l=e.metadataTypesError,u=v.default.get(n.type),d=u?u.typeString:void 0;return{
isPagePopulated:a,metadataListEntityID:i,providerIdentifier:t.identifier,isProgramGuide:g.providerIdentifiers.EPG_IDENTIFIER.test(t.identifier),showLibrarySpinner:!o&&!l,showLibraryError:!s&&!!l,listType:d,listTitle:n.title,activeSelectionType:r.activeSelectionType}})}var a=n(17).default,i=n(18).default,s=n(44).default,o=n(16).default,l=n(1).default,u=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=l(d),f=n(21),p=n(15),h=n(37),v=l(h),g=n(84),m=n(100),y=l(m),b=n(170),P=l(b),w=n(323),S=l(w),_=n(50),T=n(322),I=u(T),M=n(1794),C=l(M),x=function(e){
function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=e.selectedDirectory,n=t&&t.key,r=this.props.selectedDirectory&&this.props.selectedDirectory.key;n&&n!==r&&this._populate(e)}},{key:"componentWillUnmount",value:function(){this.props.clearLibraryPage()}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];
e.selectedDirectory&&(0,_.scheduleImmediateUpdate)(function(){e.initLibraryPage({serverEntityID:e.serverEntityID,libraryKey:e.selectedDirectory.key,activeType:e.activeType,activeFilters:e.activeFilters,activeSort:e.activeSort}),e.populateLibraryMetadataTypes(),e.populateLibraryFirstCharacters()})}},{key:"render",value:function(){return this.props.isPagePopulated?c.default.createElement(C.default,this.props):null}}]),t}(d.Component);x.propTypes={isPagePopulated:d.PropTypes.bool.isRequired,serverEntityID:d.PropTypes.string.isRequired,
selectedDirectory:d.PropTypes.object.isRequired,activeType:d.PropTypes.string,activeFilters:d.PropTypes.object.isRequired,activeSort:d.PropTypes.string,initLibraryPage:d.PropTypes.func.isRequired,clearLibraryPage:d.PropTypes.func.isRequired,populateLibraryMetadataTypes:d.PropTypes.func.isRequired,populateLibraryFirstCharacters:d.PropTypes.func.isRequired},t.default=(0,f.connect)(r,I)(x),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.providerIdentifier,s=e.metadataItemEntityIDs,o=e.totalSize,u=e.isPending,c=e.isPopulated,p=e.error,v=e.activeType,g=e.activeFilters,m=e.activeSort,y=o||s.length;
return u||c&&y?l.default.createElement(f.default,e):{$$typeof:i,type:d.default,key:null,ref:null,props:a(d.default.defaultProps,{children:{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{serverEntityID:t,providerEntityID:n,providerIdentifier:r,error:p,activeType:v,activeFilters:g,activeSort:m}),_owner:null}}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(216),d=s(u),c=n(762),f=s(c),p=n(1799),h=s(p);
r.propTypes={serverEntityID:o.PropTypes.string.isRequired,providerEntityID:o.PropTypes.string.isRequired,providerIdentifier:o.PropTypes.string.isRequired,metadataItemEntityIDs:o.PropTypes.array.isRequired,totalSize:o.PropTypes.number,isPending:o.PropTypes.bool.isRequired,isPopulated:o.PropTypes.bool.isRequired,error:o.PropTypes.object,activeType:o.PropTypes.string,activeFilters:o.PropTypes.object.isRequired,activeSort:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";
var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(19).default,d=n(11).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=c(f),h=n(5),v=c(h),g=n(24),m=n(31),y=c(m),b=n(75),P=c(b),w=n(74),S=c(w),_=n(782),T=c(_),I=n(332),M=c(I),C=n(752),x=c(C),E=n(272),k=c(E),D=n(181),A=c(D),O=n(182),R=c(O),L=n(217),N=c(L),j=n(470),U=c(j),$=n(761),z=c($),F=n(1805),B=c(F),V=n(1807),H=c(V),q=n(1806),W=c(q),G=n(2155),Y=c(G),Q={$$typeof:l,
type:N.default,key:null,ref:null,props:o(N.default.defaultProps,{children:{$$typeof:l,type:k.default,key:null,ref:null,props:o(k.default.defaultProps,{}),_owner:null}}),_owner:null},K=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isDirectoriesMenuOpen:!1,isFiltersMenuOpen:!1,isTypesMenuOpen:!1,isSortsMenuOpen:!1}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,y.default)(this,e,t)}},{key:"onDirectoriesMenuButtonPress",
decorators:[g.autobind],value:function(e){this.setState({isDirectoriesMenuOpen:!this.state.isDirectoriesMenuOpen})}},{key:"onDirectoriesMenuClose",decorators:[g.autobind],value:function(){this.setState({isDirectoriesMenuOpen:!1})}},{key:"onFiltersMenuButtonPress",decorators:[g.autobind],value:function(e){this.setState({isFiltersMenuOpen:!this.state.isFiltersMenuOpen})}},{key:"onFiltersMenuClose",decorators:[g.autobind],value:function(){this.setState({isFiltersMenuOpen:!1})}},{key:"onTypesMenuButtonPress",
decorators:[g.autobind],value:function(e){this.setState({isTypesMenuOpen:!this.state.isTypesMenuOpen})}},{key:"onTypesMenuClose",decorators:[g.autobind],value:function(){this.setState({isTypesMenuOpen:!1})}},{key:"onSortsMenuButtonPress",decorators:[g.autobind],value:function(e){this.setState({isSortsMenuOpen:!this.state.isSortsMenuOpen})}},{key:"onSortsMenuClose",decorators:[g.autobind],value:function(){this.setState({isSortsMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.server,r=e.provider,a=e.directories,i=e.selectedDirectory,s=e.activeType,c=e.activeFilters,f=e.activeFilterLabel,h=e.activeSort,g=e.metadataTypes,m=e.selectedType,y=e.selectedFilterTitle,b=e.selectedSort,P=e.metadataItems,w=e.totalSize,S=u(e,["serverEntityID","server","provider","directories","selectedDirectory","activeType","activeFilters","activeFilterLabel","activeSort","metadataTypes","selectedType","selectedFilterTitle","selectedSort","metadataItems","totalSize"]),_=!r.isLibraryProvider&&a.length>1,I=!!m&&m.filters.length>0,C=!!m&&g.length>1,E=!!b&&m.sorts.length>1,k=(0,
T.default)(this.props);return{$$typeof:l,type:A.default,key:null,ref:null,props:o(A.default.defaultProps,{children:[{$$typeof:l,type:R.default,key:null,ref:null,props:o(R.default.defaultProps,{children:[_&&p.default.createElement(z.default,{ref:"directoriesMenuButton",title:i.title,isSelected:!0,onPress:this.onDirectoriesMenuButtonPress}),_&&{$$typeof:l,type:U.default,key:null,ref:null,props:o(U.default.defaultProps,{target:this.refs.directoriesMenuButton,isOpen:this.state.isDirectoriesMenuOpen,machineIdentifier:n.machineIdentifier,
providerIdentifier:r.identifier,isLibraryProvider:r.isLibraryProvider,directories:a,selectedDirectory:i,onMenuClose:this.onDirectoriesMenuClose}),_owner:null},I&&p.default.createElement(z.default,{ref:"filtersMenuButton",title:y,onPress:this.onFiltersMenuButtonPress}),I&&{$$typeof:l,type:B.default,key:null,ref:null,props:o(B.default.defaultProps,{serverEntityID:t,target:this.refs.filtersMenuButton,isOpen:this.state.isFiltersMenuOpen,activeType:s,activeFilters:c,activeFilterLabel:f,activeSort:h,selectedType:m,
onMenuClose:this.onFiltersMenuClose}),_owner:null},C&&p.default.createElement(z.default,{ref:"typesMenuButton",title:m.title,onPress:this.onTypesMenuButtonPress}),C&&{$$typeof:l,type:H.default,key:null,ref:null,props:o(H.default.defaultProps,{target:this.refs.typesMenuButton,isOpen:this.state.isTypesMenuOpen,types:g,selectedType:m,onMenuClose:this.onTypesMenuClose}),_owner:null},E&&p.default.createElement(z.default,{ref:"sortsMenuButton",title:(0,v.default)("By {1}",b.title),onPress:this.onSortsMenuButtonPress
}),E&&{$$typeof:l,type:W.default,key:null,ref:null,props:o(W.default.defaultProps,{target:this.refs.sortsMenuButton,isOpen:this.state.isSortsMenuOpen,activeType:s,activeFilters:c,activeFilterLabel:f,activeSort:h,sorts:m.sorts,selectedSort:b,onMenuClose:this.onSortsMenuClose}),_owner:null},{$$typeof:l,type:M.default,key:null,ref:null,props:o(M.default.defaultProps,{children:w||P.length,className:Y.default.badge}),_owner:null}]}),_owner:null},p.default.createElement(x.default,d({server:n},S,k)),Q]}),
_owner:null}}}]),t}(f.Component);K.propTypes={serverEntityID:f.PropTypes.string.isRequired,server:P.default.isRequired,provider:S.default.isRequired,directories:f.PropTypes.array.isRequired,selectedDirectory:f.PropTypes.object.isRequired,activeType:f.PropTypes.string,activeFilters:f.PropTypes.object.isRequired,activeFilterLabel:f.PropTypes.string,activeSort:f.PropTypes.string,selectedType:f.PropTypes.object,selectedFilterTitle:f.PropTypes.string,selectedSort:f.PropTypes.object,metadataTypes:f.PropTypes.array.isRequired,
metadataItems:f.PropTypes.array.isRequired,totalSize:f.PropTypes.number},t.default=K,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,p.createSelector)((0,_.default)(),(0,m.default)(),(0,b.default)(),I.default,(0,w.default)(),(0,C.default)(),(0,E.default)(),(0,D.default)(),function(e,t,n,r,a,s,o,l){var d=u.default.pick(a,"metadataItems","totalSize","allowSync","isFirstItemLibraryItem"),c=s&&v.default.get(s.type),f=c&&c.typeString,p=f||a.firstItemType;return i({server:e,provider:t,
directories:n,metadataTypes:r,selectedType:s,selectedFilterTitle:o,selectedSort:l,listType:p},d)})}function a(e){return c.default.createElement(j.default,e)}var i=n(11).default,s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=s(l),d=n(4),c=s(d),f=n(21),p=n(15),h=n(37),v=s(h),g=n(73),m=s(g),y=n(302),b=s(y),P=n(300),w=s(P),S=n(67),_=s(S),T=n(684),I=s(T),M=n(323),C=s(M),x=n(1395),E=s(x),k=n(1396),D=s(k),A=n(169),O=o(A),R=n(322),L=o(R),N=n(1797),j=s(N),U=i({},L,O);
a.propTypes={serverEntityID:d.PropTypes.string.isRequired,providerEntityID:d.PropTypes.string.isRequired,metadataListEntityID:d.PropTypes.string.isRequired,activeType:d.PropTypes.string,activeFilters:d.PropTypes.object.isRequired,activeFilterLabel:d.PropTypes.string,activeSort:d.PropTypes.string},t.default=(0,f.connect)(r,U)(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.providerIdentifier,s=e.error,o=e.activeType,u=e.activeFilters,d=e.activeSort;
return s?{$$typeof:i,type:w.default,key:null,ref:null,props:a(w.default.defaultProps,{title:(0,c.default)("There was an unexpected error loading this library")}),_owner:null}:l.default.isEmpty(u)?f.providerIdentifiers.EPG_IDENTIFIER.test(r)?{$$typeof:i,type:_.default,key:null,ref:null,props:a(_.default.defaultProps,{serverEntityID:t,providerEntityID:n}),_owner:null}:{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{title:(0,c.default)("There are no items in this library")
}),_owner:null}:{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{children:{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:(0,c.default)("Clear filter"),to:(0,v.default)({type:o,sort:d}),kind:p.kinds.PRIMARY}),_owner:null},title:(0,c.default)("The active filter has no matches"),description:(0,c.default)("Use the menu above to change the active filter")}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var o=n(3),l=s(o),u=n(4),d=(s(u),n(5)),c=s(d),f=n(84),p=n(30),h=n(220),v=s(h),g=n(34),m=s(g),y=n(151),b=s(y),P=n(185),w=s(P),S=n(730),_=s(S);r.propTypes={serverEntityID:u.PropTypes.string.isRequired,providerEntityID:u.PropTypes.string.isRequired,providerIdentifier:u.PropTypes.string.isRequired,error:u.PropTypes.object,activeType:u.PropTypes.string,activeFilters:u.PropTypes.object.isRequired,activeSort:u.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){
var t=e.activeType,n=e.activeFilters,r=e.activeFilterLabel,s=e.activeSort,o=e.filter,u=e.title,c=n[o],p=(0,d.default)(c,"1");return{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:u,to:(0,g.default)({type:t,filters:p?(0,h.default)(n,o):(0,f.default)(n,o,{value:"1",type:l.BOOLEAN}),filterLabel:r,sort:s}),isSelected:p}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(164)),u=n(621),d=s(u),c=n(618),f=s(c),p=n(622),h=s(p),v=n(220),g=s(v),m=n(126),y=s(m);
r.propTypes={activeType:o.PropTypes.string,activeFilters:o.PropTypes.object.isRequired,activeFilterLabel:o.PropTypes.string,activeSort:o.PropTypes.string,filter:o.PropTypes.string.isRequired,title:o.PropTypes.string.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(5)),f=u(c),p=n(24),h=n(30),v=n(31),g=u(v),m=n(36),y=u(m),b=n(55),P=u(b),w=n(147),S=u(w),_=n(2157),T=u(_),I=function(e){
function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"onPress",decorators:[p.autobind],value:function(e){this.props.onFilterSelect(this.props.filterKey)}},{key:"render",value:function(){var e=this.props,t=e.activeFilters,n=e.filter,r=e.title,a=e.showSpinner,i=!a&&!!t[n];return{$$typeof:l,type:S.default,key:null,ref:null,props:o(S.default.defaultProps,{
children:{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:r,className:T.default.menuLabel},_owner:null},a&&{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{className:T.default.spinner,size:h.sizes.SMALL}),_owner:null},!a&&i&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{name:"plex-icon-selected-560","aria-label":(0,f.default)("Selected")
}),_owner:null},className:T.default.selectedIcon},_owner:null}],className:T.default.menuItemContainer},_owner:null},className:i?T.default.isSelected:void 0,onPress:this.onPress}),_owner:null}}}]),t}(d.Component);I.propTypes={activeFilters:d.PropTypes.object.isRequired,filterKey:d.PropTypes.string.isRequired,filter:d.PropTypes.string.isRequired,title:d.PropTypes.string.isRequired,showSpinner:d.PropTypes.bool.isRequired,onFilterSelect:d.PropTypes.func.isRequired},t.default=I,e.exports=t.default},function(e,t,n){
"use strict";function r(e){var t=e.className,n=e.activeType,r=e.activeFilters,s=e.activeSort,o=e.selectedFilter,l=e.filterOptions,c=e.filterOptionQuery,p=e.showError,v=e.showSearchInput,m=e.onFilterDeselect,b=e.onSearch;if(!o)return null;var w=o.filter;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:S.default,key:null,ref:null,props:i(S.default.defaultProps,{
children:{$$typeof:a,type:P.default,key:null,ref:null,props:i(P.default.defaultProps,{className:k.default.backIcon,name:"plex-icon-hub-prev-560","aria-label":(0,u.default)("Back")}),_owner:null},onPress:m}),_owner:null},{$$typeof:a,type:"span",key:null,ref:null,props:{children:o.title,className:k.default.filterText},_owner:null}],className:k.default.headerTitle},_owner:null},v&&{$$typeof:a,type:x.default,key:null,ref:null,props:i(x.default.defaultProps,{className:k.default.searchInput,name:"filterOptionQuery",
placeholder:(0,u.default)("Filter {1}",o.title),value:c,onChange:b}),_owner:null}],className:k.default.header},_owner:null},D,{$$typeof:a,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{children:[p&&{$$typeof:a,type:"div",key:null,ref:null,props:{children:(0,u.default)("Unable to load options"),className:k.default.emptyText},_owner:null},!p&&!l.length&&{$$typeof:a,type:"div",key:null,ref:null,props:{children:(0,u.default)("No options"),className:k.default.emptyText},_owner:null},l.map(function(e){
var t=e.key,o=e.title,l=e.isSelected;return{$$typeof:a,type:M.default,key:t,ref:null,props:i(M.default.defaultProps,{children:o,className:k.default.filterOptionMenuItem,to:(0,g.default)({type:n,filters:l?(0,h.default)(r,w,t):(0,f.default)(r,w,{value:t,type:d.OTHER}),filterLabel:l?void 0:o,sort:s}),isSelected:l}),_owner:null}})],className:v?k.default.filterOptionsWithSearchScroller:k.default.filterOptionsScroller,autoScroll:!0}),_owner:null}],className:t},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(164),c=n(618),f=s(c),p=n(622),h=s(p),v=n(220),g=s(v),m=n(78),y=s(m),b=n(36),P=s(b),w=n(34),S=s(w),_=n(453),T=s(_),I=n(126),M=s(I),C=n(213),x=s(C),E=n(2158),k=s(E),D={$$typeof:a,type:T.default,key:null,ref:null,props:i(T.default.defaultProps,{}),_owner:null};r.propTypes={className:o.PropTypes.string,activeType:o.PropTypes.string,activeFilters:o.PropTypes.object.isRequired,activeSort:o.PropTypes.string,selectedFilter:o.PropTypes.object,
filterOptions:o.PropTypes.array.isRequired,filterOptionQuery:o.PropTypes.string,showError:o.PropTypes.bool.isRequired,showSearchInput:o.PropTypes.bool.isRequired,onFilterDeselect:o.PropTypes.func.isRequired,onSearch:o.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.activeType,r=e.activeFilters,s=e.activeFilterLabel,o=e.activeSort,u=e.filters,d=e.selectedFilter,f=e.showSpinner,v=e.onFilterSelect,m=l.default.groupBy(u,function(e){
var t=e.filterType;return t===h.BOOLEAN?t:h.OTHER}),b=m[h.BOOLEAN],w=m[h.OTHER];return{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:[{$$typeof:i,type:P.default,key:"all",ref:null,props:a(P.default.defaultProps,{children:(0,p.default)("All"),to:(0,g.default)({type:n,sort:o}),isSelected:l.default.isEmpty(r)}),_owner:null},!!b&&b.map(function(e){return{$$typeof:i,type:T.default,key:e.filter,ref:null,props:a(T.default.defaultProps,{activeType:n,activeFilters:r,
activeFilterLabel:s,activeSort:o,filter:e.filter,title:e.title}),_owner:null}}),!!w&&E,!!w&&w.map(function(e){var t=!(!d||d.filter!==e.filter);return{$$typeof:i,type:M.default,key:e.filter,ref:null,props:a(M.default.defaultProps,{activeType:n,activeFilters:r,activeSort:o,filter:e.filter,filterKey:e.key,title:e.title,showSpinner:f&&t,onFilterSelect:v}),_owner:null}})],className:(0,c.default)(t,x.default.filtersScroller),autoScroll:!0}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=s(o),u=n(4),d=(s(u),n(33)),c=s(d),f=n(5),p=s(f),h=n(164),v=n(220),g=s(v),m=n(78),y=s(m),b=n(126),P=s(b),w=n(453),S=s(w),_=n(1800),T=s(_),I=n(1801),M=s(I),C=n(2159),x=s(C),E={$$typeof:i,type:S.default,key:null,ref:null,props:a(S.default.defaultProps,{}),_owner:null};r.propTypes={className:u.PropTypes.string,activeType:u.PropTypes.string,activeFilters:u.PropTypes.object.isRequired,activeFilterLabel:u.PropTypes.string,activeSort:u.PropTypes.string,
filters:u.PropTypes.array.isRequired,selectedFilter:u.PropTypes.object,showSpinner:u.PropTypes.bool.isRequired,onFilterSelect:u.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.target,n=e.isOpen,r=e.activeType,o=e.activeFilters,l=e.activeFilterLabel,u=e.activeSort,c=e.filters,p=e.selectedFilter,h=e.filterOptions,g=e.filterOptionQuery,y=e.showSpinner,P=e.showError,_=e.showSearchInput,T=e.onFilterSelect,I=e.onFilterDeselect,M=e.onSearch,C=e.onMenuClose,x=(s(e,["target","isOpen","activeType","activeFilters","activeFilterLabel","activeSort","filters","selectedFilter","filterOptions","filterOptionQuery","showSpinner","showError","showSearchInput","onFilterSelect","onFilterDeselect","onSearch","onMenuClose"]),
p&&!y);return{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{className:w.default.filtersPane,activeType:r,activeFilters:o,activeFilterLabel:l,activeSort:u,filters:c,selectedFilter:p,showSpinner:y,onFilterSelect:T}),_owner:null},{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{className:w.default.filterOptionsPane,
activeType:r,activeFilters:o,activeSort:u,selectedFilter:p,filterOptions:h,filterOptionQuery:g,showError:P,showSearchInput:_,onFilterDeselect:I,onSearch:M}),_owner:null}],className:(0,d.default)(w.default.panesContainer,x&&w.default.showFilterOptions)},_owner:null},className:w.default.filtersMenu,target:t,isOpen:n,scrollerProps:S,onMenuClose:(0,f.default)(I,C)}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=(o(l),
n(33)),d=o(u),c=n(167),f=o(c),p=n(30),h=n(104),v=o(h),g=n(1803),m=o(g),y=n(1802),b=o(y),P=n(2160),w=o(P),S={scrollDirection:p.scrollDirections.NONE};r.propTypes={target:l.PropTypes.object,isOpen:l.PropTypes.bool,activeType:l.PropTypes.string,activeFilters:l.PropTypes.object.isRequired,activeFilterLabel:l.PropTypes.string,activeSort:l.PropTypes.string,filters:l.PropTypes.array.isRequired,selectedFilter:l.PropTypes.object,filterOptions:l.PropTypes.array.isRequired,filterOptionQuery:l.PropTypes.string,
showSpinner:l.PropTypes.bool.isRequired,showError:l.PropTypes.bool.isRequired,showSearchInput:l.PropTypes.bool.isRequired,onFilterSelect:l.PropTypes.func.isRequired,onFilterDeselect:l.PropTypes.func.isRequired,onSearch:l.PropTypes.func.isRequired,onMenuClose:l.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,g.createSelector)(function(e,t){var n=t.activeFilters;return n},function(e,t){var n=t.selectedType;return n},function(e){return e.ui.libraryPage;
},(0,b.default)(),function(e,t,n,r){var a=n.selectedFilterKey,i=n.filterOptionQuery,s=n.selectedFilterOptions,o=void 0===s?[]:s,l=n.isSelectedFilterOptionsPopulated,u=n.selectedFilterOptionsError,d=t&&t.filters,c=a&&f.default.findWhere(d,{key:a});return{filters:d,selectedFilter:c,filterOptions:r,filterOptionQuery:i,showSpinner:!l&&!u,showError:!!u,showSearchInput:o.length>12}})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(11).default,u=n(1).default,d=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var c=n(3),f=u(c),p=n(4),h=u(p),v=n(21),g=n(15),m=n(24),y=n(1394),b=u(y),P=n(322),w=d(P),S=n(1804),_=u(S),T=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"onFilterSelect",decorators:[m.autobind],value:function(e){this.props.selectLibraryFilter({serverEntityID:this.props.serverEntityID,key:e}),this.props.fetchLibraryFilterOptions()}},{key:"onFilterDeselect",decorators:[m.autobind],value:function(){
this.props.deselectLibraryFilter()}},{key:"onSearch",decorators:[m.autobind],value:function(e){this.props.searchLibraryFilterOptions(e)}},{key:"render",value:function(){return h.default.createElement(_.default,l({onFilterSelect:this.onFilterSelect,onFilterDeselect:this.onFilterDeselect,onSearch:this.onSearch},this.props))}}]),t}(p.Component);T.propTypes={selectedType:p.PropTypes.object,serverEntityID:p.PropTypes.string.isRequired,selectLibraryFilter:p.PropTypes.func.isRequired,deselectLibraryFilter:p.PropTypes.func.isRequired,
fetchLibraryFilterOptions:p.PropTypes.func.isRequired,searchLibraryFilterOptions:p.PropTypes.func.isRequired},t.default=(0,v.connect)(r,w)(T),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.activeType,n=e.activeFilters,r=e.activeFilterLabel,o=e.activeSort,l=e.sorts,d=e.selectedSort,f=s(e,["activeType","activeFilters","activeFilterLabel","activeSort","sorts","selectedSort"]);return u.default.createElement(m.default,f,l.map(function(e){var s=e.key,l=e.descKey,u=e.defaultDirection,f=e.title,p=d.key===s,h=u;
p&&(h=o?o===l?w:S:u===w?S:w);var g=h===S;return{$$typeof:i,type:b.default,key:s,ref:null,props:a(b.default.defaultProps,{children:f,to:(0,v.default)({type:t,filters:n,filterLabel:r,sort:g?l:s}),isSelected:p,selectedIconName:g?"plex-icon-sort-ascending-560":"plex-icon-sort-descending-560",selectedIconAriaLabel:g?(0,c.default)("Ascending"):(0,c.default)("Descending")}),_owner:null}}))}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(384),p=o(f),h=n(220),v=o(h),g=n(104),m=o(g),y=n(126),b=o(y),P=p.default.directions,w=P.ASCENDING,S=P.DESCENDING;
r.propTypes={activeType:l.PropTypes.string,activeFilters:l.PropTypes.object.isRequired,activeFilterLabel:l.PropTypes.string,activeSort:l.PropTypes.string,sorts:l.PropTypes.array.isRequired,selectedSort:l.PropTypes.object},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.types,n=e.selectedType,r=s(e,["types","selectedType"]);return u.default.createElement(p.default,r,t.map(function(e){var t=e.type,r=e.title;return{$$typeof:i,type:v.default,key:t,ref:null,props:a(v.default.defaultProps,{
children:r,to:(0,c.default)({type:t}),isSelected:n.type===t}),_owner:null}}))}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(220),c=o(d),f=n(104),p=o(f),h=n(126),v=o(h);r.propTypes={sort:l.PropTypes.string,types:l.PropTypes.array.isRequired,selectedType:l.PropTypes.object},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.metadataListEntityID,o=e.listTitle,l=e.activeSelectionType;
return{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{children:[l?{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{serverEntityID:t,providerEntityID:n}),_owner:null}:{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataListEntityID:r,listTitle:o}),_owner:null},u.default.createElement(h.default,s({component:P.default,initialSize:50},e))],scrollDirection:d.scrollDirections.NONE
}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(30),c=n(180),f=o(c),p=n(337),h=o(p),v=n(343),g=o(v),m=n(1811),y=o(m),b=n(762),P=o(b);r.propTypes={serverEntityID:l.PropTypes.string.isRequired,providerEntityID:l.PropTypes.string.isRequired,metadataListEntityID:l.PropTypes.string.isRequired,listTitle:l.PropTypes.string.isRequired,activeSelectionType:l.PropTypes.string},t.default=r,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(1).default,l=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=o(u),c=n(21),f=n(15),p=n(170),h=o(p),v=n(50),g=n(1386),m=l(g),y=n(1808),b=o(y),P=(0,f.createSelector)(function(e){return e.ui.metadataListPage},h.default,function(e,t){return{isPagePopulated:e.isPagePopulated,metadataListEntityID:e.metadataList,activeSelectionType:t.activeSelectionType}}),w=function(e){function t(){
s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){var t=e.listKey;t!==this.props.listKey&&this._populate(e)}},{key:"componentWillUnmount",value:function(){this.props.clearMetadataListPage()}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];e.listKey&&(0,v.scheduleImmediateUpdate)(function(){
e.initMetadataListPage({serverEntityID:e.serverEntityID,key:e.listKey,title:e.listTitle})})}},{key:"render",value:function(){return this.props.isPagePopulated?d.default.createElement(b.default,this.props):null}}]),t}(u.Component);w.propTypes={isPagePopulated:u.PropTypes.bool.isRequired,serverEntityID:u.PropTypes.string.isRequired,metadataListEntityID:u.PropTypes.string,listKey:u.PropTypes.string.isRequired,listTitle:u.PropTypes.string.isRequired,initMetadataListPage:u.PropTypes.func.isRequired,clearMetadataListPage:u.PropTypes.func.isRequired
},t.default=(0,c.connect)(function(e){return P(e)},m)(w),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.listTitle,n=e.metadataItems,r=e.totalSize,l=s(e,["listTitle","metadataItems","totalSize"]),u=(0,f.default)(e);return{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:[{$$typeof:i,type:P.default,key:null,ref:null,props:a(P.default.defaultProps,{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:t,className:x.default.title
},_owner:null},{$$typeof:i,type:M.default,key:null,ref:null,props:a(M.default.defaultProps,{children:r||n.length,className:x.default.badge}),_owner:null}]}),_owner:null},{$$typeof:i,type:S.default,key:null,ref:null,props:a(S.default.defaultProps,{children:d.default.createElement(h.default,o({},l,u))}),_owner:null},E]}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(782),f=l(c),p=n(752),h=l(p),v=n(272),g=l(v),m=n(181),y=l(m),b=n(182),P=l(b),w=n(341),S=l(w),_=n(217),T=l(_),I=n(332),M=l(I),C=n(2162),x=l(C),E={
$$typeof:i,type:T.default,key:null,ref:null,props:a(T.default.defaultProps,{children:{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{}),_owner:null}}),_owner:null};r.propTypes={listTitle:u.PropTypes.string.isRequired,metadataItems:u.PropTypes.array.isRequired,totalSize:u.PropTypes.number},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,p.createSelector)((0,m.default)(),(0,b.default)(),(0,v.default)(),function(e,t,n){var r=u.default.pick(n,"metadataItems","totalSize","allowSync","firstItemType","isFirstItemLibraryItem");
return i({},r,{server:e,provider:t})})}function a(e){return c.default.createElement(_.default,e)}var i=n(11).default,s=n(1).default,o=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),u=s(l),d=n(4),c=s(d),f=n(21),p=n(15),h=n(300),v=s(h),g=n(67),m=s(g),y=n(73),b=s(y),P=n(169),w=o(P),S=n(1810),_=s(S);a.propTypes={serverEntityID:d.PropTypes.string.isRequired,providerEntityID:d.PropTypes.string.isRequired,metadataListEntityID:d.PropTypes.string.isRequired},t.default=(0,f.connect)(r,w)(a),
e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.metadataItemEntityID,s=e.metadataListEntityID,o=e.providerIdentifier,l=e.type,c=e.showSpinner,p=e.showError,v=e.activeSelectionType,m=e.columnAdjustment,b=e.record;return c?{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{label:(0,u.default)("Loading details")}),_owner:null}
}),_owner:null}:p?{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{title:(0,u.default)("There was an unexpected error loading this item")}),_owner:null}:{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{children:[v?{$$typeof:i,type:P.default,key:null,ref:null,props:a(P.default.defaultProps,{serverEntityID:t,providerEntityID:n}),_owner:null}:{$$typeof:i,type:S.default,key:null,ref:null,props:a(S.default.defaultProps,{serverEntityID:t,providerEntityID:n,
metadataItemEntityID:r}),_owner:null},{$$typeof:i,type:T.default,key:null,ref:null,props:a(T.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r,metadataListEntityID:s,providerIdentifier:o,type:l,columnAdjustment:m,record:b}),_owner:null}],scrollDirection:d.scrollDirections.NONE}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(30),c=n(55),f=s(c),p=n(180),h=s(p),v=n(149),g=s(v),m=n(275),y=s(m),b=n(343),P=s(b),w=n(1816),S=s(w),_=n(1814),T=s(_);
r.propTypes={serverEntityID:o.PropTypes.string.isRequired,providerEntityID:o.PropTypes.string.isRequired,metadataItemEntityID:o.PropTypes.string.isRequired,metadataListEntityID:o.PropTypes.string,providerIdentifier:o.PropTypes.string,type:o.PropTypes.string,showSpinner:o.PropTypes.bool.isRequired,showError:o.PropTypes.bool.isRequired,activeSelectionType:o.PropTypes.string,columnAdjustment:o.PropTypes.number.isRequired,record:o.PropTypes.bool},t.default=r,e.exports=t.default},function(e,t,n){"use strict";
function r(){return(0,h.createSelector)(function(e){return e.ui.prePlayPage.metadataItem},g.default,function(e,t){var n=t[e];return n?n.type:void 0})}function a(){return(0,h.createSelector)(function(e){return e.ui.prePlayPage},(0,y.default)(),r(),P.default,S.default,function(e,t,n,r,a){var i=e.isPagePopulated,s=e.metadataItem,o=e.descendantList,l=e.isMetadataItemPending,u=e.isMetadataItemPopulated,d=e.metadataItemError;return{isPagePopulated:i,metadataItemEntityID:s,metadataListEntityID:o,providerIdentifier:t.identifier,
type:n,showSpinner:!u&&!d,showError:!l&&!!d,activeSelectionType:r.activeSelectionType,columnAdjustment:a.columnAdjustment}})}var i=n(17).default,s=n(18).default,o=n(44).default,l=n(16).default,u=n(1).default,d=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=u(c),p=n(21),h=n(15),v=n(301),g=u(v),m=n(100),y=u(m),b=n(170),P=u(b),w=n(142),S=u(w),_=n(50),T=n(682),I=d(T),M=n(1812),C=u(M),x=function(e){function t(){l(this,t),i(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.metadataKey;t!==this.props.metadataKey&&this._populate(e)}},{key:"componentWillUnmount",value:function(){this.props.clearPrePlayPage()}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];e.metadataKey&&(0,_.scheduleImmediateUpdate)(function(){e.initPrePlayPage({serverEntityID:e.serverEntityID,metadataKey:e.metadataKey
}),e.fetchPrePlayMetadataItem({options:{data:{checkFiles:1,includeExtras:1,includeOnDeck:1}}}),e.fetchPrePlayRelatedHubs()})}},{key:"render",value:function(){return this.props.isPagePopulated?f.default.createElement(C.default,this.props):null}}]),t}(c.Component);x.propTypes={providerEntityID:c.PropTypes.string.isRequired,isPagePopulated:c.PropTypes.bool.isRequired,serverEntityID:c.PropTypes.string.isRequired,metadataKey:c.PropTypes.string.isRequired,initPrePlayPage:c.PropTypes.func.isRequired,clearPrePlayPage:c.PropTypes.func.isRequired,
fetchPrePlayMetadataItem:c.PropTypes.func.isRequired,fetchPrePlayRelatedHubs:c.PropTypes.func.isRequired},t.default=(0,p.connect)(a,I)(x),e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=t*-1+1,r=n/30+L,a=e*r;return Math.max(Math.min(a,j+30*n),N)}function a(e,t){var n=h.providerIdentifiers.EPG_IDENTIFIER.test(t),r=n?z:$;return r[e]||{}}var i=n(17).default,s=n(18).default,o=n(25).default,l=n(16).default,u=n(10).default,d=n(7).default,c=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var f=n(4),p=(c(f),n(24)),h=n(84),v=n(188),g=c(v),m=n(31),y=c(m),b=n(166),P=c(b),w=n(216),S=c(w),_=n(1830),T=c(_),I=n(1829),M=c(I),C=n(1831),x=c(C),E=n(1828),k=c(E),D=n(1817),A=c(D),O=n(2163),R=c(O),L=.15,N=150,j=230,U=parseInt(g.default.pagePadding,10),$={},z={movie:{connector:T.default,component:M.default},show:{connector:T.default,component:x.default},episode:{connector:T.default,component:k.default}},F={$$typeof:d,type:S.default,key:null,ref:null,props:u(S.default.defaultProps,{children:{
$$typeof:d,type:A.default,key:null,ref:null,props:u(A.default.defaultProps,{}),_owner:null}}),_owner:null},B=function(e){function t(e,n){l(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={scrollTop:0,isMeasured:!1,pageWidth:0,pageHeight:0,pageY:0}}return s(t,e),o(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,y.default)(this,e,t)}},{key:"onScrollPositionChange",decorators:[p.autobind],value:function(e){var t=e.scrollTop;this.setState({scrollTop:t
})}},{key:"onContentMeasure",decorators:[p.autobind],value:function(e){var t=e.width,n=e.height,r=e.y;this.setState({isMeasured:!0,pageWidth:t,pageHeight:n,pageY:r})}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,i=e.metadataItemEntityID,s=e.metadataListEntityID,o=e.providerIdentifier,l=e.type,c=e.columnAdjustment,f=e.record,p=this.state,h=p.scrollTop,v=p.isMeasured,g=p.pageWidth,m=p.pageHeight,y=p.pageY,b=a(l,o),w=b.connector,_=b.component;return w?{$$typeof:d,
type:P.default,key:null,ref:null,props:u(P.default.defaultProps,{children:{$$typeof:d,type:S.default,key:null,ref:null,props:u(S.default.defaultProps,{children:v&&{$$typeof:d,type:w,key:null,ref:null,props:u(w.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:i,metadataListEntityID:s,component:_,pageHeight:m,posterWidth:r(g,c),posterTop:y+U,scrollTop:h,record:f}),_owner:null},className:R.default.prePlayPageContent,scrollTop:h,onScrollPositionChange:this.onScrollPositionChange
}),_owner:null},className:R.default.prePlayPageContentContainer,onMeasure:this.onContentMeasure}),_owner:null}:F}}]),t}(f.Component);B.propTypes={serverEntityID:f.PropTypes.string.isRequired,providerEntityID:f.PropTypes.string.isRequired,metadataItemEntityID:f.PropTypes.string.isRequired,metadataListEntityID:f.PropTypes.string,providerIdentifier:f.PropTypes.string.isRequired,type:f.PropTypes.string,columnAdjustment:f.PropTypes.number.isRequired,record:f.PropTypes.bool},t.default=B,e.exports=t.default;
},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(24),p=n(31),h=u(p),v=n(75),g=u(v),m=n(74),y=u(m),b=n(34),P=u(b),w=n(272),S=u(w),_=n(181),T=u(_),I=n(182),M=u(I),C=n(217),x=u(C),E=n(470),k=u(E),D=n(761),A=u(D),O=n(2164),R=u(O),L={$$typeof:l,type:x.default,key:null,ref:null,props:o(x.default.defaultProps,{children:{$$typeof:l,type:S.default,
key:null,ref:null,props:o(S.default.defaultProps,{}),_owner:null}}),_owner:null},N=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isDirectoriesMenuOpen:!1}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,h.default)(this,e,t)}},{key:"onDirectoriesMenuButtonPress",decorators:[f.autobind],value:function(e){this.setState({isDirectoriesMenuOpen:!this.state.isDirectoriesMenuOpen})}},{key:"onDirectoriesMenuClose",
decorators:[f.autobind],value:function(){this.setState({isDirectoriesMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.server,n=e.provider,r=e.directories,a=e.selectedDirectory,i=e.breadcrumbTitle,s=e.breadcrumbRoute,u=!n.isLibraryProvider&&r.length>1;return{$$typeof:l,type:T.default,key:null,ref:null,props:o(T.default.defaultProps,{children:[{$$typeof:l,type:M.default,key:null,ref:null,props:o(M.default.defaultProps,{children:[u&&c.default.createElement(A.default,{ref:"directoriesMenuButton",
title:a.title,onPress:this.onDirectoriesMenuButtonPress}),u&&{$$typeof:l,type:k.default,key:null,ref:null,props:o(k.default.defaultProps,{target:this.refs.directoriesMenuButton,isOpen:this.state.isDirectoriesMenuOpen,machineIdentifier:t.machineIdentifier,providerIdentifier:n.identifier,isLibraryProvider:n.isLibraryProvider,directories:r,selectedDirectory:a,onMenuClose:this.onDirectoriesMenuClose}),_owner:null},{$$typeof:l,type:P.default,key:null,ref:null,props:o(P.default.defaultProps,{children:i,
className:R.default.breadcrumbLink,to:s}),_owner:null}]}),_owner:null},L]}),_owner:null}}}]),t}(d.Component);N.propTypes={server:g.default.isRequired,provider:y.default.isRequired,directories:d.PropTypes.array.isRequired,selectedDirectory:d.PropTypes.object.isRequired,breadcrumbTitle:d.PropTypes.string,breadcrumbRoute:d.PropTypes.string},t.default=N,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,c.createSelector)((0,p.default)(),(0,v.default)(),(0,m.default)(),(0,b.default)(),function(e,t,n,r){
var a=r.librarySectionID,i=new RegExp("/"+a+"$"),s=o.default.find(n,function(e){return!!e.key&&i.test(e.key)}),l=r.key,u=r.parentKey,d=r.grandparentKey,c=r.title,f=r.parentTitle,p=r.grandparentTitle,h=p||f||c,v=(0,w.default)(e,t,d||u||l);return{server:e,provider:t,directories:n,selectedDirectory:s||o.default.first(n),breadcrumbTitle:h,breadcrumbRoute:v}})}function a(e){return u.default.createElement(_.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(4),u=i(l),d=n(21),c=n(15),f=n(67),p=i(f),h=n(73),v=i(h),g=n(302),m=i(g),y=n(48),b=i(y),P=n(153),w=i(P),S=n(1815),_=i(S);
a.propTypes={serverEntityID:l.PropTypes.string.isRequired,providerEntityID:l.PropTypes.string.isRequired},t.default=(0,d.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(){return{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{children:{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{children:(0,u.default)("Go Home"),to:"#",kind:d.kinds.PRIMARY}),_owner:null},title:(0,u.default)("You must be lost"),description:(0,u.default)("This item does not have a page of its own")
}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(30),c=n(34),f=s(c),p=n(1791),h=s(p);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.server,n=e.provider,r=e.librarySectionKey,s=e.contentRating,o={filters:"contentRating="+encodeURIComponent(s),filterLabel:s};return{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:(0,u.default)(s),
to:(0,v.default)(t,n,r,o)}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(1112)),u=s(l),d=n(75),c=s(d),f=n(74),p=s(f),h=n(152),v=s(h),g=n(34),m=s(g);r.propTypes={server:c.default.isRequired,provider:p.default.isRequired,librarySectionKey:o.PropTypes.string.isRequired,contentRating:o.PropTypes.string.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.separator;
return{$$typeof:a,type:"span",key:null,ref:null,props:{children:n,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(2165)),l=i(o);r.propTypes={className:s.PropTypes.string,separator:s.PropTypes.string},r.defaultProps={className:l.default.separator,separator:"\xb7"},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.server,r=e.provider,s=e.librarySectionKey,o=e.Producer,l=e.Director,d=e.Writer,c=e.studio;
return t||o.length||l.length||d.length||c?{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:[t,!!o.length&&{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{server:n,provider:r,librarySectionKey:s,tags:o}),_owner:null},label:(0,u.default)("Created by")}),_owner:null},!!l.length&&{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{
children:{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{server:n,provider:r,librarySectionKey:s,tags:l}),_owner:null},label:(0,u.default)("Directed by")}),_owner:null},!!d.length&&{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{server:n,provider:r,librarySectionKey:s,tags:d}),_owner:null},label:(0,u.default)("Written by")}),_owner:null},!!c&&{$$typeof:i,
type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{server:n,provider:r,librarySectionKey:s,tags:[{tag:c}]}),_owner:null},label:(0,u.default)("Production")}),_owner:null}]}),_owner:null}:null}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(75),c=s(d),f=n(74),p=s(f),h=n(763),v=s(h),g=n(472),m=s(g),y=n(764),b=s(y);r.propTypes={
children:o.PropTypes.node,server:c.default.isRequired,provider:p.default.isRequired,librarySectionKey:o.PropTypes.string.isRequired,Producer:o.PropTypes.array.isRequired,Director:o.PropTypes.array.isRequired,Writer:o.PropTypes.array.isRequired,studio:o.PropTypes.string},r.defaultProps={Producer:[],Director:[],Writer:[]},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return{$$typeof:i,type:u.default,key:null,ref:null,props:a(u.default.defaultProps,{className:c.default.bottomDivider
}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(276)),u=s(l),d=n(2170),c=s(d);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return{$$typeof:i,type:u.default,key:null,ref:null,props:a(u.default.defaultProps,{className:c.default.topDivider}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(276)),u=s(l),d=n(2171),c=s(d);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.children;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:n,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(2175)),l=i(o);r.propTypes={className:s.PropTypes.string,children:s.PropTypes.node},r.defaultProps={className:l.default.rightTitle},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){
var t=e.className,n=e.children;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:n,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=(i(s),n(2178)),l=i(o);r.propTypes={className:s.PropTypes.string,children:s.PropTypes.node},r.defaultProps={className:l.default.tertiaryTitle},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.listType,n=e.server,r=e.provider,s=e.librarySectionKey,o=e.titleComponents,l=e.tag,u=e.role,d=e.filter,c=e.cellX,f=e.cellY,p=e.cellWidth,h=e.cellHeight,g=e.showOffscreenPlaceholder,y={
filters:d,filterLabel:l};return{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{children:[{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:{$$typeof:i,type:w.default,key:null,ref:null,props:a(w.default.defaultProps,{imageWidth:p,imageHeight:p,title:l,tagType:t,isOffscreen:g}),_owner:null},className:I.default.cardLink,to:(0,v.default)(n,r,s,y)}),_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:o.map(function(e,t){
return{$$typeof:i,type:_.default,key:t,ref:null,props:a(_.default.defaultProps,{server:n,provider:r,librarySectionKey:s,tag:l,role:u,filter:d,component:e,isSecondary:t>0}),_owner:null}}),className:I.default.titleContainer},_owner:null}],cellX:c,cellY:f,cellWidth:p,cellHeight:h}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(250)),u=s(l),d=n(75),c=s(d),f=n(74),p=s(f),h=n(152),v=s(h),g=n(34),m=s(g),y=n(249),b=s(y),P=n(462),w=s(P),S=n(461),_=s(S),T=n(2179),I=s(T);
r.propTypes={listType:o.PropTypes.string.isRequired,server:c.default.isRequired,provider:p.default.isRequired,librarySectionKey:o.PropTypes.string.isRequired,titleComponents:o.PropTypes.array.isRequired,tag:o.PropTypes.string.isRequired,role:o.PropTypes.string.isRequired,filter:o.PropTypes.string.isRequired,cellX:o.PropTypes.number.isRequired,cellY:o.PropTypes.number.isRequired,cellWidth:o.PropTypes.number.isRequired,cellHeight:o.PropTypes.number.isRequired,showOffscreenPlaceholder:o.PropTypes.bool
},t.default=(0,u.default)(r),e.exports=t.default},function(e,t,n){"use strict";function r(e){return function(t){return d.default.createElement(M.default,o({},e,t))}}function a(e){var t=e.listType,n=e.listContext,a=e.server,o=e.provider,l=e.librarySectionKey,u=e.roles;if(!u)return null;var d=(0,g.default)(t,n),c=1;return{$$typeof:i,type:"div",key:null,ref:null,props:{children:{$$typeof:i,type:T.default,key:null,ref:null,props:s(T.default.defaultProps,{hubIdentifier:"cast",title:(0,f.default)("Cast"),
size:u.length,listType:t,listContext:n,columnAdjustment:c,keyPropName:"id",items:u,layout:(0,y.default)(t,n,c,d.length),cellRenderer:r({listType:t,listContext:n,server:a,provider:o,librarySectionKey:l,titleComponents:d})}),_owner:null},className:x.default.castList},_owner:null}}var i=n(7).default,s=n(10).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(5),f=l(c),p=n(114),h=l(p),v=n(278),g=l(v),m=n(486),y=l(m),b=n(75),P=l(b),w=n(74),S=l(w),_=n(458),T=l(_),I=n(1825),M=l(I),C=n(2180),x=l(C);
a.propTypes={listType:u.PropTypes.string.isRequired,listContext:u.PropTypes.string.isRequired,server:P.default.isRequired,provider:S.default.isRequired,librarySectionKey:u.PropTypes.string.isRequired,roles:u.PropTypes.array},a.defaultProps={listType:"actor",listContext:h.default.PRE_PLAY},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.relatedHubEntityIDs,s=e.showSpinner;return s?{$$typeof:a,type:"div",key:null,ref:null,props:{
children:h,className:p.default.spinnerContainer},_owner:null}:{$$typeof:a,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{className:p.default.relatedList,serverEntityID:t,providerEntityID:n,hubEntityIDs:r,columnAdjustment:1}),_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(55)),u=s(l),d=n(735),c=s(d),f=n(2181),p=s(f),h={$$typeof:a,type:u.default,key:null,ref:null,props:i(u.default.defaultProps,{}),
_owner:null};r.propTypes={serverEntityID:o.PropTypes.string.isRequired,providerEntityID:o.PropTypes.string.isRequired,relatedHubEntityIDs:o.PropTypes.array.isRequired,showSpinner:o.PropTypes.bool.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.metadataItemEntityID,s=e.server,o=e.provider,l=e.metadataKey,d=e.librarySectionKey,c=e.type,f=e.duration,p=e.contentRating,h=e.Genre,g=e.summary,y=e.grandparentThumbTranscodeUrl,P=e.isSubscribed,S=e.subscriptionType,T=e.grandparentSubscriptionType,M=e.mediaItem,x=e.pageHeight,k=e.posterWidth,D=e.posterTop,A=e.record;
return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:F.default,key:null,ref:null,props:i(F.default.defaultProps,{pageHeight:x,posterTop:D}),_owner:null},{$$typeof:a,type:b.default,key:null,ref:null,props:i(b.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r,metadataKey:l,type:c,posterType:"show",pageHeight:x,posterWidth:k,posterTop:D,posterUrl:y}),_owner:null},{$$typeof:a,type:w.default,key:null,ref:null,props:i(w.default.defaultProps,{children:[{
$$typeof:a,type:_.default,key:null,ref:null,props:i(_.default.defaultProps,{children:[{$$typeof:a,type:I.default,key:null,ref:null,props:i(I.default.defaultProps,{children:{$$typeof:a,type:E.default,key:null,ref:null,props:i(E.default.defaultProps,{children:{$$typeof:a,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r}),_owner:null}}),_owner:null}}),_owner:null},{$$typeof:a,type:C.default,key:null,ref:null,props:i(C.default.defaultProps,{
children:{$$typeof:a,type:E.default,key:null,ref:null,props:i(E.default.defaultProps,{children:{$$typeof:a,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r}),_owner:null}}),_owner:null}}),_owner:null},{$$typeof:a,type:q.default,key:null,ref:null,props:i(q.default.defaultProps,{children:[(0,u.default)(f),{$$typeof:a,type:V.default,key:null,ref:null,props:i(V.default.defaultProps,{serverEntityID:t,metadataItemEntityID:r,type:c,
isSubscribed:P,subscriptionType:S,grandparentSubscriptionType:T,isSubscribeModalOpen:A}),_owner:null}],server:s,provider:o,librarySectionKey:d,contentRating:p,genres:h}),_owner:null}]}),_owner:null},K,{$$typeof:a,type:_.default,key:null,ref:null,props:i(_.default.defaultProps,{children:[{$$typeof:a,type:O.default,key:null,ref:null,props:i(O.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r}),_owner:null},{$$typeof:a,type:G.default,key:null,ref:null,props:i(G.default.defaultProps,{
children:{$$typeof:a,type:Q.default,key:null,ref:null,props:i(Q.default.defaultProps,{metadataItemEntityID:r,showFullTime:!0,showChannel:!0}),_owner:null},mediaItem:M}),_owner:null},{$$typeof:a,type:L.default,key:null,ref:null,props:i(L.default.defaultProps,{children:g}),_owner:null},{$$typeof:a,type:j.default,key:null,ref:null,props:i(j.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r}),_owner:null},{$$typeof:a,type:$.default,key:null,ref:null,props:i($.default.defaultProps,{
serverEntityID:t,providerEntityID:n}),_owner:null}]}),_owner:null}],posterWidth:k}),_owner:null}]},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(163)),u=s(l),d=n(75),c=s(d),f=n(74),p=s(f),h=n(464),v=s(h),g=n(273),m=s(g),y=n(475),b=s(y),P=n(473),w=s(P),S=n(474),_=s(S),T=n(476),I=s(T),M=n(477),C=s(M),x=n(342),E=s(x),k=n(276),D=s(k),A=n(471),O=s(A),R=n(478),L=s(R),N=n(765),j=s(N),U=n(479),$=s(U),z=n(480),F=s(z),B=n(481),V=s(B),H=n(483),q=s(H),W=n(482),G=s(W),Y=n(767),Q=s(Y),K={
$$typeof:a,type:D.default,key:null,ref:null,props:i(D.default.defaultProps,{}),_owner:null};r.propTypes={serverEntityID:o.PropTypes.string.isRequired,providerEntityID:o.PropTypes.string.isRequired,metadataItemEntityID:o.PropTypes.string.isRequired,server:c.default.isRequired,provider:p.default.isRequired,metadataKey:o.PropTypes.string.isRequired,librarySectionKey:o.PropTypes.string.isRequired,type:o.PropTypes.string.isRequired,duration:o.PropTypes.number,contentRating:o.PropTypes.string,Genre:o.PropTypes.array,
summary:o.PropTypes.string,grandparentThumbTranscodeUrl:o.PropTypes.func,isSubscribed:o.PropTypes.bool,subscriptionType:o.PropTypes.string,grandparentSubscriptionType:o.PropTypes.string,mediaItem:o.PropTypes.object,pageHeight:o.PropTypes.number.isRequired,posterWidth:o.PropTypes.number.isRequired,posterTop:o.PropTypes.number.isRequired,record:o.PropTypes.bool},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.providerEntityID,r=e.metadataItemEntityID,s=e.server,o=e.provider,l=e.metadataKey,d=e.librarySectionKey,c=e.title,f=e.type,p=e.year,h=e.duration,g=e.contentRating,y=e.Genre,P=e.summary,S=e.thumbTranscodeUrl,T=e.isSubscribed,M=e.subscriptionType,C=e.mediaItem,x=e.pageHeight,k=e.posterWidth,A=e.posterTop,R=e.record;
return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:j.default,key:null,ref:null,props:i(j.default.defaultProps,{pageHeight:x,posterTop:A}),_owner:null},{$$typeof:a,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r,metadataKey:l,type:f,pageHeight:x,posterWidth:k,posterTop:A,posterUrl:S}),_owner:null},{$$typeof:a,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:[{$$typeof:a,
type:b.default,key:null,ref:null,props:i(b.default.defaultProps,{children:[{$$typeof:a,type:w.default,key:null,ref:null,props:i(w.default.defaultProps,{children:{$$typeof:a,type:I.default,key:null,ref:null,props:i(I.default.defaultProps,{children:c}),_owner:null}}),_owner:null},{$$typeof:a,type:_.default,key:null,ref:null,props:i(_.default.defaultProps,{children:{$$typeof:a,type:I.default,key:null,ref:null,props:i(I.default.defaultProps,{children:p}),_owner:null}}),_owner:null},{$$typeof:a,type:F.default,
key:null,ref:null,props:i(F.default.defaultProps,{children:[(0,u.default)(h),{$$typeof:a,type:$.default,key:null,ref:null,props:i($.default.defaultProps,{serverEntityID:t,metadataItemEntityID:r,type:f,isSubscribed:T,subscriptionType:M,isSubscribeModalOpen:R}),_owner:null}],server:s,provider:o,librarySectionKey:d,contentRating:g,genres:y}),_owner:null}]}),_owner:null},W,{$$typeof:a,type:b.default,key:null,ref:null,props:i(b.default.defaultProps,{children:[{$$typeof:a,type:E.default,key:null,ref:null,
props:i(E.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r}),_owner:null},{$$typeof:a,type:V.default,key:null,ref:null,props:i(V.default.defaultProps,{children:{$$typeof:a,type:q.default,key:null,ref:null,props:i(q.default.defaultProps,{metadataItemEntityID:r,showFullTime:!0,showChannel:!0}),_owner:null},mediaItem:C}),_owner:null},{$$typeof:a,type:D.default,key:null,ref:null,props:i(D.default.defaultProps,{children:P}),_owner:null},{$$typeof:a,type:O.default,key:null,
ref:null,props:i(O.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r}),_owner:null},{$$typeof:a,type:L.default,key:null,ref:null,props:i(L.default.defaultProps,{serverEntityID:t,providerEntityID:n}),_owner:null}]}),_owner:null}],posterWidth:k}),_owner:null}]},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(163)),u=s(l),d=n(75),c=s(d),f=n(74),p=s(f),h=n(475),v=s(h),g=n(473),m=s(g),y=n(474),b=s(y),P=n(476),w=s(P),S=n(477),_=s(S),T=n(342),I=s(T),M=n(276),C=s(M),x=n(471),E=s(x),k=n(478),D=s(k),A=n(765),O=s(A),R=n(479),L=s(R),N=n(480),j=s(N),U=n(481),$=s(U),z=n(483),F=s(z),B=n(482),V=s(B),H=n(767),q=s(H),W={
$$typeof:a,type:C.default,key:null,ref:null,props:i(C.default.defaultProps,{}),_owner:null};r.propTypes={serverEntityID:o.PropTypes.string.isRequired,providerEntityID:o.PropTypes.string.isRequired,metadataItemEntityID:o.PropTypes.string.isRequired,server:c.default.isRequired,provider:p.default.isRequired,metadataKey:o.PropTypes.string.isRequired,librarySectionKey:o.PropTypes.string.isRequired,title:o.PropTypes.string,type:o.PropTypes.string.isRequired,year:o.PropTypes.string,duration:o.PropTypes.number,
contentRating:o.PropTypes.string,Genre:o.PropTypes.array,isHDVideo:o.PropTypes.bool,summary:o.PropTypes.string,thumbTranscodeUrl:o.PropTypes.func,isSubscribed:o.PropTypes.bool,subscriptionType:o.PropTypes.string,mediaItem:o.PropTypes.object,pageHeight:o.PropTypes.number.isRequired,posterWidth:o.PropTypes.number.isRequired,posterTop:o.PropTypes.number.isRequired,record:o.PropTypes.bool},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,m.createSelector)((0,M.default)(),function(e){
return!(!e||!e.isPopulated)})}function a(){return(0,m.createSelector)((0,P.default)(),(0,S.default)(),(0,T.default)(),(0,x.default)(),r(),function(e,t,n,r,a){var s=p.default.pick(n,"librarySectionKey","title","type","year","duration","contentRating","summary","Genre","subscriptionType","grandparentSubscriptionType","thumbTranscodeUrl","parentThumbTranscodeUrl","grandparentThumbTranscodeUrl");return i({server:e,provider:t,metadataKey:n.key,isSubscribed:null!=n.subscriptionID||null!=n.grandparentSubscriptionID,
mediaItem:r,isListReady:a},s)})}var i=n(11).default,s=n(17).default,o=n(18).default,l=n(44).default,u=n(16).default,d=n(19).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=c(f),h=n(4),v=c(h),g=n(21),m=n(15),y=n(50),b=n(67),P=c(b),w=n(73),S=c(w),_=n(48),T=c(_),I=n(300),M=c(I),C=n(325),x=c(C),E=n(682),k=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(){
this._populate(this.props)}},{key:"_populate",value:function(e){(0,y.scheduleImmediateUpdate)(function(){e.initPrePlayDescendantList({serverEntityID:e.serverEntityID})})}},{key:"render",value:function(){var e=this.props,t=e.component;d(e,["component"]);return v.default.createElement(t,this.props)}}]),t}(h.Component);k.propTypes={serverEntityID:h.PropTypes.string.isRequired,providerEntityID:h.PropTypes.string.isRequired,metadataItemEntityID:h.PropTypes.string.isRequired,component:h.PropTypes.func.isRequired
},t.default=(0,g.connect)(a,{initPrePlayDescendantList:E.initPrePlayDescendantList})(k),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(24)),f=n(31),p=u(f),h=n(75),v=u(h),g=n(74),m=u(g),y=n(166),b=u(y),P=n(337),w=u(P),S=n(747),_=u(S),T=n(475),I=u(T),M=n(473),C=u(M),x=n(474),E=u(x),k=n(476),D=u(k),A=n(477),O=u(A),R=n(342),L=u(R),N=n(276),j=u(N),U=n(1822),$=u(U),z=n(1821),F=u(z),B=n(471),V=u(B),H=n(478),q=u(H),W=n(479),G=u(W),Y=n(480),Q=u(Y),K=n(481),X=u(K),Z=n(1834),J=u(Z),ee=n(483),te=u(ee),ne={
$$typeof:o,type:j.default,key:null,ref:null,props:l(j.default.defaultProps,{}),_owner:null},re={$$typeof:o,type:$.default,key:null,ref:null,props:l($.default.defaultProps,{}),_owner:null},ae={$$typeof:o,type:F.default,key:null,ref:null,props:l(F.default.defaultProps,{}),_owner:null},ie=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isContentMeasured:!1,contentWidth:null,contentHeight:null}}return a(t,e),i(t,[{key:"shouldComponentUpdate",
value:function(e,t){return(0,p.default)(this,e,t)}},{key:"onContentMeasure",decorators:[c.autobind],value:function(e){var t=e.width,n=e.height;this.setState({isContentMeasured:!0,contentWidth:t,contentHeight:n})}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,r=e.metadataItemEntityID,a=e.metadataListEntityID,i=e.server,s=e.provider,u=e.metadataKey,d=e.librarySectionKey,c=e.title,f=e.type,p=e.year,h=e.contentRating,v=e.Genre,g=e.summary,m=e.thumbTranscodeUrl,y=e.isSubscribed,P=e.subscriptionType,S=e.isListReady,T=e.pageHeight,M=e.scrollTop,x=e.posterWidth,k=e.posterTop,A=e.record,R=this.state,N=R.isContentMeasured,j=R.contentWidth,U=R.contentHeight,$=!(!N||!a);
return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:Q.default,key:null,ref:null,props:l(Q.default.defaultProps,{pageHeight:T,posterTop:k}),_owner:null},{$$typeof:o,type:I.default,key:null,ref:null,props:l(I.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r,metadataKey:u,type:f,pageHeight:T,posterWidth:x,posterTop:k,posterUrl:m}),_owner:null},{$$typeof:o,type:C.default,key:null,ref:null,props:l(C.default.defaultProps,{children:[{$$typeof:o,
type:b.default,key:null,ref:null,props:l(b.default.defaultProps,{children:[{$$typeof:o,type:E.default,key:null,ref:null,props:l(E.default.defaultProps,{children:[{$$typeof:o,type:D.default,key:null,ref:null,props:l(D.default.defaultProps,{children:{$$typeof:o,type:L.default,key:null,ref:null,props:l(L.default.defaultProps,{children:c}),_owner:null}}),_owner:null},{$$typeof:o,type:O.default,key:null,ref:null,props:l(O.default.defaultProps,{children:{$$typeof:o,type:L.default,key:null,ref:null,props:l(L.default.defaultProps,{
children:p}),_owner:null}}),_owner:null},{$$typeof:o,type:te.default,key:null,ref:null,props:l(te.default.defaultProps,{children:[{$$typeof:o,type:_.default,key:null,ref:null,props:l(_.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r}),_owner:null},{$$typeof:o,type:X.default,key:null,ref:null,props:l(X.default.defaultProps,{serverEntityID:t,metadataItemEntityID:r,type:f,isSubscribed:y,subscriptionType:P,isSubscribeModalOpen:A}),_owner:null}],server:i,provider:s,librarySectionKey:d,
contentRating:h,genres:v}),_owner:null}]}),_owner:null},ne,{$$typeof:o,type:E.default,key:null,ref:null,props:l(E.default.defaultProps,{children:[{$$typeof:o,type:V.default,key:null,ref:null,props:l(V.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r}),_owner:null},{$$typeof:o,type:q.default,key:null,ref:null,props:l(q.default.defaultProps,{children:g}),_owner:null}]}),_owner:null},re],ignorePosition:!0,onMeasure:this.onContentMeasure}),_owner:null},$&&{$$typeof:o,type:w.default,
key:null,ref:null,props:l(w.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataListEntityID:a,component:J.default,initialSize:20,viewportWidth:j,viewportHeight:T,scrollTop:M-U}),_owner:null},$&&ae,S&&{$$typeof:o,type:E.default,key:null,ref:null,props:l(E.default.defaultProps,{children:{$$typeof:o,type:G.default,key:null,ref:null,props:l(G.default.defaultProps,{serverEntityID:t,providerEntityID:n}),_owner:null}}),_owner:null}],posterWidth:x}),_owner:null}]},_owner:null}}}]),t}(d.Component);
ie.propTypes={serverEntityID:d.PropTypes.string.isRequired,providerEntityID:d.PropTypes.string.isRequired,metadataItemEntityID:d.PropTypes.string.isRequired,metadataListEntityID:d.PropTypes.string,server:v.default.isRequired,provider:m.default.isRequired,metadataKey:d.PropTypes.string.isRequired,librarySectionKey:d.PropTypes.string.isRequired,title:d.PropTypes.string,type:d.PropTypes.string.isRequired,year:d.PropTypes.string,contentRating:d.PropTypes.string,Genre:d.PropTypes.array,summary:d.PropTypes.string,
thumbTranscodeUrl:d.PropTypes.func,isSubscribed:d.PropTypes.bool,subscriptionType:d.PropTypes.string,isListReady:d.PropTypes.bool,pageHeight:d.PropTypes.number.isRequired,scrollTop:d.PropTypes.number.isRequired,posterWidth:d.PropTypes.number.isRequired,posterTop:d.PropTypes.number.isRequired,record:d.PropTypes.bool},t.default=ie,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var d=n(4),c=(u(d),n(5)),f=u(c),p=n(24),h=n(31),v=u(h),g=n(250),m=u(g),y=n(249),b=u(y),P=n(36),w=u(P),S=n(34),_=u(S),T=n(125),I=u(T),M=n(450),C=u(M),x=n(215),E=u(x),k=n(273),D=u(k),A=n(743),O=u(A),R=n(2183),L=u(R),N=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isSubscribeModalOpen:!1}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"onRecordPress",decorators:[p.autobind],
value:function(e){this.setState({isSubscribeModalOpen:!0})}},{key:"onSubscribeModalClose",decorators:[p.autobind],value:function(){this.setState({isSubscribeModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.providerEntityID,r=e.metadataItemEntityID,a=e.cellIndex,i=e.cellX,s=e.cellY,u=e.cellWidth,d=e.cellHeight,c=e.isLoading,p=e.route,h=e.title,v=e.type,g=e.summary,m=e.hasSingleSubscription,y=this.state.isSubscribeModalOpen;return c?{$$typeof:l,type:b.default,
key:null,ref:null,props:o(b.default.defaultProps,{children:(0,f.default)("Loading..."),className:a%2?L.default.alternateLoadingItem:L.default.loadingItem,cellX:i,cellY:s,cellWidth:u,cellHeight:d}),_owner:null}:{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:[{$$typeof:l,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{className:L.default.underlay,to:p}),_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"div",
key:null,ref:null,props:{children:{$$typeof:l,type:D.default,key:null,ref:null,props:o(D.default.defaultProps,{serverEntityID:t,providerEntityID:n,metadataItemEntityID:r}),_owner:null},className:L.default.primaryTitle},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:[m&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{className:L.default.subscriptionIcon,name:"plex-icon-dvr-single-560","aria-label":(0,f.default)("Recording Scheduled")}),_owner:null
},{$$typeof:l,type:O.default,key:null,ref:null,props:o(O.default.defaultProps,{className:L.default.nextAiringDate,metadataItemEntityID:r,showFullTime:!0}),_owner:null},!!g&&{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{className:L.default.separator}),_owner:null},g],className:L.default.secondaryTitle},_owner:null}],className:L.default.overlay},_owner:null},{$$typeof:l,type:C.default,key:null,ref:null,props:o(C.default.defaultProps,{className:L.default.recordButton,tabIndex:"-1",
title:h,onPress:this.onRecordPress}),_owner:null},{$$typeof:l,type:E.default,key:null,ref:null,props:o(E.default.defaultProps,{serverEntityID:t,metadataItemEntityID:r,isOpen:y,subscriptionType:v,onModalClose:this.onSubscribeModalClose}),_owner:null}],className:a%2?L.default.alternateItem:L.default.item,cellX:i,cellY:s,cellWidth:u,cellHeight:d}),_owner:null}}}]),t}(d.Component);N.propTypes={serverEntityID:d.PropTypes.string.isRequired,providerEntityID:d.PropTypes.string.isRequired,metadataItemEntityID:d.PropTypes.string.isRequired,
cellIndex:d.PropTypes.number.isRequired,cellX:d.PropTypes.number.isRequired,cellY:d.PropTypes.number.isRequired,cellWidth:d.PropTypes.number.isRequired,cellHeight:d.PropTypes.number.isRequired,isLoading:d.PropTypes.bool,route:d.PropTypes.string,title:d.PropTypes.string,type:d.PropTypes.string,summary:d.PropTypes.string,hasSingleSubscription:d.PropTypes.bool},t.default=(0,m.default)(N),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,f.createSelector)((0,h.default)(),(0,g.default)(),(0,
y.default)(),function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=l.default.pick(n,"title","type","summary");return i({isLoading:!n.key,route:(0,P.default)(e,t,n.key),hasSingleSubscription:!!n.subscriptionID},r)})}function a(e){return d.default.createElement(S.default,e)}var i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=s(o),u=n(4),d=s(u),c=n(21),f=n(15),p=n(67),h=s(p),v=n(73),g=s(v),m=n(48),y=s(m),b=n(153),P=s(b),w=n(1832),S=s(w);
a.propTypes={serverEntityID:u.PropTypes.string.isRequired,providerEntityID:u.PropTypes.string.isRequired,metadataItemEntityID:u.PropTypes.string.isRequired},t.default=(0,c.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(11).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=d(c),p=n(5),h=d(p),v=n(24),g=n(428),m=d(g),y=n(1934),b=d(y),P=n(55),w=d(P),S=n(423),_=d(S),T=n(1833),I=d(T),M=n(2184),C=d(M),x=96,E=(0,
b.default)(x),k=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"renderCell",decorators:[v.autobind],value:function(e){return f.default.createElement(I.default,u({serverEntityID:this.props.serverEntityID,providerEntityID:this.props.providerEntityID,metadataListEntityID:this.props.metadataListEntityID},e))}},{key:"render",value:function(){var e=this.props,t=e.metadataItemEntityIDs,n=e.populatedRange,r=e.isPending,a=e.error,i=e.viewportWidth,s=e.viewportHeight,u=e.scrollTop,d=e.onPageRequest;
return r?{$$typeof:o,type:"div",key:null,ref:null,props:{children:{$$typeof:o,type:w.default,key:null,ref:null,props:l(w.default.defaultProps,{label:(0,h.default)("Loading episodes")}),_owner:null},className:C.default.emptyContainer},_owner:null}:a?{$$typeof:o,type:"div",key:null,ref:null,props:{children:(0,h.default)("Unable to load episodes"),className:C.default.emptyMessage},_owner:null}:t.length?{$$typeof:o,type:_.default,key:null,ref:null,props:l(_.default.defaultProps,{keyPropName:"metadataItemEntityID",
items:t,itemsOffset:n.start,size:t.length,layout:E,cellRenderer:this.renderCell,viewportWidth:i,viewportHeight:s,scrollTop:u,onPageRequest:d}),_owner:null}:{$$typeof:o,type:"div",key:null,ref:null,props:{children:(0,h.default)("No episodes"),className:C.default.emptyMessage},_owner:null}}}]),t}(c.Component);k.propTypes={serverEntityID:c.PropTypes.string.isRequired,providerEntityID:c.PropTypes.string.isRequired,metadataListEntityID:c.PropTypes.string,metadataItemEntityIDs:c.PropTypes.array,populatedRange:m.default.isRequired,
isPending:c.PropTypes.bool,error:c.PropTypes.object,viewportWidth:c.PropTypes.number.isRequired,viewportHeight:c.PropTypes.number.isRequired,scrollTop:c.PropTypes.number.isRequired,onPageRequest:c.PropTypes.func.isRequired},t.default=k,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(521),p=n(843),h=u(p),v=n(31),g=u(v),m=n(30),y=n(180),b=u(y),P=n(1838),w=u(P),S=n(1837),_=u(S),T=function(e){
function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.machineIdentifier,n=e.selectedViewType;return{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:[{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{machineIdentifier:t,selectedViewType:n
}),_owner:null},c.default.createElement(_.default,this.props)],scrollDirection:m.scrollDirections.NONE}),_owner:null}}}]),t}(d.Component);T.propTypes={machineIdentifier:d.PropTypes.string.isRequired,selectedViewType:d.PropTypes.oneOf(m.recordingScheduleViewTypes.all).isRequired},t.default=(0,f.DragDropContext)(h.default)(T),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,v.createSelector)(S.default,(0,T.default)(y.providerFeatureTypes.SUBSCRIBE),function(e,t){var n=t[0];if(n){
var r=e[n];return r&&r.identifier}})}function a(){return(0,v.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e,t){var n=t.selectedViewType;return n},(0,P.default)(),r(),M.default,function(e,t,n,r,a){var i=e.isPagePopulated,s=e.isCalendarPopulated,o=e.calendarError,l=e.isMediaSubscriptionsPopulated,u=e.mediaSubscriptionsError,d=e.calendar,c=!s&&!o,f=!l&&!u,p=c||f,h=!p&&l&&!e.mediaSubscriptions.length;return{isPagePopulated:i,machineIdentifier:n.machineIdentifier,showSpinner:p,
showEmptyState:h,programGuideIdentifier:r,time:d?d.time:void 0,selectedViewType:t||a.calendarViewType}})}var i=n(11).default,s=n(17).default,o=n(18).default,l=n(25).default,u=n(16).default,d=n(1).default,c=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=d(f),h=n(21),v=n(15),g=n(24),m=n(50),y=n(158),b=n(70),P=d(b),w=n(303),S=d(w),_=n(599),T=d(_),I=n(142),M=d(I),C=n(91),x=n(256),E=c(x),k=n(1835),D=d(k),A=36e5,O=i({saveSettings:C.saveSettings},E),R=function(e){function t(e,n){
u(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this._updateTimeoutID=null}return o(t,e),l(t,[{key:"componentWillMount",value:function(){this._populate(),this._resetUpdateTimeout(),this._saveViewType()}},{key:"componentWillReceiveProps",value:function(e){var t=e.serverEntityID,n=e.time,r=e.selectedViewType;t!==this.props.serverEntityID&&this._populate(e),this._updateTimeoutID&&n!==this.props.time&&this._resetUpdateTimeout(),r!==this.props.selectedViewType&&this._saveViewType(e);
}},{key:"componentWillUnmount",value:function(){this._updateTimeoutID&&clearTimeout(this._updateTimeoutID),this.props.clearRecordingSchedulePage()}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];(0,m.scheduleImmediateUpdate)(function(){e.initRecordingSchedulePage({serverEntityID:e.serverEntityID}),e.fetchCalendar(),e.fetchMediaSubscriptions()})}},{key:"_updateCalendar",decorators:[g.autobind],value:function(){this.props.goToToday(),this.props.fetchCalendar(),
this._resetUpdateTimeout()}},{key:"_resetUpdateTimeout",value:function(){this._updateTimeoutID&&clearTimeout(this._updateTimeoutID),this._updateTimeoutID=setTimeout(this._updateCalendar,A)}},{key:"_saveViewType",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];e.saveSettings({name:"experienceSettings",settings:{calendarViewType:e.selectedViewType}})}},{key:"render",value:function(){return this.props.isPagePopulated?p.default.createElement(D.default,this.props):null;
}}]),t}(f.Component);R.propTypes={serverEntityID:f.PropTypes.string.isRequired,selectedViewType:f.PropTypes.string,isPagePopulated:f.PropTypes.bool.isRequired,time:f.PropTypes.string,initRecordingSchedulePage:f.PropTypes.func.isRequired,clearRecordingSchedulePage:f.PropTypes.func.isRequired,goToToday:f.PropTypes.func.isRequired,fetchCalendar:f.PropTypes.func.isRequired,fetchMediaSubscriptions:f.PropTypes.func.isRequired,saveSettings:f.PropTypes.func.isRequired},t.default=(0,h.connect)(a,O)(R),e.exports=t.default;
},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.machineIdentifier,r=e.showSpinner,s=e.showEmptyState,o=e.programGuideIdentifier,l=e.selectedViewType;if(r)return{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{label:(0,u.default)("Loading schedule")}),_owner:null}}),_owner:null
}}),_owner:null};if(s&&o){var c=encodeURIComponent(n),p=encodeURIComponent(o);return{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{className:M.default.emptyDescription,text:"Check out the {1}Program Guide{2} to browse available programming",args:['<a href="#!/server/'+c+"/provider/"+p+'">',"</a>"]}),
_owner:null},icon:"plex-icon-calendar-560",title:(0,u.default)("You have no recordings scheduled")}),_owner:null}}),_owner:null}}return s&&!o?{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{icon:"plex-icon-calendar-560",title:(0,u.default)("You have no recordings scheduled"),description:(0,u.default)("You need a DVR before you can schedule recordings")}),_owner:null}}),_owner:null}:{
$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:[l===d.recordingScheduleViewTypes.CALENDAR&&{$$typeof:i,type:S.default,key:null,ref:null,props:a(S.default.defaultProps,{serverEntityID:t}),_owner:null},l===d.recordingScheduleViewTypes.AGENDA&&{$$typeof:i,type:T.default,key:null,ref:null,props:a(T.default.defaultProps,{serverEntityID:t}),_owner:null}],className:M.default.schedulePageContent,innerClassName:M.default.schedulePageInnerContent
}),_owner:null},{$$typeof:i,type:P.default,key:null,ref:null,props:a(P.default.defaultProps,{serverEntityID:t}),_owner:null}]},_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(30),c=n(658),f=s(c),p=n(55),h=s(p),v=n(216),g=s(v),m=n(151),y=s(m),b=n(1861),P=s(b),w=n(1848),S=s(w),_=n(1841),T=s(_),I=n(2185),M=s(I);r.propTypes={serverEntityID:o.PropTypes.string.isRequired,machineIdentifier:o.PropTypes.string.isRequired,
showSpinner:o.PropTypes.bool,showEmptyState:o.PropTypes.bool,programGuideIdentifier:o.PropTypes.string,selectedViewType:o.PropTypes.oneOf(d.recordingScheduleViewTypes.all).isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e===y.recordingScheduleViewTypes.AGENDA?(0,h.default)("Agenda View"):(0,h.default)("Calendar View")}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(10).default,u=n(7).default,d=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var c=n(4),f=d(c),p=n(5),h=d(p),v=n(24),g=n(31),m=d(g),y=n(30),b=n(104),P=d(b),w=n(181),S=d(w),_=n(182),T=d(_),I=n(469),M=d(I),C=n(757),x=d(C),E=n(1839),k=d(E),D={$$typeof:u,type:M.default,key:null,ref:null,props:l(M.default.defaultProps,{}),_owner:null},A=function(e){function t(e,n){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isViewsMenuOpen:!1}}return i(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t);
}},{key:"onViewsMenuButtonPress",decorators:[v.autobind],value:function(e){this.setState({isViewsMenuOpen:!this.state.isViewsMenuOpen})}},{key:"onViewsMenuClose",decorators:[v.autobind],value:function(){this.setState({isViewsMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.machineIdentifier,n=e.selectedViewType;return{$$typeof:u,type:S.default,key:null,ref:null,props:l(S.default.defaultProps,{children:{$$typeof:u,type:T.default,key:null,ref:null,props:l(T.default.defaultProps,{
children:[{$$typeof:u,type:"span",key:null,ref:null,props:{children:[(0,h.default)("Recording Schedule"),D]},_owner:null},f.default.createElement(x.default,{ref:"viewsMenuButton",hasMenu:!0,title:r(n),onPress:this.onViewsMenuButtonPress}),{$$typeof:u,type:P.default,key:null,ref:null,props:l(P.default.defaultProps,{children:y.recordingScheduleViewTypes.all.map(function(e){return{$$typeof:u,type:k.default,key:e,ref:null,props:l(k.default.defaultProps,{children:r(e),machineIdentifier:t,selectedViewType:n,
viewType:e}),_owner:null}}),target:this.refs.viewsMenuButton,isOpen:this.state.isViewsMenuOpen,onMenuClose:this.onViewsMenuClose}),_owner:null}]}),_owner:null}}),_owner:null}}}]),t}(c.Component);A.propTypes={machineIdentifier:c.PropTypes.string.isRequired,selectedViewType:c.PropTypes.string.isRequired},t.default=A,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children,n=e.machineIdentifier,r=e.selectedViewType,s=e.viewType,o=encodeURIComponent(n);return{$$typeof:i,type:u.default,
key:null,ref:null,props:a(u.default.defaultProps,{children:t,to:"#!/server/"+o+"/schedule?view="+s,isSelected:r===s}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(126)),u=s(l);r.propTypes={children:o.PropTypes.node.isRequired,machineIdentifier:o.PropTypes.string.isRequired,selectedViewType:o.PropTypes.string.isRequired,viewType:o.PropTypes.string.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";
function r(e){var t=e.serverEntityID,n=e.showError,r=e.isEmpty,s=e.subscriptionCount;return n?{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{title:(0,u.default)("There was an error loading the agenda")}),_owner:null}:r?{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{subscriptionCount:s}),_owner:null}:{$$typeof:i,type:"div",key:null,ref:null,props:{children:[y,{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{serverEntityID:t
}),_owner:null}]},_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(185),c=s(d),f=n(769),p=s(f),h=n(1846),v=s(h),g=n(1844),m=s(g),y={$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{}),_owner:null};r.propTypes={serverEntityID:o.PropTypes.string.isRequired,showError:o.PropTypes.bool,isEmpty:o.PropTypes.bool,subscriptionCount:o.PropTypes.number},t.default=r,e.exports=t.default;
},function(e,t,n){"use strict";function r(){return(0,s.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=e.mediaSubscriptions,n=e.calendar,r=e.isCalendarPopulated,a=e.calendarError;return{showError:!r&&!!a,isEmpty:!n.scheduled.length,subscriptionCount:t.length}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(1840),l=a(o);t.default=(0,i.connect)(r)(l.default),e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n,r,a,i){
if("episode"!==e)return n;var s=(0,M.default)({seasonIndex:r,episodeIndex:a,date:i});return t+" - "+s+" - "+n}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(7).default,u=n(10).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(5),f=d(c),p=n(53),h=d(p),v=n(4),g=(d(v),n(33)),m=d(g),y=n(24),b=n(308),P=d(b),w=n(243),S=d(w),_=n(612),T=d(_),I=n(118),M=d(I),C=n(31),x=d(C),E=n(34),k=d(E),D=n(332),A=d(D),O=n(267),R=d(O),L=n(333),N=d(L),j=n(737),U=d(j),$=n(215),z=d($),F=n(770),B=d(F),V=n(467),H=d(V),q=n(273),W=d(q),G=n(2186),Y=d(G),Q={
context:"agenda"},K=function(e){function t(e,n){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!1,isConflictsModalOpen:!1}}return i(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,x.default)(this,e,t)}},{key:"onLinkPress",decorators:[y.autobind],value:function(e){this.setState({isAiringDetailsModalOpen:!0})}},{key:"onConflictIconPress",decorators:[y.autobind],value:function(e){this.setState({
isConflictsModalOpen:!0})}},{key:"onRecordingModify",decorators:[y.autobind],value:function(){this.setState({isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!0})}},{key:"onAiringDetailsModalClose",decorators:[y.autobind],value:function(){this.setState({isAiringDetailsModalOpen:!1})}},{key:"onSubscribeModalClose",decorators:[y.autobind],value:function(){this.setState({isSubscribeModalOpen:!1,isConflictsModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.mediaSubscriptionEntityID,a=e.metadataItemEntityID,i=e.prePlayRoute,s=e.type,o=e.title,d=e.grandparentTitle,c=e.index,p=e.parentIndex,v=e.originallyAvailableAt,g=e.error,y=e.mediaItem,b=e.isRecording,w=e.recordingProgress,_=e.isComplete,I=e.hasError,M=e.hasSubscription,C=e.hasConflicts,x=e.showPlay,E=e.showDate,D=e.onPlayPress,O=this.state,L=O.isAiringDetailsModalOpen,j=O.isSubscribeModalOpen,$=O.isConflictsModalOpen,F=y.beginsAt,V=y.endsAt,q=y.startOffsetSeconds,G=void 0===q?0:q,K=y.endOffsetSeconds,X=void 0===K?0:K,Z=h.default.unix(F),J=(0,
T.default)(F-G,V+X),ee=(0,S.default)(F),te=Z.format("ddd, MMM D");(0,P.default)(F)?te=(0,f.default)("Yesterday"):ee&&(te=(0,f.default)("Today"));var ne=v&&(0,h.default)(v).isSame(Z,"day")?(0,f.default)("New"):"",re=d?d:o,ae=r(s,d,o,p,c,v);return{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:k.default,key:null,ref:null,props:u(k.default.defaultProps,{className:Y.default.underlay,to:i,onPress:i?void 0:this.onLinkPress}),_owner:null},{$$typeof:l,type:"div",key:null,ref:null,
props:{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:E&&te,className:(0,m.default)(Y.default.date,ee&&Y.default.isToday)},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:J,className:Y.default.time},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:[ne&&{$$typeof:l,type:A.default,key:null,ref:null,props:u(A.default.defaultProps,{children:ne,className:Y.default.isNewBadge}),_owner:null},re,{$$typeof:l,type:"div",key:null,ref:null,props:{
children:["movie"===s&&{$$typeof:l,type:H.default,key:null,ref:null,props:u(H.default.defaultProps,{metadataItemEntityID:a}),_owner:null},"episode"===s&&{$$typeof:l,type:W.default,key:null,ref:null,props:u(W.default.defaultProps,{metadataItemEntityID:a}),_owner:null}],className:Y.default.titleDetails},_owner:null}],className:Y.default.title,title:ae},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:[b&&!I&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,
type:R.default,key:null,ref:null,props:u(R.default.defaultProps,{size:24,backgroundClassName:Y.default.recordingProgressBackground,lineWidth:2,progress:w,showProgressText:!1}),_owner:null},{$$typeof:l,type:"span",key:null,ref:null,props:{className:Y.default.recordingIcon},_owner:null}],className:Y.default.recording},_owner:null},x&&{$$typeof:l,type:N.default,key:null,ref:null,props:u(N.default.defaultProps,{className:Y.default.playButton,title:o,onPress:D}),_owner:null},I&&{$$typeof:l,type:B.default,
key:null,ref:null,props:u(B.default.defaultProps,{error:g,onPress:C?this.onConflictIconPress:this.onLinkPress}),_owner:null}],className:Y.default.status},_owner:null}],className:Y.default.overlay},_owner:null},{$$typeof:l,type:U.default,key:null,ref:null,props:u(U.default.defaultProps,{isOpen:L,metricsProperties:Q,metadataItemEntityID:a,error:g,mediaItem:y,hasSubscription:M,isComplete:_,hasError:I,isRecording:b,recordingProgress:w,onRecordingModify:this.onRecordingModify,onModalClose:this.onAiringDetailsModalClose
}),_owner:null},M&&{$$typeof:l,type:z.default,key:null,ref:null,props:u(z.default.defaultProps,{isOpen:j||$,metricsProperties:Q,serverEntityID:t,mediaSubscriptionEntityID:n,metadataItemEntityID:a,subscriptionType:s,showConflicts:$,isRecordingSchedule:!0,onModalClose:this.onSubscribeModalClose}),_owner:null}],className:(0,m.default)(Y.default.event,_&&Y.default.isComplete,I&&Y.default.hasError)},_owner:null}}}]),t}(v.Component);K.propTypes={serverEntityID:v.PropTypes.string.isRequired,metadataItemEntityID:v.PropTypes.string.isRequired,
mediaSubscriptionEntityID:v.PropTypes.string,prePlayRoute:v.PropTypes.string,type:v.PropTypes.string.isRequired,title:v.PropTypes.string.isRequired,grandparentTitle:v.PropTypes.string,index:v.PropTypes.number,parentIndex:v.PropTypes.number,originallyAvailableAt:v.PropTypes.string,error:v.PropTypes.string,mediaItem:v.PropTypes.shape({beginsAt:v.PropTypes.number.isRequired,endsAt:v.PropTypes.number.isRequired,startOffsetSeconds:v.PropTypes.number,endOffsetSeconds:v.PropTypes.number}).isRequired,isRecording:v.PropTypes.bool.isRequired,
recordingProgress:v.PropTypes.number,isComplete:v.PropTypes.bool.isRequired,hasError:v.PropTypes.bool.isRequired,hasSubscription:v.PropTypes.bool.isRequired,hasConflicts:v.PropTypes.bool.isRequired,showPlay:v.PropTypes.bool.isRequired,showDate:v.PropTypes.bool.isRequired,onPlayPress:v.PropTypes.func.isRequired},t.default=K,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.events;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:n.map(function(e,r){
var s=l.default.unix(e.beginsAt),o=0===r||!l.default.unix(n[r-1].beginsAt).isSame(s,"day");return{$$typeof:a,type:c.default,key:r,ref:null,props:i(c.default.defaultProps,{component:p.default,serverEntityID:t,metadataItemEntityID:e.metadataItem,mediaSubscriptionID:e.mediaSubscriptionID,eventID:e.metadataItem.key,status:e.status,error:e.error,linkedKey:e.linkedKey,mediaItem:e.mediaItem,hasConflicts:!(!e.conflicts||!e.conflicts.length),showDate:o}),_owner:null}})},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(53),l=s(o),u=n(4),d=(s(u),n(768)),c=s(d),f=n(1842),p=s(f);r.propTypes={serverEntityID:u.PropTypes.string.isRequired,events:u.PropTypes.arrayOf(u.PropTypes.object)},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar},function(e){return{events:e.scheduled}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(1843),l=a(o);
t.default=(0,i.connect)(r)(l.default),e.exports=t.default},function(e,t,n){"use strict";function r(e){return{$$typeof:a,type:"div",key:null,ref:null,props:{children:o.default.createElement(u.default,e),className:c.default.agendaHeader},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(771),u=i(l),d=n(2187),c=i(d);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,l.createSelector)(function(e){return e.ui.recordingSchedulePage;
},function(e){var t=e.calendar,n=t.firstEvent,r=t.lastEvent;return{startTime:n?s.default.unix(n.beginsAt).toISOString():void 0,endTime:r?s.default.unix(r.beginsAt).toISOString():void 0}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),s=a(i),o=n(21),l=n(15),u=n(1845),d=a(u);t.default=(0,o.connect)(r)(d.default),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(5)),f=u(c),p=n(24),h=n(166),v=u(h),g=n(185),m=u(g),y=n(1859),b=u(y),P=n(1854),w=u(P),S=n(1852),_=u(S),T=n(769),I=u(T),M=n(2188),C=u(M),x={$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{}),_owner:null},E=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isMeasured:!1,width:null,visibleDays:0}}return a(t,e),i(t,[{key:"onMeasure",decorators:[p.autobind],
value:function(e){var t=e.width,n=this.state.visibleDays,r=Math.min(Math.floor(t/120),7);r!==n&&this.props.onVisibleDaysChange(r),this.setState({isMeasured:!0,width:t,visibleDays:r})}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.showError,r=e.isEmpty,a=e.subscriptionCount,i=e.visibleDays,s=e.onGoToPreviousRangePress,u=e.onGoToNextRangePress;return n?{$$typeof:l,type:m.default,key:null,ref:null,props:o(m.default.defaultProps,{title:(0,f.default)("There was an error loading the calendar")
}),_owner:null}:r?{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{subscriptionCount:a}),_owner:null}:{$$typeof:l,type:v.default,key:null,ref:null,props:o(v.default.defaultProps,{children:i===this.state.visibleDays&&{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{onGoToPreviousRangePress:s,onGoToNextRangePress:u}),_owner:null},x,{$$typeof:l,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{
serverEntityID:t}),_owner:null}]},_owner:null},className:C.default.calendar,ignoreHeight:!0,onMeasure:this.onMeasure}),_owner:null}}}]),t}(d.Component);E.propTypes={serverEntityID:d.PropTypes.string.isRequired,showError:d.PropTypes.bool,isEmpty:d.PropTypes.bool,subscriptionCount:d.PropTypes.number,visibleDays:d.PropTypes.number.isRequired,onVisibleDaysChange:d.PropTypes.func.isRequired,onGoToPreviousRangePress:d.PropTypes.func.isRequired,onGoToNextRangePress:d.PropTypes.func.isRequired},t.default=E,
e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,h.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=e.mediaSubscriptions,n=e.calendar,r=e.isCalendarPopulated,a=e.calendarError;return{showError:!r&&!!a,isEmpty:!n.scheduled.length,subscriptionCount:t.length,visibleDays:n.visibleDays}})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(11).default,u=n(1).default,d=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});
var c=n(4),f=u(c),p=n(21),h=n(15),v=n(24),g=n(50),m=n(256),y=d(m),b=n(1847),P=u(b),w=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"onVisibleDaysChange",decorators:[v.autobind],value:function(e){var t=this;(0,g.scheduleImmediateUpdate)(function(){t.props.setVisibleDays({visibleDays:e})})}},{key:"onGoToPreviousRangePress",decorators:[v.autobind],value:function(){this.props.goToPreviousRange()}},{key:"onGoToNextRangePress",
decorators:[v.autobind],value:function(){this.props.goToNextRange()}},{key:"render",value:function(){return f.default.createElement(P.default,l({onVisibleDaysChange:this.onVisibleDaysChange,onGoToPreviousRangePress:this.onGoToPreviousRangePress,onGoToNextRangePress:this.onGoToNextRangePress},this.props))}}]),t}(c.Component);w.propTypes={goToToday:c.PropTypes.func.isRequired,goToPreviousRange:c.PropTypes.func.isRequired,goToNextRange:c.PropTypes.func.isRequired,setVisibleDays:c.PropTypes.func.isRequired,
fetchCalendar:c.PropTypes.func.isRequired},t.default=(0,p.connect)(r,y)(w),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.date;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:{$$typeof:a,type:u.default,key:null,ref:null,props:i(u.default.defaultProps,{serverEntityID:t,date:n}),_owner:null},className:c.default.day},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),
n(1857)),u=s(l),d=n(2189),c=s(d);r.propTypes={serverEntityID:o.PropTypes.string.isRequired,date:o.PropTypes.string.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.date,n=u.default.unix(t),r=(0,g.default)(t),i=n.format("ddd M/D");return(0,h.default)(t)?i=(0,o.default)("Yesterday"):r&&(i=(0,o.default)("Today")),{$$typeof:a,type:"div",key:null,ref:null,props:{children:i,className:(0,f.default)(y.default.dayOfWeek,r&&y.default.isToday),title:i},_owner:null
}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(5),o=i(s),l=n(53),u=i(l),d=n(4),c=(i(d),n(33)),f=i(c),p=n(308),h=i(p),v=n(243),g=i(v),m=n(2190),y=i(m);r.propTypes={date:d.PropTypes.number.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.days,n=i(e,["days"]);return{$$typeof:a,type:"div",key:null,ref:null,props:{children:t.map(function(e){return u.default.createElement(c.default,s({key:e,date:e},n))}),className:p.default.calendarDays
},_owner:null}}var a=n(7).default,i=n(19).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(1849),c=o(d),f=n(2191),p=o(f);r.propTypes={days:l.PropTypes.arrayOf(l.PropTypes.string).isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){return{days:e.calendar.days}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var i=n(21),s=n(15),o=n(1851),l=a(o);t.default=(0,i.connect)(r)(l.default),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.daysOfWeek,n=i(e,["daysOfWeek"]);return{$$typeof:a,type:"div",key:null,ref:null,props:{children:t.map(function(e){return u.default.createElement(c.default,s({key:e,date:e},n))}),className:p.default.container},_owner:null}}var a=n(7).default,i=n(19).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(1850),c=o(d),f=n(2192),p=o(f);
r.propTypes={daysOfWeek:l.PropTypes.array},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar},function(e){return{daysOfWeek:e.daysOfWeek}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(1853),l=a(o);t.default=(0,i.connect)(r)(l.default),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(33)),f=u(c),p=n(24),h=n(612),v=u(h),g=n(31),m=u(g),y=n(34),b=u(y),P=n(267),w=u(P),S=n(333),_=u(S),T=n(737),I=u(T),M=n(215),C=u(M),x=n(770),E=u(x),k=n(2194),D=u(k),A={context:"calendar"},O=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!1,isConflictsModalOpen:!1}}return a(t,e),i(t,[{key:"shouldComponentUpdate",
value:function(e,t){return(0,m.default)(this,e,t)}},{key:"onLinkPress",decorators:[p.autobind],value:function(e){this.setState({isAiringDetailsModalOpen:!0})}},{key:"onConflictIconPress",decorators:[p.autobind],value:function(e){this.setState({isConflictsModalOpen:!0})}},{key:"onRecordingModify",decorators:[p.autobind],value:function(){this.setState({isAiringDetailsModalOpen:!1,isSubscribeModalOpen:!0})}},{key:"onAiringDetailsModalClose",decorators:[p.autobind],value:function(){this.setState({isAiringDetailsModalOpen:!1
})}},{key:"onSubscribeModalClose",decorators:[p.autobind],value:function(){this.setState({isSubscribeModalOpen:!1,isConflictsModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.mediaSubscriptionEntityID,r=e.metadataItemEntityID,a=e.prePlayRoute,i=e.type,s=e.grandparentTitle,u=e.title,d=e.error,c=e.mediaItem,p=e.isRecording,h=e.recordingProgress,g=e.isComplete,m=e.hasError,y=e.hasSubscription,P=e.hasConflicts,S=e.showPlay,T=e.onPlayPress,M=this.state,x=M.isAiringDetailsModalOpen,k=M.isSubscribeModalOpen,O=M.isConflictsModalOpen,R=c.beginsAt,L=c.endsAt,N=c.startOffsetSeconds,j=void 0===N?0:N,U=c.endOffsetSeconds,$=void 0===U?0:U,z=(0,
v.default)(R-j,L+$,{includeMinuteZero:!1}),F=s?s:u;return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:b.default,key:null,ref:null,props:l(b.default.defaultProps,{className:D.default.underlay,to:a,onPress:a?void 0:this.onLinkPress}),_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"div",key:null,ref:null,props:{children:F,className:D.default.title,title:F},_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,
type:"div",key:null,ref:null,props:{children:z,className:D.default.time},_owner:null},{$$typeof:o,type:"div",key:null,ref:null,props:{children:[p&&!m&&{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:w.default,key:null,ref:null,props:l(w.default.defaultProps,{size:24,backgroundClassName:D.default.recordingProgressBackground,lineWidth:2,progress:h,showProgressText:!1}),_owner:null},{$$typeof:o,type:"span",key:null,ref:null,props:{className:D.default.recordingIcon},_owner:null
}],className:D.default.recording},_owner:null},S&&{$$typeof:o,type:_.default,key:null,ref:null,props:l(_.default.defaultProps,{className:D.default.playButton,title:u,onPress:T}),_owner:null},m&&{$$typeof:o,type:E.default,key:null,ref:null,props:l(E.default.defaultProps,{error:d,onPress:P?this.onConflictIconPress:this.onLinkPress}),_owner:null}],className:D.default.status},_owner:null}],className:D.default.secondary},_owner:null}],className:D.default.overlay},_owner:null},{$$typeof:o,type:I.default,
key:null,ref:null,props:l(I.default.defaultProps,{isOpen:x,metricsProperties:A,metadataItemEntityID:r,error:d,mediaItem:c,hasSubscription:y,isComplete:g,hasError:m,isRecording:p,recordingProgress:h,onRecordingModify:this.onRecordingModify,onModalClose:this.onAiringDetailsModalClose}),_owner:null},y&&{$$typeof:o,type:C.default,key:null,ref:null,props:l(C.default.defaultProps,{isOpen:k||O,metricsProperties:A,serverEntityID:t,mediaSubscriptionEntityID:n,metadataItemEntityID:r,subscriptionType:i,showConflicts:O,
isRecordingSchedule:!0,onModalClose:this.onSubscribeModalClose}),_owner:null}],className:(0,f.default)(D.default.event,g&&D.default.isComplete,m&&D.default.hasError)},_owner:null}}}]),t}(d.Component);O.propTypes={serverEntityID:d.PropTypes.string.isRequired,metadataItemEntityID:d.PropTypes.string.isRequired,mediaSubscriptionEntityID:d.PropTypes.string,prePlayRoute:d.PropTypes.string,type:d.PropTypes.string.isRequired,title:d.PropTypes.string.isRequired,grandparentTitle:d.PropTypes.string,error:d.PropTypes.string,
mediaItem:d.PropTypes.shape({beginsAt:d.PropTypes.number.isRequired,endsAt:d.PropTypes.number.isRequired,startOffsetSeconds:d.PropTypes.number,endOffsetSeconds:d.PropTypes.number}).isRequired,isRecording:d.PropTypes.bool.isRequired,recordingProgress:d.PropTypes.number,isComplete:d.PropTypes.bool.isRequired,hasError:d.PropTypes.bool.isRequired,hasSubscription:d.PropTypes.bool.isRequired,hasConflicts:d.PropTypes.bool.isRequired,showPlay:d.PropTypes.bool.isRequired,onPlayPress:d.PropTypes.func.isRequired
},t.default=O,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.events;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:n.map(function(e,n){return{$$typeof:a,type:u.default,key:n,ref:null,props:i(u.default.defaultProps,{component:c.default,serverEntityID:t,metadataItemEntityID:e.metadataItem,mediaSubscriptionID:e.mediaSubscriptionID,eventID:e.metadataItem.key,status:e.status,error:e.error,linkedKey:e.linkedKey,mediaItem:e.mediaItem,hasConflicts:!(!e.conflicts||!e.conflicts.length)
}),_owner:null}})},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(768)),u=s(l),d=n(1855),c=s(d);r.propTypes={serverEntityID:o.PropTypes.string.isRequired,events:o.PropTypes.arrayOf(o.PropTypes.object)},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,c.createSelector)(function(e){return e.ui.recordingSchedulePage.calendar},function(e,t){var n=t.date;return n},function(e,t){var n=(0,
p.default)(t),r=o.default.filter(e.scheduled,function(e){return p.default.unix(e.beginsAt).isSame(n,"day")});return{events:r}})}function a(e){return u.default.createElement(v.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(4),u=i(l),d=n(21),c=n(15),f=n(53),p=i(f),h=n(1856),v=i(h);a.propTypes={date:l.PropTypes.string.isRequired},t.default=(0,d.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.hasPastEvents,n=e.hasFutureEvents,r=e.onGoToPreviousRangePress,s=e.onGoToNextRangePress;
return{$$typeof:a,type:"div",key:null,ref:null,props:{children:{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:{$$typeof:a,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{name:"plex-icon-hub-prev-560","aria-label":(0,f.default)("Previous Page")}),_owner:null},className:(0,d.default)(w.default.calendarNav,!t&&w.default.calendarNavDisabled),kind:p.kinds.DEFAULT,size:p.sizes.MEDIUM,isDisabled:!t,
onPress:r}),_owner:null},l.default.createElement(b.default,e),{$$typeof:a,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:{$$typeof:a,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{name:"plex-icon-hub-next-560","aria-label":(0,f.default)("Next Page")}),_owner:null},className:(0,d.default)(w.default.calendarNav,!n&&w.default.calendarNavDisabled),kind:p.kinds.DEFAULT,size:p.sizes.MEDIUM,isDisabled:!n,onPress:s}),_owner:null}],className:w.default.calendarHeader
},_owner:null},className:w.default.calendarHeader},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(33),d=s(u),c=n(5),f=s(c),p=n(30),h=n(36),v=s(h),g=n(34),m=s(g),y=n(771),b=s(y),P=n(2195),w=s(P);r.propTypes={hasPastEvents:o.PropTypes.bool.isRequired,hasFutureEvents:o.PropTypes.bool.isRequired,onGoToPreviousRangePress:o.PropTypes.func.isRequired,onGoToNextRangePress:o.PropTypes.func.isRequired},t.default=r,e.exports=t.default;
},function(e,t,n){"use strict";function r(){return(0,f.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=l.default.pick(e.calendar,"time","startTime","endTime","hasPastEvents","hasFutureEvents");return i({},t)})}function a(e){return d.default.createElement(h.default,e)}var i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=s(o),u=n(4),d=s(u),c=n(21),f=n(15),p=n(1858),h=s(p);t.default=(0,c.connect)(r)(a),e.exports=t.default},function(e,t,n){
"use strict";function r(e){var t=e.serverEntityID,n=e.mediaSubscriptionEntityIDs,r=e.showError,s=e.moveIndex,o=e.onSubscriptionDragMove,l=e.onSubscriptionDragEnd;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:"div",key:null,ref:null,props:{children:(0,u.default)("Recording Priority"),className:m.default.paneHeader},_owner:null},{$$typeof:a,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{children:r?{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{
$$typeof:a,type:"div",key:null,ref:null,props:{children:(0,u.default)("There was an error loading recordings.")},_owner:null},{$$typeof:a,type:"div",key:null,ref:null,props:{children:(0,u.default)("Please try again.")},_owner:null}],className:m.default.error},_owner:null}:n.map(function(e,n){var r=null!=s,u=r&&s===n,d=r&&s===n+1;return{$$typeof:a,type:p.default,key:e,ref:null,props:i(p.default.defaultProps,{serverEntityID:t,mediaSubscriptionEntityID:e,isDraggingBefore:u,isDraggingAfter:d,sortIndex:n,
onSubscriptionDragMove:o,onSubscriptionDragEnd:l}),_owner:null}}),className:m.default.paneScroller,autoScroll:!0}),_owner:null},{$$typeof:a,type:v.default,key:null,ref:null,props:i(v.default.defaultProps,{serverEntityID:t}),_owner:null}],className:m.default.pane},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(78),c=s(d),f=n(1864),p=s(f),h=n(1863),v=s(h),g=n(2197),m=s(g);r.propTypes={serverEntityID:o.PropTypes.string.isRequired,
mediaSubscriptionEntityIDs:o.PropTypes.array.isRequired,showError:o.PropTypes.bool,moveIndex:o.PropTypes.number,onSubscriptionDragMove:o.PropTypes.func.isRequired,onSubscriptionDragEnd:o.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,p.createSelector)(function(e){return e.ui.recordingSchedulePage},function(e){var t=e.mediaSubscriptions,n=e.isMediaSubscriptionsPopulated,r=e.mediaSubscriptionsError;return{mediaSubscriptionEntityIDs:t,showError:!n&&!!r
}})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(11).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(21),p=n(15),h=n(24),v=n(50),g=n(256),m=n(1860),y=u(m),b=function(e){function t(e,n){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={moveIndex:null}}return i(t,e),s(t,[{key:"onSubscriptionDragMove",decorators:[h.autobind],value:function(e){this.setState({moveIndex:e})}},{key:"onSubscriptionDragEnd",
decorators:[h.autobind],value:function(e,t){var n=this,r=this.state.moveIndex;t&&null!=r&&(0,v.scheduleImmediateUpdate)(function(){n.props.moveMediaSubscription(l({},e,{moveIndex:r}))}),this.setState({moveIndex:null})}},{key:"render",value:function(){return c.default.createElement(y.default,l({moveIndex:this.state.moveIndex,onSubscriptionDragMove:this.onSubscriptionDragMove,onSubscriptionDragEnd:this.onSubscriptionDragEnd},this.props))}}]),t}(d.Component);b.propTypes={moveMediaSubscription:d.PropTypes.func.isRequired
},t.default=(0,f.connect)(r,{moveMediaSubscription:g.moveMediaSubscription})(b),e.exports=t.default},function(e,t,n){"use strict";function r(e){switch(e){case"movie":return[x.default,A.default];case"show":return[x.default,z.default];case"episode":return[k.default,R.default];case"playlist":return[x.default,z.default];default:return[x.default]}}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(7).default,u=n(10).default,d=n(19).default,c=n(11).default,f=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var p=n(4),h=f(p),v=n(24),g=n(31),m=f(g),y=n(187),b=n(36),P=f(b),w=n(34),S=f(w),_=n(336),T=f(_),I=n(339),M=f(I),C=n(340),x=f(C),E=n(463),k=f(E),D=n(751),A=f(D),O=n(466),R=f(O),L=n(215),N=f(L),j=n(1866),U=f(j),$=n(1865),z=f($),F=n(2198),B=f(F),V=48,H="copy",q=function(e){function t(e,n){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isSubscribeModalOpen:!1}}return i(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t);
}},{key:"onLinkPress",decorators:[v.autobind],value:function(e){this.setState({isSubscribeModalOpen:!0})}},{key:"onSubscribeModalClose",decorators:[v.autobind],value:function(){this.setState({isSubscribeModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.mediaSubscriptionEntityID,a=e.type,i=e.thumbTranscodeUrl,s=e.grandparentThumbTranscodeUrl,o=e.connectDragSource,f=d(e,["serverEntityID","mediaSubscriptionEntityID","type","thumbTranscodeUrl","grandparentThumbTranscodeUrl","connectDragSource"]),p=this.state.isSubscribeModalOpen,v="playlist"===a?"show":a;
return{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:S.default,key:null,ref:null,props:u(S.default.defaultProps,{children:{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:T.default,key:null,ref:null,props:u(T.default.defaultProps,{className:B.default.posterContainer,component:M.default,type:v,width:V,height:(0,y.getHeight)(V,v),url:s||i}),_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:r(a).map(function(e,t){return h.default.createElement(U.default,c({
key:t,component:e,isSecondary:t>0,type:a},f))}),className:B.default.titleContainer},_owner:null}],className:B.default.linkContainer},_owner:null},className:B.default.link,onPress:this.onLinkPress}),_owner:null},o({$$typeof:l,type:"div",key:null,ref:null,props:{children:{$$typeof:l,type:P.default,key:null,ref:null,props:u(P.default.defaultProps,{className:B.default.dragIcon,name:"plex-icon-reorder-560"}),_owner:null},className:B.default.dragHandle},_owner:null},{dropEffect:H}),{$$typeof:l,type:N.default,
key:null,ref:null,props:u(N.default.defaultProps,{isOpen:p,serverEntityID:t,mediaSubscriptionEntityID:n,subscriptionType:a,onModalClose:this.onSubscribeModalClose}),_owner:null}],className:B.default.subscription},_owner:null}}}]),t}(p.Component);q.propTypes={serverEntityID:p.PropTypes.string.isRequired,mediaSubscriptionEntityID:p.PropTypes.string.isRequired,type:p.PropTypes.string.isRequired,thumbTranscodeUrl:p.PropTypes.func,grandparentThumbTranscodeUrl:p.PropTypes.func,connectDragSource:p.PropTypes.func.isRequired
},q.defaultProps={connectDragSource:function(e){return e}},t.default=q,e.exports=t.default},function(e,t,n){"use strict";function r(e){return{item:e.getItem(),itemType:e.getItemType(),currentOffset:e.getSourceClientOffset()}}var a=n(17).default,i=n(18).default,s=n(44).default,o=n(16).default,l=n(10).default,u=n(7).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=(d(c),n(521)),p=n(31),h=d(p),v=n(188),g=d(v),m=n(778),y=n(1673),b=d(y),P=n(772),w=d(P),S=n(2199),_=d(S),T=parseInt(g.default.recordingPriorityPaneWidth,10),I=parseInt(g.default.recordingPriorityDragHandleWidth,10),M=function(e){
function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,h.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.item,r=e.itemType,a=e.currentOffset;if(!a||r!==m.RECORDING_PRIORITY_SUBSCRIPTION)return null;var i=a.x,s=a.y,o=T-I,d="translate3d("+(i-o)+"px, "+s+"px, 0)",c={position:"absolute",WebkitTransform:d,msTransform:d,transform:d};return{
$$typeof:u,type:b.default,key:null,ref:null,props:l(b.default.defaultProps,{children:{$$typeof:u,type:"div",key:null,ref:null,props:{children:{$$typeof:u,type:w.default,key:null,ref:null,props:l(w.default.defaultProps,{serverEntityID:t,mediaSubscriptionEntityID:n.mediaSubscriptionEntityID}),_owner:null},className:_.default.dragPreview,style:c},_owner:null}}),_owner:null}}}]),t}(c.Component);M.propTypes={serverEntityID:c.PropTypes.string.isRequired,item:c.PropTypes.object,itemType:c.PropTypes.string,
currentOffset:c.PropTypes.shape({x:c.PropTypes.number.isRequired,y:c.PropTypes.number.isRequired})},t.default=(0,f.DragLayer)(r)(M),e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return{connectDragPreview:e.dragPreview(),connectDragSource:e.dragSource(),isDragging:t.isDragging()}}function a(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver()}}var i=n(17).default,s=n(18).default,o=n(44).default,l=n(16).default,u=n(7).default,d=n(10).default,c=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var f=n(4),p=(c(f),n(61)),h=n(521),v=n(843),g=n(33),m=c(g),y=n(31),b=c(y),P=n(778),w=n(783),S=n(772),_=c(S),T=n(2200),I=c(T),M={beginDrag:function(e){var t=e.mediaSubscriptionEntityID;return{mediaSubscriptionEntityID:t}},endDrag:function(e,t,n){e.onSubscriptionDragEnd(t.getItem(),t.didDrop())}},C={hover:function(e,t,n){var r=(0,p.findDOMNode)(n).getBoundingClientRect(),a=(r.bottom-r.top)/2,i=t.getClientOffset(),s=i.y-r.top,o=e.sortIndex,l=s>a?o+1:o;e.onSubscriptionDragMove(l)}},x=function(e){
function t(){l(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return s(t,e),o(t,[{key:"componentDidMount",value:function(){this.props.connectDragPreview((0,v.getEmptyImage)())}},{key:"shouldComponentUpdate",value:function(e,t){return(0,b.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.mediaSubscriptionEntityID,r=e.isDragging,a=e.isDraggingBefore,i=e.isDraggingAfter,s=e.isOver,o=e.connectDropTarget,l=e.connectDragSource;
return o({$$typeof:u,type:"div",key:null,ref:null,props:{children:{$$typeof:u,type:_.default,key:null,ref:null,props:d(_.default.defaultProps,{serverEntityID:t,mediaSubscriptionEntityID:n,connectDragSource:l}),_owner:null},className:(0,m.default)(I.default.dragSource,r&&w.IS_DRAGGING,a&&s&&w.IS_DRAGGING_BEFORE,i&&s&&w.IS_DRAGGING_AFTER)},_owner:null})}}]),t}(f.Component);x.propTypes={serverEntityID:f.PropTypes.string.isRequired,mediaSubscriptionEntityID:f.PropTypes.string.isRequired,isDragging:f.PropTypes.bool,
isDraggingBefore:f.PropTypes.bool,isDraggingAfter:f.PropTypes.bool,isOver:f.PropTypes.bool,connectDropTarget:f.PropTypes.func.isRequired,connectDragPreview:f.PropTypes.func.isRequired,connectDragSource:f.PropTypes.func.isRequired,onSubscriptionDragMove:f.PropTypes.func.isRequired,onSubscriptionDragEnd:f.PropTypes.func.isRequired},t.default=(0,h.DropTarget)(P.RECORDING_PRIORITY_SUBSCRIPTION,C,a)((0,h.DragSource)(P.RECORDING_PRIORITY_SUBSCRIPTION,M,r)(x)),e.exports=t.default},function(e,t,n){"use strict";
function r(e){if("show"===e)return(0,d.default)("Series")}function a(e){var t=e.className,n=e.type;return{$$typeof:i,type:"span",key:null,ref:null,props:{children:[{$$typeof:i,type:f.default,key:null,ref:null,props:s(f.default.defaultProps,{className:h.default.seriesIcon,name:"plex-icon-dvr-series-560"}),_owner:null},r(n)],className:t},_owner:null}}var i=n(7).default,s=n(10).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=(o(l),n(5)),d=o(u),c=n(36),f=o(c),p=n(2201),h=o(p);
a.propTypes={className:l.PropTypes.string,type:l.PropTypes.string.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.component,n=e.isSecondary,r=a(e,["component","isSecondary"]);return l.default.createElement(t,i({className:n?d.default.secondaryTitle:d.default.title},r))}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(2202),d=s(u);r.propTypes={component:o.PropTypes.func.isRequired,
isSecondary:o.PropTypes.bool},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityIDs,n=e.query,r=e.isSearchPending,s=e.searchAllServers,o=e.onSearchAllChange;return{$$typeof:i,type:d.default,key:null,ref:null,props:a(d.default.defaultProps,{children:[{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{isSearchPending:r,query:n,searchAllServers:s,onSearchAllChange:o}),_owner:null},{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{
serverEntityIDs:t,query:n}),_owner:null}],scrollDirection:l.scrollDirections.NONE}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(30)),u=n(180),d=s(u),c=n(1871),f=s(c),p=n(1870),h=s(p);r.propTypes={serverEntityIDs:o.PropTypes.array.isRequired,query:o.PropTypes.string.isRequired,isSearchPending:o.PropTypes.bool.isRequired,searchAllServers:o.PropTypes.bool.isRequired,onSearchAllChange:o.PropTypes.func.isRequired},
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,m.createSelector)(function(e){return e.servers},function(e,t){var n=t.serverEntityID;return n},_.default,I.default,function(e,t,n,r){var a=r.searchAllServers;return e.reduce(function(e,r){if(r!==t&&!a)return e;var i=n[r],s=v.default.isMatch(i,{isConnected:!0,isFullServer:!0});return s?e.concat(r):e},[])})}function a(){return(0,w.default)(r(),function(e){return e})}function i(){return(0,m.createSelector)(function(e){
return e.ui.searchPage},a(),I.default,function(e,t,n){return{serverEntityIDs:t,searchAllServers:n.searchAllServers,isSearchPending:!!v.default.findWhere(e.searches,{isSearchPending:!0})}})}var s=n(17).default,o=n(18).default,l=n(25).default,u=n(16).default,d=n(11).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=c(f),h=n(3),v=c(h),g=n(21),m=n(15),y=n(24),b=n(50),P=n(238),w=c(P),S=n(239),_=c(S),T=n(142),I=c(T),M=n(683),C=n(91),x=n(1867),E=c(x),k={populateSearchProviders:M.populateSearchProviders,
clearSearchPage:M.clearSearchPage,saveSettings:C.saveSettings},D=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(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){e.serverEntityIDs!==this.props.serverEntityIDs&&this._populate(e)}},{key:"componentWillUnmount",value:function(){this.props.clearSearchPage()}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];
(0,b.scheduleImmediateUpdate)(function(){e.populateSearchProviders(e.serverEntityIDs)})}},{key:"onSearchAllChange",decorators:[y.autobind],value:function(e){var t=this;(0,b.scheduleImmediateUpdate)(function(){t.props.saveSettings({name:"experienceSettings",settings:{searchAllServers:e}})})}},{key:"render",value:function(){return p.default.createElement(E.default,d({},this.props,{onSearchAllChange:this.onSearchAllChange}))}}]),t}(f.Component);D.propTypes={serverEntityID:f.PropTypes.string.isRequired,
machineIdentifier:f.PropTypes.string.isRequired,serverEntityIDs:f.PropTypes.array.isRequired,populateSearchProviders:f.PropTypes.func.isRequired,clearSearchPage:f.PropTypes.func.isRequired,saveSettings:f.PropTypes.func.isRequired},t.default=(0,g.connect)(i,k)(D),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.isSearchCapable,n=e.providers,r=e.searchAllServers,o=e.columnAdjustment;return t?{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:n.map(function(e){
return u.default.createElement(p.default,s({key:e.providerEntityID,columnAdjustment:o,searchAllServers:r},e))}),innerClassName:b.default.searchPageContent}),_owner:null}:{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{title:(0,c.default)("This server does not support search"),description:(0,c.default)("Browse libraries using the sidebar")}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(1872),p=o(f),h=n(216),v=o(h),g=n(150),m=o(g),y=n(2203),b=o(y);
r.propTypes={isSearchCapable:l.PropTypes.bool.isRequired,providers:l.PropTypes.arrayOf(l.PropTypes.object),columnAdjustment:l.PropTypes.number.isRequired,searchAllServers:l.PropTypes.bool.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,y.createSelector)(function(e,t){var n=t.serverEntityIDs;return n},_.default,I.default,function(e,t,n){return e.reduce(function(e,r){var a=t[r],i=a.desktop.providers;return i.forEach(function(t){var a=n[t];e[t]={serverEntityID:r,
identifier:a.identifier,title:a.title}}),e},{})})}function a(){return(0,w.default)(r(),function(e){return e})}function i(){return(0,y.createSelector)(function(e){return e.ui.searchPage.searches},a(),function(e,t){var n=e.reduce(function(e,n){var r=n.providerEntityID,a=t[r];if(!a)return e;var i=e[a.identifier];return i||(i=e[a.identifier]={providerEntityID:r,title:a.title,isSearchPending:!1,isSearchPopulated:!1,hubs:{}}),n.isSearchPending&&(i.isSearchPending=!0),n.isSearchPopulated&&(i.isSearchPopulated=!0),
n.hubs.forEach(function(e){var t=e.results.map(function(e){return{serverEntityID:a.serverEntityID,providerEntityID:r,searchResultEntityID:e}}),n=i.hubs[e.hubIdentifier];n?(n.size+=e.size,n.results=n.results.concat(t)):i.hubs[e.hubIdentifier]={hubIdentifier:e.hubIdentifier,size:e.size,type:e.type,title:e.title,results:[].concat(t)}}),e},{});return h.default.map(n,function(e){return{providerEntityID:e.providerEntityID,title:e.title,isSearchPending:e.isSearchPending,isSearchPopulated:e.isSearchPopulated,
hubs:h.default.values(e.hubs)}})})}function s(){return(0,y.createSelector)(a(),i(),C.default,function(e,t,n){return{availableProviders:e,isSearchCapable:!!c(e).length,searchAllServers:n.searchAllServers,columnAdjustment:n.columnAdjustment,providers:t}})}var o=n(17).default,l=n(18).default,u=n(44).default,d=n(16).default,c=n(79).default,f=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var p=n(3),h=f(p),v=n(4),g=f(v),m=n(21),y=n(15),b=n(50),P=n(595),w=f(P),S=n(239),_=f(S),T=n(303),I=f(T),M=n(142),C=f(M),x=n(683),E=n(1869),k=f(E),D=30,A={
fetchSearchPage:x.fetchSearchPage,clearSearchPage:x.clearSearchPage},O=function(e){function t(){d(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return l(t,e),u(t,[{key:"componentWillMount",value:function(){var e=this;(0,b.scheduleImmediateUpdate)(function(){e._clear(),e._populate()})}},{key:"componentWillReceiveProps",value:function(e){var t=this,n=e.query!==this.props.query,r=e.availableProviders!==this.props.availableProviders;(n||r)&&(0,b.scheduleImmediateUpdate)(function(){
n&&t._clear(e),t._populate(e)})}},{key:"_clear",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];e.clearSearchPage()}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];e.fetchSearchPage({availableProviders:e.availableProviders,query:e.query,limit:D})}},{key:"render",value:function(){return g.default.createElement(k.default,this.props)}}]),t}(v.Component);O.propTypes={availableProviders:v.PropTypes.object.isRequired,
query:v.PropTypes.string.isRequired,fetchSearchPage:v.PropTypes.func.isRequired,clearSearchPage:v.PropTypes.func.isRequired},t.default=(0,m.connect)(s,A)(O),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(5),p=u(f),h=n(24),v=n(31),g=u(v),m=n(30),y=n(55),b=u(y),P=n(268),w=u(P),S=n(272),_=u(S),T=n(181),I=u(T),M=n(182),C=u(M),x=n(341),E=u(x),k=n(217),D=u(k),A=n(469),O=u(A),R=n(1873),L=u(R),N=n(2204),j=u(N),U={
$$typeof:l,type:O.default,key:null,ref:null,props:o(O.default.defaultProps,{}),_owner:null},$={$$typeof:l,type:D.default,key:null,ref:null,props:o(D.default.defaultProps,{children:{$$typeof:l,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{}),_owner:null}}),_owner:null},z=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isSearchMenuOpen:!1}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){
return(0,g.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,r=e.searchAllServers,a=e.onSearchAllChange;return{$$typeof:l,type:I.default,key:null,ref:null,props:o(I.default.defaultProps,{children:[{$$typeof:l,
type:C.default,key:null,ref:null,props:o(C.default.defaultProps,{children:[(0,p.default)("Search"),U,c.default.createElement(w.default,{ref:"sharedSearchMenuButton",onPress:this.onSearchMenuButtonPress},r?(0,p.default)("All Servers"):(0,p.default)("This Server")),{$$typeof:l,type:L.default,key:null,ref:null,props:o(L.default.defaultProps,{onSearchAllChange:a,isSearchAll:r,target:this.refs.sharedSearchMenuButton,isOpen:this.state.isSearchMenuOpen,onMenuClose:this.onSearchMenuClose}),_owner:null}]}),
_owner:null},{$$typeof:l,type:E.default,key:null,ref:null,props:o(E.default.defaultProps,{children:[{$$typeof:l,type:"span",key:null,ref:null,props:{children:t?(0,p.default)('Searching for "{1}"',n):(0,p.default)('Results for "{1}"',n)},_owner:null},t&&{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{className:j.default.spinner,size:m.sizes.SMALL}),_owner:null}]}),_owner:null},$]}),_owner:null}}}]),t}(d.Component);z.propTypes={isSearchPending:d.PropTypes.bool.isRequired,
query:d.PropTypes.string.isRequired,searchAllServers:d.PropTypes.bool.isRequired,onSearchAllChange:d.PropTypes.func.isRequired},t.default=z,e.exports=t.default},function(e,t,n){"use strict";function r(e){return function(t){return c.default.createElement(E.default,o({component:D.default},e,t))}}function a(e){var t=e.title,n=e.hubs,a=e.columnAdjustment,l=e.searchAllServers,u=e.isSearchPending,d=e.isSearchPopulated;return{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:"div",
key:null,ref:null,props:{children:[t,u&&{$$typeof:i,type:_.default,key:null,ref:null,props:s(_.default.defaultProps,{className:O.default.spinner,size:v.SMALL}),_owner:null}],"aria-role":"heading","aria-level":"2",className:O.default.providerTitle},_owner:null},!n.length&&d?{$$typeof:i,type:C.default,key:null,ref:null,props:s(C.default.defaultProps,{title:(0,p.default)("No Results"),description:(0,p.default)("Try a different query")}),_owner:null}:n.map(function(e){var t=e.type,n=m.default.SEARCH,i=(0,
b.default)(t,n,{isSearch:!0,isSearchAll:l});return c.default.createElement(I.default,o({},e,{key:e.hubIdentifier,listType:t,listContext:n,keyPropName:"searchResultEntityID",size:e.results.length,items:e.results,itemsOffset:0,layout:(0,w.default)(t,n,a,i.length),cellRenderer:r({listType:t,listContext:n,titleComponents:i})}))})]},_owner:null}}var i=n(7).default,s=n(10).default,o=n(11).default,l=n(1).default,u=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=l(d),f=n(5),p=l(f),h=n(251),v=u(h),g=n(114),m=l(g),y=n(278),b=l(y),P=n(486),w=l(P),S=n(55),_=l(S),T=n(458),I=l(T),M=n(149),C=l(M),x=n(773),E=l(x),k=n(1887),D=l(k),A=n(2205),O=l(A);
a.propTypes={title:d.PropTypes.string.isRequired,hubs:d.PropTypes.arrayOf(d.PropTypes.object),columnAdjustment:d.PropTypes.number.isRequired,searchAllServers:d.PropTypes.bool.isRequired,isSearchPending:d.PropTypes.bool.isRequired,isSearchPopulated:d.PropTypes.bool.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(19).default,d=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var c=n(4),f=d(c),p=n(5),h=d(p),v=n(24),g=n(104),m=d(g),y=n(126),b=d(y),P=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"onThisServerPress",decorators:[v.autobind],value:function(){this.props.onSearchAllChange(!1)}},{key:"onAllServersPress",decorators:[v.autobind],value:function(){this.props.onSearchAllChange(!0)}},{key:"render",value:function(){var e=this.props,t=e.isSearchAll,n=u(e,["isSearchAll"]);
return f.default.createElement(m.default,n,{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:(0,h.default)("This Server"),isSelected:!t,onPress:this.onThisServerPress}),_owner:null},{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:(0,h.default)("All Servers"),isSelected:t,onPress:this.onAllServersPress}),_owner:null})}}]),t}(c.Component);P.propTypes={isOpen:c.PropTypes.bool.isRequired,onSearchAllChange:c.PropTypes.func.isRequired,
isSearchAll:c.PropTypes.bool.isRequired},t.default=P,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default,d=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=u(c),p=n(61),h=u(p),v=n(33),g=u(v),m=n(76),y=u(m),b=n(24),P=n(50),w=n(326),S=d(w),_=n(31),T=u(_),I=n(277),M=d(I),C=n(188),x=u(C),E=n(1877),k=u(E),D=n(1886),A=u(D),O=n(2206),R=u(O),L=parseInt(x.default.searchResultHeight,10),N=function(e){
function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.isTabScoped=!1,this.state={scrollTop:0,isOpen:!1}}return a(t,e),i(t,[{key:"componentWillMount",value:function(){this._listenForPress()}},{key:"componentWillReceiveProps",value:function(e,t){var n=e.selectedResultEntityID,r=e.query,a=this.props.query!==r,i=r.trim().length,s=this.state.isOpen;i&&!s&&a?this.setState({isOpen:!0}):!i&&s&&(this.setState({isOpen:!1}),this.isTabScoped&&(M.resetScopedFocus(),
this.isTabScoped=!1)),null==n&&this.setState({scrollTop:0})}},{key:"shouldComponentUpdate",value:function(e,t){return(0,T.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=h.default.findDOMNode(this.refs.results),r=n.clientHeight,a=r+this.state.scrollTop,i=t+L>a||t<this.state.scrollTop;this.setState({scrollTop:i?t:this.state.scrollTop})}},{key:"onWindowPress",decorators:[b.autobind],value:function(e){if(this.state.isOpen){var t=h.default.findDOMNode(this.refs.search),n=t&&t.contains(e.target);n||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({offset:-1}):this.props.selectQuickSearchResult({offset:1}),this.isTabScoped&&(M.restorePreviousFocus(),this.isTabScoped=!1));break;case S.ENTER:if(n){var r=y.default.platformID,a="osx"===r?e.metaKey:e.ctrlKey,i=e.shiftKey;M.resetFocus(),this.isTabScoped=!1,a?i?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&&(M.restorePreviousFocus(),this.isTabScoped=!1),n?this.setState({isOpen:!1}):this.props.changeQuickSearchQuery("");break;case S.TAB:if(n){if(!this.isTabScoped){var s=h.default.findDOMNode(this.refs.results);M.startScopedFocus(s),this.isTabScoped=!0}M.scopeTabEvent(e)}}}},{key:"onInputClick",decorators:[b.autobind],
value:function(e){this.isTabScoped&&(M.restorePreviousFocus(),this.isTabScoped=!1),this.state.isOpen||""===this.props.query||this.setState({isOpen:!0})}},{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;(0,P.scheduleImmediateUpdate)(function(){e.props.fetchQuickSearch()})}},{key:"onInputChange",decorators:[b.autobind],value:function(e){var t=this;(0,P.scheduleImmediateUpdate)(function(){
t.props.changeQuickSearchQuery(e)})}},{key:"render",value:function(){var e=this.props,t=e.serverEntityID,n=e.query;return f.default.createElement("div",{ref:"search",className:(0,g.default)(R.default.container),onKeyDown:this.onKeyDown},{$$typeof:l,type:k.default,key:null,ref:null,props:o(k.default.defaultProps,{query:n,onChange:this.onInputChange,onSearch:this.onSearch,onClick:this.onInputClick}),_owner:null},this.state.isOpen&&f.default.createElement(A.default,{ref:"results",serverEntityID:t,scrollTop:this.state.scrollTop,
onScrollIntoView:this.onScrollIntoView,onScrollPositionChange:this.onScrollPositionChange}))}}]),t}(c.Component);N.propTypes={serverEntityID:c.PropTypes.string.isRequired,query:c.PropTypes.string.isRequired,selectedResultEntityID:c.PropTypes.string,changeQuickSearchQuery:c.PropTypes.func.isRequired,fetchQuickSearch:c.PropTypes.func.isRequired,navigateQuickSearchResult:c.PropTypes.func.isRequired,playQuickSearchItem:c.PropTypes.func.isRequired,selectQuickSearchResult:c.PropTypes.func.isRequired,resetQuickSearch:c.PropTypes.func.isRequired
},t.default=N,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,m.createSelector)(function(e){return e.ui.quickSearch},M,function(e,t){if(!t)return{};var n=p.default.pick(e,"query","providerIdentifier","selectedResultEntityID");return a({serverEntityID:t.entityID,isConnected:t.isConnected,providerEntityIDs:t.desktop.providers},n)})}var a=n(11).default,i=n(17).default,s=n(18).default,o=n(44).default,l=n(16).default,u=n(19).default,d=n(1).default,c=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var f=n(3),p=d(f),h=n(4),v=d(h),g=n(21),m=n(15),y=n(50),b=n(239),P=d(b),w=n(110),S=n(122),_=c(S),T=n(1874),I=d(T),M=(0,m.createSelector)(function(e){return e.primaryServer},P.default,function(e,t){return e?t[e]:void 0}),C=a({populateProviders:w.populateProviders},_),x=function(e){function t(){l(this,t),i(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.isConnected!==this.props.isConnected,n=e.providerEntityIDs!==this.props.providerEntityIDs,r=e.providerIdentifier!==this.props.providerIdentifier;(t||n||r)&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],t=e.serverEntityID,n=e.isConnected,r=e.providerEntityIDs,a=e.providerIdentifier;t&&n&&e.populateProviders({serverEntityID:t}),r&&r.length&&(0,y.scheduleImmediateUpdate)(function(){e.initQuickSearch({
serverEntityID:t,providerEntityIDs:r,providerIdentifier:a})})}},{key:"render",value:function(){var e=this.props,t=e.providerEntityIDs,n=u(e,["providerEntityIDs"]);return t&&t.length?v.default.createElement(I.default,n):null}}]),t}(h.Component);x.propTypes={serverEntityID:h.PropTypes.string,isConnected:h.PropTypes.bool,providerEntityIDs:h.PropTypes.array,providerIdentifier:h.PropTypes.string,populateProviders:h.PropTypes.func.isRequired,initQuickSearch:h.PropTypes.func.isRequired},t.default=(0,g.connect)(r,C)(x),
e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(7).default,l=n(19).default,u=n(11).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=d(c),p=n(31),h=d(p),v=n(773),g=d(v),m=n(1885),y=d(m),b=n(2207),P=d(b),w=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,
h.default)(this,e,t)}},{key:"render",value:function(){var e=this.props,t=e.title,n=e.selectedResultEntityID,r=e.results,a=l(e,["title","selectedResultEntityID","results"]);return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:"h5",key:null,ref:null,props:{children:t,className:P.default.hubTitle},_owner:null},r.map(function(e,t){return f.default.createElement(g.default,u({key:e,searchResultEntityID:e,component:y.default,isSelected:n===e},a))})]},_owner:null}}}]),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 r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(33),p=u(f),h=n(12),v=u(h),g=n(31),m=u(g),y=n(24),b=n(36),P=u(b),w=n(34),S=u(w),_=n(2208),T=u(_),I=function(e){
function t(e){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={isFocused:!1,query:e.query},this.searchTimeout=null}return a(t,e),i(t,[{key:"componentDidMount",value:function(){v.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(){
v.default.off("shortcut:search",this.focusInput),this.searchTimeout&&clearTimeout(this.searchTimeout)}},{key:"focusInput",decorators:[y.autobind],value:function(){this.refs.input.focus()}},{key:"onClick",decorators:[y.autobind],value:function(e){this.focusInput(),this.props.onClick()}},{key:"onFocus",decorators:[y.autobind],value:function(){this.setState({isFocused:!0})}},{key:"onBlur",decorators:[y.autobind],value:function(){this.setState({isFocused:!1})}},{key:"onChange",decorators:[y.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,200))})}},{key:"onClearPress",decorators:[y.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{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:P.default,key:null,ref:null,props:l(P.default.defaultProps,{name:"plex-icon-search-560",className:T.default.searchIcon}),_owner:null},c.default.createElement("input",{ref:"input",className:T.default.searchInput,value:t,type:"text",autoComplete:"off",spellCheck:"false",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur}),t.length>0&&{$$typeof:o,type:S.default,key:null,ref:null,props:l(S.default.defaultProps,{
children:{$$typeof:o,type:P.default,key:null,ref:null,props:l(P.default.defaultProps,{name:"plex-icon-close-560",className:T.default.closeIcon}),_owner:null},onPress:this.onClearPress}),_owner:null}],className:(0,p.default)(T.default.container,n&&T.default.focused),onClick:this.onClick},_owner:null}}}]),t}(d.Component);I.propTypes={query:d.PropTypes.string,onChange:d.PropTypes.func,onSearch:d.PropTypes.func,onClick:d.PropTypes.func,onFocus:d.PropTypes.func,onBlur:d.PropTypes.func},I.defaultProps={
query:"",onClick:d.PropTypes.func},t.default=I,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){return t?(0,p.default)("Search in {1}...",t):n?(0,p.default)("Search all servers...",e):(0,p.default)("Show more results...",e)}function a(e){var t=e.server,n=e.query,a=e.searchAllServers,o=e.channelPlaceholder,l=e.channelID,u=e.channelSearchKey,d=e.isSelected,f=e.onLinkPress,p=e.onLinkFocus,h=encodeURIComponent(t.machineIdentifier),g=encodeURIComponent(n),m=void 0;if(null!=l&&null!=u){
var y=encodeURIComponent(l),P=v.join(u,{query:n}),S=encodeURIComponent(P);m="#!/server/"+h+"/channel/"+y+"/"+S}else m="#!/server/"+h+"/search/"+g;var _=r(n,o,a);return{$$typeof:s,type:b.default,key:null,ref:null,props:i(b.default.defaultProps,{children:_,className:(0,c.default)(w.default.placeholder,d&&w.default.isPlaceholderSelected),tabIndex:"1",title:_,to:m,onPress:f,onFocus:p}),_owner:null}}var i=n(10).default,s=n(7).default,o=n(1).default,l=n(9).default;Object.defineProperty(t,"__esModule",{
value:!0});var u=n(4),d=(o(u),n(33)),c=o(d),f=n(5),p=o(f),h=n(26),v=l(h),g=n(75),m=o(g),y=n(34),b=o(y),P=n(2209),w=o(P);a.propTypes={server:m.default.isRequired,query:u.PropTypes.string,searchAllServers:u.PropTypes.bool.isRequired,channelPlaceholder:u.PropTypes.string,channelID:u.PropTypes.string,channelSearchKey:u.PropTypes.string,isSelected:u.PropTypes.bool.isRequired,onLinkPress:u.PropTypes.func.isRequired,onLinkFocus:u.PropTypes.func.isRequired},t.default=a,e.exports=t.default},function(e,t,n){
"use strict";function r(){return(0,h.createSelector)((0,b.default)(),function(e){return e.ui.quickSearch},w.default,function(e,t,n){return{server:e,query:t.query,channelPlaceholder:t.channelPlaceholder,channelID:t.channelID,channelSearchKey:t.channelSearchKey,isSelected:!t.selectedResultEntityID,searchAllServers:n.searchAllServers}})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(11).default,u=n(1).default,d=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=u(c),p=n(21),h=n(15),v=n(24),g=n(277),m=d(g),y=n(67),b=u(y),P=n(142),w=u(P),S=n(122),_=n(1878),T=u(_),I={
resetQuickSearch:S.resetQuickSearch,selectQuickSearchResult:S.selectQuickSearchResult},M=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"onLinkPress",decorators:[v.autobind],value:function(e){var t=this.props.serverEntityID;this.props.resetQuickSearch({serverEntityID:t}),m.resetFocus()}},{key:"onLinkFocus",decorators:[v.autobind],value:function(e){this.props.selectQuickSearchResult({searchResultEntityID:null
})}},{key:"render",value:function(){return f.default.createElement(T.default,l({onLinkPress:this.onLinkPress,onLinkFocus:this.onLinkFocus},this.props))}}]),t}(c.Component);M.propTypes={serverEntityID:c.PropTypes.string.isRequired,resetQuickSearch:c.PropTypes.func.isRequired,selectQuickSearchResult:c.PropTypes.func.isRequired},t.default=(0,p.connect)(r(),I)(M),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.isLoading,n=e.hubs,r=o(e,["isLoading","hubs"]);return t?{$$typeof:i,
type:"div",key:null,ref:null,props:{children:{$$typeof:i,type:v.default,key:null,ref:null,props:s(v.default.defaultProps,{className:b.default.spinner}),_owner:null},className:b.default.spinnerContainer},_owner:null}:n.length?{$$typeof:i,type:"div",key:null,ref:null,props:{children:n.map(function(e){return c.default.createElement(m.default,l({key:e.hubIdentifier,title:e.title,results:e.results},r))})},_owner:null}:{$$typeof:i,type:"div",key:null,ref:null,props:{children:(0,p.default)("No Results"),
className:b.default.noResults},_owner:null}}function a(e){var t=e.title,n=e.isOnlyProvider,a=e.isSearchPending,s=(e.isSearchPopulated,o(e,["title","isOnlyProvider","isSearchPending","isSearchPopulated"]));return{$$typeof:i,type:"div",key:null,ref:null,props:{children:[!n&&{$$typeof:i,type:"div",key:null,ref:null,props:{children:t,className:b.default.title,"aria-label":"heading","aria-level":"4"},_owner:null},c.default.createElement(r,l({isLoading:a&&!e.hubs.length},s))]},_owner:null}}var i=n(7).default,s=n(10).default,o=n(19).default,l=n(11).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(5),p=u(f),h=n(55),v=u(h),g=n(1876),m=u(g),y=n(2210),b=u(y);r.propTypes={isLoading:d.PropTypes.bool.isRequired,hubs:d.PropTypes.arrayOf(d.PropTypes.object).isRequired},a.propTypes={serverEntityID:d.PropTypes.string.isRequired,providerEntityID:d.PropTypes.string.isRequired,title:d.PropTypes.string.isRequired,isOnlyProvider:d.PropTypes.bool.isRequired,isSearchPending:d.PropTypes.bool.isRequired,isSearchPopulated:d.PropTypes.bool.isRequired,
hubs:d.PropTypes.arrayOf(d.PropTypes.object).isRequired,selectedResultEntityID:d.PropTypes.string},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,u.createSelector)(function(e){return e.ui.quickSearch},(0,c.default)(),function(e,t){return{title:t.title,selectedResultEntityID:e.selectedResultEntityID}})}function a(e){return o.default.createElement(p.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(21),u=n(15),d=n(100),c=i(d),f=n(1880),p=i(f);
t.default=(0,l.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.searches,r=e.onScrollIntoView;return{$$typeof:a,type:"div",key:null,ref:null,props:{children:n.map(function(e){return l.default.createElement(d.default,i({},e,{key:e.key,isOnlyProvider:1===n.length,serverEntityID:t,onScrollIntoView:r}))})},_owner:null}}var a=n(7).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(1881),d=s(u);
r.propTypes={serverEntityID:o.PropTypes.string.isRequired,searches:o.PropTypes.arrayOf(o.PropTypes.shape({providerEntityID:o.PropTypes.string.isRequired,hubs:o.PropTypes.array.isRequired})).isRequired,onScrollIntoView:o.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(21),i=n(15),s=n(142),o=r(s),l=n(1882),u=r(l),d=(0,i.createSelector)(function(e){return e.ui.quickSearch},o.default,function(e,t){
return{searches:e.searches}});t.default=(0,a.connect)(function(e){return d(e)})(u.default),e.exports=t.default},function(e,t,n){"use strict";function r(e){switch(e){case"movie":return[D.default,j.default];case"show":return[D.default,V.default];case"episode":return[D.default,L.default];case"artist":return[D.default,F.default];case"album":return[D.default,O.default];case"track":return[D.default,G.default];case"photo":return[D.default,q.default];case"photoAlbum":return[D.default,q.default];case"clip":
return[D.default,q.default];case"playlist":return[D.default,$.default];case"actor":return[Q.default,X.default];case"genre":return[Q.default,X.default];case"director":return[Q.default,X.default];default:return[D.default,X.default]}}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(10).default,u=n(7).default,d=n(19).default,c=n(11).default,f=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var p=n(4),h=f(p),v=n(61),g=f(v),m=n(33),y=f(m),b=n(24),P=n(31),w=f(P),S=n(153),_=f(S),T=n(36),I=f(T),M=n(34),C=f(M),x=n(736),E=f(x),k=n(465),D=f(k),A=n(741),O=f(A),R=n(464),L=f(R),N=n(467),j=f(N),U=n(748),$=f(U),z=n(744),F=f(z),B=n(749),V=f(B),H=n(745),q=f(H),W=n(1763),G=f(W),Y=n(1895),Q=f(Y),K=n(774),X=f(K),Z=n(1892),J=f(Z),ee=n(1890),te=f(ee),ne=n(1891),re=f(ne),ae=n(2211),ie=f(ae),se=function(e){
function t(e){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={isMenuOpen:!1}}return i(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,w.default)(this,e,t)}},{key:"componentWillUpdate",value:function(e,t){if(e.isSelected!==this.props.isSelected&&e.isSelected){var n=g.default.findDOMNode(this);this.props.onScrollIntoView({scrollTop:n.offsetTop})}}},{key:"onItemPress",decorators:[b.autobind],value:function(e){e.stopPropagation();var t=g.default.findDOMNode(this.refs.menuButton);
t&&t.contains(e.target)||this.props.onLinkPress()}},{key:"onItemFocus",decorators:[b.autobind],value:function(e){this.props.onResultFocus(this.props.searchResultEntityID)}},{key:"onPlayPress",decorators:[b.autobind],value:function(e){e.stopPropagation(),this.props.onPlayPress(this.props.searchResultEntityID)}},{key:"onLinkPress",decorators:[b.autobind],value:function(e){e.stopPropagation(),this.props.onLinkPress()}},{key:"onMenuIconPress",decorators:[b.autobind],value:function(e){this.setState({isMenuOpen:!this.state.isMenuOpen
})}},{key:"onMenuClose",decorators:[b.autobind],value:function(){this.setState({isMenuOpen:!1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.serverEntityID,a=t.providerEntityID,i=t.searchResultEntityID,s=t.metadataItemEntityID,o=t.server,f=t.provider,p=t.isSelected,v=t.isMetadataItem,g=t.imageWidth,m=t.imageHeight,b=t.imageUrl,P=t.resultRoute,w=t.metadataKey,S=t.metadataTitle,T=t.metadataType,M=t.tag,x=(t.tagType,t.tagTypeString),k=t.librarySectionType,D=(t.reasonID,t.reasonTitle),A=d(t,["serverEntityID","providerEntityID","searchResultEntityID","metadataItemEntityID","server","provider","isSelected","isMetadataItem","imageWidth","imageHeight","imageUrl","resultRoute","metadataKey","metadataTitle","metadataType","tag","tagType","tagTypeString","librarySectionType","reasonID","reasonTitle"]),O=this.state.isMenuOpen,R=f.protocols.livetv;
return{$$typeof:u,type:C.default,key:null,ref:null,props:l(C.default.defaultProps,{children:[{$$typeof:u,type:C.default,key:null,ref:null,props:l(C.default.defaultProps,{className:ie.default.link,tabIndex:"1",title:v?S:M,to:P,onPress:P?this.onLinkPress:this.onPlayPress}),_owner:null},{$$typeof:u,type:"div",key:null,ref:null,props:{children:v?{$$typeof:u,type:te.default,key:null,ref:null,props:l(te.default.defaultProps,{imageWidth:g,imageHeight:m,imageUrl:b,title:S,type:T,isLiveTVItem:R,recordLink:(0,
_.default)(o,f,w,{record:1}),onRecordPress:this.onLinkPress,onPlayPress:this.onPlayPress}),_owner:null}:{$$typeof:u,type:re.default,key:null,ref:null,props:l(re.default.defaultProps,{imageWidth:g,imageHeight:m,imageUrl:b,title:M,tagType:x,librarySectionType:k}),_owner:null},className:ie.default.imageContainer},_owner:null},{$$typeof:u,type:"div",key:null,ref:null,props:{children:r(v?T:x).map(function(t,r){var o=r>0,d=o&&!!D;return{$$typeof:u,type:J.default,key:r,ref:null,props:l(J.default.defaultProps,{
className:o?null:ie.default.title,serverEntityID:n,providerEntityID:a,searchResultEntityID:i,metadataItemEntityID:s,component:d?X.default:t,isSecondary:o,onPress:e.onLinkPress}),_owner:null}}),className:ie.default.titles},_owner:null},v&&!R&&h.default.createElement(C.default,{ref:"menuButton",tabIndex:"-1",className:ie.default.moreButton,onPress:this.onMenuIconPress},{$$typeof:u,type:I.default,key:null,ref:null,props:l(I.default.defaultProps,{className:ie.default.moreIcon,name:"plex-icon-more-560"
}),_owner:null}),v&&!R&&h.default.createElement(E.default,c({serverEntityID:n,providerEntityID:a,metadataItemEntityID:s,isOpen:O,target:this.refs.menuButton},A,{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,onMenuClose:this.onMenuClose}))],component:"div",
className:(0,y.default)(ie.default.button,(p||O)&&ie.default.selected),onPress:this.onItemPress,onFocus:this.onItemFocus}),_owner:null}}}]),t}(p.Component);se.propTypes={serverEntityID:p.PropTypes.string.isRequired,providerEntityID:p.PropTypes.string.isRequired,searchResultEntityID:p.PropTypes.string.isRequired,metadataItemEntityID:p.PropTypes.string,provider:p.PropTypes.object.isRequired,server:p.PropTypes.object.isRequired,isMetadataItem:p.PropTypes.bool,isSelected:p.PropTypes.bool,imageWidth:p.PropTypes.number.isRequired,
imageHeight:p.PropTypes.number.isRequired,imageUrl:p.PropTypes.func,resultRoute:p.PropTypes.string,reasonID:p.PropTypes.number,reasonTitle:p.PropTypes.string,metadataKey:p.PropTypes.string,metadataType:p.PropTypes.string,metadataTitle:p.PropTypes.string,tag:p.PropTypes.string,tagType:p.PropTypes.number,tagTypeString:p.PropTypes.string,librarySectionType:p.PropTypes.number,onLinkPress:p.PropTypes.func,onPlayPress:p.PropTypes.func,onResultPress:p.PropTypes.func,onResultFocus:p.PropTypes.func,onScrollIntoView:p.PropTypes.func
},se.defaultProps={isMetadataItem:!1},t.default=se,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,h.createSelector)((0,M.default)(),(0,x.default)(),(0,k.default)(),(0,A.default)(),function(e,t,n,r){void 0===n&&(n={});var i={server:e,provider:t,reasonID:n.reasonID,reasonTitle:n.reasonTitle};if(r){var s=(0,U.getAspectRatio)(r.type)===U.PORTRAIT?q:W,o=(0,z.default)(s,null,r.type,r),l=r&&(0,B.default)(a({server:e,provider:t},r));i=a({metadataKey:r.key,metadataTitle:r.title,metadataType:r.type,
typeString:r.type,imageWidth:o.width,imageHeight:o.height,imageUrl:o.url,resultRoute:(0,T.default)(e,t,r)},i,l)}else{var u=n.tagItem||{},d=m.default.get(u.tagType),c=d&&d.typeString,o=(0,z.default)(W,null,c,u);i=a({tag:u.tag,tagType:u.tagType,tagTypeString:c,librarySectionType:u.librarySectionType,imageWidth:o.width,imageHeight:o.height,imageUrl:o.url,resultRoute:(0,S.default)(e,t,t.isLibraryProvider?n.reasonID:u.librarySectionKey,{filters:u.filter?u.filter:c+"="+u.id,filterLabel:u.tag})},i)}return i;
})}var a=n(11).default,i=n(17).default,s=n(18).default,o=n(25).default,l=n(16).default,u=n(1).default,d=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=u(c),p=n(21),h=n(15),v=n(24),g=n(317),m=u(g),y=n(277),b=d(y),P=n(50),w=n(152),S=u(w),_=n(785),T=u(_),I=n(67),M=u(I),C=n(73),x=u(C),E=n(209),k=u(E),D=n(48),A=u(D),O=n(255),R=d(O),L=n(122),N=n(784),j=u(N),U=n(187),$=n(488),z=u($),F=n(487),B=u(F),V=n(1884),H=u(V),q=28,W=36,G=a({resetQuickSearch:L.resetQuickSearch,selectQuickSearchResult:L.selectQuickSearchResult,
playQuickSearchItem:L.playQuickSearchItem},R),Y=function(e){function t(){l(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return s(t,e),o(t,[{key:"onLinkPress",decorators:[v.autobind],value:function(){var e=this.props.serverEntityID;this.props.resetQuickSearch({serverEntityID:e}),b.resetFocus()}},{key:"onResultFocus",decorators:[v.autobind],value:function(e){var t=this;(0,P.scheduleImmediateUpdate)(function(){t.props.selectQuickSearchResult({searchResultEntityID:e
})})}},{key:"onPlayPress",decorators:[v.autobind],value:function(e){var t=this.props.serverEntityID;this.props.playQuickSearchItem({serverEntityID:t,searchResultEntityID:e})}},{key:"render",value:function(){return f.default.createElement(H.default,a({},this.props,{onLinkPress:this.onLinkPress,onResultFocus:this.onResultFocus,onPlayPress:this.onPlayPress}))}}]),t}(c.Component);Y.propTypes={serverEntityID:c.PropTypes.string.isRequired,providerEntityID:c.PropTypes.string.isRequired,searchResultEntityID:c.PropTypes.string.isRequired,
resetQuickSearch:c.PropTypes.func.isRequired,selectQuickSearchResult:c.PropTypes.func.isRequired,playQuickSearchItem:c.PropTypes.func.isRequired},t.default=(0,p.connect)(r,G,j.default)(Y),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(33)),f=u(c),p=n(24),h=n(31),v=u(h),g=n(78),m=u(g),y=n(1879),b=u(y),P=n(1883),w=u(P),S=n(2212),_=u(S),T=function(e){
function t(e){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={maxHeight:this.getMaxHeight()}}return a(t,e),i(t,[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.onWindowResize)}},{key:"shouldComponentUpdate",value:function(e,t){return(0,v.default)(this,e,t)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onWindowResize)}},{key:"getMaxHeight",value:function(){return window.innerHeight-150;
}},{key:"onWindowResize",decorators:[p.autobind],value:function(){this.setState({maxHeight:this.getMaxHeight()})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.serverEntityID,r=e.scrollTop,a=e.onScrollIntoView,i=e.onScrollPositionChange;return{$$typeof:l,type:m.default,key:null,ref:null,props:o(m.default.defaultProps,{children:[{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{serverEntityID:n}),_owner:null},{$$typeof:l,type:w.default,key:null,ref:null,
props:o(w.default.defaultProps,{serverEntityID:n,onScrollIntoView:a}),_owner:null}],className:(0,f.default)(_.default.container,t),style:this.state,scrollTop:r,onScrollPositionChange:i}),_owner:null}}}]),t}(d.Component);T.propTypes={className:d.PropTypes.string,serverEntityID:d.PropTypes.string.isRequired,scrollTop:d.PropTypes.number,onScrollIntoView:d.PropTypes.func.isRequired,onScrollPositionChange:d.PropTypes.func.isRequired},t.default=T,e.exports=t.default},function(e,t,n){"use strict";function r(e){
var t=e.isMetadataItem,n=a(e,["isMetadataItem"]);return t?l.default.createElement(d.default,i({},n,{showSelect:!1})):l.default.createElement(f.default,n)}var a=n(19).default,i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(459),d=s(u),c=n(1889),f=s(c);r.propTypes={isMetadataItem:o.PropTypes.bool},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.serverEntityID,r=e.providerEntityID,s=e.searchResultEntityID,o=e.imageWidth,l=e.imageHeight,u=e.imageUrl,d=e.tag,f=e.tagType,h=e.librarySectionType,g=e.cellX,y=e.cellY,P=e.cellWidth,w=e.cellHeight,S=e.showOffscreenPlaceholder,_=e.titleComponents;
return{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{imageWidth:o,imageHeight:l,imageUrl:u,title:d,tagType:f,librarySectionType:h,isOffscreen:S}),_owner:null},{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{className:b.default.imageLink,serverEntityID:n,providerEntityID:r,searchResultEntityID:s}),
_owner:null}],className:b.default.imageContainer},_owner:null},{$$typeof:i,type:"div",key:null,ref:null,props:{children:_.map(function(e,t){return{$$typeof:i,type:m.default,key:t,ref:null,props:a(m.default.defaultProps,{serverEntityID:n,providerEntityID:r,searchResultEntityID:s,component:e,isSecondary:t>0}),_owner:null}}),className:b.default.titleContainer},_owner:null}],className:t,cellX:g,cellY:y,cellWidth:P,cellHeight:w}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var o=n(4),l=(s(o),n(250)),u=s(l),d=n(249),c=s(d),f=n(462),p=s(f),h=n(775),v=s(h),g=n(461),m=s(g),y=n(2213),b=s(y);r.propTypes={className:o.PropTypes.string,serverEntityID:o.PropTypes.string.isRequired,providerEntityID:o.PropTypes.string.isRequired,searchResultEntityID:o.PropTypes.string.isRequired,imageWidth:o.PropTypes.number.isRequired,imageHeight:o.PropTypes.number.isRequired,imageUrl:o.PropTypes.func,tag:o.PropTypes.string.isRequired,tagType:o.PropTypes.number.isRequired,librarySectionType:o.PropTypes.number.isRequired,
cellX:o.PropTypes.number.isRequired,cellY:o.PropTypes.number.isRequired,cellWidth:o.PropTypes.number.isRequired,cellHeight:o.PropTypes.number.isRequired,showOffscreenPlaceholder:o.PropTypes.bool,titleComponents:o.PropTypes.array.isRequired},t.default=(0,u.default)(r),e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,u.createSelector)(function(e,t){var n=t.listType;return n},function(e,t){var n=t.listContext;return n},function(e,t){var n=t.cellWidth;return n},(0,p.default)(),function(e,t,n){
var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],a=r.tagItem,i=a.tag,s=a.tagType,o=a.librarySectionType,l=(0,c.default)(n,null,e,a,t);return{tag:i,tagType:s,librarySectionType:o,imageWidth:l.width,imageHeight:l.height,imageUrl:l.url}})}function a(e){return o.default.createElement(v.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(21),u=n(15),d=n(488),c=i(d),f=n(209),p=i(f),h=n(1888),v=i(h);a.propTypes={searchResultEntityID:s.PropTypes.string.isRequired
},t.default=(0,l.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.imageWidth,n=e.imageHeight,r=e.imageUrl,s=e.title,o=e.isLiveTVItem,l=e.recordLink,d=e.onRecordPress,f=e.onPlayPress;return{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{children:o?{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{className:m.default.recordButton,tabIndex:"-1",title:s,to:l,onPress:d}),_owner:null}:{$$typeof:i,type:u.default,
key:null,ref:null,props:a(u.default.defaultProps,{className:m.default.playButton,tabIndex:"-1",title:s,onPress:f}),_owner:null},className:m.default.card,component:v.default,width:t,height:n,url:r}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(333)),u=s(l),d=n(450),c=s(d),f=n(336),p=s(f),h=n(339),v=s(h),g=n(2214),m=s(g);r.propTypes={imageWidth:o.PropTypes.number.isRequired,imageHeight:o.PropTypes.number.isRequired,
imageUrl:o.PropTypes.oneOfType([o.PropTypes.func,o.PropTypes.string]),title:o.PropTypes.string.isRequired,isLiveTVItem:o.PropTypes.bool,recordLink:o.PropTypes.string,onRecordPress:o.PropTypes.func.isRequired,onPlayPress:o.PropTypes.func.isRequired},r.defaultProps={isLiveTVItem:!1},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return o.default.createElement(u.default,a({className:c.default.card},e))}var a=n(11).default,i=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var s=n(4),o=i(s),l=n(462),u=i(l),d=n(2215),c=i(d);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.component,r=e.isSecondary,o=i(e,["className","component","isSecondary"]);return{$$typeof:a,type:"div",key:null,ref:null,props:{children:u.default.createElement(n,s({tabIndex:"-1"},o)),className:(0,c.default)(t,p.default.title,r&&p.default.isSecondary)},_owner:null}}var a=n(7).default,i=n(19).default,s=n(11).default,o=n(1).default;Object.defineProperty(t,"__esModule",{
value:!0});var l=n(4),u=o(l),d=n(33),c=o(d),f=n(2216),p=o(f);r.propTypes={className:l.PropTypes.string,component:l.PropTypes.func.isRequired,isSecondary:l.PropTypes.bool},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.server,r=e.provider,s=e.originalTitle,o=e.reason,l=e.reasonID,d=e.reasonTitle,f=e.filter,p=e.librarySectionID,h=e.librarySectionKey,v=e.onPress;if(!o)return null;if("originalTitle"===o)return{$$typeof:a,type:"span",key:null,ref:null,
props:{children:s,className:t},_owner:null};if(!d)return null;var g={},y="actor"===o||"director"===o;y&&(g.filters=f?f:o+"="+l,g.filterLabel=d);var b=r.isLibraryProvider?p:h,P=(0,c.default)(n,r,b,g),w={director:(0,u.default)("by"),actor:(0,u.default)("with"),section:(0,u.default)("in")};return P?{$$typeof:a,type:"span",key:null,ref:null,props:{children:[w[o]," ",{$$typeof:a,type:m.default,key:null,ref:null,props:i(m.default.defaultProps,{children:d,title:d,tabIndex:"-1",to:P,onPress:v}),_owner:null
}],className:t},_owner:null}:{$$typeof:a,type:"span",key:null,ref:null,props:{children:w[o]+" "+d,className:t},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(152),c=s(d),f=n(75),p=s(f),h=n(74),v=s(h),g=n(34),m=s(g);r.propTypes={className:o.PropTypes.string,server:p.default.isRequired,provider:v.default.isRequired,reason:o.PropTypes.string,reasonID:o.PropTypes.number,reasonTitle:o.PropTypes.string,
originalTitle:o.PropTypes.string,filter:o.PropTypes.string,librarySectionID:o.PropTypes.string,librarySectionKey:o.PropTypes.string,onPress:o.PropTypes.func},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.tag;return{$$typeof:a,type:"span",key:null,ref:null,props:{children:n,className:t},_owner:null}}var a=n(7).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4);i(s);r.propTypes={className:s.PropTypes.string,tag:s.PropTypes.string
},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,u.createSelector)((0,c.default)(),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return{tag:e.tagItem&&e.tagItem.tag}})}function a(e){return o.default.createElement(p.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),o=i(s),l=n(21),u=n(15),d=n(209),c=i(d),f=n(1894),p=i(f);a.propTypes={searchResultEntityID:s.PropTypes.string.isRequired},t.default=(0,
l.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.className,n=e.server,r=e.provider,s=e.reasonID,o=e.id,l=e.tag,d=e.filter,f=e.tagType,p=e.librarySectionKey,h=u.default.get(f),v=h.typeString,g=d?d:v+"="+o,y={filters:g,filterLabel:l},b=r.isLibraryProvider?s:p,P=(0,c.default)(n,r,b,y);return{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:l,className:t,title:l,to:P}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(317)),u=s(l),d=n(152),c=s(d),f=n(75),p=s(f),h=n(74),v=s(h),g=n(34),m=s(g);r.propTypes={className:o.PropTypes.string,server:p.default.isRequired,provider:v.default.isRequired,reasonID:o.PropTypes.number.isRequired,id:o.PropTypes.number.isRequired,tag:o.PropTypes.string,filter:o.PropTypes.string,tagType:o.PropTypes.number.isRequired,librarySectionKey:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";
function r(e){var t=e.className,n=e.machineIdentifier,r=e.friendlyName;if(!r)return null;var s=encodeURIComponent(n);return{$$typeof:a,type:"span",key:null,ref:null,props:{children:[(0,u.default)("on")," ",{$$typeof:a,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{children:r,title:r,to:"#!/server/"+s+"/dashboard"}),_owner:null}],className:t},_owner:null}}var a=n(7).default,i=n(10).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(34),c=s(d);
r.propTypes={className:o.PropTypes.string,machineIdentifier:o.PropTypes.string.isRequired,friendlyName:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,s.createSelector)((0,l.default)(),function(e){return{machineIdentifier:e.machineIdentifier,friendlyName:e.friendlyName}})}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),s=n(15),o=n(70),l=a(o),u=n(1897),d=a(u);t.default=(0,i.connect)(r)(d.default),e.exports=t.default;
},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(19).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=(d(c),n(24)),p=n(5),h=d(p),v=n(31),g=d(v),m=n(30),y=n(454),b=d(y),P=n(147),w=d(P),S=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,g.default)(this,e,t);
}},{key:"onPlaySelectedPress",decorators:[f.autobind],value:function(e){this.props.playSelectedItems()}},{key:"onShufflePress",decorators:[f.autobind],value:function(e){this.props.shuffleSelectedItems()}},{key:"onAddToPlaylistPress",decorators:[f.autobind],value:function(e){this.props.addSelectedItemsToPlaylist()}},{key:"onMarkWatchedPress",decorators:[f.autobind],value:function(e){this.props.markSelectedItemsWatched()}},{key:"onMarkUnwatchedPress",decorators:[f.autobind],value:function(e){this.props.markSelectedItemsUnwatched();
}},{key:"onEditPress",decorators:[f.autobind],value:function(e){this.props.editSelectedItems()}},{key:"onRefreshPress",decorators:[f.autobind],value:function(e){this.props.refreshSelectedItems()}},{key:"onAnalyzePress",decorators:[f.autobind],value:function(e){this.props.analyzeSelectedItems()}},{key:"onMergePress",decorators:[f.autobind],value:function(e){this.props.mergeSelectedItems()}},{key:"onSyncPress",decorators:[f.autobind],value:function(e){this.props.syncSelectedItems()}},{key:"onOptimizePress",
decorators:[f.autobind],value:function(e){this.props.optimizeSelectedItems()}},{key:"onDeletePress",decorators:[f.autobind],value:function(e){this.props.onDeletePress()}},{key:"render",value:function(){var e=this.props,t=e.target,n=e.isOpen,r=e.onMenuClose,a=u(e,["target","isOpen","onMenuClose"]);return{$$typeof:l,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{children:[a.showPlaySelected&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,h.default)("Play Selected"),
onPress:this.onPlaySelectedPress}),_owner:null},a.showShuffle&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,h.default)("Shuffle"),onPress:this.onShufflePress}),_owner:null},a.showAddToPlaylist&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,h.default)("Add to Playlist..."),onPress:this.onAddToPlaylistPress}),_owner:null},a.showMarkWatched&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{
children:(0,h.default)("Mark Watched"),onPress:this.onMarkWatchedPress}),_owner:null},a.showMarkUnwatched&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,h.default)("Mark Unwatched"),onPress:this.onMarkUnwatchedPress}),_owner:null},a.showEdit&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,h.default)("Edit"),onPress:this.onEditPress}),_owner:null},a.showRefresh&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{
children:(0,h.default)("Refresh"),onPress:this.onRefreshPress}),_owner:null},a.showAnalyze&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,h.default)("Analyze"),onPress:this.onAnalyzePress}),_owner:null},a.showMerge&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,h.default)("Merge"),onPress:this.onMergePress}),_owner:null},a.showSync&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,
h.default)("Sync..."),onPress:this.onSyncPress}),_owner:null},a.showOptimize&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,h.default)("Optimize..."),onPress:this.onOptimizePress}),_owner:null},a.showDelete&&{$$typeof:l,type:w.default,key:null,ref:null,props:o(w.default.defaultProps,{children:(0,h.default)("Delete"),kind:m.kinds.DANGER,onPress:this.onDeletePress}),_owner:null}],target:t,isOpen:n,onMenuClose:r}),_owner:null}}}]),t}(c.Component);S.propTypes={
target:c.PropTypes.object,isOpen:c.PropTypes.bool.isRequired,onMenuClose:c.PropTypes.func.isRequired,showPlaySelected:c.PropTypes.bool,showShuffle:c.PropTypes.bool,showAddToPlaylist:c.PropTypes.bool,showMarkWatched:c.PropTypes.bool,showMarkUnwatched:c.PropTypes.bool,showEdit:c.PropTypes.bool,showRefresh:c.PropTypes.bool,showAnalyze:c.PropTypes.bool,showMerge:c.PropTypes.bool,showSync:c.PropTypes.bool,showOptimize:c.PropTypes.bool,showDelete:c.PropTypes.bool,playSelectedItems:c.PropTypes.func.isRequired,
shuffleSelectedItems:c.PropTypes.func.isRequired,addSelectedItemsToPlaylist:c.PropTypes.func.isRequired,markSelectedItemsWatched:c.PropTypes.func.isRequired,markSelectedItemsUnwatched:c.PropTypes.func.isRequired,editSelectedItems:c.PropTypes.func.isRequired,refreshSelectedItems:c.PropTypes.func.isRequired,analyzeSelectedItems:c.PropTypes.func.isRequired,mergeSelectedItems:c.PropTypes.func.isRequired,syncSelectedItems:c.PropTypes.func.isRequired,optimizeSelectedItems:c.PropTypes.func.isRequired,onDeletePress:c.PropTypes.func.isRequired
},t.default=S,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.activeSelectionItems,n=e.onDeselectAllPress,r=s(e,["activeSelectionItems","onDeselectAllPress"]),l=t.length,u=(0,h.default)(e);return{$$typeof:i,type:P.default,key:null,ref:null,props:a(P.default.defaultProps,{children:[{$$typeof:i,type:S.default,key:null,ref:null,props:a(S.default.defaultProps,{children:{$$typeof:i,type:"div",key:null,ref:null,props:{children:[{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{
name:"plex-icon-selected-560",className:k.default.icon}),_owner:null},1===l?(0,f.default)("{1} item selected",l):(0,f.default)("{1} items selected",l)],className:k.default.selectedTitle},_owner:null}}),_owner:null},{$$typeof:i,type:T.default,key:null,ref:null,props:a(T.default.defaultProps,{children:d.default.createElement(x.default,o({numSelectedItems:l},r,u))}),_owner:null},{$$typeof:i,type:M.default,key:null,ref:null,props:a(M.default.defaultProps,{children:{$$typeof:i,type:y.default,key:null,
ref:null,props:a(y.default.defaultProps,{children:[{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{name:"plex-icon-remove-560",className:k.default.icon}),_owner:null},(0,f.default)("Deselect All")],className:k.default.deselectLink,onPress:n}),_owner:null}}),_owner:null}],className:k.default.multiSelectPageHeader}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(5),f=l(c),p=n(1939),h=l(p),v=n(36),g=l(v),m=n(34),y=l(m),b=n(181),P=l(b),w=n(182),S=l(w),_=n(341),T=l(_),I=n(217),M=l(I),C=n(1901),x=l(C),E=n(2217),k=l(E);
r.propTypes={activeSelectionItems:u.PropTypes.array.isRequired,activeSelectionType:u.PropTypes.string.isRequired,onDeselectAllPress:u.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return!!p.default.find(e,function(e){return t[e]})}var a=n(17).default,i=n(18).default,s=n(25).default,o=n(16).default,l=n(7).default,u=n(10).default,d=n(11).default,c=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=c(f),h=n(4),v=c(h),g=n(5),m=c(g),y=n(24),b=n(31),P=c(b),w=n(271),S=c(w),_=n(754),T=c(_),I=n(755),M=c(I),C=n(753),x=c(C),E=n(1765),k=c(E),D=n(1764),A=c(D),O=n(756),R=c(O),L=n(468),N=c(L),j=n(1899),U=c(j),$=["showRefresh","showAnalyze","showMerge","showOptimize","showDelete"],z=function(e){
function t(e,n){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isActionsMenuOpen:!1,isDeleteModalOpen:!1}}return i(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,P.default)(this,e,t)}},{key:"onPlaySelectedPress",decorators:[y.autobind],value:function(e){this.props.playSelectedItems()}},{key:"onShufflePress",decorators:[y.autobind],value:function(e){this.props.shuffleSelectedItems()}},{key:"onAddToPlaylistPress",decorators:[y.autobind],
value:function(e){this.props.addSelectedItemsToPlaylist()}},{key:"onMarkWatchedConfirm",decorators:[y.autobind],value:function(e){this.props.markSelectedItemsWatched()}},{key:"onMarkUnwatchedConfirm",decorators:[y.autobind],value:function(e){this.props.markSelectedItemsUnwatched()}},{key:"onEditPress",decorators:[y.autobind],value:function(e){this.props.editSelectedItems()}},{key:"onSyncPress",decorators:[y.autobind],value:function(e){this.props.syncSelectedItems()}},{key:"onActionsPress",decorators:[y.autobind],
value:function(e){this.setState({isActionsMenuOpen:!this.state.isActionsMenuOpen})}},{key:"onActionsMenuClose",decorators:[y.autobind],value:function(){this.setState({isActionsMenuOpen:!1})}},{key:"onDeletePress",decorators:[y.autobind],value:function(e){this.setState({isDeleteModalOpen:!0})}},{key:"onDeleteConfirm",decorators:[y.autobind],value:function(e){this.setState({isDeleteModalOpen:!1}),this.props.deleteSelectedItems()}},{key:"onDeleteCancel",decorators:[y.autobind],value:function(){this.setState({
isDeleteModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.numSelectedItems,n=e.showPlaySelected,a=e.showShuffle,i=e.showAddToPlaylist,s=e.showMarkWatched,o=e.showMarkUnwatched,c=e.showEdit,f=e.showSync,p=this.state,h=p.isActionsMenuOpen,g=p.isDeleteModalOpen,y=r($,this.props);return{$$typeof:l,type:"div",key:null,ref:null,props:{children:[n&&{$$typeof:l,type:T.default,key:null,ref:null,props:u(T.default.defaultProps,{playLabel:(0,m.default)("Play Selected"),onPress:this.onPlaySelectedPress
}),_owner:null},a&&{$$typeof:l,type:M.default,key:null,ref:null,props:u(M.default.defaultProps,{onPress:this.onShufflePress}),_owner:null},i&&{$$typeof:l,type:x.default,key:null,ref:null,props:u(x.default.defaultProps,{onPress:this.onAddToPlaylistPress}),_owner:null},(s||o)&&{$$typeof:l,type:k.default,key:null,ref:null,props:u(k.default.defaultProps,{numSelectedItems:t,showMarkWatched:s,showMarkUnwatched:o,onMarkWatchedConfirm:this.onMarkWatchedConfirm,onMarkUnwatchedConfirm:this.onMarkUnwatchedConfirm
}),_owner:null},c&&{$$typeof:l,type:A.default,key:null,ref:null,props:u(A.default.defaultProps,{onPress:this.onEditPress}),_owner:null},f&&{$$typeof:l,type:R.default,key:null,ref:null,props:u(R.default.defaultProps,{onPress:this.onSyncPress}),_owner:null},y&&v.default.createElement(N.default,{ref:"moreButton",icon:"plex-icon-toolbar-more-560",label:(0,m.default)("More..."),isMenuOpen:h,onPress:this.onActionsPress}),v.default.createElement(U.default,d({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})),{$$typeof:l,type:S.default,key:null,ref:null,props:u(S.default.defaultProps,{isOpen:g,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}),_owner:null}]},_owner:null}}}]),t}(h.Component);z.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=z,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(24),p=n(204),h=u(p),v=n(221),g=u(v),m=n(78),y=u(m),b=n(1914),P=u(b),w=n(1924),S=u(w),_=n(1907),T=u(_),I=n(1912),M=u(I),C=n(2218),x=u(C),E=(0,h.default)(g.default.menuSpeed),k={$$typeof:o,type:T.default,key:null,ref:null,props:l(T.default.defaultProps,{}),_owner:null},D=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isMenuOpen:!1}}return a(t,e),i(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:[f.autobind],value:function(e){this.setState({isMenuOpen:!this.state.isMenuOpen})}},{key:"onMenuClose",decorators:[f.autobind],value:function(e){this.setState({isMenuOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.primaryServerEntityID,n=e.serverEntityIDs;
return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[c.default.createElement(P.default,{ref:"menuButton",hasPrimaryServer:!!t,serverEntityID:t,onPress:this.onMenuButtonPress}),{$$typeof:o,type:y.default,key:null,ref:null,props:l(y.default.defaultProps,{children:{$$typeof:o,type:"div",key:null,ref:null,props:{children:t?{$$typeof:o,type:S.default,key:null,ref:null,props:l(S.default.defaultProps,{serverEntityID:t}),_owner:null}:k,className:x.default.sidebarContent},_owner:null},className:x.default.sidebarScroller,
autoScroll:!0}),_owner:null},{$$typeof:o,type:M.default,key:null,ref:null,props:l(M.default.defaultProps,{target:this.refs.menuButton,isOpen:this.state.isMenuOpen,serverEntityIDs:n,onMenuClose:this.onMenuClose}),_owner:null}],className:x.default.sidebar},_owner:null}}}]),t}(d.Component);D.propTypes={primaryServerEntityID:d.PropTypes.string,serverEntityIDs:d.PropTypes.array.isRequired,onServerMenuOpen:d.PropTypes.func.isRequired},t.default=D,e.exports=t.default},function(e,t,n){"use strict";function r(e){
var t=e.count;return{$$typeof:i,type:u.default,key:null,ref:null,props:a(u.default.defaultProps,{children:t,className:c.default.sidebarListItemBadge}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(332)),u=s(l),d=n(2222),c=s(d);r.propTypes={count:o.PropTypes.number},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=c.default.get("myPlexScheme")+"://"+c.default.get("myPlexUrl");return{
$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{children:[{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:[{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:(0,u.default)("Account"),className:P.default.selected,to:"#!/account",icon:"plex-icon-settings-560"}),_owner:null},{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:(0,u.default)("Subscriptions"),to:(0,f.join)([t,"/subscription"]),
target:"_self",icon:"plex-icon-settings-560"}),_owner:null},{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:(0,u.default)("Payments"),to:(0,f.join)([t,"/users/payments"]),target:"_self",icon:"plex-icon-settings-560"}),_owner:null},{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:(0,u.default)("Cloud Sync"),to:(0,f.join)([t,"/cloudsync/providers"]),target:"_self",icon:"plex-icon-settings-560"}),_owner:null},{$$typeof:i,type:y.default,
key:null,ref:null,props:a(y.default.defaultProps,{children:(0,u.default)("Global App Settings"),to:(0,f.join)([t,"/users/profile"]),target:"_self",icon:"plex-icon-settings-560"}),_owner:null},{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:(0,u.default)("Authorized Devices"),to:"#!/settings/devices",icon:"plex-icon-settings-560"}),_owner:null}],title:e.username}),_owner:null},{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:[{
$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:(0,u.default)("Plex Home"),to:"#!/settings/users",icon:"plex-icon-settings-560"}),_owner:null},{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:(0,u.default)("Sharing"),to:"#!/settings/users/friends",icon:"plex-icon-settings-560"}),_owner:null}],title:(0,u.default)("Family & Friends")}),_owner:null}],className:P.default.container,autoScroll:!0}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(63),c=s(d),f=n(26),p=n(78),h=s(p),v=n(484),g=s(v),m=n(218),y=s(m),b=n(2224),P=s(b);r.propTypes={username:o.PropTypes.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return s.default.createElement(f.default,e)}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),s=a(i),o=n(21),l=n(15),u=n(304),d=a(u),c=n(1904),f=a(c),p=(0,l.createSelector)(d.default,function(e){
return{username:e.username}});t.default=(0,o.connect)(p)(r),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.outOfDateServers,n=e.isWaitingForPrimaryServer,r=e.isUserRestricted;return n?g:t.length?{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{outOfDateServers:t}),_owner:null}:r?m:y}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(1908)),u=s(l),d=n(1909),c=s(d),f=n(1910),p=s(f),h=n(1911),v=s(h),g={
$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{}),_owner:null},m={$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{}),_owner:null},y={$$typeof:i,type:u.default,key:null,ref:null,props:a(u.default.defaultProps,{}),_owner:null};r.propTypes={outOfDateServers:o.PropTypes.array.isRequired,isWaitingForPrimaryServer:o.PropTypes.bool.isRequired,isUserRestricted:o.PropTypes.bool.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";
var r=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var a=n(21),i=n(15),s=n(601),o=r(s),l=n(1906),u=r(l),d=(0,i.createStructuredSelector)({outOfDateServers:o.default,isWaitingForPrimaryServer:function(e){return e.isWaitingForPrimaryServer},isUserRestricted:function(e){return!!e.user.restricted}}),c=(0,a.connect)(function(e){return d(e)})(u.default);t.default=c,e.exports=t.default},function(e,t,n){"use strict";function r(){return{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{
children:{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{children:(0,u.default)("Where is my server?"),to:"https://help.plex.tv/noserver",target:"_blank",icon:"plex-icon-help-560"}),_owner:null},message:(0,u.default)("A server could not be found. Download and install Plex Media Server, and it will appear here.")}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(219),c=s(d),f=n(218),p=s(f);
t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{children:{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{children:(0,u.default)("Learn more"),to:"https://support.plex.tv/hc/en-us/articles/204234313-Example-Plex-Home-Setup",target:"_blank",icon:"plex-icon-help-560"}),_owner:null},message:(0,u.default)("No one in your home has shared a library with you.")}),_owner:null
}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(219),c=s(d),f=n(218),p=s(f);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.outOfDateServers,n=t.map(function(e){return'"'+e.friendlyName+'"'}),r=(0,c.default)(n),s=void 0;return s=1===t.length?(0,u.default)("The server {1} needs an update.",r):(0,u.default)("The servers {1} need updates.",r),{$$typeof:i,type:p.default,key:null,
ref:null,props:a(p.default.defaultProps,{message:s}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(650),c=s(d),f=n(219),p=s(f);r.propTypes={outOfDateServers:o.PropTypes.array.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return{$$typeof:i,type:c.default,key:null,ref:null,props:a(c.default.defaultProps,{message:(0,u.default)("Please wait while servers are discovered.")
}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(219),c=s(d);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.target,n=e.isOpen,r=e.serverEntityIDs,s=e.onMenuClose;return{$$typeof:i,type:d.default,key:null,ref:null,props:a(d.default.defaultProps,{children:r.map(function(e){return{$$typeof:i,type:f.default,key:e,ref:null,props:a(f.default.defaultProps,{serverEntityID:e
}),_owner:null}}),className:h.default.serverMenu,target:t,isOpen:n,scrollerProps:v,onMenuClose:s}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(30)),u=n(104),d=s(u),c=n(1916),f=s(c),p=n(2225),h=s(p),v={className:h.default.serverMenuScroller,scrollDirection:l.scrollDirections.VERTICAL,autoScroll:!0};r.propTypes={target:o.PropTypes.object,isOpen:o.PropTypes.bool,serverEntityIDs:o.PropTypes.array.isRequired,onMenuClose:o.PropTypes.func.isRequired
},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.hasPrimaryServer,n=l(e,["hasPrimaryServer"]);return t?f.default.createElement(i,n):f.default.createElement(a,n)}function a(e){return f.default.createElement(w.default,u({className:I.default.serverMenuButton,isSelected:!0,isDisabled:!0},e),{$$typeof:s,type:"div",key:null,ref:null,props:{children:[{$$typeof:s,type:"span",key:null,ref:null,props:{children:(0,h.default)("Looking for servers..."),className:I.default.serverMenuTitle
},_owner:null},{$$typeof:s,type:m.default,key:null,ref:null,props:o(m.default.defaultProps,{size:v.sizes.SMALL,className:I.default.serverMenuSpinner}),_owner:null}],className:I.default.serverMenuButtonContainer},_owner:null})}function i(e){var t=e.friendlyName,n=e.sourceTitle,r=e.isConnected,a=e.isUnavailable,i=e.isSecure,d=e.isRelayed,c=l(e,["friendlyName","sourceTitle","isConnected","isUnavailable","isSecure","isRelayed"]),p=void 0;return d&&n?p=(0,h.default)("Indirect {1}","("+n+")"):d?p=(0,h.default)("Indirect"):n&&(p=n),
f.default.createElement(w.default,u({className:I.default.serverMenuButton,"aria-haspopup":!0,isSelected:!0},c),{$$typeof:s,type:"div",key:null,ref:null,props:{children:[{$$typeof:s,type:"span",key:null,ref:null,props:{children:[{$$typeof:s,type:"span",key:null,ref:null,props:{children:[{$$typeof:s,type:"span",key:null,ref:null,props:{children:t,className:I.default.serverMenuFriendlyName},_owner:null},M],className:I.default.serverMenuFriendlyNameContainer},_owner:null},p&&{$$typeof:s,type:"span",key:null,
ref:null,props:{children:p,className:I.default.serverMenuUsername},_owner:null}],className:I.default.serverMenuTitle},_owner:null},{$$typeof:s,type:_.default,key:null,ref:null,props:o(_.default.defaultProps,{className:I.default.icon,isConnected:r,isUnavailable:a,isSecure:i}),_owner:null}],className:I.default.serverMenuButtonContainer},_owner:null})}var s=n(7).default,o=n(10).default,l=n(19).default,u=n(11).default,d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var c=n(4),f=d(c),p=n(5),h=d(p),v=n(30),g=n(55),m=d(g),y=n(449),b=d(y),P=n(34),w=d(P),S=n(776),_=d(S),T=n(2226),I=d(T);
r.propTypes={hasPrimaryServer:c.PropTypes.bool.isRequired};var M={$$typeof:s,type:b.default,key:null,ref:null,props:o(b.default.defaultProps,{isSelected:!0}),_owner:null};i.propTypes={friendlyName:c.PropTypes.string.isRequired,sourceTitle:c.PropTypes.string,isConnected:c.PropTypes.bool.isRequired,isUnavailable:c.PropTypes.bool.isRequired,isSecure:c.PropTypes.bool.isRequired,isRelayed:c.PropTypes.bool.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,c.createSelector)((0,
p.default)(),function(e){var t=o.default.pick(e,"friendlyName","sourceTitle","isConnected","isUnavailable","isSecure","isRelayed");return t})}function a(e){return u.default.createElement(v.default,e)}var i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var s=n(3),o=i(s),l=n(4),u=i(l),d=n(21),c=n(15),f=n(70),p=i(f),h=n(1913),v=i(h);a.propTypes={serverEntityID:l.PropTypes.string},t.default=(0,d.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.activeConnection,n=!1,r=void 0;
return e.isConnected&&t?r=e.isCloudSyncServer?(0,y.default)("Cloud"):e.isOutOfDate?(0,y.default)("Needs Update"):t.relay?(0,y.default)("Indirect"):t.isPrivate?(0,y.default)("Nearby"):(0,y.default)("Remote"):e.isRelayed?r=(0,y.default)("Indirect"):e.isUnavailable?r=(0,y.default)("Unavailable"):(n=!0,r=(0,y.default)("Connecting")),e.sourceTitle&&(r+=" ("+e.sourceTitle+")"),{isDisabled:n,status:r}}var a=n(17).default,i=n(18).default,s=n(44).default,o=n(16).default,l=n(7).default,u=n(10).default,d=n(19).default,c=n(11).default,f=n(1).default;
Object.defineProperty(t,"__esModule",{value:!0});var p=n(4),h=f(p),v=n(33),g=f(v),m=n(5),y=f(m),b=n(31),P=f(b),w=n(36),S=f(w),_=n(147),T=f(_),I=n(776),M=f(I),C=n(2228),x=f(C),E=function(e){function t(){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,P.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,a=(e.onPress,
d(e,["className","isSelected","onPress"])),i=r(a),s=i.isDisabled,o=i.status;return h.default.createElement(T.default,c({className:(0,g.default)(t,x.default.serverMenuItem,(s||a.isUnavailable)&&x.default.disabledServerMenuItem,n&&x.default.selectedServerMenuItem),to:"#!/server/"+a.machineIdentifier+"/dashboard",isDisabled:s,onPress:this.onPress},a),{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"div",key:null,ref:null,props:{children:[{$$typeof:l,type:"div",key:null,ref:null,
props:{children:a.friendlyName,className:x.default.serverMenuFriendlyName},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:o,className:x.default.serverMenuStatus},_owner:null}],className:x.default.serverMenuTitle},_owner:null},{$$typeof:l,type:"div",key:null,ref:null,props:{children:[n&&{$$typeof:l,type:S.default,key:null,ref:null,props:u(S.default.defaultProps,{name:"plex-icon-selected-560",className:(0,g.default)(x.default.serverMenuIcon,x.default.selectedIcon),"aria-label":(0,
y.default)("Selected")}),_owner:null},{$$typeof:l,type:M.default,key:null,ref:null,props:u(M.default.defaultProps,{className:x.default.serverMenuIcon,isConnected:a.isConnected,isUnavailable:a.isUnavailable,isSecure:a.isSecure,isRelayed:!n&&a.isRelayed}),_owner:null}],className:x.default.serverMenuIconContainer},_owner:null}],className:x.default.serverMenuItemContainer},_owner:null})}}]),t}(p.Component);E.propTypes={className:p.PropTypes.string,machineIdentifier:p.PropTypes.string,friendlyName:p.PropTypes.string,
sourceTitle:p.PropTypes.string,isConnected:p.PropTypes.bool.isRequired,isUnavailable:p.PropTypes.bool.isRequired,isSecure:p.PropTypes.bool.isRequired,isOutOfDate:p.PropTypes.bool.isRequired,isRelayed:p.PropTypes.bool.isRequired,isCloudSyncServer:p.PropTypes.bool.isRequired,isPrimaryEligible:p.PropTypes.bool.isRequired,activeConnection:p.PropTypes.object,isSelected:p.PropTypes.bool.isRequired,onPress:p.PropTypes.func},t.default=E,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,
f.createSelector)((0,h.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","isRelayed");return i({},n,{isSelected:e.entityID===t})})}function a(e){return d.default.createElement(g.default,e)}var i=n(11).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),l=s(o),u=n(4),d=s(u),c=n(21),f=n(15),p=n(70),h=s(p),v=n(1915),g=s(v);
a.propTypes={serverEntityID:u.PropTypes.string.isRequired},t.default=(0,c.connect)(r)(a),e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(7).default,l=n(10).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=u(d),f=n(33),p=u(f),h=n(5),v=u(h),g=n(24),m=n(31),y=u(m),b=n(36),P=u(b),w=n(34),S=u(w),_=n(271),T=u(_),I=n(1918),M=u(I),C=n(2229),x=u(C),E=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),
this.state={isActionsMenuOpen:!1,isOptimizeModalOpen:!1,isCleanBundlesModalOpen:!1,isEmptyTrashModalOpen:!1}}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,y.default)(this,e,t)}},{key:"onActionsPress",decorators:[g.autobind],value:function(e){this.setState({isActionsMenuOpen:!this.state.isActionsMenuOpen}),this.props.onActionsMenuOpen&&this.props.onActionsMenuOpen()}},{key:"onActionsMenuClose",decorators:[g.autobind],value:function(){this.setState({isActionsMenuOpen:!1
}),this.props.onActionsMenuClose&&this.props.onActionsMenuClose()}},{key:"onOptimizeDatabasePress",decorators:[g.autobind],value:function(e){this.setState({isOptimizeModalOpen:!0})}},{key:"onOptimizeConfirm",decorators:[g.autobind],value:function(){this.setState({isOptimizeModalOpen:!1}),this.props.onOptimizeDatabaseConfirm()}},{key:"onOptimizeCancel",decorators:[g.autobind],value:function(){this.setState({isOptimizeModalOpen:!1})}},{key:"onCleanBundlesPress",decorators:[g.autobind],value:function(e){
this.setState({isCleanBundlesModalOpen:!0})}},{key:"onCleanBundlesConfirm",decorators:[g.autobind],value:function(){this.setState({isCleanBundlesModalOpen:!1}),this.props.onCleanBundlesConfirm()}},{key:"onCleanBundlesCancel",decorators:[g.autobind],value:function(){this.setState({isCleanBundlesModalOpen:!1})}},{key:"onEmptyTrashPress",decorators:[g.autobind],value:function(e){this.setState({isEmptyTrashModalOpen:!0})}},{key:"onEmptyTrashConfirm",decorators:[g.autobind],value:function(){this.setState({
isEmptyTrashModalOpen:!1}),this.props.onEmptyTrashConfirm()}},{key:"onEmptyTrashCancel",decorators:[g.autobind],value:function(){this.setState({isEmptyTrashModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.actionClassName,r=e.isLibraryRefreshing;return{$$typeof:o,type:"div",key:null,ref:null,props:{children:[{$$typeof:o,type:S.default,key:null,ref:null,props:l(S.default.defaultProps,{children:{$$typeof:o,type:P.default,key:null,ref:null,props:l(P.default.defaultProps,{
name:"plex-icon-add-560","aria-label":(0,v.default)("Add Library")}),_owner:null},className:(0,p.default)(n,x.default.librariesAction),role:"menuitem",onPress:this.props.onAddLibraryPress}),_owner:null},c.default.createElement(S.default,{ref:"actionsMenuButton",className:(0,p.default)(n,x.default.librariesAction),role:"menuitem","aria-haspopup":!0,onPress:this.onActionsPress},{$$typeof:o,type:P.default,key:null,ref:null,props:l(P.default.defaultProps,{name:"plex-icon-more-560","aria-label":(0,v.default)("More Actions")
}),_owner:null}),{$$typeof:o,type:M.default,key:null,ref:null,props:l(M.default.defaultProps,{target:this.refs.actionsMenuButton,isOpen:this.state.isActionsMenuOpen,isLibraryRefreshing:r,onMenuClose:this.onActionsMenuClose,onSharePress:this.props.onSharePress,onUpdateLibrariesPress:this.props.onUpdateLibrariesPress,onCancelUpdatePress:this.props.onCancelUpdatePress,onOptimizeDatabasePress:this.onOptimizeDatabasePress,onCleanBundlesPress:this.onCleanBundlesPress,onEmptyTrashPress:this.onEmptyTrashPress
}),_owner:null},{$$typeof:o,type:T.default,key:null,ref:null,props:l(T.default.defaultProps,{isOpen:this.state.isOptimizeModalOpen,metricsPage:"confirmOptimizeDatabase",title:(0,v.default)("Optimize Database"),message:(0,v.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,v.default)("Optimize"),onConfirm:this.onOptimizeConfirm,onCancel:this.onOptimizeCancel
}),_owner:null},{$$typeof:o,type:T.default,key:null,ref:null,props:l(T.default.defaultProps,{isOpen:this.state.isCleanBundlesModalOpen,metricsPage:"confirmCleanBundles",title:(0,v.default)("Clean Bundles"),message:(0,v.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,v.default)("Clean"),onConfirm:this.onCleanBundlesConfirm,
onCancel:this.onCleanBundlesCancel}),_owner:null},{$$typeof:o,type:T.default,key:null,ref:null,props:l(T.default.defaultProps,{isOpen:this.state.isEmptyTrashModalOpen,metricsPage:"confirmEmptyTrash",title:(0,v.default)("Empty Trash"),message:(0,v.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,v.default)("Empty"),
onConfirm:this.onEmptyTrashConfirm,onCancel:this.onEmptyTrashCancel}),_owner:null}],className:(0,p.default)(t,x.default.librariesActions,this.state.isActionsMenuOpen&&x.default.isActionsMenuOpen),role:"menu"},_owner:null}}}]),t}(d.Component);E.propTypes={className:d.PropTypes.string,actionClassName:d.PropTypes.string,isLibraryRefreshing:d.PropTypes.bool.isRequired,onActionsMenuOpen:d.PropTypes.func,onActionsMenuClose:d.PropTypes.func,onAddLibraryPress:d.PropTypes.func.isRequired,onSharePress:d.PropTypes.func.isRequired,
onUpdateLibrariesPress:d.PropTypes.func.isRequired,onCancelUpdatePress:d.PropTypes.func.isRequired,onOptimizeDatabaseConfirm:d.PropTypes.func.isRequired,onCleanBundlesConfirm:d.PropTypes.func.isRequired,onEmptyTrashConfirm:d.PropTypes.func.isRequired},t.default=E,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.isLibraryRefreshing,n=e.onSharePress,r=e.onUpdateLibrariesPress,o=e.onCancelUpdatePress,l=e.onOptimizeDatabasePress,d=e.onCleanBundlesPress,f=e.onEmptyTrashPress,h=s(e,["isLibraryRefreshing","onSharePress","onUpdateLibrariesPress","onCancelUpdatePress","onOptimizeDatabasePress","onCleanBundlesPress","onEmptyTrashPress"]);
return u.default.createElement(p.default,h,{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:(0,c.default)("Share..."),onPress:n}),_owner:null},t?{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:(0,c.default)("Cancel Update"),onPress:o}),_owner:null}:{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:(0,c.default)("Update Libraries"),onPress:r}),_owner:null},{$$typeof:i,type:v.default,key:null,
ref:null,props:a(v.default.defaultProps,{children:(0,c.default)("Optimize Database"),onPress:l}),_owner:null},{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:(0,c.default)("Clean Bundles"),onPress:d}),_owner:null},{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:(0,c.default)("Empty Trash"),onPress:f}),_owner:null})}var a=n(10).default,i=n(7).default,s=n(19).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0
});var l=n(4),u=o(l),d=n(5),c=o(d),f=n(104),p=o(f),h=n(147),v=o(h);r.propTypes={isLibraryRefreshing:l.PropTypes.bool.isRequired,onSharePress:l.PropTypes.func.isRequired,onUpdateLibrariesPress:l.PropTypes.func.isRequired,onCancelUpdatePress:l.PropTypes.func.isRequired,onOptimizeDatabasePress:l.PropTypes.func.isRequired,onCleanBundlesPress:l.PropTypes.func.isRequired,onEmptyTrashPress:l.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.machineIdentifier,n=e.isFullOwnedServer,r=e.id,s=e.type,o=e.title,l=void 0===o?"":o,d=e.refreshing,f=e.onEditLibraryPress,h=encodeURIComponent(t),g=encodeURIComponent(r);
return{$$typeof:i,type:m.default,key:null,ref:null,props:a(m.default.defaultProps,{children:[{$$typeof:i,type:b.default,key:null,ref:null,props:a(b.default.defaultProps,{children:l,to:"#!/server/"+h+"/section/"+g,icon:c.default.get(s).sectionTypeIcon,className:w.default.libraryLink,showSpinner:n&&d}),_owner:null},n&&{$$typeof:i,type:v.default,key:null,ref:null,props:a(v.default.defaultProps,{children:{$$typeof:i,type:p.default,key:null,ref:null,props:a(p.default.defaultProps,{name:"plex-icon-edit-560",
"aria-label":(0,u.default)("Edit {1}",l)}),_owner:null},className:w.default.editLibraryLink,onPress:f}),_owner:null}],className:w.default.libraryItem}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(102),c=s(d),f=n(36),p=s(f),h=n(34),v=s(h),g=n(345),m=s(g),y=n(344),b=s(y),P=n(2230),w=s(P);r.propTypes={machineIdentifier:o.PropTypes.string.isRequired,isFullOwnedServer:o.PropTypes.bool.isRequired,id:o.PropTypes.string.isRequired,
type:o.PropTypes.string.isRequired,title:o.PropTypes.string.isRequired,refreshing:o.PropTypes.bool,onEditLibraryPress:o.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(21),f=n(15),p=n(24),h=n(1067),v=l(h),g=n(1374),m=n(1919),y=l(m),b=function(){return(0,f.createSelector)((0,v.default)(),function(e){
var t=e.key,n=e.title,r=void 0===n?"":n,a=e.type,i=e.agent,s=e.refreshing,o="movie"===a&&"com.plexapp.agents.none"===i;return{id:t,title:r.trim(),type:o?"videos":a,refreshing:s}})},P=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"onEditLibraryPress",decorators:[p.autobind],value:function(e){this.props.editLibrary({libraryEntityID:this.props.libraryEntityID})}},{key:"render",value:function(){return d.default.createElement(y.default,o({
onEditLibraryPress:this.onEditLibraryPress},this.props))}}]),t}(u.Component);P.propTypes={libraryEntityID:u.PropTypes.string.isRequired,editLibrary:u.PropTypes.func.isRequired},t.default=(0,c.connect)(b,{editLibrary:g.editLibrary})(P),e.exports=t.default},function(e,t,n){"use strict";function r(e){return u.providerIdentifiers.EPG_IDENTIFIER.test(e)?"plex-icon-shows-broadcast-560":"plex-icon-channels-560"}function a(e){var t=e.machineIdentifier,n=e.identifier,a=e.isLibraryProvider,o=e.title,l=e.isRefreshing;
if(a)return null;var u=encodeURIComponent(t),d=encodeURIComponent(n);return{$$typeof:s,type:c.default,key:null,ref:null,props:i(c.default.defaultProps,{children:{$$typeof:s,type:p.default,key:null,ref:null,props:i(p.default.defaultProps,{children:o,to:"#!/server/"+u+"/provider/"+d,icon:r(n),showSpinner:l}),_owner:null}}),_owner:null}}var i=n(10).default,s=n(7).default,o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),u=(o(l),n(84)),d=n(345),c=o(d),f=n(344),p=o(f);a.propTypes={
machineIdentifier:l.PropTypes.string.isRequired,identifier:l.PropTypes.string.isRequired,isLibraryProvider:l.PropTypes.bool.isRequired,title:l.PropTypes.string.isRequired,isRefreshing:l.PropTypes.bool.isRequired},t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e){return l.default.createElement(g.default,e)}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=a(i),o=n(4),l=a(o),u=n(21),d=n(15),c=n(100),f=a(c),p=n(324),h=a(p),v=n(1921),g=a(v),m=function(){
return(0,d.createSelector)((0,f.default)(),(0,h.default)(),function(e,t){var n=s.default.pick(e,"identifier","isLibraryProvider","title");return n.isRefreshing=!!t,n})};r.propTypes={serverEntityID:o.PropTypes.string.isRequired,providerEntityID:o.PropTypes.string.isRequired},t.default=(0,u.connect)(m)(r),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.serverEntityID,n=e.machineIdentifier,r=e.allowChannelAccess,s=e.isFullOwnedServer,o=e.isConnected,u=e.isClaimed,c=e.isLibrariesPopulated,p=e.librariesError,v=e.contentProviders,m=e.isProvidersPopulated,b=e.providersError,w=e.showRecordingSchedule;
if(!o)return l.default.createElement(M.default,e);var _=!m&&!b,I=!c&&!p;if(_||I)return{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{containerClassName:x.default.spinnerContainer,label:(0,d.default)("Loading libraries")}),_owner:null};var C=encodeURIComponent(n);return{$$typeof:i,type:"div",key:null,ref:null,props:{children:[s&&{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:[{$$typeof:i,type:y.default,key:"status",ref:null,props:a(y.default.defaultProps,{
children:(0,d.default)("Status"),to:"#!/status",icon:"plex-icon-status-560"}),_owner:null},{$$typeof:i,type:y.default,key:"settings",ref:null,props:a(y.default.defaultProps,{children:[(0,d.default)("Settings"),!u&&{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{name:"plex-icon-alert-560",className:x.default.unclaimedIcon,"aria-label":(0,d.default)("Unclaimed")}),_owner:null}],to:"#!/settings/server",icon:"plex-icon-settings-560"}),_owner:null},w&&{$$typeof:i,type:y.default,
key:"schedule",ref:null,props:a(y.default.defaultProps,{children:(0,d.default)("Recording Schedule"),to:"#!/server/"+C+"/schedule",icon:"plex-icon-calendar-560"}),_owner:null},v.map(function(e){return{$$typeof:i,type:P.default,key:e,ref:null,props:a(P.default.defaultProps,{serverEntityID:t,providerEntityID:e,machineIdentifier:n}),_owner:null}})],title:(0,d.default)("Manage")}),_owner:null},l.default.createElement(S.default,e),{$$typeof:i,type:T.default,key:null,ref:null,props:a(T.default.defaultProps,{
machineIdentifier:n,showChannels:!(!s&&!r)}),_owner:null}]},_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=s(o),u=n(5),d=s(u),c=n(36),f=s(c),p=n(55),h=s(p),v=n(484),g=s(v),m=n(218),y=s(m),b=n(1922),P=s(b),w=n(1925),S=s(w),_=n(1927),T=s(_),I=n(1928),M=s(I),C=n(2231),x=s(C);r.propTypes={serverEntityID:o.PropTypes.string.isRequired,machineIdentifier:o.PropTypes.string.isRequired,allowChannelAccess:o.PropTypes.bool,isFullOwnedServer:o.PropTypes.bool.isRequired,
isConnected:o.PropTypes.bool.isRequired,isClaimed:o.PropTypes.bool,isLibrariesPopulated:o.PropTypes.bool,librariesError:o.PropTypes.object,contentProviders:o.PropTypes.array.isRequired,isProvidersPopulated:o.PropTypes.bool,providersError:o.PropTypes.object,showRecordingSchedule:o.PropTypes.bool},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){return(0,m.createSelector)((0,M.default)(),function(e){return p.default.some(p.default.pluck(e,"refreshing"))})}function a(){return(0,
m.createSelector)((0,S.default)(),(0,T.default)(P.providerFeatureTypes.CONTENT),(0,T.default)(P.providerFeatureTypes.SUBSCRIBE),r(),function(e,t,n,r){var a=p.default.pick(e,"machineIdentifier","friendlyName","promiseState","presence","allowChannelAccess","isConnected","isFullServer","isFullOwnedServer","isBundled","isClaimed","hasHttpsConnections","hasFallbackConnections"),s=p.default.pick(e&&e.desktop,"libraries","isLibrariesPending","isLibrariesPopulated","librariesError","isProvidersPending","isProvidersPopulated","providersError");
return i({},a,s,{contentProviders:t,showRecordingSchedule:!!n.length,isLibraryRefreshing:r})})}var i=n(11).default,s=n(17).default,o=n(18).default,l=n(25).default,u=n(16).default,d=n(1).default,c=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(3),p=d(f),h=n(4),v=d(h),g=n(21),m=n(15),y=n(24),b=n(50),P=n(158),w=n(70),S=d(w),_=n(599),T=d(_),I=n(395),M=d(I),C=n(91),x=n(110),E=c(x),k=n(1923),D=d(k),A=i({redirectToHttp:C.redirectToHttp},E),O=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,r=t.isConnected,a=e.serverEntityID,i=e.isConnected,s=n!==a,o=r!==i;i&&(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}),e.fetchProviders({
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 v.default.createElement(D.default,i({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}(h.Component);O.propTypes={serverEntityID:h.PropTypes.string.isRequired,isConnected:h.PropTypes.bool.isRequired,redirectToHttp:h.PropTypes.func.isRequired,deleteServer:h.PropTypes.func.isRequired,fetchLibraries:h.PropTypes.func.isRequired,fetchProviders:h.PropTypes.func.isRequired,addLibrary:h.PropTypes.func.isRequired,shareLibraries:h.PropTypes.func.isRequired,startLibraryRefresh:h.PropTypes.func.isRequired,cancelLibraryRefresh:h.PropTypes.func.isRequired,
optimizeDatabase:h.PropTypes.func.isRequired,cleanBundles:h.PropTypes.func.isRequired,emptyTrash:h.PropTypes.func.isRequired,testServer:h.PropTypes.func.isRequired,enableHttpFallback:h.PropTypes.func.isRequired},t.default=(0,g.connect)(a,A)(O),e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.machineIdentifier,n=e.isFullServer,r=e.isFullOwnedServer,l=e.libraries,u=e.librariesError,c=e.onAddLibraryPress,p=s(e,["machineIdentifier","isFullServer","isFullOwnedServer","libraries","librariesError","onAddLibraryPress"]),v=!!u&&!l.length,m=r&&!l.length,b=encodeURIComponent(t);
return{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:"div",key:null,ref:null,props:{children:[{$$typeof:a,type:"div",key:null,ref:null,props:{children:(0,h.default)("Libraries"),className:x.default.librariesTitle},_owner:null},r&&d.default.createElement(T.default,o({actionClassName:x.default.librariesAction,onAddLibraryPress:c},p))],className:x.default.librariesListHeader,role:"header"},_owner:null},n&&{$$typeof:a,type:P.default,key:"playlists",ref:null,props:i(P.default.defaultProps,{
children:{$$typeof:a,type:S.default,key:null,ref:null,props:i(S.default.defaultProps,{children:(0,h.default)("Playlists"),to:"#!/server/"+b+"/playlists",icon:"plex-icon-playlists-560",className:x.default.libraryLink}),_owner:null},className:x.default.libraryItem}),_owner:null},m&&{$$typeof:a,type:P.default,key:"addLibrary",ref:null,props:i(P.default.defaultProps,{children:{$$typeof:a,type:S.default,key:null,ref:null,props:i(S.default.defaultProps,{children:(0,h.default)("Add Library"),icon:"plex-icon-add-560",
className:x.default.libraryLink,onPress:c}),_owner:null},className:x.default.libraryItem}),_owner:null},v?{$$typeof:a,type:y.default,key:null,ref:null,props:i(y.default.defaultProps,{message:(0,h.default)("There was an unexpected error loading libraries.")}),_owner:null}:l.map(function(e){return{$$typeof:a,type:M.default,key:e,ref:null,props:i(M.default.defaultProps,{libraryEntityID:e,machineIdentifier:t,isFullOwnedServer:r}),_owner:null}})],className:(0,f.default)(x.default.librariesList,g.default.hasTouchScreen&&x.default.touchLibrariesList),
role:"navigation"},_owner:null}}var a=n(7).default,i=n(10).default,s=n(19).default,o=n(11).default,l=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=l(u),c=n(33),f=l(c),p=n(5),h=l(p),v=n(65),g=l(v),m=n(219),y=l(m),b=n(345),P=l(b),w=n(344),S=l(w),_=n(1917),T=l(_),I=n(1920),M=l(I),C=n(2232),x=l(C);r.propTypes={machineIdentifier:u.PropTypes.string.isRequired,allowChannelAccess:u.PropTypes.bool,isFullServer:u.PropTypes.bool.isRequired,isFullOwnedServer:u.PropTypes.bool.isRequired,
libraries:u.PropTypes.array.isRequired,isLibrariesPending:u.PropTypes.bool.isRequired,librariesError:u.PropTypes.object,onAddLibraryPress:u.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(5)),f=u(c),p=n(484),h=u(p),v=n(218),g=u(v),m=n(1903),y=u(m),b=function(e){function t(){s(this,t),
r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"render",value:function(){var e=this.props,t=e.machineIdentifier,n=e.showChannels,r=e.isUserRestricted,a=e.unwatchedWatchLaterCount,i=e.unwatchedRecommendedCount,s=!r,u=encodeURIComponent(t);return n||s?{$$typeof:l,type:h.default,key:null,ref:null,props:o(h.default.defaultProps,{children:[n&&{$$typeof:l,type:g.default,key:"channels",ref:null,props:o(g.default.defaultProps,{children:(0,f.default)("Channels"),
to:"#!/server/"+u+"/channels",icon:"plex-icon-channels-560"}),_owner:null},s&&{$$typeof:l,type:g.default,key:"watchLater",ref:null,props:o(g.default.defaultProps,{children:[(0,f.default)("Watch Later"),{$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{count:a}),_owner:null}],to:"#!/playlist/queue",icon:"plex-icon-watch-later-560"}),_owner:null},s&&{$$typeof:l,type:g.default,key:"recommended",ref:null,props:o(g.default.defaultProps,{children:[(0,f.default)("Recommended"),{
$$typeof:l,type:y.default,key:null,ref:null,props:o(y.default.defaultProps,{count:i}),_owner:null}],to:"#!/playlist/recommendations",icon:"plex-icon-recommended-560"}),_owner:null}],title:(0,f.default)("Online Content")}),_owner:null}:null}}]),t}(d.Component);b.propTypes={machineIdentifier:d.PropTypes.string.isRequired,showChannels:d.PropTypes.bool.isRequired,isUserRestricted:d.PropTypes.bool.isRequired,unwatchedWatchLaterCount:d.PropTypes.number,unwatchedRecommendedCount:d.PropTypes.number},t.default=b,
e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(44).default,s=n(16).default,o=n(1).default,l=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var u=n(4),d=o(u),c=n(21),f=n(15),p=n(50),h=n(304),v=o(h),g=n(437),m=l(g),y=n(1926),b=o(y),P=(0,f.createSelector)(v.default,function(e){var t=e.desktop;return{isSignedIn:e.isSignedIn,isUserRestricted:!!e.restricted,unwatchedWatchLaterCount:t.unwatchedWatchLaterList.totalSize,unwatchedRecommendedCount:t.unwatchedRecommendedList.totalSize
}}),w={repopulateUnwatchedWatchLaterList:m.repopulateUnwatchedWatchLaterList,repopulateUnwatchedRecommendedList:m.repopulateUnwatchedRecommendedList},S=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"componentWillMount",value:function(){this._populate()}},{key:"componentWillReceiveProps",value:function(e){e.isSignedIn!==this.props.isSignedIn&&this._populate(e)}},{key:"_populate",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];
e.isSignedIn&&!e.isUserRestricted&&(0,p.scheduleImmediateUpdate)(function(){e.repopulateUnwatchedWatchLaterList(),e.repopulateUnwatchedRecommendedList()})}},{key:"render",value:function(){return d.default.createElement(b.default,this.props)}}]),t}(u.Component);S.propTypes={isSignedIn:u.PropTypes.bool.isRequired,repopulateUnwatchedWatchLaterList:u.PropTypes.func.isRequired,repopulateUnwatchedRecommendedList:u.PropTypes.func.isRequired},t.default=(0,c.connect)(function(e){return P(e)},w)(S),e.exports=t.default;
},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(10).default,l=n(7).default,u=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var d=n(4),c=(u(d),n(5)),f=u(c),p=n(24),h=n(65),v=u(h),g=n(63),m=u(g),y=n(89),b=u(y),P=n(31),w=u(P),S=n(30),_=n(271),T=u(_),I=n(218),M=u(I),C=n(219),x=u(C),E=function(e){function t(e,n){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,n),this.state={isRemoveModalOpen:!1}}return a(t,e),
i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,w.default)(this,e,t)}},{key:"onRemoveServerPress",decorators:[p.autobind],value:function(e){this.setState({isRemoveModalOpen:!0})}},{key:"onRemoveConfirm",decorators:[p.autobind],value:function(){this.setState({isRemoveModalOpen:!1}),this.props.onDeleteServerConfirm(this.props.machineIdentifier)}},{key:"onRemoveCancel",decorators:[p.autobind],value:function(){this.setState({isRemoveModalOpen:!1})}},{key:"render",value:function(){var e=this.props,t=e.friendlyName,n=e.presence,r=e.promiseState,a=e.isBundled,i=e.isFullServer,s=e.isFullOwnedServer,u=e.hasHttpsConnections,d=e.hasFallbackConnections,c=e.onTryAgainPress,p=e.onReloadHttpPress,h=e.onAllowFallbackPress,g=v.default.isHostedHttps,y=i&&n,P=u&&!d,w=!g||m.default.get("allowMixedContent"),_=!w&&y,I=w&&y&&P,C=_||I,E=C?(0,
f.default)("The selected server cannot be reached securely. An insecure connection may be possible."):(0,f.default)("The selected server is unreachable. Make sure it's running, double check your network, and try again."),k=r===b.default.promiseStates.PENDING,D=k?(0,f.default)("Connecting"):(0,f.default)("Try again");return{$$typeof:l,type:x.default,key:null,ref:null,props:o(x.default.defaultProps,{children:[{$$typeof:l,type:M.default,key:null,ref:null,props:o(M.default.defaultProps,{children:D,icon:"plex-icon-reload-560",
showSpinner:k,isDisabled:k,onPress:c}),_owner:null},_&&{$$typeof:l,type:M.default,key:null,ref:null,props:o(M.default.defaultProps,{children:(0,f.default)("Reload app insecurely"),icon:"plex-icon-unlock-560",onPress:p}),_owner:null},I&&{$$typeof:l,type:M.default,key:null,ref:null,props:o(M.default.defaultProps,{children:(0,f.default)("Allow insecure connection"),icon:"plex-icon-unlock-560",onPress:h}),_owner:null},C&&{$$typeof:l,type:M.default,key:null,ref:null,props:o(M.default.defaultProps,{children:(0,
f.default)("Learn more"),to:"https://support.plex.tv/hc/en-us/articles/206225077",target:"_blank",icon:"plex-icon-help-560"}),_owner:null},!C&&{$$typeof:l,type:M.default,key:null,ref:null,props:o(M.default.defaultProps,{children:(0,f.default)("Where is my server?"),to:"https://help.plex.tv/noserver",target:"_blank",icon:"plex-icon-help-560"}),_owner:null},s&&!a&&{$$typeof:l,type:M.default,key:null,ref:null,props:o(M.default.defaultProps,{children:(0,f.default)("Remove server"),icon:"plex-icon-remove-560",
onPress:this.onRemoveServerPress}),_owner:null},{$$typeof:l,type:T.default,key:null,ref:null,props:o(T.default.defaultProps,{isOpen:this.state.isRemoveModalOpen,metricsPage:"confirmRemoveServer",kind:S.kinds.DANGER,title:(0,f.default)('Remove "{1}"',t),message:(0,f.default)("If this server is restarted, it will automatically be added to your account again.",t),confirmLabel:(0,f.default)("Remove"),onConfirm:this.onRemoveConfirm,onCancel:this.onRemoveCancel}),_owner:null}],message:E}),_owner:null}}
}]),t}(d.Component);E.propTypes={machineIdentifier:d.PropTypes.string,friendlyName:d.PropTypes.string,promiseState:d.PropTypes.string,presence:d.PropTypes.bool,isFullServer:d.PropTypes.bool,isFullOwnedServer:d.PropTypes.bool,isBundled:d.PropTypes.bool,hasHttpsConnections:d.PropTypes.bool,hasFallbackConnections:d.PropTypes.bool,onTryAgainPress:d.PropTypes.func.isRequired,onAllowFallbackPress:d.PropTypes.func.isRequired,onReloadHttpPress:d.PropTypes.func.isRequired,onDeleteServerConfirm:d.PropTypes.func.isRequired
},t.default=E,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.isOpen,n=e.metricsProperties,r=e.onModalClose;return{$$typeof:i,type:h.default,key:null,ref:null,props:a(h.default.defaultProps,{children:{$$typeof:i,type:g.default,key:null,ref:null,props:a(g.default.defaultProps,{children:[{$$typeof:i,type:y.default,key:null,ref:null,props:a(y.default.defaultProps,{children:[{$$typeof:i,type:"div",key:null,ref:null,props:{children:(0,u.default)("Plex Pass Lite"),className:R.default.plexPassTitle
},_owner:null},(0,u.default)("Congratulations! You qualify for a free year of Plex Pass Lite!")],className:R.default.header}),_owner:null},{$$typeof:i,type:P.default,key:null,ref:null,props:a(P.default.defaultProps,{children:[{$$typeof:i,type:T.default,key:null,ref:null,props:a(T.default.defaultProps,{img:M.default,title:(0,u.default)("Mobile Sync"),description:(0,u.default)("Enjoy your media offline on Android, iOS, and Windows devices")}),_owner:null},{$$typeof:i,type:T.default,key:null,ref:null,
props:a(T.default.defaultProps,{img:x.default,title:(0,u.default)("Camera Upload"),description:(0,u.default)("Sync photos from your mobile devices to Plex Media Server")}),_owner:null},{$$typeof:i,type:T.default,key:null,ref:null,props:a(T.default.defaultProps,{img:k.default,title:(0,u.default)("Cloud Sync"),description:(0,u.default)("Sync media to the cloud and enjoy it anywhere there\u2019s internet")}),_owner:null},{$$typeof:i,type:T.default,key:null,ref:null,props:a(T.default.defaultProps,{img:A.default,
title:(0,u.default)("Plex Home"),description:(0,u.default)("Parental controls and fast user switching")}),_owner:null}],innerClassName:R.default.body}),_owner:null},{$$typeof:i,type:S.default,key:null,ref:null,props:a(S.default.defaultProps,{children:{$$typeof:i,type:f.default,key:null,ref:null,props:a(f.default.defaultProps,{children:(0,u.default)("Hooray, thanks!"),kind:d.kinds.PRIMARY,size:d.sizes.LARGE,onPress:r}),_owner:null},className:R.default.footer}),_owner:null}],onModalClose:r}),_owner:null
},size:d.sizes.LARGE,isOpen:t,metricsPage:"plexpassLite",metricsProperties:n,onModalClose:r}),_owner:null}}var a=n(10).default,i=n(7).default,s=n(1).default;Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),l=(s(o),n(5)),u=s(l),d=n(30),c=n(81),f=s(c),p=n(148),h=s(p),v=n(105),g=s(v),m=n(113),y=s(m),b=n(82),P=s(b),w=n(112),S=s(w),_=n(777),T=s(_),I=n(888),M=s(I),C=n(886),x=s(C),E=n(887),k=s(E),D=n(2712),A=s(D),O=n(2234),R=s(O);r.propTypes={isOpen:o.PropTypes.bool.isRequired,metricsProperties:o.PropTypes.object,
onModalClose:o.PropTypes.func.isRequired},t.default=r,e.exports=t.default},function(e,t,n){"use strict";var r=n(17).default,a=n(18).default,i=n(25).default,s=n(16).default,o=n(11).default,l=n(10).default,u=n(7).default,d=n(1).default,c=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var f=n(4),p=d(f),h=n(33),v=d(h),g=n(14),m=n(5),y=d(m),b=n(24),P=n(26),w=c(P),S=n(398),_=c(S),T=n(30),I=n(31),M=d(I),C=n(55),x=d(C),E=n(34),k=d(E),D=n(81),A=d(D),O=n(726),R=d(O),L=n(148),N=d(L),j=n(105),U=d(j),$=n(113),z=d($),F=n(82),B=d(F),V=n(112),H=d(V),q=n(777),W=d(q),G=n(888),Y=d(G),Q=n(2710),K=d(Q),X=n(2713),Z=d(X),J=n(886),ee=d(J),te=n(887),ne=d(te),re=n(2711),ae=d(re),ie=n(2235),se=d(ie),oe="plexpass",le={
$$typeof:u,type:x.default,key:null,ref:null,props:l(x.default.defaultProps,{}),_owner:null},ue=function(e){function t(){s(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,M.default)(this,e,t)}},{key:"onModalClose",decorators:[b.autobind],value:function(){var e=(0,g.resolve)("metrics");e.trackClick(o({},this.props.metricsProperties,{page:oe,action:"skip"})),this.props.onModalClose()}},{
key:"render",value:function(){var e=this.props,t=e.isOpen,n=e.metricsProperties,r=e.plans,a=e.isPlansPending,i=e.isPlansPopulated,s=e.plansError;return{$$typeof:u,type:N.default,key:null,ref:null,props:l(N.default.defaultProps,{children:{$$typeof:u,type:U.default,key:null,ref:null,props:l(U.default.defaultProps,{children:[{$$typeof:u,type:z.default,key:null,ref:null,props:l(z.default.defaultProps,{children:[{$$typeof:u,type:"div",key:null,ref:null,props:{children:(0,y.default)("Plex Pass"),className:se.default.plexPassTitle
},_owner:null},(0,y.default)("Enhance your Plex experience with exclusive premium features")],className:se.default.header}),_owner:null},{$$typeof:u,type:B.default,key:null,ref:null,props:l(B.default.defaultProps,{children:[{$$typeof:u,type:W.default,key:null,ref:null,props:l(W.default.defaultProps,{img:Y.default,title:(0,y.default)("Mobile Sync"),description:(0,y.default)("Enjoy your media offline on Android, iOS, and Windows devices")}),_owner:null},{$$typeof:u,type:W.default,key:null,ref:null,
props:l(W.default.defaultProps,{img:K.default,title:(0,y.default)("Exclusive Forum Access"),description:(0,y.default)("Let your voice be heard in special members-only forums")}),_owner:null},{$$typeof:u,type:W.default,key:null,ref:null,props:l(W.default.defaultProps,{img:Z.default,title:(0,y.default)("Trailers & Extras"),description:(0,y.default)("See movie trailers, cast interviews, and other bonus features")}),_owner:null},{$$typeof:u,type:W.default,key:null,ref:null,props:l(W.default.defaultProps,{
img:ee.default,title:(0,y.default)("Camera Upload"),description:(0,y.default)("Sync photos from your mobile devices to Plex Media Server")}),_owner:null},{$$typeof:u,type:W.default,key:null,ref:null,props:l(W.default.defaultProps,{img:ne.default,title:(0,y.default)("Cloud Sync"),description:(0,y.default)("Sync media to the cloud and enjoy it anywhere there\u2019s internet")}),_owner:null},{$$typeof:u,type:W.default,key:null,ref:null,props:l(W.default.defaultProps,{img:ae.default,title:(0,y.default)("Gracenote Music Magic"),
description:(0,y.default)("Song identification, album reviews, artist bios, and Plex Mix playlists")}),_owner:null},{$$typeof:u,type:"div",key:null,ref:null,props:{children:{$$typeof:u,type:k.default,key:null,ref:null,props:l(k.default.defaultProps,{children:(0,y.default)("...plus more exclusive features!"),className:se.default.link,to:_.PLEX_PASS_INFO_URL,target:"_self"}),_owner:null},className:se.default.moreFeatures},_owner:null}],innerClassName:se.default.body}),_owner:null},{$$typeof:u,type:H.default,
key:null,ref:null,props:l(H.default.defaultProps,{children:[a&&{$$typeof:u,type:"div",key:null,ref:null,props:{children:le,className:se.default.spinnerContainer},_owner:null},{$$typeof:u,type:"div",key:null,ref:null,props:{children:[!a&&i&&r.map(function(e){var t=w.join(_.PLEX_PASS_SUBSCRIBE_URL,{plan:e.id,"continue":window.location.href});return p.default.createElement(R.default,o({key:e.id},n,{page:oe,action:"subscribe",plan:e.id}),{$$typeof:u,type:A.default,key:null,ref:null,props:l(A.default.defaultProps,{
children:[e.formattedPrice," \u2014 ",e.name],className:se.default.planButton,to:t,target:"_self",kind:T.kinds.PRIMARY,size:T.sizes.LARGE}),_owner:null})}),!a&&s&&p.default.createElement(R.default,o({},n,{page:oe,action:"subscribe",plan:"unknown"}),{$$typeof:u,type:A.default,key:null,ref:null,props:l(A.default.defaultProps,{children:(0,y.default)("Subscribe"),className:se.default.planButton,to:_.PLEX_PASS_SUBSCRIBE_URL,target:"_self",kind:T.kinds.PRIMARY,size:T.sizes.LARGE}),_owner:null})],className:(0,
v.default)(se.default.plansContainer,a&&se.default.isPlansPending)},_owner:null},{$$typeof:u,type:"div",key:null,ref:null,props:{children:[(0,y.default)("Subscribe today"),{$$typeof:u,type:"span",key:null,ref:null,props:{children:"\u2014",className:se.default.linkSeparator},_owner:null},p.default.createElement(R.default,o({},n,{page:oe,action:"gift"}),{$$typeof:u,type:k.default,key:null,ref:null,props:l(k.default.defaultProps,{children:(0,y.default)("or give Plex Pass as a gift!"),className:se.default.link,
to:_.PLEX_PASS_GIFT_URL,target:"_self"}),_owner:null})]},_owner:null}],className:se.default.footer}),_owner:null}],onModalClose:this.onModalClose}),_owner:null},size:T.sizes.LARGE,isOpen:t,metricsPage:oe,metricsProperties:n,onModalClose:this.onModalClose}),_owner:null}}}]),t}(f.Component);ue.propTypes={isOpen:f.PropTypes.bool.isRequired,metricsProperties:f.PropTypes.object,plans:f.PropTypes.array.isRequired,isPlansPending:f.PropTypes.bool.isRequired,isPlansPopulated:f.PropTypes.bool.isRequired,plansError:f.PropTypes.object,
onModalClose:f.PropTypes.func.isRequired},t.default=ue,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=function(t){function n(e,t){l(this,n),i(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,P.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:[g.autobind],value:function(e){var t=this.state.pressedModifierKeys;_[e.which]&&t.indexOf(e.which)===-1&&this.setState({pressedModifierKeys:t.concat(e.which)})}},{key:"onKeyUp",decorators:[g.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:[g.autobind],value:function(e){this._isMouseDown=!0}},{key:"onMouseUp",decorators:[g.autobind],value:function(e){this._isMouseDown=!1}},{key:"onFocusChange",decorators:[g.autobind],value:function(e){this.state.pressedModifierKeys.length&&this.setState({pressedModifierKeys:[]}),this._isMouseDown=!1}},{key:"onMouseEnter",decorators:[g.autobind],value:function(e){var t=this.props,n=t.selectionType,r=t.activeSelectionType;
this._isMouseDown&&r&&r===n&&this.onSelectPress(e)}},{key:"onSelectPress",decorators:[g.autobind],value:function(e){var t=this.props,n=t.selectionID,r=t.selectionType,a=t.isSelected,i=t.onSelectItem;a||i({id:n,type:r,isRangeSelect:e.shiftKey})}},{key:"onDeselectPress",decorators:[g.autobind],value:function(e){var t=this.props,n=t.selectionID,r=t.isSelected,a=t.onDeselectItem;r&&a({id:n})}},{key:"render",value:function(){var t=this.props,n=t.selectionType,r=t.activeSelectionType,a=t.isSelected,i=u(t,["selectionType","activeSelectionType","isSelected"]),s=this.state.pressedModifierKeys,o=!!r;
return v.default.createElement(e,d({hasActiveSelection:o,isSelected:a,isOtherItemSelected:o&&!a,isConflictingTypeSelected:o&&r!==n,isModifierKeyPressed:s.length>0,onMouseEnter:this.onMouseEnter,onSelectPress:this.onSelectPress,onDeselectPress:this.onDeselectPress},i))}}]),n}(h.Component);return t.displayName="Selectable("+(0,S.default)(e)+")",t.WrappedComponent=e,t.propTypes={selectionID:h.PropTypes.string.isRequired,selectionType:h.PropTypes.string.isRequired,activeSelectionType:h.PropTypes.string,
isSelected:h.PropTypes.bool.isRequired,onSelectItem:h.PropTypes.func.isRequired,onDeselectItem:h.PropTypes.func.isRequired},t.defaultProps={disableSelection:!1},t}var a=n(38).default,i=n(17).default,s=n(18).default,o=n(25).default,l=n(16).default,u=n(19).default,d=n(11).default,c=n(1).default,f=n(9).default;Object.defineProperty(t,"__esModule",{value:!0});var p,h=n(4),v=c(h),g=n(24),m=n(326),y=f(m),b=n(31),P=c(b),w=n(424),S=c(w),_=(p={},a(p,y.SHIFT,!0),a(p,y.CONTROL,!0),a(p,y.META_1,!0),a(p,y.META_2,!0),
a(p,y.META_3,!0),p);t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){for(var t=!0;t;){var n=e;if(t=!1,n===document)return!0;if(!n)return!1;if(!n.parentNode)return!1;if(n.style){var r=n.style;if("none"===r.display||"hidden"===r.visibility)return!1}if(window.getComputedStyle){var r=window.getComputedStyle(n);if("none"===r.getPropertyValue("display")||"hidden"===r.getPropertyValue("visibility"))return!1}e=n.parentNode,t=!0,r=r=void 0}}function a(e){var t=e.tabIndex;return null===t&&(t=void 0),
!isNaN(t)&&t>=0&&i(e)}function i(e){if(!r(e))return!1;var t=e.nodeName.toLowerCase();return/input|select|textarea|button|object/.test(t)?!e.disabled:"a"!==t||e.href}function s(e){if(!e)return[];var t=[].slice.call(e.getElementsByTagName("*"),0).filter(function(e){return a(e)});return u.default.sortBy(t,function(e){return 0===e.tabIndex?1/0:e.tabIndex})}var o=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var l=n(3),u=o(l);e.exports=t.default},function(e,t,n){"use strict";
function r(e){if(!e)return(0,f.default)("Username is required")}function a(e){if(!e)return(0,f.default)("Email address is required")}function i(e){if(!e)return(0,f.default)("Password is required")}function s(e){if(!e)return(0,f.default)("Password confirmation is required")}function o(e){if(!e)return(0,f.default)("Current password is required")}function l(e){if(e&&e.length<8)return(0,f.default)("Password must be at least 8 characters")}function u(e,t){if(e!==t.password.value)return(0,f.default)("Passwords must match");
}var d=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.isUsernameRequired=r,t.isEmailRequired=a,t.isPasswordRequired=i,t.isConfirmRequired=s,t.isCurrentPasswordRequired=o,t.password=l,t.confirmPassword=u;var c=n(5),f=d(c)},function(e,t,n){"use strict";function r(){var e=arguments.length<=0||void 0===arguments[0]?40:arguments[0],t=arguments.length<=1||void 0===arguments[1]?10:arguments[1],n=(0,s.default)({direction:i.VERTICAL,columns:1,overscan:t,getCellWidth:function(e){return e.innerViewportWidth;
},getCellHeight:function(){return e}});return n}var a=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(425),s=a(i);e.exports=t.default},function(e,t,n){"use strict";function r(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],r=arguments.length<=3||void 0===arguments[3]?0:arguments[3],i=e+t+n+r;if(v.hasOwnProperty(i))return v[i];var l=(0,d.getAspectRatio)(e,t),c=parseInt(u.default.posterTitleHeight,10),p=parseInt(u.default.posterTitlePadding,10),g="mixed"===e?r+3:r,m=g*c+p,y=l>1?180:120,b=2,P=11,w=(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)(a({},e,{minCellWidth:y,minColumns:b,maxColumns:P,columnAdjustment:n,aspectRatio:l}))},getCellHeight:function(e){return(0,h.default)(a({},e,{aspectRatio:l,titleHeight:m}))}});return w.cellOptions={minCellWidth:y,minColumns:b,maxColumns:P,columnAdjustment:n,aspectRatio:l,titleHeight:m
},v[i]=w,w}var a=n(11).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(425),o=i(s),l=n(188),u=i(l),d=n(187),c=n(780),f=i(c),p=n(779),h=i(p),v={};e.exports=t.default},function(e,t,n){"use strict";function r(e){function t(e){w=e.viewportHeight;var t=e.viewportWidth-2*v;S=t/l;var n=c.reduce(function(e,t){return e+t.height},0);return{height:n*S,width:t}}function n(e){(0,u.default)(void 0!==w,"`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*S)+m,cellY:Math.round(t.top*S)+m,cellWidth:Math.round(n.width*S)-2*m,cellHeight:Math.round(t.height*S)-2*m}}function r(e){if(e<0)return y[0];var t=o.default.find(y,function(t){var n=t.bottom;return e<(n+1)*S});return t||o.default.last(y)}function i(e,t,n,a){void 0===e&&(e=0),(0,u.default)(void 0!==w,"`getListStyle` must be called before `getRangesForPosition`");var i=e+w-1,s=e-w,o=i+w,l=r(s).first,d=r(o).last,c=r(e).first,f=r(i).last,p=c,h=f;
return{renderStartIndex:l,renderEndIndex:d,visibleStartIndex:c,visibleEndIndex:f,partiallyVisibleStartIndex:p,partiallyVisibleEndIndex:h}}var s=e.columns,l=void 0===s?1:s,d=e.rows,c=void 0===d?[]:d,f=e.offset,p=void 0===f?0:f,h=e.margin,v=void 0===h?0:h,g=e.cellMargin,m=void 0===g?0:g,y=[],b=0,P=p;c.forEach(function(e){var t=b;b+=e.height;var n=b-1,r=P;P+=e.widths.length;var i=P-1,s=[],o=0;e.widths.forEach(function(e,t){var n=o;o+=e,s.push({width:e,left:n,cellIndex:r+t})}),y.push(a({},e,{top:t,bottom:n,
first:r,last:i,cellLayouts:s}))});var w=void 0,S=void 0;return{getListStyle:t,getPositionForIndex:n,getRangesForPosition:i}}var a=n(11).default,i=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(3),o=i(s),l=n(41),u=i(l);e.exports=t.default},function(e,t){"use strict";function n(e){return Math.abs(e.actual-e.desired)/e.actual}function r(e){if(0===e.cells.length)return 1/0;var t=e.cells.reduce(function(e,t){return e+n(t)},0),r=t/e.cells.length,a=Math.abs(e.scale-1);return r+a;
}function a(e,t){var n=e.cells,r=n.reduce(function(e,t){return e+t.desired},0),a=t/r;return{scale:a,cells:n.map(function(e){var t=e.desired;return{desired:t,actual:t*a}})}}function i(e){var t=e.aspectRatios,n=e.columns,i=void 0===n?4:n,s=e.minAspectRatio,o=void 0===s?.4:s,l=e.maxAspectRatio,u=void 0===l?5:l,d=t.map(function(e){return Math.max(o,Math.min(u,e))}),c=[],f={scale:null,cells:[]};d.forEach(function(e){var t={desired:e},n={scale:0,cells:f.cells.slice(0)};n.cells.push(t),n=a(n,i),r(n)<=r(f)?f=n:(c.push(f),
f=a({scale:0,cells:[t]},i))});var p=1/Math.max(1,f.scale);return f.scale=Math.min(1,f.scale),f.cells=f.cells.map(function(e){var t=e.desired,n=e.actual;return{desired:t,actual:n*p}}),c.push(f),c.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=i,e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="calendar";t.CALENDAR=n;var r="agenda";t.AGENDA=r;
var a=[n,r];t.all=a},function(e,t,n){"use strict";function r(e,t){return _.default.every(t,function(t){return t[e]})}function a(e,t){return _.default.some(t,function(t){return t[e]})}function i(e){var t=e.activeSelectionItems;return t.map(function(e){return e.model.type})}function s(e,t){return r("showPlay",t)}function o(e,t){return r("showPlay",t)}function l(e,t){return r("showAddToPlaylist",t)}function u(e,t){return a("showMarkWatched",t)}function d(e,t){return a("showMarkUnwatched",t)}function c(e,t){
var n=i(e);return!(_.default.uniq(n).length>1)&&r("showEdit",t)}function f(e,t){return r("showRefresh",t)}function p(e,t){return r("showAnalyze",t)}function h(e,t){var n=i(e);return 1!==n.length&&(!(_.default.uniq(n).length>1)&&_.default.every(n,function(e){return k.indexOf(e)!==-1}))}function v(e,t){return r("showSync",t)}function g(e,t){return r("showOptimize",t)}function m(e,t){return r("showDelete",t)}function y(e){var t=e.activeSelectionItems;return t.map(function(t){return(0,C.default)(P({},e,t.model));
})}function b(e){var t=e.activeSelectionType,n=E[t],r=y(e);(0,I.default)(_.default.isArray(n),"getMultiSelectActionProps: Invalid type, "+t+", provided");var a=n.reduce(function(n,a){var i=x[a];return(0,I.default)(_.default.isFunction(i),"getMultiSelectActionProps: Invalid action, "+a+", for "+t),_.default.has(e,a)?n[a]=e[a]:n[a]=i(e,r),n},{});return a}var P=n(11).default,w=n(1).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var S=n(3),_=w(S),T=n(41),I=w(T),M=n(487),C=w(M),x={
showPlaySelected:s,showShuffle:o,showAddToPlaylist:l,showMarkWatched:u,showMarkUnwatched:d,showEdit:c,showRefresh:f,showAnalyze:p,showMerge:h,showSync:v,showOptimize:g,showDelete:m},E={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"]},k=["movie","season","artist","album"];e.exports=t.default},function(e,t){"use strict";function n(e,t){if(!e||null==t)return!1;if(e===a&&r.hasOwnProperty(t))return r[t];e!==a&&(a=e,r={});var n=e.indexOf(t)!==-1;return r[t]=n,n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r={},a=void 0;e.exports=t.default},function(e,t){"use strict";e.exports={defaultColor:"#fff",
primaryColor:"#cc7b19",selectedColor:"#f9be03",successColor:"#6b5",dangerColor:"#f53",warningColor:"#f0ad4e",defaultLinkColor:"rgba(255, 255, 255, 0.7)",defaultLinkHoverColor:"#fff",defaultLinkDisabledLinkColor:"rgba(255, 255, 255, 0.3)",defaultBackgroundColor:"rgba(255, 255, 255, 0.25)",defaultHoverBackgroundColor:"rgba(255, 255, 255, 0.3)",defaultActiveBackgroundColor:"rgba(255, 255, 255, 0.2)",defaultDisabledBackgroundColor:"rgba(255, 255, 255, 0.15)",primaryBackgroundColor:"#cc7b19",primaryHoverBackgroundColor:"color(#cc7b19 lightness(+5%))",
primaryActiveBackgroundColor:"color(#cc7b19 blackness(+10%))",primaryDisabledBackgroundColor:"color(#cc7b19 blackness(+30%))",quietBackgroundColor:"rgba(255, 255, 255, 0.08)",quietHoverBackgroundColor:"rgba(255, 255, 255, 0.1)",quietActiveBackgroundColor:"rgba(255, 255, 255, 0.06)",successBackgroundColor:"#3d7832",successHoverBackgroundColor:"color(#3d7832 lightness(+5%))",successActiveBackgroundColor:"color(#3d7832 blackness(+10%))",successDisabledBackgroundColor:"color(#3d7832 blackness(+30%))",
dangerBackgroundColor:"#b32",dangerHoverBackgroundColor:"color(#b32 lightness(+5%))",dangerActiveBackgroundColor:"color(#b32 blackness(+10%))",dangerDisabledBackgroundColor:"color(#b32 blackness(+30%))",headerColor:"rgba(255, 255, 255, 0.3)",dimColor:"rgba(255, 255, 255, 0.45)",shadowColor:"rgba(0, 0, 0, 0.35)",errorBackgroundColor:"rgba(255, 85, 51, 0.3)",inputBackgroundColor:"rgba(255, 255, 255, 0.25)",inputFocusBackgroundColor:"#eee",inputColor:"#eee",inputFocusColor:"#555",inputDisabledOpacity:"0.5",
stripeListAlternateBackgroundColor:"rgba(255, 255, 255, 0.02)",stripeListHoverBackgroundColor:"rgba(255, 255, 255, 0.06)",stripeListSelectedBackgroundColor:"rgba(0, 0, 0, 0.15)",dragPreviewBackgroundColor:"rgba(76, 76, 76, 0.7)",dragPreviewOpacity:"0.9",searchInputBackgroundColor:"rgba(255, 255, 255, 0.25)",searchBackgroundColor:"#3a3a3a",searchFocusBackgroundColor:"#eee",searchInputColor:"#eee",searchInputFocusColor:"#555",searchImagePlaceholderBackgroundColor:"rgba(255, 255, 255, 0.15)",searchImagePlaceholderColor:"rgba(0, 0, 0, 0.45)",
searchHoverResultBackgroundColor:"rgba(0, 0, 0, 0.15)",searchSelectedResultBackgroundColor:"rgba(0, 0, 0, 0.30)",searchResultTitleColor:"rgba(255, 255, 255, 0.75)",searchResultTitleSelectedColor:"rgba(255, 255, 255, 1)",searchResultSecondaryTitleColor:"rgba(255, 255, 255, 0.3)",searchResultShadowColor:"rgba(0, 0, 0, 0.3)",scrollbarBackgroundColor:"rgba(255, 255, 255, 0.2)",scrollbarHoverBackgroundColor:"rgba(255, 255, 255, 0.3)",scrollbarInactiveBackgroundColor:"rgba(255, 255, 255, 0.05)",menuBackgroundColor:"#333",
menuItemHoverBackgroundColor:"rgba(0, 0, 0, 0.15)",menuItemActiveBackgroundColor:"rgba(0, 0, 0, 0.3)",menuSeparatorBackgroundColor:"rgba(200, 200, 200, 0.15)",modalBackdropBackgroundColor:"rgba(102, 102, 102, 0.6)",modalBackgroundColor:"#2d2d2d",sliderTrackBackgroundColor:"rgba(255, 255, 255, 0.2)",sliderThumbBackgroundColor:"#ddd",sliderThumbHoverBackgroundColor:"#fff",avatarBackgroundColor:"#999",tooltipBackgroundColor:"#333",badgeBackgroundColor:"rgba(100, 100, 100, 0.15)",sidebarBackgroundColor:"rgba(0, 0, 0, 0.15)",
sidebarMenuButtonBackgroundColor:"rgba(0, 0, 0, 0.3)",sidebarMenuButtonHoverBackgroundColor:"rgba(0, 0, 0, 0.5)",sidebarMenuButtonActiveBackgroundColor:"rgba(0, 0, 0, 0.75)",detailsBackgroundColor:"rgba(0, 0, 0, 0.15)",detailsShadowColor:"#000",posterBackgroundColor:"#333",posterHoverBackgroundColor:"linear-gradient(to bottom, rgba(34, 34, 34, 0), rgba(34, 34, 34, 0.6), #222)",posterSelectedBackgroundColor:"rgba(34, 34, 34, 0.6)",posterBlendedSelectedBackgroundColor:"#282828",posterPlaceholderIconColor:"rgba(0, 0, 0, 0.45)",
posterCenterCircleBackgroundColor:"rgba(0, 0, 0, 0.45)",posterBadgeShadowColor:"rgba(0, 0, 0, 0.6)",posterProgressTrackBackgroundColor:"rgba(0, 0, 0, 0.75)",posterVersionBadgeColor:"#556688",recordColor:"#f53",recordBackgroundColor:"#b32",recordActiveBackgroundColor:"color(#b32 blackness(+10%))",dayOfWeekBackgroundColor:"rgba(255, 255, 255, 0.1)",dayOfWeekColor:"rgba(255, 255, 255, 0.75)",todayBackgroundColor:"rgba(255, 255, 255, 0.3)",todayColor:"rgba(255, 255, 255, 0.1)",calendarEventSuccessBackgroundColor:"rgba(0, 102, 153, 0.15)",
calendarEventSuccessAlternateBackgroundColor:"rgba(31, 120, 165, 0.17)",calendarEventSuccessHoverBackgroundColor:"rgba(76, 148, 183, 0.20)",calendarEventErrorBackgroundColor:"rgba(187, 51, 34, 0.3)",calendarEventErrorAlternateBackgroundColor:"rgba(191, 64, 48, 0.31)",calendarEventErrorHoverBackgroundColor:"rgba(199, 87, 73, 0.34)",recordingIconColor:"#ff5533",playColor:"rgba(255, 255, 255, 0.75)"}},function(e,t){"use strict";e.exports={defaultFontFamily:'"Open Sans Semibold", "Helvetica Neue", Helvetica, Arial, sans-serif',
boldFontFamily:'"Open Sans Bold", "Helvetica Neue", Helvetica, Arial, sans-serif',smallFontSize:"12px",defaultFontSize:"13px",defaultIconFontSize:"14px",largeFontSize:"15px",lineHeightComputed:"1.71428571"}},function(e,t,n){e.exports={"default":n(1955),__esModule:!0}},function(e,t,n){e.exports={"default":n(1956),__esModule:!0}},function(e,t,n){e.exports={"default":n(1957),__esModule:!0}},,,,function(e,t,n){e.exports={"default":n(1964),__esModule:!0}},function(e,t,n){e.exports={"default":n(1966),__esModule:!0
}},function(e,t,n){e.exports={"default":n(1967),__esModule:!0}},function(e,t,n){"use strict";var r=n(279).default;t.default=function(e){for(var t={},n=0;n<e.length;n++){var a=e[n],i=a.decorators,s=a.key;if(delete a.key,delete a.decorators,a.enumerable=!0,a.configurable=!0,("value"in a||a.initializer)&&(a.writable=!0),i)for(var o=0;o<i.length;o++){var l=i[o];if("function"!=typeof l)throw new TypeError("The decorator for method "+a.key+" is of the invalid type "+typeof l);a=l(t,s,a)||a}a.initializer&&(a.value=a.initializer.call(t)),
r(t,s,a)}return t},t.__esModule=!0},function(e,t,n){"use strict";var r=n(787).default;t.default=function(e){return Array.isArray(e)?e:r(e)},t.__esModule=!0},function(e,t,n){n(499),n(1985),e.exports=n(106).Array.from},function(e,t,n){n(801),n(499),e.exports=n(1983)},function(e,t,n){n(801),n(499),e.exports=n(1984)},function(e,t,n){n(1987),e.exports=n(106).Number.isInteger},,,,function(e,t,n){var r=n(87);e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(87);e.exports=function(e,t,n){
return r.setDesc(e,t,n)}},function(e,t,n){var r=n(87);n(1991),e.exports=function(e,t){return r.getDesc(e,t)}},function(e,t,n){var r=n(87);n(1992),e.exports=function(e){return r.getNames(e)}},,function(e,t,n){n(1994),e.exports=n(106).Object.setPrototypeOf},function(e,t,n){n(1996),n(1995),e.exports=n(106).Symbol},,function(e,t){e.exports=function(){}},function(e,t,n){var r=n(87);e.exports=function(e){var t=r.getKeys(e),n=r.getSymbols;if(n)for(var a,i=n(e),s=r.isEnum,o=0;i.length>o;)s.call(e,a=i[o++])&&t.push(a);
return t}},function(e,t,n){var r=n(225),a=n(128)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[a]===e)}},function(e,t,n){var r=n(489);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(494),a=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&a(e)===e}},function(e,t,n){var r=n(346);e.exports=function(e,t,n,a){try{return a?t(r(n)[0],n[1]):t(n)}catch(i){var s=e.return;throw void 0!==s&&r(s.call(e)),i}}},function(e,t,n){
"use strict";var r=n(87),a=n(496),i=n(497),s={};n(493)(s,n(128)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r.create(s,{next:a(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(128)("iterator"),a=!1;try{var i=[7][r]();i.return=function(){a=!0},Array.from(i,function(){throw 2})}catch(s){}e.exports=function(e,t){if(!t&&!a)return!1;var n=!1;try{var i=[7],s=i[r]();s.next=function(){return{done:n=!0}},i[r]=function(){return s},e(i)}catch(o){}return n}},function(e,t){e.exports=function(e,t){
return{value:t,done:!!e}}},function(e,t,n){var r=n(87),a=n(280);e.exports=function(e,t){for(var n,i=a(e),s=r.getKeys(i),o=s.length,l=0;o>l;)if(i[n=s[l++]]===t)return n}},,function(e,t,n){var r=n(87).getDesc,a=n(494),i=n(346),s=function(e,t){if(i(e),!a(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,a){try{a=n(490)(Function.call,r(Object.prototype,"__proto__").set,2),a(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,n){
return s(e,n),t?e.__proto__=n:a(e,n),e}}({},!1):void 0),check:s}},function(e,t,n){var r=n(798),a=n(491);e.exports=function(e){return function(t,n){var i,s,o=String(a(t)),l=r(n),u=o.length;return l<0||l>=u?e?"":void 0:(i=o.charCodeAt(l),i<55296||i>56319||l+1===u||(s=o.charCodeAt(l+1))<56320||s>57343?e?o.charAt(l):i:e?o.slice(l,l+2):(i-55296<<10)+(s-56320)+65536)}}},function(e,t,n){var r=n(798),a=Math.min;e.exports=function(e){return e>0?a(r(e),9007199254740991):0}},function(e,t,n){var r=n(346),a=n(800);
e.exports=n(106).getIterator=function(e){var t=a(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){var r=n(790),a=n(128)("iterator"),i=n(225);e.exports=n(106).isIterable=function(e){var t=Object(e);return void 0!==t[a]||"@@iterator"in t||i.hasOwnProperty(r(t))}},function(e,t,n){"use strict";var r=n(490),a=n(127),i=n(498),s=n(1974),o=n(1971),l=n(1982),u=n(800);a(a.S+a.F*!n(1976)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,a,d,c=i(e),f="function"==typeof this?this:Array,p=arguments,h=p.length,v=h>1?p[1]:void 0,g=void 0!==v,m=0,y=u(c);
if(g&&(v=r(v,h>2?p[2]:void 0,2)),void 0==y||f==Array&&o(y))for(t=l(c.length),n=new f(t);t>m;m++)n[m]=g?v(c[m],m):c[m];else for(d=y.call(c),n=new f;!(a=d.next()).done;m++)n[m]=g?s(d,v,[a.value,m],!0):a.value;return n.length=m,n}})},function(e,t,n){"use strict";var r=n(1969),a=n(1977),i=n(225),s=n(280);e.exports=n(794)(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,a(1)):"keys"==t?a(0,n):"values"==t?a(0,e[n]):a(0,[n,e[n]]);
},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var r=n(127);r(r.S,"Number",{isInteger:n(1973)})},,,,function(e,t,n){var r=n(280);n(495)("getOwnPropertyDescriptor",function(e){return function(t,n){return e(r(t),n)}})},function(e,t,n){n(495)("getOwnPropertyNames",function(){return n(792).get})},,function(e,t,n){var r=n(127);r(r.S,"Object",{setPrototypeOf:n(1980).set})},function(e,t){},function(e,t,n){"use strict";var r=n(87),a=n(348),i=n(492),s=n(791),o=n(127),l=n(796),u=n(347),d=n(797),c=n(497),f=n(799),p=n(128),h=n(1978),v=n(792),g=n(1970),m=n(1972),y=n(346),b=n(280),P=n(496),w=r.getDesc,S=r.setDesc,_=r.create,T=v.get,I=a.Symbol,M=a.JSON,C=M&&M.stringify,x=!1,E=p("_hidden"),k=r.isEnum,D=d("symbol-registry"),A=d("symbols"),O="function"==typeof I,R=Object.prototype,L=s&&u(function(){
return 7!=_(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=w(R,t);r&&delete R[t],S(e,t,n),r&&e!==R&&S(R,t,r)}:S,N=function(e){var t=A[e]=_(I.prototype);return t._k=e,s&&x&&L(R,e,{configurable:!0,set:function(t){i(this,E)&&i(this[E],e)&&(this[E][e]=!1),L(this,e,P(1,t))}}),t},j=function(e){return"symbol"==typeof e},U=function(e,t,n){return n&&i(A,t)?(n.enumerable?(i(e,E)&&e[E][t]&&(e[E][t]=!1),n=_(n,{enumerable:P(0,!1)})):(i(e,E)||S(e,E,P(1,{})),e[E][t]=!0),L(e,t,n)):S(e,t,n);
},$=function(e,t){y(e);for(var n,r=g(t=b(t)),a=0,i=r.length;i>a;)U(e,n=r[a++],t[n]);return e},z=function(e,t){return void 0===t?_(e):$(_(e),t)},F=function(e){var t=k.call(this,e);return!(t||!i(this,e)||!i(A,e)||i(this,E)&&this[E][e])||t},B=function(e,t){var n=w(e=b(e),t);return!n||!i(A,t)||i(e,E)&&e[E][t]||(n.enumerable=!0),n},V=function(e){for(var t,n=T(b(e)),r=[],a=0;n.length>a;)i(A,t=n[a++])||t==E||r.push(t);return r},H=function(e){for(var t,n=T(b(e)),r=[],a=0;n.length>a;)i(A,t=n[a++])&&r.push(A[t]);
return r},q=function(e){if(void 0!==e&&!j(e)){for(var t,n,r=[e],a=1,i=arguments;i.length>a;)r.push(i[a++]);return t=r[1],"function"==typeof t&&(n=t),!n&&m(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!j(t))return t}),r[1]=t,C.apply(M,r)}},W=u(function(){var e=I();return"[null]"!=C([e])||"{}"!=C({a:e})||"{}"!=C(Object(e))});O||(I=function(){if(j(this))throw TypeError("Symbol is not a constructor");return N(f(arguments.length>0?arguments[0]:void 0))},l(I.prototype,"toString",function(){return this._k;
}),j=function(e){return e instanceof I},r.create=z,r.isEnum=F,r.getDesc=B,r.setDesc=U,r.setDescs=$,r.getNames=v.get=V,r.getSymbols=H,s&&!n(795)&&l(R,"propertyIsEnumerable",F,!0));var G={"for":function(e){return i(D,e+="")?D[e]:D[e]=I(e)},keyFor:function(e){return h(D,e)},useSetter:function(){x=!0},useSimple:function(){x=!1}};r.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(e){var t=p(e);G[e]=O?t:N(t)}),
x=!0,o(o.G+o.W,{Symbol:I}),o(o.S,"Symbol",G),o(o.S+o.F*!O,"Object",{create:z,defineProperty:U,defineProperties:$,getOwnPropertyDescriptor:B,getOwnPropertyNames:V,getOwnPropertySymbols:H}),M&&o(o.S+o.F*(!O||W),"JSON",{stringify:q}),c(I,"Symbol"),c(Math,"Math",!0),c(a.JSON,"JSON",!0)},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{"default":e}},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};t.__esModule=!0;
var i=n(508),s=r(i),o=function(){function e(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];a(this,e),Array.isArray(n[0])&&1===n.length&&(n=n[0]);for(var i=0;i<n.length;i++)if(!s.default(n[i]))throw new Error("Expected a disposable");this.disposables=n,this.isDisposed=!1}return e.prototype.add=function(e){this.isDisposed?e.dispose():this.disposables.push(e)},e.prototype.remove=function(e){if(this.isDisposed)return!1;var t=this.disposables.indexOf(e);return t!==-1&&(this.disposables.splice(t,1),
e.dispose(),!0)},e.prototype.dispose=function(){if(!this.isDisposed){for(var e=this.disposables.length,t=new Array(e),n=0;n<e;n++)t[n]=this.disposables[n];this.isDisposed=!0,this.disposables=[],this.length=0;for(var n=0;n<e;n++)t[n].dispose()}},e}();t.default=o,e.exports=t.default},function(e,t){"use strict";var n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=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),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.__esModule=!0;var a=function(){},i=function(){function e(t){n(this,e),this.isDisposed=!1,this.action=t||a}return e.prototype.dispose=function(){this.isDisposed||(this.action.call(null),this.isDisposed=!0)},r(e,null,[{key:"empty",enumerable:!0,value:{dispose:a}}]),e}();t.default=i,e.exports=t.default},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{
"default":e}},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};t.__esModule=!0;var i=n(508),s=r(i),o=function(){function e(){a(this,e),this.isDisposed=!1,this.current=null}return e.prototype.getDisposable=function(){return this.current},e.prototype.setDisposable=function(){var e=void 0===arguments[0]?null:arguments[0];if(null!=e&&!s.default(e))throw new Error("Expected either an empty value or a valid disposable");var t=this.isDisposed,n=void 0;t||(n=this.current,
this.current=e),n&&n.dispose(),t&&e&&e.dispose()},e.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var e=this.current;this.current=null,e&&e.dispose()}},e}();t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{"default":e}};t.__esModule=!0;var a=n(508),i=r(a);t.isDisposable=i.default;var s=n(2021),o=r(s);t.Disposable=o.default;var l=n(2020),u=r(l);t.CompositeDisposable=u.default;var d=n(2022),c=r(d);t.SerialDisposable=c.default;
},function(e,t,n){"use strict";function r(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}function a(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var s=n(542),o=a(s),l=n(2031),u=a(l),d=n(354),c=r(d),f=n(2025),p=a(f),h=n(811),v=(a(h),function(){function e(t){i(this,e);var n=o.default(u.default);this.store=n,
this.monitor=new p.default(n),this.registry=this.monitor.registry,this.backend=t(this),n.subscribe(this.handleRefCountChange.bind(this))}return e.prototype.handleRefCountChange=function(){var e=this.store.getState().refCount>0;e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1)},e.prototype.getMonitor=function(){return this.monitor},e.prototype.getBackend=function(){return this.backend},e.prototype.getRegistry=function(){return this.registry;
},e.prototype.getActions=function(){function e(e){return function(){var r=e.apply(t,arguments);"undefined"!=typeof r&&n(r)}}var t=this,n=this.store.dispatch;return Object.keys(c).filter(function(e){return"function"==typeof c[e]}).reduce(function(t,n){return t[n]=e(c[n]),t},{})},e}());t.default=v,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;
var i=n(88),s=r(i),o=n(814),l=r(o),u=n(189),d=r(u),c=n(811),f=r(c),p=n(813),h=n(812),v=function(){function e(t){a(this,e),this.store=t,this.registry=new f.default(t)}return e.prototype.subscribeToStateChange=function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=n.handlerIds;s.default("function"==typeof e,"listener must be a function."),s.default("undefined"==typeof r||d.default(r),"handlerIds, when specified, must be an array of strings.");var a=this.store.getState().stateId,i=function(){
var n=t.store.getState(),i=n.stateId;try{var s=i===a||i===a+1&&!h.areDirty(n.dirtyHandlerIds,r);s||e()}finally{a=i}};return this.store.subscribe(i)},e.prototype.subscribeToOffsetChange=function(e){var t=this;s.default("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset,r=function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())};return this.store.subscribe(r)},e.prototype.canDragSource=function(e){var t=this.registry.getSource(e);return s.default(t,"Expected to find a valid source."),
!this.isDragging()&&t.canDrag(this,e)},e.prototype.canDropOnTarget=function(e){var t=this.registry.getTarget(e);if(s.default(t,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var n=this.registry.getTargetType(e),r=this.getItemType();return l.default(n,r)&&t.canDrop(this,e)},e.prototype.isDragging=function(){return Boolean(this.getItemType())},e.prototype.isDraggingSource=function(e){var t=this.registry.getSource(e,!0);if(s.default(t,"Expected to find a valid source."),
!this.isDragging()||!this.isSourcePublic())return!1;var n=this.registry.getSourceType(e),r=this.getItemType();return n===r&&t.isDragging(this,e)},e.prototype.isOverTarget=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.shallow,r=void 0!==n&&n;if(!this.isDragging())return!1;var a=this.registry.getTargetType(e),i=this.getItemType();if(!l.default(a,i))return!1;var s=this.getTargetIds();if(!s.length)return!1;var o=s.indexOf(e);return r?o===s.length-1:o>-1},e.prototype.getItemType=function(){
return this.store.getState().dragOperation.itemType},e.prototype.getItem=function(){return this.store.getState().dragOperation.item},e.prototype.getSourceId=function(){return this.store.getState().dragOperation.sourceId},e.prototype.getTargetIds=function(){return this.store.getState().dragOperation.targetIds},e.prototype.getDropResult=function(){return this.store.getState().dragOperation.dropResult},e.prototype.didDrop=function(){return this.store.getState().dragOperation.didDrop},e.prototype.isSourcePublic=function(){
return this.store.getState().dragOperation.isSourcePublic},e.prototype.getInitialClientOffset=function(){return this.store.getState().dragOffset.initialClientOffset},e.prototype.getInitialSourceClientOffset=function(){return this.store.getState().dragOffset.initialSourceClientOffset},e.prototype.getClientOffset=function(){return this.store.getState().dragOffset.clientOffset},e.prototype.getSourceClientOffset=function(){return p.getSourceClientOffset(this.store.getState().dragOffset)},e.prototype.getDifferenceFromInitialOffset=function(){
return p.getDifferenceFromInitialOffset(this.store.getState().dragOffset)},e}();t.default=v,e.exports=t.default},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(){n(this,e)}return e.prototype.canDrag=function(){return!0},e.prototype.isDragging=function(e,t){return t===e.getSourceId()},e.prototype.endDrag=function(){},e}();t.default=r,e.exports=t.default},function(e,t){"use strict";function n(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(){n(this,e)}return e.prototype.canDrop=function(){return!0},e.prototype.hover=function(){},e.prototype.drop=function(){},e}();t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return new l(e)}t.__esModule=!0,
t.default=i;var s=n(837),o=r(s),l=function(){function e(t){a(this,e),this.actions=t.getActions()}return e.prototype.setup=function(){this.didCallSetup=!0},e.prototype.teardown=function(){this.didCallTeardown=!0},e.prototype.connectDragSource=function(){return o.default},e.prototype.connectDragPreview=function(){return o.default},e.prototype.connectDropTarget=function(){return o.default},e.prototype.simulateBeginDrag=function(e,t){this.actions.beginDrag(e,t)},e.prototype.simulatePublishDragSource=function(){
this.actions.publishDragSource()},e.prototype.simulateHover=function(e,t){this.actions.hover(e,t)},e.prototype.simulateDrop=function(){this.actions.drop()},e.prototype.simulateEndDrag=function(){this.actions.endDrag()},e}();e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var a=n(2024);t.DragDropManager=r(a);var i=n(2026);t.DragSource=r(i);var s=n(2027);t.DropTarget=r(s);var o=n(2028);t.createTestBackend=r(o)},function(e,t,n){"use strict";
function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){switch(void 0===e&&(e=d),t.type){case s.BEGIN_DRAG:return i({},e,{itemType:t.itemType,item:t.item,sourceId:t.sourceId,isSourcePublic:t.isSourcePublic,dropResult:null,didDrop:!1});case s.PUBLISH_DRAG_SOURCE:return i({},e,{isSourcePublic:!0});case s.HOVER:return i({},e,{targetIds:t.targetIds});case o.REMOVE_TARGET:return e.targetIds.indexOf(t.targetId)===-1?e:i({},e,{targetIds:u.default(e.targetIds,t.targetId)});case s.DROP:return i({},e,{
dropResult:t.dropResult,didDrop:!0,targetIds:[]});case s.END_DRAG:return i({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=a;var s=n(354),o=n(355),l=n(838),u=r(l),d={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,
didDrop:!1,isSourcePublic:null};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(813),i=r(a),s=n(2030),o=r(s),l=n(2032),u=r(l),d=n(812),c=r(d),f=n(2033),p=r(f);t.default=function(e,t){return void 0===e&&(e={}),{dirtyHandlerIds:c.default(e.dirtyHandlerIds,t,e.dragOperation),dragOffset:i.default(e.dragOffset,t),refCount:u.default(e.refCount,t),dragOperation:o.default(e.dragOperation,t),stateId:p.default(e.stateId)}},e.exports=t.default;
},function(e,t,n){"use strict";function r(e,t){switch(void 0===e&&(e=0),t.type){case a.ADD_SOURCE:case a.ADD_TARGET:return e+1;case a.REMOVE_SOURCE:case a.REMOVE_TARGET:return e-1;default:return e}}t.__esModule=!0,t.default=r;var a=n(355);e.exports=t.default},function(e,t){"use strict";function n(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0];return e+1}t.__esModule=!0,t.default=n,e.exports=t.default},function(e,t){"use strict";function n(){return r++}t.__esModule=!0,t.default=n;
var r=0;e.exports=t.default},function(e,t,n){"use strict";var r=n(510),a=n(822).default,i=n(511).default,s=n(512),o=n(2537),l=function(){var e=new r.HandlebarsEnvironment;return s.extend(e,r),e.SafeString=a,e.Exception=i,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){function n(e){for(var t=e.length,n=new Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n}function r(e){for(var t="",n=0;n<e.length;n++)t+=SHA256_hexchars[e[n]>>4]+SHA256_hexchars[15&e[n]];
return t}function a(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}function i(){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 i(),s(e),t=o(),r(t)}function u(e){"string"==typeof e?HMAC_SHA256_key=n(e):HMAC_SHA256_key=(new Array).concat(e),HMAC_SHA256_key.length>64&&(i(),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;i(),s(HMAC_SHA256_key)}function d(e){s(e)}function c(){for(var e=o(),t=0;t<64;t++)HMAC_SHA256_key[t]^=106;i(),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 f(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 h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function v(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function g(e,t,n){return n^e&(t^n)}function m(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]+f(t[n-15])+t[n-16]&4294967295;for(var r=(new Array).concat(e),n=0;n<64;n++){
var a=r[7]+v(r[4])+g(r[4],r[5],r[6])+SHA256_K[n]+t[n],i=h(r[0])+m(r[0],r[1],r[2]);r.pop(),r.unshift(a+i&4294967295),r[4]=r[4]+a&4294967295}for(var n=0;n<8;n++)e[n]=e[n]+r[n]&4294967295}function b(e,t){for(var n=new Array(16),r=0;r<16;r++)n[r]=t[4*r+0]<<24|t[4*r+1]<<16|t[4*r+2]<<8|t[4*r+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=a,t.SHA256_hash=l,t.HMAC_SHA256_init=u,t.HMAC_SHA256_write=d,t.HMAC_SHA256_finalize=c},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 r(e){return"function"==typeof e}function a(e){return void 0!=e&&-1<(e.constructor+"")[H]("String")}function i(){return N.round(2147483647*N.random())}function s(e){var t=_e[Y]("img");return t.width=1,t.height=1,t.src=e,t}function o(){}function l(e){return O instanceof Function?O(e):(n(28),
e)}function u(e){return l(e)[F](/\(/g,"%28")[F](/\)/g,"%29")}function d(e,t){if(e){var n=_e[Y]("script");n.type="text/javascript",n.async=!0,n.src=e,n.id=t;var r=_e.getElementsByTagName("script")[0];r[ve].insertBefore(n,r)}}function c(){var e=""+_e[re][ae];return 0==e[H]("www.")?e[ce](4):e}function f(e){var t=_e.referrer;if(/^https?:\/\//i.test(t)){if(e)return t;e="//"+_e[re][ae];var n=t[H](e);if((5==n||6==n)&&(e=t.charAt(n+e[J]),"/"==e||"?"==e||""==e||":"==e))return;return t}}function p(e,t){if(1==t[J]&&null!=t[0]&&"object"==typeof t[0])return t[0];
for(var n={},r=N.min(e[J]+1,t[J]),a=0;a<r;a++){if("object"==typeof t[a]){for(var i in t[a])t[a].hasOwnProperty(i)&&(n[i]=t[a][i]);break}a<e[J]&&(n[e[a]]=t[a])}return n}function h(e){if(100!=e.get(vn)&&A(Fe(e,rn))%1e4>=100*Be(e,vn))throw"abort"}function v(e){if(Te(Fe(e,an)))throw"abort"}function g(){var e=_e[re][le];if("http:"!=e&&"https:"!=e)throw"abort"}function m(e){e.set(ot,Be(e,ot)+1);var t=[];$e.map(function(n,r){if(r.p){var a=e.get(n);void 0!=a&&a!=r[W]&&("boolean"==typeof a&&(a*=1),t[U](r.p+"="+l(""+a)));
}}),t[U]("z="+i()),e.set(st,t[ge]("&"),!0)}function y(e){Oe(Fe(e,st),e.get(it)),e.set(it,o,!0)}function b(e){var t=Se.gaData;t&&(t.expId&&e.set(jt,t.expId),t.expVar&&e.set(Ut,t.expVar))}function P(){if(Se[he]&&"preview"==Se[he].loadPurpose)throw"abort"}function w(e){var t=Be(e,Bt);500<=t&&n(15);var r=Fe(e,at);if("transaction"!=r&&"item"!=r){var r=Be(e,Ht),a=(new Date)[X](),i=Be(e,Vt);if(0==i&&e.set(Vt,a),i=N.round(2*(a-i)/1e3),0<i&&(r=N.min(r+i,20),e.set(Vt,a)),0>=r)throw"abort";e.set(Ht,--r)}e.set(Bt,++t);
}function S(){var e=Xn;_("create",e,e.create,3),_("getByName",e,e.j,5),_("getAll",e,e.K,6),e=Bn[ee],_("get",e,e.get,7),_("set",e,e.set,4),_("send",e,e.send,2),e=Ue[ee],_("get",e,e.get),_("set",e,e.set),(Se.gaplugins=Se.gaplugins||{}).Linker=Rn,e=Rn[ee],Qn.C("linker",Rn),_("decorate",e,e.Q,20),_("autoLink",e,e.S,25),Qn.C("displayfeatures",zn)}function _(e,t,r,a){t[e]=function(){try{return a&&n(a),r[pe](this,arguments)}catch(t){var s=t&&t[K];if(!(1<=100*N.random()||Te("?"))){var o=["t=error","_e=exc","_v=j15","sr=1"];
e&&o[U]("_f="+e),s&&o[U]("_m="+l(s[ce](0,100))),o[U]("aip=1"),o[U]("z="+i()),Oe(o[ge]("&"))}throw t}}}function T(){var e,t,n;if((n=(n=Se[he])?n.plugins:null)&&n[J])for(var r=0;r<n[J]&&!t;r++){var a=n[r];-1<a[K][H]("Shockwave Flash")&&(t=a.description)}if(!t)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),t=e.GetVariable("$version")}catch(i){}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[q](/[\d]+/g))&&3<=e[J]&&(t=e[0]+"."+e[1]+" r"+e[2]),t||void 0}function I(e,t,n){"none"==t&&(t="");var r=[],a=Me(e);e="__utma"==e?6:2;for(var i=0;i<a[J];i++){var s=(""+a[i])[ne](".");s[J]>=e&&r[U]({hash:s[0],R:a[i],O:s})}return 0==r[J]?void 0:1==r[J]?r[0]:M(t,r)||M(n,r)||M(null,r)||r[0]}function M(e,t){var n,r;null==e?n=r=1:(n=A(e),r=A(0==e[H](".")?e[ce](1):"."+e));for(var a=0;a<t[J];a++)if(t[a][$]==n||t[a][$]==r)return t[a];
}function C(e){e=e.get(rn);var t=x(e,0);return"_ga=1."+l(t+"."+e)}function x(e,t){for(var n=new Date,r=Se.screen||{},a=Se[he],i=a.plugins||[],n=[e,a.userAgent,r.width,r.height,n.getTimezoneOffset(),n.getYear(),n.getDate(),n.getHours(),n.getMinutes()+t],r=0;r<i[J];++r)n[U](i[r].description);return A(n[ge]("."))}function E(e,t){if(t==_e[re][ae])return!1;for(var n=0;n<e[J];n++)if(0<=t[H](e[n]))return!0;return!1}function k(){var e=Se.gaGlobal=Se.gaGlobal||{};return e.hid=e.hid||i()}function D(e){function n(e){
var t=(e[ae]||"")[ne](":")[0][me](),n=(e[le]||"")[me](),n=1*e[G]||("http:"==n?80:"https:"==n?443:"");return e=e.pathname||"",0==e[H]("/")||(e="/"+e),[t,""+n,e]}var r=_e[Y]("a");t(r,_e[re][de]);var a=(r[le]||"")[me](),i=n(r),s=r[ie]||"",o=a+"//"+i[0]+(i[1]?":"+i[1]:"");return 0==e[H]("//")?e=a+e:0==e[H]("/")?e=o+e:e&&0!=e[H]("?")?0>e[ne]("/")[0][H](":")&&(e=o+i[2][ce](0,i[2].lastIndexOf("/"))+"/"+e):e=o+i[2]+(e||s),t(r,e),a=n(r),{protocol:(r[le]||"")[me](),host:a[0],port:a[1],path:a[2],G:r[ie]||"",
url:e||""}}function A(e){var t,n=1,r=0;if(e)for(n=0,t=e[J]-1;0<=t;t--)r=e.charCodeAt(t),n=(n<<6&268435455)+r+(r<<14),r=266338304&n,n=0!=r?n^r>>21:n;return n}var O=encodeURIComponent,R=window,L=setTimeout,N=Math,j=RegExp,U="push",$="hash",z="slice",F="replace",B="data",V="cookie",H="indexOf",q="match",W="defaultValue",G="port",Y="createElement",Q="setAttribute",K="name",X="getTime",Z="host",J="length",ee="prototype",te="clientWidth",ne="split",re="location",ae="hostname",ie="search",se="target",oe="call",le="protocol",ue="clientHeight",de="href",ce="substring",fe="action",pe="apply",he="navigator",ve="parentNode",ge="join",me="toLowerCase",ye=new function(){
var e=[];this.set=function(t){e[t]=!0},this.M=function(){for(var t=[],n=0;n<e[J];n++)e[n]&&(t[N.floor(n/6)]=t[N.floor(n/6)]^1<<n%6);for(n=0;n<t[J];n++)t[n]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(t[n]||0);return t[ge]("")+"~"}},be=function(e,t,r,a){try{e.addEventListener?e.addEventListener(t,r,!!a):e.attachEvent&&e.attachEvent("on"+t,r)}catch(i){n(27)}},Pe=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)},we=function(){
this.keys=[],this.w={},this.m={}};we[ee].set=function(e,t,n){this.keys[U](e),n?this.m[":"+e]=t:this.w[":"+e]=t},we[ee].get=function(e){return this.m.hasOwnProperty(":"+e)?this.m[":"+e]:this.w[":"+e]},we[ee].map=function(e){for(var t=0;t<this.keys[J];t++){var n=this.keys[t],r=this.get(n);r&&e(n,r)}};var Se=R,_e=document,Te=function(e){var t=Se._gaUserPrefs;if(t&&t.ioo&&t.ioo()||e&&!0===Se["ga-disable-"+e])return!0;try{var n=Se.external;if(n&&n._gaUserPrefs&&"oo"==n._gaUserPrefs)return!0}catch(r){}
return!1},Ie=function(e){L(e,100)},Me=function(e){var t=[],n=_e[V][ne](";");e=j("^\\s*"+e+"=\\s*(.*?)\\s*$");for(var r=0;r<n[J];r++){var a=n[r][q](e);a&&t[U](a[1])}return t},Ce=function(e,t,r,a,i,s){if(i=!Te(i)&&!(Ee.test(_e[re][ae])||"/"==r&&xe.test(a)),!i)return!1;if(t&&200<t[J]&&(t=t[ce](0,200),n(24)),r=e+"="+t+"; path="+r+"; ",s&&(r+="expires="+new Date((new Date)[X]()+s).toGMTString()+"; "),a&&"none"!=a&&(r+="domain="+a+";"),a=_e[V],_e.cookie=r,!(a=a!=_e[V]))e:{for(e=Me(e),a=0;a<e[J];a++)if(t==e[a]){
a=!0;break e}a=!1}return a},xe=j(/^(www\.)?google(\.com?)?(\.[a-z]{2})?$/),Ee=j(/(^|\.)doubleclick\.net$/i),ke=function(){return(et||"https:"==_e[re][le]?"https:":"http:")+"//www.google-analytics.com"},De=function(t){e(this,"len"),this.message=t+"-8192"},Ae=function(t){e(this,"ff2post"),this.message=t+"-2036"},Oe=function(e,t){if(t=t||o,2036>=e[J])Re(e,t);else{if(!(8192>=e[J]))throw new De(e[J]);var n=t;if(0<=Se[he].userAgent[H]("Firefox")&&![].reduce)throw new Ae(e[J]);Le(e,n)||Ne(e,n)}},Re=function(e,t){
var n=s(ke()+"/collect?"+e);n.onload=n.onerror=function(){n.onload=null,n.onerror=null,t()}},Le=function(e,t){var n,r=Se.XDomainRequest;if(r?(n=new r,n.open("POST",ke()+"/collect")):(r=Se.XMLHttpRequest)&&(r=new r,"withCredentials"in r&&(n=r,n.open("POST",ke()+"/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(_e.body){t=O(t);try{var r=_e[Y]('<iframe name="'+t+'"></iframe>')}catch(a){
r=_e[Y]("iframe"),e(r,t)}r.height="0",r.width="0",r.style.display="none",r.style.visibility="hidden";var i=_e[re],i=ke()+"/analytics_iframe.html#"+O(i[le]+"//"+i[Z]+"/favicon.ico"),s=function(){r.src="",r[ve]&&r[ve].removeChild(r)};be(Se,"beforeunload",s);var o=!1,l=0,u=function(){if(!o){try{if(9<l||r.contentWindow[re][Z]==_e[re][Z])return o=!0,s(),Pe(Se,"beforeunload",s),void n()}catch(e){}l++,L(u,200)}};be(r,"load",u),_e.body.appendChild(r),r.src=i}else Ie(function(){Ne(t,n)})},je=function(){this.t=[];
};je[ee].add=function(e){this.t[U](e)},je[ee].execute=function(e){try{for(var t=0;t<this.t[J];t++){var n=e.get(this.t[t]);n&&r(n)&&n[oe](Se,e)}}catch(a){}t=e.get(it),t!=o&&r(t)&&(e.set(it,o,!0),L(t,10))};var Ue=function(){this.data=new we},$e=new we,ze=[];Ue[ee].get=function(e){var t=We(e),n=this[B].get(e);return t&&void 0==n&&(n=r(t[W])?t[W]():t[W]),t&&t.n?t.n(this,e,n):n};var Fe=function(e,t){var n=e.get(t);return void 0==n?"":""+n},Be=function(e,t){var n=e.get(t);return void 0==n||""===n?0:1*n;
};Ue[ee].set=function(e,t,n){if(e)if("object"==typeof e)for(var r in e)e.hasOwnProperty(r)&&He(this,r,e[r],n);else He(this,e,t,n)};var Ve,He=function(e,t,n,r){var a=We(t);a&&a.o?a.o(e,t,n,r):e[B].set(t,n,r)},qe=function(t,n,r,a,i){e(this,t),this.p=n,this.n=a,this.o=i,this.defaultValue=r},We=function(e){var t=$e.get(e);if(!t)for(var n=0;n<ze[J];n++){var r=ze[n],a=r[0].exec(e);if(a){t=r[1](a),$e.set(t[K],t);break}}return t},Ge=function(e){var t;return $e.map(function(n,r){r.p==e&&(t=r)}),t&&t[K]},Ye=function(e,t,n,r,a){
return e=new qe(e,t,n,r,a),$e.set(e[K],e),e[K]},Qe=function(e,t){ze[U]([j("^"+e+"$"),t])},Ke=function(e,t,n){return Ye(e,t,n,void 0,Xe)},Xe=function(){};if(Ve=a(R.GoogleAnalyticsObject)){var Ze=R.GoogleAnalyticsObject;Ve=Ze?Ze[F](/^[\s\xa0]+|[\s\xa0]+$/g,""):""}var Je=Ve||"ga",et=!1,tt=Ke("apiVersion","v"),nt=Ke("clientVersion","_v");Ye("anonymizeIp","aip");var rt=Ye("adSenseId","a"),at=Ye("hitType","t"),it=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"),dt=Ye("page","dp","");Ye("hostname","dh");var ct=Ye("language","ul"),ft=Ye("encoding","de");Ye("title","dt",function(){return _e.title||void 0}),Qe("contentGroup([0-9]+)",function(e){return new qe(e[0],"cg"+e[1])});var pt=Ye("screenColors","sd"),ht=Ye("screenResolution","sr"),vt=Ye("viewportSize","vp"),gt=Ye("javaEnabled","je"),mt=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"),Pt=Ye("eventLabel","el"),wt=Ye("eventValue","ev"),St=Ye("socialNetwork","sn"),_t=Ye("socialAction","sa"),Tt=Ye("socialTarget","st"),It=Ye("l1","plt"),Mt=Ye("l2","pdt"),Ct=Ye("l3","dns"),xt=Ye("l4","rrt"),Et=Ye("l5","srt"),kt=Ye("l6","tcp"),Dt=Ye("l7","dit"),At=Ye("l8","clt"),Ot=Ye("timingCategory","utc"),Rt=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 jt=Ye("expId","xid"),Ut=Ye("expVar","xvar"),$t=Ye("_utma","_utma"),zt=Ye("_utmz","_utmz"),Ft=Ye("_utmht","_utmht"),Bt=Ye("_hc",void 0,0),Vt=Ye("_ti",void 0,0),Ht=Ye("_to",void 0,20);Qe("dimension([0-9]+)",function(e){return new qe(e[0],"cd"+e[1])}),Qe("metric([0-9]+)",function(e){return new qe(e[0],"cm"+e[1])}),Ye("linkerParam",void 0,void 0,C,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 qt=Ye("joinId","jid");Qe("\\&(.*)",function(e){var t=new qe(e[0],e[1]),n=Ge(e[0][ce](1));return n&&(t.n=function(e){return e.get(n)},t.o=function(e,t,r,a){e.set(n,r,a)},t.p=void 0),t});var Wt=Ke("oot"),Gt=Ye("previewTask"),Yt=Ye("checkProtocolTask"),Qt=Ye("checkStorageTask"),Kt=Ye("historyImportTask"),Xt=Ye("samplerTask"),Zt=Ke("rateLimiterTask"),Jt=Ye("buildHitTask"),en=Ye("sendHitTask"),tn=Ye("ceTask"),nn=Ke("name"),rn=Ke("clientId","cid"),an=Ke("trackingId","tid"),sn=Ke("cookieName",void 0,"_ga"),on=Ke("cookieDomain"),ln=Ke("cookiePath",void 0,"/"),un=Ke("cookieExpires",void 0,63072e3),dn=Ke("legacyCookieDomain"),cn=Ke("legacyHistoryImport",void 0,!0),fn=Ke("storage",void 0,"cookie"),pn=Ke("allowLinker",void 0,!1),hn=Ke("allowAnchor",void 0,!0),vn=Ke("sampleRate","sf",100),gn=Ke("siteSpeedSampleRate",void 0,1),mn=Ke("alwaysSendReferrer",void 0,!1),yn=function(e,t){
var n=N.min(Be(e,gn),100);if(!(A(Fe(e,rn))%100>=n)&&(n={},bn(n)||Pn(n))){var r=n[It];void 0==r||1/0==r||isNaN(r)||(0<r?(wn(n,Ct),wn(n,kt),wn(n,Et),wn(n,Mt),wn(n,xt),wn(n,Dt),wn(n,At),t(n)):be(Se,"load",function(){yn(e,t)},!1))}},bn=function(e){var t=Se.performance||Se.webkitPerformance,t=t&&t.timing;if(!t)return!1;var n=t.navigationStart;return 0!=n&&(e[It]=t.loadEventStart-n,e[Ct]=t.domainLookupEnd-t.domainLookupStart,e[kt]=t.connectEnd-t.connectStart,e[Et]=t.responseStart-t.requestStart,e[Mt]=t.responseEnd-t.responseStart,
e[xt]=t.fetchStart-n,e[Dt]=t.domInteractive-n,e[At]=t.domContentLoadedEventStart-n,!0)},Pn=function(e){if(Se.top!=Se)return!1;var t=Se.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[It]=n,!0)},wn=function(e,t){var n=e[t];(isNaN(n)||1/0==n||0>n)&&(e[t]=void 0)},Sn=!1,_n=function(e){if("cookie"==Fe(e,fn)){var t=Fe(e,sn),r=Mn(e),a=kn(Fe(e,ln)),i=xn(Fe(e,on)),s=1e3*Be(e,un),o=Fe(e,an);if("auto"!=i)Ce(t,r,a,i,o,s)&&(Sn=!0);else{
n(32);var l;if(r=[],i=c()[ne]("."),4!=i[J]||(l=i[i[J]-1],parseInt(l,10)!=l)){for(l=i[J]-2;0<=l;l--)r[U](i[z](l)[ge]("."));r[U]("none"),l=r}else l=["none"];for(var u=0;u<l[J];u++)if(i=l[u],e[B].set(on,i),r=Mn(e),Ce(t,r,a,i,o,s))return void(Sn=!0);e[B].set(on,"auto")}}},Tn=function(e){if("cookie"==Fe(e,fn)&&!Sn&&(_n(e),!Sn))throw"abort"},In=function(e){if(e.get(cn)){var t=Fe(e,on),r=Fe(e,dn)||c(),a=I("__utma",r,t);a&&(n(19),e.set(Ft,(new Date)[X](),!0),e.set($t,a.R),(t=I("__utmz",r,t))&&a[$]==t[$]&&e.set(zt,t.R));
}},Mn=function(e){var t=u(Fe(e,rn)),n=En(Fe(e,on));return e=Dn(Fe(e,ln)),1<e&&(n+="-"+e),["GA1",n,t][ge](".")},Cn=function(e,t,n){for(var r,a=[],i=[],s=0;s<e[J];s++){var o=e[s];o.r[n]==t?a[U](o):void 0==r||o.r[n]<r?(i=[o],r=o.r[n]):o.r[n]==r&&i[U](o)}return 0<a[J]?a:i},xn=function(e){return 0==e[H](".")?e.substr(1):e},En=function(e){return xn(e)[ne](".")[J]},kn=function(e){return e?(1<e[J]&&e.lastIndexOf("/")==e[J]-1&&(e=e.substr(0,e[J]-1)),0!=e[H]("/")&&(e="/"+e),e):"/"},Dn=function(e){return e=kn(e),
"/"==e?1:e[ne]("/")[J]},An=j(/^https?:\/\/([^\/:]+)/),On=/(.*)([?&#])(?:_ga=[^&]*)(?:&?)(.*)/,Rn=function(e){this.target=e,this.T=!1};Rn[ee].Q=function(e,n){if(e.tagName){if("a"==e.tagName[me]())return void(e[de]&&t(e,Ln(this,e[de],n)));if("form"==e.tagName[me]())return Nn(this,e)}if("string"==typeof e)return Ln(this,e,n)};var Ln=function(e,t,n){var r=On.exec(t);r&&3<=r[J]&&(t=r[1]+(r[3]?r[2]+r[3]:"")),e=e[se].get("linkerParam");var a=t[H]("?"),r=t[H]("#");return n?t+=(-1==r?"#":"&")+e:(n=-1==a?"?":"&",
t=-1==r?t+(n+e):t[ce](0,r)+n+e+t[ce](r)),t},Nn=function(e,t){if(t&&t[fe]){var n=e[se].get("linkerParam")[ne]("=")[1];if("get"==t.method[me]()){for(var r=t.childNodes||[],a=0;a<r[J];a++)if("_ga"==r[a][K])return void r[a][Q]("value",n);r=_e[Y]("input"),r[Q]("type","hidden"),r[Q]("name","_ga"),r[Q]("value",n),t.appendChild(r)}else"post"==t.method[me]()&&(t.action=Ln(e,t[fe]))}};Rn[ee].S=function(e,r,a){function i(a){try{a=a||Se.event;var i;e:{var o=a[se]||a.srcElement;for(a=100;o&&0<a;){if(o[de]&&o.nodeName[q](/^a(?:rea)?$/i)){
i=o;break e}o=o[ve],a--}i={}}("http:"==i[le]||"https:"==i[le])&&E(e,i[ae]||"")&&i[de]&&t(i,Ln(s,i[de],r))}catch(l){n(26)}}var s=this;if(this.T||(this.T=!0,be(_e,"mousedown",i,!1),be(_e,"touchstart",i,!1),be(_e,"keyup",i,!1)),a){a=function(t){if(t=t||Se.event,(t=t[se]||t.srcElement)&&t[fe]){var n=t[fe][q](An);n&&E(e,n[1])&&Nn(s,t)}};for(var o=0;o<_e.forms[J];o++)be(_e.forms[o],"submit",a)}};var jn,Un=function(e){return e.get(nn)&&"t0"!=e.get(nn)?"_dc_"+u(e.get(nn)):"_dc"},$n=function(e){if(e.get(qt)){
var t=new we,n=function(n){t.set(We(n).p,e.get(n))};n(tt),n(nt),n(an),n(rn),n(qt);var r=Be(e,"forceSSL")||"https:"==_e[re][le]?"https:":"http:",r=r+"//stats.g.doubleclick.net/collect?t=dc&aip=1&";t.map(function(e,t){r+=l(e)+"="+l(""+t)+"&"}),r+="z="+i(),s(r),e.set(qt,"",!0)}},zn=function(e){n(29),e=e.b;var t=e.get(Jt);e.set(Jt,function(e){return e.get(qt)||(-1!=_e[V][H](Un(e)+"=1")?e.set(qt,"",!0):(Un(e),Ce(Un(e),"1",e.get(ln),e.get(on),e.get(an),6e5)?e.set(qt,""+i(),!0):n(30))),t(e)});var r=e.get(en);
e.set(en,function(e){var t=r(e);return $n(e),t})},Fn=function(e,t,n){if(!jn){var r;r=_e[re][$];var a=Se[K],s=/^#?gaso=([^&]*)/;(a=(r=(r=r&&r[q](s)||a&&a[q](s))?r[1]:Me("GASO")[0]||"")&&r[q](/^(?:!([-0-9a-z.]{1,40})!)?([-.\w]{10,1200})$/i))&&(Ce("GASO",""+r,n,t,e,0),R._udo||(R._udo=t),R._utcp||(R._utcp=n),e=a[1],d("https://www.google.com/analytics/web/inpage/pub/inpage.js?"+(e?"prefix="+e+"&":"")+i(),"_gasojs")),jn=!0}},Bn=function(e){function t(e,t){r.b[B].set(e,t)}function n(e,n){t(e,n),r.filters.add(e);
}var r=this;this.b=new Ue,this.filters=new je,t(nn,e[nn]),t(an,e[an]),t(sn,e[sn]),t(on,e[on]||c()),t(ln,e[ln]),t(un,e[un]),t(dn,e[dn]),t(cn,e[cn]),t(pn,e[pn]),t(hn,e[hn]),t(vn,e[vn]),t(gn,e[gn]),t(mn,e[mn]),t(fn,e[fn]),t(tt,1),t(nt,"j15"),n(Wt,v),n(Gt,P),n(Yt,g),n(Qt,Tn),n(Kt,In),n(Xt,h),n(Zt,w),n(tn,b),n(Jt,m),n(en,y),Vn(this.b,e[rn]),Hn(this.b),this.b.set(rt,k()),Fn(this.b.get(an),this.b.get(on),this.b.get(ln))},Vn=function(e,t){if("cookie"==Fe(e,fn)){Sn=!1;var r;e:{var a=Me(Fe(e,sn));if(a&&!(1>a[J])){
r=[];for(var s=0;s<a[J];s++){var o;o=a[s][ne](".");var u=o.shift();("GA1"==u||"1"==u)&&1<o[J]?(u=o.shift()[ne]("-"),1==u[J]&&(u[1]="1"),u[0]*=1,u[1]*=1,o={r:u,s:o[ge](".")}):o=void 0,o&&r[U](o)}if(1==r[J]){n(13),r=r[0].s;break e}if(0!=r[J]){if(n(14),a=En(Fe(e,on)),r=Cn(r,a,0),1==r[J]){r=r[0].s;break e}a=Dn(Fe(e,ln)),r=Cn(r,a,1),r=r[0]&&r[0].s;break e}n(12)}r=void 0}r||(r=Fe(e,on),a=Fe(e,dn)||c(),r=I("__utma",a,r),(r=void 0==r?void 0:r.O[1]+"."+r.O[2])&&n(10)),r&&(e[B].set(rn,r),Sn=!0)}if(r=e.get(hn),
(s=(r=_e[re][r?"href":"search"][q]("(?:&|#|\\?)"+l("_ga")[F](/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")+"=([^&#]*)"))&&2==r[J]?r[1]:"")&&(e.get(pn)?(r=s[H]("."),-1==r?n(22):(a=s[ce](r+1),"1"!=s[ce](0,r)?n(22):(r=a[H]("."),-1==r?n(22):(s=a[ce](0,r),r=a[ce](r+1),s!=x(r,0)&&s!=x(r,-1)&&s!=x(r,-2)?n(23):(n(11),e[B].set(rn,r)))))):n(21)),t&&(n(9),e[B].set(rn,l(t))),!e.get(rn))if(r=(r=Se.gaGlobal&&Se.gaGlobal.vid)&&-1!=r[ie](/^(?:utma\.)?\d+\.\d+$/)?r:void 0)n(17),e[B].set(rn,r);else{for(n(8),r=Se[he],r=r.appName+r.version+r.platform+r.userAgent+(_e[V]?_e[V]:"")+(_e.referrer?_e.referrer:""),
a=r[J],s=Se.history[J];0<s;)r+=s--^a++;e[B].set(rn,[i()^2147483647&A(r),N.round((new Date)[X]()/1e3)][ge]("."))}_n(e)},Hn=function(e){var t=Se[he],r=Se.screen,a=_e[re];if(e.set(ut,f(e.get(mn))),a){var i=a.pathname||"";"/"!=i.charAt(0)&&(n(31),i="/"+i),e.set(lt,a[le]+"//"+a[ae]+i+a[ie])}r&&e.set(ht,r.width+"x"+r.height),r&&e.set(pt,r.colorDepth+"-bit");var r=_e.documentElement,s=(i=_e.body)&&i[te]&&i[ue],o=[];if(r&&r[te]&&r[ue]&&("CSS1Compat"===_e.compatMode||!s)?o=[r[te],r[ue]]:s&&(o=[i[te],i[ue]]),
r=0>=o[0]||0>=o[1]?"":o[ge]("x"),e.set(vt,r),e.set(mt,T()),e.set(ft,_e.characterSet||_e.charset),e.set(gt,t&&"function"==typeof t.javaEnabled&&t.javaEnabled()||!1),e.set(ct,(t&&(t.language||t.browserLanguage)||"")[me]()),a&&e.get(hn)&&(t=_e[re][$])){for(t=t[ce](1),t=t[ne]("&"),a=[],r=0;r<t[J];++r)0!=t[r][H]("utm_id")&&0!=t[r][H]("utm_campaign")&&0!=t[r][H]("utm_source")&&0!=t[r][H]("utm_medium")&&0!=t[r][H]("utm_term")&&0!=t[r][H]("utm_content")||a[U](t[r]);0<a[J]&&(t="#"+a[ge]("&"),e.set(lt,e.get(lt)+t));
}};Bn[ee].get=function(e){return this.b.get(e)},Bn[ee].set=function(e,t){this.b.set(e,t)};var qn={pageview:[dt],event:[yt,bt,Pt,wt],social:[St,_t,Tt],timing:[Ot,Rt,Nt,Lt]};Bn[ee].send=function(e){if(!(1>arguments[J])){var t,n;"string"==typeof arguments[0]?(t=arguments[0],n=[][z][oe](arguments,1)):(t=arguments[0]&&arguments[0][at],n=arguments),t&&(n=p(qn[t]||[],n),n[at]=t,this.b.set(n,void 0,!0),this.filters.execute(this.b),"pageview"==t&&Wn(this),this.b[B].m={})}};var Wn=function(e){e.I||(e.I=!0,
yn(e.b,function(t){e.send("timing",t)}))},Gn=function(e){return"prerender"!=_e.webkitVisibilityState&&(e(),!0)},Yn=function(e){if(!Gn(e)){n(16);var t=!1,r=function(){!t&&Gn(e)&&(t=!0,Pe(_e,"webkitvisibilitychange",r))};be(_e,"webkitvisibilitychange",r)}},Qn={F:"/plugins/ua/",D:/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/};Qn.k=new we,Qn.f=[];var Kn=function(e){if(r(e[0]))this.u=e[0];else{var t=Qn.D.exec(e[0]);if(null!=t&&4==t[J]&&(this.c=t[1]||"t0",this.e=t[2]||"",this.d=t[3],this.a=[][z][oe](e,1),this.e||(this.A="create"==this.d,
this.i="require"==this.d,this.g="provide"==this.d)),!r(e[0])){if(t=e[1],e=e[2],!this.d)throw"abort";if(this.i&&(!a(t)||""==t))throw"abort";if(this.g&&(!a(t)||""==t||!r(e)))throw"abort";if(0<=this.c[H](".")||0<=this.c[H](":")||0<=this.e[H](".")||0<=this.e[H](":"))throw"abort";if(this.g&&"t0"!=this.c)throw"abort"}}};Qn.B=function(e,t,n){var a=Qn.k.get(e);return!!r(a)&&(t.plugins_=t.plugins_||new we,t.plugins_.set(e,new a(t,n||{})),!0)},Qn.C=function(e,t){Qn.k.set(e,t)},Qn.execute=function(e){var t=Qn.J[pe](Qn,arguments),t=Qn.f.concat(t);
for(Qn.f=[];0<t[J]&&!Qn.v(t[0])&&(t.shift(),!(0<Qn.f[J])););Qn.f=Qn.f.concat(t)},Qn.J=function(e){for(var t=[],n=0;n<arguments[J];n++)try{var a=new Kn(arguments[n]);if(a.g)Qn.v(a);else{if(a.i){var i=a.a[1];if(!r(Qn.k.get(a.a[0]))&&!a.H&&i){var s,o=i+"",i=o&&0<=o[H]("/")?o:"//www.google-analytics.com"+Qn.F+o,l=D(""+i),u=l[le],c=_e[re][le];s="https:"==u||u==c||"http:"==u&&"http:"==c;var f;if(f=s){var o=l,p=D(_e[re][de]);if(o.G||0<=o.url[H]("?")||0<=o.path[H]("://"))f=!1;else if(o[Z]==p[Z]&&o[G]==p[G])f=!0;else{
var h="http:"==o[le]?80:443;f="www.google-analytics.com"==o[Z]&&(o[G]||h)==h&&0==o.path[H]("/plugins/")}}f&&(a.H=!!d(l.url))}}t[U](a)}}catch(v){}return t},Qn.v=function(e){try{if(e.u)e.u[oe](Se,Xn.j("t0"));else if(e.g)Qn.C(e.a[0],e.a[1]);else{var t=e.c==Je?Xn:Xn.j(e.c);if(e.A)"t0"==e.c&&Xn.create[pe](Xn,e.a);else if(t)if(e.i){if(!Qn.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),Qn.execute[pe](Qn,[arguments])};Xn.h={},Xn.P=[],Xn.L=0,
Xn.answer=42;var Zn=[an,on,nn];Xn.create=function(e){var t=p(Zn,[][z][oe](arguments));t[nn]||(t[nn]="t0");var n=""+t[nn];return Xn.h[n]?Xn.h[n]:(t=new Bn(t),Xn.h[n]=t,Xn.P[U](t),t)},Xn.j=function(e){return Xn.h[e]},Xn.K=function(){return Xn.P[z](0)},Xn.N=function(){var e=Se[Je];if(!e||42!=e.answer){Xn.L=e&&e.l,Xn.loaded=!0,Se[Je]=Xn,S();var t=e&&e.q;"[object Array]"==Object[ee].toString[oe](Object(t))&&Yn(function(){Qn.execute[pe](Xn,t)})}},Xn.N()}(window),e.exports=ga}).call(t,n(8))},function(e,t){
!function(){"use strict";var e={};!function(){function t(){r||console.log.apply(console,arguments);for(var e=Math.round(Date.now()-i),t=[],n=0;n<arguments.length;n++){var a=""+arguments[n];"[obj"!=a.slice(0,4)&&t.push(a)}var s=e+": "+t.join(", "),o=document.getElementById("console");o&&(o.value+=s+"\n"),r&&console.log(s)}function n(e){e<=a&&t.apply(null,arguments)}var r=!!(window.console&&window.console.log&&window.console.log.call),a=0,i=(new Date).getTime();e.dlog=n,e.log=t,e.DLOG_LEVEL=a}(),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 r=[];if(null==n)return r;for(var a=n.firstElementChild;null!=a;a=a.nextElementSibling)a.nodeName==e&&r.push(t.call(this,a));return r},t.prototype.parseAttributes_=function(e,t){
var n={};for(var r in e)null!=t.attributes.getNamedItem(r)&&(n[r]=e[r](t.attributes[r].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,r=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};r.prototype.ccType=function(){return t},r.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()},r.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")},r.prototype.getCCInfo=function(){return this._ccInfo},r.prototype.onCCError=function(t){var n="Error geting captions from "+this._url;return e.log(n),this._callback(n)},r.prototype.onCCLoad=function(r){e.dlog(2,"Close Captions Info received");var a=null;if(200!==r.target.status||r.target.status>299)return a="HTTP error "+r.target.status+" retrieving close captions from "+this._url,e.log(a),this._callback(a);
switch(this.ccType()){case t:this._ccInfo=new e.Ttml(r.target.responseText).parse();break;case n:throw new Error("VTT parsing not implemented yet")}return null===this._ccInfo?(a="Error parsing the close captions info",e.log(a),this._callback(a)):this._callback(a,this._ccInfo)},e.CloseCaptionsLoader=r}(),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 r(e,t,n){var r=[];if(null==n)return r;for(var a=n.firstElementChild;null!=a;a=a.nextElementSibling)a.nodeName==e&&r.push(t(a));return r}function a(e,t,n){return r(e,t,n)[0]||null}function i(e,t,n){n=n||{};for(var r in e)null!=t.attributes.getNamedItem(r)&&(n[r]=e[r](t.attributes[r].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]),r=parseInt(t[2]);
return{start:n,end:r,length:r-n+1}}function l(e){return i(w,e)}function u(e){return e.textContent}function d(e){return o(e.attributes.range.value)}function c(e){var t=i(S,e);return t.initialization=a("Initialization",d,e),t}function f(e){return i(_,e)}function p(e){var t=c(e);return t.timescale&&t.duration?t.durationSeconds=t.duration/t.timescale:t.durationSeconds=t.duration,t.segmentURLs=r("SegmentURL",l,e),t}function h(e){var t=i(I,e);return t.baseURLs=r("BaseURL",u,e),t.segmentBase=a("SegmentBase",c,e),
t.segmentList=a("SegmentList",p,e),t.contentProtection=a("ContentProtection",T,e),t}function v(e){var t=h(e);return i(M,e,t),t}function g(e){var t=h(e);t.representations=r("Representation",v,e),t.segmentTemplate=a("SegmentTemplate",f,e);for(var n=0;n<t.representations.length;n++)t.representations[n].segmentTemplate=t.segmentTemplate;return t}function m(e){var t=h(e);return i(C,e,t),t.adaptationSets=r("AdaptationSet",g,e),t}function y(e){var t={};return i({mediaPresentationDuration:n},e,t),t.periods=r("Period",m,e),
t.baseURLs=r("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 P(e,t){var n=new DOMParser,r=n.parseFromString(e,"text/xml");return b(y(r.firstChild),t)}var w={media:t,mediaRange:o,index:t,indexRange:o},S={timescale:parseInt,duration:parseInt,indexRange:o,presentationTimeOffset:parseInt,startNumber:parseInt},_={timescale:parseInt,duration:parseInt,initialization:t,media:t,startNumber:parseInt},T=function(e){var t=e.attributes.schemeIdUri;if(!t||"http://youtube.com/drm/2012/10/10"!=t.textContent)return null;for(var n={},r=e.firstElementChild;null!=r;r=r.nextElementSibling)if("yt:SystemURL"==r.nodeName){
var a=r.attributes.type.textContent;n[a]=r.textContent}return n},I={id:t,profiles:t,width:parseInt,height:parseInt,frameRate:s,audioSamplingRate:parseInt,mimeType:t,codecs:t},M={bandwidth:parseInt,qualityRanking:parseInt},C={id:parseInt,start:n,duration:n};e.parseDASHManifest=P}(),function(){function t(e){for(var t=new DataView(e),n=0;n<e.byteLength;){var r=t.getUint32(n+4,!1);if(1936286840==r||1836019558==r)break;n+=t.getUint32(n,!1)}return new Uint8Array(e.slice(0,n))}function n(e,t){for(var n=new DataView(e),r=0;1936286840!=n.getUint32(r+4,!1);)if(r+=n.getUint32(r,!1),
r>=e.byteLength)throw"Could not find sidx";var a=n.getUint32(r,!1)+r;if(a>e.byteLength)throw"sidx terminates after array buffer";var i=n.getUint8(r+8);r+=12;var s=n.getUint32(r+4,!1);r+=8;var o,l;0==i?(o=n.getUint32(r,!1),l=n.getUint32(r+4,!1),r+=8):(o=(n.getUint32(r,!1)<<32)+n.getUint32(r+4,!1),l=(n.getUint32(r+8,!1)<<32)+n.getUint32(r+12,!1),r+=16),l+=a+(t||0);var u=n.getUint16(r+2,!1);r+=4;for(var d=l,c=o,f=[],p=0;p<u;p++){var h=n.getUint32(r,!1),v=2147483648&h;if(v)throw"Unhandled indirect reference";
h=2147483647&h;var g=n.getUint32(r+4,!1);r+=12,f.push({size:h,offset:d,duration:g/s,time:c/s}),d+=h,c+=g}if(r!=a)throw"Error: final pos "+r+" differs from SIDX end "+a;return f}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 r=new ArrayBuffer(t-e),a=new Uint8Array(r),i=0;i<a.length;i++)a[i]=n[i+e];return r}),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),r=0;r<e.length;r+=2)n[r/2]=parseInt(e.substr(r,2),16);return n}function r(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t}function a(e){return n(e.replace(/[{}-]/g,""))}function i(e,t,n){var r=[];if(null==n)return r;for(var a=n.firstElementChild;null!=a;a=a.nextElementSibling)a.nodeName==e&&r.push(t(a));return r}function s(e,t,n){n=n||{};for(var r in e)null!=t.attributes.getNamedItem(r)&&(n[r]=e[r](t.attributes[r].value));
return n}function o(t){var n={},a=t.split("00000001");return 3!==a.length?(t||(e.log("Warning, Audio codec private data is not specified."),t="1210"),n=r(t)):(n.SPS=r(a[1]),n.PPS=r(a[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 d(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 c(e){var t=[];if(null==e)return t;for(var n=-1,r=e.firstElementChild;null!=r;r=r.nextElementSibling)if("c"==r.nodeName){var a={};if(n==-1&&(n=null!=r.attributes.getNamedItem("t")?parseInt(r.attributes.t.value):0),a.time=n/1e7,a.timeURL=n,null==r.attributes.getNamedItem("d"))throw"Expected attribute 'd' not found";
var i=parseInt(r.attributes.d.value);a.duration=i/1e7,a.durationURL=i,n+=i,t.push(a)}return t}function f(e){var n={};return s({Type:t},e,n),s({Url:t},e,n),"video"===n.Type?n.QualityLevels=i("QualityLevel",u,e):"audio"==n.Type&&(n.QualityLevels=i("QualityLevel",d,e)),n.Fragments=c(e),n}function p(e,t){for(var n=[],r=[],a=!1,i=!1,s=e.length-1;s>=0&&(i||"video"!==e[s].Type||(r.push(s),i=!0),a||"audio"!==e[s].Type||(r.push(s),a=!0),!i||!a);s--);for(var s=0;s<e.length;s++)if(r.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 h(e){for(var t=atob(e.trim()),n=new ArrayBuffer(t.length),r=new Uint8Array(n),a=0;a<t.length;a++)r[a]=t.charCodeAt(a);
return{ab:n,u8:r}}function v(e){for(var t=0,n=[],r=[],a=new Uint16Array(e),i=e.byteLength/2;t<i&&(0===n.length||0===r.length);){for(;t<i&&60!==a[t];)t++;if(75===a[t+1]&&73===a[t+2]&&68===a[t+3]&&62===a[t+4])for(t+=5;t<i&&60!==a[t];)n.push(a[t]),t++;else if(76===a[t+1]&&65===a[t+2]&&95===a[t+3]&&85===a[t+4]&&82===a[t+5]&&76===a[t+6]&&62===a[t+7])for(t+=8;t<i&&60!==a[t];)r.push(a[t]),t++;else t++}return{kid:String.fromCharCode.apply(null,n),url:String.fromCharCode.apply(null,r)}}function g(e){var t={};
s({SystemID:a},e,t);var n=h(e.textContent),r=v(n.ab);return t.KID=h(r.kid).u8,t.url=r.url,t.PrHeader=n.u8,t}function m(e){var t={};return t.ProtectionHeader=i("ProtectionHeader",g,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=i("StreamIndex",f,e);var n=i("Protection",m,e);n&&n[0]&&(t.Protection=n[0]),t.duration=t.Duration/t.TimeScale;var r;return t.Protection&&(r={},t.Protection.ProtectionHeader.url?r.playready=t.Protection.ProtectionHeader.url:r.playready="http://playready.directtaps.net/pr/svc/rightsmanager.asmx"),
t.adaptationSets=p(t.StreamIndexes,r),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 P(e,t){for(var n,r=new DOMParser,a=r.parseFromString(e,"text/xml"),i=0;i<a.childNodes.length;i++)if("SmoothStreamingMedia"===a.childNodes[i].nodeName){n=a.childNodes[i];break}return b(y(n),t);
}e.parseSSManifest=P}(),function(){function t(e,t,n){e.setUint32(t,n)}function n(e,t,n){for(var r=0;r<4;r++)e.setUint8(t+4+r,n.charCodeAt(r));return 8}function r(e,t,n,r,a){return n.set(a,r),r+a.length}function a(e,r,a,i,s,o){var l=i;return i+=n(r,i,s),o&&(i=o(e,r,a,i)),t(r,l,i-l),i}function i(e,t,n,i,s,o){return a(e,t,n,i,s,function(e,t,n,a){return r(e,t,n,a,o)})}function s(e,t,n,r){return i(e,t,n,r,"smhd",[0,0,0,0,0,0,0,0])}function o(e,t,n,r){return i(e,t,n,r,"vmhd",[0,0,0,1,0,0,0,0,0,0,0,0])}
function l(e,t,n,i){return a(e,t,n,i,"esds",function(e,t,n,a){var i=e.audio_codec_private_data[0],s=e.audio_codec_private_data[1];return a=r(e,t,n,a,[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,i,s,6,1,2])})}function u(e,t,n,i){return a(e,t,n,i,"avcC",function(e,t,n,a){return a=r(e,t,n,a,[1,77,64,30,255,225]),t.setUint16(a,e.sps.length),a+=2,a=r(e,t,n,a,e.sps),t.setUint8(a,1),a+=1,t.setUint16(a,e.pps.length),a+=2,a=r(e,t,n,a,e.pps)})}function d(e,t,n){for(var r=n-t+1,a=0,i=t;i<t+r/2;i++)a=e[i],
e[i]=e[n-i+t],e[n-i+t]=a}function c(e){var t=new ArrayBuffer(e.length),n=new Uint8Array(t);return n.set(e),d(n,0,3),d(n,4,5),d(n,6,7),n}function f(e,t,n,i){return a(e,t,n,i,"tenc",function(e,t,n,a){a=r(e,t,n,a,[0,0,0,0,0,0,1]),t.setUint8(a,e.pr.ivsize),a++;var i=c(e.pr.kid);return a=r(e,t,n,a,i)})}function p(e,t,n,r){return a(e,t,n,r,"schi",function(e,t,n,r){return r=f(e,t,n,r)})}function h(e,t,n,r){return i(e,t,n,r,"schm",[0,0,0,0,99,101,110,99,0,1,0,0])}function v(e,t,n,r){return"audio/mp4"!==e.mime?i(e,t,n,r,"frma",[97,118,99,49]):i(e,t,n,r,"frma",[109,112,52,97]);
}function g(e,t,n,r){return a(e,t,n,r,"sinf",function(e,t,n,r){return r=v(e,t,n,r),r=h(e,t,n,r),r=p(e,t,n,r)})}function m(e,t,n,i,s){return a(e,t,n,i,s,function(e,t,n,a){var i=e.audio_sample_rate>>8&255,o=255&e.audio_sample_rate;return a=r(e,t,n,a,[0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,i,o,0,0]),a=l(e,t,n,a),"enca"===s&&(a=g(e,t,n,a)),a})}function y(e,t,n,i,s){return a(e,t,n,i,s,function(e,t,n,a){return a=r(e,t,n,a,[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(a,e.width),
a+=2,t.setUint16(a,e.height),a+=2,a=r(e,t,n,a,[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]),a=u(e,t,n,a),"encv"===s&&(a=g(e,t,n,a)),a})}function b(e,t,n,i){return a(e,t,n,i,"stsd",function(e,t,n,a){return a=r(e,t,n,a,[0,0,0,0,0,0,0,1]),"audio/mp4"!==e.mime?(e.pr&&(a=y(e,t,n,a,"encv")),a=y(e,t,n,a,"avc1")):(e.pr&&(a=m(e,t,n,a,"enca")),a=m(e,t,n,a,"mp4a")),a})}function P(e,t,n,i){return a(e,t,n,i,"stbl",function(e,t,n,a){return a=b(e,t,n,a),
a="audio/mp4"!==e.mime?r(e,t,n,a,[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]):r(e,t,n,a,[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 w(e,t,n,r){return i(e,t,n,r,"url ",[0,0,0,1])}function S(e,t,n,i){
return a(e,t,n,i,"dref",function(e,t,n,a){return a=r(e,t,n,a,[0,0,0,0,0,0,0,1]),a=w(e,t,n,a)})}function _(e,t,n,r){return a(e,t,n,r,"dinf",function(e,t,n,r){return r=S(e,t,n,r)})}function T(e,t,n,r){return a(e,t,n,r,"minf",function(e,t,n,r){return r=_(e,t,n,r),r=P(e,t,n,r),r="audio/mp4"!==e.mime?o(e,t,n,r):s(e,t,n,r)})}function I(e,t,n,r){return"audio/mp4"!==e.mime?i(e,t,n,r,"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]):i(e,t,n,r,"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 M(e,t,n,r){return i(e,t,n,r,"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 C(e,t,n,r){return a(e,t,n,r,"mdia",function(e,t,n,r){return r=M(e,t,n,r),r=I(e,t,n,r),r=T(e,t,n,r)})}function x(e,t,n,i){return a(e,t,n,i,"tkhd",function(e,t,n,a){return a=r(e,t,n,a,[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(a,e.width),
a+=4,t.setUint32(a,e.height),a+=4,t.setUint16(a,0),a+=2})}function E(e,t,n,r){return a(e,t,n,r,"trak",function(e,t,n,r){return r=x(e,t,n,r),r=C(e,t,n,r)})}function k(e,t,n,r){return i(e,t,n,r,"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 D(e,t,n,r){return a(e,t,n,r,"mvex",function(e,t,n,r){return r=k(e,t,n,r)})}function A(e,t,n,i){return a(e,t,n,i,"pssh",function(e,t,n,a){return a=r(e,t,n,a,[0,0,0,0]),a=r(e,t,n,a,e.pr.systemId),t.setUint32(a,e.pr.prHeader.length),a+=4,a=r(e,t,n,a,e.pr.prHeader);
})}function O(e,t,n,r){return i(e,t,n,r,"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 R(e,t,n,r){return a(e,t,n,r,"moov",function(e,t,n,r){return r=O(e,t,n,r),e.pr&&(r=A(e,t,n,r)),r=D(e,t,n,r),r=E(e,t,n,r)})}function L(e){var t=new ArrayBuffer(2e4),n=new DataView(t),r=new Uint8Array(t),a=0,i=0;a=R(e,n,r,a),
i=a-1;var s={};return s.data=t.slice(0,a),s.init={},s.init.start=0,s.init.end=i,s}function N(e,t,n){for(var r=0,a=t,i=0;i<4;i++)r<<=8,r+=n.charCodeAt(i);for(;e.getUint32(a+4,!1)!=r;)if(a+=e.getUint32(a),a>=e.byteLength)throw"Could not find box: "+n;return a}function j(e,t){var n=N(e,t,"traf");n=N(e,n+8,"tfhd"),e.setUint32(n+12,1)}function U(e,t,n,r){var a=N(e,t,n),i=e.getUint32(a);return e.setUint32(a,i+r),a}function $(e,t,n){var r=0;if(r=U(e,r,"moof",t),r=U(e,r+8,"traf",t),r=N(e,r+8,"trun"),1&e.getUint32(r+8)){
var a=r+16;e.setUint32(a,n)}return r}function z(e,t,n){var r=0;if(r=U(e,r,"moof",t),r=U(e,r+8,"traf",t),r=N(e,r+8,"trun"),1&e.getUint32(r+8)){var a=r+16,i=e.getUint32(a);e.setUint32(a,i+n)}return r}function F(e,t){var n=[0,0,0,20,116,102,100,116,1,0,0,0],r=n.length+8,a=new ArrayBuffer(e.byteLength+r),i=(new Uint8Array(e),new DataView(e)),s=new Uint8Array(a),o=new DataView(a),l=0;return j(i,8),l=z(i,r,r),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+r),a}function B(e,t,n,r,a){if(!a)return new Uint8Array(0);for(var i=new Uint8Array(n),s=0,o=0,l=t,u=0;u<n;u++)s=e.getUint16(l+r),o=r+2+6*s,i[u]=o,l+=o;return i}function V(e,t,n,i,s,o){return a(e,t,n,i,"mdat",function(e,t,n,a){return a=r(e,t,n,a,s),a=r(e,t,n,a,o)})}function H(e,t,n,i){return a(e,t,n,i,"saio",function(e,t,n,a){a=r(e,t,n,a,[0,0,0,0,0,0,0,1]);var i=a+4+8;return t.setUint32(a,i),a+=4})}function q(e,t,n,i,s,o,l,u){return a(e,t,n,i,"saiz",function(e,t,n,a){
return a=l?r(e,t,n,a,[0,0,0,0,0]):r(e,t,n,a,[0,0,0,0,u]),t.setUint32(a,s),a+=4,n.set(o,a),a+=o.length})}function W(e){var t=new DataView(e),n=0,r=0,a=0,i=t.getUint32(n);n=N(t,n+8,"traf"),n=N(t,n+8,"trun"),r=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(r!==l)throw"Samples count does not match "+r+" "+l;var u=t.getUint32(n);a=u-32;var d=200,c=new ArrayBuffer(e.byteLength+d),f=new Uint8Array(c),p=new DataView(c);
f.set(new Uint8Array(e,0,n));var h=n,v=8,g=n+32,m=n+u,y=t.getUint32(m),b=B(t,g,r,v,o);if(h=q(null,p,f,h,r,b,o,v),h=H(null,p,f,h),o){for(var P=0,w=0;w<b.length;w++)P+=b[w];if(P!==a)throw"Samples size does not match "+P+" "+a}else if(v*r!==a)throw"Samples size does not match "+v*r+" "+a;var S=new Uint8Array(e,g,a),_=new Uint8Array(e,m+8,y-8),T=h-i,I=h;return h=V(null,p,f,h,S,_),$(p,T,I+8+a),new Uint8Array(c,0,h)}function G(e,t,n){var r=F(e,t);return n?W(r):new Uint8Array(r)}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=G}(),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 r=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))};r.kMime='video/mp4; codecs="avc1.640028"',
r.kFlavorToSystem={clearkey:["webkit-org.w3.clearkey","org.w3.clearkey"],widevine:["com.widevine.alpha"],playready:["com.youtube.playready","com.microsoft.playready"]},r.prototype.init=function(e,t,n){this.chooseFlavor(r.kMime,e,t),this.isClearKey="clearkey"==this.flavor},r.prototype.destroy=function(){this.removeAllMediaEventListeners(),this.video=null},r.prototype.addMediaEventListener=function(e,t){var n=t.bind(this);this.video.addEventListener(e,n),this.mediaEvents_[e]=n},r.prototype.removeMediaEventListener=function(e){
this.video.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.chooseFlavor=function(e,t,n){for(var a in t)if(!n||a==n){var i=r.kFlavorToSystem[a];if(i)for(var s in i)if(this.video.canPlayType(e,i[s]))return this.flavor=a,this.keySystem=i[s],void(this.licenseServerURL=t[a])}throw"Could not find a compatible key system"},r.prototype.extractBMFFClearKeyID=function(e){
var t=new ArrayBuffer(e.length),n=new Uint8Array(t);n.set(e);for(var r=new DataView(t),a=0;a<t.byteLength;){var i=r.getUint32(a,!1),s=r.getUint32(a+4,!1);if(1886614376!=s)throw"Box type "+s.toString(16)+' not equal to "pssh"';if(1477738184==r.getUint32(a+12,!1)&&69420633==r.getUint32(a+16,!1)&&2464609580==r.getUint32(a+20,!1)&&1558758348==r.getUint32(a+24,!1)){var o=r.getUint32(a+28,!1);if(16!=o)throw"Unexpected KID size "+o;return new Uint8Array(t.slice(a+32,a+32+o))}if(3991899049==r.getUint32(a+12,!1)&&2044086990==r.getUint32(a+16,!1)&&2747803612==r.getUint32(a+20,!1)&&3575456237==r.getUint32(a+24,!1))return new Uint8Array(t.slice(a+36,a+52));
a+=i}return e},r.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)},r.prototype.onKeyMessage=function(t){e.dlog(2,"onKeyMessage() Sending request: "+this.licenseServerURL+" "+t.sessionId);var n=this.initDataQueue.shift(),r=new XMLHttpRequest;
r.open("POST",this.licenseServerURL),r.setRequestHeader("content-type","text/xml;charset=utf-8"),r.addEventListener("load",this.onLoad.bind(this,n,t.sessionId)),r.responseType="arraybuffer",r.send(t.message)},r.prototype.onKeyError=function(t){e.dlog(2,"onKeyError("+t.keySystem+", "+t.errorCode.code+", "+t.systemCode+")")},r.prototype.onLoad=function(r,a,i){if(e.dlog(2,"onLoad("+this.licenseServerURL+"): "+a),i.target.status<200||i.target.status>299)throw"Bad XHR status: "+i.target.statusText;var s=n(new Uint8Array(i.target.response)).split("\r\n").pop();
this.video.addKey(this.keySystem,t(s),r,a)},e.EMEManager=r}(),function(){var t=function(e,t,n,r,a,i,s){this.url=e,this.bandwidth=t,this.width=n,this.height=r,this.sps=a,this.pps=i,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,r,a,i){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=r,this.resetReason=null,this.active=!0,this.type=a,this.pr_=i,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,r=this.representations_[this.currentRep].bandwidth,a=this.representations_[t].bandwidth;e.dlog(2,"bandwidthChange["+this.mime+"]: "+r+" "+a),n=r>a?"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),r=n&&n.end||0;if(null!==this.segIndex){
var a=this.representations_[this.currentRep].segs[this.segIndex].time;r=a>r?a:r}if(n){var i=Math.abs(n.end-r);i>.001&&e.dlog(2,"Difference in available data: "+n.end+" "+r)}return r-t},n.prototype.findSegmentIndexForTime=function(t){for(var n=this.representations_[this.currentRep].segs,r=0;r<n.length;r++){var a=n[r];if(a.time<=t&&a.time+a.duration>=t)return r==n.length-1&&a.time+a.duration+.5<t?null:r}return e.dlog(5,"Could not find segment for time "+t),null},n.prototype.identifyNextFragment=function(n){
var r=this.findRangeForPlaybackTime(n),a=r&&r.end||n;if(a>n+t.ENOUGH)return e.dlog(3,"Enough buffering currentTime in rage: "+this.mime+" "+n+"  "+a),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(a),null===this.segIndex)return this.active=!1,null;e.dlog(4,"New Index["+this.mime+"]: "+a+" "+this.segIndex)}else{null==r&&e.log("Playback head outside of buffer in append-continue state.");
var i=this.representations_[this.currentRep].segs[this.segIndex].time;if(i>n+t.ENOUGH)return e.dlog(3,"Enough buffering: "+this.mime+" "+this.segIndex+" "+n+"  "+i),null}return a},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,r=0;r<this.segmentQueue.length;r++)n+=this.segmentQueue[r].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,r=this.representations_[this.currentRep].segs[this.segIndex].time,a=r+this.representations_[this.currentRep].segs[this.segIndex].duration;e.dlog(4,"Appending Response ["+this.mime+"] : ["+r+","+a+"]"),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 r=this.mediaSrc_.sourceBuffers[n];e.dlog(5,t+" SourceBuffer["+r.mime+"]: "+r.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 r=null;if(null!=t.segmentList){r=t.segmentList.initialization,
n.segs=[];for(var a=0;a<t.segmentList.segmentURLs.length;a++){var i=t.segmentList.segmentURLs[a],s={start:i.mediaRange.start,end:i.mediaRange.end,index:i.indexRange&&i.indexRange.end||null,time:t.segmentList.durationSeconds*a,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 i=t.segmentBase;r=i.initialization,null!=i.indexRange&&(n.indexRequestData=i.indexRange)}n.segs=[s]}return this.type!==e.StreamingType.SMOOTH_STREAMING&&(n.initRequestData={start:r&&r.start||0,
end:r&&r.end||n.segs[0].index||null}),n},t.prototype.onSourceOpen=function(t,n,r){e.dlog(2,"onSourceOpen()");var a,i,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),a=o.representations.map(this.normalizeRepresentation.bind(this)),i=this.mediaSrc_.addSourceBuffer(o.mime+'; codecs="'+o.codecs+'"'),e.dlog(2,"Buffer added properly: "+(this.mediaSrc_.sourceBuffers[s]===i));var u=new e.SourceBufferManager(this.mediaSrc_,i,a,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,r){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,r)),this.attachHandler_("webkitsourceopen",this.onSourceOpen.bind(this,n,r)),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 r in t){e=t[r];for(var a=0;a<e.length;a++)n.removeEventListener(r,e[a]);e.length=0}},e.MediaSourceManager=t}(),function(){var t=0,n=1,r=function(e){if(null==e)throw new Error("A url for the manifest is required");this.url_=e,this.callback_=null,this.manifest_=null};r.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")},r.prototype.getManifest=function(){return this.manifest_},r.prototype.manifestType_=function(){return this.url_.lastIndexOf(".mpd")!=-1?t:n},r.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()},r.prototype.onManifestError_=function(t){var n="Error retrieving manifest from "+this.url_;
return e.log(n),this.callback_(n)},r.prototype.onManifestLoad_=function(r){e.dlog(2,"Manifest received");var a=null;if(r.target.status<200||r.target.status>299)return a="HTTP error "+r.target.status+" retrieving manifest from "+this.url_,e.log(a),this.callback_(a);switch(this.manifestType_()){case t:this.manifest_=e.parseDASHManifest(r.target.responseText,this.url_);break;case n:this.manifest_=e.parseSSManifest(r.target.responseText,this.url_)}return null===this.manifest_?(a="Error parsing the manifest",
e.log(a),this.callback_(a)):this.callback_(a,this.manifest_)},e.ManifestLoader=r}(),function(){var t=.99,n=.98,r=5e5,a=5e5,i=function(e,t,n){this.bitrates_=e,this.levelCount_=this.bitrates_.length,this.algorithm_=t||"adaptive",this.cooldownPeriod_=2,n&&(this.level_=parseInt(n))};i.prototype.onBandwithTracking=function(i){var s=i.target;if(null!=s.lastTime&&i.timeStamp!=s.lastTime){var o=8e3*(i.loaded-s.lastSize)/(i.timeStamp-s.lastTime);r=t*r+(1-t)*o,a=n*a+(1-n)*o}s.lastTime=i.timeStamp,s.lastSize=i.loaded,
e.dlog(5,"Calculated bandwidth: "+r+" "+a)},i.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 i=0,s=0,o=.85,l=Math.min(r,a);e.dlog(5,"Calculated Bandwidth: "+l+" globalSlowBandwidth: "+r+" globalFastBandwidth: "+a);for(var u=0;u<this.bitrates_.length;u++){
var d=this.bitrates_[u];d>i&&d<o*l-128e3&&(i=d,s=u)}if(s!==t)return e.dlog(2,"Selected new rate "+i+" for bandwidth "+l+" (from "+r+", "+a+")"),this.cooldownPeriod_=8,s}return t!==n&&n!==-1?(e.dlog(2,"Selected new bitrate level: "+n),n):-1},e.AdaptiveManager=i}(),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_),r=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).url,a=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).bandwidth,i=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[n].timeURL;if(r=r.replace("{bitrate}",a),r=r.replace("{start time}",i),t.open("GET",r),
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==r)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="+r),t},t.prototype.makeXHR=function(t){var n,r,a=new XMLHttpRequest,i=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[i],u=!1;
null==i&&(i=0),null!=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[i].url&&(o=this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).segs[i].url),t?(n=0,r=s.initRequestData.end,null!=s.indexRequestData&&(r=s.indexRequestData.end,u=!0)):(n=l.offset,r=l.offset+l.size-1);var d=null;null!=n&&null!=r&&(d="bytes="+n+"-"+r);var c=!!/youtube.com/.exec(o);if(d&&c&&(o=o.replace(/&range=[^&]*/,""),o+="&range="+d.substring(6)),a.open("GET",o),a.responseType="arraybuffer",a.startByte=n,null==d||c||a.setRequestHeader("Range",d),
a.addEventListener("load",this.onXHRLoad.bind(this)),null==o)throw"Null URL";return a.is_init=t,a.is_index=u,a.lastTime=null,a.lastSize=null,a.addEventListener("progress",this.adaptiveManager_.onBandwithTracking.bind(this.adaptiveManager_)),a.send(),e.dlog(2,"Sent XHR: url="+o+", range="+d),a},t.prototype.findRangeForPlaybackTime=function(e,t){for(var n=e.buffered,r=0;r<n.length;r++)if(n.start(r)<=t&&n.end(r)>=t)return{start:n.start(r),end:n.end(r)}},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},r=e.createSSInit(n);
return this.mediaSrcMgr_.getCurrentRep(this.bufferIndex_).initFragment=e.extractInit(r.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 r=-1;this.mediaSrcMgr_.mime(this.bufferIndex_).indexOf("video")>=0&&(r=this.adaptiveManager_.adapt(this.mediaSrcMgr_.getLevel(this.bufferIndex_))),r>=0?(this.cancelRequests(),this.mediaSrcMgr_.changeQuality(this.bufferIndex_,r)):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"],r=0;r<n.length;r++){var a=t(n[r]);e[n[r]]=a}if(e&&e.url)for(var i in e)e.hasOwnProperty(i)&&(this.options[i]=e[i])}var r={Audio_Type:"audio",Video_Type:"video",Image_Type:"img",MSE_Type:"mse"},a=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},i={AUTO_PAUSE_START:1,PAUSE_RESUME:5};a.prototype.destroy=function(){return this.destroyed_?void e.log("Refusing to destroy a second time"):(this.removeAllMediaEventListeners(),
this.mediaElementType_!==r.Image_Type&&this.mediaElement_.pause(),this.mediaElementType_===r.MSE_Type&&this.stopProgressTimer(),this.mediaSrcMgr_&&this.mediaSrcMgr_.destroy(),delete e.player,delete this.mediaElement_,delete this.imageElement_,void(this.destroyed_=!0))},a.prototype.getMediaElement=function(){return this.mediaElement_},a.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},a.prototype.onPlay=function(t){e.log("Playing"),this.mediaElement_.autopause_pending=!1,this.mediaElement_.autopaused=!1,this.mediaElement_.autopause_time=null},a.prototype.onError=function(t){e.log("Error ("+this.mediaElement_.error.code+")")},a.prototype.cancelRequests=function(){for(var e=0;e<this.fragmentManagers_.length;e++)this.fragmentManagers_[e].cancelRequests()},a.prototype.onSeeking=function(t){e.log("Seeking"),this.cancelRequests(),this.mediaSrcMgr_.resetAll("seeking");
},a.prototype.onSeeked=function(t){e.log("Seeked")},a.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 r=!1,a=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>=i.PAUSE_RESUME&&s++:l<i.AUTO_PAUSE_START&&(r=!0);
}else a++;return a>0?void(a===this.fragmentManagers_.length&&this.mediaSrcMgr_.endOfStream()):void(this.mediaElement_.paused?this.mediaElement_.autopaused&&s===this.fragmentManagers_.length&&(e.dlog(2,"Autoresuming"),this.mediaElement_.play()):r&&(e.dlog(2,"Autopausing"),this.mediaElement_.autopause_pending=!0,this.mediaElement_.pause()))},a.prototype.createMediaElement=function(){var t=document.getElementById("mediaElement");this.mediaElement_=document.createElement(r.Video_Type),this.imageElement_=document.createElement(r.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")},a.prototype.showMediaElement=function(t){var n=document.getElementById("mediaElement");this.mediaElementType_===r.MSE_Type&&(this.removeMediaEventListener("seeking"),this.removeMediaEventListener("seeked"),
this.removeMediaEventListener("pause"),this.removeMediaEventListener("play"),this.removeMediaEventListener("error"),t!==r.MSE_Type&&(this.stopProgressTimer(),this.mediaSrcMgr_.destroy(),this.mediaSrcMgr_=new e.MediaSourceManager)),this.mediaElementType_!==r.Image_Type&&(this.mediaElement_.play(0),this.mediaElement_.pause());var a=n.children;if(a&&a.length>0)for(var i=0;i<a.length;i++)"VIDEO"===a[i].nodeName&&t!==r.Image_Type?a[i].style.display="block":"IMG"===a[i].nodeName&&t===r.Image_Type?a[i].style.display="block":(a[i].style.display="none",
a[i].src=null);this.mediaElementType_=t},a.prototype.addMediaEventListener=function(e,t){var n=t.bind(this);this.mediaElement_.addEventListener(e,n),this.mediaEvents_[e]=n},a.prototype.removeMediaEventListener=function(e){this.mediaElement_.removeEventListener(e,this.mediaEvents_[e]),this.mediaEvents_[e]=null},a.prototype.removeAllMediaEventListeners=function(){for(var e in this.mediaEvents_)e&&this.removeMediaEventListener(e)},a.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"},a.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))},a.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,r=e[0].end,a=[],i=0;i<e.length;i++){var s=new TextTrackCue(e[i].start,e[i].end,e[i].caption);if(n===e[i].start&&r===e[i].end&&a.push(s),n!==e[i].start||r!==e[i].end||i===e.length-1){for(var o=a.length-1;o>=0;o--)t.addCue(a[o]);
a.length=0,n=e[i].start,r=e[i].end,i<e.length&&a.push(s)}}},a.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()},
a.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))},a.prototype.stopProgressTimer=function(){null!==this.progressTimer_&&(e.dlog(2,"Deregistering progress timer"),window.clearInterval(this.progressTimer_),this.progressTimer_=null)},a.prototype.startProgressTimer=function(){
null===this.progressTimer_&&(e.dlog(2,"Starting progress timer"),this.progressTimer_=setInterval(this.onProgress.bind(this),250))},a.prototype.initializeSimplePlayer=function(e,t){e!==r.Image_Type?(this.mediaElement_.src=t,this.mediaElement_.play()):this.imageElement_.src=t},a.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()},a.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))},a.prototype.getMediaType=function(t){var n=t.length;if(n<5)return e.log("Error invalid url"),null;var a=t.substring(t.length-4,t.length);switch(a){case".webm":case".mkv":case".mp4":return r.Video_Type;
case".mp3":return r.Audio_Type;case".jpg":return r.Image_Type;case".mpd":return r.MSE_Type;default:return r.MSE_Type}},a.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===r.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=a}(),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,r,a){return function(){var i,o;if(a)n(e);else{try{if((i=e.responseXML)&&(o=i.firstChild,i.lastChild&&"parsererror"===i.lastChild.nodeName))return void(r&&r("Invalid XML"))}catch(l){}if(i&&o)return n(e);(i=s.parseXML(e.responseText))&&i.firstChild?(e=s.extend({},e,{responseXML:i}),n(e)):r&&r(e.responseText?"Invalid XML":t)}}}var r=document,a=window,i=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=r.location.href),s.exists(e)){var n;if(s.exists(e)){n=e.indexOf("://");var a=e.indexOf("?");n=0<n&&(0>a||a>n)}else n=void 0;if(n)return e;n=t.substring(0,t.indexOf("://")+3);var i,a=t.substring(n.length,t.indexOf("/",n.length+1));0===e.indexOf("/")?i=e.split("/"):(i=t.split("?")[0],i=i.substring(n.length+a.length+1,i.lastIndexOf("/")),
i=i.split("/").concat(e.split("/")));for(var o=[],l=0;l<i.length;l++)i[l]&&s.exists(i[l])&&"."!=i[l]&&(".."==i[l]?o.pop():o.push(i[l]));return n+a+"/"+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(r){}});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!==i.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){r.cookie="jwplayer."+e+"="+t+"; path=/"},s.getCookies=function(){for(var e={},t=r.cookie.split("; "),n=0;n<t.length;n++){var a=t[n].split("=");0===a[0].indexOf("jwplayer.")&&(e[a[0].substring(9,a[0].length)]=a[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 r=s.extend({},n);if(t!=e.events.JWPLAYER_FULLSCREEN||r.fullscreen)if("object"==typeof r.data){var a=r.data;delete r.data,r=s.extend(r,a)}else"object"==typeof r.metadata&&s.deepReplaceKeyName(r.metadata,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]);else r.fullscreen="true"==r.message,delete r.message;return s.foreach(["position","duration","offset"],function(e,t){
r[t]&&(r[t]=Math.round(1e3*r[t])/1e3)}),r},s.flashVersion=function(){if(s.isAndroid())return 0;var e,t=i.plugins;try{if("undefined"!==t&&(e=t["Shockwave Flash"]))return parseInt(e.description.replace(/\D+(\d+)\..*/,"$1"),10)}catch(n){}if("undefined"!=typeof a.ActiveXObject)try{if(e=new a.ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return parseInt(e.GetVariable("$version").split(" ")[1].split(",")[0],10)}catch(r){}return 0},s.getScriptPath=function(e){for(var t=r.getElementsByTagName("script"),n=0;n<t.length;n++){
var a=t[n].src;if(a&&0<=a.indexOf(e))return a.substr(0,a.indexOf(e))}return""},s.deepReplaceKeyName=function(t,n,r){switch(e.utils.typeOf(t)){case"array":for(var a=0;a<t.length;a++)t[a]=e.utils.deepReplaceKeyName(t[a],n,r);break;case"object":s.foreach(t,function(a,i){var s;if(n instanceof Array&&r instanceof Array){if(n.length!=r.length)return;s=n}else s=[n];for(var o=a,l=0;l<s.length;l++)o=o.replace(RegExp(n[l],"g"),r[l]);t[o]=e.utils.deepReplaceKeyName(i,n,r),a!=o&&delete t[a]})}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,r;for(n in e)"function"==s.typeOf(e.hasOwnProperty)?e.hasOwnProperty(n)&&(r=e[n],t(n,r)):(r=e[n],t(n,r))},s.isHTTPS=function(){return 0===a.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,r,i){var o;if(0<e.indexOf("#")&&(e=e.replace(/#.*$/,"")),e&&0<=e.indexOf("://")&&e.split("/")[2]!=a.location.href.split("/")[2]&&s.exists(a.XDomainRequest))o=new a.XDomainRequest,o.onload=n(o,e,t,r,i),o.ontimeout=o.onprogress=function(){},o.timeout=5e3;else{if(!s.exists(a.XMLHttpRequest))return r&&r(),o;var l=o=new a.XMLHttpRequest,u=e;o.onreadystatechange=function(){if(4===l.readyState)switch(l.status){case 200:n(l,u,t,r,i)();break;case 404:r("File not found");
}}}return o.overrideMimeType&&o.overrideMimeType("text/xml"),o.onerror=function(){r("Error loading file")},setTimeout(function(){try{o.open("GET",e,!0),o.send()}catch(t){r&&r(e)}},0),o},s.parseXML=function(e){var t;try{if(a.DOMParser){if(t=(new a.DOMParser).parseFromString(e,"text/xml"),t.childNodes&&t.childNodes.length&&"parsererror"==t.childNodes[0].firstChild.nodeName)return}else t=new a.ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)}catch(n){return}return t},s.filterPlaylist=function(e,t){
var n,r,a,i,o=[];for(n=0;n<e.length;n++)if(r=s.extend({},e[n]),r.sources=s.filterSources(r.sources),0<r.sources.length){for(a=0;a<r.sources.length;a++)i=r.sources[a],i.label||(i.label=a.toString());o.push(r)}if(t&&0===o.length)for(n=0;n<e.length;n++)if(r=s.extend({},e[n]),r.sources=s.filterSources(r.sources,!0),0<r.sources.length){for(a=0;a<r.sources.length;a++)i=r.sources[a],i.label||(i.label=a.toString());o.push(r)}return o},s.filterSources=function(t,n){var r,a,i=s.extensionmap;if(t){a=[];for(var o=0;o<t.length;o++){
var l=t[o].type,u=t[o].file;u&&(u=s.trim(u)),l||(l=i.extType(s.extension(u)),t[o].type=l),n?e.embed.flashCanPlay(u,l)&&(r||(r=l),l==r&&a.push(s.extend({},t[o]))):s.canPlayHTML5(l)&&(r||(r=l),l==r&&a.push(s.extend({},t[o])))}}return a},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,r={mp4:t+"mp4",vorbis:"audio/ogg",ogg:t+"ogg",webm:t+"webm",aac:"audio/mp4",mp3:"audio/mpeg",hls:"application/vnd.apple.mpegurl"},a={mp4:r.mp4,f4v:r.mp4,m4v:r.mp4,mov:r.mp4,m4a:r.aac,
f4a:r.aac,aac:r.aac,mp3:r.mp3,ogv:r.ogg,ogg:r.vorbis,oga:r.vorbis,webm:r.webm,m3u8:r.hls,hls:r.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"},i=e.extensionmap={};n(a,function(e,t){i[e]={html5:t}}),n(t,function(e,t){i[e]||(i[e]={}),i[e].flash=t}),i.types=r,i.mimeType=function(e){var t;return n(r,function(n,r){!t&&r==e&&(t=n)}),t},i.extType=function(e){return i.mimeType(a[e])}}(jwplayer.utils),function(e){var t=e.loaderstatus={NEW:0,LOADING:1,
ERROR:2,COMPLETE:3},n=document;e.scriptloader=function(r){function a(){s=t.ERROR,l.sendEvent(o.ERROR)}function i(){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[r];if(!l||l.getStatus()!=t.NEW&&l.getStatus()!=t.LOADING){if(e.scriptloader.loaders[r]=this,s==t.NEW){s=t.LOADING;var u=n.createElement("script");u.addEventListener?(u.onload=i,u.onerror=a):u.readyState&&(u.onreadystatechange=function(){
("loaded"==u.readyState||"complete"==u.readyState)&&i()}),n.getElementsByTagName("head")[0].appendChild(u),u.src=r}}else l.addEventListener(o.ERROR,a),l.addEventListener(o.COMPLETE,i)},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(r){function a(e){
e.type==n?(l=!0,d=s(f.DRAG_START,e)):e.type==t?l&&(c||(i(f.DRAG_START,e,d),c=!0),i(f.DRAG,e)):(l&&(c?i(f.DRAG_END,e):(e.cancelBubble=!0,i(f.TAP,e))),l=c=!1,d=null)}function i(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 r=o.getBoundingClientRect(),n={type:e,target:o,
x:n.pageX-window.pageXOffset-r.left,y:n.pageY,deltaX:0,deltaY:0};return e!=f.TAP&&d&&(n.deltaX=n.x-d.x,n.deltaY=n.y-d.y),n}var o=r,l=!1,u={},d=null,c=!1,f=e.touchEvents;return document.addEventListener(t,a),document.addEventListener("touchend",function(e){l&&c&&i(f.DRAG_END,e),l=c=!1,d=null}),document.addEventListener("touchcancel",a),r.addEventListener(n,a),r.addEventListener("touchend",a),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,r,a;this.edition=function(){return a&&a.getTime()<(new Date).getTime()?"invalid":n},this.token=function(){return r},e.exists(t)||(t="");try{t=e.tea.decrypt(t,"36QXq4W@GSBV^teR");var i=t.split("/");(n=i[0])?/^(free|pro|premium|ads)$/i.test(n)?(r=i[1],i[2]&&0<parseInt(i[2])&&(a=new Date,a.setTime(String(i[2])))):n="invalid":n="free";
}catch(s){n="invalid"}}}(jwplayer.utils),function(e){var t=e.tea={};t.encrypt=function(e,a){if(0==e.length)return"";var i=t.strToLongs(r.encode(e));1>=i.length&&(i[1]=0);for(var s,o=t.strToLongs(r.encode(a).slice(0,16)),l=i.length,u=i[l-1],d=i[0],c=Math.floor(6+52/l),f=0;0<c--;){f+=2654435769,s=f>>>2&3;for(var p=0;p<l;p++)d=i[(p+1)%l],u=(u>>>5^d<<2)+(d>>>3^u<<4)^(f^d)+(o[3&p^s]^u),u=i[p]+=u}return i=t.longsToStr(i),n.encode(i)},t.decrypt=function(e,a){if(0==e.length)return"";for(var i,s=t.strToLongs(n.decode(e)),o=t.strToLongs(r.encode(a).slice(0,16)),l=s.length,u=s[l-1],d=s[0],c=2654435769*Math.floor(6+52/l);0!=c;){
i=c>>>2&3;for(var f=l-1;0<=f;f--)u=s[0<f?f-1:l-1],u=(u>>>5^d<<2)+(d>>>3^u<<4)^(c^d)+(o[3&f^i]^u),d=s[f]-=u;c-=2654435769}return s=t.longsToStr(s),s=s.replace(/\0+$/,""),r.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 a,i,s,o,l,u,d=[],c="",f=n.code;if(u=("undefined"==typeof t?0:t)?r.encode(e):e,l=u.length%3,0<l)for(;3>l++;)c+="=",u+="\0";for(l=0;l<u.length;l+=3)a=u.charCodeAt(l),i=u.charCodeAt(l+1),s=u.charCodeAt(l+2),o=a<<16|i<<8|s,a=o>>18&63,i=o>>12&63,s=o>>6&63,o&=63,d[l/3]=f.charAt(a)+f.charAt(i)+f.charAt(s)+f.charAt(o);return d=d.join(""),d=d.slice(0,d.length-c.length)+c},decode:function(e,t){
t="undefined"!=typeof t&&t;var a,i,s,o,l,u,d=[],c=n.code;u=t?r.decode(e):e;for(var f=0;f<u.length;f+=4)a=c.indexOf(u.charAt(f)),i=c.indexOf(u.charAt(f+1)),o=c.indexOf(u.charAt(f+2)),l=c.indexOf(u.charAt(f+3)),s=a<<18|i<<12|o<<6|l,a=s>>>16&255,i=s>>>8&255,s&=255,d[f/4]=String.fromCharCode(a,i,s),64==l&&(d[f/4]=String.fromCharCode(a,i)),64==o&&(d[f/4]=String.fromCharCode(a));return o=d.join(""),t?r.decode(o):o}},r={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,r){function a(e,n,r){if(e)for(var a=0;a<e.length;a++){var i=e[a];if(i){null!==i.count&&0===--i.count&&delete e[a];
try{i.listener(n)}catch(s){t.log('Error handling "'+r+'" event listener ['+a+"]: "+s.toString(),i.listener,n)}}}}var i,s;this.resetEventListeners=function(){i={},s=[]},this.resetEventListeners(),this.addEventListener=function(e,n,r){try{t.exists(i[e])||(i[e]=[]),"string"==t.typeOf(n)&&(n=new Function("return "+n)()),i[e].push({listener:n,count:r||null})}catch(a){t.log("error",a)}return!1},this.removeEventListener=function(e,n){if(i[e]){try{for(var r=0;r<i[e].length;r++)if(i[e][r].listener.toString()==n.toString()){
i[e].splice(r,1);break}}catch(a){t.log("error",a)}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(r){t.log("error",r)}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(r){t.log("error",r)}return!1}},this.sendEvent=function(o,l){t.exists(l)||(l={}),t.extend(l,{id:n,version:e.version,type:o}),r&&t.log(o,l),a(i[o],l,o),
a(s,l,o)}}}(window.jwplayer),function(e){var t={},n={};e.plugins=function(){},e.plugins.loadPlugins=function(r,a){return n[r]=new e.plugins.pluginloader(new e.plugins.model(t),a),n[r]},e.plugins.registerPlugin=function(n,r,a,i){var s=e.utils.getPluginName(n);t[s]||(t[s]=new e.plugins.plugin(n)),t[s].registerPlugin(n,r,a,i)}}(jwplayer),function(e){e.plugins.model=function(t){this.addPlugin=function(n){var r=e.utils.getPluginName(n);return t[r]||(t[r]=new e.plugins.plugin(n)),t[r]},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(r){function a(){switch(t.getPluginPathType(r)){case t.pluginPathType.ABSOLUTE:return r;case t.pluginPathType.RELATIVE:return t.getAbsolutePath(r,window.location.href)}}function i(){d=setTimeout(function(){c=t.loaderstatus.COMPLETE,f.sendEvent(n.COMPLETE)},1e3)}function s(){c=t.loaderstatus.ERROR,f.sendEvent(n.ERROR)}var o,l,u,d,c=t.loaderstatus.NEW,f=new n.eventdispatcher;
t.extend(this,f),this.load=function(){if(c==t.loaderstatus.NEW)if(0<r.lastIndexOf(".swf"))o=r,c=t.loaderstatus.COMPLETE,f.sendEvent(n.COMPLETE);else if(t.getPluginPathType(r)==t.pluginPathType.CDN)c=t.loaderstatus.COMPLETE,f.sendEvent(n.COMPLETE);else{c=t.loaderstatus.LOADING;var e=new t.scriptloader(a());e.addEventListener(n.COMPLETE,i),e.addEventListener(n.ERROR,s),e.load()}},this.registerPlugin=function(e,r,a,i){d&&(clearTimeout(d),d=void 0),u=r,a&&i?(o=i,l=a):"string"==typeof a?o=a:"function"==typeof a?l=a:!a&&!i&&(o=e),
c=t.loaderstatus.COMPLETE,f.sendEvent(n.COMPLETE)},this.getStatus=function(){return c},this.getPluginName=function(){return t.getPluginName(r)},this.getFlashPath=function(){if(o)switch(t.getPluginPathType(o)){case t.pluginPathType.ABSOLUTE:return o;case t.pluginPathType.RELATIVE:return 0<r.lastIndexOf(".swf")?t.getAbsolutePath(o,window.location.href):t.getAbsolutePath(o,a())}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 r}}}(jwplayer.plugins),function(e){var t=e.utils,n=e.events,r=t.foreach;e.plugins.pluginloader=function(a,i){function s(){c?p.sendEvent(n.ERROR,{message:l}):d||(d=!0,u=t.loaderstatus.COMPLETE,p.sendEvent(n.COMPLETE))}function o(){if(f||s(),!d&&!c){var n=0,r=a.getPlugins();t.foreach(f,function(a){a=t.getPluginName(a);var i=r[a];a=i.getJS();var o=i.getTarget(),i=i.getStatus();i==t.loaderstatus.LOADING||i==t.loaderstatus.NEW?n++:a&&(!o||parseFloat(o)>parseFloat(e.version))&&(c=!0,
l="Incompatible player version",s())}),0==n&&s()}}var l,u=t.loaderstatus.NEW,d=!1,c=!1,f=i,p=new n.eventdispatcher;t.extend(this,p),this.setupPlugins=function(e,n,i){var s={length:0,plugins:{}},o=0,l={},u=a.getPlugins();return r(n.plugins,function(r,a){var d=t.getPluginName(r),c=u[d],f=c.getFlashPath(),p=c.getJS(),h=c.getURL();f&&(s.plugins[f]=t.extend({},a),s.plugins[f].pluginmode=c.getPluginmode(),s.length++);try{if(p&&n.plugins&&n.plugins[h]){var v=document.createElement("div");v.id=e.id+"_"+d,
v.style.position="absolute",v.style.top=0,v.style.zIndex=o+10,l[d]=c.getNewInstance(e,t.extend({},n.plugins[h]),v),o++,e.onReady(i(l[d],v,!0)),e.onResize(i(l[d],v))}}catch(g){t.log("ERROR: Failed to load "+d+".")}}),e.plugins=l,s},this.load=function(){if(!t.exists(i)||"object"==t.typeOf(i)){u=t.loaderstatus.LOADING,r(i,function(e){t.exists(e)&&(e=a.addPlugin(e),e.addEventListener(n.COMPLETE,o),e.addEventListener(n.ERROR,h))});var e=a.getPlugins();r(e,function(e,t){t.load()})}o()};var h=this.pluginFailed=function(){
c||(c=!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,r){
for(var a=[],i=[],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 r.sources,a.push({file:s(l,"file"),"default":s(l,"default"),label:s(l,"label"),type:s(l,"type")})):"track"==u?(delete r.tracks,i.push({file:s(l,"file"),"default":s(l,"default"),kind:s(l,"kind"),label:s(l,"label")})):(r[u]=e.utils.serialize(t.textContent(l)),"file"==u&&r.sources&&delete r.sources)}r.file||(r.file=r.link)}if(a.length)for(r.sources=[],
o=0;o<a.length;o++)0<a[o].file.length&&(a[o].default="true"==a[o].default,a[o].label.length||delete a[o].label,r.sources.push(a[o]));if(i.length)for(r.tracks=[],o=0;o<i.length;o++)0<i[o].file.length&&(i[o].default="true"==i[o].default,i[o].kind=i[o].kind.length?i[o].kind:"captions",i[o].label.length||delete i[o].label,r.tracks.push(i[o]));return r}}(jwplayer),function(e){var t=jwplayer.utils,n=t.xmlAttribute,r=e.localName,a=e.textContent,i=e.numChildren,s=e.mediaparser=function(){};s.parseGroup=function(e,o){
var l,u,d=[];for(u=0;u<i(e);u++)if(l=e.childNodes[u],"media"==l.prefix&&r(l))switch(r(l).toLowerCase()){case"content":n(l,"duration")&&(o.duration=t.seconds(n(l,"duration"))),0<i(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=a(l);break;case"description":o.description=a(l);break;case"guid":o.mediaid=a(l);break;case"thumbnail":o.image||(o.image=n(l,"url"));break;case"group":
s.parseGroup(l,o);break;case"subtitle":var c={};if(c.file=n(l,"url"),c.kind="captions",0<n(l,"lang").length){var f=c;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,f.label=l}d.push(c)}for(o.hasOwnProperty("tracks")||(o.tracks=[]),u=0;u<d.length;u++)o.tracks.push(d[u]);return o}}(jwplayer.parsers),function(e){function t(t){for(var a={},i=0;i<t.childNodes.length;i++){var o=t.childNodes[i],l=s(o);
if(l)switch(l.toLowerCase()){case"enclosure":a.file=n.xmlAttribute(o,"url");break;case"title":a.title=r(o);break;case"guid":a.mediaid=r(o);break;case"pubdate":a.date=r(o);break;case"description":a.description=r(o);break;case"link":a.link=r(o);break;case"category":a.tags=a.tags?a.tags+r(o):r(o)}}return a=e.mediaparser.parseGroup(t,a),a=e.jwparser.parseEntry(t,a),new jwplayer.playlist.item(a)}var n=jwplayer.utils,r=e.textContent,a=e.getChildNode,i=e.numChildren,s=e.localName;e.rssparser={},e.rssparser.parse=function(e){
for(var n=[],r=0;r<i(e);r++){var o=a(e,r);if("channel"==s(o).toLowerCase())for(var l=0;l<i(o);l++){var u=a(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 r=0;r<t.length;r++)n.push(new e.playlist.item(t[r]));else n.push(new e.playlist.item(t));return n}}(jwplayer),function(e){var t=e.item=function(n){var r=jwplayer.utils,a=r.extend({},t.defaults,n);a.tracks=n&&r.exists(n.tracks)?n.tracks:[],
0==a.sources.length&&(a.sources=[new e.source(a)]);for(var i=0;i<a.sources.length;i++){var s=a.sources[i].default;a.sources[i].default=!!s&&"true"==s.toString(),a.sources[i]=new e.source(a.sources[i])}if(a.captions&&!r.exists(n.tracks)){for(n=0;n<a.captions.length;n++)a.tracks.push(a.captions[n]);delete a.captions}for(i=0;i<a.tracks.length;i++)a.tracks[i]=new e.track(a.tracks[i]);return a};t.defaults={description:"",image:"",mediaid:"",title:"",sources:[],tracks:[]}}(jwplayer.playlist),function(e){
var t=jwplayer,n=t.utils,r=t.events,a=t.parsers;e.loader=function(){function t(t){try{var n=t.responseXML.childNodes;t="";for(var i=0;i<n.length&&(t=n[i],!(8!=t.nodeType));i++);if("xml"==a.localName(t)&&(t=t.nextSibling),"rss"!=a.localName(t))s("Not a valid RSS feed");else{var l=new e(a.rssparser.parse(t));o.sendEvent(r.JWPLAYER_PLAYLIST_LOADED,{playlist:l})}}catch(u){s()}}function i(e){s(e.match(/invalid/i)?"Not a valid RSS feed":"")}function s(e){o.sendEvent(r.JWPLAYER_ERROR,{message:e?e:"Error loading file"
})}var o=new r.eventdispatcher;n.extend(this,o),this.load=function(e){n.ajax(e,t,i)}}}(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 r=t.extend({},n);return t.foreach(n,function(n){t.exists(e[n])&&(r[n]=e[n],delete e[n])}),r.type&&0<r.type.indexOf("/")&&(r.type=t.extensionmap.mimeType(r.type)),"m3u8"==r.type&&(r.type="hls"),"smil"==r.type&&(r.type="rtmp"),r}}(jwplayer.playlist),function(e){var t=jwplayer.utils,n={
file:void 0,label:void 0,kind:"captions","default":!1};e.track=function(e){var r=t.extend({},n);return e||(e={}),t.foreach(n,function(n){t.exists(e[n])&&(r[n]=e[n],delete e[n])}),r}}(jwplayer.playlist),function(e){function t(e,t,r){var a=e.style;a.backgroundColor="#000",a.color="#FFF",a.width=n.styleDimension(r.width),a.height=n.styleDimension(r.height),a.display="table",a.opacity=1,r=document.createElement("p"),a=r.style,a.verticalAlign="middle",a.textAlign="center",a.display="table-cell",a.font="15px/20px Arial, Helvetica, sans-serif",
r.innerHTML=t.replace(":",":<br>"),e.innerHTML="",e.appendChild(r)}var n=e.utils,r=e.events,a=!0,i=!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 d(){if(!I)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(!T)if("string"==n.typeOf(b.playlist)){var t=new e.playlist.loader;t.addEventListener(r.JWPLAYER_PLAYLIST_LOADED,function(e){
b.playlist=e.playlist,T=i,d()}),t.addEventListener(r.JWPLAYER_ERROR,function(e){T=i,p(e)}),T=a,t.load(b.playlist)}else if(_.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),f=new o[b.modes[t].type](g,b.modes[t],s,_,l);if(f.supportsConfig())return f.addEventListener(r.ERROR,c),f.embed(),u(l,s.events),l}var v;b.fallback?(v="No suitable players found and fallback enabled",M=setTimeout(function(){h(v,a)},10),n.log(v),new o.download(g,b,p)):(v="No suitable players found and fallback disabled",
h(v,i),n.log(v),g.parentNode.replaceChild(y,g))}}function c(e){v(S+e.message)}function f(e){v("Could not load plugins: "+e.message)}function p(e){v(e&&e.message?"Error loading playlist: "+e.message:S+"No playable sources found")}function h(e,t){M&&(clearTimeout(M),M=null),M=setTimeout(function(){M=null,l.dispatchEvent(r.JWPLAYER_SETUP_ERROR,{message:e,fallback:t})},0)}function v(e){I||(b.fallback?(I=a,t(g,e,b),h(e,a)):h(e,i))}var g,m,y,b=new o.config(l.config),P=b.width,w=b.height,S="Error loading player: ",_=e.plugins.loadPlugins(l.id,b.plugins),T=i,I=i,M=null;
return b.fallbackDiv&&(y=b.fallbackDiv,delete b.fallbackDiv),b.id=l.id,m=s.getElementById(l.id),b.aspectratio?l.config.aspectratio=b.aspectratio:delete l.config.aspectratio,g=s.createElement("div"),g.id=m.id,g.style.width=0<P.toString().indexOf("%")?P:P+"px",g.style.height=0<w.toString().indexOf("%")?w:w+"px",m.parentNode.replaceChild(g,m),this.embed=function(){I||(_.addEventListener(r.COMPLETE,d),_.addEventListener(r.ERROR,f),_.load())},this.errorScreen=v,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 a(e.playlist[t]);else{var i={};r.foreach(a.defaults,function(t){n(e,i,t)}),i.sources||(e.levels?(i.sources=e.levels,delete e.levels):(t={},n(e,t,"file"),n(e,t,"type"),i.sources=t.file?[t]:[])),e.playlist=[new a(i)]}}function n(e,t,n){r.exists(e[n])&&(t[n]=e[n],delete e[n])}var r=e.utils,a=e.playlist.item;(e.embed.config=function(n){var a={fallback:!0,height:270,primary:"html5",width:480,base:n.base?n.base:r.getScriptPath("jwplayer.js"),
aspectratio:""};n=r.extend(a,e.defaults,n);var a={type:"html5",src:n.base+"jwplayer.html5.js"},i={type:"flash",src:n.base+"jwplayer.flash.swf"};if(n.modes="flash"==n.primary?[i,a]:[a,i],n.listbar&&(n.playlistsize=n.listbar.size,n.playlistposition=n.listbar.position,n.playlistlayout=n.listbar.layout),n.flashplayer&&(i.src=n.flashplayer),n.html5player&&(a.src=n.html5player),t(n),i=n.aspectratio,"string"==typeof i&&r.exists(i)){var s=i.indexOf(":");-1==s?a=0:(a=parseFloat(i.substr(0,s)),i=parseFloat(i.substr(s+1)),
a=0>=a||0>=i?0:100*(i/a)+"%")}else a=0;return-1==n.width.toString().indexOf("%")?delete n.aspectratio:a?n.aspectratio=a:delete n.aspectratio,n}).addConfig=function(e,n){return t(n),r.extend(e,n)}}(jwplayer),function(e){var t=e.utils,n=document;e.embed.download=function(e,r,a){function i(e,r){for(var a=n.querySelectorAll(e),i=0;i<a.length;i++)t.foreach(r,function(e,t){a[i].style[e]=t})}function s(e,t,r){return e=n.createElement(e),t&&(e.className="jwdownload"+t),r&&r.appendChild(e),e}var o,l=t.extend({},r),u=l.width?l.width:480,d=l.height?l.height:320;
r=r.logo?r.logo:{prefix:t.repo(),file:"logo.png",margin:10};var c,f,p,h,l=l.playlist,v=["mp4","aac","mp3"];if(l&&l.length){for(h=l[0],o=h.sources,l=0;l<o.length;l++){var g=o[l],m=g.type?g.type:t.extensionmap.extType(t.extension(g.file));g.file&&t.foreach(v,function(e){m==v[e]?(c=g.file,f=h.image):t.isYouTube(g.file)&&(p=g.file)})}c?(o=c,a=f,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="",
i(l+"display",{width:t.styleDimension(Math.max(320,u)),height:t.styleDimension(Math.max(180,d)),background:"black center no-repeat "+(a?"url("+a+")":""),backgroundSize:"contain",position:"relative",border:"none",display:"block"}),i(l+"display div",{position:"absolute",width:"100%",height:"100%"}),i(l+"logo",{top:r.margin+"px",right:r.margin+"px",background:"top right no-repeat url("+r.prefix+r.file+")"}),i(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?(r=p,e=s("iframe","",e),e.src="http://www.youtube.com/embed/"+t.youTubeID(r),e.width=u,e.height=d,e.style.border="none"):a()}}}(jwplayer),function(e){var t=e.utils,n=e.events,r={};(e.embed.flash=function(i,s,o,l,u){function d(e,t,n){var r=document.createElement("param");r.setAttribute("name",t),r.setAttribute("value",n),e.appendChild(r)}function c(e,t,n){return function(){try{n&&document.getElementById(u.id+"_wrapper").appendChild(t);var r=document.getElementById(u.id).getPluginConfig("display");
"function"==typeof e.resize&&e.resize(r.width,r.height),t.style.left=r.x,t.style.top=r.h}catch(a){}}}function f(e){if(!e)return{};var n={},r=[];return t.foreach(e,function(e,a){var i=t.getPluginName(e);r.push(e),t.foreach(a,function(e,t){n[i+"."+e]=t})}),n.plugins=r.join(","),n}var p=new e.events.eventdispatcher,h=t.flashVersion();t.extend(this,p),this.embed=function(){if(o.id=u.id,10>h)return p.sendEvent(n.ERROR,{message:"Flash version must be 10.0 or greater"}),!1;var e,a,v=u.config.listbar,g=t.extend({},o);
if(i.id+"_wrapper"==i.parentNode.id)e=document.getElementById(i.id+"_wrapper");else{if(e=document.createElement("div"),a=document.createElement("div"),a.style.display="none",a.id=i.id+"_aspect",e.id=i.id+"_wrapper",e.style.position="relative",e.style.display="block",e.style.width=t.styleDimension(g.width),e.style.height=t.styleDimension(g.height),u.config.aspectratio){var m=parseFloat(u.config.aspectratio);a.style.display="block",a.style.marginTop=u.config.aspectratio,e.style.height="auto",e.style.display="inline-block",
v&&("bottom"==v.position?a.style.paddingBottom=v.size+"px":"right"==v.position&&(a.style.marginBottom=-1*v.size*(m/100)+"px"))}i.parentNode.replaceChild(e,i),e.appendChild(i),e.appendChild(a)}for(e=l.setupPlugins(u,g,c),0<e.length?t.extend(g,f(e.plugins)):delete g.plugins,"undefined"!=typeof g["dock.position"]&&"false"==g["dock.position"].toString().toLowerCase()&&(g.dock=g["dock.position"],delete g["dock.position"]),e=g.wmode?g.wmode:g.height&&40>=g.height?"transparent":"opaque",a="height width modes events primary base fallback volume".split(" "),
v=0;v<a.length;v++)delete g[a[v]];a=t.getCookies(),t.foreach(a,function(e,t){"undefined"==typeof g[e]&&(g[e]=t)}),a=window.location.href.split("/"),a.splice(a.length-1,1),a=a.join("/"),g.base=a+"/",r[i.id]=g,t.isIE()?(a='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" " width="100%" height="100%"id="'+i.id+'" name="'+i.id+'" tabindex=0"">',a+='<param name="movie" value="'+s.src+'">',a+='<param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always">',a+='<param name="seamlesstabbing" value="true">',
a+='<param name="wmode" value="'+e+'">',a+='<param name="bgcolor" value="#000000">',a+="</object>",i.outerHTML=a,e=document.getElementById(i.id)):(a=document.createElement("object"),a.setAttribute("type","application/x-shockwave-flash"),a.setAttribute("data",s.src),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("bgcolor","#000000"),a.setAttribute("id",i.id),a.setAttribute("name",i.id),a.setAttribute("tabindex",0),d(a,"allowfullscreen","true"),d(a,"allowscriptaccess","always"),
d(a,"seamlesstabbing","true"),d(a,"wmode",e),i.parentNode.replaceChild(a,i),e=a),u.config.aspectratio&&(e.style.position="absolute"),u.container=e,u.setPlayer(e,"flash")},this.supportsConfig=function(){if(h){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&&a(e[n].file,e[n].type))return!0}catch(r){}}return!1}}).getVars=function(e){return r[e]};var a=e.embed.flashCanPlay=function(e,n){
if(t.isYouTube(e)||t.isRtmp(e,n)||"hls"==n)return!0;var r=t.extensionmap[n?n:t.extension(e)];return!!r&&!!r.flash}}(jwplayer),function(e){var t=e.utils,n=t.extensionmap,r=e.events;e.embed.html5=function(a,i,s,o,l){function u(e,t,n){return function(){try{var r=document.querySelector("#"+a.id+" .jwmain");n&&r.appendChild(t),"function"==typeof e.resize&&(e.resize(r.clientWidth,r.clientHeight),setTimeout(function(){e.resize(r.clientWidth,r.clientHeight)},400)),t.left=r.style.left,t.top=r.style.top}catch(i){}
}}function d(e){c.sendEvent(e.type,{message:"HTML5 player not found"})}var c=this,f=new r.eventdispatcher;t.extend(c,f),c.embed=function(){if(e.html5){o.setupPlugins(l,s,u),a.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(i.src),n.addEventListener(r.ERROR,d),n.addEventListener(r.COMPLETE,c.embed),n.load()},c.supportsConfig=function(){if(e.vid.canPlayType)try{if("string"==t.typeOf(s.playlist))return!0;
for(var r=s.playlist[0].sources,a=0;a<r.length;a++){var i,o=r[a].file,l=r[a].type;if(null!==navigator.userAgent.match(/BlackBerry/i)||t.isAndroid()&&("m3u"==t.extension(o)||"m3u8"==t.extension(o))||t.isRtmp(o,l))i=!1;else{var u,d=n[l?l:t.extension(o)];if(!d||d.flash&&!d.html5)u=!1;else{var c=d.html5,f=e.vid;if(c)try{u=!!f.canPlayType(c)}catch(p){u=!1}else u=!0}i=u}if(i)return!0}}catch(h){}return!1}}}(jwplayer),function(e){var t=e.embed,n=e.utils,r=/\.(js|swf)$/;e.embed=n.extend(function(a){function i(){
s="Adobe SiteCatalyst Error: Could not find Media Module"}var s,o=n.repo(),l=n.extend({},e.defaults),u=n.extend({},l,a.config),d=a.config,c=u.plugins,f=u.analytics,p=o+"jwpsrv.js",h=o+"sharing.js",v=o+"related.js",g=o+"gapro.js",l=e.key?e.key:l.key,m=new e.utils.key(l).edition(),c=c?c:{};switch("ads"==m&&u.advertising&&(r.test(u.advertising.client)?c[u.advertising.client]=u.advertising:c[o+u.advertising.client+".js"]=u.advertising),delete d.advertising,d.key=l,u.analytics&&r.test(u.analytics.client)&&(p=u.analytics.client),
delete d.analytics,f&&"ads"!==m&&delete f.enabled,"free"!=m&&f&&!1===f.enabled||(c[p]=f?f:{}),delete c.sharing,delete c.related,m){case"ads":if(d.sitecatalyst)try{window.s&&window.s.hasOwnProperty("Media")?new e.embed.sitecatalyst(a):i()}catch(y){i()}case"premium":u.related&&(r.test(u.related.client)&&(v=u.related.client),c[v]=u.related),u.ga&&(r.test(u.ga.client)&&(g=u.ga.client),c[g]=u.ga);case"pro":u.sharing&&(r.test(u.sharing.client)&&(h=u.sharing.client),c[h]=u.sharing),u.skin&&(d.skin=u.skin.replace(/^(beelden|bekle|five|glow|modieus|roundster|stormtrooper|vapor)$/i,n.repo()+"skins/$1.xml"));
}return d.plugins=c,a.config=d,a=new t(a),s&&a.errorScreen(s),a},e.embed)}(jwplayer),function(e){var t=jwplayer.utils;e.sitecatalyst=function(e){function n(e){f.debug&&t.log(e)}function r(e){return e=e.split("/"),e=e[e.length-1],e=e.split("?"),e[0]}function a(){if(!h){h=!0;var e=c.getPosition();n("stop: "+o+" : "+e),s.Media.stop(o,e)}}function i(){v||(a(),v=!0,n("close: "+o),s.Media.close(o),d=!0,u=0)}var o,l,u,d,c=e,f=t.extend({},c.config.sitecatalyst),p={onPlay:function(){if(!d){var e=c.getPosition();
h=!1,n("play: "+o+" : "+e),s.Media.play(o,e)}},onPause:a,onBuffer:a,onIdle:i,onPlaylistItem:function(e){try{d=!0,i(),u=0;var n;if(f.mediaName)n=f.mediaName;else{var a=c.getPlaylistItem(e.index);n=a.title?a.title:a.file?r(a.file):a.sources&&a.sources.length?r(a.sources[0].file):""}o=n,l=f.playerName?f.playerName:c.id}catch(s){t.log(s)}},onTime:function(){if(d){var e=c.getDuration();if(-1==e)return;v=h=d=!1,n("open: "+o+" : "+e+" : "+l),s.Media.open(o,e,l),n("play: "+o+" : 0"),s.Media.play(o,0)}if(e=c.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:i},h=!0,v=!0;t.foreach(p,function(e){c[e](p[e])})}}(jwplayer.embed),function(e,t){var n=[],r=e.utils,a=e.events,i=a.state,s=document,o=e.api=function(n){function l(e,t){return function(n){return t(e,n)}}function u(e,t){return m[e]||(m[e]=[],c(a.JWPLAYER_PLAYER_STATE,function(t){var n=t.newstate;if(t=t.oldstate,n==e){var r=m[n];if(r)for(var a=0;a<r.length;a++){
var i=r[a];"function"==typeof i&&i.call(this,{oldstate:t,newstate:n})}}})),m[e].push(t),v}function d(e,t){try{e.jwAddEventListener(t,'function(dat) { jwplayer("'+v.id+'").dispatchEvent("'+t+'", dat); }')}catch(n){r.log("Could not add internal listener")}}function c(e,t){return g[e]||(g[e]=[],p&&y&&d(p,e)),g[e].push(t),v}function f(){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,h,v=this,g={},m={},y=!1,b=[],P={},w={};v.container=n,v.id=n.id,v.getBuffer=function(){return f("jwGetBuffer")},v.getContainer=function(){return v.container},v.addButton=function(e,t,n,a){try{w[a]=n,f("jwDockAddButton",e,t,"jwplayer('"+v.id+"').callback('"+a+"')",a)}catch(i){r.log("Could not add dock button"+i.message);
}},v.removeButton=function(e){f("jwDockRemoveButton",e)},v.callback=function(e){w[e]&&w[e]()},v.forceState=function(e){return f("jwForceState",e),v},v.releaseState=function(){return f("jwReleaseState")},v.getDuration=function(){return f("jwGetDuration")},v.getFullscreen=function(){return f("jwGetFullscreen")},v.getHeight=function(){return f("jwGetHeight")},v.getLockState=function(){return f("jwGetLockState")},v.getMeta=function(){return v.getItemMeta()},v.getMute=function(){return f("jwGetMute")},
v.getPlaylist=function(){var e=f("jwGetPlaylist");return"flash"==v.renderingMode&&r.deepReplaceKeyName(e,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]),e},v.getPlaylistItem=function(e){return r.exists(e)||(e=v.getPlaylistIndex()),v.getPlaylist()[e]},v.getPlaylistIndex=function(){return f("jwGetPlaylistIndex")},v.getPosition=function(){return f("jwGetPosition")},v.getRenderingMode=function(){return v.renderingMode},v.getState=function(){return f("jwGetState")},v.getVolume=function(){
return f("jwGetVolume")},v.getWidth=function(){return f("jwGetWidth")},v.setFullscreen=function(e){return r.exists(e)?f("jwSetFullscreen",e):f("jwSetFullscreen",!f("jwGetFullscreen")),v},v.setMute=function(e){return r.exists(e)?f("jwSetMute",e):f("jwSetMute",!f("jwGetMute")),v},v.lock=function(){return v},v.unlock=function(){return v},v.load=function(e){return f("jwLoad",e),v},v.playlistItem=function(e){return f("jwPlaylistItem",parseInt(e,10)),v},v.playlistPrev=function(){return f("jwPlaylistPrev"),
v},v.playlistNext=function(){return f("jwPlaylistNext"),v},v.resize=function(e,t){if("flash"!==v.renderingMode)f("jwResize",e,t);else{var n=s.getElementById(v.id+"_wrapper"),a=s.getElementById(v.id+"_aspect");a&&(a.style.display="none"),n&&(n.style.display="block",n.style.width=r.styleDimension(e),n.style.height=r.styleDimension(t))}return v},v.play=function(e){return e===t?(e=v.getState(),f(e==i.PLAYING||e==i.BUFFERING?"jwPause":"jwPlay")):f("jwPlay",e),v},v.pause=function(e){return e===t?(e=v.getState(),
f(e==i.PLAYING||e==i.BUFFERING?"jwPause":"jwPlay")):f("jwPause",e),v},v.stop=function(){return f("jwStop"),v},v.seek=function(e){return f("jwSeek",e),v},v.setVolume=function(e){return f("jwSetVolume",e),v},v.createInstream=function(){return new o.instream(this,p)},v.setInstream=function(e){return h=e},v.loadInstream=function(e,t){return h=v.setInstream(v.createInstream()).init(t),h.loadItem(e),h},v.getQualityLevels=function(){return f("jwGetQualityLevels")},v.getCurrentQuality=function(){return f("jwGetCurrentQuality");
},v.setCurrentQuality=function(e){f("jwSetCurrentQuality",e)},v.getCaptionsList=function(){return f("jwGetCaptionsList")},v.getCurrentCaptions=function(){return f("jwGetCurrentCaptions")},v.setCurrentCaptions=function(e){f("jwSetCurrentCaptions",e)},v.getControls=function(){return f("jwGetControls")},v.getSafeRegion=function(){return f("jwGetSafeRegion")},v.setControls=function(e){f("jwSetControls",e)},v.destroyPlayer=function(){f("jwPlayerDestroy")},v.playAd=function(t){var n=e(v.id).plugins;n.vast&&n.vast.jwPlayAd(t);
},v.pauseAd=function(){var t=e(v.id).plugins;t.vast?t.vast.jwPauseAd():f("jwPauseAd")};var S={onBufferChange:a.JWPLAYER_MEDIA_BUFFER,onBufferFull:a.JWPLAYER_MEDIA_BUFFER_FULL,onError:a.JWPLAYER_ERROR,onSetupError:a.JWPLAYER_SETUP_ERROR,onFullscreen:a.JWPLAYER_FULLSCREEN,onMeta:a.JWPLAYER_MEDIA_META,onMute:a.JWPLAYER_MEDIA_MUTE,onPlaylist:a.JWPLAYER_PLAYLIST_LOADED,onPlaylistItem:a.JWPLAYER_PLAYLIST_ITEM,onPlaylistComplete:a.JWPLAYER_PLAYLIST_COMPLETE,onReady:a.API_READY,onResize:a.JWPLAYER_RESIZE,
onComplete:a.JWPLAYER_MEDIA_COMPLETE,onSeek:a.JWPLAYER_MEDIA_SEEK,onTime:a.JWPLAYER_MEDIA_TIME,onVolume:a.JWPLAYER_MEDIA_VOLUME,onBeforePlay:a.JWPLAYER_MEDIA_BEFOREPLAY,onBeforeComplete:a.JWPLAYER_MEDIA_BEFORECOMPLETE,onDisplayClick:a.JWPLAYER_DISPLAY_CLICK,onControls:a.JWPLAYER_CONTROLS,onQualityLevels:a.JWPLAYER_MEDIA_LEVELS,onQualityChange:a.JWPLAYER_MEDIA_LEVEL_CHANGED,onCaptionsList:a.JWPLAYER_CAPTIONS_LIST,onCaptionsChange:a.JWPLAYER_CAPTIONS_CHANGED,onAdError:a.JWPLAYER_AD_ERROR,onAdClick:a.JWPLAYER_AD_CLICK,
onAdImpression:a.JWPLAYER_AD_IMPRESSION,onAdTime:a.JWPLAYER_AD_TIME,onAdComplete:a.JWPLAYER_AD_COMPLETE,onAdCompanions:a.JWPLAYER_AD_COMPANIONS,onAdSkipped:a.JWPLAYER_AD_SKIPPED};r.foreach(S,function(e){v[e]=l(S[e],c)});var _={onBuffer:i.BUFFERING,onPause:i.PAUSED,onPlay:i.PLAYING,onIdle:i.IDLE};return r.foreach(_,function(e){v[e]=l(_[e],u)}),v.remove=function(){if(!y)throw"Cannot call remove() before player is ready";b=[],o.destroyPlayer(this.id)},v.setup=function(t){if(e.embed){var n=s.getElementById(v.id);
return n&&(t.fallbackDiv=n),n=v,b=[],o.destroyPlayer(n.id),n=e(v.id),n.config=t,new e.embed(n).embed(),n}return v},v.registerPlugin=function(t,n,r,a){e.plugins.registerPlugin(t,n,r,a)},v.setPlayer=function(e,t){p=e,v.renderingMode=t},v.detachMedia=function(){if("html5"==v.renderingMode)return f("jwDetachMedia")},v.attachMedia=function(e){if("html5"==v.renderingMode)return f("jwAttachMedia",e)},v.removeEventListener=function(e,t){var n=g[e];if(n)for(var r=n.length;r--;)n[r]===t&&n.splice(r,1)},v.dispatchEvent=function(e,t){
var n=g[e];if(n)for(var n=n.slice(0),i=r.translateEventResponse(e,t),s=0;s<n.length;s++){var o=n[s];if("function"==typeof o)try{e===a.JWPLAYER_PLAYLIST_LOADED&&r.deepReplaceKeyName(i.playlist,["__dot__","__spc__","__dsh__","__default__"],["."," ","-","default"]),o.call(this,i)}catch(l){r.log("There was an error calling back an event handler")}}},v.dispatchInstreamEvent=function(e){h&&h.dispatchEvent(e,arguments)},v.callInternal=f,v.playerReady=function(e){for(y=!0,p||v.setPlayer(s.getElementById(e.id)),
v.container=s.getElementById(v.id),r.foreach(g,function(e){d(p,e)}),c(a.JWPLAYER_PLAYLIST_ITEM,function(){P={}}),c(a.JWPLAYER_MEDIA_META,function(e){r.extend(P,e.metadata)}),v.dispatchEvent(a.API_READY);0<b.length;)f.apply(this,b.shift())},v.getItemMeta=function(){return P},v.isBeforePlay=function(){return f("jwIsBeforePlay")},v.isBeforeComplete=function(){return f("jwIsBeforeComplete")},v};o.selectPlayer=function(e){var t;return r.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,a=-1,i=0;i<n.length;i++)n[i].id==e&&(a=i,t=n[i]);return 0<=a&&(e=t.id,i=s.getElementById(e+("flash"==t.renderingMode?"_wrapper":"")),r.clearCss&&r.clearCss("#"+e),i&&("html5"==t.renderingMode&&t.destroyPlayer(),
t=s.createElement("div"),t.id=e,i.parentNode.replaceChild(t,i)),n.splice(a,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,r=t.state;e.api.instream=function(e,a){function i(t,n){return u[t]||(u[t]=[],a.jwInstreamAddEventListener(t,'function(dat) { jwplayer("'+e.id+'").dispatchInstreamEvent("'+t+'", dat); }')),u[t].push(n),this}function s(e,n){return d[e]||(d[e]=[],i(t.JWPLAYER_PLAYER_STATE,function(t){
var n=t.newstate,r=t.oldstate;if(n==e){var a=d[n];if(a)for(var i=0;i<a.length;i++){var s=a[i];"function"==typeof s&&s.call(this,{oldstate:r,newstate:n,type:t.type})}}})),d[e].push(n),this}var o,l,u={},d={},c=this;c.type="instream",c.init=function(){return e.callInternal("jwInitInstream"),c},c.loadItem=function(t,r){o=t,l=r||{},"array"==n.typeOf(t)?e.callInternal("jwLoadArrayInstream",o,l):e.callInternal("jwLoadItemInstream",o,l)},c.removeEvents=function(){u=d={}},c.removeEventListener=function(e,t){
var n=u[e];if(n)for(var r=n.length;r--;)n[r]===t&&n.splice(r,1)},c.dispatchEvent=function(e,t){var r=u[e];if(r)for(var r=r.slice(0),a=n.translateEventResponse(e,t[1]),i=0;i<r.length;i++){var s=r[i];"function"==typeof s&&s.call(this,a)}},c.onError=function(e){return i(t.JWPLAYER_ERROR,e)},c.onMediaError=function(e){return i(t.JWPLAYER_MEDIA_ERROR,e)},c.onFullscreen=function(e){return i(t.JWPLAYER_FULLSCREEN,e)},c.onMeta=function(e){return i(t.JWPLAYER_MEDIA_META,e)},c.onMute=function(e){return i(t.JWPLAYER_MEDIA_MUTE,e);
},c.onComplete=function(e){return i(t.JWPLAYER_MEDIA_COMPLETE,e)},c.onPlaylistComplete=function(e){return i(t.JWPLAYER_PLAYLIST_COMPLETE,e)},c.onPlaylistItem=function(e){return i(t.JWPLAYER_PLAYLIST_ITEM,e)},c.onTime=function(e){return i(t.JWPLAYER_MEDIA_TIME,e)},c.onBuffer=function(e){return s(r.BUFFERING,e)},c.onPause=function(e){return s(r.PAUSED,e)},c.onPlay=function(e){return s(r.PLAYING,e)},c.onIdle=function(e){return s(r.IDLE,e)},c.onClick=function(e){return i(t.JWPLAYER_INSTREAM_CLICK,e)},
c.onInstreamDestroyed=function(e){return i(t.JWPLAYER_INSTREAM_DESTROYED,e)},c.onAdSkipped=function(e){return i(t.JWPLAYER_AD_SKIPPED,e)},c.play=function(e){a.jwInstreamPlay(e)},c.pause=function(e){a.jwInstreamPause(e)},c.hide=function(){e.callInternal("jwInstreamHide")},c.destroy=function(){c.removeEvents(),e.callInternal("jwInstreamDestroy")},c.setText=function(e){a.jwInstreamSetText(e?e:"")},c.getState=function(){return a.jwInstreamState()},c.setClick=function(e){a.jwInstreamClick&&a.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,r){e.plugins.registerPlugin(t,n,r)}}}}(jwplayer)),e.exports=jwplayer},function(e,t){var n=function(){function e(){if(!H){try{var e=j.getElementsByTagName("body")[0].appendChild(m("span"));e.parentNode.removeChild(e)}catch(t){return}H=!0;for(var n=z.length,r=0;r<n;r++)z[r]()}}function t(e){H?e():z[z.length]=e}function r(e){if(typeof N.addEventListener!=E)N.addEventListener("load",e,!1);else if(typeof j.addEventListener!=E)j.addEventListener("load",e,!1);else if(typeof N.attachEvent!=E)y(N,"onload",e);else if("function"==typeof N.onload){
var t=N.onload;N.onload=function(){t(),e()}}else N.onload=e}function a(){$?i():s()}function i(){var e=j.getElementsByTagName("body")[0],t=m(k);t.setAttribute("type",O);var n=e.appendChild(t);if(n){var r=0;!function(){if(typeof n.GetVariable!=E){var a=n.GetVariable("$version");a&&(a=a.split(" ")[1].split(","),G.pv=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)])}else if(r<10)return r++,void setTimeout(arguments.callee,10);e.removeChild(t),n=null,s()}()}else s()}function s(){var e=F.length;if(e>0)for(var t=0;t<e;t++){
var n=F[t].id,r=F[t].callbackFn,a={success:!1,id:n};if(G.pv[0]>0){var i=g(n);if(i)if(!b(F[t].swfVersion)||G.wk&&G.wk<312)if(F[t].expressInstall&&l()){var s={};s.data=F[t].expressInstall,s.width=i.getAttribute("width")||"0",s.height=i.getAttribute("height")||"0",i.getAttribute("class")&&(s.styleclass=i.getAttribute("class")),i.getAttribute("align")&&(s.align=i.getAttribute("align"));for(var c={},f=i.getElementsByTagName("param"),p=f.length,h=0;h<p;h++)"movie"!=f[h].getAttribute("name").toLowerCase()&&(c[f[h].getAttribute("name")]=f[h].getAttribute("value"));
u(s,c,n,r)}else d(i),r&&r(a);else w(n,!0),r&&(a.success=!0,a.ref=o(n),r(a))}else if(w(n,!0),r){var v=o(n);v&&typeof v.SetVariable!=E&&(a.success=!0,a.ref=v),r(a)}}}function o(e){var t=null,n=g(e);if(n&&"OBJECT"==n.nodeName)if(typeof n.SetVariable!=E)t=n;else{var r=n.getElementsByTagName(k)[0];r&&(t=r)}return t}function l(){return!q&&b("6.0.65")&&(G.win||G.mac)&&!(G.wk&&G.wk<312)}function u(e,t,n,r){q=!0,I=r||null,M={success:!1,id:n};var a=g(n);if(a){"OBJECT"==a.nodeName?(_=c(a),T=null):(_=a,T=n),
e.id=R,(typeof e.width==E||!/%$/.test(e.width)&&parseInt(e.width,10)<310)&&(e.width="310"),(typeof e.height==E||!/%$/.test(e.height)&&parseInt(e.height,10)<137)&&(e.height="137"),j.title=j.title.slice(0,47)+" - Flash Player Installation";var i=G.ie&&G.win?"ActiveX":"PlugIn",s="MMredirectURL="+N.location.toString().replace(/&/g,"%26")+"&MMplayerType="+i+"&MMdoctitle="+j.title;if(typeof t.flashvars!=E?t.flashvars+="&"+s:t.flashvars=s,G.ie&&G.win&&4!=a.readyState){var o=m("div");n+="SWFObjectNew",o.setAttribute("id",n),
a.parentNode.insertBefore(o,a),a.style.display="none",function(){4==a.readyState?a.parentNode.removeChild(a):setTimeout(arguments.callee,10)}()}f(e,t,n)}}function d(e){if(G.ie&&G.win&&4!=e.readyState){var t=m("div");e.parentNode.insertBefore(t,e),t.parentNode.replaceChild(c(e),t),e.style.display="none",function(){4==e.readyState?e.parentNode.removeChild(e):setTimeout(arguments.callee,10)}()}else e.parentNode.replaceChild(c(e),e)}function c(e){var t=m("div");if(G.win&&G.ie)t.innerHTML=e.innerHTML;else{
var n=e.getElementsByTagName(k)[0];if(n){var r=n.childNodes;if(r)for(var a=r.length,i=0;i<a;i++)1==r[i].nodeType&&"PARAM"==r[i].nodeName||8==r[i].nodeType||t.appendChild(r[i].cloneNode(!0))}}return t}function f(e,t,n){var r,a=g(n);if(G.wk&&G.wk<312)return r;if(a)if(typeof e.id==E&&(e.id=n),G.ie&&G.win){var i="";for(var s in e)e[s]!=Object.prototype[s]&&("data"==s.toLowerCase()?t.movie=e[s]:"styleclass"==s.toLowerCase()?i+=' class="'+e[s]+'"':"classid"!=s.toLowerCase()&&(i+=" "+s+'="'+e[s]+'"'));var o="";
for(var l in t)t[l]!=Object.prototype[l]&&(o+='<param name="'+l+'" value="'+t[l]+'" />');a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+i+">"+o+"</object>",B[B.length]=e.id,r=g(e.id)}else{var u=m(k);u.setAttribute("type",O);for(var d in e)e[d]!=Object.prototype[d]&&("styleclass"==d.toLowerCase()?u.setAttribute("class",e[d]):"classid"!=d.toLowerCase()&&u.setAttribute(d,e[d]));for(var c in t)t[c]!=Object.prototype[c]&&"movie"!=c.toLowerCase()&&p(u,c,t[c]);a.parentNode.replaceChild(u,a),
r=u}return r}function p(e,t,n){var r=m("param");r.setAttribute("name",t),r.setAttribute("value",n),e.appendChild(r)}function h(e){var t=g(e);t&&"OBJECT"==t.nodeName&&(G.ie&&G.win?(t.style.display="none",function(){4==t.readyState?v(e):setTimeout(arguments.callee,10)}()):t.parentNode.removeChild(t))}function v(e){var t=g(e);if(t){for(var n in t)"function"==typeof t[n]&&(t[n]=null);t.parentNode.removeChild(t)}}function g(e){var t=null;try{t=j.getElementById(e)}catch(n){}return t}function m(e){return j.createElement(e);
}function y(e,t,n){e.attachEvent(t,n),V[V.length]=[e,t,n]}function b(e){var t=G.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 P(e,t,n,r){if(!G.ie||!G.mac){var a=j.getElementsByTagName("head")[0];if(a){var i=n&&"string"==typeof n?n:"screen";if(r&&(C=null,x=null),!C||x!=i){var s=m("style");s.setAttribute("type","text/css"),s.setAttribute("media",i),C=a.appendChild(s),G.ie&&G.win&&typeof j.styleSheets!=E&&j.styleSheets.length>0&&(C=j.styleSheets[j.styleSheets.length-1]),
x=i}G.ie&&G.win?C&&typeof C.addRule==k&&C.addRule(e,t):C&&typeof j.createTextNode!=E&&C.appendChild(j.createTextNode(e+" {"+t+"}"))}}}function w(e,t){if(W){var n=t?"visible":"hidden";H&&g(e)?g(e).style.visibility=n:P("#"+e,"visibility:"+n)}}function S(e){var t=/[\\\"<>\.;]/,n=null!=t.exec(e);return n&&typeof encodeURIComponent!=E?encodeURIComponent(e):e}var _,T,I,M,C,x,E="undefined",k="object",D="Shockwave Flash",A="ShockwaveFlash.ShockwaveFlash",O="application/x-shockwave-flash",R="SWFObjectExprInst",L="onreadystatechange",N=window,j=document,U=navigator,$=!1,z=[a],F=[],B=[],V=[],H=!1,q=!1,W=!0,G=function(){
var e=typeof j.getElementById!=E&&typeof j.getElementsByTagName!=E&&typeof j.createElement!=E,t=U.userAgent.toLowerCase(),n=U.platform.toLowerCase(),r=n?/win/.test(n):/win/.test(t),a=n?/mac/.test(n):/mac/.test(t),i=!!/webkit/.test(t)&&parseFloat(t.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")),s=!1,o=[0,0,0],l=null;if(typeof U.plugins!=E&&typeof U.plugins[D]==k)l=U.plugins[D].description,!l||typeof U.mimeTypes!=E&&U.mimeTypes[O]&&!U.mimeTypes[O].enabledPlugin||($=!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!=E)try{var u=new ActiveXObject(A);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(d){}return{w3:e,pv:o,wk:i,ie:s,win:r,mac:a}}();(function(){G.w3&&((typeof j.readyState!=E&&"complete"==j.readyState||typeof j.readyState==E&&(j.getElementsByTagName("body")[0]||j.body))&&e(),
H||(typeof j.addEventListener!=E&&j.addEventListener("DOMContentLoaded",e,!1),G.ie&&G.win&&(j.attachEvent(L,function(){"complete"==j.readyState&&(j.detachEvent(L,arguments.callee),e())}),N==top&&!function(){if(!H){try{j.documentElement.doScroll("left")}catch(t){return void setTimeout(arguments.callee,0)}e()}}()),G.wk&&!function(){if(!H)return/loaded|complete/.test(j.readyState)?void e():void setTimeout(arguments.callee,0)}(),r(e)))})(),function(){G.ie&&G.win&&window.attachEvent("onunload",function(){
for(var e=V.length,t=0;t<e;t++)V[t][0].detachEvent(V[t][1],V[t][2]);for(var r=B.length,a=0;a<r;a++)h(B[a]);for(var i in G)G[i]=null;G=null;for(var s in n)n[s]=null;n=null})}();return{registerObject:function(e,t,n,r){if(G.w3&&e&&t){var a={};a.id=e,a.swfVersion=t,a.expressInstall=n,a.callbackFn=r,F[F.length]=a,w(e,!1)}else r&&r({success:!1,id:e})},getObjectById:function(e){if(G.w3)return o(e)},embedSWF:function(e,n,r,a,i,s,o,d,c,p){var h={success:!1,id:n};G.w3&&!(G.wk&&G.wk<312)&&e&&n&&r&&a&&i?(w(n,!1),
t(function(){r+="",a+="";var t={};if(c&&typeof c===k)for(var v in c)t[v]=c[v];t.data=e,t.width=r,t.height=a;var g={};if(d&&typeof d===k)for(var m in d)g[m]=d[m];if(o&&typeof o===k)for(var y in o)typeof g.flashvars!=E?g.flashvars+="&"+y+"="+o[y]:g.flashvars=y+"="+o[y];if(b(i)){var P=f(t,g,n);t.id==n&&w(n,!0),h.success=!0,h.ref=P}else{if(s&&l())return t.data=s,void u(t,g,n,p);w(n,!0)}p&&p(h)})):p&&p(h)},switchOffAutoHideShow:function(){W=!1},ua:G,getFlashPlayerVersion:function(){return{major:G.pv[0],
minor:G.pv[1],release:G.pv[2]}},hasFlashPlayerVersion:b,createSWF:function(e,t,n){return G.w3?f(e,t,n):void 0},showExpressInstall:function(e,t,n,r){G.w3&&l()&&u(e,t,n,r)},removeSWF:function(e){G.w3&&h(e)},createCSS:function(e,t,n,r){G.w3&&P(e,t,n,r)},addDomLoadEvent:t,addLoadEvent:r,getQueryParamValue:function(e){var t=j.location.search||j.location.hash;if(t){if(/\?/.test(t)&&(t=t.split("?")[1]),null==e)return S(t);for(var n=t.split("&"),r=0;r<n.length;r++)if(n[r].substring(0,n[r].indexOf("="))==e)return S(n[r].substring(n[r].indexOf("=")+1));
}return""},expressInstallCallback:function(){if(q){var e=g(R);e&&_&&(e.parentNode.replaceChild(_,e),T&&(w(T,!0),G.ie&&G.win&&(_.style.display="block")),I&&I(M)),q=!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={cell:"virtualized-cell-2SrtX",isMoving:"virtualized-isMoving-2370q"
}},function(e,t){e.exports={wrapper:"ReactPageView-wrapper-2bkJO",sidebarContainer:"ReactPageView-sidebarContainer-2epZQ",pageContainer:"ReactPageView-pageContainer-3zNQy"}},function(e,t){e.exports={page:"PhotoAlbumDetailsView-page-ssOMe"}},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={circularProgressBarContainer:"CircularProgressBar-circularProgressBarContainer-2_CY-",absoluteCenterCircularProgressBarContainer:"CircularProgressBar-absoluteCenterCircularProgressBarContainer-382Dt absoluteCenter-absoluteCenter-1jDHd",circularProgressBar:"CircularProgressBar-circularProgressBar-c3VxC",circularProgressBarBackground:"CircularProgressBar-circularProgressBarBackground-21vMm absoluteCenter-absoluteCenter-1jDHd",circularProgressBarText:"CircularProgressBar-circularProgressBarText-2h_xr"
}},function(e,t){e.exports={lineHeightMeasure:"CollapsibleText-lineHeightMeasure-1i4lk",contentTransition:"CollapsibleText-contentTransition-1KRfj",readMore:"CollapsibleText-readMore-3LSyJ",readMoreArrow:"CollapsibleText-readMoreArrow-2oJ67 DisclosureArrow-default-298Tb"}},function(e,t){e.exports={separator:"DashSeparator-separator-W8O7_"}},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={dragLayer:"DragPreviewLayer-dragLayer-33YHl"}},function(e,t){e.exports={grid:"FlexGrid-grid-3yEGy"}},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={recordButton:"RecordButton-recordButton-2bo_0 PlayButton-playButton-1iAGl",recordCircle:"RecordButton-recordCircle-136ax PlayButton-playCircle-2IY6H absoluteCenter-absoluteCenter-1jDHd",recordIcon:"RecordButton-recordIcon-3DuHU absoluteCenter-absoluteCenter-1jDHd"}},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",small:"CheckInput-small-1rBSn",large:"CheckInput-large-2IIVa",isDisabled:"CheckInput-isDisabled-QWWWi",hasError:"CheckInput-hasError-1UXbV"}},function(e,t){e.exports={group:"FormGroup-group-gcQ0L"}},function(e,t){
e.exports={help:"FormHelp-help-2Q59b"}},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:"NumberInputGroup-input-3yQw_ TextInput-input-35bjh input-input-32LMp"}},function(e,t){e.exports={input:"SelectInput-input-OUVuX input-input-32LMp",
small:"SelectInput-small-17RcF input-small-3PwyU",select:"SelectInput-select-3C9iH",large:"SelectInput-large-35kOG input-large-bubXx",isDisabled:"SelectInput-isDisabled-Juj5V",hasError:"SelectInput-hasError-2W9GF"}},function(e,t){e.exports={input:"TextInput-input-35bjh input-input-32LMp",small:"TextInput-small-3i-3x input-small-3PwyU",large:"TextInput-large-38nqp input-large-bubXx",isDisabled:"TextInput-isDisabled-2NeVG",hasError:"TextInput-hasError-2F31e"}},function(e,t){e.exports={avatar:"AvatarImg-avatar-3xJy6"
}},function(e,t){e.exports={card:"PosterCard-card-JcbQF"}},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",menuScroller:"Menu-menuScroller-NHOQo Scroller-vertical-2IRDv",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={confirmBody:"ConfirmModal-confirmBody-3G5yA ModalBody-modalScroller-3xzMd ModalBody-modalBody-1F4VV",accordLabel:"ConfirmModal-accordLabel-2pzsN",accordInput:"ConfirmModal-accordInput-3BkLJ",cancelButton:"ConfirmModal-cancelButton-19CWm",confirmButton:"ConfirmModal-confirmButton-1Dheg"}},function(e,t){e.exports={modalContainer:"Modal-modalContainer-2mNaA resetFont-resetFont-GoU5_",modalBackdrop:"Modal-modalBackdrop-1fCs9",modal:"Modal-modal-3X8-5",
small:"Modal-small-2sNJ3 Modal-modal-3X8-5",medium:"Modal-medium-GdUws Modal-modal-3X8-5",large:"Modal-large-2eGhV Modal-modal-3X8-5",enter:"Modal-enter-30zlX",enterActive:"Modal-enterActive-1M0vF",leave:"Modal-leave-1zIVx",leaveActive:"Modal-leaveActive-1whSn"}},function(e,t){e.exports={modalBody:"ModalBody-modalBody-1F4VV",modalScroller:"ModalBody-modalScroller-3xzMd ModalBody-modalBody-1F4VV",innerModalBody:"ModalBody-innerModalBody-i5G2e"}},function(e,t){e.exports={modalContent:"ModalContent-modalContent-2HIks",
closeButton:"ModalContent-closeButton-3yc-K"}},function(e,t){e.exports={modalScroller:"ModalContentCenter-modalScroller-3skzI ModalBody-modalScroller-3xzMd ModalBody-modalBody-1F4VV",innerModalBody:"ModalContentCenter-innerModalBody-3FQCR ModalBody-innerModalBody-i5G2e absoluteCenter-absoluteCenter-1jDHd"}},function(e,t){e.exports={icon:"ModalContentError-icon-2tMhH","default":"ModalContentError-default-_ZVoL",primary:"ModalContentError-primary-3MkgD",success:"ModalContentError-success-3v7f3",danger:"ModalContentError-danger-1mmPk",
message:"ModalContentError-message-1ywl9"}},function(e,t){e.exports={modalFooter:"ModalFooter-modalFooter-2pHcU"}},function(e,t){e.exports={buttonBar:"ModalFooterButtonBar-buttonBar-3koJS"}},function(e,t){e.exports={modalHeader:"ModalHeader-modalHeader-bWdLM truncate-truncate-2GZ-9"}},function(e,t){e.exports={toolbarButton:"ToolbarButton-toolbarButton-3X0Wu",toolbarTooltip:"ToolbarButton-toolbarTooltip-w3bU4 Tooltip-bottomCenter-iePHM Tooltip-tooltipArrow-8GsfY Tooltip-tooltipTopArrow-1QpMb Tooltip-tooltipCenterAlignArrow-fxDLp"
}},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={liveTVSettings:"LiveTVSettings-liveTVSettings-lsEA_ resetFont-resetFont-GoU5_",info:"LiveTVSettings-info-3MhAC"}},function(e,t){e.exports={device:"DVRDevice-device-2X1X2",deviceImage:"DVRDevice-deviceImage-1NSZi DVRDeviceImage-image-1pz4n",
info:"DVRDevice-info-ov-Yh",details:"DVRDevice-details-GIF1c",uri:"DVRDevice-uri-iKvMi",channelCount:"DVRDevice-channelCount-1PFjz",separator:"DVRDevice-separator-3q_58 DashSeparator-separator-W8O7_",tunerList:"DVRDevice-tunerList-2r9x1",tuner:"DVRDevice-tuner-2B_iW truncate-truncate-2GZ-9",availableIndicator:"DVRDevice-availableIndicator-IPrtt",recordingIndicator:"DVRDevice-recordingIndicator-psFnb DVRDevice-availableIndicator-IPrtt",recording:"DVRDevice-recording-3aDff",deviceSettings:"DVRDevice-deviceSettings-3DqHC",
deviceSettingsIcon:"DVRDevice-deviceSettingsIcon-2aNX1",removeDeviceContainer:"DVRDevice-removeDeviceContainer-pl-Hz",removeDevice:"DVRDevice-removeDevice-P4w-p"}},function(e,t){e.exports={image:"DVRDeviceImage-image-1pz4n",small:"DVRDeviceImage-small-2yHrW",large:"DVRDeviceImage-large-1Zbbm"}},function(e,t){e.exports={form:"DVRDeviceSettingsModalContent-form-2D2Pr",container:"DVRDeviceSettingsModalContent-container-1N1yT",info:"DVRDeviceSettingsModalContent-info-3pL4S",deviceImage:"DVRDeviceSettingsModalContent-deviceImage-2VNu7",
model:"DVRDeviceSettingsModalContent-model-24--J",settings:"DVRDeviceSettingsModalContent-settings-11udB"}},function(e,t){e.exports={dvr:"DVRListItem-dvr-3q3Ak",header:"DVRListItem-header-3HQqH",separator:"DVRListItem-separator-xbeTO DashSeparator-separator-W8O7_",name:"DVRListItem-name-3Do0N truncate-truncate-2GZ-9",deleteLink:"DVRListItem-deleteLink-3TnbU",info:"DVRListItem-info-3QpR3",devices:"DVRListItem-devices-2SnCd",refreshProgramGuideIcon:"DVRListItem-refreshProgramGuideIcon-2xR1j"}},function(e,t){
e.exports={attribution:"GracenoteAttribution-attribution-286Zy"}},function(e,t){e.exports={modal:"DVRSetupModal-modal-1SmhC Modal-medium-GdUws Modal-modal-3X8-5"}},function(e,t){e.exports={errorMessage:"DVRSetupModalContent-errorMessage-1SqgZ",errorIcon:"DVRSetupModalContent-errorIcon-3QWfW",backButton:"DVRSetupModalContent-backButton-2YmT1",cancelButton:"DVRSetupModalContent-cancelButton-2BSlb",modalBody:"DVRSetupModalContent-modalBody-tcrbR"}},function(e,t){e.exports={footer:"DVRSetupModalFooter-footer-kqm3- ModalFooter-modalFooter-2pHcU"
}},function(e,t){e.exports={deviceImageContainer:"DVRSetupDevice-deviceImageContainer-XIno8",selected:"DVRSetupDevice-selected-3LToh",selectedContainer:"DVRSetupDevice-selectedContainer-1wW89",selectedCircle:"DVRSetupDevice-selectedCircle-2RiI5 absoluteCenter-absoluteCenter-1jDHd",selectedIcon:"DVRSetupDevice-selectedIcon-2HuVt",details:"DVRSetupDevice-details-P8DiT",model:"DVRSetupDevice-model-2Clzk",uri:"DVRSetupDevice-uri-2P4h_",channelCount:"DVRSetupDevice-channelCount-3cM3l"}},function(e,t){
e.exports={channel:"DVRSetupDeviceChannel-channel-3Haj6",channelIdentifier:"DVRSetupDeviceChannel-channelIdentifier--1GPW"}},function(e,t){e.exports={deviceInfoBody:"DVRSetupDeviceInfo-deviceInfoBody-3IWy9 ModalBody-modalBody-1F4VV",channelInfo:"DVRSetupDeviceInfo-channelInfo-3AJeH",channelMessage:"DVRSetupDeviceInfo-channelMessage-37hl4",channelDetails:"DVRSetupDeviceInfo-channelDetails-2ZHFu",deviceDetails:"DVRSetupDeviceInfo-deviceDetails-26ge6",channelScanSourceSelect:"DVRSetupDeviceInfo-channelScanSourceSelect-1ZsOr SelectInput-input-OUVuX input-input-32LMp",
deviceChannels:"DVRSetupDeviceInfo-deviceChannels-3vIWw Scroller-vertical-2IRDv",emptyChannels:"DVRSetupDeviceInfo-emptyChannels-2aCEF DVRSetupDeviceInfo-deviceChannels-3vIWw Scroller-vertical-2IRDv",emptyChannelsContent:"DVRSetupDeviceInfo-emptyChannelsContent-2rN15",emptyMessage:"DVRSetupDeviceInfo-emptyMessage-Z0NOJ",emptyChannelsClockContainer:"DVRSetupDeviceInfo-emptyChannelsClockContainer-2B59m",emptyChannelsClock:"DVRSetupDeviceInfo-emptyChannelsClock-34AzY absoluteCenter-absoluteCenter-1jDHd",
emptyChannelsClockTime:"DVRSetupDeviceInfo-emptyChannelsClockTime-AFTtt DVRSetupDeviceInfo-emptyChannelsClock-34AzY absoluteCenter-absoluteCenter-1jDHd",blink:"DVRSetupDeviceInfo-blink-1iebI",emptyChannelsClockBackground:"DVRSetupDeviceInfo-emptyChannelsClockBackground-10Wso CircularProgressBar-circularProgressBarBackground-21vMm absoluteCenter-absoluteCenter-1jDHd"}},function(e,t){e.exports={addDeviceButton:"DVRSetupDeviceSelector-addDeviceButton-3toRY",manualDeviceButtonContainer:"DVRSetupDeviceSelector-manualDeviceButtonContainer-2rEYQ",
manualDeviceContainer:"DVRSetupDeviceSelector-manualDeviceContainer-16nFE",manualAddressArrow:"DVRSetupDeviceSelector-manualAddressArrow-1RpOc",manualAddressArrowOpen:"DVRSetupDeviceSelector-manualAddressArrowOpen-1lAjO",manualDeviceInput:"DVRSetupDeviceSelector-manualDeviceInput-1eGev TextInput-input-35bjh input-input-32LMp",deviceCount:"DVRSetupDeviceSelector-deviceCount-2apst",devices:"DVRSetupDeviceSelector-devices-1deWB",device:"DVRSetupDeviceSelector-device-2cCRk",spinnerContainer:"DVRSetupDeviceSelector-spinnerContainer-2h6cw"
}},function(e,t){e.exports={message:"EPGDownload-message-3BCMt",spinnerContainer:"EPGDownload-spinnerContainer-fJeaG",spinnerMessage:"EPGDownload-spinnerMessage-1q42_"}},function(e,t){e.exports={message:"EPGMapping-message-2NiNy",spinnerContainer:"EPGMapping-spinnerContainer-3hDnl"}},function(e,t){e.exports={message:"EPGSettings-message-2XWuQ",postalCodeFetchingSpinner:"EPGSettings-postalCodeFetchingSpinner-1-xTe Spinner-spinner-3jChT spin-spin-2Djb5"}},function(e,t){e.exports={channelMapping:"DeviceChannelMapping-channelMapping-2a-Ud",
deviceInfo:"DeviceChannelMapping-deviceInfo-24qky",channelEnabled:"DeviceChannelMapping-channelEnabled-3Js9K",deviceIdentifier:"DeviceChannelMapping-deviceIdentifier-17Fo1",mappingDisabled:"DeviceChannelMapping-mappingDisabled-37VOW",channelName:"DeviceChannelMapping-channelName-1ow-e",epgChannel:"DeviceChannelMapping-epgChannel-1L_as"}},function(e,t){e.exports={channelMappingsBody:"DeviceChannelMappings-channelMappingsBody-3VuMF ModalBody-modalBody-1F4VV",message:"DeviceChannelMappings-message-1qyOp",
lineupInfo:"DeviceChannelMappings-lineupInfo-akKun",lineupsMenuButton:"DeviceChannelMappings-lineupsMenuButton-1WfGL",centeredContainer:"DeviceChannelMappings-centeredContainer-3pHDl",scroller:"DeviceChannelMappings-scroller-1Yfdz Scroller-vertical-2IRDv"}},function(e,t){e.exports={container:"DeviceChannelMappingsHeader-container-3zaoI",deviceChannels:"DeviceChannelMappingsHeader-deviceChannels-3UD0O truncate-truncate-2GZ-9",guideChannels:"DeviceChannelMappingsHeader-guideChannels-KxakP truncate-truncate-2GZ-9"
}},function(e,t){e.exports={menu:"LineupsMenu-menu-3kaPc Menu-menu-2EjwW"}},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",badge:"PhotoCell-badge-sVFch",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={completeIcon:"AiringDetailsModalContent-completeIcon-2TvQw",recordingIcon:"AiringDetailsModalContent-recordingIcon-QC9i8",
errorIcon:"AiringDetailsModalContent-errorIcon-1wKcB",separator:"AiringDetailsModalContent-separator-iFjhS DashSeparator-separator-W8O7_",summary:"AiringDetailsModalContent-summary-1mefr"}},function(e,t){e.exports={container:"ConflictItemRow-container-1cOmh"}},function(e,t){e.exports={title:"ConflictTitle-title-29kyM truncate-truncate-2GZ-9",secondaryTitle:"ConflictTitle-secondaryTitle-AyUQT truncate-truncate-2GZ-9"}},function(e,t){e.exports={message:"MediaSubscriptionConflict-message-21ha1",conflicts:"MediaSubscriptionConflict-conflicts-1vgyJ"
}},function(e,t){e.exports={baseForm:"MediaSubscriptionForm-baseForm-19hDH",advancedForm:"MediaSubscriptionForm-advancedForm-Y90Up",advancedSettings:"MediaSubscriptionForm-advancedSettings-1UNJn",baseSettings:"MediaSubscriptionForm-baseSettings-15d6l",footer:"MediaSubscriptionForm-footer-1TKpB ModalFooter-modalFooter-2pHcU",advancedIcon:"MediaSubscriptionForm-advancedIcon-2e-Ew"}},function(e,t){e.exports={errorMessage:"MediaSubscriptionNoLibrary-errorMessage-3uFMi",addIcon:"MediaSubscriptionNoLibrary-addIcon-35liU"
}},function(e,t){e.exports={container:"MediaSubscriptionTargetPosterTitle-container-3a2Ew",left:"MediaSubscriptionTargetPosterTitle-left-2rO6k",right:"MediaSubscriptionTargetPosterTitle-right-2gC09",subscriptionBadge:"MediaSubscriptionTargetPosterTitle-subscriptionBadge-2EPV3 MetadataPosterCardOverlay-badge-3xslj",subscriptionBadgeIcon:"MediaSubscriptionTargetPosterTitle-subscriptionBadgeIcon-21LWD",titleContainer:"MediaSubscriptionTargetPosterTitle-titleContainer-1lSk7"}},function(e,t){e.exports={
title:"MediaSubscriptionTitle-title-1wAfA truncate-truncate-2GZ-9",secondaryTitle:"MediaSubscriptionTitle-secondaryTitle-1uEoi truncate-truncate-2GZ-9"}},function(e,t){e.exports={overlay:"EPGPosterCardOverlay-overlay-26eNO cover-cover-2a-ek",background:"EPGPosterCardOverlay-background-yFnib cover-cover-2a-ek",link:"EPGPosterCardOverlay-link-18Xgx cover-cover-2a-ek",subscriptionBadge:"EPGPosterCardOverlay-subscriptionBadge-1jKB1 MetadataPosterCardOverlay-badge-3xslj",subscriptionBadgeIcon:"EPGPosterCardOverlay-subscriptionBadgeIcon-22B7U",
button:"EPGPosterCardOverlay-button-3ENCx MetadataPosterCardOverlay-button-1tlig",recordButton:"EPGPosterCardOverlay-recordButton-A3emP absoluteCenter-absoluteCenter-1jDHd RecordButton-recordButton-2bo_0 PlayButton-playButton-1iAGl EPGPosterCardOverlay-button-3ENCx MetadataPosterCardOverlay-button-1tlig",recordCoverButton:"EPGPosterCardOverlay-recordCoverButton-N1sbL EPGPosterCardOverlay-recordButton-A3emP absoluteCenter-absoluteCenter-1jDHd RecordButton-recordButton-2bo_0 PlayButton-playButton-1iAGl EPGPosterCardOverlay-button-3ENCx MetadataPosterCardOverlay-button-1tlig",
recordCircle:"EPGPosterCardOverlay-recordCircle-1KTXx RecordButton-recordCircle-136ax PlayButton-playCircle-2IY6H absoluteCenter-absoluteCenter-1jDHd MetadataPosterCardOverlay-centerCircle-1g79v absoluteCenter-absoluteCenter-1jDHd",recordIcon:"EPGPosterCardOverlay-recordIcon-1vwlk RecordButton-recordIcon-3DuHU absoluteCenter-absoluteCenter-1jDHd",moreButton:"EPGPosterCardOverlay-moreButton-1Tlso EPGPosterCardOverlay-button-3ENCx MetadataPosterCardOverlay-button-1tlig",isActionsMenuOpen:"EPGPosterCardOverlay-isActionsMenuOpen--97sn"
}},function(e,t){e.exports={cardContainer:"MetadataPosterCard-cardContainer-5LAl5",card:"MetadataPosterCard-card-3wQTg",isFlipped:"MetadataPosterCard-isFlipped-1xXhy"}},function(e,t){e.exports={poster:"MetadataPosterCardFace-poster-2tdOM",isSelected:"MetadataPosterCardFace-isSelected-1u5LU",isOtherItemSelected:"MetadataPosterCardFace-isOtherItemSelected-1qJqa",face:"MetadataPosterCardFace-face-1WDd2 cover-cover-2a-ek MetadataPosterCardFace-poster-2tdOM",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",unwatchedTagContainer:"MetadataPosterCardOverlay-unwatchedTagContainer-37vs7",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={placeholder:"MetadataPosterCardPlaceholder-placeholder-Q-Ge2 MetadataPosterCardFace-poster-2tdOM"}},function(e,t){e.exports={title:"MetadataPosterTitle-title-2l4TK truncate-truncate-2GZ-9",isSecondary:"MetadataPosterTitle-isSecondary-3LaAK",isSplitLeft:"MetadataPosterTitle-isSplitLeft-M_GTt",isSplitRight:"MetadataPosterTitle-isSplitRight-13kRP"}},function(e,t){e.exports={card:"TagPosterCard-card-3nvbx MetadataPosterCardFace-poster-2tdOM"
}},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={separator:"MetadataTitleAirDate-separator-S3YW4 DashSeparator-separator-W8O7_"}},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={pageHeaderCenter:"PageHeaderCenter-pageHeaderCenter-3w3iI pageHeaderColumn-pageHeaderColumn-WZn4E"}},function(e,t){e.exports={pageHeaderLeft:"PageHeaderLeft-pageHeaderLeft-2yO9H pageHeaderColumn-pageHeaderColumn-WZn4E"}},function(e,t){e.exports={pageHeaderRight:"PageHeaderRight-pageHeaderRight-1N5WH pageHeaderColumn-pageHeaderColumn-WZn4E"}},function(e,t){e.exports={pageHeaderSeparator:"PageHeaderSeparator-pageHeaderSeparator-2fLT_ DashSeparator-separator-W8O7_"
}},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:"AccountPage-page-2HE2E Page-page-cSwP- resetFont-resetFont-GoU5_",header:"AccountPage-header-8Diva",content:"AccountPage-content-z4amS"}},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={dashboardPageContent:"DashboardPage-dashboardPageContent-25zh_ PageContent-innerPageContent-BWoYT",attribution:"DashboardPage-attribution-GM3JM GracenoteAttribution-attribution-286Zy"}},function(e,t){e.exports={refreshingSpinner:"DashboardPageHeader-refreshingSpinner-3GMKW"}},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={icon:"InnerErrorPage-icon-25H8f 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",updateDisabledLink:"ServerUpdateRequiredPage-updateDisabledLink-vXnC9 ServerUpdateRequiredPage-updateLink-WuF3B"}},function(e,t){e.exports={attribution:"LibraryPage-attribution-28GX3 GracenoteAttribution-attribution-286Zy"
}},function(e,t){e.exports={badge:"LibraryPageHeader-badge-2ySaP"}},function(e,t){e.exports={menuButton:"LibraryPageHeaderMenuButton-menuButton-f8Eko",menuButtonLabel:"LibraryPageHeaderMenuButton-menuButtonLabel-1cxep truncate-truncate-2GZ-9",isSelected:"LibraryPageHeaderMenuButton-isSelected-2iwLC"}},function(e,t){e.exports={menuItemContainer:"DisclosureFilterMenuItem-menuItemContainer-7Mq9V SelectedMenuItem-menuItemContainer-2_Zpb",menuLabel:"DisclosureFilterMenuItem-menuLabel-2JZVA SelectedMenuItem-menuLabel-3dKTE",
spinner:"DisclosureFilterMenuItem-spinner-2-dOq Spinner-spinner-3jChT spin-spin-2Djb5",selectedIcon:"DisclosureFilterMenuItem-selectedIcon-1jO2o SelectedMenuItem-selectedIcon-6QPNd",isSelected:"DisclosureFilterMenuItem-isSelected-2v8KX"}},function(e,t){e.exports={header:"LibraryFilterOptionsList-header-2XUNI",headerTitle:"LibraryFilterOptionsList-headerTitle-3jHAe",backIcon:"LibraryFilterOptionsList-backIcon-3P6wy",filterText:"LibraryFilterOptionsList-filterText-1kgCd truncate-truncate-2GZ-9",searchInput:"LibraryFilterOptionsList-searchInput-2i3Zb TextInput-input-35bjh input-input-32LMp",
filterOptionsScroller:"LibraryFilterOptionsList-filterOptionsScroller-1uBcN Scroller-vertical-2IRDv",filterOptionsWithSearchScroller:"LibraryFilterOptionsList-filterOptionsWithSearchScroller-7rOKf LibraryFilterOptionsList-filterOptionsScroller-1uBcN Scroller-vertical-2IRDv",filterOptionMenuItem:"LibraryFilterOptionsList-filterOptionMenuItem-3MRWv MenuItem-menuItem-MQyxO",emptyText:"LibraryFilterOptionsList-emptyText-C5IGC"}},function(e,t){e.exports={filtersScroller:"LibraryFiltersList-filtersScroller-Oko2r Scroller-vertical-2IRDv"
}},function(e,t){e.exports={filtersMenu:"LibraryFiltersMenu-filtersMenu-c3Zvz Menu-menu-2EjwW",panesContainer:"LibraryFiltersMenu-panesContainer-2VeM6",pane:"LibraryFiltersMenu-pane-dckUq",filtersPane:"LibraryFiltersMenu-filtersPane-2UI8A LibraryFiltersMenu-pane-dckUq",filterOptionsPane:"LibraryFiltersMenu-filterOptionsPane-5-JFq LibraryFiltersMenu-pane-dckUq",showFilterOptions:"LibraryFiltersMenu-showFilterOptions-Ivcx6"}},function(e,t){e.exports={metadataListPageContent:"MetadataListPageContent-metadataListPageContent-oyJ9H PageContent-pageContent-1RBiI",
metadataListScroller:"MetadataListPageContent-metadataListScroller-3TSBt",attribution:"MetadataListPageContent-attribution-3OIWt"}},function(e,t){e.exports={title:"MetadataListPageHeader-title-_MpLt truncate-truncate-2GZ-9",badge:"MetadataListPageHeader-badge-J2Pm9"}},function(e,t){e.exports={prePlayPageContentContainer:"PrePlayPageContent-prePlayPageContentContainer-2l5x7",prePlayPageContent:"PrePlayPageContent-prePlayPageContent-2yNGj PageContent-pageContent-1RBiI"}},function(e,t){e.exports={breadcrumbLink:"PrePlayPageHeader-breadcrumbLink-13mv2 truncate-truncate-2GZ-9"
}},function(e,t){e.exports={separator:"PrePlayDashSeparator-separator-1EfTd"}},function(e,t){e.exports={group:"PrePlayDetailsGroup-group-1Kvas"}},function(e,t){e.exports={groupItem:"PrePlayDetailsGroupItem-groupItem-18Tq-",label:"PrePlayDetailsGroupItem-label-3cvEa"}},function(e,t){e.exports={divider:"PrePlayDivider-divider-1wC80"}},function(e,t){e.exports={leftTitle:"PrePlayLeftTitle-leftTitle-IKn7l truncate-truncate-2GZ-9"}},function(e,t){e.exports={bottomDivider:"PrePlayListBottomDivider-bottomDivider-1SNnC PrePlayDivider-divider-1wC80"
}},function(e,t){e.exports={topDivider:"PrePlayListTopDivider-topDivider-3Ca5z PrePlayDivider-divider-1wC80"}},function(e,t){e.exports={content:"PrePlayMetadataContent-content-2esQh"}},function(e,t){e.exports={innerContent:"PrePlayMetadataInnerContent-innerContent-c_veo"}},function(e,t){e.exports={primaryTitle:"PrePlayPrimaryTitle-primaryTitle-2oWX3"}},function(e,t){e.exports={rightTitle:"PrePlayRightTitle-rightTitle-PurA0 truncate-truncate-2GZ-9"}},function(e,t){e.exports={secondaryTitle:"PrePlaySecondaryTitle-secondaryTitle-yQ1jd PrePlayPrimaryTitle-primaryTitle-2oWX3"
}},function(e,t){e.exports={summary:"PrePlaySummary-summary-ywT2M"}},function(e,t){e.exports={tertiaryTitle:"PrePlayTertiaryTitle-tertiaryTitle-EouEP"}},function(e,t){e.exports={cardLink:"PrePlayCastCell-cardLink-19pTK",titleContainer:"PrePlayCastCell-titleContainer-wLKcb"}},function(e,t){e.exports={castList:"PrePlayCastList-castList-1DfBR"}},function(e,t){e.exports={relatedList:"PrePlayRelatedList-relatedList-lYDv-",spinnerContainer:"PrePlayRelatedList-spinnerContainer-1NQTC"}},function(e,t){e.exports={
recordButton:"EPGPrePlayRecordButton-recordButton-2Lhnh Button-default-nIbzg",recordingIcon:"EPGPrePlayRecordButton-recordingIcon-26cR2",recordIcon:"EPGPrePlayRecordButton-recordIcon-22dDl"}},function(e,t){e.exports={item:"EPGPrePlayEpisodeCell-item-3cY_m",recordButton:"EPGPrePlayEpisodeCell-recordButton-3Uqw7 RecordButton-recordButton-2bo_0 PlayButton-playButton-1iAGl",alternateItem:"EPGPrePlayEpisodeCell-alternateItem-3_2bY EPGPrePlayEpisodeCell-item-3cY_m",underlay:"EPGPrePlayEpisodeCell-underlay-1RpJW cover-cover-2a-ek",
overlay:"EPGPrePlayEpisodeCell-overlay-y4t47 linkOverlay-linkOverlay-1I0EI cover-cover-2a-ek",primaryTitle:"EPGPrePlayEpisodeCell-primaryTitle-2SETz truncate-truncate-2GZ-9",secondaryTitle:"EPGPrePlayEpisodeCell-secondaryTitle-2rSQL truncate-truncate-2GZ-9",subscriptionIcon:"EPGPrePlayEpisodeCell-subscriptionIcon-3rW_1",nextAiringDate:"EPGPrePlayEpisodeCell-nextAiringDate-2BYIh",separator:"EPGPrePlayEpisodeCell-separator-3gPb7",loadingItem:"EPGPrePlayEpisodeCell-loadingItem-3L-Nn EPGPrePlayEpisodeCell-overlay-y4t47 linkOverlay-linkOverlay-1I0EI cover-cover-2a-ek",
alternateLoadingItem:"EPGPrePlayEpisodeCell-alternateLoadingItem-b-9Dx EPGPrePlayEpisodeCell-loadingItem-3L-Nn EPGPrePlayEpisodeCell-overlay-y4t47 linkOverlay-linkOverlay-1I0EI cover-cover-2a-ek"}},function(e,t){e.exports={emptyContainer:"EPGPrePlayEpisodeList-emptyContainer-22u8b",emptyMessage:"EPGPrePlayEpisodeList-emptyMessage-1sar7 EPGPrePlayEpisodeList-emptyContainer-22u8b"}},function(e,t){e.exports={schedulePageContent:"RecordingSchedulePageContent-schedulePageContent-1GYPZ PageContent-pageContent-1RBiI",
schedulePageInnerContent:"RecordingSchedulePageContent-schedulePageInnerContent-3Qm7g PageContent-innerPageContent-BWoYT",emptyDescription:"RecordingSchedulePageContent-emptyDescription-2cm2P EmptyPage-description-gCbqC"}},function(e,t){e.exports={event:"AgendaEvent-event-3aI4t",isComplete:"AgendaEvent-isComplete-A1vrD",hasError:"AgendaEvent-hasError-2cqNn",underlay:"AgendaEvent-underlay-1c5K4 cover-cover-2a-ek",overlay:"AgendaEvent-overlay-2EAF1 linkOverlay-linkOverlay-1I0EI cover-cover-2a-ek",statusIcon:"AgendaEvent-statusIcon-3BKD5",
date:"AgendaEvent-date-2pK56 truncate-truncate-2GZ-9",isToday:"AgendaEvent-isToday-2r29M",time:"AgendaEvent-time-hR6NP",isNewBadge:"AgendaEvent-isNewBadge-1U9g9",title:"AgendaEvent-title-1PNg6 truncate-truncate-2GZ-9",titleDetails:"AgendaEvent-titleDetails-31hLs truncate-truncate-2GZ-9",status:"AgendaEvent-status-2HpsV",recording:"AgendaEvent-recording-3GQG2",recordingProgressBackground:"AgendaEvent-recordingProgressBackground-12GF9 CircularProgressBar-circularProgressBarBackground-21vMm absoluteCenter-absoluteCenter-1jDHd",
recordingIcon:"AgendaEvent-recordingIcon-2jUpx absoluteCenter-absoluteCenter-1jDHd",playButton:"AgendaEvent-playButton-1zy7s PlayButton-playButton-1iAGl"}},function(e,t){e.exports={agendaHeader:"AgendaHeader-agendaHeader-1M9fU"}},function(e,t){e.exports={calendar:"Calendar-calendar-2PnSu"}},function(e,t){e.exports={day:"CalendarDay-day-2Ifzl"}},function(e,t){e.exports={dayOfWeek:"CalendarDayOfWeek-dayOfWeek-1vQ9x truncate-truncate-2GZ-9",isToday:"CalendarDayOfWeek-isToday-2M0af"}},function(e,t){e.exports={
calendarDays:"CalendarDays-calendarDays-2kLAY"}},function(e,t){e.exports={container:"CalendarDaysOfWeek-container-2PWOh"}},function(e,t){e.exports={errorButton:"CalendarErrorButton-errorButton-2mOdU",errorTooltip:"CalendarErrorButton-errorTooltip-3dYVk Tooltip-tooltip-1JcHx resetFont-resetFont-GoU5_"}},function(e,t){e.exports={event:"CalendarEvent-event-3FbP_",isComplete:"CalendarEvent-isComplete-zOV9Q",hasError:"CalendarEvent-hasError-DwvkR",underlay:"CalendarEvent-underlay-3R4Sr cover-cover-2a-ek",
overlay:"CalendarEvent-overlay-1HzrF linkOverlay-linkOverlay-1I0EI cover-cover-2a-ek",errorIcon:"CalendarEvent-errorIcon-1cw3E",title:"CalendarEvent-title-U5IXG truncate-truncate-2GZ-9",secondary:"CalendarEvent-secondary-JQLH3",time:"CalendarEvent-time-2xTpt",status:"CalendarEvent-status-36yfw",recording:"CalendarEvent-recording-1Qhj9",recordingProgressBackground:"CalendarEvent-recordingProgressBackground-1UaZx CircularProgressBar-circularProgressBarBackground-21vMm absoluteCenter-absoluteCenter-1jDHd",
recordingIcon:"CalendarEvent-recordingIcon-1SO8g absoluteCenter-absoluteCenter-1jDHd",playButton:"CalendarEvent-playButton-3_JwU PlayButton-playButton-1iAGl"}},function(e,t){e.exports={calendarHeaderContainer:"CalendarHeader-calendarHeaderContainer-2N2Qo",calendarHeader:"CalendarHeader-calendarHeader-1knuN",calendarNav:"CalendarHeader-calendarNav-3ALJP Link-link-5rkZv",calendarNavDisabled:"CalendarHeader-calendarNavDisabled-1ypRO"}},function(e,t){e.exports={title:"CalendarHeaderTitle-title-o04Qd"
}},function(e,t){e.exports={pane:"RecordingPriorityPane-pane-3KIBG",paneHeader:"RecordingPriorityPane-paneHeader-26Izm",paneScroller:"RecordingPriorityPane-paneScroller-3qO_V Scroller-vertical-2IRDv",error:"RecordingPriorityPane-error-2VOdA"}},function(e,t){e.exports={subscription:"RecordingPrioritySubscription-subscription-2aDVO",link:"RecordingPrioritySubscription-link-2hIy7",linkContainer:"RecordingPrioritySubscription-linkContainer-a3WEC",posterContainer:"RecordingPrioritySubscription-posterContainer-3m4Ws",
titleContainer:"RecordingPrioritySubscription-titleContainer-3EJMd",dragHandle:"RecordingPrioritySubscription-dragHandle-wAIMZ Link-link-5rkZv",dragIcon:"RecordingPrioritySubscription-dragIcon-1aGhh"}},function(e,t){e.exports={dragPreview:"RecordingPrioritySubscriptionDragPreview-dragPreview-3JqjX"}},function(e,t){e.exports={dragSource:"RecordingPrioritySubscriptionDragSource-dragSource-z-GjV stripeListItem-stripeListItem-3gORm"}},function(e,t){e.exports={seriesIcon:"RecordingPrioritySubscriptionSeriesTitle-seriesIcon-37_Xh"
}},function(e,t){e.exports={title:"RecordingPrioritySubscriptionTitle-title-2klaZ truncate-truncate-2GZ-9",secondaryTitle:"RecordingPrioritySubscriptionTitle-secondaryTitle-2r-Gs truncate-truncate-2GZ-9"}},function(e,t){e.exports={searchPageContent:"SearchPageContent-searchPageContent-1PsO9 DashboardPage-dashboardPageContent-25zh_ PageContent-innerPageContent-BWoYT"}},function(e,t){e.exports={spinner:"SearchPageHeader-spinner-2o0G4",separator:"SearchPageHeader-separator-2gaQL"}},function(e,t){e.exports={
providerTitle:"SearchProviderHubs-providerTitle-38h29",spinner:"SearchProviderHubs-spinner-2Rzb-"}},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={placeholder:"QuickSearchPlaceholder-placeholder-15MHM",isPlaceholderSelected:"QuickSearchPlaceholder-isPlaceholderSelected-1zZXZ"}},function(e,t){e.exports={title:"QuickSearchProvider-title-3D1fp",noResults:"QuickSearchProvider-noResults-1UJ7l",spinnerContainer:"QuickSearchProvider-spinnerContainer-2KPeC",spinner:"QuickSearchProvider-spinner-bAPFx"}},function(e,t){e.exports={button:"QuickSearchResult-button-xsMFe",title:"QuickSearchResult-title-2dspi",selected:"QuickSearchResult-selected-2JW0R",
link:"QuickSearchResult-link-3pYLm cover-cover-2a-ek",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"}},function(e,t){e.exports={titleContainer:"SearchTagPosterCell-titleContainer-1lNVv",imageContainer:"SearchTagPosterCell-imageContainer-1gkXs",imageLink:"SearchTagPosterCell-imageLink-SMHdP cover-cover-2a-ek"
}},function(e,t){e.exports={card:"QuickSearchMetadataPosterCard-card-3NUHG",playButton:"QuickSearchMetadataPosterCard-playButton-34_H_ PlayButton-playButton-1iAGl absoluteCenter-absoluteCenter-1jDHd",recordButton:"QuickSearchMetadataPosterCard-recordButton-3_BWv RecordButton-recordButton-2bo_0 PlayButton-playButton-1iAGl absoluteCenter-absoluteCenter-1jDHd"}},function(e,t){e.exports={card:"QuickSearchTagPosterCard-card-1fbRG TagPosterCard-card-3nvbx MetadataPosterCardFace-poster-2tdOM"}},function(e,t){
e.exports={title:"QuickSearchTitle-title-2GU7r truncate-truncate-2GZ-9",isSecondary:"QuickSearchTitle-isSecondary-1hFaI"}},function(e,t){e.exports={multiSelectPageHeader:"MultiSelectPageHeader-multiSelectPageHeader-1_MY- PageHeader-pageHeader-2N2RK",selectedTitle:"MultiSelectPageHeader-selectedTitle-2XANL truncate-truncate-2GZ-9",deselectLink:"MultiSelectPageHeader-deselectLink-1_0B- truncate-truncate-2GZ-9",icon:"MultiSelectPageHeader-icon-x4vHO"}},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={container:"UserSidebar-container-2Xgpm",selected:"UserSidebar-selected-2P7zM"}},function(e,t){e.exports={serverMenu:"ServerMenu-serverMenu-2tFgY Menu-menu-2EjwW",serverMenuScroller:"ServerMenu-serverMenuScroller-3cdNz Scroller-vertical-2IRDv"}},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",warningIcon:"ServerMenuIcon-warningIcon-2SL_j"}},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={spinnerContainer:"SidebarServerContent-spinnerContainer-14E43",unclaimedIcon:"SidebarServerContent-unclaimedIcon-2VpOx"}},function(e,t){e.exports={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:"PlexPassLiteModal-plexPassTitle-caqzZ PlexPassModal-plexPassTitle-3rfVU",header:"PlexPassLiteModal-header-3Fnes PlexPassModal-header-2DxmV ModalHeader-modalHeader-bWdLM truncate-truncate-2GZ-9",body:"PlexPassLiteModal-body-2Fa6w PlexPassModal-body-3sRxa ModalBody-innerModalBody-i5G2e",footer:"PlexPassLiteModal-footer-2m0LB PlexPassModal-footer-2yRrA ModalFooter-modalFooter-2pHcU"}},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-innerModalBody-i5G2e",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={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 r(e,t){for(var n=e;n.parentNode;)n=n.parentNode;var r=n.querySelectorAll(t);
return Array.prototype.indexOf.call(r,e)!==-1}var a=n(39),i={addClass:function(e,t){return/\s/.test(t)?a(!1):void 0,t&&(e.classList?e.classList.add(t):i.hasClass(e,t)||(e.className=e.className+" "+t)),e},removeClass:function(e,t){return/\s/.test(t)?a(!1):void 0,t&&(e.classList?e.classList.remove(t):i.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?i.addClass:i.removeClass)(e,t);
},hasClass:function(e,t){return/\s/.test(t)?a(!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 r(e,t)};return n.call(e,t)}};e.exports=i},function(e,t){"use strict";function n(e){return e.replace(r,function(e,t){return t.toUpperCase()})}var r=/-(.)/g;e.exports=n},function(e,t,n){"use strict";function r(e){return a(e.replace(i,"ms-"));
}var a=n(2238),i=/^-ms-/;e.exports=r},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!a(e)&&(a(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var a=n(2247);e.exports=r},function(e,t,n){"use strict";function r(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 r=Array(t),a=0;a<t;a++)r[a]=e[a];return r}function a(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 i(e){return a(e)?Array.isArray(e)?e.slice():r(e):[e]}var s=n(39);e.exports=i},function(e,t,n){"use strict";function r(e){var t=e.match(d);return t&&t[1].toLowerCase()}function a(e,t){var n=u;u?void 0:l(!1);var a=r(e),i=a&&o(a);
if(i){n.innerHTML=i[1]+e+i[2];for(var d=i[0];d--;)n=n.lastChild}else n.innerHTML=e;var c=n.getElementsByTagName("script");c.length&&(t?void 0:l(!1),s(c).forEach(t));for(var f=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return f}var i=n(80),s=n(2241),o=n(819),l=n(39),u=i.canUseDOM?document.createElement("div"):null,d=/^\s*<(\w+)/;e.exports=a},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(r,"-$1").toLowerCase()}var r=/([A-Z])/g;e.exports=n},function(e,t,n){"use strict";function r(e){return a(e).replace(i,"-ms-")}var a=n(2244),i=/^ms-/;e.exports=r},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 r(e){return a(e)&&3==e.nodeType;
}var a=n(2246);e.exports=r},function(e,t){"use strict";function n(e,t,n){if(!e)return null;var a={};for(var i in e)r.call(e,i)&&(a[i]=t.call(n,e[i],i,e));return a}var r=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 r,a=n(80);a.canUseDOM&&(r=window.performance||window.msPerformance||window.webkitPerformance),e.exports=r||{}},function(e,t,n){
"use strict";var r,a=n(2250);r=a.now?function(){return a.now()}:function(){return Date.now()},e.exports=r},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+"mp3/null.2036f08ba858d37814b7f6982d26414a.mp3"},function(e,t,n){
var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i="";return i})},2257,function(e,t,n){
var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="video-player-image-overlays"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,s="",o="function",l=this.escapeExpression;return s+='<div class="sidebar-container '+l((i=t&&t.styles,i=null==i||i===!1?i:i.sidebarContainer,typeof i===o?i.apply(t):i))+'"></div> <div class="page-container '+l((i=t&&t.styles,
i=null==i||i===!1?i:i.pageContainer,typeof i===o?i.apply(t):i))+'"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){
this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,s,o="",l="function",u=this.escapeExpression;return(s=n.reason)?i=s.call(t,{hash:{},data:a}):(s=t&&t.reason,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+" "})},2257,2257,function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<span class="loading loading-inline"></span> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){
this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,s,o="",l="function",u=this.escapeExpression;return(s=n.text)?i=s.call(t,{hash:{},data:a}):(s=t&&t.text,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="lyrics-region"></div> <div class="lyrics-streams-region"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+=o(n(2).call(t,"Your mix will resume shortly",{hash:{},data:i}))+" "});
},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="background transition-out"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div id="content" class="scroll-container dark-scrollbar"></div> <div class="scroll-shadow transition-out"></div> '})},function(e,t,n){var r=n(6);
e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r,a="";return a+="<p>"+h(n(2).call(e,"Reqirements",{hash:{},data:t}))+": ",r=e&&e.requirements,r=typeof r===v?r.apply(e):r,(r||0===r)&&(a+=r),a+="</p>"}function o(e,t){var n,r="";return r+="<p>",n=e&&e.info,n=typeof n===v?n.apply(e):n,(n||0===n)&&(r+=n),r+="</p>"}function l(e,t){var a,i="";return i+=' <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"> '+h(n(2).call(e,"Download",{
hash:{},data:t}))+' <span class="caret"></span> </button> <ul class="dropdown-menu"> ',a=r.each.call(e,e&&e.releases,{hash:{},inverse:g.noop,fn:g.program(6,u,t),data:t}),(a||0===a)&&(i+=a),i+=" </ul> </div> "}function u(e,t){var n,r="";return r+=' <li><a href="'+h((n=e&&e.url,typeof n===v?n.apply(e):n))+'" download class="download-btn">'+h((n=e&&e.label,typeof n===v?n.apply(e):n))+"</a></li> "}function d(e,t){var n,a="";return a+=' <div class="download-server-btn-group"> ',n=r.each.call(e,e&&e.releases,{
hash:{},inverse:g.noop,fn:g.program(9,c,t),data:t}),(n||0===n)&&(a+=n),a+=" </div> "}function c(e,t){var n,r="";return r+=' <a href="'+h((n=e&&e.url,typeof n===v?n.apply(e):n))+'" download class="btn btn-primary download-btn">'+h((n=e&&e.label,typeof n===v?n.apply(e):n))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var f,p="",h=this.escapeExpression,v="function",g=this;return p+='<div class="type-'+h((f=t&&t.type,typeof f===v?f.apply(t):f))+" platform-logo platform-"+h((f=t&&t.id,
typeof f===v?f.apply(t):f))+'"></div> <h2><strong>'+h((f=t&&t.name,typeof f===v?f.apply(t):f))+"</strong> "+h(n(2).call(t,"Download",{hash:{},data:i}))+"</h2> <h5>"+h(n(2).call(t,"Version",{hash:{},data:i}))+" "+h((f=t&&t.version,typeof f===v?f.apply(t):f))+"</h5> <h5>"+h(n(624).call(t,t&&t.date,{hash:{},data:i}))+'</h5> <div class="more-info"> ',f=r.if.call(t,t&&t.requirements,{hash:{},inverse:g.noop,fn:g.program(1,s,i),data:i}),(f||0===f)&&(p+=f),p+=" ",f=r.if.call(t,t&&t.info,{hash:{},inverse:g.noop,
fn:g.program(3,o,i),data:i}),(f||0===f)&&(p+=f),p+=" </div> ",f=r.if.call(t,t&&t.shouldUseDropup,{hash:{},inverse:g.program(8,d,i),fn:g.program(5,l,i),data:i}),(f||0===f)&&(p+=f),p+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"(Plex Pass)"}function o(e,t){var n,r="";return r+=' <p><span class="text-muted">Name:</span> '+f((n=e&&e.primaryServer,n=null==n||n===!1?n:n.friendlyName,typeof n===c?n.apply(e):n))+'</p> <p><span class="text-muted">URL:</span> '+f((n=e&&e.primaryServerUrl,typeof n===c?n.apply(e):n))+'</p> <p><span class="text-muted">Version:</span> '+f((n=e&&e.primaryServer,n=null==n||n===!1?n:n.version,typeof n===c?n.apply(e):n))+'</p> <p><span class="text-muted">Token:</span> '+f((n=e&&e.primaryServer,
n=null==n||n===!1?n:n.accessToken,typeof n===c?n.apply(e):n))+"</p> "}function l(e,t){return' <p><span class="text-muted">none</span></p> '}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c="function",f=this.escapeExpression,p=this;return d+='<h3>Browser</h3> <p><span class="text-muted">Host:</span> '+f((u=t&&t.host,typeof u===c?u.apply(t):u))+'</p> <p><span class="text-muted">User Agent:</span> '+f((u=t&&t.userAgent,typeof u===c?u.apply(t):u))+'</p> <p><span class="text-muted">Name:</span> '+f((u=t&&t.browser,
u=null==u||u===!1?u:u.name,typeof u===c?u.apply(t):u))+'</p> <p><span class="text-muted">Version:</span> '+f((u=t&&t.browser,u=null==u||u===!1?u:u.version,typeof u===c?u.apply(t):u))+'</p> <p><span class="text-muted">Platform:</span> '+f((u=t&&t.browser,u=null==u||u===!1?u:u.platform,typeof u===c?u.apply(t):u))+'</p> <p><span class="text-muted">Mobile:</span> '+f(n(401).call(t,(u=t&&t.browser,null==u||u===!1?u:u.mobile),{hash:{},data:i}))+'</p> <h3>User</h3> <p><span class="text-muted">Username:</span> '+f((u=t&&t.user,
u=null==u||u===!1?u:u.username,typeof u===c?u.apply(t):u))+" ",u=r.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:p.noop,fn:p.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+='</p> <p><span class="text-muted">Email:</span> '+f((u=t&&t.user,u=null==u||u===!1?u:u.email,typeof u===c?u.apply(t):u))+'</p> <p><span class="text-muted">Token:</span> '+f((u=t&&t.user,u=null==u||u===!1?u:u.accessToken,typeof u===c?u.apply(t):u))+'</p> <h3>plex.tv</h3> <p><span class="text-muted">URL:</span> '+f((u=t&&t.cloudServerUrl,
typeof u===c?u.apply(t):u))+'</p> <p><span class="text-muted">Available:</span> '+f(n(401).call(t,(u=t&&t.cloudServer,null==u||u===!1?u:u.available),{hash:{},data:i}))+'</p> <p><span class="text-muted">Authorized:</span> '+f(n(401).call(t,(u=t&&t.cloudServer,null==u||u===!1?u:u.authorized),{hash:{},data:i}))+"</p> <h3>Primary Server</h3> ",u=r.if.call(t,t&&t.primaryServer,{hash:{},inverse:p.program(5,l,i),fn:p.program(3,o,i),data:i}),(u||0===u)&&(d+=u),d+=" "})},2257,function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){
this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,s,o="",l="function",u=this.escapeExpression;return o+='<textarea class="form-control">',(s=n.logs)?i=s.call(t,{hash:{},data:a}):(s=t&&t.logs,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+"</textarea> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <div class="remember-group checkbox"> <label class="control-label"> <input type="checkbox" id="remember" checked> '+u(n(2).call(e,"Remember me",{
hash:{},data:t}))+" </label> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this.escapeExpression,d=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(2).call(t,"Sign In",{hash:{},data:i}))+'</a> <span class="sign-in-header-divider">'+u(n(2).call(t,"or",{hash:{},data:i}))+'</span> <a class="sign-up-btn" href="#">'+u(n(2).call(t,"Sign Up",{hash:{},data:i}))+'</a> </h2> </div> </div> <div class="username-group form-group"> <label for="username" class="control-label"> '+u(n(2).call(t,"Username",{
hash:{},data:i}))+' <span class="control-error">'+u(n(2).call(t,"Required",{hash:{},data:i}))+'</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(2).call(t,"Email",{hash:{},data:i}))+' <span class="control-error">'+u(n(2).call(t,"Required",{hash:{},data:i}))+'</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(2).call(t,"Password",{
hash:{},data:i}))+' <span class="control-error">'+u(n(2).call(t,"Required",{hash:{},data:i}))+'</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(2).call(t,"Confirm Password",{hash:{},data:i}))+' <span class="control-error">'+u(n(2).call(t,"Passwords do not match",{hash:{},data:i}))+'</span> </label> <input type="password" id="confirm" class="form-control"> </div> <div class="age-disclaimer form-group"> '+u(n(2).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:i}))+' </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(2).call(t,"Sign In",{hash:{},data:i}))+'</span> <span class="sign-up-label btn-label">'+u(n(2).call(t,"Sign Up",{hash:{},data:i}))+"</span> </button> ",o=r.if.call(t,t&&t.showRememberMe,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+=" </div> "})},function(e,t,n){
var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return' <form id="user-account-form"></form> '}function o(e,t){var n,a="";return a+=" ",n=r.if.call(e,e&&e.showWhySignIn,{hash:{},inverse:p.program(6,u,t),fn:p.program(4,l,t),data:t}),(n||0===n)&&(a+=n),a+=" "}function l(e,t){var r="";return r+=" <p>"+f(n(2).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>'+f(n(2).call(e,"Any connections between your media server and players WILL NOT BE SECURE",{
hash:{},data:t}))+"</li> <li>"+f(n(2).call(e,"You may experience degraded streaming performance",{hash:{},data:t}))+"</li> <li>"+f(n(2).call(e,"It will be more difficult, and sometimes impossible, to find your server and discover players",{hash:{},data:t}))+"</li> <li>"+f(n(2).call(e,"You will not be able to access your media server from outside your home",{hash:{},data:t}))+"</li> <li>"+f(n(2).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">'+f(n(2).call(e,"Sign In",{
hash:{},data:t}))+'</button></p> <p><a class="skip-btn" href="#">'+f(n(2).call(e,"Skip and accept limited functionality",{hash:{},data:t}))+"</a></p> </div> "}function u(e,t){var r="";return r+=' <div class="skip-sign-in-container"> <a class="why-sign-in-btn" href="#">'+f(n(2).call(e,"What's this?",{hash:{},data:t}))+"</a> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var d,c="",f=this.escapeExpression,p=this;return c+='<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"> ',
d=r.unless.call(t,t&&t.showWhySignIn,{hash:{},inverse:p.noop,fn:p.program(1,s,i),data:i}),(d||0===d)&&(c+=d),c+=" ",d=r.if.call(t,t&&t.showSkip,{hash:{},inverse:p.noop,fn:p.program(3,o,i),data:i}),(d||0===d)&&(c+=d),c+=" </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(e,t){var r,a="";return a+='<span class="star"><i class="star-icon glyphicon ',r=n.if.call(e,e,{hash:{},inverse:d.program(4,o,t),fn:d.program(2,s,t),data:t}),(r||0===r)&&(a+=r),
a+='"></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),a=a||{};var l,u="",d=this;return l=n.each.call(t,t&&t.stars,{hash:{},inverse:d.noop,fn:d.program(1,i,a),data:a}),(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return c(n(2).call(e,"Play",{hash:{},data:t}))}function o(e,t){return c(n(2).call(e,"Play All",{
hash:{},data:t}))}function l(e,t){var r,a="";return a+=' <li><a class="download-btn secondary-only" href="'+c((r=e&&e.downloadUrl,typeof r===f?r.apply(e):r))+'" download="'+c((r=e&&e.downloadName,typeof r===f?r.apply(e):r))+'">'+c(n(2).call(e,"Download",{hash:{},data:t}))+"</a></li> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c=this.escapeExpression,f="function",p=this;return d+='<ul class="nav action-bar-nav"> <li> <a class="play-btn btn-gray" href="#" title="',
u=r.if.call(t,t&&t.isSingleItem,{hash:{},inverse:p.program(3,o,i),fn:p.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+='" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="play-unwatched-btn btn-gray" href="#" title="'+c(n(2).call(t,"Play Unwatched",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="play-shuffled-btn btn-gray" href="#" title="'+c(n(2).call(t,"Shuffle",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon random"></i></a> </li> <li> <a class="play-trailer-btn btn-gray" href="#" title="'+c(n(2).call(t,"Play Trailer",{
hash:{},data:i}))+'" data-toggle="tooltip"><i class="plex-icon-play-strip"></i></a> </li> <li> <a class="edit-btn btn-gray" href="#" title="'+c(n(2).call(t,"Edit",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon pencil"></i></a> </li> <li> <a class="add-to-playlist-btn btn-gray" href="#" title="'+c(n(2).call(t,"Add to playlist",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="plex-icon-add-to-playlist"></i></a> </li> <li> <a class="refresh-btn btn-gray" href="#" title="'+c(n(2).call(t,"Refresh",{
hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon repeat"></i></a> </li> <li> <a class="analyze-btn btn-gray secondary-action" href="#" title="'+c(n(2).call(t,"Analyze",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon magic"></i></a> </li> <li> <a class="mark-watched-btn btn-gray" href="#" title="'+c(n(2).call(t,"Mark as Watched",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon circle-ok"></i></a> </li> <li> <a class="mark-unwatched-btn btn-gray" href="#" title="'+c(n(2).call(t,"Mark as Unwatched",{
hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon circle-minus"></i></a> </li> <li> <a class="select-btn btn-gray" href="#" title="'+c(n(2).call(t,"Select",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon check"></i></a> </li> <li> <a class="deselect-btn btn-gray selected" href="#" title="'+c(n(2).call(t,"Deselect All",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon unchecked"></i></a> </li> <li> <a class="sync-btn btn-gray" href="#" title="'+c(n(2).call(t,"Sync",{
hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon download"></i></a> </li> <li> <a class="share-btn btn-gray secondary-action" href="#" title="'+c(n(2).call(t,"Share",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon share"></i></a> </li> <li> <a class="recommend-btn btn-gray secondary-action" href="#" title="'+c(n(2).call(t,"Recommend",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon share-alt"></i></a> </li> <li> <a class="delete-btn btn-gray secondary-action" href="#" title="'+c(n(2).call(t,"Delete",{
hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon bin"></i></a> </li> <li> <a class="delete-from-user-playlist-btn btn-gray secondary-action" href="#" title="'+c(n(2).call(t,"Delete",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon bin"></i></a> </li> <li> <a class="info-btn btn-gray secondary-action" href="#" title="'+c(n(2).call(t,"Info",{hash:{},data:i}))+'" 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="#">'+c(n(2).call(t,"Play Version...",{
hash:{},data:i}))+'</a></li> <li><a class="play-all-btn secondary-only" href="#">',u=r.if.call(t,t&&t.isSingleItem,{hash:{},inverse:p.program(3,o,i),fn:p.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+='</a></li> <li><a class="play-next-btn secondary-only" href="#">'+c(n(2).call(t,"Play Next",{hash:{},data:i}))+'</a></li> <li><a class="add-to-queue-btn secondary-only" href="#">'+c(n(2).call(t,"Add to Queue",{hash:{},data:i}))+'</a></li> <li class="secondary-divider divider"></li> <li><a class="convert-btn" href="#">'+c(n(2).call(t,"Optimize...",{
hash:{},data:i}))+'</a></li> <li><a class="analyze-btn" href="#">'+c(n(2).call(t,"Analyze",{hash:{},data:i}))+'</a></li> <li><a class="match-btn secondary-only" href="#">'+c(n(2).call(t,"Match",{hash:{},data:i}))+'</a></li> <li><a class="fix-match-btn secondary-only" href="#">'+c(n(2).call(t,"Fix Incorrect Match",{hash:{},data:i}))+'</a></li> <li><a class="unmatch-btn secondary-only" href="#">'+c(n(2).call(t,"Unmatch",{hash:{},data:i}))+'</a></li> <li><a class="merge-btn secondary-only" href="#">'+c(n(2).call(t,"Merge",{
hash:{},data:i}))+'</a></li> <li><a class="split-apart-btn secondary-only" href="#">'+c(n(2).call(t,"Split Apart",{hash:{},data:i}))+"</a></li> ",u=r.if.call(t,t&&t.downloadUrl,{hash:{},inverse:p.noop,fn:p.program(5,l,i),data:i}),(u||0===u)&&(d+=u),d+=' <li><a class="watch-later-btn" href="#" tabindex="-1">'+c(n(2).call(t,"Watch Later",{hash:{},data:i}))+'</a></li> <li><a class="share-btn" href="#">'+c(n(2).call(t,"Share",{hash:{},data:i}))+'</a></li> <li><a class="recommend-btn" href="#">'+c(n(2).call(t,"Recommend",{
hash:{},data:i}))+'</a></li> <li><a class="delete-btn has-danger" href="#">'+c(n(2).call(t,"Delete",{hash:{},data:i}))+'</a></li> <li><a class="delete-versions-btn has-danger secondary-only" href="#">'+c(n(2).call(t,"Delete Versions",{hash:{},data:i}))+'</a></li> <li><a class="delete-from-user-playlist-btn has-danger" href="#">'+c(n(2).call(t,"Delete",{hash:{},data:i}))+'</a></li> <li><a class="info-btn" href="#">'+c(n(2).call(t,"Info",{hash:{},data:i}))+"</a></li> </ul> </li> </ul> "})},function(e,t,n){
var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Options",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon show-lines"></i></a> </li> </ul> </div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Options",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon show-lines"></i></a> </li> <li> <a class="play-btn btn-gray" href="#" title="'+o(n(2).call(t,"Play All",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon play"></i></a> </li> <li> <a class="play-shuffled-btn btn-gray" href="#" title="'+o(n(2).call(t,"Shuffle",{
hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon random"></i></a> </li> <li> <a class="add-to-playlist-btn btn-gray" href="#" title="'+o(n(2).call(t,"Add to playlist",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="plex-icon-add-to-playlist"></i></a> </li> <li> <a class="select-btn btn-gray" href="#" title="'+o(n(2).call(t,"Select",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon check"></i></a> </li> <li> <a class="deselect-btn btn-gray selected" href="#" title="'+o(n(2).call(t,"Deselect All",{
hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon unchecked"></i></a> </li> <li> <a class="edit-btn btn-gray" href="#" title="'+o(n(2).call(t,"Edit",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon pencil"></i></a> </li> <li> <a class="mark-watched-btn btn-gray" href="#" title="'+o(n(2).call(t,"Mark as Watched",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon circle-ok"></i></a> </li> <li> <a class="mark-unwatched-btn btn-gray" href="#" title="'+o(n(2).call(t,"Mark as Unwatched",{
hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon circle-minus"></i></a> </li> <li> <a class="sync-btn btn-gray" href="#" title="'+o(n(2).call(t,"Sync",{hash:{},data:i}))+'" 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(2).call(t,"Optimize...",{
hash:{},data:i}))+'</a></li> <li><a class="refresh-btn secondary-only" href="#">'+o(n(2).call(t,"Refresh",{hash:{},data:i}))+'</a></li> <li><a class="analyze-btn secondary-only" href="#">'+o(n(2).call(t,"Analyze",{hash:{},data:i}))+'</a></li> <li><a class="add-to-collection-btn secondary-only" href="#">'+o(n(2).call(t,"Add to Collection...",{hash:{},data:i}))+'</a></li> <li><a class="merge-btn secondary-only" href="#">'+o(n(2).call(t,"Merge",{hash:{},data:i}))+'</a></li> <li><a class="delete-btn has-danger secondary-only" href="#">'+o(n(2).call(t,"Delete",{
hash:{},data:i}))+"</a></li> </ul> </li> </ul> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this,d=this.escapeExpression;return l+='<ul class="nav nav-header pull-right"> <li class="alerts-nav-item"><a class="alerts-btn btn-gray ',o=n(23).call(t,t&&t.subset,"alerts",{hash:{},inverse:u.noop,fn:u.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+='" href="#!/status/alerts">'+d(n(2).call(t,"Alerts",{
hash:{},data:i}))+'</a></li> <li class="sync-nav-item"><a class="sync-btn btn-gray ',o=n(23).call(t,t&&t.subset,"sync",{hash:{},inverse:u.noop,fn:u.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+='" href="#!/status/sync">'+d(n(2).call(t,"Sync",{hash:{},data:i}))+'</a></li> <li class="conversion-nav-item"><a class="conversion-btn btn-gray ',o=n(23).call(t,t&&t.subset,"conversion",{hash:{},inverse:u.noop,fn:u.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+='" href="#!/status/conversion">'+d(n(2).call(t,"Conversion",{
hash:{},data:i}))+'<span class="badge"></span></a></li> <li class="now-playing-nav-item"><a class="now-playing-btn btn-gray ',o=n(23).call(t,t&&t.subset,"nowPlaying",{hash:{},inverse:u.noop,fn:u.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+='" href="#!/status/playing">'+d(n(2).call(t,"Now Playing",{hash:{},data:i}))+'<span class="badge"></span></a></li> </ul> <h2>'+d(n(2).call(t,"Status",{hash:{},data:i}))+'</h2> <div class="activity-container"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
function s(e,t){var a,i="";return i+=' <div class="filter-bar-right"> <span class="page-count">'+f(n(2).call(e,"{1} of {2}",e&&e.page,e&&e.pages,{hash:{},data:t}))+'</span> <a class="previous-btn btn-gray ',a=r.unless.call(e,e&&e.enablePrevious,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+='" href="#"> <i class="glyphicon chevron-left"></i> </a> <a class="next-btn btn-gray ',a=r.unless.call(e,e&&e.enableNext,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(a||0===a)&&(i+=a),
i+='" href="#"> <i class="glyphicon chevron-right"></i> </a> </div> '}function o(e,t){return"disabled"}function l(e,t){var r="";return r+=' <div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> <h4 class="text-muted text-center">'+f(n(2).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"],r=this.merge(r,e.helpers),i=i||{};var d,c="",f=this.escapeExpression,p=this;
return c+='<div class="filter-bar"> ',d=r.unless.call(t,t&&t.shared,{hash:{},inverse:p.noop,fn:p.program(1,s,i),data:i}),(d||0===d)&&(c+=d),c+=" </div> ",d=r.if.call(t,t&&t.shared,{hash:{},inverse:p.program(6,u,i),fn:p.program(4,l,i),data:i}),(d||0===d)&&(c+=d),c+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var a,i="";return i+=' <div class="filter-bar-right"> <button class="pause-btn btn btn-sm btn-default ',a=r.if.call(e,e&&e.isPaused,{
hash:{},inverse:h.noop,fn:h.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+='">'+v(n(2).call(e,"Pause",{hash:{},data:t}))+'</button> <button class="resume-btn btn btn-sm btn-primary ',a=r.unless.call(e,e&&e.isPaused,{hash:{},inverse:h.noop,fn:h.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+='">'+v(n(2).call(e,"Resume",{hash:{},data:t}))+"</button> </div> "}function o(e,t){return"hidden"}function l(e,t){var r,a="";return a+=' <p class="conversion-error-message"><i class="conversion-error-icon glyphicon circle-exclamation-mark text-danger"></i> '+v((r=e&&e.errorMessage,
typeof r===g?r.apply(e):r))+" "+v(n(2).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 r="";return r+=' <p class="conversion-status-message">'+v(n(2).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 d(e,t){var n,a="";return a+=' <div class="conversion-queue-empty-region"></div> <div class="conversion-queue-up-next-list-region"></div> <hr class="conversion-queue-divider ',
n=r.unless.call(e,e&&e.shouldShowDivider,{hash:{},inverse:h.noop,fn:h.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+='"> <div class="conversion-queue-after-up-next-list-region"></div> '}function c(e,t){var r="";return r+=' <div class="row row-padded"> <h4 class="text-muted text-center"> '+v(n(2).call(e,"This requires Plex Media Server {1} or later.",e&&e.minServerVersion,{hash:{},data:t}))+" </h4> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var f,p="",h=this,v=this.escapeExpression,g="function";
return p+='<div class="conversion-filter-bar filter-bar"> ',f=r.if.call(t,t&&t.hasPausedSetting,{hash:{},inverse:h.noop,fn:h.program(1,s,i),data:i}),(f||0===f)&&(p+=f),p+=" </div> ",f=r.if.call(t,t&&t.errorMessage,{hash:{},inverse:h.program(6,u,i),fn:h.program(4,l,i),data:i}),(f||0===f)&&(p+=f),p+=" ",f=r.if.call(t,t&&t.shouldShowList,{hash:{},inverse:h.program(10,c,i),fn:h.program(8,d,i),data:i}),(f||0===f)&&(p+=f),p+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
function s(e,t){return' <div class="sessions-list-container"></div> '}function o(e,t){var n,a="";return a+=' <div class="row row-padded"> <h4 class="text-muted text-center"> ',n=r.if.call(e,e&&e.shared,{hash:{},inverse:v.program(6,u,t),fn:v.program(4,l,t),data:t}),(n||0===n)&&(a+=n),a+=" </h4> </div> "}function l(e,t){var r="";return r+=" "+h(n(2).call(e,"Now Playing is restricted from shared users.",{hash:{},data:t}))+" "}function u(e,t){var n;return n=r.if.call(e,e&&e.synced,{hash:{},inverse:v.program(9,c,t),
fn:v.program(7,d,t),data:t}),n||0===n?n:""}function d(e,t){var r="";return r+=" "+h(n(2).call(e,"Now Playing is unavailable with synced servers.",{hash:{},data:t}))+" "}function c(e,t){var r="";return r+=" "+h(n(2).call(e,"Now Playing requires Plex Media Server {1} or later.",e&&e.minServerVersion,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var f,p="",h=this.escapeExpression,v=this;return p+='<div class="filter-bar"></div> ',f=r.if.call(t,t&&t.shouldShowList,{
hash:{},inverse:v.program(3,o,i),fn:v.program(1,s,i),data:i}),(f||0===f)&&(p+=f),p+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Nothing is synced to this device.",{
hash:{},data:i}))+' </h4> </div> <div class="sync-device-message row hidden"> <h4 class="sync-device-message-text text-muted text-center"></h4> </div> <div class="sync-item-list-container"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return'<a class="edit-btn btn-gray" href="#"><i class="glyphicon pencil"></i></a>'}function o(e,t){var n,a="";return a+=" ",n=r.if.call(e,e&&e.devices,{hash:{},inverse:w.program(14,h,t),fn:w.program(4,l,t),
data:t}),(n||0===n)&&(a+=n),a+=" "}function l(e,t){var n,a="";return a+=' <div class="row"> <div class="col-sm-4 col-md-3"> <ul class="nav nav-cards"> ',n=r.each.call(e,e&&e.devices,{hash:{},inverse:w.noop,fn:w.programWithDepth(5,u,t,e),data:t}),(n||0===n)&&(a+=n),a+=' </ul> </div> <div class="sync-device-container col-sm-8 col-md-9"></div> </div> '}function u(e,t,a){var i,s="";return s+=' <li> <a class="card btn-gray ',i=n(23).call(e,(i=a&&a.selectedDevice,null==i||i===!1?i:i.id),e&&e.id,{hash:{},
inverse:w.noop,fn:w.program(6,d,t),data:t}),(i||0===i)&&(s+=i),s+='" data-id="'+P((i=e&&e.id,typeof i===b?i.apply(e):i))+'" href="#"> ',i=r.if.call(e,e&&e.name,{hash:{},inverse:w.program(10,f,t),fn:w.program(8,c,t),data:t}),(i||0===i)&&(s+=i),s+=" ",i=r.if.call(e,e&&e.isCloudSync,{hash:{},inverse:w.noop,fn:w.program(12,p,t),data:t}),(i||0===i)&&(s+=i),s+=" </a> </li> "}function d(e,t){return"selected"}function c(e,t){var n;return P((n=e&&e.name,typeof n===b?n.apply(e):n))}function f(e,t){var n;return P((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 h(e,t){var r="";return r+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+P(n(2).call(e,"You have no sync capable devices.",{hash:{},data:t}))+"</h4> </div> "}function v(e,t){var n,a="";return a+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+P((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=r.unless.call(e,(n=e&&e.plexPassInfo,null==n||n===!1?n:n.showButton),{hash:{},inverse:w.noop,fn:w.program(17,g,t),data:t}),(n||0===n)&&(a+=n),a+='"> <a class="btn btn-sm btn-primary" href="'+P((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.url,typeof n===b?n.apply(e):n))+'" target="'+P((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.target,typeof n===b?n.apply(e):n))+'">'+P((n=e&&e.plexPassInfo,n=null==n||n===!1?n:n.buttonText,
typeof n===b?n.apply(e):n))+"</a> </p> </div> "}function g(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var m,y="",b="function",P=this.escapeExpression,w=this;return y+='<div class="filter-bar"> <div class="filter-bar-right"> ',m=r.if.call(t,t&&t.hasTouchScreen,{hash:{},inverse:w.noop,fn:w.program(1,s,i),data:i}),(m||0===m)&&(y+=m),y+=' <a class="refresh-btn btn-gray" href="#"><i class="glyphicon repeat"></i></a> </div> </div> ',m=r.if.call(t,t&&t.allowSync,{
hash:{},inverse:w.program(16,v,i),fn:w.program(3,o,i),data:i}),(m||0===m)&&(y+=m),y+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,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)?i=s.call(t,{hash:{},data:a}):(s=t&&t.message,i=typeof s===l?s.call(t,{
hash:{},data:a}):s),o+=u(i)+"</span> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"circle-ok"}function o(e,t){return"circle-exclamation-mark"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this,c="function";return u+='<button class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <i class="alert-icon glyphicon ',l=n(23).call(t,t&&t.type,"success",{hash:{},inverse:d.program(3,o,i),fn:d.program(1,s,i),
data:i}),(l||0===l)&&(u+=l),u+='"></i> <h4>',l=t&&t.message,l=typeof l===c?l.apply(t):l,(l||0===l)&&(u+=l),u+="</h4> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r,a="";return a+=' <a class="info-link link" href="'+d((r=e&&e.url,typeof r===u?r.apply(e):r))+'" target="_blank">'+d(n(2).call(e,"More Info",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u="function",d=this.escapeExpression,c=this;
return l+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">'+d((o=t&&t.content,typeof o===u?o.apply(t):o))+"</span> ",o=r.if.call(t,t&&t.url,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <span class="message">'+d(n(2).call(e,"An insecure media server has been found on your network.",{
hash:{},data:t}))+'</span> <a class="reload-link link" href="#">'+d(n(2).call(e,"Reload app insecurely",{hash:{},data:t}))+"</a> "}function o(e,t){var r="";return r+=' <span class="message">'+d(n(2).call(e,"An unclaimed media server has been found on your network.",{hash:{},data:t}))+'</span> <a class="claim-link link" href="#">'+d(n(2).call(e,"Claim it now",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c=this;return u+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> ',
l=r.if.call(t,t&&t.showInsecureMessage,{hash:{},inverse:c.program(3,o,i),fn:c.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <a class="download-link link" href="#">'+f(n(2).call(e,"Download now",{hash:{},data:t}))+"</a> "}function o(e,t){var r;return r=n(23).call(e,e&&e.state,"downloaded",{hash:{},inverse:h.program(6,u,t),fn:h.program(4,l,t),data:t}),r||0===r?r:""}function l(e,t){
var r="";return r+=' <a class="install-link link" href="#">'+f(n(2).call(e,"Install now",{hash:{},data:t}))+"</a> "}function u(e,t){var r,a="";return a+=' <a class="link" href="'+f((r=e&&e.downloadURL,typeof r===p?r.apply(e):r))+'" target="_blank">'+f(n(2).call(e,"Download now",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var d,c="",f=this.escapeExpression,p="function",h=this;return c+='<button type="button" class="close-btn btn-link"><i class="glyphicon remove-2"></i></button> <span class="message">'+f(n(2).call(t,"A Plex Media Server update is available!",{
hash:{},data:i}))+"</span> ",d=n(23).call(t,t&&t.state,"available",{hash:{},inverse:h.program(3,o,i),fn:h.program(1,s,i),data:i}),(d||0===d)&&(c+=d),c+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<i class="alert-icon glyphicon cardio"></i> <span class="status"></span> '})},2257,function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){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"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this,c=this.escapeExpression,f="function";return u+='<div class="breadcrumb-actions pull-right"> ',l=r.if.call(t,t&&t.showSettings,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(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="#">'+c(n(2).call(t,"Posters",{
hash:{},data:i}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',l=n(77).call(t,t&&t.listType,"media-tile-list",{hash:{},inverse:d.noop,fn:d.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+='"></i></a></li> <li><a class="list-btn" data-type="media-details-list" href="#">'+c(n(2).call(t,"Details",{hash:{},data:i}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',l=n(77).call(t,t&&t.listType,"media-details-list",{hash:{},inverse:d.noop,fn:d.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+='"></i></a></li> <li><a class="list-btn" data-type="media-list" href="#">'+c(n(2).call(t,"List",{
hash:{},data:i}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',l=n(77).call(t,t&&t.listType,"media-list",{hash:{},inverse:d.noop,fn:d.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+='"></i></a></li> </ul> </span> </div> <span class="breadcrumb-dropdown"><a href="'+c((l=t&&t.channelUrl,typeof l===f?l.apply(t):l))+'">'+c((l=t&&t.channelTitle,typeof l===f?l.apply(t):l))+'</a></span> <span class="breadcrumb-subset-dropdown ',l=r.unless.call(t,t&&t.title,{hash:{},inverse:d.noop,fn:d.program(3,o,i),
data:i}),(l||0===l)&&(u+=l),u+='"><span class="dropdown-placeholder">'+c((l=t&&t.title,typeof l===f?l.apply(t):l))+'</span></span> <span class="list-badge badge badge-lg">'+c((l=t&&t.totalSize,typeof l===f?l.apply(t):l))+"</span> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r,a="";return a+=' <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="#">'+g(n(2).call(e,"Posters",{
hash:{},data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',r=n(77).call(e,e&&e.listType,"episode-tile-list",{hash:{},inverse:m.noop,fn:m.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+='"></i></a></li> <li><a class="list-btn" data-type="episode-details-list" href="#">'+g(n(2).call(e,"Details",{hash:{},data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',r=n(77).call(e,e&&e.listType,"episode-details-list",{hash:{},inverse:m.noop,fn:m.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+='"></i></a></li> <li><a class="list-btn" data-type="episode-list" href="#">'+g(n(2).call(e,"List",{
hash:{},data:t}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',r=n(77).call(e,e&&e.listType,"episode-list",{hash:{},inverse:m.noop,fn:m.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+='"></i></a></li> </ul> </span> '}function o(e,t){return"hidden"}function l(e,t){var n,a="";return a+=' <span id="section-dropdown" class="details-breadcrumb dropdown"> ',n=r.if.call(e,e&&e.section,{hash:{},inverse:m.program(7,d,t),fn:m.program(5,u,t),data:t}),(n||0===n)&&(a+=n),a+=' <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=r.if.call(e,e&&e.showPlaylists,{hash:{},inverse:m.noop,fn:m.program(9,c,t),data:t}),(n||0===n)&&(a+=n),a+=" ",n=r.each.call(e,e&&e.sections,{hash:{},inverse:m.noop,fn:m.programWithDepth(12,p,t,e),data:t}),(n||0===n)&&(a+=n),a+=" </ul> </span> "}function u(e,t){var n,r="";return r+=' <a class="section-btn btn-gray" data-key="'+g((n=e&&e.section,n=null==n||n===!1?n:n.key,typeof n===y?n.apply(e):n))+'" href="#">'+g((n=e&&e.section,n=null==n||n===!1?n:n.title,typeof n===y?n.apply(e):n))+"</a> "}function d(e,t){
var r="";return r+=' <a class="playlists-btn btn-gray" href="#">'+g(n(2).call(e,"Playlists",{hash:{},data:t}))+"</a> "}function c(e,t){var a,i="";return i+=' <li><a class="playlists-btn" href="#"><span class="dropdown-truncated-label">'+g(n(2).call(e,"Playlists",{hash:{},data:t}))+"</span>",a=r.unless.call(e,(a=e&&e.section,null==a||a===!1?a:a.key),{hash:{},inverse:m.noop,fn:m.program(10,f,t),data:t}),(a||0===a)&&(i+=a),i+="</a></li> "}function f(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>';
}function p(e,t,r){var a,i="";return i+=' <li><a class="section-btn" data-key="'+g((a=e&&e.key,typeof a===y?a.apply(e):a))+'" href="#"><span class="dropdown-truncated-label">'+g((a=e&&e.title,typeof a===y?a.apply(e):a))+'</span><i class="dropdown-selected-icon glyphicon ok-2 ',a=n(77).call(e,(a=r&&r.section,null==a||a===!1?a:a.key),e&&e.key,{hash:{},inverse:m.noop,fn:m.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+='"></i></a></li> '}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};
var h,v="",g=this.escapeExpression,m=this,y="function";return v+='<div class="breadcrumb-actions pull-right"> ',h=r.if.call(t,t&&t.listType,{hash:{},inverse:m.noop,fn:m.program(1,s,i),data:i}),(h||0===h)&&(v+=h),v+=' <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> ',h=r.if.call(t,t&&t.showSectionDropdown,{hash:{},inverse:m.noop,fn:m.program(4,l,i),data:i}),(h||0===h)&&(v+=h),
v+=' <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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <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(2).call(e,"Import from iTunes",{
hash:{},data:t}))+"</a></li> </ul> </span> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this.escapeExpression,d=this,c="function";return l+='<div class="breadcrumb-actions pull-right"> ',o=r.if.call(t,t&&t.canImportPlaylists,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(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===c?o.apply(t):o))+"</span> </span> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var a,i="";return i+=' <a class="update-btn btn-gray btn-loading btn-loading-replace btn-loading-static ',a=r.if.call(e,e&&e.refreshing,{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+='" href="#" title="'+p((a=e&&e.updateTitle,typeof a===f?a.apply(e):a))+'" data-title-alt="'+p((a=e&&e.updateTitleAlt,typeof a===f?a.apply(e):a))+'" 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(2).call(e,"Edit Library",{
hash:{},data:t}))+'</a></li> <li><a class="share-btn" href="#">'+p(n(2).call(e,"Share...",{hash:{},data:t}))+'</a></li> <li><a class="analyze-btn" href="#">'+p(n(2).call(e,"Analyze",{hash:{},data:t}))+'</a></li> <li><a class="force-refresh-btn" href="#">'+p(n(2).call(e,"Refresh All",{hash:{},data:t}))+'</a></li> <li><a class="empty-trash-btn" href="#">'+p(n(2).call(e,"Empty Trash",{hash:{},data:t}))+'</a></li> <li><a class="delete-btn has-danger" href="#">'+p(n(2).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"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c=this,f="function",p=this.escapeExpression;return d+='<div class="breadcrumb-actions pull-right"> ',u=r.unless.call(t,t&&t.limited,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+=' <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(2).call(t,"Posters",{
hash:{},data:i}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=n(77).call(t,t&&t.listType,"media-tile-list",{hash:{},inverse:c.noop,fn:c.program(4,l,i),data:i}),(u||0===u)&&(d+=u),d+='"></i></a></li> <li><a class="list-btn" data-type="media-details-list" href="#">'+p(n(2).call(t,"Details",{hash:{},data:i}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=n(77).call(t,t&&t.listType,"media-details-list",{hash:{},inverse:c.noop,fn:c.program(4,l,i),data:i}),(u||0===u)&&(d+=u),d+='"></i></a></li> <li><a class="list-btn" data-type="media-list" href="#">'+p(n(2).call(t,"List",{
hash:{},data:i}))+'<i class="dropdown-selected-icon glyphicon ok-2 ',u=n(77).call(t,t&&t.listType,"media-list",{hash:{},inverse:c.noop,fn:c.program(4,l,i),data:i}),(u||0===u)&&(d+=u),d+='"></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===f?u.apply(t):u))+"</span> </span> ";
})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t,r){var a,i="";return i+=' <li><a class="card btn-gray ',a=n(23).call(e,r&&r.currentKey,e&&e.key,{hash:{},inverse:d.noop,fn:d.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+='" href="#!/server/'+c(n(71).call(e,r&&r.serverID,{hash:{},data:t}))+"/directory/"+c(n(71).call(e,e&&e.key,{hash:{},data:t}))+'">'+c(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</a></li> "}function o(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this,c=this.escapeExpression;return u+="<h2>"+c(n(2).call(t,"Channel Directory",{hash:{},data:i}))+'</h2> <div class="filter-bar"> <a class="btn btn-sm btn-default pull-right" href="#!/server/'+c(n(71).call(t,t&&t.serverID,{hash:{},data:i}))+'/channels">'+c(n(2).call(t,"Browse Channels",{hash:{},data:i}))+'</a> </div> <div class="row"> <div class="col-md-3"> <ul class="nav nav-cards"> ',l=r.each.call(t,t&&t.directories,{hash:{},inverse:d.noop,fn:d.programWithDepth(1,s,i,t),
data:i}),(l||0===l)&&(u+=l),u+=' </ul> </div> <div class="directory-container col-md-9"></div> </div> '})},2257,function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,r="";return r+='<span class="badge">'+h((n=e&&e.allCount,typeof n===p?n.apply(e):n))+"</span>"}function o(e,t){var n,r="";return r+='<span class="badge">'+h((n=e&&e.videoCount,typeof n===p?n.apply(e):n))+"</span>"}function l(e,t){var n,r="";return r+='<span class="badge">'+h((n=e&&e.musicCount,
typeof n===p?n.apply(e):n))+"</span>"}function u(e,t){var n,r="";return r+='<span class="badge">'+h((n=e&&e.photoCount,typeof n===p?n.apply(e):n))+"</span>"}function d(e,t){var r="";return r+=' <div class="filter-bar"> <a class="btn btn-sm btn-primary pull-right" href="#!/server/'+h(n(71).call(e,e&&e.serverID,{hash:{},data:t}))+'/directory">'+h(n(2).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">'+h(n(2).call(e,"Check for Updates",{
hash:{},data:t}))+"</span> </a> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var c,f="",p="function",h=this.escapeExpression,v=this;return f+='<ul class="nav nav-header pull-right"> <li><a class="all-btn btn-gray selected" href="#">'+h(n(2).call(t,"All",{hash:{},data:i})),c=r.if.call(t,t&&t.allCount,{hash:{},inverse:v.noop,fn:v.program(1,s,i),data:i}),(c||0===c)&&(f+=c),f+='</a></li> <li><a class="video-btn btn-gray" href="#">'+h(n(2).call(t,"Video",{hash:{},data:i})),
c=r.if.call(t,t&&t.videoCount,{hash:{},inverse:v.noop,fn:v.program(3,o,i),data:i}),(c||0===c)&&(f+=c),f+='</a></li> <li><a class="music-btn btn-gray" href="#">'+h(n(2).call(t,"Music",{hash:{},data:i})),c=r.if.call(t,t&&t.musicCount,{hash:{},inverse:v.noop,fn:v.program(5,l,i),data:i}),(c||0===c)&&(f+=c),f+='</a></li> <li><a class="photo-btn btn-gray" href="#">'+h(n(2).call(t,"Photo",{hash:{},data:i})),c=r.if.call(t,t&&t.photoCount,{hash:{},inverse:v.noop,fn:v.program(7,u,i),data:i}),(c||0===c)&&(f+=c),
f+="</a></li> </ul> <h2>"+h(n(2).call(t,"Channels",{hash:{},data:i}))+"</h2> ",c=r.unless.call(t,t&&t.shared,{hash:{},inverse:v.noop,fn:v.program(9,d,i),data:i}),(c||0===c)&&(f+=c),f+=' <div class="channels-container"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(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),a=a||{};var o,l,u="",d="function",c=this.escapeExpression,f=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:a}):(l=t&&t.serverID,o=typeof l===d?l.call(t,{hash:{},data:a}):l),u+=c(o)+"/details/",(l=n.parentKey)?o=l.call(t,{hash:{},data:a}):(l=t&&t.parentKey,
o=typeof l===d?l.call(t,{hash:{},data:a}):l),u+=c(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:f.program(3,s,a),fn:f.program(1,i,a),data:a}),(o||0===o)&&(u+=o),u+=" </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){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"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c=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">'+d(n(2).call(t,"Popular Tracks",{
hash:{},data:i}))+'</h3> </div> <div class="albums-region details-list-region"> <h3 class="albums-header">'+d(n(2).call(t,"Albums",{hash:{},data:i}))+'</h3> </div> <div class="extras-region hidden"> <h3 class="extras-header">'+d(n(2).call(t,"Music Videos",{hash:{},data:i}))+'</h3> </div> <div class="concert-region hidden"> <h3 class="concert-header"> '+d(n(2).call(t,"On Tour",{hash:{},data:i}))+'<div class="concert-api-logo"></div> </h3> </div> <div class="similar-artists-region hidden"> <h3 class="similar-artists-header">'+d(n(2).call(t,"Similar Artists",{
hash:{},data:i}))+'</h3> </div> </div> <div class="details-poster-container"> ',l=r.if.call(t,t&&t.canPlay,{hash:{},inverse:c.program(3,o,i),fn:c.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=" </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Director",{
hash:{},data:i}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+o(n(2).call(t,"Writer",{hash:{},data:i}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+o(n(2).call(t,"Cast",{hash:{},data:i}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+o(n(2).call(t,"Audio",{
hash:{},data:i}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+o(n(2).call(t,"Subtitles",{hash:{},data:i}))+'</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> ';
})},2257,function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Unwatched",{
hash:{},data:i}))+'</span> <a class="item-unavailable-btn label label-btn label-danger" href="#"><i class="label-icon glyphicon circle-info"></i> '+u(n(2).call(t,"Unavailable",{hash:{},data:i}))+'</a> </p> <div class="item-director metadata-tags"> <span class="metadata-label">'+u(n(2).call(t,"Director",{hash:{},data:i}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+u(n(2).call(t,"Writer",{hash:{},data:i}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+u(n(2).call(t,"Cast",{
hash:{},data:i}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+u(n(2).call(t,"Audio",{hash:{},data:i}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+u(n(2).call(t,"Subtitles",{hash:{},data:i}))+'</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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Unwatched",{
hash:{},data:i}))+'</span> <a class="item-unavailable-btn label label-btn label-danger" href="#"><i class="label-icon glyphicon circle-info"></i> '+o(n(2).call(t,"Unavailable",{hash:{},data:i}))+'</a> </p> <p class="item-tagline metadata-tagline"></p> <div class="item-director metadata-tags"> <span class="metadata-label">'+o(n(2).call(t,"Director",{hash:{},data:i}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-writer metadata-tags"> <span class="metadata-label">'+o(n(2).call(t,"Writer",{
hash:{},data:i}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-cast metadata-tags"> <span class="metadata-label">'+o(n(2).call(t,"Cast",{hash:{},data:i}))+'</span> <span class="metadata-tag-list"></span> </div> <div class="item-audio metadata-tags metadata-tags-separator"> <span class="metadata-label">'+o(n(2).call(t,"Audio",{hash:{},data:i}))+'</span> </div> <div class="item-subtitles metadata-tags"> <span class="metadata-label">'+o(n(2).call(t,"Subtitles",{hash:{},data:i
}))+'</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(2).call(t,"Extras",{hash:{},data:i}))+'</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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,s="",o="function",l=this.escapeExpression;return s+='<div class="photo-album-page '+l((i=t&&t.styles,i=null==i||i===!1?i:i.page,typeof i===o?i.apply(t):i))+'"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,a="";return a+=' <div class="playlist-poster item-poster media-poster '+f((n=e&&e.type,
typeof n===c?n.apply(e):n))+'"> ',n=r.if.call(e,e&&e.smart,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+=" </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,a="";return a+=" ",n=r.unless.call(e,e&&e.hasComposite,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+=" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c="function",f=this.escapeExpression,p=this;
return d+='<div class="details-title-container '+f((u=t&&t.type,typeof u===c?u.apply(t):u))+'"> <h1 class="item-title"></h1> </div> <div class="details-metadata-container '+f((u=t&&t.type,typeof u===c?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">'+f(n(2).call(t,"Failed to load items for this playlist.",{
hash:{},data:i}))+'</h1> <div class="loading-container"> <div class="loading loading-inline"></div> </div> </div> <div class="details-poster-container '+f((u=t&&t.type,typeof u===c?u.apply(t):u))+'"> ',u=r.if.call(t,t&&t.hasComposite,{hash:{},inverse:p.noop,fn:p.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+=' <div class="playlist-side-strip item-side-strip media-poster '+f((u=t&&t.type,typeof u===c?u.apply(t):u))+'"> ',u=r.if.call(t,t&&t.smart,{hash:{},inverse:p.noop,fn:p.program(4,l,i),data:i}),
(u||0===u)&&(d+=u),d+=" </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,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)?i=s.call(t,{hash:{},data:a}):(s=t&&t.serverID,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+"/details/",(s=n.parentKey)?i=s.call(t,{
hash:{},data:a}):(s=t&&t.parentKey,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+'"></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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(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),a=a||{};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,a),fn:u.program(1,i,a),data:a}),(o||0===o)&&(l+=o),l+=" </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> <h1>'+o(n(2).call(t,"This media type does not have a details page.",{hash:{},data:i}))+"</h1> </div> </div> "})},function(e,t,n){
var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<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 r=n(6);
e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"More",{hash:{},data:i}))+"</button> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,r="";return r+=' <li><a class="auto-match-agent" href="#" data-id="'+d((n=e&&e.identifier,
typeof n===u?n.apply(e):n))+'">'+d((n=e&&e.name,typeof n===u?n.apply(e):n))+"</a></li> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u="function",d=this.escapeExpression,c=this;return l+='<a class="dropdown-toggle" href="#auto-match-dropdown" data-toggle="dropdown">'+d(n(2).call(t,"Auto Match",{hash:{},data:i}))+' <i class="caret-icon caret-icon-sm"></i></a> <ul class="dropdown-menu"> ',o=r.each.call(t,t&&t.agents,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i
}),(o||0===o)&&(l+=o),l+=" </ul> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,a="";return a+=' <a class="breadcrumb-btn btn-gray" data-key="'+h((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">'+h((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="#'+h((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=r.each.call(e,e&&e.items,{hash:{},inverse:v.noop,fn:v.programWithDepth(2,o,t,e),data:t}),(n||0===n)&&(a+=n),a+=" </ul> "}function o(e,t,r){var a,i="";return i+=' <li><a class="breadcrumb-btn" data-key="'+h((a=e&&e.key,typeof a===p?a.apply(e):a))+'" href="#"><span class="dropdown-truncated-label">'+h((a=e&&e.title,typeof a===p?a.apply(e):a))+'</span><i class="dropdown-selected-icon glyphicon ok-2 ',a=n(77).call(e,(a=r&&r.item,null==a||a===!1?a:a.key),e&&e.key,{hash:{},inverse:v.noop,fn:v.program(3,l,t),
data:t}),(a||0===a)&&(i+=a),i+='"></i></a></li> '}function l(e,t){return"hidden"}function u(e,t){var n,a="";return a+=' <a class="breadcrumb-btn btn-gray" ',n=r.unless.call(e,e&&e.hasDetails,{hash:{},inverse:v.noop,fn:v.program(6,d,t),data:t}),(n||0===n)&&(a+=n),a+=' href="#"> <span class="breadcrumb-truncated-label">'+h((n=e&&e.item,n=null==n||n===!1?n:n.title,typeof n===p?n.apply(e):n))+"</span> </a> "}function d(e,t){var n,r="";return r+='data-key="'+h((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"],r=this.merge(r,e.helpers),i=i||{};var c,f="",p="function",h=this.escapeExpression,v=this;return c=r.if.call(t,t&&t.showDropdown,{hash:{},inverse:v.program(5,u,i),fn:v.program(1,s,i),data:i}),(c||0===c)&&(f+=c),f+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r,a="";return a+='<li><a class="download-btn" href="'+d((r=e&&e.downloadUrl,typeof r===u?r.apply(e):r))+'" download="'+d((r=e&&e.downloadName,typeof r===u?r.apply(e):r))+'" tabindex="-1">'+d(n(2).call(e,"Download",{
hash:{},data:t}))+"</a></li>"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u="function",d=this.escapeExpression,c=this;return l+='<li><a class="play-version-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Play Version...",{hash:{},data:i}))+'</a></li> <li><a class="play-all-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Play All",{hash:{},data:i}))+'</a></li> <li><a class="play-shuffled-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Shuffle",{hash:{},data:i}))+'</a></li> <li><a class="play-next-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Play Next",{
hash:{},data:i}))+'</a></li> <li><a class="add-to-queue-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Add to Queue",{hash:{},data:i}))+'</a></li> <li><a class="play-mix-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Play Plex Mix",{hash:{},data:i}))+'</a></li> <li><a class="play-trailer-btn play-primary-extra-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Play Trailer",{hash:{},data:i}))+'</a></li> <li><a class="play-music-video-btn play-primary-extra-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Play Music Video",{
hash:{},data:i}))+'</a></li> <li><a class="add-to-playlist-btn btn-link" href="#" tabindex="-1">'+d(n(2).call(t,"Add to Playlist...",{hash:{},data:i}))+'</a></li> <li class="divider"></li> <li><a class="refresh-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Refresh",{hash:{},data:i}))+'</a></li> <li><a class="mark-watched-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Mark as Watched",{hash:{},data:i}))+'</a></li> <li><a class="mark-unwatched-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Mark as Unwatched",{
hash:{},data:i}))+'</a></li> <li><a class="sync-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Sync...",{hash:{},data:i}))+'</a></li> <li><a class="convert-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Optimize...",{hash:{},data:i}))+"</a></li> ",o=r.if.call(t,t&&t.downloadUrl,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+=' <li><a class="watch-later-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Watch Later",{hash:{},data:i}))+'</a></li> <li><a class="share-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Share...",{
hash:{},data:i}))+'</a></li> <li><a class="recommend-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Recommend...",{hash:{},data:i}))+'</a></li> <li><a class="delete-btn has-danger" href="#" tabindex="-1">'+d(n(2).call(t,"Delete",{hash:{},data:i}))+'</a></li> <li><a class="info-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Info",{hash:{},data:i}))+"</a></li> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),
i=i||{};var s="",o=this.escapeExpression;return s+='<div class="play-queue-empty-message">'+o(n(2).call(t,"Nothing queued",{hash:{},data:i}))+"</div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){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"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c=this,f=this.escapeExpression;
return d+='<button class="btn-link dropdown-toggle ',u=r.unless.call(t,t&&t.canEdit,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+='" 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=r.unless.call(t,t&&t.canEdit,{hash:{},inverse:c.noop,fn:c.program(3,o,i),data:i}),(u||0===u)&&(d+=u),d+='"> <li class="dropdown-header play-queue-header"> ',u=r.if.call(t,t&&t.canPlaylist,{
hash:{},inverse:c.noop,fn:c.program(5,l,i),data:i}),(u||0===u)&&(d+=u),d+=' <i class="glyphicon show-thumbnails-with-lines"></i> '+f(n(2).call(t,"Up Next",{hash:{},data:i}))+" </li> </ol> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<a class="play-queue-metadata-region" href="#"></a> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),a=a||{};var i,s,o="",l="function",u=this.escapeExpression;return o+='<div class="media-poster ',(s=n.type)?i=s.call(t,{hash:{},data:a}):(s=t&&t.type,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+'"></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> <button class="delete-btn btn-link btn-danger" tabindex="-1"><i class="glyphicon remove-2"></i></button> ';
})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r,a="";return a+='<li><a class="download-btn" href="'+d((r=e&&e.downloadUrl,typeof r===u?r.apply(e):r))+'" download="'+d((r=e&&e.downloadName,typeof r===u?r.apply(e):r))+'" tabindex="-1">'+d(n(2).call(e,"Download",{hash:{},data:t}))+"</a></li>"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u="function",d=this.escapeExpression,c=this;return l+='<li><a class="play-mix-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Play Plex Mix",{
hash:{},data:i}))+'</a></li> <li><a class="add-to-playlist-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Add to Playlist...",{hash:{},data:i}))+'</a></li> <li class="divider"></li> <li><a class="sync-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Sync...",{hash:{},data:i}))+"</a></li> ",o=r.if.call(t,t&&t.downloadUrl,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+=' <li><a class="share-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Share...",{hash:{},data:i}))+'</a></li> <li><a class="recommend-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Recommend...",{
hash:{},data:i}))+'</a></li> <li><a class="info-btn" href="#" tabindex="-1">'+d(n(2).call(t,"Info",{hash:{},data:i}))+"</a></li> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t,r){var a,i="";return i+=' <li><a href="#" class="type-btn" data-key="'+c((a=e&&e.key,typeof a===d?a.apply(e):a))+'">'+c(n(2).call(e,e&&e.title,{hash:{},data:t}))+" ",a=n(23).call(e,(a=r&&r.currentType,null==a||a===!1?a:a.key),e&&e.key,{hash:{},inverse:f.noop,fn:f.program(2,o,t),
data:t}),(a||0===a)&&(i+=a),i+="</a></li> "}function o(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d="function",c=this.escapeExpression,f=this;return u+='<a class="btn-gray dropdown-toggle" href="#playlist-type-dropdown" data-toggle="dropdown">'+c(n(2).call(t,(l=t&&t.currentType,null==l||l===!1?l:l.title),{hash:{},data:i}))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"> ',l=r.each.call(t,t&&t.types,{
hash:{},inverse:f.noop,fn:f.programWithDepth(1,s,i,t),data:i}),(l||0===l)&&(u+=l),u+=" </ul> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(e,t){var r,a="";return a+=' <a class="dropdown-toggle ',r=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.noop,fn:f.program(2,s,t),data:t}),(r||0===r)&&(a+=r),a+='" href="#primary-player-dropdown" data-toggle="dropdown"> <i class="',r=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.program(6,l,t),fn:f.program(4,o,t),
data:t}),(r||0===r)&&(a+=r),a+='"></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 r,a="";return a+=' <a class="cast-btn ',r=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.noop,fn:f.program(2,s,t),data:t}),(r||0===r)&&(a+=r),a+="\" href='#'> <i class=\"",r=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.program(6,l,t),fn:f.program(4,o,t),data:t}),(r||0===r)&&(a+=r),
a+='"></i> </a> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var d,c="",f=this;return d=n.if.call(t,t&&t.showDropdown,{hash:{},inverse:f.program(8,u,a),fn:f.program(1,i,a),data:a}),(d||0===d)&&(c+=d),c+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var a,i="";return i+=' <li class="dropdown-header"><span class="dropdown-truncated-label">',a=r.if.call(e,e&&e.nowPlaying,{hash:{},inverse:b.noop,fn:b.program(2,o,t),data:t
}),(a||0===a)&&(i+=a),i+=m((a=e&&e.primaryPlayer,a=null==a||a===!1?a:a.name,typeof a===y?a.apply(e):a))+"</span></li> ",a=r.if.call(e,e&&e.showNowPlaying,{hash:{},inverse:b.noop,fn:b.program(4,l,t),data:t}),(a||0===a)&&(i+=a),i+=' <li> <a class="local-player-btn" href="#"> <i class="glyphicon ban"></i> '+m(n(2).call(e,"Disconnect",{hash:{},data:t}))+" </a> </li> "}function o(e,t){var r="";return r+=m(n(2).call(e,"Casting on",{hash:{},data:t}))+" "}function l(e,t){var n,a="";return a+=" ",n=r.each.call(e,e&&e.nowPlaying,{
hash:{},inverse:b.noop,fn:b.program(5,u,t),data:t}),(n||0===n)&&(a+=n),a+=" "}function u(e,t){var n,r="";return r+=' <li> <a class="now-playing-btn" data-id="'+m((n=e&&e.ratingKey,typeof n===y?n.apply(e):n))+'" href="#"> <i class="glyphicon play"></i> <span class="dropdown-truncated-label">'+m((n=e&&e.title,typeof n===y?n.apply(e):n))+"</span> </a> </li> "}function d(e,t){var a,i="";return i+=' <li class="dropdown-header primary-player"><a class="pull-right btn-grey refresh-btn"><i class="glyphicon repeat" href="#" tabindex="-1"></i></a> '+m(n(2).call(e,"Players",{
hash:{},data:t}))+'</li> <li class="divider"></li> ',a=r.if.call(e,e&&e.players,{hash:{},inverse:b.program(12,h,t),fn:b.program(8,c,t),data:t}),(a||0===a)&&(i+=a),i+=" "}function c(e,t){var n,a="";return a+=" ",n=r.each.call(e,e&&e.players,{hash:{},inverse:b.noop,fn:b.program(9,f,t),data:t}),(n||0===n)&&(a+=n),a+=" "}function f(e,t){var n,a="";return a+=' <li> <a class="plex-player-btn" data-id="'+m((n=e&&e.machineIdentifier,typeof n===y?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===y?n.apply(e):n))+"</span> ",n=r.if.call(e,e&&e.selected,{hash:{},inverse:b.noop,fn:b.program(10,p,t),data:t}),(n||0===n)&&(a+=n),a+=" </a> </li> "}function p(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function h(e,t){var r="";return r+=' <li class="dropdown-menu-item"> <a class="disabled">'+m(n(2).call(e,"No players found",{hash:{},data:t}))+"</a> </li> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var v,g="",m=this.escapeExpression,y="function",b=this;
return v=r.if.call(t,t&&t.primaryPlayer,{hash:{},inverse:b.program(7,d,i),fn:b.program(1,s,i),data:i}),(v||0===v)&&(g+=v),g+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,a="";return a+=' <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===f?n.apply(e):n))+'</span> <i class="caret-icon"></i> </a> <ul class="dropdown-menu"> ',
n=r.each.call(e,e&&e.servers,{hash:{},inverse:h.noop,fn:h.programWithDepth(2,o,t,e),data:t}),(n||0===n)&&(a+=n),a+=" </ul> "}function o(e,t,r){var a,i="";return i+=' <li><a data-id="'+p((a=e&&e.machineIdentifier,typeof a===f?a.apply(e):a))+'" href="#"><span class="dropdown-truncated-label">'+p((a=e&&e.friendlyName,typeof a===f?a.apply(e):a))+"</span>",a=n(23).call(e,(a=r&&r.currentServer,null==a||a===!1?a:a.machineIdentifier),e&&e.machineIdentifier,{hash:{},inverse:h.noop,fn:h.program(3,l,t),data:t
}),(a||0===a)&&(i+=a),i+="</a></li> "}function l(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function u(e,t){var n,r="";return r+=' <span class="dropdown-placeholder"> <span class="dropdown-friendly-name">'+p((n=e&&e.currentServer,n=null==n||n===!1?n:n.friendlyName,typeof n===f?n.apply(e):n))+"</span> </span> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var d,c="",f="function",p=this.escapeExpression,h=this;return d=r.if.call(t,t&&t.showDropdown,{hash:{},
inverse:h.program(5,u,i),fn:h.program(1,s,i),data:i}),(d||0===d)&&(c+=d),c+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,a="";return a+=' <a class="dropdown-toggle" href="#section-dropdown" data-toggle="dropdown">'+p((n=e&&e.currentSectionTitle,typeof n===v?n.apply(e):n))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"> ',n=r.if.call(e,e&&e.showPlaylists,{hash:{},inverse:h.noop,fn:h.programWithDepth(2,o,t,e),data:t}),(n||0===n)&&(a+=n),
a+=" ",n=r.each.call(e,e&&e.sections,{hash:{},inverse:h.noop,fn:h.programWithDepth(5,u,t,e),data:t}),(n||0===n)&&(a+=n),a+=" </ul> "}function o(e,t,a){var i,s="";return s+=' <li><a href="#!/server/'+p(n(71).call(e,a&&a.serverID,{hash:{},data:t}))+'/playlists"><span class="dropdown-truncated-label">'+p(n(2).call(e,"Playlists",{hash:{},data:t}))+"</span>",i=r.unless.call(e,e&&e.currentSectionKey,{hash:{},inverse:h.noop,fn:h.program(3,l,t),data:t}),(i||0===i)&&(s+=i),s+="</a></li> "}function l(e,t){
return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function u(e,t,r){var a,i="";return i+=' <li><a href="#!/server/'+p(n(71).call(e,r&&r.serverID,{hash:{},data:t}))+"/section/"+p(n(71).call(e,e&&e.key,{hash:{},data:t}))+'"><span class="dropdown-truncated-label">'+p((a=e&&e.title,typeof a===v?a.apply(e):a))+"</span>",a=n(23).call(e,r&&r.currentSectionKey,e&&e.key,{hash:{},inverse:h.noop,fn:h.program(3,l,t),data:t}),(a||0===a)&&(i+=a),i+="</a></li> "}function d(e,t){var n,r="";return r+=" "+p((n=e&&e.currentSectionTitle,
typeof n===v?n.apply(e):n))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var c,f="",p=this.escapeExpression,h=this,v="function";return c=r.if.call(t,t&&t.showDropdown,{hash:{},inverse:h.program(7,d,i),fn:h.program(1,s,i),data:i}),(c||0===c)&&(f+=c),f+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var a,i="";return i+=' <a class="btn-gray dropdown-toggle" href="#section-subset-dropdown" data-toggle="dropdown">'+p(n(2).call(e,(a=e&&e.currentSubset,
null==a||a===!1?a:a.title),{hash:{},data:t}))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"> ',a=r.each.call(e,e&&e.subsets,{hash:{},inverse:h.noop,fn:h.programWithDepth(2,o,t,e),data:t}),(a||0===a)&&(i+=a),i+=" </ul> "}function o(e,t,n){var a,i="";return i+=" ",a=r.if.call(e,e&&e.primary,{hash:{},inverse:h.noop,fn:h.programWithDepth(3,l,t,n),data:t}),(a||0===a)&&(i+=a),i+=" "}function l(e,t,r){var a,i="";return i+=' <li><a href="#!/server/'+p(n(71).call(e,r&&r.serverID,{hash:{},data:t
}))+"/section/"+p(n(71).call(e,r&&r.sectionID,{hash:{},data:t}))+"/"+p(n(71).call(e,e&&e.key,{hash:{},data:t}))+'">'+p(n(2).call(e,e&&e.title,{hash:{},data:t}))+" ",a=n(23).call(e,(a=r&&r.currentSubset,null==a||a===!1?a:a.key),e&&e.key,{hash:{},inverse:h.noop,fn:h.program(4,u,t),data:t}),(a||0===a)&&(i+=a),i+="</a></li> "}function u(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}function d(e,t){var r,a="";return a+=' <span class="dropdown-placeholder">'+p(n(2).call(e,(r=e&&e.currentSubset,
null==r||r===!1?r:r.title),{hash:{},data:t}))+"</span> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var c,f="",p=this.escapeExpression,h=this;return c=r.if.call(t,t&&t.showDropdown,{hash:{},inverse:h.program(6,d,i),fn:h.program(1,s,i),data:i}),(c||0===c)&&(f+=c),f+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s,o="",l=this.escapeExpression;return o+='<a class="btn-gray dropdown-toggle" href="#section-type-dropdown" data-toggle="dropdown">'+l(n(2).call(t,(s=t&&t.currentType,
null==s||s===!1?s:s.plural),{hash:{},data:i}))+' <i class="caret-icon"></i></a> <ul class="dropdown-menu"></ul> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return'<i class="dropdown-selected-icon glyphicon ok-2"></i>'}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this.escapeExpression,d=this;return l+='<a href="#">'+u(n(2).call(t,t&&t.plural,{hash:{},data:i}))+" ",o=r.if.call(t,t&&t.selected,{hash:{},inverse:d.noop,
fn:d.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+="</a> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var a,i="";return i+=' <a class="dropdown-toggle" href="#'+p((a=e&&e.type,typeof a===f?a.apply(e):a))+'-dropdown" data-toggle="dropdown"> '+p(n(400).call(e,e&&e.selectedStream,{hash:{},data:t}))+' <i class="caret-icon caret-icon-sm"></i> </a> <ul class="dropdown-menu"> ',a=r.each.call(e,e&&e.streams,{hash:{},inverse:h.noop,fn:h.program(2,o,t),
data:t}),(a||0===a)&&(i+=a),i+=" </ul> "}function o(e,t){var a,i="";return i+=' <li> <a data-id="'+p((a=e&&e.id,typeof a===f?a.apply(e):a))+'" href="#"> '+p(n(400).call(e,e,{hash:{},data:t}))+" ",a=r.if.call(e,e&&e.selected,{hash:{},inverse:h.noop,fn:h.program(3,l,t),data:t}),(a||0===a)&&(i+=a),i+=" </a> </li> "}function l(e,t){return' <i class="dropdown-selected-icon glyphicon ok-2"></i> '}function u(e,t){var r="";return r+=" "+p(n(400).call(e,e&&e.selectedStream,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),i=i||{};var d,c="",f="function",p=this.escapeExpression,h=this;return d=r.if.call(t,t&&t.showDropdown,{hash:{},inverse:h.program(5,u,i),fn:h.program(1,s,i),data:i}),(d||0===d)&&(c+=d),c+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=" "+u(n(29).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this.escapeExpression,d=this;
return l+='<form class="edit-metadata-form"> ',o=r.each.call(t,t,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+=" </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r,a="";return a+=' <div class="row"> <div class="col-md-12 selectize"> '+f(n(29).call(e,"autocompleteTextInput",{hash:{label:"Artist",name:"parentTitle",placeholder:(r=e&&e.placeholders,null==r||r===!1?r:r.parentTitle),ratingKey:(r=e&&e.item,null==r||r===!1?r:r.parentRatingKey),
title:(r=e&&e.item,null==r||r===!1?r:r.parentTitle)},data:t}))+" </div> </div> "}function o(e,t){var r,a="";return a+=' <div class="col-md-4"> '+f(n(29).call(e,"lockableTextInput",{hash:{label:"Year",name:"year",value:(r=e&&e.item,null==r||r===!1?r:r.year),placeholder:(r=e&&e.placeholders,null==r||r===!1?r:r.year),locked:(r=e&&e.locked,null==r||r===!1?r:r.year),ratingKey:(r=e&&e.item,null==r||r===!1?r:r.ratingKey)},data:t}))+" </div> "}function l(e,t){return"9"}function u(e,t){return"5"}this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),i=i||{};var d,c="",f=this.escapeExpression,p=this;return c+='<form class="edit-metadata-form"> ',d=r.if.call(t,t&&t.canReparent,{hash:{},inverse:p.noop,fn:p.program(1,s,i),data:i}),(d||0===d)&&(c+=d),c+=' <div class="row"> <div class="col-md-12 selectize"> '+f(n(29).call(t,"lockableTextInput",{hash:{label:"Album",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),scopeToAttr:"parentRatingKey",scopeToParam:"artist.id"},data:i}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(n(29).call(t,"lockableTextInput",{hash:{label:"Sort Album",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:i}))+' </div> </div> <div class="row"> <div class="col-md-3"> <label>'+f(n(2).call(t,"Rating",{
hash:{},data:i}))+'</label> <div class="rating-region"></div> </div> ',d=r.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:p.noop,fn:p.program(3,o,i),data:i}),(d||0===d)&&(c+=d),c+=' <div class="col-md-',d=r.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:p.program(7,u,i),fn:p.program(5,l,i),data:i}),(d||0===d)&&(c+=d),c+=' "> '+f(n(29).call(t,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(d=t&&t.item,null==d||d===!1?d:d.originallyAvailableAt),
placeholder:(d=t&&t.placeholders,null==d||d===!1?d:d.originallyAvailableAt),locked:(d=t&&t.locked,null==d||d===!1?d:d.originallyAvailableAt)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+f(n(29).call(t,"lockableTextInput",{hash:{label:"Record Label",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:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+f(n(29).call(t,"lockableTextInput",{hash:{label:"Review",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),ratingKey:(d=t&&t.item,null==d||d===!1?d:d.ratingKey)},data:i}))+" </div> </div> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(29).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(s=t&&t.locked,null==s||s===!1?s:s.genre)},data:i}))+" </div> </div> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),
i=i||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+l(n(29).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:i}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+l(n(29).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:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(29).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:i}))+" </div> </div> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r,a="";return a+=' <div class="row"> <div class="col-md-12"> '+u(n(29).call(e,"lockableTagInput",{hash:{label:"Similar Artists",name:"similar",attribute:"similar",query:"title",locked:(r=e&&e.locked,null==r||r===!1?r:r.similar)},data:t}))+" </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this.escapeExpression,d=this;return l+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+u(n(29).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(o=t&&t.locked,null==o||o===!1?o:o.genre)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+u(n(29).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",locked:(o=t&&t.locked,null==o||o===!1?o:o.collection)
},data:i}))+" </div> </div> ",o=r.if.call(t,t&&t.canEditSimilarArtists,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+=" </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var a,i="";return i+=' <div class="upload-artwork-container"> <div class="upload-prompt"> ',a=r.if.call(e,e&&e.showFileUpload,{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+=' <a class="upload-url-btn" href="#">'+d(n(2).call(e,"enter a url",{
hash:{},data:t}))+'</a> </div> <div class="upload-progress"> '+d(n(2).call(e,"Uploading artwork...",{hash:{},data:t}))+' </div> <div class="upload-success"> '+d(n(2).call(e,"this artwork was uploaded successfully",{hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> '+d(n(2).call(e,"{1}upload another{2}",'<a class="upload-back-btn" href="#">',"</a>",{hash:{},data:t}))+' </div> <div class="upload-error"> '+d(n(2).call(e,"there was an error uploading this artwork",{hash:{},data:t
}))+' <span class="upload-prompt-divider">&middot;</span> '+d(n(2).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="'+d(n(2).call(e,"Enter a url to upload an image from the web",{hash:{},data:t}))+'"> <div class="upload-form-help"> <div class="pull-right">'+d(n(2).call(e,"enter to {1}upload{2}",'<a class="submit-url-btn" href="#">',"</a>",{hash:{},
data:t}))+'</div> <div class="pull-left">'+d(n(2).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 r="";return r+=' <span class="artwork-file-container"> <input type="file" class="artwork-file-control" multiple> <a href="#">'+d(n(2).call(e,"choose an image",{hash:{},data:t}))+'</a> </span> <span class="upload-prompt-divider">&middot;</span> '+d(n(2).call(e,"drag and drop",{hash:{},data:t}))+' <span class="upload-prompt-divider">&middot;</span> ';
}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c=this;return l=r.if.call(t,t&&t.showUpload,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=' <div class="artwork-list-container"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(29).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:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(29).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:i}))+' </div> </div> <div class="row"> <div class="col-md-6"> '+l(n(29).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:i}))+' </div> <div class="col-md-6"> '+l(n(29).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:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(29).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:i}))+" </div> </div> </form> ";
})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(29).call(t,"lockableTagInput",{hash:{label:"Writers",name:"writer",attribute:"writers",locked:(s=t&&t.locked,null==s||s===!1?s:s.writer)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(29).call(t,"lockableTagInput",{
hash:{label:"Directors",name:"director",attribute:"directors",locked:(s=t&&t.locked,null==s||s===!1?s:s.director)},data:i}))+" </div> </div> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+="<h4>"+o(n(2).call(t,"Files",{hash:{},data:i}))+'</h4> <ul class="media-info-file-list"></ul> <div class="loading-container"><div class="loading"></div></div> ';
})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,s,o="",l="function",u=this.escapeExpression;return(s=n.file)?i=s.call(t,{hash:{},data:a}):(s=t&&t.file,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r,a="";return a+=" "+p(n(29).call(e,"lockableTextInput",{hash:{label:"Originally Available",
name:"originallyAvailableAt",value:(r=e&&e.item,null==r||r===!1?r:r.originallyAvailableAt),placeholder:(r=e&&e.placeholders,null==r||r===!1?r:r.originallyAvailableAt),locked:(r=e&&e.locked,null==r||r===!1?r:r.originallyAvailableAt)},data:t}))+" "}function o(e,t){var r,a="";return a+=" "+p(n(29).call(e,"lockableTextInput",{hash:{label:"Year",name:"year",value:(r=e&&e.item,null==r||r===!1?r:r.year),placeholder:(r=e&&e.placeholders,null==r||r===!1?r:r.year),locked:(r=e&&e.locked,null==r||r===!1?r:r.year)
},data:t}))+" "}function l(e,t){return"12"}function u(e,t){return"6"}function d(e,t){var r,a="";return a+=' <div class="col-md-6"> '+p(n(29).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(r=e&&e.item,null==r||r===!1?r:r.originallyAvailableAt),placeholder:(r=e&&e.placeholders,null==r||r===!1?r:r.originallyAvailableAt),locked:(r=e&&e.locked,null==r||r===!1?r:r.originallyAvailableAt)},data:t}))+" </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),
i=i||{};var c,f="",p=this.escapeExpression,h=this;return f+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+p(n(29).call(t,"lockableTextInput",{hash:{label:"Title",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)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(n(29).call(t,"lockableTextInput",{
hash:{label:"Sort Title",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:i}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(n(29).call(t,"lockableTextInput",{hash:{label:"Original Title",name:"originalTitle",value:(c=t&&t.item,null==c||c===!1?c:c.originalTitle),placeholder:(c=t&&t.placeholders,
null==c||c===!1?c:c.originalTitle),locked:(c=t&&t.locked,null==c||c===!1?c:c.originalTitle),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-4"> ',c=r.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:h.program(3,o,i),fn:h.program(1,s,i),data:i}),(c||0===c)&&(f+=c),f+=' </div> <div class="col-md-4"> '+p(n(29).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(c=t&&t.item,null==c||c===!1?c:c.rating),placeholder:(c=t&&t.placeholders,
null==c||c===!1?c:c.rating),locked:(c=t&&t.locked,null==c||c===!1?c:c.rating)},data:i}))+' </div> <div class="col-md-4 selectize"> '+p(n(29).call(t,"lockableTextInput",{hash:{label:"Content Rating",name:"contentRating",value:(c=t&&t.item,null==c||c===!1?c:c.contentRating),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.contentRating),locked:(c=t&&t.locked,null==c||c===!1?c:c.contentRating),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-',
c=r.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:h.program(7,u,i),fn:h.program(5,l,i),data:i}),(c||0===c)&&(f+=c),f+=' selectize"> '+p(n(29).call(t,"lockableTextInput",{hash:{label:"Studio",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:i}))+" </div> ",c=r.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:h.noop,
fn:h.program(9,d,i),data:i}),(c||0===c)&&(f+=c),f+=' </div> <div class="row"> <div class="col-md-12"> '+p(n(29).call(t,"lockableTextInput",{hash:{label:"Tagline",name:"tagline",value:(c=t&&t.item,null==c||c===!1?c:c.tagline),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.tagline),locked:(c=t&&t.locked,null==c||c===!1?c:c.tagline)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+p(n(29).call(t,"lockableTextInput",{hash:{label:"Summary",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)},data:i}))+" </div> </div> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-6"> '+l(n(29).call(t,"lockableTagInput",{
hash:{label:"Directors",name:"director",attribute:"directors",locked:(s=t&&t.locked,null==s||s===!1?s:s.director)},data:i}))+' </div> <div class="col-md-6"> '+l(n(29).call(t,"lockableTagInput",{hash:{label:"Country",name:"country",attribute:"countries",locked:(s=t&&t.locked,null==s||s===!1?s:s.country)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(29).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(s=t&&t.locked,null==s||s===!1?s:s.genre)
},data:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(29).call(t,"lockableTagInput",{hash:{label:"Writers",name:"writer",attribute:"writers",locked:(s=t&&t.locked,null==s||s===!1?s:s.writer)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(29).call(t,"lockableTagInput",{hash:{label:"Collections",name:"collection",attribute:"collections",locked:(s=t&&t.locked,null==s||s===!1?s:s.collection)},data:i}))+" </div> </div> </form> "})},function(e,t,n){var r=n(6);
e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-6"> '+l(n(29).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:i}))+' </div> <div class="col-md-6"> '+l(n(29).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:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(29).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:i}))+" </div> </div> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-9"> '+l(n(29).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:i}))+' </div> <div class="col-md-3"> '+l(n(29).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:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(29).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:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(29).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:i}))+" </div> </div> </form> "})},function(e,t,n){
var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(29).call(t,"textInput",{hash:{label:"Title",name:"title",value:(s=t&&t.item,null==s||s===!1?s:s.title)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(29).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:i}))+" </div> </div> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(29).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:i}))+" </div> </div> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,a="";return a+=' <form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> ',n=r.if.call(e,e&&e.showLabels,{hash:{},inverse:p.program(4,l,t),fn:p.program(2,o,t),
data:t}),(n||0===n)&&(a+=n),a+=" </div> </div> </form> "}function o(e,t){var r,a="";return a+=" "+f(n(29).call(e,"lockableTagInput",{hash:{label:"Labels",name:"label",attribute:"labels",locked:(r=e&&e.locked,null==r||r===!1?r:r.label)},data:t}))+" "}function l(e,t){var r="";return r+=' <div class="form-group"> <label>'+f(n(2).call(e,"Labels",{hash:{},data:t}))+"</label> <p>"+f(n(2).call(e,"Labels require Plex Media Server {1} or later.",e&&e.labelsMinVersion,{hash:{},data:t}))+"</p> </div> "}function u(e,t){
var r,a="";return a+=' <div class="row row-padded"> <h4 class="text-muted text-center">'+f(n(2).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="'+f((r=e&&e.plexPassUrl,typeof r===h?r.apply(e):r))+'" target="_blank">'+f(n(2).call(e,"Learn More",{hash:{},data:t}))+"</a> </p> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var d,c="",f=this.escapeExpression,p=this,h="function";return d=r.if.call(t,t&&t.hasContentFilterFeature,{
hash:{},inverse:p.program(6,u,i),fn:p.program(1,s,i),data:i}),(d||0===d)&&(c+=d),c+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r,a="";return a+=" "+p(n(29).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",value:(r=e&&e.item,null==r||r===!1?r:r.originallyAvailableAt),placeholder:(r=e&&e.placeholders,null==r||r===!1?r:r.originallyAvailableAt),locked:(r=e&&e.locked,null==r||r===!1?r:r.originallyAvailableAt)
},data:t}))+" "}function o(e,t){var r,a="";return a+=" "+p(n(29).call(e,"lockableTextInput",{hash:{label:"Year",name:"year",value:(r=e&&e.item,null==r||r===!1?r:r.year),placeholder:(r=e&&e.placeholders,null==r||r===!1?r:r.year),locked:(r=e&&e.locked,null==r||r===!1?r:r.year)},data:t}))+" "}function l(e,t){return"12"}function u(e,t){return"6"}function d(e,t){var r,a="";return a+=' <div class="col-md-6"> '+p(n(29).call(e,"lockableTextInput",{hash:{label:"Originally Available",name:"originallyAvailableAt",
value:(r=e&&e.item,null==r||r===!1?r:r.originallyAvailableAt),placeholder:(r=e&&e.placeholders,null==r||r===!1?r:r.originallyAvailableAt),locked:(r=e&&e.locked,null==r||r===!1?r:r.originallyAvailableAt)},data:t}))+" </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var c,f="",p=this.escapeExpression,h=this;return f+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12 selectize"> '+p(n(29).call(t,"lockableTextInput",{hash:{label:"Title",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)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(n(29).call(t,"lockableTextInput",{hash:{label:"Sort Title",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:i}))+' </div> </div> <div class="row"> <div class="col-md-4"> ',c=r.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:h.program(3,o,i),fn:h.program(1,s,i),data:i}),(c||0===c)&&(f+=c),f+=' </div> <div class="col-md-4"> '+p(n(29).call(t,"lockableNumericInput",{hash:{label:"Rating",name:"rating",value:(c=t&&t.item,null==c||c===!1?c:c.rating),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.rating),locked:(c=t&&t.locked,
null==c||c===!1?c:c.rating)},data:i}))+' </div> <div class="col-md-4 selectize"> '+p(n(29).call(t,"lockableTextInput",{hash:{label:"Content Rating",name:"contentRating",value:(c=t&&t.item,null==c||c===!1?c:c.contentRating),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.contentRating),locked:(c=t&&t.locked,null==c||c===!1?c:c.contentRating),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+p(n(29).call(t,"lockableTextInput",{
hash:{label:"Original Title",name:"originalTitle",value:(c=t&&t.item,null==c||c===!1?c:c.originalTitle),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.originalTitle),locked:(c=t&&t.locked,null==c||c===!1?c:c.originalTitle),ratingKey:(c=t&&t.item,null==c||c===!1?c:c.ratingKey)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-',c=r.if.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:h.program(7,u,i),fn:h.program(5,l,i),data:i}),(c||0===c)&&(f+=c),f+=' selectize"> '+p(n(29).call(t,"lockableTextInput",{
hash:{label:"Studio",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:i}))+" </div> ",c=r.unless.call(t,t&&t.supportsLinkedYears,{hash:{},inverse:h.noop,fn:h.program(9,d,i),data:i}),(c||0===c)&&(f+=c),f+=' </div> <div class="row"> <div class="col-md-12"> '+p(n(29).call(t,"lockableTextInput",{hash:{label:"Tagline",name:"tagline",
value:(c=t&&t.item,null==c||c===!1?c:c.tagline),placeholder:(c=t&&t.placeholders,null==c||c===!1?c:c.tagline),locked:(c=t&&t.locked,null==c||c===!1?c:c.tagline)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+p(n(29).call(t,"lockableTextInput",{hash:{label:"Summary",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)},data:i}))+" </div> </div> </form> ";
})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(29).call(t,"lockableTagInput",{hash:{label:"Genres",name:"genre",attribute:"genres",locked:(s=t&&t.locked,null==s||s===!1?s:s.genre)},data:i}))+' </div> </div> <div class="row"> <div class="col-md-12"> '+l(n(29).call(t,"lockableTagInput",{
hash:{label:"Collections",name:"collection",attribute:"collections",locked:(s=t&&t.locked,null==s||s===!1?s:s.collection)},data:i}))+" </div> </div> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r,a="";return a+=' <div class="row"> <div class="col-md-12 selectize"> '+u(n(29).call(e,"autocompleteTextInput",{hash:{label:"Artist",name:"grandparentTitle",placeholder:(r=e&&e.placeholders,null==r||r===!1?r:r.grandparentTitle),ratingKey:(r=e&&e.item,
null==r||r===!1?r:r.grandparentRatingKey),title:(r=e&&e.item,null==r||r===!1?r:r.grandparentTitle)},data:t}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+u(n(29).call(e,"autocompleteTextInput",{hash:{label:"Album",name:"parentTitle",placeholder:(r=e&&e.placeholders,null==r||r===!1?r:r.parentTitle),ratingKey:(r=e&&e.item,null==r||r===!1?r:r.parentRatingKey),title:(r=e&&e.item,null==r||r===!1?r:r.parentTitle),scopeToAttr:"grandparentRatingKey",scopeToParam:"artist.id"},data:t
}))+" </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this.escapeExpression,d=this;return l+='<form class="edit-metadata-form"> ',o=r.if.call(t,t&&t.canReparent,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+=' <div class="row"> <div class="col-md-12"> '+u(n(29).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:i}))+' </div> </div> <div class="row"> <div class="col-md-4"> <label>'+u(n(2).call(t,"Rating",{hash:{},data:i}))+'</label> <div class="rating-region"></div> </div> <div class="col-md-4"> '+u(n(29).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:i}))+' </div> <div class="col-md-4"> '+u(n(29).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:i}))+' </div> </div> <div class="row"> <div class="col-md-12 selectize"> '+u(n(29).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:i}))+" </div> </div> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s,o="",l=this.escapeExpression;return o+='<form class="edit-metadata-form"> <div class="row"> <div class="col-md-12"> '+l(n(29).call(t,"lockableTagInput",{
hash:{label:"Moods",name:"mood",attribute:"moods",locked:(s=t&&t.locked,null==s||s===!1?s:s.mood)},data:i}))+" </div> </div> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var a,i="";return i+=' <div class="setup-agent-section"> <div class="setup-agent-title">'+d(n(2).call(e,"{1} Settings",e&&e.agentName,{hash:{},data:t}))+'</div> <p class="setup-agent-disclaimer">'+d(n(2).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"> ',a=r.each.call(e,e&&e.settings,{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+=" </div> </div> "}function o(e,t){var r="";return r+=" "+d(n(29).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c=this;return l=r.if.call(t,t&&t.settings,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=" ";
})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<form class="edit-section-type-form settings-container"> <p>'+o(n(2).call(t,"There was an error adding this library.",{hash:{},data:i}))+"</p> <p>"+o(n(2).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:i}))+"</p> </form>"})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,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)?i=s.call(t,{hash:{},data:a}):(s=t&&t.titles,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+"</h4> "})},function(e,t,n){
var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return' <i class="server-alert-icon glyphicon cogwheel"></i> '}function o(e,t){var r;return r=n(23).call(e,(r=e&&e.event,null==r||r===!1?r:r._type),"status",{hash:{},inverse:F.program(6,u,t),fn:F.program(4,l,t),data:t}),r||0===r?r:""}function l(e,t){return' <i class="server-alert-icon glyphicon bullhorn"></i> '}function u(e,t){var r;return r=n(23).call(e,(r=e&&e.event,null==r||r===!1?r:r._type),"playing",{hash:{},inverse:F.program(9,c,t),
fn:F.program(7,d,t),data:t}),r||0===r?r:""}function d(e,t){return' <i class="server-alert-icon glyphicon imac"></i> '}function c(e,t){var r;return r=n(23).call(e,(r=e&&e.event,null==r||r===!1?r:r._type),"websocket",{hash:{},inverse:F.program(13,h,t),fn:F.program(10,f,t),data:t}),r||0===r?r:""}function f(e,t){var n,a="";return a+=" ",n=r.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.opened),{hash:{},inverse:F.program(11,p,t),fn:F.program(4,l,t),data:t}),(n||0===n)&&(a+=n),a+=" "}function p(e,t){return' <i class="server-alert-icon glyphicon warning-sign"></i> ';
}function h(e,t){var r;return r=n(23).call(e,(r=e&&e.event,null==r||r===!1?r:r.state),0,{hash:{},inverse:F.program(16,g,t),fn:F.program(14,v,t),data:t}),r||0===r?r:""}function v(e,t){return' <i class="server-alert-icon glyphicon plus"></i> '}function g(e,t){var r;return r=n(23).call(e,(r=e&&e.event,null==r||r===!1?r:r.state),5,{hash:{},inverse:F.program(19,y,t),fn:F.program(17,m,t),data:t}),r||0===r?r:""}function m(e,t){return' <i class="server-alert-icon glyphicon ok-2"></i> '}function y(e,t){var r;
return r=n(23).call(e,(r=e&&e.event,null==r||r===!1?r:r.state),6,{hash:{},inverse:F.program(22,P,t),fn:F.program(20,b,t),data:t}),r||0===r?r:""}function b(e,t){return' <i class="server-alert-icon glyphicon magic"></i> '}function P(e,t){var r;return r=n(23).call(e,(r=e&&e.event,null==r||r===!1?r:r.state),9,{hash:{},inverse:F.program(25,S,t),fn:F.program(23,w,t),data:t}),r||0===r?r:""}function w(e,t){return' <i class="server-alert-icon glyphicon bin"></i> '}function S(e,t){return' <i class="server-alert-icon glyphicon tags"></i> ';
}function _(e,t){var r,a="";return a+=" "+B(n(2).call(e,"{1} set to {2}.",(r=e&&e.event,null==r||r===!1?r:r.label),(r=e&&e.event,null==r||r===!1?r:r.value),{hash:{},data:t}))+" "}function T(e,t){var r;return r=n(23).call(e,(r=e&&e.event,null==r||r===!1?r:r._type),"status",{hash:{},inverse:F.program(36,E,t),fn:F.program(30,I,t),data:t}),r||0===r?r:""}function I(e,t){var n,a="";return a+=" ",n=r.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.message),{hash:{},inverse:F.program(33,C,t),fn:F.program(31,M,t),
data:t}),(n||0===n)&&(a+=n),a+=" "}function M(e,t){var r,a="";return a+=" "+B(n(2).call(e,(r=e&&e.event,null==r||r===!1?r:r.message),{hash:{},data:t}))+" "}function C(e,t){var a,i="";return i+=" "+B(n(2).call(e,(a=e&&e.event,null==a||a===!1?a:a.title),{hash:{},data:t})),a=r.if.call(e,(a=e&&e.event,null==a||a===!1?a:a.description),{hash:{},inverse:F.noop,fn:F.program(34,x,t),data:t}),(a||0===a)&&(i+=a),i+=" "}function x(e,t){var r,a="";return a+=": "+B(n(2).call(e,(r=e&&e.event,null==r||r===!1?r:r.description),{
hash:{},data:t}))}function E(e,t){var r;return r=n(23).call(e,(r=e&&e.event,null==r||r===!1?r:r._type),"timeline",{hash:{},inverse:F.program(39,D,t),fn:F.program(37,k,t),data:t}),r||0===r?r:""}function k(e,t){var r,a="";return a+=" "+B(n(2).call(e,(r=e&&e.event,null==r||r===!1?r:r.stateString),{hash:{},data:t}))+' <a href="#!/server/'+B(n(71).call(e,e&&e.serverID,{hash:{},data:t}))+"/details/"+B(n(71).call(e,e&&e.itemKey,{hash:{},data:t}))+'">'+B((r=e&&e.event,r=null==r||r===!1?r:r.mediaTitle,typeof r===V?r.apply(e):r))+"</a> "+B(n(2).call(e,"in",{
hash:{},data:t}))+' <a href="#!/server/'+B(n(71).call(e,e&&e.serverID,{hash:{},data:t}))+"/section/"+B(n(71).call(e,(r=e&&e.event,null==r||r===!1?r:r.sectionID),{hash:{},data:t}))+'">'+B((r=e&&e.event,r=null==r||r===!1?r:r.sectionTitle,typeof r===V?r.apply(e):r))+"</a> "}function D(e,t){var r;return r=n(23).call(e,(r=e&&e.event,null==r||r===!1?r:r._type),"playing",{hash:{},inverse:F.program(42,O,t),fn:F.program(40,A,t),data:t}),r||0===r?r:""}function A(e,t){var r,a="";return a+=" "+B(n(2).call(e,"{1} started playing {2} on {3}.",(r=e&&e.event,
null==r||r===!1?r:r.username),(r=e&&e.event,null==r||r===!1?r:r.title),(r=e&&e.event,null==r||r===!1?r:r.player),{hash:{},data:t}))+" "}function O(e,t){var r;return r=n(23).call(e,(r=e&&e.event,null==r||r===!1?r:r._type),"websocket",{hash:{},inverse:F.noop,fn:F.program(43,R,t),data:t}),r||0===r?r:""}function R(e,t){var n,a="";return a+=" ",n=r.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.opened),{hash:{},inverse:F.program(46,N,t),fn:F.program(44,L,t),data:t}),(n||0===n)&&(a+=n),a+=" "}function L(e,t){
var r="";return r+=" "+B(n(2).call(e,"Opened connection to {1}, listening for events.",e&&e.serverName,{hash:{},data:t}))+" "}function N(e,t){var n;return n=r.if.call(e,(n=e&&e.event,null==n||n===!1?n:n.closed),{hash:{},inverse:F.program(49,U,t),fn:F.program(47,j,t),data:t}),n||0===n?n:""}function j(e,t){var r="";return r+=" "+B(n(2).call(e,"Connection to {1} closed.",e&&e.serverName,{hash:{},data:t}))+" "}function U(e,t){var r="";return r+=" "+B(n(2).call(e,"Unable to listen for events on {1}.",e&&e.serverName,{
hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var $,z="",F=this,B=this.escapeExpression,V="function";return z+='<div class="striped-list-inner-item alert-list-inner-item"> ',$=n(23).call(t,($=t&&t.event,null==$||$===!1?$:$._type),"setting",{hash:{},inverse:F.program(3,o,i),fn:F.program(1,s,i),data:i}),($||0===$)&&(z+=$),z+=' <div class="server-alert-details"> <span class="server-alert-time">'+B(n(624).call(t,($=t&&t.event,null==$||$===!1?$:$.time),"LT",{
hash:{},data:i}))+"</span> ",$=n(23).call(t,($=t&&t.event,null==$||$===!1?$:$._type),"setting",{hash:{},inverse:F.program(29,T,i),fn:F.program(27,_,i),data:i}),($||0===$)&&(z+=$),z+=" </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<div class="row row-padded"> <h4 class="text-muted text-center"> '+o(n(2).call(t,"Nothing is currently being played.",{
hash:{},data:i}))+" </h4> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"hide-actions"}function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this,c="function",f=this.escapeExpression;return u+='<a class="media-poster-container ',l=r.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+='" href="'+f((l=t&&t.url,typeof l===c?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=r.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(3,o,i),data:i}),(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">'+f(n(2).call(t,"Video",{
hash:{},data:i}))+'</span> <span class="session-transcode-video-decision"></span> </p> <p class="session-transcode-audio"> <span class="session-transcode-label">'+f(n(2).call(t,"Audio",{hash:{},data:i}))+'</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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(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),a=a||{};var l,u="",d=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:d.program(3,s,a),fn:d.program(1,i,a),data:a}),(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:d.noop,fn:d.program(5,o,a),data:a}),(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:d.noop,fn:d.program(5,o,a),data:a}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <i class="glyphicon cloud-download"></i> <span class="cloud-sync-waiting">'+d(n(2).call(e,"Waiting to be uploaded",{hash:{},data:t}))+'</span> <span class="cloud-sync-uploading hidden">'+d(n(2).call(e,"Uploading",{hash:{},data:t}))+' &middot; <span class="transcode-progress"></span>%</span> '}function o(e,t){var r="";return r+=' <i class="glyphicon circle-arrow-down"></i> '+d(n(2).call(e,"Waiting to be downloaded",{
hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c=this;return u+='<div class="media-poster"></div> <p class="title"></p> <p class="complete-subtitle subtitle hidden"> <i class="glyphicon ok-2"></i> '+d(n(2).call(t,"Synced",{hash:{},data:i}))+' </p> <p class="waiting-subtitle subtitle hidden"> ',l=r.if.call(t,t&&t.isCloudSync,{hash:{},inverse:c.program(3,o,i),fn:c.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=' </p> <p class="downloading-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+d(n(2).call(t,"Downloading",{
hash:{},data:i}))+' &middot; <span class="transcode-progress"></span>% </p> <p class="converting-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+d(n(2).call(t,"Converting",{hash:{},data:i}))+' &middot; <span class="transcode-progress"></span>% &middot; <span class="transcode-remaining"></span> </p> <p class="processing-subtitle subtitle hidden"> <i class="glyphicon more"></i> '+d(n(2).call(t,"Waiting to be converted",{hash:{},data:i}))+' </p> <p class="unknown-subtitle subtitle hidden"> <i class="glyphicon circle-question-mark"></i> '+d(n(2).call(t,"Unknown",{
hash:{},data:i}))+' </p> <p class="failed-subtitle subtitle hidden"> <i class="glyphicon warning-sign"></i> <span class="error-message"></span> </p> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<div class="row row-padded"> <h4 class="text-muted text-center"> <p>'+o(n(2).call(t,"Conversions for sync and media optimization will appear here.",{hash:{},
data:i}))+"</p> <p>"+o(n(2).call(t,"Manage your optimized versions in {1}Optimized Versions Settings{2}.",'<a href="#!/settings/server/{3}/versions">',"</a>",t&&t.serverID,{hash:{},data:i}))+"</p> </h4> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(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),a=a||{};var s,o,l="",u="function",d=this.escapeExpression,c=this;
return l+='<div class="show-actions striped-list-inner-item playlist-inner-item ',(o=n.type)?s=o.call(t,{hash:{},data:a}):(o=t&&t.type,s=typeof o===u?o.call(t,{hash:{},data:a}):o),l+=d(s)+'"> <div class="media-actions media-reorder"> ',s=n.unless.call(t,t&&t.hideDragHandle,{hash:{},inverse:c.noop,fn:c.program(1,i,a),data:a}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Converting",{hash:{},data:i}))+'</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(2).call(t,"Complete",{
hash:{},data:i}))+' </div> <div class="conversion-status-container conversion-status-disabled"> <i class="conversion-status-icon glyphicon circle-exclamation-mark text-danger"></i> '+l(n(2).call(t,"Deleted",{hash:{},data:i}))+' <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(2).call(t,"Waiting",{hash:{},data:i}))+"</span> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),i=i||{};var s,o="",l=this.escapeExpression;return o+='<a class="card-collapsed" href="#!/server/'+l(n(71).call(t,t&&t.serverID,{hash:{},data:i}))+"/directory/"+l(n(71).call(t,t&&t.currentKey,{hash:{},data:i}))+"/"+l(n(71).call(t,(s=t&&t.channel,null==s||s===!1?s:s.key),{hash:{},data:i}))+'"> <span class="media-title media-heading"></span> </a> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
a=a||{},'<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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,a="";return a+=' <div class="media-poster-overlay"></div> <div class="media-poster-actions"> ',n=r.if.call(e,(n=e&&e.item,null==n||n===!1?n:n.hasPrefs),{
hash:{},inverse:d.noop,fn:d.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+=' <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"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this,c=this.escapeExpression;return u+='<a class="media-poster-container" href="#!/server/'+c(n(71).call(t,t&&t.serverID,{
hash:{},data:i}))+"/channel/"+c(n(71).call(t,(l=t&&t.item,null==l||l===!1?l:l.key),{hash:{},data:i}))+'"> <div class="media-poster"> ',l=r.unless.call(t,t&&t.shared,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(e,t){
return"hide-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,u="",d=this,c="function",f=this.escapeExpression;return u+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,i,a),data:a}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a}):(l=t&&t.url,o=typeof l===c?l.call(t,{hash:{},data:a}):l),u+=f(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:d.noop,fn:d.program(3,s,a),data:a}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(e,t){return"selected"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o,l="",u=this,d="function",c=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,i,a),data:a}),(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:a}):(o=t&&t.index,s=typeof o===d?o.call(t,{hash:{},data:a}):o),l+=c(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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,s,o="",l="function",u=this.escapeExpression;return o+='<a class="artwork-option media-poster-container" data-rating-key="',(s=n.ratingKey)?i=s.call(t,{hash:{},data:a}):(s=t&&t.ratingKey,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+'" href="#"> <div class="media-poster"></div> </a> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){
function i(e,t){return"show-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,u="",d=this,c="function",f=this.escapeExpression;return u+='<a class="episode-list-inner-item media-list-inner-item ',o=n.if.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,i,a),data:a}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a}):(l=t&&t.url,o=typeof l===c?l.call(t,{hash:{},data:a}):l),u+=f(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:d.noop,fn:d.program(3,s,a),data:a}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(e,t){return"show-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,u="",d=this,c="function",f=this.escapeExpression;return u+='<a class="episode-list-inner-item media-list-inner-item ',o=n.if.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,i,a),data:a}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a}):(l=t&&t.url,
o=typeof l===c?l.call(t,{hash:{},data:a}):l),u+=f(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:d.noop,fn:d.program(3,s,a),data:a}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(e,t){return"hide-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,u="",d=this,c="function",f=this.escapeExpression;return u+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,i,a),data:a}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a}):(l=t&&t.url,o=typeof l===c?l.call(t,{
hash:{},data:a}):l),u+=f(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:d.noop,fn:d.program(3,s,a),data:a}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,s,o="",l="function",u=this.escapeExpression;return o+='<a class="media-poster-container play-btn" href="',(s=n.url)?i=s.call(t,{hash:{},data:a}):(s=t&&t.url,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+'"> <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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"missing"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this.escapeExpression,d="function",c=this;return l+='<div class="row disc-number hidden"> '+u(n(2).call(t,"Disc {1}",t&&t.parentIndex,{hash:{},data:i}))+' </div> <div class="row striped-list-inner-item"> <span class="col-xs-1 match-index"> '+u((o=t&&t.index,typeof o===d?o.apply(t):o))+'. </span> <span class="col-xs-11 match-track-name ',
o=r.unless.call(t,t&&t.matched,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+='"> '+u((o=t&&t.name,typeof o===d?o.apply(t):o))+" </span> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<div class="match-empty-message">'+o(n(2).call(t,"No matches found.",{hash:{},data:i}))+"</div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
function s(e,t){var n,r="";return r+=' <span class="match-name">'+f((n=e&&e.parentName,typeof n===c?n.apply(e):n))+'</span> &ndash; <span class="match-name">'+f((n=e&&e.name,typeof n===c?n.apply(e):n))+"</span> "}function o(e,t){var n,r="";return r+=' <span class="match-name">'+f((n=e&&e.name,typeof n===c?n.apply(e):n))+"</span> "}function l(e,t){var n,r="";return r+=' <span class="match-year">'+f((n=e&&e.year,typeof n===c?n.apply(e):n))+'</span> <span class="match-separator">&middot;</span> '}this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),i=i||{};var u,d="",c="function",f=this.escapeExpression,p=this;return d+='<a class="match-result col-xs-12" href="#"> <div class="row"> <div class="col-xs-9 match-title-info"> ',u=r.if.call(t,t&&t.parentName,{hash:{},inverse:p.program(3,o,i),fn:p.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+=' </div> <div class="col-xs-3 match-score-info" title="'+f(n(2).call(t,"Score {1}",t&&t.normalizedScore,{hash:{},data:i}))+'"> ',u=r.if.call(t,t&&t.year,{hash:{},inverse:p.noop,fn:p.program(5,l,i),
data:i}),(u||0===u)&&(d+=u),d+=' <span class="match-score"><i class="match-score-icon glyphicon certificate"></i>'+f((u=t&&t.normalizedScore,typeof u===c?u.apply(t):u))+'</span> </div> </div> <div class="row match-extended-info hidden"> <div class="col-xs-4"> <img class="match-art" src="'+f((u=t&&t.thumb,typeof u===c?u.apply(t):u))+'"/> </div> <div class="col-xs-8 children-region"></div> </div> </a> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){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 d(e,t){var r;return r=n(23).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:P.program(12,f,t),fn:P.program(10,c,t),data:t}),r||0===r?r:""}function c(e,t){return' <span class="media-available-at"></span> '}function f(e,t){var r;return r=n(23).call(e,e&&e.sort,"rating",{hash:{},inverse:P.program(15,h,t),fn:P.program(13,p,t),data:t}),r||0===r?r:"";
}function p(e,t){return' <span class="media-rating"></span> '}function h(e,t){var r;return r=n(23).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:P.program(18,g,t),fn:P.program(16,v,t),data:t}),r||0===r?r:""}function v(e,t){return' <span class="media-resolution"></span> '}function g(e,t){var r;return r=n(23).call(e,e&&e.sort,"duration",{hash:{},inverse:P.noop,fn:P.program(19,m,t),data:t}),r||0===r?r:""}function m(e,t){return' <span class="media-duration"></span> '}this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),i=i||{};var y,b="",P=this,w="function",S=this.escapeExpression;return b+='<a class="media-list-inner-item ',y=r.if.call(t,t&&t.showActions,{hash:{},inverse:P.noop,fn:P.program(1,s,i),data:i}),(y||0===y)&&(b+=y),b+=" ",y=r.if.call(t,t&&t.selected,{hash:{},inverse:P.noop,fn:P.program(3,o,i),data:i}),(y||0===y)&&(b+=y),b+='" href="'+S((y=t&&t.url,typeof y===w?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=r.unless.call(t,t&&t.showActions,{hash:{},inverse:P.noop,fn:P.program(5,l,i),data:i}),(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(23).call(t,t&&t.sort,"addedAt",{hash:{},inverse:P.program(9,d,i),fn:P.program(7,u,i),data:i}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){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 d(e,t){var r;return r=n(23).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:P.program(12,f,t),fn:P.program(10,c,t),data:t}),r||0===r?r:""}function c(e,t){return' <span class="media-available-at"></span> '}function f(e,t){var r;return r=n(23).call(e,e&&e.sort,"rating",{
hash:{},inverse:P.program(15,h,t),fn:P.program(13,p,t),data:t}),r||0===r?r:""}function p(e,t){return' <span class="media-rating"></span> '}function h(e,t){var r;return r=n(23).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:P.program(18,g,t),fn:P.program(16,v,t),data:t}),r||0===r?r:""}function v(e,t){return' <span class="media-resolution"></span> '}function g(e,t){var r;return r=n(23).call(e,e&&e.sort,"duration",{hash:{},inverse:P.noop,fn:P.program(19,m,t),data:t}),r||0===r?r:""}function m(e,t){return' <span class="media-duration"></span> ';
}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var y,b="",P=this,w="function",S=this.escapeExpression;return b+='<a class="media-list-inner-item ',y=r.if.call(t,t&&t.showActions,{hash:{},inverse:P.noop,fn:P.program(1,s,i),data:i}),(y||0===y)&&(b+=y),b+=" ",y=r.if.call(t,t&&t.selected,{hash:{},inverse:P.noop,fn:P.program(3,o,i),data:i}),(y||0===y)&&(b+=y),b+='" href="'+S((y=t&&t.url,typeof y===w?y.apply(t):y))+'"> <div class="media-actions ',y=r.unless.call(t,t&&t.showActions,{
hash:{},inverse:P.noop,fn:P.program(5,l,i),data:i}),(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(23).call(t,t&&t.sort,"addedAt",{hash:{},inverse:P.program(9,d,i),fn:P.program(7,u,i),data:i}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="media-progress-track"></div> <div class="media-progress-pct"></div> '});
},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){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 d(e,t){var r;return r=n(23).call(e,e&&e.sort,"originallyAvailableAt",{hash:{},inverse:P.program(12,f,t),fn:P.program(10,c,t),data:t}),r||0===r?r:""}function c(e,t){return' <span class="media-available-at"></span> '}function f(e,t){var r;return r=n(23).call(e,e&&e.sort,"rating",{
hash:{},inverse:P.program(15,h,t),fn:P.program(13,p,t),data:t}),r||0===r?r:""}function p(e,t){return' <span class="media-rating"></span> '}function h(e,t){var r;return r=n(23).call(e,e&&e.sort,"mediaHeight",{hash:{},inverse:P.program(18,g,t),fn:P.program(16,v,t),data:t}),r||0===r?r:""}function v(e,t){return' <span class="media-resolution"></span> '}function g(e,t){var r;return r=n(23).call(e,e&&e.sort,"duration",{hash:{},inverse:P.noop,fn:P.program(19,m,t),data:t}),r||0===r?r:""}function m(e,t){return' <span class="media-duration"></span> ';
}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var y,b="",P=this,w="function",S=this.escapeExpression;return b+='<a class="media-poster-container ',y=r.unless.call(t,t&&t.showActions,{hash:{},inverse:P.noop,fn:P.program(1,s,i),data:i}),(y||0===y)&&(b+=y),b+=" ",y=r.if.call(t,t&&t.selected,{hash:{},inverse:P.noop,fn:P.program(3,o,i),data:i}),(y||0===y)&&(b+=y),b+='" href="'+S((y=t&&t.url,typeof y===w?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=r.unless.call(t,t&&t.showActions,{hash:{},inverse:P.noop,fn:P.program(5,l,i),data:i}),(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(23).call(t,t&&t.sort,"addedAt",{hash:{},inverse:P.program(9,d,i),fn:P.program(7,u,i),data:i}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
a=a||{},'<a class="playlist-metadata-region" href="#"></a> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){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 d(e,t){return"btn-metadata-link"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var c,f="",p="function",h=this.escapeExpression,v=this;return f+='<div class="show-actions playlist-inner-item '+h((c=t&&t.type,typeof c===p?c.apply(t):c))+'"> ',
c=r.if.call(t,t&&t.canEdit,{hash:{},inverse:v.noop,fn:v.program(1,s,i),data:i}),(c||0===c)&&(f+=c),f+=' <div class="media-index media-heading secondary"> <i class="glyphicon volume-up"></i> </div> ',c=n(77).call(t,t&&t.type,"track",{hash:{},inverse:v.noop,fn:v.program(3,o,i),data:i}),(c||0===c)&&(f+=c),f+=" ",c=r.if.call(t,t&&t.canEdit,{hash:{},inverse:v.noop,fn:v.program(5,l,i),data:i}),(c||0===c)&&(f+=c),f+=' <div class="media-item '+h((c=t&&t.type,typeof c===p?c.apply(t):c))+" ",c=r.if.call(t,t&&t.canEdit,{
hash:{},inverse:v.noop,fn:v.program(7,u,i),data:i}),(c||0===c)&&(f+=c),f+='"> <div class="media-details"> <div class="media-detail media-heading"> <span class="media-title ',c=r.if.call(t,t&&t.hasDetails,{hash:{},inverse:v.noop,fn:v.program(9,d,i),data:i}),(c||0===c)&&(f+=c),f+='"></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> </div>';
})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(e,t){return"hide-actions"}function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var o,l,u="",d=this,c="function",f=this.escapeExpression;return u+='<a class="media-poster-container ',o=n.unless.call(t,t&&t.showActions,{hash:{},inverse:d.noop,fn:d.program(1,i,a),data:a}),(o||0===o)&&(u+=o),u+='" href="',(l=n.url)?o=l.call(t,{hash:{},data:a}):(l=t&&t.url,o=typeof l===c?l.call(t,{
hash:{},data:a}):l),u+=f(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:d.noop,fn:d.program(3,s,a),data:a}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,s,o="",l="function",u=this.escapeExpression;return o+='<a class="playlist" data-id="',(s=n.ratingKey)?i=s.call(t,{hash:{},data:a}):(s=t&&t.ratingKey,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+'" href="#"> <span class="media-poster playlist-poster"></span> ',(s=n.title)?i=s.call(t,{hash:{},data:a}):(s=t&&t.title,i=typeof s===l?s.call(t,{
hash:{},data:a}):s),o+=u(i)+" </a>"})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){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"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c=this;return u+='<div class="disc-number hidden"> '+d(n(2).call(t,"Disc {1}",'<span class="track-parent-index"></span>',{
hash:{},data:i}))+' </div> <div class="striped-list-inner-item media-list-item track-list-item track"> <a class="track-list-inner-item show-actions ',l=r.if.call(t,t&&t.selected,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+='" href="#"> <div class="track-actions media-actions"> ',l=r.if.call(t,t&&t.showEdit,{hash:{},inverse:c.noop,fn:c.program(3,o,i),data:i}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<div class="row row-padded"> <h4 class="text-muted text-center"> <p>'+o(n(2).call(t,'Choose "Optimize..." on items in your library and optimized versions will appear here.',{hash:{},data:i}))+"</p> <p>"+o(n(2).call(t,"Monitor conversion progress in {1}Conversion Activity{2}.",'<a href="#!/status/conversion">',"</a>",{
hash:{},data:i}))+"</p> </h4> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Complete",{
hash:{},data:i}))+' </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(2).call(t,"Failed",{hash:{},data:i}))+'</span> </div> <div class="generator-status-container generator-status-converting"> <i class="generator-status-icon glyphicon restart"></i> '+u(n(2).call(t,"Converting",{hash:{},data:i}))+' </div> <div class="generator-status-container generator-status-pending"> <i class="generator-status-icon glyphicon clock"></i> '+u(n(2).call(t,"Waiting",{
hash:{},data:i}))+" </div> </div> </div> </div> </a> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,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)?i=s.call(t,{hash:{},
data:a}):(s=t&&t.title,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+'</div> <div class="generator-metadata-episode-index generator-metadata-subtitle"></div> <div class="generator-metadata-year generator-metadata-subtitle">',(s=n.year)?i=s.call(t,{hash:{},data:a}):(s=t&&t.year,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+"</div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};
var i,s,o="",l="function",u=this.escapeExpression;return o+='<a class="btn-gray" href="#">',(s=n.title)?i=s.call(t,{hash:{},data:a}):(s=t&&t.title,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+"</a> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <div class="label-list-item"> <a class="new-filter-btn label label-btn label-default" href="#"><i class="label-icon glyphicon circle-plus"></i> '+d(n(2).call(e,"New Filter",{
hash:{},data:t}))+"</a> </div> "}function o(e,t){var r,a="";return a+=' <div class="label-list-item"> <a class="remove-filter-btn label label-btn label-primary" data-key="'+d((r=e&&e.key,typeof r===c?r.apply(e):r))+'" href="#"><i class="label-icon glyphicon circle-remove"></i> <span class="label-truncate">'+d(n(1088).call(e,e&&e.titles,{hash:{},data:t}))+"</span></a> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c="function",f=this;return l=r.unless.call(t,t&&t.currentFilters,{
hash:{},inverse:f.noop,fn:f.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=" ",l=r.each.call(t,t&&t.currentFilters,{hash:{},inverse:f.noop,fn:f.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){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"],r=this.merge(r,e.helpers),i=i||{};var d,c="",f=this,p=this.escapeExpression;
return c+='<a class="',d=n(23).call(t,(d=t&&t.filter,null==d||d===!1?d:d.filterType),"boolean",{hash:{},inverse:f.program(3,o,i),fn:f.program(1,s,i),data:i}),(d||0===d)&&(c+=d),c+=" btn-gray ",d=r.if.call(t,t&&t.selected,{hash:{},inverse:f.noop,fn:f.program(5,l,i),data:i}),(d||0===d)&&(c+=d),c+='" href="#"> '+p(n(2).call(t,(d=t&&t.filter,null==d||d===!1?d:d.title),{hash:{},data:i}))+' <i class="selected-icon glyphicon ok-2 ',d=r.unless.call(t,t&&t.selected,{hash:{},inverse:f.noop,fn:f.program(7,u,i),
data:i}),(d||0===d)&&(c+=d),c+='"></i> </a> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this,d="function",c=this.escapeExpression;return l+='<form id="filter-options-search-form" class="',o=r.unless.call(t,t&&t.showSearch,{hash:{},inverse:u.noop,fn:u.program(1,s,i),data:i}),(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="'+c((o=t&&t.query,
typeof o===d?o.apply(t):o))+'"> </div> </form> <div id="filter-options-loading" class="loading ',o=r.unless.call(t,t&&t.showLoading,{hash:{},inverse:u.noop,fn:u.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+='"></div> <ul class="list side-bar-list"> <li><a class="filter-options-deselect-btn btn-gray" href="#">'+c(n(2).call(t,"Deselect All",{hash:{},data:i}))+"</a> </ul> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"selected"}function o(e,t){
return"hidden"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this,c=this.escapeExpression;return u+='<a class="filter-option-btn btn-gray ',l=r.if.call(t,t&&t.selected,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+='" href="#"> '+c(n(2).call(t,(l=t&&t.filterOption,null==l||l===!1?l:l.title),{hash:{},data:i}))+' <i class="selected-icon glyphicon ok-2 ',l=r.unless.call(t,t&&t.selected,{hash:{},inverse:d.noop,fn:d.program(3,o,i),data:i}),
(l||0===l)&&(u+=l),u+='"></i> </a> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<a class="sort-btn btn-gray" href="#"> '+o(n(2).call(t,t&&t.title,{hash:{},data:i}))+' <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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){
function i(e,t){return"left-arrow"}function s(e,t){var r;return r=n.if.call(e,(r=e&&e.filePath,null==r||r===!1?r:r.home),{hash:{},inverse:v.program(6,l,t),fn:v.program(4,o,t),data:t}),r||0===r?r:""}function o(e,t){return"home"}function l(e,t){var r;return r=n.if.call(e,(r=e&&e.filePath,null==r||r===!1?r:r.network),{hash:{},inverse:v.program(9,d,t),fn:v.program(7,u,t),data:t}),r||0===r?r:""}function u(e,t){return"globe"}function d(e,t){var r;return r=n.if.call(e,e&&e.isRoot,{hash:{},inverse:v.program(12,f,t),
fn:v.program(10,c,t),data:t}),r||0===r?r:""}function c(e,t){return"hdd"}function f(e,t){return"folder-open"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var p,h="",v=this,g="function",m=this.escapeExpression;return h+='<a class="striped-list-item" href="#" data-key="'+m((p=t&&t.filePath,p=null==p||p===!1?p:p.key,typeof p===g?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:v.program(3,s,a),
fn:v.program(1,i,a),data:a}),(p||0===p)&&(h+=p),h+='"></i> '+m((p=t&&t.filePath,p=null==p||p===!1?p:p.title,typeof p===g?p.apply(t):p))+' <div class="loading loading-sm loading-inline hidden"></div> </a> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,s,o="",l="function",u=this.escapeExpression;return o+='<a class="btn-gray" data-identifier="',(s=n.identifier)?i=s.call(t,{hash:{},data:a}):(s=t&&t.identifier,
i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+'" href="#">',(s=n.name)?i=s.call(t,{hash:{},data:a}):(s=t&&t.name,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+"</a> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"checked"}function o(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d="function",c=this.escapeExpression,f=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="'+c((l=t&&t.identifier,
typeof l===d?l.apply(t):l))+'"> <input id="'+c((l=t&&t.identifier,typeof l===d?l.apply(t):l))+'" name="'+c((l=t&&t.identifier,typeof l===d?l.apply(t):l))+'" type="checkbox" ',l=r.if.call(t,t&&t.enabled,{hash:{},inverse:f.noop,fn:f.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=" ",l=r.if.call(t,t&&t.isPrimary,{hash:{},inverse:f.noop,fn:f.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+="> "+c(n(2).call(t,t&&t.name,{hash:{},data:i}))+" </label> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<div class="row-padded"> <h4 class="text-muted text-center">'+o(n(2).call(t,"No devices found",{hash:{},data:i}))+"</h4> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<h4 class="text-muted text-center">'+o(n(2).call(t,"No friends yet. {1}Invite a friend{2} and share your libraries.",'<a class="invite-friend-btn" href="#">',"</a>",{hash:{},data:i}))+"</h4> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),a=a||{},'<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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){
var n,a="";return a+=' <p class="user-summary"> <i class="server-share-direction-icon glyphicon right-arrow"></i> <a class="server-share-edit-btn server-share-status shared '+g((n=e&&e.shared,n=null==n||n===!1?n:n.status,typeof n===m?n.apply(e):n))+" ",n=r.unless.call(e,e&&e.canEdit,{hash:{},inverse:y.noop,fn:y.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+='" 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=r.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)&&(a+=n),a+=" </p> "}function o(e,t){return"disabled"}function l(e,t){var r,a="";return a+=" "+g(n(2).call(e,"shares {1} {2} with you",(r=e&&e.shared,null==r||r===!1?r:r.numLibraries),(r=e&&e.shared,null==r||r===!1?r:r.libraryLabel),{hash:{},data:t}))+" "}function u(e,t){var r,a="";return a+=" "+g(n(2).call(e,"wants to share {1} {2} with you",(r=e&&e.shared,null==r||r===!1?r:r.numLibraries),(r=e&&e.shared,
null==r||r===!1?r:r.libraryLabel),{hash:{},data:t}))+" "}function d(e,t){var n,a="";return a+=' <p class="user-summary"> <i class="server-share-direction-icon glyphicon left-arrow"></i> <a class="server-share-edit-btn server-share-status owned '+g((n=e&&e.owned,n=null==n||n===!1?n:n.status,typeof n===m?n.apply(e):n))+" ",n=r.unless.call(e,e&&e.canEdit,{hash:{},inverse:y.noop,fn:y.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+='" 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=r.if.call(e,(n=e&&e.owned,null==n||n===!1?n:n.hasActiveShare),{hash:{},inverse:y.program(11,f,t),fn:y.program(9,c,t),data:t}),(n||0===n)&&(a+=n),a+=" </p> "}function c(e,t){var r,a="";return a+=" "+g(n(2).call(e,"sharing {1} {2} with this {3}",(r=e&&e.owned,null==r||r===!1?r:r.numLibraries),(r=e&&e.owned,null==r||r===!1?r:r.libraryLabel),(r=e&&e.owned,null==r||r===!1?r:r.friendLabel),{hash:{},data:t}))+" "}function f(e,t){var r,a="";return a+=" "+g(n(2).call(e,"invited to share {1} {2}",(r=e&&e.owned,
null==r||r===!1?r:r.numLibraries),(r=e&&e.owned,null==r||r===!1?r:r.libraryLabel),{hash:{},data:t}))+" "}function p(e,t){var r="";return r+=' <p class="user-summary server-share-empty-message">'+g(n(2).call(e,"no shared libraries",{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var h,v="",g=this.escapeExpression,m="function",y=this;return h=r.if.call(t,(h=t&&t.shared,null==h||h===!1?h:h.numLibraries),{hash:{},inverse:y.noop,fn:y.program(1,s,i),data:i}),
(h||0===h)&&(v+=h),v+=" ",h=r.if.call(t,(h=t&&t.owned,null==h||h===!1?h:h.numLibraries),{hash:{},inverse:y.noop,fn:y.program(8,d,i),data:i}),(h||0===h)&&(v+=h),v+=" ",h=r.if.call(t,t&&t.showEmptyMessage,{hash:{},inverse:y.noop,fn:y.program(13,p,i),data:i}),(h||0===h)&&(v+=h),v+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <h4 class="text-muted text-center">'+d(n(2).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 r,a="";return a+=' <h4 class="text-muted text-center">'+d(n(2).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="'+d((r=e&&e.plexPassUrl,typeof r===c?r.apply(e):r))+'" target="_blank">'+d(n(2).call(e,"Learn More",{hash:{},data:t}))+"</a> </p> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c="function",f=this;
return l=r.if.call(t,t&&t.hasHomeFeature,{hash:{},inverse:f.program(3,o,i),fn:f.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=' <ul class="list centered-home-user-container"></ul> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(e,t){return'<div class="selected-user-icon"></div>'}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};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,i,a),data:a}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(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),a=a||{};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,i,a),data:a}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,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)?i=s.call(t,{hash:{},data:a}):(s=t&&t.icon,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+'"></i> <span class="section-title"></span> </div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"hidden"}function o(e,t){var n,r="";return r+=' <h4><a href="'+f((n=e&&e.url,typeof n===c?n.apply(e):n))+'" target="_blank">'+f((n=e&&e.title,typeof n===c?n.apply(e):n))+'</a></h4> <a href="'+f((n=e&&e.url,typeof n===c?n.apply(e):n))+'" target="_blank"> <img class="thumb"/> </a> ';
}function l(e,t){var n,r="";return r+=" <h4>"+f((n=e&&e.title,typeof n===c?n.apply(e):n))+'</h4> <img class="thumb"/> '}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c="function",f=this.escapeExpression,p=this;return d+='<div class="card card-announcement"> <div class="unread ',u=r.if.call(t,t&&t.read,{hash:{},inverse:p.noop,fn:p.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+='"></div> ',u=r.if.call(t,t&&t.url,{hash:{},inverse:p.program(5,l,i),fn:p.program(3,o,i),data:i
}),(u||0===u)&&(d+=u),d+=' <div class="date">'+f(n(1089).call(t,t&&t.notifyAt,{hash:{},data:i}))+'</div> <div class="description">',u=t&&t.content,u=typeof u===c?u.apply(t):u,(u||0===u)&&(d+=u),d+="</div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(402).call(t,t&&t.title,20,{
hash:{},data:i}))+" </a> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,s,o="",l="function",u=this.escapeExpression;return o+='<a class="card card-user-playlist" href="',(s=n.url)?i=s.call(t,{hash:{},data:a}):(s=t&&t.url,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+'"> <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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Add Folder",{
hash:{},data:i}))+'</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(2).call(t,"Cancel",{hash:{},
data:i}))+'</button> <button type="submit" class="add-btn btn btn-primary">'+o(n(2).call(t,"Add",{hash:{},data:i}))+"</button> </div> </form> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,a="";return a+=' <ul class="list select-list select-collections-list dark-scrollbar"> ',n=r.each.call(e,e&&e.collections,{hash:{},inverse:v.noop,fn:v.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+=" </ul> "}function o(e,t){var n,r="";return r+=' <li class="striped-list-item select-list-item"> <a class="collection" data-value="'+h((n=e&&e.key,
typeof n===p?n.apply(e):n))+'" href="#">'+h((n=e&&e.title,typeof n===p?n.apply(e):n))+"</a> </li> "}function l(e,t){var n;return n=r.if.call(e,e&&e.loading,{hash:{},inverse:v.program(7,d,t),fn:v.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 d(e,t){var r="";return r+=' <div class="empty-message">'+h(n(2).call(e,"There are no collections in this library.",{hash:{},data:t}))+"</div> "}this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),i=i||{};var c,f="",p="function",h=this.escapeExpression,v=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 folder-plus"></i> '+h(n(2).call(t,"Select a Collection",{hash:{},data:i}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',c=r.if.call(t,t&&t.collections,{
hash:{},inverse:v.program(4,l,i),fn:v.program(1,s,i),data:i}),(c||0===c)&&(f+=c),f+=' <div class="message-container"> <input class="message form-control" placeholder="'+h(n(2).call(t,"New collection...",{hash:{},data:i}))+'"> </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">'+h(n(2).call(t,"Add",{hash:{},data:i}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){
var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return g(n(2).call(e,"Select a Playlist",{hash:{},data:t}))}function o(e,t){return g(n(2).call(e,"Create Playlist",{hash:{},data:t}))}function l(e,t){var n,a="";return a+=" ",n=r.if.call(e,e&&e.hasPlaylists,{hash:{},inverse:m.program(8,d,t),fn:m.program(6,u,t),data:t}),(n||0===n)&&(a+=n),a+=" "}function u(e,t){return' <div class="playlists-container"></div> '}function d(e,t){var n,a="";return a+=" ",n=r.if.call(e,e&&e.loading,{
hash:{},inverse:m.program(11,f,t),fn:m.program(9,c,t),data:t}),(n||0===n)&&(a+=n),a+=" "}function c(e,t){return' <div class="loading-container"> <div class="loading loading-inline"></div> </div> '}function f(e,t){var r="";return r+=' <div class="empty-message">'+g(n(2).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"],r=this.merge(r,e.helpers),i=i||{};var h,v="",g=this.escapeExpression,m=this;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 plex-icon-add-to-playlist"></i> ',
h=r.if.call(t,t&&t.showExisting,{hash:{},inverse:m.program(3,o,i),fn:m.program(1,s,i),data:i}),(h||0===h)&&(v+=h),v+=' </h4> </div> <div class="modal-body modal-body-scroll minimal-scroll"> ',h=r.if.call(t,t&&t.showExisting,{hash:{},inverse:m.noop,fn:m.program(5,l,i),data:i}),(h||0===h)&&(v+=h),v+=' <div class="message-container ',h=r.unless.call(t,t&&t.showExisting,{hash:{},inverse:m.noop,fn:m.program(13,p,i),data:i}),(h||0===h)&&(v+=h),v+='"> <input class="message form-control" placeholder="'+g(n(2).call(t,"New playlist...",{
hash:{},data:i}))+'"> </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">'+g(n(2).call(t,"Add",{hash:{},data:i}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,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((i=t&&t.agent,
i=null==i||i===!1?i:i.name,typeof i===l?i.apply(t):i))+' </h4> </div> <div class="modal-body"> <p class="agent-icon-container"></p> <p>',(s=n.attribution)?i=s.call(t,{hash:{},data:a}):(s=t&&t.attribution,i=typeof s===l?s.call(t,{hash:{},data:a}):s),(i||0===i)&&(o+=i),o+="</p> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+='<button class="browse-btn btn btn-primary">'+u(n(2).call(e,"Browse",{hash:{},data:t
}))+"</button>"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this.escapeExpression,d="function",c=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===d?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=r.unless.call(t,t&&t.agent,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(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(2).call(t,"Update",{hash:{},data:i}))+'</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(2).call(t,"Restart",{
hash:{},data:i}))+'</a></li> <li><a class="reset-btn" href="#">'+u(n(2).call(t,"Reset",{hash:{},data:i}))+'</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(2).call(t,"Uninstall",{hash:{},data:i}))+'</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(2).call(t,"Install",{
hash:{},data:i}))+'</span> </button> </div> </div> <div class="channel-details"> '+u((o=t&&t.channel,o=null==o||o===!1?o:o.summary,typeof o===d?o.apply(t):o))+" </div> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=" "+c(n(2).call(e,"Directory Settings",{hash:{},data:t}))+" "}function o(e,t){var r="";return r+=" "+c(n(2).call(e,"{1} Settings",e&&e.title,{hash:{},data:t}))+" "}function l(e,t){var r="";return r+=" "+c(n(29).call(e,"setting",{
hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c=this.escapeExpression,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 cogwheel"></i> ',u=n(23).call(t,t&&t.title,"Preferences...",{hash:{},inverse:f.program(3,o,i),fn:f.program(1,s,i),
data:i}),(u||0===u)&&(d+=u),d+=' </h4> </div> <form id="channel-settings-form"> <div class="modal-body settings-container"> ',u=r.each.call(t,t&&t.settings,{hash:{},inverse:f.noop,fn:f.program(5,l,i),data:i}),(u||0===u)&&(d+=u),d+=' </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+c(n(2).call(t,"Cancel",{hash:{},data:i}))+'</button> <button type="submit" class="submit-btn btn btn-lg btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(n(2).call(t,"Save",{
hash:{},data:i}))+"</span> </button> </div> </form> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+c(n(2).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"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c=this.escapeExpression,f="function",p=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 circle-exclamation-mark"></i> '+c((u=t&&t.title,typeof u===f?u.apply(t):u))+'</h4> </div> <div class="modal-body"> <p class="confirm-message">'+c((u=t&&t.message,typeof u===f?u.apply(t):u))+'</p> <p class="double-confirm-message text-warning"></p> </div> <div class="modal-footer"> ',
u=r.unless.call(t,t&&t.hideCancel,{hash:{},inverse:p.noop,fn:p.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+=' <button type="button" class="confirm-btn btn btn-lg ',u=r.if.call(t,t&&t.hasDanger,{hash:{},inverse:p.program(5,l,i),fn:p.program(3,o,i),data:i}),(u||0===u)&&(d+=u),d+=' btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(n(2).call(t,t&&t.confirmLabel,{hash:{},data:i}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
function s(e,t){var n,a="";return a+=' <li class="striped-list-item select-list-item download-list-item"> <a class="media" data-value="'+h((n=null==t||t===!1?t:t.index,typeof n===p?n.apply(e):n))+'" href="'+h((n=e&&e.downloadUrl,typeof n===p?n.apply(e):n))+'" download="'+h((n=e&&e.downloadName,typeof n===p?n.apply(e):n))+'"> ',n=r.if.call(e,e&&e.title,{hash:{},inverse:v.noop,fn:v.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+=" ",n=r.if.call(e,e&&e.videoResolution,{hash:{},inverse:v.noop,fn:v.program(4,l,t),
data:t}),(n||0===n)&&(a+=n),a+=" ",n=r.if.call(e,e&&e.bitrate,{hash:{},inverse:v.noop,fn:v.program(7,d,t),data:t}),(n||0===n)&&(a+=n),a+=" </a> </li> "}function o(e,t){var n,r="";return r+=" "+h((n=e&&e.title,typeof n===p?n.apply(e):n))+' <span class="title-separator">\u2022</span> '}function l(e,t){var a,i="";return i+=" "+h(n(626).call(e,e&&e.videoResolution,{hash:{},data:t})),a=r.if.call(e,e&&e.bitrate,{hash:{},inverse:v.noop,fn:v.program(5,u,t),data:t}),(a||0===a)&&(i+=a),i+=" "}function u(e,t){
return","}function d(e,t){var r="";return r+=" "+h(n(625).call(e,e&&e.bitrate,0,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var c,f="",p="function",h=this.escapeExpression,v=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 download-alt"></i> '+h(n(2).call(t,"Download a Version",{
hash:{},data:i}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list download-list"> ',c=r.each.call(t,t&&t.mediaItems,{hash:{},inverse:v.noop,fn:v.program(1,s,i),data:i}),(c||0===c)&&(f+=c),f+=" </ul> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <i class="modal-icon glyphicon plus"></i> '+y(n(2).call(e,"Add {1} Library",'<span class="section-type-title"></span>',{
hash:{},data:t}))+" "}function o(e,t){var r="";return r+=' <i class="modal-icon glyphicon pencil"></i> '+y(n(2).call(e,"Edit Library",{hash:{},data:t}))+" "}function l(e,t){return" selected"}function u(e,t){var r="";return r+=" "+y(n(2).call(e,"Select type",{hash:{},data:t}))+" "}function d(e,t){var r="";return r+=" "+y(n(2).call(e,"General",{hash:{},data:t}))+" "}function c(e,t){return"disabled"}function f(e,t){var a,i="";return i+=' <li> <a class="btn-gray change-pane-btn create-btn',a=n(23).call(e,e&&e.selectedPane,"create",{
hash:{},inverse:b.noop,fn:b.program(5,l,t),data:t}),(a||0===a)&&(i+=a),i+=" ",a=r.if.call(e,e&&e.add,{hash:{},inverse:b.noop,fn:b.program(11,c,t),data:t}),(a||0===a)&&(i+=a),i+=' hidden" data-pane="create" href="#"> <i class="modal-nav-icon glyphicon magic"></i> '+y(n(2).call(e,"Create",{hash:{},data:t}))+" </a> </li> "}function p(e,t){var r="";return r+=' <button type="button" class="delete-btn btn btn-danger pull-left" data-dismiss="modal">'+y(n(2).call(e,"Delete Library",{hash:{},data:t}))+"</button> ";
}function h(e,t){var r="";return r+=" "+y(n(2).call(e,"Add Library",{hash:{},data:t}))+" "}function v(e,t){var r="";return r+=" "+y(n(2).call(e,"Save Changes",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var g,m="",y=this.escapeExpression,b=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"> ',
g=r.if.call(t,t&&t.add,{hash:{},inverse:b.program(3,o,i),fn:b.program(1,s,i),data:i}),(g||0===g)&&(m+=g),m+=' </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',g=n(23).call(t,t&&t.selectedPane,"type",{hash:{},inverse:b.noop,fn:b.program(5,l,i),data:i}),(g||0===g)&&(m+=g),m+='" data-pane="type" href="#"> <i class="modal-nav-icon glyphicon align-center"></i> ',
g=r.if.call(t,t&&t.add,{hash:{},inverse:b.program(9,d,i),fn:b.program(7,u,i),data:i}),(g||0===g)&&(m+=g),m+=' </a> </li> <li> <a class="btn-gray change-pane-btn folders-btn',g=n(23).call(t,t&&t.selectedPane,"folders",{hash:{},inverse:b.noop,fn:b.program(5,l,i),data:i}),(g||0===g)&&(m+=g),m+=" ",g=r.if.call(t,t&&t.add,{hash:{},inverse:b.noop,fn:b.program(11,c,i),data:i}),(g||0===g)&&(m+=g),m+='" data-pane="folders" href="#"> <i class="modal-nav-icon glyphicon folder-open"></i> '+y(n(2).call(t,"Add folders",{
hash:{},data:i}))+" </a> </li> ",g=r.if.call(t,t&&t.add,{hash:{},inverse:b.noop,fn:b.program(13,f,i),data:i}),(g||0===g)&&(m+=g),m+=' <li> <a class="btn-gray change-pane-btn advanced-btn',g=n(23).call(t,t&&t.selectedPane,"advanced",{hash:{},inverse:b.noop,fn:b.program(5,l,i),data:i}),(g||0===g)&&(m+=g),m+=" ",g=r.if.call(t,t&&t.add,{hash:{},inverse:b.noop,fn:b.program(11,c,i),data:i}),(g||0===g)&&(m+=g),m+='" data-pane="advanced" href="#"> <i class="modal-nav-icon glyphicon cogwheel"></i> '+y(n(2).call(t,"Advanced",{
hash:{},data:i}))+' </a> </li> </ul> </div> <div class="modal-body-pane pane-region dark-scrollbar"> </div> </div> <div class="modal-footer"> ',g=r.if.call(t,t&&t.canDelete,{hash:{},inverse:b.noop,fn:b.program(15,p,i),data:i}),(g||0===g)&&(m+=g),m+=' <span class="form-message"></span> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+y(n(2).call(t,"Cancel",{hash:{},data:i}))+'</button> <button type="button" class="save-btn btn btn-primary btn-loading ',g=r.if.call(t,t&&t.add,{
hash:{},inverse:b.noop,fn:b.program(11,c,i),data:i}),(g||0===g)&&(m+=g),m+='"> <div class="loading loading-sm"></div> <span class="btn-label"> <span class="save-btn-label-next">'+y(n(2).call(t,"Next",{hash:{},data:i}))+'</span> <span class="save-btn-label-save"> ',g=r.if.call(t,t&&t.add,{hash:{},inverse:b.program(19,v,i),fn:b.program(17,h,i),data:i}),(g||0===g)&&(m+=g),m+=" </span> </span> </button> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
function s(e,t){var r="";return r+=' <div class="match-location"> '+c(n(2).call(e,"Location",{hash:{},data:t}))+": "+c(n(627).call(e,e&&e.location,60,12,{hash:{},data:t}))+" </div> "}function o(e,t){var r="";return r+=' <ul class="list modal-list"> <li class="modal-list-item"><a class="search-options-btn" href="#">'+c(n(2).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 r="";return r+=' <button type="submit" class="search-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(n(2).call(e,"Search",{
hash:{},data:t}))+"</span> </button> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c=this.escapeExpression,f=this;return d+='<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=r.if.call(t,t&&t.location,{
hash:{},inverse:f.noop,fn:f.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+=' </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',u=r.if.call(t,t&&t.showNavigation,{hash:{},inverse:f.noop,fn:f.program(3,o,i),data:i}),(u||0===u)&&(d+=u),d+=' <div class="pane-region"></div> </div> <div class="modal-footer"> <div class="match-search-actions"> <button type="button" class="cancel-btn btn btn-default">'+c(n(2).call(t,"Cancel",{hash:{},data:i}))+"</button> ",u=r.if.call(t,t&&t.showNavigation,{
hash:{},inverse:f.noop,fn:f.program(5,l,i),data:i}),(u||0===u)&&(d+=u),d+=" </div> </div> </form> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=" "+d(n(2).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 r="";return r+=" "+d(n(2).call(e,"Insecure connections will be allowed to any server.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c=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> '+d(n(2).call(t,"Server Unreachable",{hash:{},data:i}))+' </h4> </div> <div class="modal-body"> <p> ',l=r.if.call(t,t&&t.publicAddressMatches,{hash:{},
inverse:c.program(3,o,i),fn:c.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=" </p> <p>"+d(n(2).call(t,"The Allow Fallback to Insecure Connections setting can be changed in Web Settings. Would you like to allow insecure connections?",{hash:{},data:i}))+'</p> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+d(n(2).call(t,"No",{hash:{},data:i}))+'</button> <button type="button" class="confirm-btn btn btn-lg btn-danger">'+d(n(2).call(t,"Yes",{
hash:{},data:i}))+"</button> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"hidden"}function o(e,t){var n,r="";return r+=' <option value="'+c((n=e&&e.key,typeof n===d?n.apply(e):n))+'">'+c((n=e&&e.title,typeof n===d?n.apply(e):n))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d="function",c=this.escapeExpression,f=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> '+c(n(2).call(t,"Import from iTunes",{
hash:{},data:i}))+' </h4> </div> <div class="modal-body"> <p class="help-block">'+c(n(2).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:i}))+'</p> <div class="form-group ',l=r.unless.call(t,t&&t.showSections,{hash:{},inverse:f.noop,fn:f.program(1,s,i),data:i
}),(l||0===l)&&(u+=l),u+='"> <label class="control-label"> '+c(n(2).call(t,"Add to library: ",{hash:{},data:i}))+' <select id="section-list"> ',l=r.each.call(t,t&&t.sections,{hash:{},inverse:f.noop,fn:f.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+=' </select> </label> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="import-all"> '+c(n(2).call(t,"Overwrite existing playlists",{hash:{},data:i}))+' </label> </div> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-default" data-dismiss="modal">'+c(n(2).call(t,"Cancel",{
hash:{},data:i}))+'</button> <button type="button" class="import-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(n(2).call(t,"Import",{hash:{},data:i}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,a="";return a+=' <h5 class="keyboard-shortcuts-header">'+v((n=e&&e.label,typeof n===h?n.apply(e):n))+'</h5> <ul class="list keyboard-shortcuts-list"> ',
n=r.each.call(e,e&&e.shortcuts,{hash:{},inverse:g.noop,fn:g.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+=" </ul> "}function o(e,t){var a,i="";return i+=' <li> <span class="keyboard-shortcuts-keys"> ',a=r.each.call(e,e&&e.keys,{hash:{},inverse:g.noop,fn:g.program(3,l,t),data:t}),(a||0===a)&&(i+=a),i+=' </span> <span class="keyboard-shortcuts-label text-muted">'+v(n(2).call(e,e&&e.label,{hash:{},data:t}))+"</span> </li> "}function l(e,t){var n,a="";return a+=" ",n=r.if.call(e,e&&e.plain,{hash:{},inverse:g.noop,
fn:g.program(4,u,t),data:t}),(n||0===n)&&(a+=n),a+=" ",n=r.unless.call(e,e&&e.plain,{hash:{},inverse:g.noop,fn:g.program(6,d,t),data:t}),(n||0===n)&&(a+=n),a+=" ",n=r.if.call(e,e&&e.split,{hash:{},inverse:g.noop,fn:g.program(8,c,t),data:t}),(n||0===n)&&(a+=n),a+=" "}function u(e,t){var n,r="";return r+=' <span class="keyboard-shortcuts-keys-plain">'+v((n=e&&e.s,typeof n===h?n.apply(e):n))+"</span> "}function d(e,t){var n,r="";return r+=' <span class="keyboard-shortcuts-keys-key">'+v((n=e&&e.s,typeof n===h?n.apply(e):n))+"</span> ";
}function c(e,t){return" <br> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var f,p="",h="function",v=this.escapeExpression,g=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> '+v(n(2).call(t,"Keyboard Shortcuts",{hash:{},data:i}))+' </h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',
f=r.each.call(t,t&&t.groups,{hash:{},inverse:g.noop,fn:g.program(1,s,i),data:i}),(f||0===f)&&(p+=f),p+=" </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=" "+g(n(2).call(e,"Internet Required",{hash:{},data:t}))+" "}function o(e,t){var r="";return r+=" "+g(n(2).call(e,"Plex Pass Required",{hash:{},data:t}))+" "}function l(e,t){var r="";return r+=" "+g(n(2).call(e,"This server cannot reach the Internet. Please verify connectivity and try again.",{
hash:{},data:t}))+" "}function u(e,t){var r="";return r+=" "+g(n(2).call(e,"This library requires your server be signed in to a Plex Pass account.",{hash:{},data:t}))+" "}function d(e,t){var r="";return r+=' <button type="button" class="confirm-btn btn btn-lg btn-primary">'+g(n(2).call(e,"OK",{hash:{},data:t}))+"</button> "}function c(e,t){var n,a="";return a+=' <a class="confirm-btn btn btn-lg btn-primary" href="#!/settings/server/'+g((n=e&&e.serverID,typeof n===m?n.apply(e):n))+'"> ',n=r.if.call(e,e&&e.isSignedIn,{
hash:{},inverse:y.program(14,p,t),fn:y.program(12,f,t),data:t}),(n||0===n)&&(a+=n),a+=" </a> "}function f(e,t){var r="";return r+=" "+g(n(2).call(e,"Settings",{hash:{},data:t}))+" "}function p(e,t){var r="";return r+=" "+g(n(2).call(e,"Sign In",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var h,v="",g=this.escapeExpression,m="function",y=this;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 circle-exclamation-mark"></i> ',
h=r.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:y.program(3,o,i),fn:y.program(1,s,i),data:i}),(h||0===h)&&(v+=h),v+=' </h4> </div> <div class="modal-body"> <p class="confirm-message"> ',h=r.if.call(t,t&&t.hasPlexPass,{hash:{},inverse:y.program(7,u,i),fn:y.program(5,l,i),data:i}),(h||0===h)&&(v+=h),v+=' </p> </div> <div class="modal-footer"> <button type="button" class="cancel-btn btn btn-lg btn-default" data-dismiss="modal">'+g(n(2).call(t,"Ignore",{hash:{},data:i}))+"</button> ",h=r.if.call(t,t&&t.hasPlexPass,{
hash:{},inverse:y.program(11,c,i),fn:y.program(9,d,i),data:i}),(h||0===h)&&(v+=h),v+=" </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"hide-streams-column"}function o(e,t){var a,i="";return i+=' <div class="files"> <h4>'+A(n(2).call(e,"Files",{hash:{},data:t}))+"</h4> ",a=r.each.call(e,e&&e.media,{hash:{},inverse:R.noop,fn:R.programWithDepth(4,l,t,e),data:t}),(a||0===a)&&(i+=a),i+=" </div> "}function l(e,t,n){var a,i="";
return i+=' <ul class="media-info-file-list well"> ',a=r.if.call(e,n&&n.showDeleteFile,{hash:{},inverse:R.noop,fn:R.program(5,u,t),data:t}),(a||0===a)&&(i+=a),i+=" ",a=r.each.call(e,e&&e.Part,{hash:{},inverse:R.noop,fn:R.programWithDepth(10,f,t,n),data:t}),(a||0===a)&&(i+=a),i+=" </ul> "}function u(e,t){var r,a="";return a+=' <a href="#" data-media-item="'+A((r=null==t||t===!1?t:t.index,typeof r===O?r.apply(e):r))+'" class="delete-btn text-danger pull-right"> <i class="glyphicon bin"></i> ',r=n(23).call(e,(r=e&&e.Part,
null==r||r===!1?r:r.length),"1",{hash:{},inverse:R.program(8,c,t),fn:R.program(6,d,t),data:t}),(r||0===r)&&(a+=r),a+=" </a> "}function d(e,t){var r="";return r+=" "+A(n(2).call(e,"Delete File",{hash:{},data:t}))+" "}function c(e,t){var r="";return r+=" "+A(n(2).call(e,"Delete Files",{hash:{},data:t}))+" "}function f(e,t,n){var a,i="";return i+=" <li> ",a=r.if.call(e,n&&n.showFilepath,{hash:{},inverse:R.program(13,h,t),fn:R.program(11,p,t),data:t}),(a||0===a)&&(i+=a),i+=" ",a=r.unless.call(e,e&&e.accessible,{
hash:{},inverse:R.noop,fn:R.program(15,v,t),data:t}),(a||0===a)&&(i+=a),i+=" </li> "}function p(e,t){var n,r="";return r+=" "+A((n=e&&e.file,typeof n===O?n.apply(e):n))+" "}function h(e,t){var r="";return r+=" "+A(n(1094).call(e,e&&e.file,{hash:{},data:t}))+" "}function v(e,t){var n,a="";return a+=" ",n=r.if.call(e,e&&e.exists,{hash:{},inverse:R.program(18,m,t),fn:R.program(16,g,t),data:t}),(n||0===n)&&(a+=n),a+=" "}function g(e,t){var r="";return r+=' <span class="label label-danger" data-toggle="tooltip" title="'+A(n(2).call(e,"Please check the permissions for this file.",{
hash:{},data:t}))+'">'+A(n(2).call(e,"Inaccessible",{hash:{},data:t}))+"</span> "}function m(e,t){var r="";return r+=' <span class="label label-danger" data-toggle="tooltip" title="'+A(n(2).call(e,"Please check that this file exists and the necessary drive is mounted.",{hash:{},data:t}))+'">'+A(n(2).call(e,"Unavailable",{hash:{},data:t}))+"</span> "}function y(e,t,a){var i,s="";return s+=' <div class="media"> <div class="props"> <h4>'+A(n(2).call(e,"Media",{hash:{},data:t}))+"</h4> <ul> ",i=r.each.call(e,e&&e.properties,{
hash:{},inverse:R.noop,fn:R.program(21,b,t),data:t}),(i||0===i)&&(s+=i),s+=" </ul> </div> ",i=r.each.call(e,e&&e.Part,{hash:{},inverse:R.noop,fn:R.programWithDepth(23,P,t,a),data:t}),(i||0===i)&&(s+=i),s+=" </div> "}function b(e,t){var r,a="";return a+=' <li> <span class="detail-label">'+A(n(2).call(e,e&&e.name,{hash:{},data:t}))+'</span> <span class="detail">'+A((r=e&&e.value,typeof r===O?r.apply(e):r))+"</span> </li> "}function P(e,t,a){var i,s="";return s+=' <div class="part"> <div class="props"> <h4>'+A(n(2).call(e,"Part",{
hash:{},data:t}))+"</h4> <ul> ",i=r.each.call(e,e&&e.properties,{hash:{},inverse:R.noop,fn:R.program(21,b,t),data:t}),(i||0===i)&&(s+=i),s+=' </ul> </div> <div class="streams"> ',i=r.each.call(e,e&&e.Stream,{hash:{},inverse:R.noop,fn:R.program(24,w,t),data:t}),(i||0===i)&&(s+=i),s+=" ",i=r.if.call(e,a&&a.loading,{hash:{},inverse:R.noop,fn:R.program(33,C,t),data:t}),(i||0===i)&&(s+=i),s+=" </div> </div> "}function w(e,t){var a,i="";return i+=' <div class="props"> ',a=n(23).call(e,e&&e.streamType,"1",{
hash:{},inverse:R.program(27,_,t),fn:R.program(25,S,t),data:t}),(a||0===a)&&(i+=a),i+=" <ul> ",a=r.each.call(e,e&&e.properties,{hash:{},inverse:R.noop,fn:R.program(21,b,t),data:t}),(a||0===a)&&(i+=a),i+=" </ul> </div> "}function S(e,t){var r="";return r+=" <h4>"+A(n(2).call(e,"Video",{hash:{},data:t}))+"</h4> "}function _(e,t){var r;return r=n(23).call(e,e&&e.streamType,"2",{hash:{},inverse:R.program(30,I,t),fn:R.program(28,T,t),data:t}),r||0===r?r:""}function T(e,t){var r="";return r+=" <h4>"+A(n(2).call(e,"Audio",{
hash:{},data:t}))+"</h4> "}function I(e,t){var r;return r=n(23).call(e,e&&e.streamType,"3",{hash:{},inverse:R.noop,fn:R.program(31,M,t),data:t}),r||0===r?r:""}function M(e,t){var r="";return r+=" <h4>"+A(n(2).call(e,"Subtitles",{hash:{},data:t}))+"</h4> "}function C(e,t){var r="";return r+=' <div class="props"> <h4>'+A(n(2).call(e,"Loading",{hash:{},data:t}))+"...</h4> </div> "}function x(e,t,n){var a;return a=r.if.call(e,n&&n.showFilepath,{hash:{},inverse:R.noop,fn:R.program(36,E,t),data:t}),a||0===a?a:"";
}function E(e,t){var r,a="";return a+=' <div class="modal-footer"> <div class="pull-left"> <a href="'+A((r=e&&e.url,typeof r===O?r.apply(e):r))+'" target="_blank">'+A(n(2).call(e,"View XML",{hash:{},data:t}))+"</a> </div> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var k,D="",A=this.escapeExpression,O="function",R=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 circle-info"></i> '+A(n(2).call(t,"Media Info",{
hash:{},data:i}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <div class="position-ref ',k=r.unless.call(t,t&&t.hasStreams,{hash:{},inverse:R.noop,fn:R.program(1,s,i),data:i}),(k||0===k)&&(D+=k),D+='"> ',k=r.if.call(t,t&&t.hasFiles,{hash:{},inverse:R.noop,fn:R.program(3,o,i),data:i}),(k||0===k)&&(D+=k),D+=" ",k=r.each.call(t,t&&t.media,{hash:{},inverse:R.noop,fn:R.programWithDepth(20,y,i,t),data:i}),(k||0===k)&&(D+=k),D+=" </div> </div> ",k=r.if.call(t,t&&t.key,{hash:{},
inverse:R.noop,fn:R.programWithDepth(35,x,i,t),data:i}),(k||0===k)&&(D+=k),D+=" </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,a="";return a+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+h((n=null==t||t===!1?t:t.index,typeof n===p?n.apply(e):n))+'" href="#"> ',n=r.if.call(e,e&&e.title,{hash:{},inverse:v.noop,fn:v.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+=" ",n=r.if.call(e,e&&e.videoResolution,{
hash:{},inverse:v.noop,fn:v.program(4,l,t),data:t}),(n||0===n)&&(a+=n),a+=" ",n=r.if.call(e,e&&e.bitrate,{hash:{},inverse:v.noop,fn:v.program(7,d,t),data:t}),(n||0===n)&&(a+=n),a+=" </a> </li> "}function o(e,t){var n,r="";return r+=" "+h((n=e&&e.title,typeof n===p?n.apply(e):n))+' <span class="title-separator">\u2022</span> '}function l(e,t){var a,i="";return i+=" "+h(n(626).call(e,e&&e.videoResolution,{hash:{},data:t})),a=r.if.call(e,e&&e.bitrate,{hash:{},inverse:v.noop,fn:v.program(5,u,t),data:t
}),(a||0===a)&&(i+=a),i+=" "}function u(e,t){return","}function d(e,t){var r="";return r+=" "+h(n(625).call(e,e&&e.bitrate,0,{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var c,f="",p="function",h=this.escapeExpression,v=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 adjust-alt"></i> '+h(n(2).call(t,"Select a Version",{
hash:{},data:i}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',c=r.each.call(t,t&&t.mediaItems,{hash:{},inverse:v.noop,fn:v.program(1,s,i),data:i}),(c||0===c)&&(f+=c),f+=" </ul> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <p class="text-muted">'+d(n(2).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 r="";return r+=' <p class="text-muted">'+d(n(2).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"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c=this,f="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> '+d(n(2).call(t,"Go Premium",{
hash:{},data:i}))+' </h4> </div> <div class="modal-body"> <p class="text-center"><i class="plex-image plex-pass"></i></p> <h4 class="text-center">'+d(n(2).call(t,"This feature requires a Plex Pass subscription.",{hash:{},data:i}))+"</h4> ",l=r.if.call(t,t&&t.isClaimed,{hash:{},inverse:c.program(3,o,i),fn:c.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=' <p class="text-center"> <a class="btn btn-sm btn-primary" href="'+d((l=t&&t.plexPassUrl,typeof l===f?l.apply(t):l))+'" target="_blank">'+d(n(2).call(t,"Learn More",{
hash:{},data:i}))+"</a> </p> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <div class="friends-container"></div> <div class="message-container invisible"> <textarea class="message form-control" placeholder="'+d(n(2).call(e,"Say something about this...",{hash:{},data:t}))+'"></textarea> </div> '}function o(e,t){var r="";return r+=' <div class="empty-message"> '+d(n(2).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"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c=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> '+d(n(2).call(t,"Select Friends",{hash:{},data:i}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',
l=r.if.call(t,t&&t.hasFriends,{hash:{},inverse:c.program(3,o,i),fn:c.program(1,s,i),data:i}),(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">'+d(n(2).call(t,"Send",{hash:{},data:i}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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-exclamation-mark"></i> '+o(n(2).call(t,"Limited Connection",{hash:{},data:i}))+' </h4> </div> <div class="modal-body"> <p> '+o(n(2).call(t,"You are not connected directly to this server so streaming quality may be limited. You may be able to connect directly by changing your home network settings. {1}Learn more{2}",'<a href="https://plex.tv/relay" target="_blank" class="learn-more">',"</a>",{
hash:{},data:i}))+' </p> </div> <div class="modal-footer"> <button type="button" class="confirm-btn btn btn-lg btn-primary">'+o(n(2).call(t,"OK",{hash:{},data:i}))+"</button> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t,a){var i,s="";return s+=' <h4 class="update-list-title">'+f(n(2).call(e,"New",{hash:{},data:t}))+"</h4> <ul> ",i=r.each.call(e,a&&a.added,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(i||0===i)&&(s+=i),
s+=" </ul> "}function o(e,t){var n="";return n+=" <li>"+f(typeof e===c?e.apply(e):e)+"</li> "}function l(e,t,a){var i,s="";return s+=' <h4 class="update-list-title">'+f(n(2).call(e,"Fixes",{hash:{},data:t}))+"</h4> <ul> ",i=r.each.call(e,a&&a.fixed,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(i||0===i)&&(s+=i),s+=" </ul> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c="function",f=this.escapeExpression,p=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 circle-info"></i> '+f(n(2).call(t,"Plex Media Server Release Notes",{
hash:{},data:i}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <span class="text-muted">'+f(n(2).call(t,"Version {1}",t&&t.version,{hash:{},data:i}))+"</span> ",u=r.if.call(t,t&&t.added,{hash:{},inverse:p.noop,fn:p.programWithDepth(1,s,i,t),data:i}),(u||0===u)&&(d+=u),d+=" ",u=r.if.call(t,t&&t.fixed,{hash:{},inverse:p.noop,fn:p.programWithDepth(4,l,i,t),data:i}),(u||0===u)&&(d+=u),d+=" </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
function s(e,t){var n,a="";return a+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+f((n=e&&e.id,typeof n===p?n.apply(e):n))+'" href="#"> ',n=r.if.call(e,e&&e.name,{hash:{},inverse:h.program(4,l,t),fn:h.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+=" ",n=r.if.call(e,e&&e.isCloudSync,{hash:{},inverse:h.noop,fn:h.program(6,u,t),data:t}),(n||0===n)&&(a+=n),a+=" </a> </li> "}function o(e,t){var r="";return r+=" "+f(n(402).call(e,e&&e.name,25,{hash:{},data:t}))+" "}function l(e,t){
var r="";return r+=" "+f(n(402).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"],r=this.merge(r,e.helpers),i=i||{};var d,c="",f=this.escapeExpression,p="function",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 iphone"></i> '+f(n(2).call(t,"Choose Destination",{
hash:{},data:i}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',d=r.each.call(t,t&&t.devices,{hash:{},inverse:h.noop,fn:h.program(1,s,i),data:i}),(d||0===d)&&(c+=d),c+=" </ul> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r,a="";return a+=' <li class="striped-list-item select-list-item"> <a class="media" data-value="'+d((r=null==t||t===!1?t:t.index,typeof r===u?r.apply(e):r))+'" href="#"> ',
r=n(1093).call(e,(r=e&&e.Part,r=null==r||r===!1?r:r[0],null==r||r===!1?r:r.file),35,{hash:{},data:t}),(r||0===r)&&(a+=r),a+=" </a> </li> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u="function",d=this.escapeExpression,c=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> '+d(n(2).call(t,"Select a File",{
hash:{},data:i}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <ul class="list select-list"> ',o=r.each.call(t,t&&t.medias,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+=" </ul> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Resume",{
hash:{},data:i}))+'</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(2).call(t,"Resume from {1}",t&&t.formattedOffset,{hash:{},data:i}))+'</a></li> <li class="striped-list-item select-list-item"><a class="offset" data-value="0" href="#">'+l(n(2).call(t,"Start from beginning",{hash:{},data:i}))+"</a></li> </ul> </div> </div> </div> "})},function(e,t,n){
var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r,a="";return a+=' <li><a class="btn-gray show-pane-btn type-btn',r=n(23).call(e,e&&e.selectedPane,e&&e.id,{hash:{},inverse:d.noop,fn:d.program(2,o,t),data:t}),(r||0===r)&&(a+=r),a+='" href="#" data-pane="'+f((r=e&&e.id,typeof r===c?r.apply(e):r))+'">'+f((r=e&&e.name,typeof r===c?r.apply(e):r))+"</a></li> "}function o(e,t){return" selected"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this,c="function",f=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> '+f(n(2).call(t,"Plex Media Server Downloads",{hash:{},data:i}))+' </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=r.each.call(t,t&&t.items,{
hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var a,i="";return i+=' <ul class="list select-list select-networks-list dark-scrollbar"> ',a=r.each.call(e,e&&e.networks,{hash:{},inverse:m.noop,fn:m.programWithDepth(2,o,t,e),
data:t}),(a||0===a)&&(i+=a),i+=' </ul> <div class="message-container ',a=r.unless.call(e,e&&e.autoSelect,{hash:{},inverse:m.noop,fn:m.program(10,f,t),data:t}),(a||0===a)&&(i+=a),i+='"> <textarea class="message form-control" placeholder="'+b(n(2).call(e,"Say something about this...",{hash:{},data:t}))+'"></textarea> </div> '}function o(e,t,a){var i,s="";return s+=' <li class="striped-list-item select-list-item"> <a class="network ',i=r.if.call(e,a&&a.autoSelect,{hash:{},inverse:m.noop,fn:m.program(3,l,t),
data:t}),(i||0===i)&&(s+=i),s+='" data-id="'+b((i=e&&e.key,typeof i===y?i.apply(e):i))+'" href="#"> ',i=n(23).call(e,e&&e.key,"facebook",{hash:{},inverse:m.program(7,d,t),fn:m.program(5,u,t),data:t}),(i||0===i)&&(s+=i),s+=" "+b((i=e&&e.title,typeof i===y?i.apply(e):i))+" </a> </li> "}function l(e,t){return"selected"}function u(e,t){return' <i class="network-icon glyphicon glyphicon-social facebook"></i> '}function d(e,t){var r,a="";return a+=" ",r=n(23).call(e,e&&e.key,"twitter",{hash:{},inverse:m.noop,
fn:m.program(8,c,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function c(e,t){return' <i class="network-icon glyphicon glyphicon-social twitter"></i> '}function f(e,t){return"invisible"}function p(e,t){var r="";return r+=' <div class="empty-message"> '+b(n(2).call(e,"You need to {1}link your account{2}.",'<a href="{3}" target="_blank">',"</a>",e&&e.accountUrl,{hash:{},data:t}))+" </div> "}function h(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var v,g="",m=this,y="function",b=this.escapeExpression;
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"><i class="modal-icon glyphicon share"></i> '+b(n(2).call(t,"Share",{hash:{},data:i}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',v=r.if.call(t,t&&t.networks,{hash:{},inverse:m.program(12,p,i),fn:m.program(1,s,i),data:i}),(v||0===v)&&(g+=v),g+=' </div> <div class="modal-footer"> <span class="characters-remaining"></span> <button type="button" class="share-btn btn btn-primary btn-loading ',
v=r.unless.call(t,t&&t.autoSelect,{hash:{},inverse:m.noop,fn:m.program(14,h,i),data:i}),(v||0===v)&&(g+=v),g+='"> <div class="loading loading-sm"></div> <span class="btn-label">'+b(n(2).call(t,"Share",{hash:{},data:i}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,r="";return r+=' <p class="text-muted"><i class="glyphicon warning-sign"></i> '+d((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"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u="function",d=this.escapeExpression,c=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> '+d(n(2).call(t,"Sync Status",{hash:{},data:i}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <h4 class="sync-item-title">'+d((o=t&&t.rootTitle,
typeof o===u?o.apply(t):o))+" &middot; "+d((o=t&&t.title,typeof o===u?o.apply(t):o))+"</h4> ",o=r.if.call(t,(o=t&&t.Status,null==o||o===!1?o:o.failure),{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+=' <div class="sync-status-list-container"></div> </div> </div> </div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),a=this.merge(a,e.partials),i=i||{};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(2).call(t,"Plex Terms of Service",{hash:{},data:i}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> ',s=u.invokePartial(n(2452),"terms",t,r,a,i),(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(2).call(t,"Agree",{
hash:{},data:i}))+"</span> </button> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,r="";return r+=" "+c((n=e&&e.status,typeof n===d?n.apply(e):n))+" "}function o(e,t){var r="";return r+=" "+c(n(2).call(e,"There was a problem preparing for optimization.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d="function",c=this.escapeExpression,f=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=r.if.call(t,t&&t.status,{hash:{},inverse:f.program(3,o,i),fn:f.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=' </h4> <h4><a class="try-again-link" href="#">'+c(n(2).call(t,"Try again",{hash:{},data:i}))+"</a></h4> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"disabled"}function o(e,t){return"selected"}function l(e,t,r){var a,i="";return i+=' <option value="'+f((a=e&&e.id,typeof a===c?a.apply(e):a))+'" ',a=n(23).call(e,r&&r.selectedLocationID,e&&e.id,{
hash:{},inverse:p.noop,fn:p.program(3,o,t),data:t}),(a||0===a)&&(i+=a),i+=">"+f(n(627).call(e,e&&e.path,50,20,{hash:{},data:t}))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c="function",f=this.escapeExpression,p=this;return d+='<label class="control-label" for="convert-storage-location">'+f(n(2).call(t,"Version storage location",{hash:{},data:i}))+'</label> <select id="convert-storage-location" class="storage-location-select" name="storageLocation" ',
u=r.if.call(t,t&&t.disableLocation,{hash:{},inverse:p.noop,fn:p.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+='> <option value="-1" ',u=n(23).call(t,t&&t.selectedLocationID,-1,{hash:{},inverse:p.noop,fn:p.program(3,o,i),data:i}),(u||0===u)&&(d+=u),d+=">"+f(n(2).call(t,"In folders with original items",{hash:{},data:i}))+"</option> ",u=r.each.call(t,t&&t.locations,{hash:{},inverse:p.noop,fn:p.programWithDepth(5,l,i,t),data:i}),(u||0===u)&&(d+=u),d+=' </select> <p class="help-block">'+f(n(2).call(t,'A "Plex Versions" folder will be created in your chosen location.',{
hash:{},data:i}))+"</p> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"hidden"}function o(e,t){return"checked"}function l(e,t){var n,r="";return r+='value="'+g((n=e&&e.policy,n=null==n||n===!1?n:n.value,typeof n===v?n.apply(e):n))+'"'}function u(e,t){var n,a="";return a+=" ",n=r.if.call(e,e&&e.isCloudSync,{hash:{},inverse:m.program(10,c,t),fn:m.program(8,d,t),data:t}),(n||0===n)&&(a+=n),a+=" "}function d(e,t){var r="";return r+=" "+g(n(2).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 c(e,t){var r="";return r+=" "+g(n(2).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 f(e,t){var r="";return r+=" "+g(n(2).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"],r=this.merge(r,e.helpers),i=i||{};
var p,h="",v="function",g=this.escapeExpression,m=this;return h+='<div class="form-group ',p=r.unless.call(t,t&&t.showUnwatched,{hash:{},inverse:m.noop,fn:m.program(1,s,i),data:i}),(p||0===p)&&(h+=p),h+='"> <label class="control-label"> <input type="checkbox" id="convert-policy-unwatched" name="policyUnwatched" ',p=r.if.call(t,(p=t&&t.policy,null==p||p===!1?p:p.unwatched),{hash:{},inverse:m.noop,fn:m.program(3,o,i),data:i}),(p||0===p)&&(h+=p),h+="> "+g(n(2).call(t,"Unwatched only",{hash:{},data:i
}))+' </label> </div> <div class="form-group ',p=r.unless.call(t,t&&t.isDirectory,{hash:{},inverse:m.noop,fn:m.program(1,s,i),data:i}),(p||0===p)&&(h+=p),h+='"> <label class="control-label"> <input type="checkbox" id="convert-policy-scope" name="policyScope" value="count" ',p=n(23).call(t,(p=t&&t.policy,null==p||p===!1?p:p.scope),"count",{hash:{},inverse:m.noop,fn:m.program(3,o,i),data:i}),(p||0===p)&&(h+=p),h+="> "+g(n(2).call(t,"Limit to",{hash:{},data:i}))+' <input type="number" id="convert-policy-value" name="policyValue" class="policy-value-control form-control" ',
p=r.if.call(t,(p=t&&t.policy,null==p||p===!1?p:p.value),{hash:{},inverse:m.noop,fn:m.program(5,l,i),data:i}),(p||0===p)&&(h+=p),h+="> "+g(n(2).call(t,"items",{hash:{},data:i}))+' </label> <p class="convert-warning help-block ',p=r.unless.call(t,t&&t.showLimitWarning,{hash:{},inverse:m.noop,fn:m.program(1,s,i),data:i}),(p||0===p)&&(h+=p),h+='"> <i class="convert-warning-icon glyphicon circle-exclamation-mark"></i> <span class="convert-warning-text"> ',p=r.if.call(t,t&&t.isSync,{hash:{},inverse:m.program(12,f,i),
fn:m.program(7,u,i),data:i}),(p||0===p)&&(h+=p),h+=" </span> </p> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"disabled"}function o(e,t,a){var i,s="";return s+=' <option value="'+h((i=e&&e.id,typeof i===v?i.apply(e):i))+'" ',i=n(23).call(e,(i=a&&a.item,null==i||i===!1?i:i.targetTagID),e&&e.id,{hash:{},inverse:g.noop,fn:g.program(4,l,t),data:t}),(i||0===i)&&(s+=i),s+="> "+h((i=e&&e.tag,typeof i===v?i.apply(e):i)),i=r.if.call(e,(i=e&&e.mediaSettings,
null==i||i===!1?i:i.videoResolution),{hash:{},inverse:g.noop,fn:g.program(6,u,t),data:t}),(i||0===i)&&(s+=i),s+=" </option> "}function l(e,t){return"selected"}function u(e,t){var r="";return r+=" - "+h(n(139).call(e,e&&e.mediaSettings,{hash:{},data:t}))}function d(e,t,r){var a,i="";return i+=' <option value="'+h((a=e&&e.title,typeof a===v?a.apply(e):a))+'" ',a=n(23).call(e,(a=r&&r.selectedProfile,null==a||a===!1?a:a.title),e&&e.title,{hash:{},inverse:g.noop,fn:g.program(4,l,t),data:t}),(a||0===a)&&(i+=a),
i+="> "+h((a=e&&e.title,typeof a===v?a.apply(e):a))+" </option> "}function c(e,t,r){var a,i="";return i+=' <option value="'+h((a=e&&e.index,typeof a===v?a.apply(e):a))+'" ',a=n(23).call(e,(a=r&&r.selectedCustomQuality,null==a||a===!1?a:a.index),e&&e.index,{hash:{},inverse:g.noop,fn:g.program(4,l,t),data:t}),(a||0===a)&&(i+=a),i+="> "+h(n(139).call(e,e,{hash:{},data:t}))+" </option> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var f,p="",h=this.escapeExpression,v="function",g=this;
return p+='<select class="convert-target-select" name="target" ',f=r.if.call(t,t&&t.disableTarget,{hash:{},inverse:g.noop,fn:g.program(1,s,i),data:i}),(f||0===f)&&(p+=f),p+="> ",f=r.each.call(t,t&&t.targets,{hash:{},inverse:g.noop,fn:g.programWithDepth(3,o,i,t),data:i}),(f||0===f)&&(p+=f),p+=' <option value="-1" ',f=r.unless.call(t,(f=t&&t.item,null==f||f===!1?f:f.targetTagID),{hash:{},inverse:g.noop,fn:g.program(4,l,i),data:i}),(f||0===f)&&(p+=f),p+=">"+h(n(2).call(t,"Custom",{hash:{},data:i}))+'</option> </select> <div class="convert-custom-target-container"> <input type="text" class="convert-target-title form-control" name="targetTitle" class="form-control" value="'+h((f=t&&t.item,
f=null==f||f===!1?f:f.target,typeof f===v?f.apply(t):f))+'" placeholder="'+h(n(2).call(t,"Quality Name",{hash:{},data:i}))+'"> <select class="convert-target-profile-select" name="targetProfile"> ',f=r.each.call(t,t&&t.profiles,{hash:{},inverse:g.noop,fn:g.programWithDepth(8,d,i,t),data:i}),(f||0===f)&&(p+=f),p+=' </select> <select class="convert-target-quality-select" name="targetQuality"> ',f=r.each.call(t,t&&t.availableCustomQualities,{hash:{},inverse:g.noop,fn:g.programWithDepth(10,c,i,t),data:i
}),(f||0===f)&&(p+=f),p+=' </select> </div> <p class="help-block">'+h(n(2).call(t,"Plex will convert your media to this quality. Each version will be stored in a separate file.",{hash:{},data:i}))+"</p> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"hidden"}function o(e,t){return c(n(2).call(e,"Optimize",{hash:{},data:t}))}function l(e,t){return c(n(2).call(e,"Save",{hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),
i=i||{};var u,d="",c=this.escapeExpression,f=this,p="function";return d+='<form id="convert-form" class="settings-container"> <div class="modal-body"> <div class="form-group ',u=r.unless.call(t,t&&t.showRemuxOnlyWarning,{hash:{},inverse:f.noop,fn:f.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+='"> <p class="convert-warning help-block"> <i class="convert-warning-icon glyphicon circle-exclamation-mark"></i> <span class="convert-warning-text"> '+c(n(2).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:i}))+' </span> </p> </div> <div class="form-group"> <label class="control-label" for="convert-title">'+c(n(2).call(t,"Title",{hash:{},data:i}))+'</label> <input type="text" id="convert-title" name="title" class="form-control" value="'+c((u=t&&t.conversionItem,u=null==u||u===!1?u:u.title,typeof u===p?u.apply(t):u))+'" placeholder="'+c((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">'+c(n(2).call(t,"Cancel",{
hash:{},data:i}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">',u=r.if.call(t,t&&t.isNew,{hash:{},inverse:f.program(5,l,i),fn:f.program(3,o,i),data:i}),(u||0===u)&&(d+=u),d+="</span> </button> </div> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="loading loading-inline"></div> ';
})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Optimize",{hash:{},data:i}))+'</h4> </div> <div class="modal-body-region"></div> </div> </div> ';
})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"This media is being converted.",{hash:{},data:i}))+"</h4> <h4>"+o(n(2).call(t,"Watch the status of the conversion {1}here{2}.",'<a class="status-link" href="#">',"</a>",{
hash:{},data:i}))+"</h4> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"There was a problem syncing this media.",{hash:{},data:i
}))+'</h4> <h4><a class="try-again-link" href="#">'+o(n(2).call(t,"Try again",{hash:{},data:i}))+"</a></h4> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,a="";return a+=' <select class="sync-quality-select" name="videoQuality"> ',n=r.if.call(e,e&&e.supportsOriginalQuality,{hash:{},inverse:g.noop,fn:g.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+=" ",n=r.each.call(e,e&&e.availableVideoQualities,{hash:{},inverse:g.noop,fn:g.programWithDepth(5,u,t,e),
data:t}),(n||0===n)&&(a+=n),a+=" </select> "}function o(e,t){var r,a="";return a+=' <option value="-1" ',r=n(23).call(e,(r=e&&e.selectedVideoQuality,null==r||r===!1?r:r.index),-1,{hash:{},inverse:g.noop,fn:g.program(3,l,t),data:t}),(r||0===r)&&(a+=r),a+="> "+m(n(2).call(e,"Original",{hash:{},data:t}))+" </option> "}function l(e,t){return"selected"}function u(e,t,r){var a,i="";return i+=' <option value="'+m((a=e&&e.index,typeof a===y?a.apply(e):a))+'" ',a=n(23).call(e,(a=r&&r.selectedVideoQuality,
null==a||a===!1?a:a.index),e&&e.index,{hash:{},inverse:g.noop,fn:g.program(3,l,t),data:t}),(a||0===a)&&(i+=a),i+="> "+m(n(139).call(e,e,{hash:{},data:t}))+" </option> "}function d(e,t){var n,a="";return a+=' <select class="sync-quality-select" name="musicQuality"> ',n=r.each.call(e,e&&e.availableMusicQualities,{hash:{},inverse:g.noop,fn:g.programWithDepth(8,c,t,e),data:t}),(n||0===n)&&(a+=n),a+=" </select> "}function c(e,t,r){var a,i="";return i+=' <option value="'+m((a=e&&e.index,typeof a===y?a.apply(e):a))+'" ',
a=n(23).call(e,(a=r&&r.selectedMusicQuality,null==a||a===!1?a:a.index),e&&e.index,{hash:{},inverse:g.noop,fn:g.program(3,l,t),data:t}),(a||0===a)&&(i+=a),i+="> "+m(n(139).call(e,e,{hash:{},data:t}))+" </option> "}function f(e,t){var n,a="";return a+=' <select class="sync-quality-select" name="photoQuality"> ',n=r.each.call(e,e&&e.availablePhotoQualities,{hash:{},inverse:g.noop,fn:g.programWithDepth(11,p,t,e),data:t}),(n||0===n)&&(a+=n),a+=" </select> "}function p(e,t,r){var a,i="";return i+=' <option value="'+m((a=e&&e.index,
typeof a===y?a.apply(e):a))+'" ',a=n(23).call(e,(a=r&&r.selectedPhotoQuality,null==a||a===!1?a:a.index),e&&e.index,{hash:{},inverse:g.noop,fn:g.program(3,l,t),data:t}),(a||0===a)&&(i+=a),i+="> "+m((a=e&&e.title,typeof a===y?a.apply(e):a))+" </option> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var h,v="",g=this,m=this.escapeExpression,y="function";return h=n(23).call(t,t&&t.typeElement,"video",{hash:{},inverse:g.noop,fn:g.program(1,s,i),data:i}),(h||0===h)&&(v+=h),v+=" ",
h=n(23).call(t,t&&t.typeElement,"audio",{hash:{},inverse:g.noop,fn:g.program(7,d,i),data:i}),(h||0===h)&&(v+=h),v+=" ",h=n(23).call(t,t&&t.typeElement,"photo",{hash:{},inverse:g.noop,fn:g.program(10,f,i),data:i}),(h||0===h)&&(v+=h),v+=' <p class="help-block">'+m(n(2).call(t,"Plex will convert your media to this quality and transfer the converted media to your device.",{hash:{},data:i}))+"</p> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return d(n(2).call(e,"Sync",{
hash:{},data:t}))}function o(e,t){return d(n(2).call(e,"Save",{hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c="function",f=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">'+d(n(2).call(t,"Title",{hash:{},data:i}))+'</label> <input type="text" id="sync-title" name="title" class="form-control" value="'+d((l=t&&t.syncItem,
l=null==l||l===!1?l:l.title,typeof l===c?l.apply(t):l))+'" placeholder="'+d((l=t&&t.syncItem,l=null==l||l===!1?l:l.title,typeof l===c?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">'+d(n(2).call(t,"Cancel",{hash:{},data:i}))+'</button> <button type="submit" class="submit-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">',
l=r.if.call(t,t&&t.isNew,{hash:{},inverse:f.program(3,o,i),fn:f.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+="</span> </button> </div> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Sync",{
hash:{},data:i}))+'</h4> </div> <div class="modal-body-region"></div> </div> </div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"This media is being synced.",{
hash:{},data:i}))+"</h4> <h4>"+o(n(2).call(t,"Watch the status of the sync {1}here{2}.",'<a class="status-link" href="#">',"</a>",{hash:{},data:i}))+"</h4> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"There was a problem loading these items.",{
hash:{},data:i}))+" </span> </div> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<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> <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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,r="";return r+=" "+m((n=e&&e.title,typeof n===g?n.apply(e):n))+" "}function o(e,t){var r,a="";return a+=" ",r=n(23).call(e,e&&e.type,"home",{hash:{},inverse:y.program(6,u,t),fn:y.program(4,l,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function l(e,t){var r="";return r+=" "+m(n(2).call(e,"Add User",{hash:{},data:t}))+" "}function u(e,t){var r="";return r+=" "+m(n(2).call(e,"Invite Friend",{hash:{},
data:t}))+" "}function d(e,t){var r="";return r+=" "+m(n(2).call(e,"Save Changes",{hash:{},data:t}))+" "}function c(e,t){var r,a="";return a+=" ",r=n(23).call(e,e&&e.type,"home",{hash:{},inverse:y.program(13,p,t),fn:y.program(11,f,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function f(e,t){var r="";return r+=" "+m(n(2).call(e,"Add",{hash:{},data:t}))+" "}function p(e,t){var r="";return r+=" "+m(n(2).call(e,"Invite",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};
var h,v="",g="function",m=this.escapeExpression,y=this;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> <div class="modal-poster media-poster img-circle placeholder-friend"></div> <h4 class="modal-title"> ',h=r.if.call(t,t&&t.title,{hash:{},inverse:y.program(3,o,i),fn:y.program(1,s,i),data:i}),(h||0===h)&&(v+=h),v+=' </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">'+m(n(2).call(t,"Cancel",{
hash:{},data:i}))+'</button> <button type="submit" class="next-btn btn btn-lg btn-primary disabled">'+m(n(2).call(t,"Next",{hash:{},data:i}))+'</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"> ',h=r.if.call(t,t&&t.title,{hash:{},inverse:y.program(10,c,i),fn:y.program(8,d,i),data:i}),(h||0===h)&&(v+=h),v+=" </span> </button> </div> </form> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
function s(e,t){var r,a="";return a+=' <div class="restricted-name-group form-group"> <input type="text" id="restricted-title" name="title" class="form-control" placeholder="'+w(n(2).call(e,"Name",{hash:{},data:t}))+'" value="'+w((r=e&&e.homeUser,r=null==r||r===!1?r:r.title,typeof r===S?r.apply(e):r))+'"> </div> '}function o(e,t){var n,a="";return a+=' <h3 class="friend-title"> ',n=r.if.call(e,(n=e&&e.friend,null==n||n===!1?n:n.title),{hash:{},inverse:_.program(6,u,t),fn:_.program(4,l,t),data:t}),
(n||0===n)&&(a+=n),a+=' </h3> <p class="text-muted"> ',n=r.if.call(e,(n=e&&e.friend,null==n||n===!1?n:n.email),{hash:{},inverse:_.program(10,c,t),fn:_.program(8,d,t),data:t}),(n||0===n)&&(a+=n),a+=" </p> "}function l(e,t){var n,r="";return r+=" "+w((n=e&&e.friend,n=null==n||n===!1?n:n.title,typeof n===S?n.apply(e):n))+" "}function u(e,t){var n,r="";return r+=" "+w((n=e&&e.friend,n=null==n||n===!1?n:n.username,typeof n===S?n.apply(e):n))+" "}function d(e,t){var n,r="";return r+=" "+w((n=e&&e.friend,
n=null==n||n===!1?n:n.email,typeof n===S?n.apply(e):n))+" "}function c(e,t){var r="";return r+=" "+w(n(2).call(e,"An invite will be sent to this user.",{hash:{},data:t}))+" "}function f(e,t){var n,a="";return a+=' <div class="edit-friend-footer"> ',n=r.if.call(e,(n=e&&e.homeUser,null==n||n===!1?n:n.restricted),{hash:{},inverse:_.program(18,g,t),fn:_.program(13,p,t),data:t}),(n||0===n)&&(a+=n),a+=" </div> "}function p(e,t){var n,a="";return a+=" ",n=r.if.call(e,(n=e&&e.homeUser,null==n||n===!1?n:n.guest),{
hash:{},inverse:_.program(16,v,t),fn:_.program(14,h,t),data:t}),(n||0===n)&&(a+=n),a+=" "}function h(e,t){var r="";return r+=' <button type="button" class="disable-guest-btn btn btn-sm btn-danger">'+w(n(2).call(e,"Disable guest",{hash:{},data:t}))+"</button> "}function v(e,t){var r="";return r+=' <button type="button" class="remove-home-btn btn btn-sm btn-danger">'+w(n(2).call(e,"Delete user",{hash:{},data:t}))+"</button> "}function g(e,t){var n,a="";return a+=" ",n=r.if.call(e,e&&e.canRemoveFriend,{
hash:{},inverse:_.noop,fn:_.program(19,m,t),data:t}),(n||0===n)&&(a+=n),a+=" ",n=r.if.call(e,e&&e.canRemoveHomeUser,{hash:{},inverse:_.noop,fn:_.program(21,y,t),data:t}),(n||0===n)&&(a+=n),a+=" "}function m(e,t){var r="";return r+=' <button type="button" class="remove-friend-btn btn btn-sm btn-danger">'+w(n(2).call(e,"Remove this friend",{hash:{},data:t}))+"</button> "}function y(e,t){var r="";return r+=' <button type="button" class="remove-home-btn btn btn-sm btn-danger">'+w(n(2).call(e,"Remove from home",{
hash:{},data:t}))+"</button> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var b,P="",w=this.escapeExpression,S="function",_=this;return P+='<div class="edit-friend-header"> <div class="media-poster img-circle placeholder-friend"></div> ',b=r.if.call(t,(b=t&&t.homeUser,null==b||b===!1?b:b.restricted),{hash:{},inverse:_.program(3,o,i),fn:_.program(1,s,i),data:i}),(b||0===b)&&(P+=b),P+=" </div> ",b=r.if.call(t,t&&t.showActions,{hash:{},inverse:_.noop,fn:_.program(12,f,i),data:i
}),(b||0===b)&&(P+=b),P+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"General",{hash:{},data:i}))+' </a> </li> <li class="owned-list-header modal-nav-list-header">'+o(n(2).call(t,"My Servers",{
hash:{},data:i}))+'</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(2).call(t,"Restrictions",{hash:{},data:i}))+' </a> </li> <li class="shared-list-header modal-nav-list-header">'+o(n(2).call(t,"Shared With Me",{hash:{},data:i}))+'</li> <li class="shared-servers-container"></li> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){
this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,s,o="",l="function",u=this.escapeExpression;return o+='<span class="modal-nav-icon friend-server-status ',(s=n.status)?i=s.call(t,{hash:{},data:a}):(s=t&&t.status,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+'"> <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((i=t&&t.server,
i=null==i||i===!1?i:i.name,typeof i===l?i.apply(t):i))+" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Available",{hash:{},data:i}))+'</span> <span class="server-status-label unavailable">'+o(n(2).call(t,"Unavailable",{
hash:{},data:i}))+'</span> <span class="server-status-label unauthorized">'+o(n(2).call(t,"Unauthorized",{hash:{},data:i}))+'</span> <span class="server-status-label unknown">'+o(n(2).call(t,"Unknown",{hash:{},data:i}))+'</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(2).call(t,"Info",{hash:{},data:i}))+'</h4> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(2).call(t,"Version",{
hash:{},data:i}))+'</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(2).call(t,"Last Seen",{hash:{},data:i}))+'</div> <div class="server-detail-value server-detail-last-seen"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(2).call(t,"Address",{hash:{},data:i}))+'</div> <div class="server-detail-value server-detail-address"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(2).call(t,"Port",{
hash:{},data:i}))+'</div> <div class="server-detail-value server-detail-port"></div> </div> </div> <div class="share-details"> <h4>'+o(n(2).call(t,"Share",{hash:{},data:i}))+"</h4> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var a,i="";return i+=' <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" ',
a=r.if.call(e,(a=e&&e.user,null==a||a===!1?a:a.allowChannels),{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+="> "+f(n(2).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">'+f(n(2).call(e,"Plex Pass restrictions",{hash:{},data:t}))+'</span> <a href="'+f((a=e&&e.plexPassUrl,typeof a===p?a.apply(e):a))+'" target="_blank">'+f(n(2).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 a,i="";return i+=' <div class="checkbox"> <label for="allow-channels-cb"> <input type="checkbox" id="allow-channels-cb" name="allowChannels" ',a=r.if.call(e,(a=e&&e.user,null==a||a===!1?a:a.allowChannels),{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+="> "+f(n(2).call(e,"Allow Channels",{hash:{},data:t}))+" </label> </div> "}this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),i=i||{};var u,d="",c=this,f=this.escapeExpression,p="function";return u=r.unless.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+=' <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=r.if.call(t,(u=t&&t.user,null==u||u===!1?u:u.allowSync),{
hash:{},inverse:c.noop,fn:c.program(2,o,i),data:i}),(u||0===u)&&(d+=u),d+="> "+f(n(2).call(t,"Allow Sync",{hash:{},data:i}))+' </label> </div> <div class="checkbox"> <label for="allow-camera-upload-images-cb"> <input type="checkbox" id="allow-camera-upload-images-cb" name="allowCameraUpload" ',u=r.if.call(t,(u=t&&t.user,null==u||u===!1?u:u.allowCameraUpload),{hash:{},inverse:c.noop,fn:c.program(2,o,i),data:i}),(u||0===u)&&(d+=u),d+="> "+f(n(2).call(t,"Allow Camera Upload",{hash:{},data:i}))+' </label> <p class="help-block">'+f(n(2).call(t,"Enabling this option will allow this user to upload media to your server.",{
hash:{},data:i}))+"</p> </div> ",u=r.if.call(t,t&&t.hasContentFilterFeature,{hash:{},inverse:c.noop,fn:c.program(4,l,i),data:i}),(u||0===u)&&(d+=u),d+=' </div> </div> <div class="form-group"> <label class="col-sm-3 control-label section-control-label"> <i class="section-type-icon glyphicon '+f((u=t&&t.moviesIcon,typeof u===p?u.apply(t):u))+'"></i> '+f(n(2).call(t,"Movies",{hash:{},data:i}))+' </label> <div class="col-sm-9 help-block section-help-block"> '+f(n(2).call(t,"Only allow movies matching the ratings or labels below.",{
hash:{},data:i}))+' </div> </div> <div class="form-group"> <label for="filter-movie-contentRating" class="col-sm-3 control-label"> '+f(n(2).call(t,"Ratings",{hash:{},data:i}))+' </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="'+f(n(2).call(t,"Allow all ratings",{hash:{},data:i}))+'" value="'+f((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"> '+f(n(2).call(t,"Labels",{hash:{},data:i}))+' </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="'+f(n(2).call(t,"Allow all labels",{hash:{},data:i}))+'" value="'+f((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 '+f((u=t&&t.showsIcon,typeof u===p?u.apply(t):u))+'"></i> '+f(n(2).call(t,"TV Shows",{hash:{},data:i}))+' </label> <div class="col-sm-9 help-block section-help-block"> '+f(n(2).call(t,"Only allow TV shows matching the ratings or labels below.",{hash:{},data:i}))+' </div> </div> <div class="form-group"> <label for="filter-show-contentRating" class="col-sm-3 control-label"> '+f(n(2).call(t,"Ratings",{
hash:{},data:i}))+' </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="'+f(n(2).call(t,"Allow all ratings",{hash:{},data:i}))+'" value="'+f((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"> '+f(n(2).call(t,"Labels",{
hash:{},data:i}))+' </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="'+f(n(2).call(t,"Allow all labels",{hash:{},data:i}))+'" value="'+f((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 '+f((u=t&&t.musicIcon,
typeof u===p?u.apply(t):u))+'"></i> '+f(n(2).call(t,"Albums",{hash:{},data:i}))+' </label> </div> <div class="form-group"> <label for="filter-artist-label" class="col-sm-3 control-label"> '+f(n(2).call(t,"Labels",{hash:{},data:i}))+' </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="'+f(n(2).call(t,"Allow all labels",{hash:{},data:i}))+'" value="'+f((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> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(e,t){return"checked"}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var s,o,l="",u="function",d=this.escapeExpression,c=this;return l+='<div class="checkbox"> <label for="share-section-'+d((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-'+d((s=t&&t.section,
s=null==s||s===!1?s:s.id,typeof s===u?s.apply(t):s))+'-cb" value="'+d((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:c.noop,fn:c.program(1,i,a),data:a}),(s||0===s)&&(l+=s),l+='> <i class="section-type-icon glyphicon ',(o=n.typeIcon)?s=o.call(t,{hash:{},data:a}):(o=t&&t.typeIcon,s=typeof o===u?o.call(t,{hash:{},data:a}):o),l+=d(s)+'"></i> '+d((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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"show-libraries"}function o(e,t){var a,i="";return i+=' <li class="share-section-list-item"> <div class="checkbox"> <label for="share-all-libraries-'+m((a=e&&e.server,a=null==a||a===!1?a:a.machineIdentifier,typeof a===g?a.apply(e):a))+'-cb"> <input type="checkbox" id="share-all-libraries-'+m((a=e&&e.server,a=null==a||a===!1?a:a.machineIdentifier,typeof a===g?a.apply(e):a))+'-cb" name="share-all-libraries-cb" value="all" ',
a=r.if.call(e,e&&e.allLibraries,{hash:{},inverse:y.noop,fn:y.program(4,l,t),data:t}),(a||0===a)&&(i+=a),i+="> "+m(n(2).call(e,"All Libraries",{hash:{},data:t}))+" </label> </div> </li> "}function l(e,t){return"checked"}function u(e,t){var r="";return r+=' <p class="text-muted">'+m(n(2).call(e,"Loading...",{hash:{},data:t}))+"</p> "}function d(e,t){var n;return n=r.if.call(e,e&&e.hasFailed,{hash:{},inverse:y.program(11,f,t),fn:y.program(9,c,t),data:t}),n||0===n?n:""}function c(e,t){var r,a="";return a+=' <p class="text-muted">'+m(n(2).call(e,"We were unable to retrieve libraries for {1}. Please ensure the server is signed in to your Plex account.",(r=e&&e.server,
null==r||r===!1?r:r.name),{hash:{},data:t}))+"</p> "}function f(e,t){var n;return n=r.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 r="";return r+=' <p class="text-muted">'+m(n(2).call(e,"No libraries",{hash:{},data:t}))+"</p> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var h,v="",g="function",m=this.escapeExpression,y=this;return v+='<ul id="'+m((h=t&&t.server,h=null==h||h===!1?h:h.machineIdentifier,
typeof h===g?h.apply(t):h))+'-section-list" class="list share-section-list ',h=r.unless.call(t,t&&t.allLibraries,{hash:{},inverse:y.noop,fn:y.program(1,s,i),data:i}),(h||0===h)&&(v+=h),v+='"> ',h=r.if.call(t,t&&t.hasSections,{hash:{},inverse:y.noop,fn:y.program(3,o,i),data:i}),(h||0===h)&&(v+=h),v+=" </ul> ",h=r.if.call(t,t&&t.isPending,{hash:{},inverse:y.program(8,d,i),fn:y.program(6,u,i),data:i}),(h||0===h)&&(v+=h),v+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Available",{hash:{},data:i}))+'</span> <span class="server-status-label unavailable">'+o(n(2).call(t,"Unavailable",{hash:{},data:i}))+'</span> <span class="server-status-label unauthorized">'+o(n(2).call(t,"Unauthorized",{
hash:{},data:i}))+'</span> <span class="server-status-label unknown">'+o(n(2).call(t,"Unknown",{hash:{},data:i}))+'</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(2).call(t,"Info",{hash:{},data:i}))+'</h4> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(2).call(t,"Version",{hash:{},data:i}))+'</div> <div class="server-detail-value server-detail-version"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(2).call(t,"Last Seen",{
hash:{},data:i}))+'</div> <div class="server-detail-value server-detail-last-seen"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(2).call(t,"Address",{hash:{},data:i}))+'</div> <div class="server-detail-value server-detail-address"></div> </div> <div class="server-detail-row"> <div class="server-detail-label">'+o(n(2).call(t,"Port",{hash:{},data:i}))+'</div> <div class="server-detail-value server-detail-port"></div> </div> </div> <div class="share-details"> <h4>'+o(n(2).call(t,"Sharing",{
hash:{},data:i}))+'</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(2).call(t,"Sync Allowed",{hash:{},data:i}))+' </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(2).call(t,"Leave Server",{hash:{},data:i}))+"</button> </div> "})},function(e,t,n){
var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,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)?i=s.call(t,{hash:{},data:a}):(s=t&&t.typeIcon,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+'"></i> '+u((i=t&&t.section,i=null==i||i===!1?i:i.title,typeof i===l?i.apply(t):i))+" </li> "})},function(e,t,n){
var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <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="'+d(n(2).call(e,"Username or email",{
hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <button type="button" class="add-existing-user-btn btn btn-primary">'+d(n(2).call(e,"Add an Existing Plex User",{hash:{},data:t}))+'</button> <p class="help-block">'+d(n(2).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="'+d(n(2).call(e,"Name",{
hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <button type="button" class="add-restricted-user-btn btn btn-primary">'+d(n(2).call(e,"Create a Managed User",{hash:{},data:t}))+'</button> <p class="help-block">'+d(n(2).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 r="";return r+=' <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="'+d(n(2).call(e,"Username or email",{
hash:{},data:t}))+'" autocorrect="off" autocapitalize="off"> <p class="help-block">'+d(n(2).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"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c=this;return l=n(23).call(t,t&&t.type,"home",{hash:{},inverse:c.program(3,o,i),fn:c.program(1,s,i),data:i}),
(l||0===l)&&(u+=l),u+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Welcome to Plex Home",{
hash:{},data:i}))+'</h4> </div> <div class="modal-body modal-body-scroll dark-scrollbar"> <p>'+o(n(2).call(t,"{1}, so we've made a few changes to help keep your media safe.",t&&t.intro,{hash:{},data:i}))+"</p> <ol> <li>"+o(n(2).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:i}))+"</li> <li>"+o(n(2).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:i}))+"</li> </ol> <p>"+o(n(2).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:i}))+'</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-lg btn-primary" data-dismiss="modal">'+o(n(2).call(t,"OK",{hash:{},data:i}))+"</button> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){
return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="modal-dialog"> <div class="modal-alert"></div> <div class="modal-content"></div> </div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{};var i,s,o="",l="function",u=this.escapeExpression;return o+='<span class="message">',(s=n.message)?i=s.call(t,{hash:{},data:a}):(s=t&&t.message,i=typeof s===l?s.call(t,{hash:{},
data:a}):s),o+=u(i)+"</span> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return' <a class="back-btn btn-gray" href="#"><i class="glyphicon chevron-left"></i></a> '}function o(e,t){var r="";return r+=' <i class="modal-icon glyphicon pencil"></i> '+y(n(2).call(e,"Edit PIN",{hash:{},data:t}))+" "}function l(e,t){var n;return n=r.if.call(e,e&&e.isEditConfirmation,{hash:{},inverse:b.program(8,d,t),fn:b.program(6,u,t),data:t}),n||0===n?n:""}function u(e,t){
var r="";return r+=" "+y(n(2).call(e,"Confirm Current PIN",{hash:{},data:t}))+" "}function d(e,t){var r="";return r+=" "+y(n(2).call(e,"Enter PIN",{hash:{},data:t}))+" "}function c(e,t){var r="";return r+=' <p class="help-block"> '+y(n(2).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 f(e,t){var a,i="";return i+=' <div class="modal-footer"> ',a=r.if.call(e,e&&e.hasCurrentPIN,{hash:{},inverse:b.noop,fn:b.program(13,p,t),
data:t}),(a||0===a)&&(i+=a),i+=" ",a=r.if.call(e,e&&e.isEditWarning,{hash:{},inverse:b.program(17,v,t),fn:b.program(15,h,t),data:t}),(a||0===a)&&(i+=a),i+=' <button type="submit" class="save-btn btn-link">'+y(n(2).call(e,"Save",{hash:{},data:t}))+"</button> </div> "}function p(e,t){var r="";return r+=' <button type="button" class="remove-btn btn-gray pull-left">'+y(n(2).call(e,"Remove",{hash:{},data:t}))+"</button> "}function h(e,t){var r="";return r+=' <button type="button" class="skip-btn btn-gray" data-dismiss="modal">'+y(n(2).call(e,"Skip",{
hash:{},data:t}))+"</button> "}function v(e,t){var r="";return r+=' <button type="button" class="cancel-btn btn-gray" data-dismiss="modal">'+y(n(2).call(e,"Cancel",{hash:{},data:t}))+"</button> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var g,m="",y=this.escapeExpression,b=this;return m+='<div class="modal-header"> <div class="home-user-dropdown-container pull-right"></div> <h4 class="modal-title"> ',g=r.if.call(t,t&&t.showBackButton,{hash:{},inverse:b.noop,fn:b.program(1,s,i),
data:i}),(g||0===g)&&(m+=g),m+=" ",g=r.if.call(t,t&&t.isEditing,{hash:{},inverse:b.program(5,l,i),fn:b.program(3,o,i),data:i}),(g||0===g)&&(m+=g),m+=' <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> ',
g=r.if.call(t,t&&t.isEditWarning,{hash:{},inverse:b.noop,fn:b.program(10,c,i),data:i}),(g||0===g)&&(m+=g),m+=" </div> ",g=r.if.call(t,t&&t.isEditing,{hash:{},inverse:b.noop,fn:b.program(12,f,i),data:i}),(g||0===g)&&(m+=g),m+=" </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(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),a=a||{};var u,d="",c=this;return u=n.if.call(t,t&&t.disabled,{hash:{},inverse:c.program(3,s,a),fn:c.program(1,i,a),data:a}),(u||0===u)&&(d+=u),d+=' <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:c.program(7,l,a),
fn:c.program(5,o,a),data:a}),(u||0===u)&&(d+=u),d+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<div class="modal-header"> <h4 class="modal-title"> '+o(n(2).call(t,"Select User",{hash:{},data:i}))+' <span class="loading loading-sm"></span> </h4> </div> <div class="modal-body"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
function s(e,t){return"hidden"}function o(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this,c=this.escapeExpression,f="function";return u+='<ul class="nav nav-bar-nav"> <li><a class="back-btn ',l=r.unless.call(t,t&&t.hasHistory,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(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=r.unless.call(t,t&&t.canGoPremium,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+='" href="#"><span class="plex-pass-label label label-primary">'+c(n(2).call(t,"Go Premium",{hash:{},data:i}))+'</span></a></li> <li class="',l=r.if.call(t,t&&t.activityCount,{hash:{},inverse:d.noop,fn:d.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+='"><a class="activity-btn ',l=r.unless.call(t,t&&t.showActivity,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+='" href="#!/status" title="'+c(n(2).call(t,"Status",{
hash:{},data:i}))+'" data-toggle="tooltip"><span class="activity-badge badge badge-transparent ',l=r.unless.call(t,t&&t.activityCount,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+='">'+c((l=t&&t.activityCount,typeof l===f?l.apply(t):l))+'</span><i class="glyphicon cardio"></i></a></li> <li><a class="settings-btn" href="#!/settings" title="'+c(n(2).call(t,"Settings",{hash:{},data:i}))+'" data-toggle="tooltip"><i class="glyphicon settings"></i></a></li> </ul> <div class="modal-container"></div> ';
})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){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"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c=this,f="function",p=this.escapeExpression;return d+='<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=r.unless.call(t,t&&t.totalCount,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+='">'+p((u=t&&t.totalCount,typeof u===f?u.apply(t):u))+'</span> </a> <ul class="dropdown-menu ',u=r.if.call(t,t&&t.signedIn,{hash:{},inverse:c.noop,fn:c.program(3,o,i),data:i}),(u||0===u)&&(d+=u),d+=" ",u=r.if.call(t,t&&t.isFullUser,{hash:{},inverse:c.noop,fn:c.program(5,l,i),data:i}),(u||0===u)&&(d+=u),d+='"> <li class="signed-in-item dropdown-header username-header"></li> <li class="signed-in-item full-user-item"><a href="#!/account">'+p(n(2).call(t,"Account",{
hash:{},data:i}))+'</a></li> <li class="signed-in-item"><a class="users-btn" href="#">'+p(n(2).call(t,"Users",{hash:{},data:i}))+' <span class="invites-badge badge ',u=r.unless.call(t,t&&t.invitesCount,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+='">'+p((u=t&&t.invitesCount,typeof u===f?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(2).call(t,"Watch Later",{
hash:{},data:i}))+'</a></li> <li class="signed-in-item full-user-item"><a href="#!/playlist/recommendations">'+p(n(2).call(t,"Recommended",{hash:{},data:i}))+'</a></li> <li class="signed-in-item divider"></li> <li class="announcements-item ',u=r.if.call(t,t&&t.isRestricted,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+='"><a href="#!/announcements">'+p(n(2).call(t,"Announcements",{hash:{},data:i}))+' <span class="announcements-badge badge ',u=r.unless.call(t,t&&t.unreadAnnouncementsCount,{
hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+='">'+p((u=t&&t.unreadAnnouncementsCount,typeof u===f?u.apply(t):u))+'</span></a></li> <li><a href="'+p((u=t&&t.appsUrl,typeof u===f?u.apply(t):u))+'" target="_blank">'+p(n(2).call(t,"Get Plex apps",{hash:{},data:i}))+'</a></li> <li><a href="'+p((u=t&&t.helpUrl,typeof u===f?u.apply(t):u))+'" target="_blank">'+p(n(2).call(t,"Help",{hash:{},data:i}))+'</a></li> <li class="divider"></li> <li class="signed-in-item switch-user-item ',
u=r.unless.call(t,t&&t.home,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+='"><a class="switch-user-btn" href="#">'+p(n(2).call(t,"Switch User...",{hash:{},data:i}))+'</a></li> <li class="signed-out-item"><a class="sign-in-btn" href="#">'+p(n(2).call(t,"Sign In",{hash:{},data:i}))+'</a></li> <li class="signed-in-item full-user-item"><a class="sign-out-btn" href="#">'+p(n(2).call(t,"Sign Out",{hash:{},data:i}))+"</a></li> </ul> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
function s(e,t){var n,r="";return r+='data-scope-to-attr="'+d((n=e&&e.scopeToAttr,typeof n===u?n.apply(e):n))+'" data-scope-to-param="'+d((n=e&&e.scopeToParam,typeof n===u?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u="function",d=this.escapeExpression,c=this;return l+='<div class="form-group" data-attr="'+d((o=t&&t.name,typeof o===u?o.apply(t):o))+'"> <label for="text-'+d((o=t&&t.name,typeof o===u?o.apply(t):o))+'" class="control-label">'+d(n(2).call(t,t&&t.label,{
hash:{},data:i}))+'<span class="control-error"></span></label> <div class="input-group selectize-group"> <input type="text" id="text-'+d((o=t&&t.name,typeof o===u?o.apply(t):o))+'" class="form-control text-field" name="'+d((o=t&&t.name,typeof o===u?o.apply(t):o))+'" placeholder="'+d((o=t&&t.placeholder,typeof o===u?o.apply(t):o))+'" data-rating-key="'+d((o=t&&t.ratingKey,typeof o===u?o.apply(t):o))+'" data-title="'+d((o=t&&t.title,typeof o===u?o.apply(t):o))+'" ',o=r.if.call(t,t&&t.scopeToAttr,{hash:{},
inverse:c.noop,fn:c.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+="> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <h4 class="server-connect-error-header">'+p(n(2).call(e,"Problem Connecting to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+p(n(2).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 r,a="";return r=n(23).call(e,e&&e.mappingError,"myplexgone",{
hash:{},inverse:h.program(6,u,t),fn:h.program(4,l,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function l(e,t){var r="";return r+=' <h4 class="server-connect-error-header">'+p(n(2).call(e,"Problem Connecting to Plex",{hash:{},data:t}))+'</h4> <p class="text-muted">'+p(n(2).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 r="";return r+=' <h4 class="server-connect-error-header">'+p(n(2).call(e,"Signed in to Plex",{
hash:{},data:t}))+'</h4> <p class="text-muted">'+p(n(2).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 d(e,t){var r="";return r+=' <p class="text-muted">'+p(n(2).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"],r=this.merge(r,e.helpers),
i=i||{};var c,f="",p=this.escapeExpression,h=this;return c=n(23).call(t,t&&t.mappingError,"badauth",{hash:{},inverse:h.program(3,o,i),fn:h.program(1,s,i),data:i}),(c||0===c)&&(f+=c),f+=" ",c=n(77).call(t,t&&t.context,"settings",{hash:{},inverse:h.noop,fn:h.program(8,d,i),data:i}),(c||0===c)&&(f+=c),f+=' <p class="text-muted">'+p(n(2).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:i}))+"</p> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"locked"}function o(e,t){return"disabled"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d="function",c=this.escapeExpression,f=this;return u+='<div class="form-group"> <label for="lockable-'+c((l=t&&t.name,typeof l===d?l.apply(t):l))+'">'+c(n(2).call(t,t&&t.label,{hash:{},data:i}))+'</label> <div class="input-group"> <a href="#" data-field="'+c((l=t&&t.name,
typeof l===d?l.apply(t):l))+'" class="input-group-addon edit-lock-addon ',l=r.if.call(t,t&&t.locked,{hash:{},inverse:f.noop,fn:f.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=" ",l=r.if.call(t,t&&t.disabled,{hash:{},inverse:f.noop,fn:f.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+='" tabindex="-1"><i class="glyphicon lock"></i></a> <input type="number" id="lockable-'+c((l=t&&t.name,typeof l===d?l.apply(t):l))+'" class="form-control lockable-field" name="'+c((l=t&&t.name,typeof l===d?l.apply(t):l))+'" value="'+c((l=t&&t.value,
typeof l===d?l.apply(t):l))+'" placeholder="'+c((l=t&&t.placeholder,typeof l===d?l.apply(t):l))+'" ',l=r.if.call(t,t&&t.disabled,{hash:{},inverse:f.noop,fn:f.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+="> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return" locked"}function o(e,t){var n,r="";return r+='data-query="'+c((n=e&&e.query,typeof n===d?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};
var l,u="",d="function",c=this.escapeExpression,f=this;return u+='<div class="form-group"> <label for="lockable-'+c((l=t&&t.name,typeof l===d?l.apply(t):l))+'">'+c(n(2).call(t,t&&t.label,{hash:{},data:i}))+'</label> <div class="input-group selectize-group"> <a href="#" data-field="'+c((l=t&&t.name,typeof l===d?l.apply(t):l))+'" class="input-group-addon edit-lock-addon',l=r.if.call(t,t&&t.locked,{hash:{},inverse:f.noop,fn:f.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+='"><i class="glyphicon lock"></i></a> <input type="text" id="lockable-'+c((l=t&&t.name,
typeof l===d?l.apply(t):l))+'" class="form-control lockable-field tag-input-hidden" data-name="'+c((l=t&&t.name,typeof l===d?l.apply(t):l))+'" data-attr="'+c((l=t&&t.attribute,typeof l===d?l.apply(t):l))+'" ',l=r.if.call(t,t&&t.query,{hash:{},inverse:f.noop,fn:f.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+="> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return" locked"}function o(e,t){var n,a="";return a+=' <textarea class="form-control lockable-field" id="lockable-'+v((n=e&&e.name,
typeof n===h?n.apply(e):n))+'" name="'+v((n=e&&e.name,typeof n===h?n.apply(e):n))+'"',n=r.if.call(e,e&&e.rows,{hash:{},inverse:g.noop,fn:g.program(4,l,t),data:t}),(n||0===n)&&(a+=n),a+=' placeholder="'+v((n=e&&e.placeholder,typeof n===h?n.apply(e):n))+'">'+v((n=e&&e.value,typeof n===h?n.apply(e):n))+"</textarea> "}function l(e,t){var n,r="";return r+=' rows="'+v((n=e&&e.rows,typeof n===h?n.apply(e):n))+'"'}function u(e,t){var n,a="";return a+=' <input type="text" id="lockable-'+v((n=e&&e.name,typeof n===h?n.apply(e):n))+'" class="form-control lockable-field" name="'+v((n=e&&e.name,
typeof n===h?n.apply(e):n))+'" value="'+v((n=e&&e.value,typeof n===h?n.apply(e):n))+'" placeholder="'+v((n=e&&e.placeholder,typeof n===h?n.apply(e):n))+'" ',n=r.if.call(e,e&&e.scopeToAttr,{hash:{},inverse:g.noop,fn:g.program(7,d,t),data:t}),(n||0===n)&&(a+=n),a+=" ",n=r.if.call(e,e&&e.ratingKey,{hash:{},inverse:g.noop,fn:g.program(9,c,t),data:t}),(n||0===n)&&(a+=n),a+="> "}function d(e,t){var n,r="";return r+='data-scope-to-attr="'+v((n=e&&e.scopeToAttr,typeof n===h?n.apply(e):n))+'" data-scope-to-param="'+v((n=e&&e.scopeToParam,
typeof n===h?n.apply(e):n))+'"'}function c(e,t){var n,r="";return r+='data-rating-key="'+v((n=e&&e.ratingKey,typeof n===h?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var f,p="",h="function",v=this.escapeExpression,g=this;return p+='<div class="form-group selectize-group" data-attr="'+v((f=t&&t.name,typeof f===h?f.apply(t):f))+'"> <label for="lockable-'+v((f=t&&t.name,typeof f===h?f.apply(t):f))+'">'+v(n(2).call(t,t&&t.label,{hash:{},data:i}))+'</label> <div class="input-group"> <a href="#" data-field="'+v((f=t&&t.name,
typeof f===h?f.apply(t):f))+'" class="input-group-addon edit-lock-addon',f=r.if.call(t,t&&t.locked,{hash:{},inverse:g.noop,fn:g.program(1,s,i),data:i}),(f||0===f)&&(p+=f),p+='" tabindex="-1"><i class="glyphicon lock"></i></a> ',f=n(23).call(t,t&&t.type,"textarea",{hash:{},inverse:g.program(6,u,i),fn:g.program(3,o,i),data:i}),(f||0===f)&&(p+=f),p+=" </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"advanced-setting"}function o(e,t){
var a,i="";return i+=' <label class="control-label" for="input_'+P((a=e&&e.id,typeof a===w?a.apply(e):a))+P((a=e&&e.idSuffix,typeof a===w?a.apply(e):a))+'"> <input type="checkbox" id="input_'+P((a=e&&e.id,typeof a===w?a.apply(e):a))+P((a=e&&e.idSuffix,typeof a===w?a.apply(e):a))+'" name="'+P((a=e&&e.id,typeof a===w?a.apply(e):a))+'" value="1" ',a=r.if.call(e,e&&e.value,{hash:{},inverse:S.noop,fn:S.program(4,l,t),data:t}),(a||0===a)&&(i+=a),i+="> "+P(n(2).call(e,e&&e.label,{hash:{},data:t}))+" </label> ",
a=r.if.call(e,e&&e.summary,{hash:{},inverse:S.noop,fn:S.program(6,u,t),data:t}),(a||0===a)&&(i+=a),i+=" "}function l(e,t){return"checked"}function u(e,t){var r="";return r+=' <p class="help-block">'+P(n(2).call(e,e&&e.summary,{hash:{},data:t}))+"</p> "}function d(e,t){var a,i="";return i+=' <label class="control-label" for="input_'+P((a=e&&e.id,typeof a===w?a.apply(e):a))+P((a=e&&e.idSuffix,typeof a===w?a.apply(e):a))+'">'+P(n(2).call(e,e&&e.label,{hash:{},data:t}))+"</label> ",a=r.if.call(e,e&&e.enumValues,{
hash:{},inverse:S.program(13,h,t),fn:S.program(9,c,t),data:t}),(a||0===a)&&(i+=a),i+=" ",a=r.if.call(e,e&&e.summary,{hash:{},inverse:S.noop,fn:S.program(6,u,t),data:t}),(a||0===a)&&(i+=a),i+=" "}function c(e,t){var n,a="";return a+=' <select id="input_'+P((n=e&&e.id,typeof n===w?n.apply(e):n))+P((n=e&&e.idSuffix,typeof n===w?n.apply(e):n))+'" name="'+P((n=e&&e.id,typeof n===w?n.apply(e):n))+'"> ',n=r.each.call(e,e&&e.enumValues,{hash:{},inverse:S.noop,fn:S.programWithDepth(10,f,t,e),data:t}),(n||0===n)&&(a+=n),
a+=" </select> "}function f(e,t,r){var a,i="";return i+=' <option value="'+P((a=e&&e.value,typeof a===w?a.apply(e):a))+'" ',a=n(23).call(e,e&&e.value,r&&r.value,{hash:{},inverse:S.noop,fn:S.program(11,p,t),data:t}),(a||0===a)&&(i+=a),i+=">"+P(n(2).call(e,e&&e.label,{hash:{},data:t}))+"</option> "}function p(e,t){return'selected="selected"'}function h(e,t){var a,i="";return i+=' <input type="',a=n(23).call(e,e&&e.option,"hidden",{hash:{},inverse:S.program(16,g,t),fn:S.program(14,v,t),data:t}),(a||0===a)&&(i+=a),
i+='" id="input_'+P((a=e&&e.id,typeof a===w?a.apply(e):a))+P((a=e&&e.idSuffix,typeof a===w?a.apply(e):a))+'" class="form-control" name="'+P((a=e&&e.id,typeof a===w?a.apply(e):a))+'" value="'+P((a=e&&e.value,typeof a===w?a.apply(e):a))+'" ',a=r.if.call(e,e&&e.placeholder,{hash:{},inverse:S.noop,fn:S.program(18,m,t),data:t}),(a||0===a)&&(i+=a),i+="> "}function v(e,t){return"password"}function g(e,t){return"text"}function m(e,t){var n,r="";return r+='placeholder="'+P((n=e&&e.placeholder,typeof n===w?n.apply(e):n))+'"';
}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var y,b="",P=this.escapeExpression,w="function",S=this;return b+='<div class="form-group ',y=r.if.call(t,t&&t.advanced,{hash:{},inverse:S.noop,fn:S.program(1,s,i),data:i}),(y||0===y)&&(b+=y),b+='"> ',y=n(23).call(t,t&&t.type,"bool",{hash:{},inverse:S.program(8,d,i),fn:S.program(3,o,i),data:i}),(y||0===y)&&(b+=y),b+=" </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,a="";
return a+=' <textarea class="form-control text-field" id="text-'+p((n=e&&e.name,typeof n===f?n.apply(e):n))+'" name="'+p((n=e&&e.name,typeof n===f?n.apply(e):n))+'"',n=r.if.call(e,e&&e.rows,{hash:{},inverse:h.noop,fn:h.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+=' placeholder="'+p((n=e&&e.placeholder,typeof n===f?n.apply(e):n))+'">'+p((n=e&&e.value,typeof n===f?n.apply(e):n))+"</textarea> "}function o(e,t){var n,r="";return r+=' rows="'+p((n=e&&e.rows,typeof n===f?n.apply(e):n))+'"'}function l(e,t){
var n,a="";return a+=' <input type="text" id="text-'+p((n=e&&e.name,typeof n===f?n.apply(e):n))+'" class="form-control text-field" name="'+p((n=e&&e.name,typeof n===f?n.apply(e):n))+'" value="'+p((n=e&&e.value,typeof n===f?n.apply(e):n))+'" placeholder="'+p((n=e&&e.placeholder,typeof n===f?n.apply(e):n))+'" ',n=r.if.call(e,e&&e.excludeParam,{hash:{},inverse:h.noop,fn:h.program(5,u,t),data:t}),(n||0===n)&&(a+=n),a+="> "}function u(e,t){var n,r="";return r+='data-exclude-param="'+p((n=e&&e.excludeParam,
typeof n===f?n.apply(e):n))+'" data-exclude-value="'+p((n=e&&e.excludeValue,typeof n===f?n.apply(e):n))+'"'}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var d,c="",f="function",p=this.escapeExpression,h=this;return c+='<div class="form-group"> <label for="text-'+p((d=t&&t.name,typeof d===f?d.apply(t):d))+'">'+p(n(2).call(t,t&&t.label,{hash:{},data:i}))+"</label> ",d=n(23).call(t,t&&t.type,"textarea",{hash:{},inverse:h.program(4,l,i),fn:h.program(1,s,i),data:i}),(d||0===d)&&(c+=d),
c+=" </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="mini-controls"> <div class="loading loading-inline"></div> </div> '})},2257,2257,function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){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"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this,c=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=r.if.call(t,t&&t.isVideo,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(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=r.unless.call(t,(l=t&&t.player,null==l||l===!1?l:l.slideshowPaused),{hash:{},inverse:d.noop,fn:d.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+=" ",l=r.unless.call(t,(l=t&&t.player,null==l||l===!1?l:l.canPlayPause),{hash:{},inverse:d.noop,fn:d.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+='"><i class="glyphicon play"></i></button> <button class="pause-btn media-action-btn btn-link ',l=r.if.call(t,(l=t&&t.player,null==l||l===!1?l:l.slideshowPaused),{hash:{},inverse:d.noop,fn:d.program(3,o,i),data:i
}),(l||0===l)&&(u+=l),u+=" ",l=r.unless.call(t,(l=t&&t.player,null==l||l===!1?l:l.canPlayPause),{hash:{},inverse:d.noop,fn:d.program(3,o,i),data:i}),(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">'+c(n(2).call(t,"{1} of {2}",t&&t.index,t&&t.total,{
hash:{},data:i}))+'</span> <div class="photo-summary"></div> </div> </div> </div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Previous",{hash:{},data:i}))+'</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(2).call(t,"Playing Next",{hash:{},data:i}))+'</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> "})},2257,function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),a=a||{},'<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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="player-slider-track"> <div class="player-slider-progress"></div> </div> <div class="player-slider-thumb"></div> ';
})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
a=a||{},'<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 r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(e,t){var r,a="";return a+=' <button class="btn-link dropdown-toggle ',r=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.noop,fn:f.program(2,s,t),data:t}),(r||0===r)&&(a+=r),a+='" href="#player-primary-player-dropdown" data-toggle="dropdown"> <i class="',r=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.program(6,l,t),fn:f.program(4,o,t),data:t}),(r||0===r)&&(a+=r),a+='"></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 r,a="";return a+=' <button class="btn-link cast-btn ',r=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.noop,fn:f.program(2,s,t),data:t}),(r||0===r)&&(a+=r),a+="\" href='#'> <i class=\"",r=n.if.call(e,e&&e.primaryPlayer,{hash:{},inverse:f.program(6,l,t),fn:f.program(4,o,t),data:t}),(r||0===r)&&(a+=r),a+='"></i> </button> '}this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),
a=a||{};var d,c="",f=this;return d=n.if.call(t,t&&t.showDropdown,{hash:{},inverse:f.program(8,u,a),fn:f.program(1,i,a),data:a}),(d||0===d)&&(c+=d),c+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var a,i="";return i+=' <li> <a class="',a=r.unless.call(e,e&&e.hasSelectedQuality,{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+='" data-index="-1" href="#"> '+f(n(2).call(e,"Original",{hash:{},data:t}))+' <i class="player-dropdown-selected-icon selected-icon glyphicon ok-2"></i> </a> </li> ';
}function o(e,t){return"selected"}function l(e,t){var a,i="";return i+=' <li> <a class="',a=r.if.call(e,e&&e.selected,{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+='" data-index="'+f((a=e&&e.index,typeof a===p?a.apply(e):a))+'" href="#"> '+f(n(139).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"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c=this,f=this.escapeExpression,p="function";
return d+='<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"> ',u=r.if.call(t,t&&t.includeOriginal,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+=" ",u=r.each.call(t,t&&t.availableQualities,{hash:{},inverse:c.noop,fn:c.program(4,l,i),data:i}),(u||0===u)&&(d+=u),d+=" </ul> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
function s(e,t){return"plex-icon-audio"}function o(e,t){return"plex-icon-subtitles-alt"}function l(e,t,a){var i,s="";return s+=' <li><a class="',i=r.if.call(e,e&&e.selected,{hash:{},inverse:w.noop,fn:w.program(6,u,t),data:t}),(i||0===i)&&(s+=i),s+='" data-id="'+P((i=e&&e.id,typeof i===b?i.apply(e):i))+'" href="#">',i=r.if.call(e,e&&e.language,{hash:{},inverse:w.program(10,c,t),fn:w.program(8,d,t),data:t}),(i||0===i)&&(s+=i),i=n(23).call(e,a&&a.type,"subtitles",{hash:{},inverse:w.noop,fn:w.program(12,f,t),
data:t}),(i||0===i)&&(s+=i),i=n(23).call(e,a&&a.type,"audio",{hash:{},inverse:w.noop,fn:w.program(16,v,t),data:t}),(i||0===i)&&(s+=i),s+=' <i class="player-dropdown-selected-icon dropdown-selected-icon glyphicon ok-2"></i></a></li> '}function u(e,t){return"selected"}function d(e,t){var n;return P((n=e&&e.language,typeof n===b?n.apply(e):n))}function c(e,t){return P(n(2).call(e,"Unknown",{hash:{},data:t}))}function f(e,t){var n;return n=r.if.call(e,e&&e.format,{hash:{},inverse:w.noop,fn:w.program(13,p,t),
data:t}),n||0===n?n:""}function p(e,t){var a,i="";return i+=" ("+P(n(1092).call(e,e&&e.format,{hash:{},data:t})),a=r.if.call(e,e&&e.forced,{hash:{},inverse:w.noop,fn:w.program(14,h,t),data:t}),(a||0===a)&&(i+=a),i+=")"}function h(e,t){var r="";return r+=" "+P(n(2).call(e,"Forced",{hash:{},data:t}))}function v(e,t){var n;return n=r.if.call(e,e&&e.codec,{hash:{},inverse:w.noop,fn:w.program(17,g,t),data:t}),n||0===n?n:""}function g(e,t){var r="";return r+=" ("+P(n(1091).call(e,e&&e.codec,{hash:{},data:t
}))+" "+P(n(1090).call(e,e&&e.channels,{hash:{},data:t}))+")"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var m,y="",b="function",P=this.escapeExpression,w=this;return y+='<button class="btn-link dropdown-toggle" href="#player-'+P((m=t&&t.type,typeof m===b?m.apply(t):m))+'-dropdown" data-toggle="dropdown"> <i class="',m=n(23).call(t,t&&t.type,"audio",{hash:{},inverse:w.program(3,o,i),fn:w.program(1,s,i),data:i}),(m||0===m)&&(y+=m),y+='"></i> </button> <ul class="dropdown-menu pull-right"> ',
m=r.each.call(t,t&&t.streams,{hash:{},inverse:w.noop,fn:w.programWithDepth(5,l,i,t),data:i}),(m||0===m)&&(y+=m),y+=" </ul> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){function i(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),a=a||{};var s,o,l="",u="function",d=this.escapeExpression,c=this;return l+='<a class="media-poster-container" href="',
(o=n.url)?s=o.call(t,{hash:{},data:a}):(o=t&&t.url,s=typeof o===u?o.call(t,{hash:{},data:a}):o),l+=d(s)+'"> <div class="media-poster"> <div class="media-poster-overlay"></div> ',s=n.if.call(t,t&&t.smart,{hash:{},inverse:c.noop,fn:c.program(1,i,a),data:a}),(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> ';
})},2257,function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=" "+u(n(2).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"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this.escapeExpression,d=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(2).call(t,"The library has no content yet.",{
hash:{},data:i}))+" ",o=r.if.call(t,t&&t.canEdit,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+=' </span> <span class="empty-refreshing"> '+u(n(2).call(t,"The library is still being refreshed. Hang on while we look for your content.",{hash:{},data:i}))+' </span> <span class="empty-filter"> '+u(n(2).call(t,"There is no content matching your active filter.",{hash:{},data:i}))+' </span> <span class="empty-folder"> '+u(n(2).call(t,"There is no content in the selected folder.",{
hash:{},data:i}))+" </span> </h4> "})},2257,function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Scanner",{
hash:{},data:i}))+' <span class="control-error">'+u(n(2).call(t,"A scanner is required.",{hash:{},data:i}))+'</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(2).call(t,"Agent",{hash:{},data:i}))+' <span class="control-error">'+u(n(2).call(t,"An agent is required.",{hash:{},data:i}))+'</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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<form class="edit-section-folders-form settings-container"> <label> '+o(n(2).call(t,"Add folders to your library",{hash:{},data:i}))+' </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(2).call(t,"Browse for media folder",{
hash:{},data:i}))+'</button> </p> <p class="control-error">'+o(n(2).call(t,"At least one folder is required.",{hash:{},data:i}))+'</p> </div> <p class="help-block">'+o(n(2).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:i}))+"</p> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){this.compilerInfo=[4,">= 1.0.0"],
n=this.merge(n,e.helpers),a=a||{};var i,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)?i=s.call(t,{hash:{},data:a}):(s=t&&t.path,i=typeof s===l?s.call(t,{hash:{},data:a}):s),o+=u(i)+'"> <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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
function s(e,t){var r="";return r+=' <p class="help-block"> '+d(n(2).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"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c=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"> '+d(n(2).call(t,"Create a premium Plex music library!",{
hash:{},data:i}))+' </span> </div> </div> <div class="row use-premium-agent-body"> <div class="col-xs-8"> <ul> <li>'+d(n(2).call(t,"Access to the best artwork, artist bios, album reviews, and more",{hash:{},data:i}))+"</li> <li>"+d(n(2).call(t,"Smart mixes based on track or mood",{hash:{},data:i}))+"</li> <li>"+d(n(2).call(t,"Improved music recognition and matching",{hash:{},data:i}))+"</li> </ul> ",l=r.unless.call(t,t&&t.hasPremiumMusic,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(l||0===l)&&(u+=l),
u+=' </div> <div class="col-xs-4 vendor-logos"> ',l=r.if.call(t,t&&t.hasLyrics,{hash:{},inverse:c.noop,fn:c.program(3,o,i),data:i}),(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"> '+d(n(2).call(t,"Create a basic music library",{hash:{},data:i}))+" </div> </div> </div> ";
})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var a,i="";return i+=' <div class="form-group"> <label class="control-label" for="input_importFromItunes_c"> <input type="checkbox" id="input_importFromItunes_c" name="importFromiTunes" value="1" ',a=r.if.call(e,e&&e.value,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+="> "+h(n(2).call(e,"Import from iTunes",{hash:{},data:t}))+' </label> <p class="help-block">'+h(n(2).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,a){var i,s="";return s+=" "+h(n(29).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" ",i=r.if.call(e,a&&a.edit,{hash:{},inverse:p.noop,fn:p.program(5,u,t),data:t}),(i||0===i)&&(s+=i),s+=" "}function u(e,t){var r,a="";return a+=" ",r=n(23).call(e,e&&e.id,"enableBIFGeneration",{hash:{},inverse:p.noop,fn:p.program(6,d,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function d(e,t){var r="";return r+=' <div class="form-group"> <button type="button" class="delete-thumbnails-btn btn btn-sm btn-danger">'+h(n(2).call(e,"Delete Preview Thumbnails",{
hash:{},data:t}))+"</button> </div> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var c,f="",p=this,h=this.escapeExpression;return c=r.if.call(t,t&&t.isNewMusicSection,{hash:{},inverse:p.noop,fn:p.program(1,s,i),data:i}),(c||0===c)&&(f+=c),f+=" ",c=r.each.call(t,t&&t.settings,{hash:{},inverse:p.noop,fn:p.programWithDepth(4,l,i,t),data:i}),(c||0===c)&&(f+=c),f+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"section-type-chosen";
}function o(e,t){var r="";return r+=' <p class="prompt">'+m(n(2).call(e,"Select your library type",{hash:{},data:t}))+"</p> "}function l(e,t){var r="";return r+=" <label>"+m(n(2).call(e,"Library type",{hash:{},data:t}))+"</label> "}function u(e,t,a){var i,s="";return s+=' <a class="wizard-block section-type ',i=r.if.call(e,a&&a.canChangeType,{hash:{},inverse:y.noop,fn:y.program(8,d,t),data:t}),(i||0===i)&&(s+=i),s+=" ",i=n(23).call(e,a&&a.currentSectionKey,e&&e.key,{hash:{},inverse:y.noop,fn:y.program(10,c,t),
data:t}),(i||0===i)&&(s+=i),s+='" data-key="'+m((i=e&&e.key,typeof i===b?i.apply(e):i))+'" href="#"> <i class="wizard-block-icon '+m((i=e&&e.sectionTypeIcon,typeof i===b?i.apply(e):i))+'"></i> '+m((i=e&&e.title,typeof i===b?i.apply(e):i))+" </a> "}function d(e,t){return"selectable"}function c(e,t){return"selected"}function f(e,t){var r="";return r+=' <div class="row"> <div class="col-xs-12"> <p class="prompt">'+m(n(2).call(e,"Name your library and choose language.",{hash:{},data:t}))+"</p> </div> </div> ";
}function p(e,t){var r="";return r+=" "+m(n(2).call(e,"Last updated {1}",e&&e.updatedAt,{hash:{},data:t}))+" "}function h(e,t){var r="";return r+=" "+m(n(2).call(e,"Each library should only contain one type of media.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var v,g="",m=this.escapeExpression,y=this,b="function";return g+='<form class="edit-section-type-form settings-container ',v=r.if.call(t,(v=t&&t.section,null==v||v===!1?v:v.type),{hash:{},inverse:y.noop,
fn:y.program(1,s,i),data:i}),(v||0===v)&&(g+=v),g+='"> ',v=r.if.call(t,t&&t.add,{hash:{},inverse:y.program(5,l,i),fn:y.program(3,o,i),data:i}),(v||0===v)&&(g+=v),g+=' <div class="wizard-blocks-group form-group type-group"> ',v=r.each.call(t,t&&t.sectionTypes,{hash:{},inverse:y.noop,fn:y.programWithDepth(7,u,i,t),data:i}),(v||0===v)&&(g+=v),g+=' <label class="control-label"> <span class="control-error">'+m(n(2).call(t,"You must select a media type.",{hash:{},data:i}))+'</span> </label> </div> <div class="visible-once-section-type-chosen"> ',
v=r.if.call(t,t&&t.hasType,{hash:{},inverse:y.noop,fn:y.program(12,f,i),data:i}),(v||0===v)&&(g+=v),g+=' <div class="row"> <div class="col-md-7"> <div class="form-group title-group"> <div> <label for="edit-section-title" class="control-label"> '+m(n(2).call(t,"Name",{hash:{},data:i}))+' <span class="control-error">'+m(n(2).call(t,"A library name is required.",{hash:{},data:i}))+'</span> </label> </div> <input type="text" id="edit-section-title" name="title" class="form-control" value="'+m((v=t&&t.section,
v=null==v||v===!1?v:v.title,typeof v===b?v.apply(t):v))+'"> </div> </div> <div class="col-md-5"> <div class="form-group language-group"> <div> <label for="edit-section-language" class="control-label"> '+m(n(2).call(t,"Language",{hash:{},data:i}))+' <span class="control-error">'+m(n(2).call(t,"A language is required.",{hash:{},data:i}))+'</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"> ',
v=r.if.call(t,t&&t.updatedAt,{hash:{},inverse:y.program(16,h,i),fn:y.program(14,p,i),data:i}),(v||0===v)&&(g+=v),g+=" </span> </div> </div> </div> </form> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,a="";return a+=' <option value="'+p((n=e&&e.value,typeof n===f?n.apply(e):n))+'" ',n=r.if.call(e,e&&e.selected,{hash:{},inverse:h.noop,fn:h.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+=">"+p((n=e&&e.label,typeof n===f?n.apply(e):n))+"</option> ";
}function o(e,t){return"selected"}function l(e,t){var r="";return r+=' <option value="">'+p(n(2).call(e,"Loading...",{hash:{},data:t}))+"</option> "}function u(e,t){var n,r="";return r+=' <option value="'+p((n=e&&e.value,typeof n===f?n.apply(e):n))+'">'+p((n=e&&e.label,typeof n===f?n.apply(e):n))+"</option> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var d,c="",f="function",p=this.escapeExpression,h=this;return c+='<div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-title">'+p(n(2).call(t,"Title",{
hash:{},data:i}))+'</label> <input type="text" id="match-search-title" name="title" class="form-control" value="'+p((d=t&&t.item,d=null==d||d===!1?d:d.title,typeof d===f?d.apply(t):d))+'"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-agent">'+p(n(2).call(t,"Agent",{hash:{},data:i}))+'</label> <select id="match-search-agent" name="agent"> ',d=r.each.call(t,t&&t.agents,{hash:{},inverse:h.program(4,l,i),fn:h.program(1,s,i),data:i}),(d||0===d)&&(c+=d),
c+=' </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(2).call(t,"Year",{hash:{},data:i}))+'</label> <input type="text" id="match-search-year" name="year" class="form-control" value="'+p((d=t&&t.item,d=null==d||d===!1?d:d.year,typeof d===f?d.apply(t):d))+'"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label" for="match-search-language">'+p(n(2).call(t,"Language",{
hash:{},data:i}))+'</label> <select id="match-search-language" name="language"> ',d=r.each.call(t,t&&t.languages,{hash:{},inverse:h.program(4,l,i),fn:h.program(6,u,i),data:i}),(d||0===d)&&(c+=d),c+=" </select> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,n,r,a){return this.compilerInfo=[4,">= 1.0.0"],n=this.merge(n,e.helpers),a=a||{},'<div class="result-region"> <div class="loading loading-inline"></div> </div> '})},function(e,t,n){var r=n(6);
e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,a="";return a+=" ",n=r.if.call(e,e&&e.title,{hash:{},inverse:c.noop,fn:c.program(2,o,t),data:t}),(n||0===n)&&(a+=n),a+=" "}function o(e,t){var r,a="";return a+=' <li> <a class="card btn-gray ',r=n(23).call(e,e&&e.id,"all",{hash:{},inverse:c.noop,fn:c.program(3,l,t),data:t}),(r||0===r)&&(a+=r),a+='" data-id="'+p((r=e&&e.id,typeof r===f?r.apply(e):r))+'" href="#">'+p(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</a> </li> "}function l(e,t){
return"selected"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c=this,f="function",p=this.escapeExpression;return d+='<div class="col-sm-4 col-md-3"> <ul class="nav nav-cards"> ',u=r.each.call(t,t&&t.deviceTypes,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+=' </ul> </div> <div class="device-list-container col-sm-8 col-md-9"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<h3 class="invite-list-header top">'+o(n(2).call(t,"Invites",{hash:{},data:i}))+'</h3> <div class="invite-list-container"></div> <h3 class="friend-list-header">'+o(n(2).call(t,"Friends",{hash:{},data:i}))+'</h3> <div class="friend-list-container"></div> <h3 class="pending-list-header">'+o(n(2).call(t,"Pending",{hash:{},data:i}))+'</h3> <div class="pending-list-container"></div> </div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<h3 class="invite-list-header top">'+o(n(2).call(t,"Invites",{hash:{},data:i}))+'</h3> <div class="invite-list-container"></div> <h3 class="friend-list-header">'+o(n(2).call(t,"My Home",{hash:{},data:i}))+'</h3> <div class="friend-list-container"></div> <h3 class="pending-list-header">'+o(n(2).call(t,"Pending",{hash:{},data:i}))+'</h3> <div class="pending-list-container"></div> </div> '});
},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"selected"}function o(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this,c=this.escapeExpression;return u+='<ul class="nav nav-header pull-right"> <li class="web-nav-item"><a class="web-btn btn-gray ',l=n(23).call(t,t&&t.subset,"web",{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+='" href="#!/settings/web">'+c(n(2).call(t,"Web",{
hash:{},data:i}))+'</a></li> <li class="server-nav-item ',l=r.unless.call(t,t&&t.hasPrimaryServer,{hash:{},inverse:d.noop,fn:d.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+='"><a class="server-btn btn-gray ',l=n(23).call(t,t&&t.subset,"server",{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+='" href="#!/settings/server">'+c(n(2).call(t,"Server",{hash:{},data:i}))+'</a></li> <li class="users-nav-item ',l=r.unless.call(t,t&&t.signedIn,{hash:{},inverse:d.noop,fn:d.program(3,o,i),
data:i}),(l||0===l)&&(u+=l),u+='"><a class="users-btn btn-gray ',l=n(23).call(t,t&&t.subset,"users",{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+='" href="#!/settings/users">'+c(n(2).call(t,"Users",{hash:{},data:i}))+'<span class="badge"></span></a></li> <li class="devices-nav-item ',l=r.unless.call(t,t&&t.signedIn,{hash:{},inverse:d.noop,fn:d.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+='"><a class="devices-btn btn-gray ',l=n(23).call(t,t&&t.subset,"devices",{hash:{},
inverse:d.noop,fn:d.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+='" href="#!/settings/devices">'+c(n(2).call(t,"Devices",{hash:{},data:i}))+"</a></li> </ul> <h2>"+c(n(2).call(t,"Settings",{hash:{},data:i}))+'</h2> <div class="settings-container"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"hidden"}function o(e,t){return"selected"}function l(e,t){var r,a="";return a+=' <li> <a class="friends-card card btn-gray ',r=n(23).call(e,e&&e.subset,"friends",{
hash:{},inverse:c.noop,fn:c.program(3,o,t),data:t}),(r||0===r)&&(a+=r),a+='" href="#!/settings/users/friends"> <span class="badge"></span> '+f(n(2).call(e,"Friends",{hash:{},data:t}))+" </a> </li> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c=this,f=this.escapeExpression;return d+='<div class="filter-bar"> <div class="filter-bar-right"> <span class="user-actions ',u=r.unless.call(t,t&&t.showUserActions,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(u||0===u)&&(d+=u),
d+='"> <button class="add-user-btn btn btn-sm btn-default">'+f(n(2).call(t,"Add User",{hash:{},data:i}))+'</button> <button class="enable-guest-btn btn btn-sm btn-default ',u=r.unless.call(t,t&&t.showEnableGuest,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+='">'+f(n(2).call(t,"Enable Guest",{hash:{},data:i}))+'</button> <button class="disable-guest-btn btn btn-sm btn-danger ',u=r.unless.call(t,t&&t.showDisableGuest,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),
(u||0===u)&&(d+=u),d+='">'+f(n(2).call(t,"Disable Guest",{hash:{},data:i}))+'</button> </span> <button class="leave-home-btn btn btn-sm btn-danger ',u=r.unless.call(t,t&&t.showLeaveHome,{hash:{},inverse:c.noop,fn:c.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+='">'+f(n(2).call(t,"Leave Home",{hash:{},data:i}))+'</button> <button class="invite-friend-btn btn btn-sm btn-default">'+f(n(2).call(t,"Invite Friend",{hash:{},data:i}))+'</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(23).call(t,t&&t.subset,"home",{hash:{},inverse:c.noop,fn:c.program(3,o,i),data:i}),(u||0===u)&&(d+=u),d+='" href="#!/settings/users/home"> <span class="badge"></span> '+f(n(2).call(t,"My Home",{hash:{},data:i}))+" </a> </li> ",u=r.if.call(t,t&&t.showFriends,{hash:{},inverse:c.noop,fn:c.program(5,l,i),data:i}),(u||0===u)&&(d+=u),d+=" </ul> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t,r){var a,i="";return i+=' <option value="'+M((a=e&&e.value,
typeof a===I?a.apply(e):a))+'" ',a=n(23).call(e,e&&e.value,(a=r&&r.settings,null==a||a===!1?a:a.language),{hash:{},inverse:C.noop,fn:C.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+="> "+M((a=e&&e.title,typeof a===I?a.apply(e):a))+" </option> "}function o(e,t){return"selected"}function l(e,t){var a,i="";return i+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="autoLogin" ',a=r.if.call(e,(a=e&&e.settings,null==a||a===!1?a:a.autoLogin),{hash:{},inverse:C.noop,fn:C.program(5,u,t),
data:t}),(a||0===a)&&(i+=a),i+="> "+M(n(2).call(e,"Automatically Sign In",{hash:{},data:t}))+' </label> <p class="help-block">'+M(n(2).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 d(e,t,r){var a,i="";return i+=' <option value="'+M((a=e&&e.value,typeof a===I?a.apply(e):a))+'" ',a=n(23).call(e,e&&e.value,(a=r&&r.settings,null==a||a===!1?a:a.allowHttpFallback),{hash:{},inverse:C.noop,fn:C.program(2,o,t),
data:t}),(a||0===a)&&(i+=a),i+=">"+M(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function c(e,t,r){var a,i="";return i+=' <option value="'+M((a=e&&e.value,typeof a===I?a.apply(e):a))+'" ',a=n(23).call(e,e&&e.value,(a=r&&r.settings,null==a||a===!1?a:a.debugLevel),{hash:{},inverse:C.noop,fn:C.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+=">"+M(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function f(e,t){var a,i="";return i+=' <div class="form-group"> <label for="chromecastAppID">Chromecast Receiver</label> <select id="chromecastAppID"> ',
a=r.each.call(e,e&&e.chromecastAppIDs,{hash:{},inverse:C.noop,fn:C.programWithDepth(12,p,t,e),data:t}),(a||0===a)&&(i+=a),i+=' </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 ',a=n(77).call(e,(a=e&&e.settings,null==a||a===!1?a:a.chromecastAppID),"custom",{hash:{},inverse:C.noop,fn:C.program(14,h,t),data:t}),(a||0===a)&&(i+=a),i+='"> <label for="chromecastCustomAppID">Custom Chromecast Application ID</label> <input type="text" id="chromecastCustomAppID" class="form-control" placeholder="Application ID" value="'+M((a=e&&e.settings,
a=null==a||a===!1?a:a.chromecastCustomAppID,typeof a===I?a.apply(e):a))+'"> <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="'+M((a=e&&e.settings,a=null==a||a===!1?a:a.myPlexScheme,typeof a===I?a.apply(e):a))+'"> </div> <div class="form-group"> <label for="myPlexUrl">Plex.tv Address</label> <input type="text" id="myPlexUrl" class="form-control" placeholder="plex.tv" value="'+M((a=e&&e.settings,
a=null==a||a===!1?a:a.myPlexUrl,typeof a===I?a.apply(e):a))+'"> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="rejectDirectConnections" ',a=r.if.call(e,(a=e&&e.settings,null==a||a===!1?a:a.rejectDirectConnections),{hash:{},inverse:C.noop,fn:C.program(5,u,t),data:t}),(a||0===a)&&(i+=a),i+='> Reject direct connections </label> <p class="help-block">Forces relayed connections if available. Refresh after saving this setting for it to take effect.</p> </div> ';
}function p(e,t,r){var a,i="";return i+=' <option value="'+M((a=e&&e.value,typeof a===I?a.apply(e):a))+'" ',a=n(23).call(e,e&&e.value,(a=r&&r.settings,null==a||a===!1?a:a.chromecastAppID),{hash:{},inverse:C.noop,fn:C.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+=">"+M(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function h(e,t){return"hidden"}function v(e,t,r){var a,i="";return i+=' <option value="'+M((a=e&&e.index,typeof a===I?a.apply(e):a))+'" ',a=n(23).call(e,e&&e.index,(a=r&&r.settings,
null==a||a===!1?a:a.localQuality),{hash:{},inverse:C.noop,fn:C.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+="> "+M(n(139).call(e,e,{hash:{},data:t}))+" </option> "}function g(e,t,r){var a,i="";return i+=' <option value="'+M((a=e&&e.index,typeof a===I?a.apply(e):a))+'" ',a=n(23).call(e,e&&e.index,(a=r&&r.settings,null==a||a===!1?a:a.remoteQuality),{hash:{},inverse:C.noop,fn:C.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+="> "+M(n(139).call(e,e,{hash:{},data:t}))+" </option> "}function m(e,t,r){var a,i="";
return i+=' <option value="'+M((a=e&&e.index,typeof a===I?a.apply(e):a))+'" ',a=n(23).call(e,e&&e.index,(a=r&&r.settings,null==a||a===!1?a:a.channelQuality),{hash:{},inverse:C.noop,fn:C.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+="> "+M(n(139).call(e,e,{hash:{},data:t}))+" </option> "}function y(e,t){var a,i="";return i+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="dash" ',a=r.if.call(e,(a=e&&e.settings,null==a||a===!1?a:a.dash),{hash:{},inverse:C.noop,fn:C.program(5,u,t),
data:t}),(a||0===a)&&(i+=a),i+="> "+M(n(2).call(e,"HTML5 Player",{hash:{},data:t}))+' </label> <p class="help-block">'+M(n(2).call(e,"Prefer the HTML5 video player over the Flash player.",{hash:{},data:t}))+"</p> </div> "}function b(e,t,r){var a,i="";return i+=' <option value="'+M((a=e&&e.value,typeof a===I?a.apply(e):a))+'" ',a=n(23).call(e,e&&e.value,(a=r&&r.settings,null==a||a===!1?a:a.audioBoost),{hash:{},inverse:C.noop,fn:C.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+=">"+M(n(2).call(e,e&&e.title,{
hash:{},data:t}))+"</option> "}function P(e,t,r){var a,i="";return i+=' <option value="'+M((a=e&&e.value,typeof a===I?a.apply(e):a))+'" ',a=n(23).call(e,e&&e.value,(a=r&&r.settings,null==a||a===!1?a:a.subtitleSize),{hash:{},inverse:C.noop,fn:C.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+=">"+M(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function w(e,t,r){var a,i="";return i+=' <option value="'+M((a=e&&e.value,typeof a===I?a.apply(e):a))+'" ',a=n(23).call(e,e&&e.value,(a=r&&r.settings,
null==a||a===!1?a:a.subtitlesBurnLevel),{hash:{},inverse:C.noop,fn:C.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+=">"+M(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}function S(e,t,r){var a,i="";return i+=' <option value="'+M((a=e&&e.value,typeof a===I?a.apply(e):a))+'" ',a=n(23).call(e,e&&e.value,(a=r&&r.settings,null==a||a===!1?a:a.extrasPrefixCount),{hash:{},inverse:C.noop,fn:C.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+=">"+M(n(2).call(e,e&&e.title,{hash:{},data:t}))+"</option> "}
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var _,T="",I="function",M=this.escapeExpression,C=this;return T+='<div class="filter-bar"> <button class="toggle-advanced-btn btn btn-sm btn-default pull-right basic-setting">'+M(n(2).call(t,"Show Advanced",{hash:{},data:i}))+'</button> <button class="toggle-advanced-btn btn btn-sm btn-default pull-right advanced-setting">'+M(n(2).call(t,"Hide Advanced",{hash:{},data:i}))+'</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">'+M(n(2).call(t,"General",{
hash:{},data:i}))+'</a></li> <li class="advanced-setting"><a class="card btn-gray" href="#debug-web-group">'+M(n(2).call(t,"Debug",{hash:{},data:i}))+'</a></li> <li><a class="card btn-gray" href="#player-web-group">'+M(n(2).call(t,"Player",{hash:{},data:i}))+'</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"> '+M(n(2).call(t,"Version",{hash:{},data:i}))+" "+M((_=t&&t.version,typeof _===I?_.apply(t):_))+' </h4> <div class="form-group"> <label for="language">'+M(n(2).call(t,"Language",{
hash:{},data:i}))+'</label> <select id="language"> ',_=r.each.call(t,t&&t.languages,{hash:{},inverse:C.noop,fn:C.programWithDepth(1,s,i,t),data:i}),(_||0===_)&&(T+=_),T+=' </select> <p class="help-block">'+M(n(2).call(t,"Help us translate this app into your language {1}here{2}.",'<a href="https://transifex.com/plex-1/plex-web" target="_blank">',"</a>",{hash:{},data:i}))+"</p> </div> ",_=r.if.call(t,t&&t.hasHome,{hash:{},inverse:C.noop,fn:C.program(4,l,i),data:i}),(_||0===_)&&(T+=_),T+=' <div class="form-group"> <label class="control-label"> <input type="checkbox" id="playThemeMusic" ',
_=r.if.call(t,(_=t&&t.settings,null==_||_===!1?_:_.playThemeMusic),{hash:{},inverse:C.noop,fn:C.program(5,u,i),data:i}),(_||0===_)&&(T+=_),T+="> "+M(n(2).call(t,"Play Theme Music",{hash:{},data:i}))+' </label> <p class="help-block">'+M(n(2).call(t,"Automatically play theme music in the background when available.",{hash:{},data:i}))+'</p> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="showUnwatchedIcons" ',_=r.if.call(t,(_=t&&t.settings,null==_||_===!1?_:_.showUnwatchedIcons),{
hash:{},inverse:C.noop,fn:C.program(5,u,i),data:i}),(_||0===_)&&(T+=_),T+="> "+M(n(2).call(t,"Show Unwatched Icons",{hash:{},data:i}))+' </label> <p class="help-block">'+M(n(2).call(t,"Show unwatched icons in list items.",{hash:{},data:i}))+'</p> </div> <div class="form-group"> <label class="control-label"> <input type="checkbox" id="keyboardShortcuts" ',_=r.if.call(t,(_=t&&t.settings,null==_||_===!1?_:_.keyboardShortcuts),{hash:{},inverse:C.noop,fn:C.program(5,u,i),data:i}),(_||0===_)&&(T+=_),T+="> "+M(n(2).call(t,"Enable Keyboard Shortcuts",{
hash:{},data:i}))+' </label> <p class="help-block">'+M(n(2).call(t,"Press ? to view the list of {1}available shortcuts{2}.",'<a class="keyboard-shortcuts-btn" href="#">',"</a>",{hash:{},data:i}))+'</p> </div> <div class="form-group"> <label for="allowHttpFallback">'+M(n(2).call(t,"Allow Fallback to Insecure Connections",{hash:{},data:i}))+'</label> <select id="allowHttpFallback"> ',_=r.each.call(t,t&&t.httpFallbackOptions,{hash:{},inverse:C.noop,fn:C.programWithDepth(7,d,i,t),data:i}),(_||0===_)&&(T+=_),
T+=' </select> <p class="help-block">'+M(n(2).call(t,"Allow this browser to make insecure connections to Plex Media Server if secure connections fail.",{hash:{},data:i}))+'</p> </div> </div> <div id="debug-web-group" class="settings-group"> <div class="form-group"> <label for="debugLevel">'+M(n(2).call(t,"Debug Level",{hash:{},data:i}))+'</label> <select id="debugLevel" data-type="int"> ',_=r.each.call(t,t&&t.debugLevels,{hash:{},inverse:C.noop,fn:C.programWithDepth(9,c,i,t),data:i}),(_||0===_)&&(T+=_),
T+=' </select> <p class="help-block">'+M(n(2).call(t,"You can view the debug logs {1}here{2}.",'<a href="#!/logs">',"</a>",{hash:{},data:i}))+"</p> </div> ",_=r.if.call(t,t&&t.isNinja,{hash:{},inverse:C.noop,fn:C.program(11,f,i),data:i}),(_||0===_)&&(T+=_),T+=' </div> <div id="player-web-group" class="settings-group"> <h4 class="settings-header">'+M(n(2).call(t,"Streaming Quality",{hash:{},data:i}))+'</h4> <div class="form-group"> <label for="localQuality">'+M(n(2).call(t,"Local Quality",{hash:{},
data:i}))+'</label> <select id="localQuality" data-type="int"> <option value="-1">'+M(n(2).call(t,"Original",{hash:{},data:i}))+"</option> ",_=r.each.call(t,t&&t.availableQualities,{hash:{},inverse:C.noop,fn:C.programWithDepth(16,v,i,t),data:i}),(_||0===_)&&(T+=_),T+=' </select> </div> <div class="form-group"> <label for="remoteQuality">'+M(n(2).call(t,"Remote Quality",{hash:{},data:i}))+'</label> <select id="remoteQuality" data-type="int"> <option value="-1">'+M(n(2).call(t,"Original",{hash:{},data:i
}))+"</option> ",_=r.each.call(t,t&&t.availableQualities,{hash:{},inverse:C.noop,fn:C.programWithDepth(18,g,i,t),data:i}),(_||0===_)&&(T+=_),T+=' </select> </div> <div class="form-group"> <label for="channelQuality">'+M(n(2).call(t,"Online Quality",{hash:{},data:i}))+'</label> <select id="channelQuality" data-type="int"> <option value="-1">'+M(n(2).call(t,"Original",{hash:{},data:i}))+"</option> ",_=r.each.call(t,t&&t.availableQualities,{hash:{},inverse:C.noop,fn:C.programWithDepth(20,m,i,t),data:i
}),(_||0===_)&&(T+=_),T+=" </select> </div> ",_=r.if.call(t,t&&t.showExperimentalPlayer,{hash:{},inverse:C.noop,fn:C.program(22,y,i),data:i}),(_||0===_)&&(T+=_),T+=' <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="directPlay" ',_=r.if.call(t,(_=t&&t.settings,null==_||_===!1?_:_.directPlay),{hash:{},inverse:C.noop,fn:C.program(5,u,i),data:i}),(_||0===_)&&(T+=_),T+="> "+M(n(2).call(t,"Direct Play",{hash:{},data:i}))+' </label> <p class="help-block">'+M(n(2).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:i}))+'</p> </div> <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="directStream" ',_=r.if.call(t,(_=t&&t.settings,null==_||_===!1?_:_.directStream),{hash:{},inverse:C.noop,fn:C.program(5,u,i),data:i}),(_||0===_)&&(T+=_),T+="> "+M(n(2).call(t,"Direct Stream",{hash:{},data:i}))+' </label> <p class="help-block">'+M(n(2).call(t,"Allows the server to copy compatible audio and video streams without converting them.",{hash:{},data:i}))+'</p> </div> <h4 class="settings-header">'+M(n(2).call(t,"Audio & Subtitles",{
hash:{},data:i}))+'</h4> <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="allowAC3" ',_=r.if.call(t,(_=t&&t.settings,null==_||_===!1?_:_.allowAC3),{hash:{},inverse:C.noop,fn:C.program(5,u,i),data:i}),(_||0===_)&&(T+=_),T+="> "+M(n(2).call(t,"Allow Direct Play of AC3 Audio",{hash:{},data:i}))+' </label> <p class="help-block">'+M(n(2).call(t,"Allow MP4 videos with AC3 audio to be played directly. Browser support for AC3 audio is limited.",{hash:{},data:i
}))+'</p> </div> <div class="form-group advanced-setting"> <label class="control-label"> <input type="checkbox" id="preferAAC" ',_=r.if.call(t,(_=t&&t.settings,null==_||_===!1?_:_.preferAAC),{hash:{},inverse:C.noop,fn:C.program(5,u,i),data:i}),(_||0===_)&&(T+=_),T+="> "+M(n(2).call(t,"Prefer AAC Audio",{hash:{},data:i}))+' </label> <p class="help-block">'+M(n(2).call(t,"Prefer AAC over MP3 when transcoding audio. Some devices, like the Wii U, only support HLS with AAC audio.",{hash:{},data:i}))+'</p> </div> <div class="form-group"> <label for="audioBoost">'+M(n(2).call(t,"Multi-Channel Audio Boost",{
hash:{},data:i}))+'</label> <select id="audioBoost" data-type="int"> ',_=r.each.call(t,t&&t.audioBoostLevels,{hash:{},inverse:C.noop,fn:C.programWithDepth(24,b,i,t),data:i}),(_||0===_)&&(T+=_),T+=' </select> <p class="help-block">'+M(n(2).call(t,"Boost volume when converting multi-channel audio to stereo.",{hash:{},data:i}))+'</p> </div> <div class="form-group"> <label for="subtitleSize">'+M(n(2).call(t,"Subtitle Size",{hash:{},data:i}))+'</label> <select id="subtitleSize" data-type="int"> ',_=r.each.call(t,t&&t.subtitleSizes,{
hash:{},inverse:C.noop,fn:C.programWithDepth(26,P,i,t),data:i}),(_||0===_)&&(T+=_),T+=' </select> </div> <div class="form-group"> <label for="subtitlesBurnLevel">'+M(n(2).call(t,"Burn Subtitles",{hash:{},data:i}))+'</label> <select id="subtitlesBurnLevel"> ',_=r.each.call(t,t&&t.subtitlesBurnLevels,{hash:{},inverse:C.noop,fn:C.programWithDepth(28,w,i,t),data:i}),(_||0===_)&&(T+=_),T+=' </select> <p class="help-block">'+M(n(2).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:i}))+'</p> </div> <h4 class="settings-header">'+M(n(2).call(t,"Extras",{hash:{},data:i}))+'</h4> <div class="form-group"> <label for="extrasPrefixCount">'+M(n(2).call(t,"Cinema Trailers to Play Before Movies",{hash:{},data:i}))+'</label> <select id="extrasPrefixCount" data-type="int"> ',_=r.each.call(t,t&&t.extrasPrefixCounts,{hash:{},inverse:C.noop,fn:C.programWithDepth(30,S,i,t),data:i}),(_||0===_)&&(T+=_),T+=' </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">'+M(n(2).call(t,"Save Changes",{
hash:{},data:i}))+'</span> </button> <span class="form-message"></span> </div> </form> </div> </div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t,r){var a,i="";return i+=' <li class="',a=n(23).call(e,(a=r&&r.currentType,null==a||a===!1?a:a.id),e&&e.id,{hash:{},inverse:d.noop,fn:d.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+='"> <a class="btn-gray" data-type="'+f((a=e&&e.typeString,typeof a===c?a.apply(e):a))+'" href="#">'+f(n(2).call(e,e&&e.plural,{
hash:{},data:t}))+"</a> </li> "}function o(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this,c="function",f=this.escapeExpression;return u+='<ul class="agent-types-nav nav nav-pills"> ',l=r.each.call(t,t&&t.agentTypes,{hash:{},inverse:d.noop,fn:d.programWithDepth(1,s,i,t),data:i}),(l||0===l)&&(u+=l),u+=' </ul> <div class="agents-list-container"></div> <p class="help-block sortable-help-block">'+f(n(2).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:i}))+'</p> <div class="contributors-list-container"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=" "+u(n(29).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this.escapeExpression,d=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=r.each.call(t,t,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(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(2).call(t,"Save Changes",{hash:{},data:i}))+'</span> </button> <span class="form-message"></span> </div> </form> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var a,i="";
return i+=' <p class="text-muted"> '+f(n(2).call(e,"The Plex Media Server logs and database can be helpful to developers and forum community members in diagnosing server issues.",{hash:{},data:t}))+' </p> <div class="help-btn-container"> ',a=r.if.call(e,e&&e.showDownloadLogs,{hash:{},inverse:p.noop,fn:p.program(2,o,t),data:t}),(a||0===a)&&(i+=a),i+=" ",a=r.if.call(e,e&&e.showDownloadDatabases,{hash:{},inverse:p.noop,fn:p.program(4,l,t),data:t}),(a||0===a)&&(i+=a),i+=" </div> "}function o(e,t){var r,a="";
return a+=' <a class="btn btn-primary" href="'+f((r=e&&e.downloadLogsUrl,typeof r===c?r.apply(e):r))+'">'+f(n(2).call(e,"Download Logs",{hash:{},data:t}))+"</a> "}function l(e,t){var r,a="";return a+=' <a class="btn btn-primary" href="'+f((r=e&&e.downloadDatabasesUrl,typeof r===c?r.apply(e):r))+'">'+f(n(2).call(e,"Download Database",{hash:{},data:t}))+"</a> "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c="function",f=this.escapeExpression,p=this;return d+='<div class="help-container"> <p class="text-muted"> '+f(n(2).call(t,"You can find documentation, guides and FAQs as well as our friendly Community Forums among our {1}support resources{2}.",'<a href="https://support.plex.tv" target="_blank">',"</a>",{
hash:{},data:i}))+" </p> ",u=r.if.call(t,t&&t.showDownloadLogsOrDatabases,{hash:{},inverse:p.noop,fn:p.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+=" </div> "})},2257,function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,t&&t.title,{
hash:{},data:i}))+" </a> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=" "+u(n(29).call(e,"setting",{hash:{idSuffix:"_c"},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this.escapeExpression,d=this;return l+='<form id="server-settings-form"> ',o=r.each.call(t,t,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(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(2).call(t,"Save Changes",{
hash:{},data:i}))+'</span> </button> <span class="form-message"></span> </div> </form> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <h4 class="status-header status-header-single"> <span class="loading loading-sm"></span> '+N(n(2).call(e,"Connecting server...",{hash:{},data:t}))+" </h4> "}function o(e,t){var r;return r=n(23).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.remoteAccessState),"disconnecting",{hash:{},inverse:j.program(6,u,t),
fn:j.program(4,l,t),data:t}),r||0===r?r:""}function l(e,t){var r="";return r+=' <h4 class="status-header status-header-single"> <span class="loading loading-sm"></span> '+N(n(2).call(e,"Disconnecting server...",{hash:{},data:t}))+" </h4> "}function u(e,t){var n;return n=r.if.call(e,e&&e.isUnavailable,{hash:{},inverse:j.program(12,p,t),fn:j.program(7,d,t),data:t}),n||0===n?n:""}function d(e,t){var a,i="";return i+=' <h4 class="status-header text-danger">'+N(n(2).call(e,"Not available outside your network",{
hash:{},data:t}))+"</h4> ",a=r.if.call(e,e&&e.isSignedOut,{hash:{},inverse:j.program(10,f,t),fn:j.program(8,c,t),data:t}),(a||0===a)&&(i+=a),i+=" "}function c(e,t){var r="";return r+=' <span class="status-description help-block">'+N(n(2).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 f(e,t){var r="";return r+=' <span class="status-description help-block">'+N(n(2).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(2).call(e,"Enable Remote Access",{hash:{},data:t}))+"</button> "}function p(e,t){var a,i="";return i+=" ",a=n(23).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.remoteAccessState),"unreachable",{hash:{},inverse:j.program(19,y,t),fn:j.program(13,h,t),data:t}),(a||0===a)&&(i+=a),i+=' <button class="remote-access-disable-btn btn btn-sm btn-default">'+N(n(2).call(e,"Disable Remote Access",{hash:{},data:t
}))+"</button> ",a=r.if.call(e,(a=e&&e.mappingModeSetting,null==a||a===!1?a:a.value),{hash:{},inverse:j.noop,fn:j.program(21,b,t),data:t}),(a||0===a)&&(i+=a),i+=" "}function h(e,t){var r,a="";return a+=' <h4 class="status-header text-danger">'+N(n(2).call(e,"Not available outside your network",{hash:{},data:t}))+'</h4> <span class="unreachable-description status-description help-block">'+N(n(2).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> ",r=n(23).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.mappingError),"jumboframes",{hash:{},inverse:j.program(16,g,t),fn:j.program(14,v,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function v(e,t){var r="";return r+=' <span class="jumbo-frames-description status-details help-block"> <span class="help-tip">'+N(n(2).call(e,"Tip:",{hash:{},data:t}))+"</span> "+N(n(2).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 g(e,t){var r;return r=n(23).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.mappingError),"doublenat",{hash:{},inverse:j.noop,fn:j.program(17,m,t),data:t}),r||0===r?r:""}function m(e,t){var r="";return r+=' <span class="double-nat-description status-details help-block"> <span class="help-tip">'+N(n(2).call(e,"Tip:",{hash:{},data:t}))+"</span> "+N(n(2).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 r="";return r+=' <h4 class="status-header status-header-single text-success">'+N(n(2).call(e,"Fully accessible outside your network",{hash:{},data:t}))+"</h4> "}function b(e,t){var r="";return r+=' <p class="remote-access-disable-message help-block"> <i class="remote-access-disable-warning-icon glyphicon circle-exclamation-mark"></i> '+N(n(2).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 P(e,t){var r,a="";return a+=" ",r=n(77).call(e,(r=e&&e.cloudAccount,null==r||r===!1?r:r.remoteAccessState),"disconnecting",{hash:{},inverse:j.noop,fn:j.program(24,w,t),data:t}),(r||0===r)&&(a+=r),a+=" "}function w(e,t){var a,i="";return i+=' <div class="remote-access-advanced"> <div class="remote-access-mapping-container ',a=r.unless.call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.mappingError),{hash:{},inverse:j.noop,fn:j.program(25,S,t),data:t}),(a||0===a)&&(i+=a),
i+='"> <hr> <h4 class="mapping-header">'+N(n(2).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(2).call(e,"Private",{hash:{},data:t}))+'</span> <span class="mapping-address"> ',a=r.if.call(e,e&&e.hasPrivateAddress,{hash:{},inverse:j.program(29,T,t),fn:j.program(27,_,t),data:t}),(a||0===a)&&(i+=a),i+=" </span> ",a=r.if.call(e,e&&e.hasPublicAddress,{hash:{},inverse:j.program(33,M,t),
fn:j.program(31,I,t),data:t}),(a||0===a)&&(i+=a),i+=' <span class="mapping-label text-muted">'+N(n(2).call(e,"Public",{hash:{},data:t}))+'</span> <span class="mapping-address"> ',a=r.if.call(e,e&&e.hasPublicAddress,{hash:{},inverse:j.program(29,T,t),fn:j.program(35,C,t),data:t}),(a||0===a)&&(i+=a),i+=" </span> ",a=n(23).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.remoteAccessState),"ok",{hash:{},inverse:j.program(33,M,t),fn:j.program(31,I,t),data:t}),(a||0===a)&&(i+=a),i+=' <span class="mapping-internet ',
a=n(77).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.remoteAccessState),"ok",{hash:{},inverse:j.noop,fn:j.program(37,x,t),data:t}),(a||0===a)&&(i+=a),i+='"> <i class="mapping-internet-icon glyphicon globe text-muted"></i> '+N(n(2).call(e,"Internet",{hash:{},data:t}))+" </span> </div> </div> ",a=r.if.call(e,e&&e.hasMappingSettings,{hash:{},inverse:j.noop,fn:j.program(39,E,t),data:t}),(a||0===a)&&(i+=a),i+=" </div> "}function S(e,t){return"advanced-setting"}function _(e,t){var r,a="";return a+=' <span class="mapping-value">'+N((r=e&&e.cloudAccount,
r=null==r||r===!1?r:r.privateAddress,typeof r===U?r.apply(e):r))+'</span> <span class="mapping-separator text-muted">'+N(n(2).call(e,":",{hash:{},data:t}))+'</span> <span class="mapping-value">'+N((r=e&&e.cloudAccount,r=null==r||r===!1?r:r.privatePort,typeof r===U?r.apply(e):r))+"</span> "}function T(e,t){var r="";return r+=' <span class="mapping-empty-value">'+N(n(2).call(e,"Unknown IP",{hash:{},data:t}))+"</span> "}function I(e,t){return' <i class="mapping-icon glyphicon left-arrow text-success"></i> ';
}function M(e,t){return' <i class="mapping-icon glyphicon remove-2 text-danger"></i> '}function C(e,t){var r,a="";return a+=' <span class="mapping-value">'+N((r=e&&e.cloudAccount,r=null==r||r===!1?r:r.publicAddress,typeof r===U?r.apply(e):r))+'</span> <span class="mapping-separator text-muted">'+N(n(2).call(e,":",{hash:{},data:t}))+'</span> <span class="mapping-value">'+N((r=e&&e.cloudAccount,r=null==r||r===!1?r:r.publicPort,typeof r===U?r.apply(e):r))+"</span> "}function x(e,t){return"unreachable";
}function E(e,t){var a,i="";return i+=' <div class="remote-access-error-container ',a=r.unless.call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.mappingError),{hash:{},inverse:j.noop,fn:j.program(25,S,t),data:t}),(a||0===a)&&(i+=a),i+='"> <div class="form-inline"> <div class="checkbox"> <label> <input type="checkbox" id="'+N((a=e&&e.mappingModeSetting,a=null==a||a===!1?a:a.id,typeof a===U?a.apply(e):a))+'" name="'+N((a=e&&e.mappingModeSetting,a=null==a||a===!1?a:a.id,typeof a===U?a.apply(e):a))+'" value="1" ',
a=r.if.call(e,(a=e&&e.mappingModeSetting,null==a||a===!1?a:a.value),{hash:{},inverse:j.noop,fn:j.program(40,k,t),data:t}),(a||0===a)&&(i+=a),i+="> "+N(n(2).call(e,"Manually specify public port",{hash:{},data:t}))+' </label> </div> <div class="form-group"> <input type="text" id="'+N((a=e&&e.mappingPortSetting,a=null==a||a===!1?a:a.id,typeof a===U?a.apply(e):a))+'" name="'+N((a=e&&e.mappingPortSetting,a=null==a||a===!1?a:a.id,typeof a===U?a.apply(e):a))+'" class="form-control" value="'+N((a=e&&e.mappingPortSetting,
a=null==a||a===!1?a:a.value,typeof a===U?a.apply(e):a))+'" ',a=r.unless.call(e,(a=e&&e.mappingModeSetting,null==a||a===!1?a:a.value),{hash:{},inverse:j.noop,fn:j.program(42,D,t),data:t}),(a||0===a)&&(i+=a),i+='> </div> <button class="retry-btn btn btn-primary btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">',a=n(23).call(e,(a=e&&e.cloudAccount,null==a||a===!1?a:a.remoteAccessState),"unreachable",{hash:{},inverse:j.program(46,O,t),fn:j.program(44,A,t),data:t}),(a||0===a)&&(i+=a),
i+='</span> </button> </div> <p class="help-block">'+N(n(2).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 k(e,t){return"checked"}function D(e,t){return"disabled"}function A(e,t){return N(n(2).call(e,"Retry",{
hash:{},data:t}))}function O(e,t){return N(n(2).call(e,"Apply",{hash:{},data:t}))}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var R,L="",N=this.escapeExpression,j=this,U="function";return L+='<i class="remote-access-status-icon glyphicon globe"></i> <div class="remote-access-status-message"> ',R=n(23).call(t,(R=t&&t.cloudAccount,null==R||R===!1?R:R.remoteAccessState),"connecting",{hash:{},inverse:j.program(3,o,i),fn:j.program(1,s,i),data:i}),(R||0===R)&&(L+=R),L+=" </div> ",
R=n(77).call(t,(R=t&&t.cloudAccount,null==R||R===!1?R:R.remoteAccessState),"connecting",{hash:{},inverse:j.noop,fn:j.program(23,P,i),data:i}),(R||0===R)&&(L+=R),L+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <button class="server-sign-out-btn btn btn-default btn-loading"> <div class="loading loading-sm"></div> <span class="btn-label">'+c(n(2).call(e,"Sign Out",{hash:{},data:t}))+"</span> </button> "}function o(e,t){var r="";
return r+=' <div class="server-claim-container"> <div class="server-claim-info"> <h4>'+c(n(2).call(e,"This server is unclaimed and not secure",{hash:{},data:t}))+'</h4> <p class="help-block"> '+c(n(2).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(2).call(e,"Claim Server",{
hash:{},data:t}))+"</span> </button> </div> "}function l(e,t){var r="";return r+=' <form id="server-sign-in-form" class="form-inline"> <div class="form-group"> <input type="text" class="form-control" name="username" placeholder="'+c(n(2).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(2).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(2).call(e,"Sign In",{
hash:{},data:t}))+'</span> </button> <p class="help-block">'+c(n(2).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"],r=this.merge(r,e.helpers),i=i||{};var u,d="",c=this.escapeExpression,f=this;return d+='<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(2).call(t,"Server signed in as",{
hash:{},data:i}))+'</div> <div class="server-account-username"></div> </div> ',u=r.if.call(t,t&&t.showSignOut,{hash:{},inverse:f.noop,fn:f.program(1,s,i),data:i}),(u||0===u)&&(d+=u),d+=" </div> ",u=r.if.call(t,t&&t.showClaimMessage,{hash:{},inverse:f.program(5,l,i),fn:f.program(3,o,i),data:i}),(u||0===u)&&(d+=u),d+=" "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"active"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};
var o,l="",u=this,d=this.escapeExpression;return l+='<a href="#" class="check-for-updates-btn label label-btn label-primary ',o=r.unless.call(t,t&&t.canCheckForUpdate,{hash:{},inverse:u.noop,fn:u.program(1,s,i),data:i}),(o||0===o)&&(l+=o),l+='"> <i class="label-icon glyphicon upload"></i> '+d(n(2).call(t,"Check for Updates",{hash:{},data:i}))+' </a> <a href="#" class="checking-for-updates-btn label label-btn label-primary active"> <i class="label-icon glyphicon upload"></i> '+d(n(2).call(t,"Checking for Updates",{
hash:{},data:i}))+' </a> <a href="#" class="available-updates-btn label label-btn label-primary"> <i class="label-icon glyphicon download"></i> '+d(n(2).call(t,"Download Updates",{hash:{},data:i}))+' </a> <span class="downloading-updates-container label label-btn label-progress active"> <i class="label-icon glyphicon download"></i> '+d(n(2).call(t,"Downloading Update",{hash:{},data:i}))+' <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> '+d(n(2).call(t,"Install Update",{
hash:{},data:i}))+' </a> <a href="#" class="installing-updates-btn label label-btn label-primary active"> <i class="label-icon glyphicon upload"></i> '+d(n(2).call(t,"Installing",{hash:{},data:i}))+' </a> <span class="install-info-label up-to-date-label"> <i class="success-icon glyphicon ok-2"></i> '+d(n(2).call(t,"Up to date",{hash:{},data:i}))+' </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">'+d(n(2).call(t,"Please install manually.",{
hash:{},data:i}))+'</a> </span> <a href="#" class="release-notes-btn label label-btn label-default"> <i class="label-icon glyphicon circle-info"></i> '+d(n(2).call(t,"What's New",{hash:{},data:i}))+" </a> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=" "+f(n(2).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=r.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 r="";return r+=" "+f(n(2).call(e,"This Plex Media Server platform is not capable of converting video.",{hash:{},data:t}))+" "}function u(e,t){var r="";return r+=" "+f(n(2).call(e,"There was a problem requesting media versions from this server.",{hash:{},data:t}))+" "}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var d,c="",f=this.escapeExpression,p=this;return c+='<div class="row row-padded"> <h4 class="text-muted text-center"> ',
d=r.if.call(t,t&&t.isUpgradeRequired,{hash:{},inverse:p.program(3,o,i),fn:p.program(1,s,i),data:i}),(d||0===d)&&(c+=d),c+=" </h4> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Delete All Versions",{hash:{},data:i}))+"</button> "+o(n(2).call(t,"Monitor conversion progress in {1}Conversion Activity{2}.",'<a href="#!/status/conversion">',"</a>",{
hash:{},data:i}))+' </p> <div class="background-processing-list-region"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=' <div class="filter-bar-right"> <button class="toggle-advanced-btn btn btn-sm btn-default basic-setting">'+u(n(2).call(e,"Show Advanced",{hash:{},data:t}))+'</button> <button class="toggle-advanced-btn btn btn-sm btn-default advanced-setting">'+u(n(2).call(e,"Hide Advanced",{hash:{},data:t}))+"</button> </div> ";
}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this.escapeExpression,d=this;return l+='<div class="filter-bar"> ',o=r.unless.call(t,t&&t.shared,{hash:{},inverse:d.noop,fn:d.program(1,s,i),data:i}),(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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){
var r,a="";return a+=' <div class="setup-basic-form-group form-group"> <p class="text-muted"> '+d(n(2).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="'+d((r=e&&e.friendlyNameSetting,r=null==r||r===!1?r:r.id,typeof r===c?r.apply(e):r))+'" class="form-control" value="'+d((r=e&&e.friendlyNameSetting,r=null==r||r===!1?r:r.value,typeof r===c?r.apply(e):r))+'" placeholder="'+d((r=e&&e.server,r=null==r||r===!1?r:r.friendlyName,
typeof r===c?r.apply(e):r))+'"> </div> '}function o(e,t){var r,a="";return a+=' <div class="setup-basic-form-group form-group"> <div class="publish-checkbox checkbox"> <label for="'+d((r=e&&e.publishSetting,r=null==r||r===!1?r:r.id,typeof r===c?r.apply(e):r))+'"> <input type="checkbox" id="'+d((r=e&&e.publishSetting,r=null==r||r===!1?r:r.id,typeof r===c?r.apply(e):r))+'" checked> '+d(n(2).call(e,"Allow me to access my media outside my home",{hash:{},data:t}))+' </label> </div> <p class="text-muted"> '+d(n(2).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"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c="function",f=this;return u+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <h4>'+d(n(2).call(t,"Great, we found a server!",{hash:{},data:i}))+'</h4> <form id="setup-basic-form" class="settings-container"> ',l=r.if.call(t,t&&t.friendlyNameSetting,{hash:{},inverse:f.noop,fn:f.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=" ",l=r.if.call(t,t&&t.publishSetting,{
hash:{},inverse:f.noop,fn:f.program(3,o,i),data:i}),(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">'+d(n(2).call(t,"Next",{hash:{},data:i}))+'</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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
function s(e,t){var a,i="";return i+=' <div class="checkbox"> <label for="'+c((a=e&&e.collectUsageDataSetting,a=null==a||a===!1?a:a.id,typeof a===d?a.apply(e):a))+'"> <input type="checkbox" id="'+c((a=e&&e.collectUsageDataSetting,a=null==a||a===!1?a:a.id,typeof a===d?a.apply(e):a))+'" name="'+c((a=e&&e.collectUsageDataSetting,a=null==a||a===!1?a:a.id,typeof a===d?a.apply(e):a))+'" value="1" ',a=r.if.call(e,(a=e&&e.collectUsageDataSetting,null==a||a===!1?a:a.value),{hash:{},inverse:f.noop,fn:f.program(2,o,t),
data:t}),(a||0===a)&&(i+=a),i+="> "+c(n(2).call(e,"Send anonymous usage data to Plex",{hash:{},data:t}))+' </label> </div> <p class="setup-complete-help text-muted"> '+c(n(2).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"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d="function",c=this.escapeExpression,f=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="'+c((l=t&&t.devicesImg,
typeof l===d?l.apply(t):l))+'"> <a href="https://plex.tv/downloads" target="_blank" class="btn btn-default btn-lg">'+c(n(2).call(t,"Get Plex Apps",{hash:{},data:i}))+'</a> </div> <p class="text-muted">'+c(n(2).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:i}))+'</p> <form id="setup-complete-form" class="settings-container"> ',
l=r.if.call(t,t&&t.collectUsageDataSetting,{hash:{},inverse:f.noop,fn:f.program(1,s,i),data:i}),(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">'+c(n(2).call(t,"Back",{hash:{},data:i}))+'</button> <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(2).call(t,"Done",{hash:{},data:i}))+'</span> </button> <button class="done-btn btn btn-primary btn-lg hidden"></button> </div> </form> </div> </div> <div class="modal-container"></div> ';
})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var r="";return r+=" <h1>"+d(n(2).call(e,"Setup is not allowed for shared servers.",{hash:{},data:t}))+"</h1> "}function o(e,t){var r="";return r+=" <h1>"+d(n(2).call(e,"A problem has been detected with a core component of Plex Media Server.",{hash:{},data:t}))+'</h1> <h2 class="text-muted">'+d(n(2).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"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d=this.escapeExpression,c=this;return u+='<div class="row row-padded"> <div class="col-md-8 col-md-offset-2"> ',l=r.if.call(t,t&&t.shared,{hash:{},inverse:c.program(3,o,i),fn:c.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=" </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s,o="",l=this.escapeExpression,u="function";
return o+='<h2 class="setup-intro-header">'+l(n(2).call(t,"How Plex Works",{hash:{},data:i}))+"</h2> <h4>"+l(n(2).call(t,"Plex Media Server runs on the computer where you keep your media",{hash:{},data:i}))+'</h4> <img class="setup-intro-img setup-intro-computer-img" src='+l((s=t&&t.computerImg,typeof s===u?s.apply(t):s))+"> <h4>"+l(n(2).call(t,"Plex scans your media, automatically organizes it, and makes it beautiful",{hash:{},data:i}))+'</h4> <img class="setup-intro-img setup-intro-media-img" src='+l((s=t&&t.mediaImg,
typeof s===u?s.apply(t):s))+"> <h4>"+l(n(2).call(t,"Play your media on any screen with your favorite Plex app",{hash:{},data:i}))+'</h4> <img class="setup-intro-img setup-intro-play-img" src='+l((s=t&&t.playImg,typeof s===u?s.apply(t):s))+'> <p> <button class="next-btn btn btn-primary btn-lg" data-subset="setupLoading">'+l(n(2).call(t,"Got it!",{hash:{},data:i}))+"</button> </p> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<div class="row"> <div class="col-sm-6 col-sm-offset-3"> <h4>'+o(n(2).call(t,"Organize Your Media",{hash:{},data:i}))+'</h4> <p class="text-muted">'+o(n(2).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:i}))+'</p> <p class="setup-add-section-container"> <button class="add-section-btn btn btn-default">'+o(n(2).call(t,"Add Library",{
hash:{},data:i}))+'</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(2).call(t,"Back",{hash:{},data:i}))+'</button> <button class="next-btn btn btn-primary btn-lg" data-subset="setupComplete">'+o(n(2).call(t,"Next",{hash:{},data:i}))+"</button> </div> </div> </div> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],
r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<div class="loading loading-inline"></div> <p class="loading-title">'+o(n(2).call(t,"Please wait a moment while Plex starts.",{hash:{},data:i}))+"</p> "})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};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(2).call(t,"Server Setup",{
hash:{},data:i}))+'</h2> <div class="setup-progress"> <div class="basic-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupBasic" href="#">'+o(n(2).call(t,"Name",{hash:{},data:i}))+'</a> </div> <div class="library-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupLibrary" href="#">'+o(n(2).call(t,"Media Library",{hash:{},data:i}))+'</a> </div> <div class="complete-segment setup-progress-segment"> <a class="segment-btn btn-gray" data-subset="setupComplete" href="#">'+o(n(2).call(t,"Finish",{
hash:{},data:i}))+'</a> </div> </div> </div> </div> <div class="setup-container"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+='<div class="side-bar-page main-page minimal-scroll"> <div class="section-sort-container"> <h5>'+o(n(2).call(t,"Sort",{hash:{},data:i}))+'</h5> <div class="section-sort-list-container"></div> </div> </div>'})},function(e,t,n){
var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){return"hidden"}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var o,l="",u=this,d=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=r.unless.call(t,t&&t.showNewFilterIconBtn,{hash:{},inverse:u.noop,fn:u.program(1,s,i),data:i}),
(o||0===o)&&(l+=o),l+='" href="#"><i class="glyphicon plus"></i></a> </div> <h5>'+d(n(2).call(t,"Filters",{hash:{},data:i}))+'</h5> <div class="section-current-filters-list-container"></div> </div> <div class="section-sort-container hidden"> <h5>'+d(n(2).call(t,"Sort",{hash:{},data:i}))+'</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>'+d(n(2).call(t,"Select A Filter",{
hash:{},data:i}))+'</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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){
this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s="",o=this.escapeExpression;return s+="<h2>"+o(n(2).call(t,"Announcements",{hash:{},data:i}))+'</h2> <div class="announcements-container"></div> '})},function(e,t,n){var r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var s,o="",l=this.escapeExpression,u="function";return o+="<h2>"+l(n(2).call(t,"Watch Later Help",{hash:{},data:i}))+'</h2> <div class="filter-bar"> <h4>'+l(n(2).call(t,"Add videos from your browser",{
hash:{},data:i}))+'</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(2).call(t,'To save a video to Watch Later, click "Plex It!" in your Bookmarks Bar.',{
hash:{},data:i}))+"</li> <li>"+l(n(2).call(t,"A panel will appear on the left side of the page to let you know the video has been saved.",{hash:{},data:i}))+"</li> <li>"+l(n(2).call(t,'You can also recommend the video to friends or "fling" it to a Plex player and watch it there.',{hash:{},data:i}))+'</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(2).call(t,"Add videos by email",{
hash:{},data:i}))+'</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(2).call(t,"Send an email to the address above with any link(s) you want added to Watch Later.",{hash:{},data:i}))+"</li> <li>"+l(n(2).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:i}))+'</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 r=n(6);e.exports=(r.default||r).template(function(e,t,r,a,i){function s(e,t){var n,r="";return r+=' <li><a class="'+c((n=e&&e.subset,typeof n===d?n.apply(e):n))+'-btn btn-gray" href="#!/playlist/'+c((n=e&&e.key,typeof n===d?n.apply(e):n))+"/"+c((n=e&&e.subset,typeof n===d?n.apply(e):n))+'">'+c((n=e&&e.title,
typeof n===d?n.apply(e):n))+'<span class="badge"></span></a></li> '}function o(e,t){var n,r="";return r+=' <a class="user-playlist-help" href="'+c((n=e&&e.helpRoute,typeof n===d?n.apply(e):n))+'" target="'+c((n=e&&e.defaultTarget,typeof n===d?n.apply(e):n))+'"><i class="glyphicon circle-question-mark"></i></a> '}this.compilerInfo=[4,">= 1.0.0"],r=this.merge(r,e.helpers),i=i||{};var l,u="",d="function",c=this.escapeExpression,f=this;return u+='<ul class="nav nav-header pull-right"> ',l=r.each.call(t,t&&t.filters,{
hash:{},inverse:f.noop,fn:f.program(1,s,i),data:i}),(l||0===l)&&(u+=l),u+=" </ul> <h2> "+c(n(2).call(t,t&&t.label,{hash:{},data:i}))+" ",l=r.if.call(t,t&&t.helpRoute,{hash:{},inverse:f.noop,fn:f.program(3,o,i),data:i}),(l||0===l)&&(u+=l),u+=' </h2> <div class="user-playlist-container"></div> '})},function(e,t,n){"use strict";function r(e){var t=e&&e[0]||1,n=c;if(t!==n){if(t<n){var r=f[n],a=f[t];throw new d("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+a+").");
}throw new d("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function a(e,t){if(!t)throw new d("No environment passed to template");var n=function(e,n,r,a,i,s){var o=t.VM.invokePartial.apply(this,arguments);if(null!=o)return o;if(t.compile){var l={helpers:a,partials:i,data:s};return i[n]=t.compile(e,{data:void 0!==s},t),i[n](r,l)}throw new d("The partial "+n+" could not be compiled when running in runtime-only mode");
},r={escapeExpression:u.escapeExpression,invokePartial:n,programs:[],program:function(e,t,n){var r=this.programs[e];return n?r=s(e,t,n):r||(r=this.programs[e]=s(e,t)),r},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,a){a=a||{};var i,s,o=a.partial?a:t;a.partial||(i=a.helpers,s=a.partials);var l=e.call(r,o,n,i,s,a.data);return a.partial||t.VM.checkRevision(r.compilerInfo),
l}}function i(e,t,n){var r=Array.prototype.slice.call(arguments,3),a=function(e,a){return a=a||{},t.apply(this,[e,a.data||n].concat(r))};return a.program=e,a.depth=r.length,a}function s(e,t,n){var r=function(e,r){return r=r||{},t(e,r.data||n)};return r.program=e,r.depth=0,r}function o(e,t,n,r,a,i){var s={partial:!0,helpers:r,partials:a,data:i};if(void 0===e)throw new d("The partial "+t+" could not be found");if(e instanceof Function)return e(n,s)}function l(){return""}var u=n(512),d=n(511).default,c=n(510).COMPILER_REVISION,f=n(510).REVISION_CHANGES;
t.checkRevision=r,t.template=a,t.programWithDepth=i,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},r={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};e.exports=function(e,t){for(var a=Object.getOwnPropertyNames(t),i=0;i<a.length;++i)n[a[i]]||r[a[i]]||(e[a[i]]=t[a[i]]);return e}},function(e,t){(function(){window.Modernizr=function(e,t,n){
function r(e){m.cssText=e}function a(e,t){return typeof e===t}function i(e,t){return!!~(""+e).indexOf(t)}function s(e,t){for(var r in e){var a=e[r];if(!i(a,"-")&&m[a]!==n)return"pfx"!=t||a}return!1}function o(e,t,r){for(var i in e){var s=t[e[i]];if(s!==n)return r===!1?e[i]:a(s,"function")?s.bind(r||t):s}return!1}function l(e,t,n){var r=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+P.join(r+" ")+r).split(" ");return a(t,"string")||a(t,"undefined")?s(i,t):(i=(e+" "+w.join(r+" ")+r).split(" "),o(i,t,n));
}var u,d,c,f="2.8.3",p={},h=t.documentElement,v="modernizr",g=t.createElement(v),m=g.style,y=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),b="Webkit Moz O ms",P=b.split(" "),w=b.toLowerCase().split(" "),S={},_=[],T=_.slice,I=function(e,n,r,a){var i,s,o,l,u=t.createElement("div"),d=t.body,c=d||t.createElement("body");if(parseInt(r,10))for(;r--;)o=t.createElement("div"),o.id=a?a[r]:v+(r+1),u.appendChild(o);return i=["&#173;",'<style id="s',v,'">',e,"</style>"].join(""),u.id=v,(d?u:c).innerHTML+=i,
c.appendChild(u),d||(c.style.background="",c.style.overflow="hidden",l=h.style.overflow,h.style.overflow="hidden",h.appendChild(c)),s=n(u,e),d?u.parentNode.removeChild(u):(c.parentNode.removeChild(c),h.style.overflow=l),!!s},M={}.hasOwnProperty;c=a(M,"undefined")||a(M.call,"undefined")?function(e,t){return t in e&&a(e.constructor.prototype[t],"undefined")}:function(e,t){return M.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;
var n=T.call(arguments,1),r=function(){if(this instanceof r){var a=function(){};a.prototype=t.prototype;var i=new a,s=t.apply(i,n.concat(T.call(arguments)));return Object(s)===s?s:i}return t.apply(e,n.concat(T.call(arguments)))};return r}),S.csstransforms3d=function(){var e=!!l("perspective");return e&&"webkitPerspective"in h.style&&I("@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 C in S)c(S,C)&&(d=C.toLowerCase(),
p[d]=S[C](),_.push((p[d]?"":"no-")+d));return p.addTest=function(e,t){if("object"==typeof e)for(var r in e)c(e,r)&&p.addTest(r,e[r]);else{if(e=e.toLowerCase(),p[e]!==n)return p;t="function"==typeof t?t():t,"undefined"!=typeof enableClasses&&enableClasses&&(h.className+=" "+(t?"":"no-")+e),p[e]=t}return p},r(""),g=u=null,p._version=f,p._prefixes=y,p._domPrefixes=w,p._cssomPrefixes=P,p.testProp=function(e){return s([e])},p.testAllProps=l,p.testStyles=I,p}(this,this.document),e.exports=window.Modernizr;
}).call(window)},function(e,t,n){var r,a,i;/*!
	 * jQuery Mousewheel 3.1.13
	 *
	 * Copyright jQuery Foundation and other contributors
	 * Released under the MIT license
	 * http://jquery.org/license
	 */
!function(s){a=[n(8)],r=s,i="function"==typeof r?r.apply(t,a):r,!(void 0!==i&&(e.exports=i))}(function(e){function t(t){var s=t||window.event,o=l.call(arguments,1),u=0,c=0,f=0,p=0,h=0,v=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(f=s.detail*-1),"wheelDelta"in s&&(f=s.wheelDelta),"wheelDeltaY"in s&&(f=s.wheelDeltaY),"wheelDeltaX"in s&&(c=s.wheelDeltaX*-1),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(c=f*-1,f=0),u=0===f?c:f,"deltaY"in s&&(f=s.deltaY*-1,u=f),"deltaX"in s&&(c=s.deltaX,0===f&&(u=c*-1)),
0!==f||0!==c){if(1===s.deltaMode){var g=e.data(this,"mousewheel-line-height");u*=g,f*=g,c*=g}else if(2===s.deltaMode){var m=e.data(this,"mousewheel-page-height");u*=m,f*=m,c*=m}if(p=Math.max(Math.abs(f),Math.abs(c)),(!i||p<i)&&(i=p,r(s,p)&&(i/=40)),r(s,p)&&(u/=40,c/=40,f/=40),u=Math[u>=1?"floor":"ceil"](u/i),c=Math[c>=1?"floor":"ceil"](c/i),f=Math[f>=1?"floor":"ceil"](f/i),d.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();h=t.clientX-y.left,v=t.clientY-y.top;
}return t.deltaX=c,t.deltaY=f,t.deltaFactor=i,t.offsetX=h,t.offsetY=v,t.deltaMode=0,o.unshift(t,u,c,f),a&&clearTimeout(a),a=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,o)}}function n(){i=null}function r(e,t){return d.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var a,i,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 d=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",d.getLineHeight(this)),e.data(this,"mousewheel-page-height",d.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),r=n["offsetParent"in e.fn?"offsetParent":"parent"]();return r.length||(r=e("body")),parseInt(r.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 r,a;!function(n,i){var s=this;r=[],a=function(){return i(s)}.apply(t,r),!(void 0!==a&&(e.exports=a))}(this,function(e){"use strict";return function(e){function t(r){if(n[r])return n[r];var a=n[r]=Object.create(null);return e[r](a,t),a}var n=Object.create(null);return t(0)}([function(e,t){var n=t(23),r=t(23);e.debugMode=r.debugMode,e.verboseMode=r.verboseMode;var a=t(33),i=t(33);e.Set=i.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 d=t(37);e.webworker=d;var c=t(8);e.parts=c;var f=t(1);e.parser=f;var p=t(14);e.renderers=p;var h=t(24);e.ASS=h.ASS;var v=t(25);e.Attachment=v.Attachment,e.AttachmentType=v.AttachmentType;var g=t(26);e.Dialogue=g.Dialogue;var m=t(28);e.ScriptProperties=m.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 a.Set},set:a.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 r=t(5);e.BrowserReadableStream=r.BrowserReadableStream,e.StringStream=r.StringStream,e.XhrStream=r.XhrStream;var a=t(4);e.StreamParser=a.StreamParser,e.SrtStreamParser=a.SrtStreamParser},function(e,t){function n(e){var t=e.indexOf(":");
if(t===-1)return null;var n=e.substr(0,t),r=e.substr(t+1).replace(/^\s+/,"");return{name:n,value:r}}function r(e,t){var r=n(e);if(null===r)return null;var i=r.value.split(",");i.length>t.length&&(i[t.length-1]=i.slice(t.length-1).join(","));var s=new a.Map;return t.forEach(function(e,t){s.set(e,i[t])}),{type:r.name,template:s}}var a=t(30);e.parseLineIntoProperty=n,e.parseLineIntoTypedTemplate=r},function(e,t){function n(e,t){var n=new l(e,t);if(null===n.result||n.result.end!==e.length)throw i.debugMode&&console.error("Parse failed. %s %s %o",t,e,n.result),
new Error("Parse failed.");return n.result.value}function r(e,t,n,r){l.prototype["parse_tag_"+e]=function(a){var i=this,s=new f(a);if(null===i.read(s,e))return a.pop(),null;var o=n.call(i,s);if(null!==o)s.value=new t(o.value);else{if(r)return a.pop(),null;s.value=new t(null)}return s}}var a=t(8),i=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 f(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,r=new f(e);for(r.value=[];this._haveMore();){var i=this.parse_enclosedTags(r);if(null!==i)(t=r.value).push.apply(t,i.value);else{var s=this.parse_newline(r)||this.parse_hardspace(r)||this.parse_text(r);if(null===s)return e.pop(),null;if(s.value instanceof a.Text&&r.value[r.value.length-1]instanceof a.Text){var o=r.value[r.value.length-1];r.value[r.value.length-1]=new a.Text(o.value+s.value.value);
}else r.value.push(s.value)}}var l=!1;return r.value.forEach(function(e,t){e instanceof a.DrawingMode?l=0!==e.scale:e instanceof a.Text&&l&&(r.value[t]=new a.DrawingInstructions(n(e.value,"drawingInstructions")))}),r},e.prototype.parse_enclosedTags=function(e){var t=new f(e);if(t.value=[],null===this.read(t,"{"))return e.pop(),null;for(var n=this._peek();this._haveMore()&&"}"!==n;n=this._peek()){var r=null;if(null!==this.read(t,"\\")&&(r=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===r&&t.pop()),null===r&&(r=this.parse_comment(t)),null===r)return e.pop(),null;r.value instanceof a.Comment&&t.value[t.value.length-1]instanceof a.Comment?t.value[t.value.length-1]=new a.Comment(t.value[t.value.length-1].value+r.value.value):t.value.push(r.value)}return null===this.read(t,"}")?(e.pop(),null):t},e.prototype.parse_newline=function(e){var t=new f(e);return null===this.read(t,"\\N")?(e.pop(),null):(t.value=new a.NewLine,t)},e.prototype.parse_hardspace=function(e){var t=new f(e);return null===this.read(t,"\\h")?(e.pop(),
null):(t.value=new a.Text("\xa0"),t)},e.prototype.parse_text=function(e){var t=this._peek(),n=new f(e),r=new f(n,t);return n.value=new a.Text(r.value),n},e.prototype.parse_comment=function(e){var t=this._peek(),n=new f(e),r=new f(n,t);return n.value=new a.Comment(r.value),n},e.prototype.parse_tag_a=function(e){var t=new f(e);if(null===this.read(t,"a"))return e.pop(),null;var n=this._peek();switch(n){case"1":var r=this._peek(2);switch(r){case"10":case"11":n=r}break;case"2":case"3":case"5":case"6":
case"7":case"9":break;default:return e.pop(),null}var i=new f(t,n),s=null;switch(i.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 a.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 f(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 r=new f(t,n);return t.value=new a.Alignment(parseInt(r.value)),t},e.prototype.parse_tag_b=function(e){var t=new f(e);if(null===this.read(t,"b"))return e.pop(),null;var n=null,r=this._peek();return r>="1"&&r<="9"&&(r=this._peek(3),"00"===r.substr(1)&&(n=new f(t,r),n.value=parseInt(n.value))),null===n&&(n=this.parse_enableDisable(t)),null!==n?t.value=new a.Bold(n.value):t.value=new a.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 f(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 r=this.parse_decimal(t);return null===r?(e.pop(),null):null===this.read(t,")")?(e.pop(),null):(t.value=new a.Fade(n.value/1e3,r.value/1e3),t)},e.prototype.parse_tag_fade=function(e){var t=new f(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 r=this.parse_decimal(t);if(null===r)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 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 a.ComplexFade(1-n.value/255,1-r.value/255,1-i.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 f(e);if(null===this.read(t,"fn"))return e.pop(),null;for(var n=new f(t,""),r=this._peek();this._haveMore()&&"\\"!==r&&"}"!==r;r=this._peek())n.value+=r;return n.value.length>0?t.value=new a.FontName(n.value):t.value=new a.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 f(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 a.FontSizePlus(n.value),t)},e.prototype.parse_tag_fsminus=function(e){var t=new f(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 a.FontSizeMinus(n.value),t)},e.prototype.parse_tag_fscx=function(e){var t=new f(e);if(null===this.read(t,"fscx"))return e.pop(),null;var n=this.parse_decimal(t);return null!==n?t.value=new a.FontScaleX(n.value/100):t.value=new a.FontScaleX(null),
t},e.prototype.parse_tag_fscy=function(e){var t=new f(e);if(null===this.read(t,"fscy"))return e.pop(),null;var n=this.parse_decimal(t);return null!==n?t.value=new a.FontScaleY(n.value/100):t.value=new a.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 f(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 a.ColorKaraoke(n.value/100),t)},e.prototype.parse_tag_K=function(e){var t=new f(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 a.SweepingColorKaraoke(n.value/100),t)},e.prototype.parse_tag_kf=function(e){var t=new f(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 a.SweepingColorKaraoke(n.value/100),t)},e.prototype.parse_tag_ko=function(e){var t=new f(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 a.OutlineKaraoke(n.value/100),t)},e.prototype.parse_tag_move=function(e){var t=new f(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 r=this.parse_decimal(t);if(null===r)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 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 a.Move(n.value,r.value,i.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 f(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 r=this.parse_decimal(t);return null===r?(e.pop(),null):null===this.read(t,")")?(e.pop(),null):(t.value=new a.RotationOrigin(n.value,r.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 f(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 r=this.parse_decimal(t);return null===r?(e.pop(),null):null===this.read(t,")")?(e.pop(),
null):(t.value=new a.Position(n.value,r.value),t)},e.prototype.parse_tag_q=function(e){var t=new f(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 r=new f(t,n);return t.value=new a.WrappingStyle(parseInt(r.value)),t},e.prototype.parse_tag_r=function(e){var t=new f(e);if(null===this.read(t,"r"))return e.pop(),null;for(var n=new f(t,""),r=this._peek();this._haveMore()&&"\\"!==r&&"}"!==r;r=this._peek())n.value+=r;return n.value.length>0?t.value=new a.Reset(n.value):t.value=new a.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 f(e);if(null===this.read(t,"t"))return e.pop(),null;if(null===this.read(t,"("))return e.pop(),null;var n=null,r=null,i=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,r=o,null===this.read(t,","))return e.pop(),
null;var l=this.parse_decimal(t);if(null!==l&&(i=l,null===this.read(t,",")))return e.pop(),null}else if(i=s,null===this.read(t,","))return e.pop(),null}for(var u=[],d=this._peek();this._haveMore()&&")"!==d&&"}"!==d;d=this._peek()){var c=null;if(null!==this.read(t,"\\")&&(c=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===c&&t.pop()),null===c&&(c=this.parse_comment(t)),null===c)return e.pop(),null;c.value instanceof a.Comment&&u[u.length-1]instanceof a.Comment?u[u.length-1]=new a.Comment(u[u.length-1].value+c.value.value):u.push(c.value)}return this.read(t,")"),t.value=new a.Transform(null!==n?n.value/1e3:null,null!==r?r.value/1e3:null,null!==i?i.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 f(e),n=null,r=[];for(t.value=[];this._haveMore();){for(;null!==this.read(t," "););
if(!this._haveMore())break;if(null!==n){var i=this.parse_decimal(t);if(null!==i){r.push(i),"m"===n&&2===r.length?(t.value.push(new a.drawing.MoveInstruction(r[0].value,r[1].value)),r.splice(0,r.length)):"l"===n&&2===r.length?(t.value.push(new a.drawing.LineInstruction(r[0].value,r[1].value)),r.splice(0,r.length)):"b"===n&&6===r.length&&(t.value.push(new a.drawing.CubicBezierCurveInstruction(r[0].value,r[1].value,r[2].value,r[3].value,r[4].value,r[5].value)),r.splice(0,r.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,r.splice(0,r.length)}}for(;null!==this.read(t," "););return t},e.prototype.parse_decimalInt32=function(e){for(var t=new f(e),n=null!==this.read(t,"-"),r=new f(t,""),a=this._peek();this._haveMore()&&a>="0"&&a<="9";a=this._peek())r.value+=a;if(0===r.value.length)return e.pop(),null;var i=parseInt(r.value);return i>=4294967295?i=4294967295:n&&(i=-i),t.value=i,t},e.prototype.parse_hexInt32=function(e){for(var t=new f(e),n=null!==this.read(t,"-"),r=new f(t,""),a=this._peek();this._haveMore()&&(a>="0"&&a<="9"||a>="a"&&a<="f"||a>="A"&&a<="F");a=this._peek())r.value+=a;
if(0===r.value.length)return e.pop(),null;var i=parseInt(r.value,16);return i>=4294967295?i=4294967295:n&&(i=-i),t.value=i,t},e.prototype.parse_decimalOrHexInt32=function(e){var t=new f(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 f(e),n=null!==this.read(t,"-"),r=this.parse_unsignedDecimal(t);return null===r?(e.pop(),null):(t.value=r.value,
n&&(t.value=-t.value),t)},e.prototype.parse_unsignedDecimal=function(e){for(var t=new f(e),n=new f(t,""),r=null,a=this._peek();this._haveMore()&&a>="0"&&a<="9";a=this._peek())n.value+=a;if(0===n.value.length)return e.pop(),null;if(null!==this.read(t,".")){r=new f(t,"");for(var a=this._peek();this._haveMore()&&a>="0"&&a<="9";a=this._peek())r.value+=a;if(0===r.value.length)return e.pop(),null}return t.value=parseFloat(n.value+(null!==r?"."+r.value:"")),t},e.prototype.parse_enableDisable=function(e){
var t=this._peek();if("0"===t||"1"===t){var n=new f(e,t);return n.value="1"===n.value,n}return null},e.prototype.parse_color=function(e){for(var t=new f(e);null!==this.read(t,"&")||null!==this.read(t,"H"););var n=this.parse_hexInt32(t);if(null===n)return e.pop(),null;var r=n.value;for(t.value=new a.Color(255&r,r>>8&255,r>>16&255);null!==this.read(t,"&")||null!==this.read(t,"H"););return t},e.prototype.parse_alpha=function(e){for(var t=new f(e);null!==this.read(t,"&")||null!==this.read(t,"H"););var n=this.parse_hexInt32(t);
if(null===n)return e.pop(),null;var r=n.value;for(t.value=1-(255&r)/255;null!==this.read(t,"&")||null!==this.read(t,"H"););return t},e.prototype.parse_colorWithAlpha=function(e){var t=new f(e),n=this.parse_decimalOrHexInt32(t);if(null===n)return e.pop(),null;var r=n.value;return t.value=new a.Color(255&r,r>>8&255,r>>16&255,1-(r>>24&255)/255),t},e.prototype.read=function(e,t){return this._peek(t.length)!==t?null:new f(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 r=new f(t);if(null===this.read(r,e))return t.pop(),null;if(null===this.read(r,"("))return t.pop(),null;var i=null,s=null,o=null,l=null,u=null,d=null,c=this.parse_decimal(r);if(null!==c){if(null===this.read(r,","))return t.pop(),null;var p=this.parse_decimal(r);null!==p?(i=c,o=p):u=c}if(null!==i&&null!==o){if(null===this.read(r,","))return t.pop(),null;if(s=this.parse_decimal(r),
null===this.read(r,","))return t.pop(),null;l=this.parse_decimal(r),r.value=new a.RectangularClip(i.value,o.value,s.value,l.value,"clip"===e)}else{d=new f(r,"");for(var h=this._peek();this._haveMore()&&")"!==h&&"}"!==h;h=this._peek())d.value+=h;r.value=new a.VectorClip(null!==u?u.value:1,n(d.value,"drawingInstructions"),"clip"===e)}return null===this.read(r,")")?(t.pop(),null):r},e}();r("alpha",a.Alpha,l.prototype.parse_alpha,!1),r("be",a.Blur,l.prototype.parse_decimal,!1),r("blur",a.GaussianBlur,l.prototype.parse_decimal,!1),
r("bord",a.Border,l.prototype.parse_decimal,!1),r("c",a.PrimaryColor,l.prototype.parse_color,!1),r("fax",a.SkewX,l.prototype.parse_decimal,!1),r("fay",a.SkewY,l.prototype.parse_decimal,!1),r("fr",a.RotateZ,l.prototype.parse_decimal,!1),r("frx",a.RotateX,l.prototype.parse_decimal,!1),r("fry",a.RotateY,l.prototype.parse_decimal,!1),r("frz",a.RotateZ,l.prototype.parse_decimal,!1),r("fs",a.FontSize,l.prototype.parse_decimal,!1),r("fsp",a.LetterSpacing,l.prototype.parse_decimal,!1),r("i",a.Italic,l.prototype.parse_enableDisable,!1),
r("p",a.DrawingMode,l.prototype.parse_decimal,!0),r("pbo",a.DrawingBaselineOffset,l.prototype.parse_decimal,!0),r("s",a.StrikeThrough,l.prototype.parse_enableDisable,!1),r("shad",a.Shadow,l.prototype.parse_decimal,!1),r("u",a.Underline,l.prototype.parse_enableDisable,!1),r("xbord",a.BorderX,l.prototype.parse_decimal,!1),r("xshad",a.ShadowX,l.prototype.parse_decimal,!1),r("ybord",a.BorderY,l.prototype.parse_decimal,!1),r("yshad",a.ShadowY,l.prototype.parse_decimal,!1),r("1a",a.PrimaryAlpha,l.prototype.parse_alpha,!1),
r("1c",a.PrimaryColor,l.prototype.parse_color,!1),r("2a",a.SecondaryAlpha,l.prototype.parse_alpha,!1),r("2c",a.SecondaryColor,l.prototype.parse_color,!1),r("3a",a.OutlineAlpha,l.prototype.parse_alpha,!1),r("3c",a.OutlineColor,l.prototype.parse_color,!1),r("4a",a.ShadowAlpha,l.prototype.parse_alpha,!1),r("4c",a.ShadowColor,l.prototype.parse_color,!1);for(var u=0,d=Object.keys(l.prototype);u<d.length;u++){var c=d[u];0===c.indexOf("parse_")&&"function"==typeof l.prototype[c]&&o.set(c.substr("parse_".length),l.prototype[c]);
}var f=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),h=t(36),v=t(38);v.registerWorkerCommand(h.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 r=e.charCodeAt(n)-33;if(r<0||r>63)throw new Error("Out-of-range character code "+r+" at index "+n+" in string "+e);t+=r<26?String.fromCharCode("A".charCodeAt(0)+r):r<52?String.fromCharCode("a".charCodeAt(0)+r-26):r<62?String.fromCharCode("0".charCodeAt(0)+r-52):62===r?"+":"/";
}return t}var r,a=t(23),i=t(24),s=t(29),o=t(26),l=t(25),u=t(30),d=t(32),c=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"}(r||(r={}));var f=function(){function e(e){var t=this;this._stream=e,this._ass=new i.ASS,this._minimalDeferred=new d.DeferredPromise,this._deferred=new d.DeferredPromise,this._shouldSwallowBom=!0,this._currentSection=r.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===r.ScriptInfo&&e!==r.ScriptInfo&&this._minimalDeferred.resolve(this._ass),e===r.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=r.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=r.ScriptInfo;else if("[V4+ Styles]"===e||"[V4 Styles]"===e)this.currentSection=r.Styles;else if("[Events]"===e)this.currentSection=r.Events;else if("[Fonts]"===e)this.currentSection=r.Fonts;else if("[Graphics]"===e)this.currentSection=r.Graphics;else switch(null===this._currentAttachment&&"["===e[0]&&"]"===e[e.length-1]&&(this.currentSection=r.Other),
this.currentSection){case r.ScriptInfo:var i=c.parseLineIntoProperty(e);if(null!==i)switch(i.name){case"PlayResX":this._ass.properties.resolutionX=parseInt(i.value);break;case"PlayResY":this._ass.properties.resolutionY=parseInt(i.value);break;case"WrapStyle":this._ass.properties.wrappingStyle=parseInt(i.value);break;case"ScaledBorderAndShadow":this._ass.properties.scaleBorderAndShadow="yes"===i.value}break;case r.Styles:if(null===this._ass.stylesFormatSpecifier){var s=c.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){a.debugMode&&console.error("Could not parse style from line "+e+" - "+(o.stack||o))}break;case r.Events:if(null===this._ass.dialoguesFormatSpecifier){var u=c.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){a.debugMode&&console.error("Could not parse event from line "+e+" - "+(o.stack||o))}break;case r.Fonts:
case r.Graphics:var d=this.currentSection===r.Fonts?/^fontname:(.+)/:/^filename:(.+)/,f=d.exec(e);if(null!==f)null!==this._currentAttachment&&(this._ass.addAttachment(this._currentAttachment),this._currentAttachment=null),this._currentAttachment=new l.Attachment(f[1].trim(),this.currentSection===r.Fonts?l.AttachmentType.Font:l.AttachmentType.Graphic);else if(null!==this._currentAttachment)try{this._currentAttachment.contents+=n(e)}catch(o){a.debugMode&&console.error("Encountered error while reading font "+this._currentAttachment.filename+": %o",o),
this._currentAttachment=null}break;case r.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=f;var p=function(){function e(e){var t=this;this._stream=e,this._ass=new i.ASS,this._deferred=new d.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,r){
return"{c&H"+r+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 r=n(32),a=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=r.Promise.resolve(this._str.substring(this._readTill,t)),
this._readTill=t+1):(e=r.Promise.resolve(this._str.substr(this._readTill)),this._readTill=this._str.length)}else e=r.Promise.resolve(null);return e},e}();t.StringStream=a;var i=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 r.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=i;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 r.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,r=t.done;r?(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)),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);for(var a={dataView:new DataView(n.buffer),position:0},i=d.read(a),s=null,r=0;r<i.numTables;r++){var o=c.read(a);if(o.c1+o.c2+o.c3+o.c4==="name"){s=o;break}}a.position=s.offset;for(var u=f.read(a),h=new l.Set,r=0;r<u.count;r++){var v=p.read(a);switch(v.nameId){case 1:case 4:case 6:var g=s.offset+u.stringOffset+v.offset,m=n.subarray(g,g+v.length);switch(v.platformId){
case 1:for(var y="",b=0;b<m.length;b++)y+=String.fromCharCode(m[b]);h.add(y);break;case 3:for(var P="",b=0;b<m.length;b+=2)P+=String.fromCharCode((m[b]<<8)+m[b+1]);h.add(P)}}}return h}function r(e){var t=e.__fields;return e.read=function(n){for(var r=new e,a=0;a<t.length;a++){var s=t[a],o=void 0;switch(s.type){case i.Char:o=String.fromCharCode(n.dataView.getInt8(n.position)),n.position+=1;break;case i.Uint16:o=n.dataView.getUint16(n.position),n.position+=2;break;case i.Uint32:o=n.dataView.getUint32(n.position),
n.position+=4}r[s.field]=o}return r},e}function a(e){var t=u.get(e);return void 0===t&&(t=function(t,n){var r=t.constructor;void 0===r.__fields&&(r.__fields=[]),r.__fields.push({type:e,field:n})},u.set(e,t)),t}var i,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"}(i||(i={}));var u=new o.Map,d=function(){function e(){}return s([a(i.Uint16)],e.prototype,"majorVersion",void 0),s([a(i.Uint16)],e.prototype,"minorVersion",void 0),s([a(i.Uint16)],e.prototype,"numTables",void 0),
s([a(i.Uint16)],e.prototype,"searchRange",void 0),s([a(i.Uint16)],e.prototype,"entrySelector",void 0),s([a(i.Uint16)],e.prototype,"rangeShift",void 0),e=s([r],e)}(),c=function(){function e(){}return s([a(i.Char)],e.prototype,"c1",void 0),s([a(i.Char)],e.prototype,"c2",void 0),s([a(i.Char)],e.prototype,"c3",void 0),s([a(i.Char)],e.prototype,"c4",void 0),s([a(i.Uint32)],e.prototype,"checksum",void 0),s([a(i.Uint32)],e.prototype,"offset",void 0),s([a(i.Uint32)],e.prototype,"length",void 0),e=s([r],e);
}(),f=function(){function e(){}return s([a(i.Uint16)],e.prototype,"formatSelector",void 0),s([a(i.Uint16)],e.prototype,"count",void 0),s([a(i.Uint16)],e.prototype,"stringOffset",void 0),e=s([r],e)}(),p=function(){function e(){}return s([a(i.Uint16)],e.prototype,"platformId",void 0),s([a(i.Uint16)],e.prototype,"encodingId",void 0),s([a(i.Uint16)],e.prototype,"languageId",void 0),s([a(i.Uint16)],e.prototype,"nameId",void 0),s([a(i.Uint16)],e.prototype,"length",void 0),s([a(i.Uint16)],e.prototype,"offset",void 0),
e=s([r],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 r=function(){function e(e,t,n,r,a,i){this._x1=e,this._y1=t,this._x2=n,this._y2=r,this._x3=a,this._y3=i}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=r},function(e,t){var n=t(7);e.drawing=n;var r=function(){function e(e,t,n,r){void 0===r&&(r=1),this._red=e,this._green=t,this._blue=n,this._alpha=r}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=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}();e.Comment=a;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.prototype.toString=function(){return"Text { value: "+this._value.replace(/\u00A0/g,"\\h")+" }"},e}();e.Text=i;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 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.StrikeThrough=d;
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.Border=c;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.BorderX=f;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 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.Shadow=h;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.ShadowX=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.ShadowY=g;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.Blur=m;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 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.FontSize=P;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.FontSizePlus=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.FontSizeMinus=S;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.FontScaleX=_;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.FontScaleY=T;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.LetterSpacing=I;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.RotateX=M;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.RotateY=C;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.RotateZ=x;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.SkewX=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.SkewY=k;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.PrimaryColor=D;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.SecondaryColor=A;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.OutlineColor=O;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.ShadowColor=R;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 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.SecondaryAlpha=j;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.OutlineAlpha=U;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.ShadowAlpha=$;var z=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=z;var F=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=F;var B=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=B;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.OutlineKaraoke=V;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.WrappingStyle=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.Reset=q;var W=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=W;var G=function(){function e(e,t,n,r,a,i){this._x1=e,this._y1=t,this._x2=n,this._y2=r,this._t1=a,
this._t2=i}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=G;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 Q=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=Q;var K=function(){function e(e,t,n,r,a,i,s){this._a1=e,this._a2=t,this._a3=n,this._t1=r,this._t2=a,this._t3=i,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=K;var X=function(){function e(e,t,n,r){this._start=e,this._end=t,this._accel=n,this._tags=r}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 Z=function(){function e(e,t,n,r,a){this._x1=e,this._y1=t,this._x2=n,this._y2=r,this._inside=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,"inside",{get:function(){return this._inside},enumerable:!0,configurable:!0}),e}();e.RectangularClip=Z;var J=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=J;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 re=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?" ":"")+"}"}}},ae=t(38),ie=0,se=Object.keys(e);ie<se.length;ie++){var oe=se[ie],le=e[oe];le instanceof Function&&(re(le,oe),ae.registerClassPrototype(le.prototype))}for(var ue=0,de=Object.keys(n);ue<de.length;ue++){var oe=de[ue],le=n[oe];le instanceof Function&&(re(le,"Drawing"+oe),ae.registerClassPrototype(le.prototype))}},function(e,t){var n=t(23),r=t(11),a=function(){function e(e,t){this._getCurrentTime=e,this._autoPauseAfter=t,this._manualClock=new r.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 r=this._manualClock.currentTime,a=this._getCurrentTime();this._manualClock.paused?r!==a&&(this._lastKnownExternalTime=a,this._lastKnownExternalTimeObtainedAt=e,this._manualClock.tick(a)):null!==this._lastKnownExternalTime&&a===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=a,this._lastKnownExternalTimeObtainedAt=e,this._manualClock.tick(a)),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=a},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 r=0;r<n.length;r++){
var a=n[r];a.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),r=t(30),a=t(10),i=function(){function e(){this._currentTime=-1,this._rate=1,this._enabled=!0,this._paused=!0,this._eventListeners=new r.Map}return e.prototype.play=function(){this._enabled&&this._paused&&(this._paused=!1,this._dispatchEvent(a.ClockEvent.Play,[]))},e.prototype.tick=function(e){
this._enabled&&this._currentTime!==e&&(this.play(),this._currentTime=e,this._dispatchEvent(a.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(a.ClockEvent.Pause,[])))},e.prototype.stop=function(){this._dispatchEvent(a.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(a.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=i,n.mixin(i,[a.EventSource])},function(e,t){var n=t(9),r=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=r},function(e,t){var n=t(34).__extends,r=t(12),a=t(21),i=function(e){function t(t,n,a){e.call(this,n,new r.VideoClock(t),document.createElement("div"),a),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,r=this._video.offsetWidth,a=this._video.offsetHeight,i=Math.min(r/t,a/n),s=t*i,o=n*i,l=(r-s)/2,u=(a-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}(a.WebRenderer);e.DefaultRenderer=i},function(e,t){var n=t(10);
e.ClockEvent=n.ClockEvent,e.EventSource=n.EventSource;var r=t(9);e.AutoClock=r.AutoClock;var a=t(11);e.ManualClock=a.ManualClock;var i=t(12);e.VideoClock=i.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),r=t(16),a=t(23),i=function(){function e(t,a,i){var s=this;this._ass=t,this._clock=a,this._id=++e._lastRendererId,this._settings=r.RendererSettings.from(i),
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(){a.verboseMode&&console.log("NullRenderer._onClockPlay")},e.prototype._onClockTick=function(){var e=this._clock.currentTime;a.verboseMode&&console.log("NullRenderer._onClockTick: currentTime = "+e);
for(var t=0,n=this._ass.dialogues;t<n.length;t++){var r=n[t];r.end>e&&(r.start<=e?this.draw(r):r.start<=e+this._settings.preRenderTime&&this.preRender(r))}},e.prototype._onClockPause=function(){a.verboseMode&&console.log("NullRenderer._onClockPause")},e.prototype._onClockStop=function(){a.verboseMode&&console.log("NullRenderer._onClockStop")},e.prototype._onClockRateChange=function(){a.verboseMode&&console.log("NullRenderer._onClockRateChange")},e._lastRendererId=-1,e}();e.NullRenderer=i},function(e,t){
function n(e){return e.type===CSSRule.FONT_FACE_RULE}var r=t(30),a=function(){function e(){}return e.makeFontMapFromStyleElement=function(e){for(var t=new r.Map,a=e.sheet,i=0;i<a.cssRules.length;i++){var s=a.cssRules[i];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,r=n.fontMap,a=void 0===r?null:r,i=n.preRenderTime,s=void 0===i?5:i,o=n.preciseOutlines,l=void 0!==o&&o,u=n.enableSvg,d=void 0===u||u,c=n.fallbackFonts,f=void 0===c?'Arial, Helvetica, sans-serif, "Segoe UI Symbol"':c,p=n.useAttachedFonts,h=void 0!==p&&p,v=new e;return v.fontMap=a,v.preRenderTime=s,v.preciseOutlines=l,v.enableSvg=d,v.fallbackFonts=f,v.useAttachedFonts=h,v},e}();e.RendererSettings=a},function(e,t){var n=t(30),r=function(){
function e(t,r){this._style=r,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,r=null,a=0;a<t.length;a++){var i=t[a];
null===n&&(n=i.time),r=i.time}for(var s="",o=0;o<t.length;o++){var i=t[o];s+="\t"+(100*(r-n===0?1:(i.time-n)/(r-n))).toFixed(3)+"% {\n",i.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+" "+((r-n)/this._rate).toFixed(3)+"s "+e,
this._animationDelays.set(l,n)},e._nextId=0,e}();e.AnimationCollection=r},function(e,t){var n=t(8),r=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 r=Math.pow(2,this._scale-1),a=this._outputScaleX/r,i=this._outputScaleY/r,s=document.createElementNS("http://www.w3.org/2000/svg","path"),o=0,l=0,u=0,d=e.instructions;u<d.length;u++){
var c=d[u];c instanceof n.drawing.MoveInstruction?(s.pathSegList.appendItem(s.createSVGPathSegMovetoAbs(c.x,c.y+this._baselineOffset)),o=Math.max(o,c.x),l=Math.max(l,c.y+this._baselineOffset)):c instanceof n.drawing.LineInstruction?(s.pathSegList.appendItem(s.createSVGPathSegLinetoAbs(c.x,c.y+this._baselineOffset)),o=Math.max(o,c.x),l=Math.max(l,c.y+this._baselineOffset)):c instanceof n.drawing.CubicBezierCurveInstruction&&(s.pathSegList.appendItem(s.createSVGPathSegCurvetoCubicAbs(c.x3,c.y3+this._baselineOffset,c.x1,c.y1+this._baselineOffset,c.x2,c.y2+this._baselineOffset)),
o=Math.max(o,c.x1,c.x2,c.x3),l=Math.max(l,c.y1+this._baselineOffset,c.y2+this._baselineOffset,c.y3+this._baselineOffset))}var f=document.createElementNS("http://www.w3.org/2000/svg","svg");f.setAttribute("version","1.1"),f.width.baseVal.valueAsString=(o*a).toFixed(3)+"px",f.height.baseVal.valueAsString=(l*i).toFixed(3)+"px";var p=document.createElementNS("http://www.w3.org/2000/svg","g");return f.appendChild(p),p.setAttribute("transform","scale("+a.toFixed(3)+" "+i.toFixed(3)+")"),p.appendChild(s),
s.setAttribute("fill",t.toString()),f},e}();e.DrawingStyles=r},function(e,t){function n(e,t,n,r){var a='"'+e+'"';""!==n&&(a+=", "+n),r.style.fontFamily=a,r.style.fontSize=t+"px"}function r(e,t,r,a){return n(e,t,r,a),new u.Promise(function(e){return setTimeout(function(){return e(a.offsetHeight)},1e3)})}function a(e,t,r,a){return n(e,t,r,a),a.offsetHeight}function i(e,t){return[e,180/(t-e)]}function s(e,t,n){return r(e,180,t,n).then(function(a){return r(e,360,t,n).then(function(e){return i(a,e)})});
}function o(e,t,n){return 180+(e-t)*n}function l(e,t,n,r,s){var l=s.get(e);if(void 0===l){var u=a(e,180,n,r),d=a(e,360,n,r);s.set(e,l=i(u,d))}var c=l[0],f=l[1];return o(t,c,f)}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 r=n(34).__extends,a=n(17),i=n(18),s=n(19),o=n(20),l=n(22),u=n(10),d=n(15),c=n(6),f=n(8),p=n(23),h=n(25),v=n(27),g=n(31),m=n(30),y=n(32),b=/^(url|local)\(["']?(.+?)["']?\)$/,P=function(t){function n(n,r,a,i){var s=this;t.call(this,n,r,function(){if(!(a instanceof HTMLDivElement)){var e=i;i=a,a=e,console.warn("WebRenderer's constructor now takes libjassSubsWrapper as the third parameter and settings as the fourth parameter. Please update the caller.");
}return i}()),this._libjassSubsWrapper=a,this._layerWrappers=[],this._layerAlignmentWrappers=[],this._fontMetricsCache=new m.Map,this._currentSubs=new m.Map,this._preRenderedSubs=new m.Map,this._eventListeners=new m.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 m.Map,u=null===this.settings.fontMap?new m.Map:this.settings.fontMap,d=new m.Map;this.settings.useAttachedFonts&&n.attachments.forEach(function(e){if(e.type===h.AttachmentType.Font){var t=null;try{t=c.getTtfNames(e)}catch(n){return void console.error(n)}var r="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(r);else{var n=d.get(e);void 0===n&&d.set(e,n=[]),n.push(r)}else u.set(e,[r])})}}),u.forEach(function(t,n){var r;if(e.document.fonts&&e.document.fonts.add){var a="string"==typeof t?t:t.map(function(e){return null!==e.match(b)?e:'url("'+e+'")'}).join(", "),i=d.get(n);if(void 0!==i)for(var u=0;u<i.length;u++){var c=i[u];a+=', url("'+c+'")'}var f=[];e.document.fonts.forEach(function(e){e.family!==n&&e.family!=='"'+n+'"'||f.push(e)});var h;if(0===f.length){
var v=new FontFace(n,a),g=new FontFace('"'+n+'"',a);e.document.fonts.add(v),e.document.fonts.add(g),h=y.any([v.load(),g.load()])}else h=y.any(f.map(function(e){return e.load()}));r=s._calculateFontMetricsAfterFetch(n,h.catch(function(e){return console.warn("Fetching fonts for "+n+" at "+a+" failed: %o",e),null}))}else{var m=("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;
}),i=d.get(n);void 0!==i&&(m=m.concat(i));var P=m.map(function(e){var t=l.get(e);return void 0===t&&(t=new y.Promise(function(t,n){var r=new XMLHttpRequest;r.addEventListener("load",function(){p.debugMode&&console.log("Preloaded "+e+"."),t(null)}),r.addEventListener("error",function(e){n(e)}),r.open("GET",e,!0),r.send()}),l.set(e,t)),t}),w=0===P.length?y.Promise.resolve(null):y.first(P).catch(function(e){return console.warn("Fetching fonts for "+n+" at "+m.join(", ")+" failed: %o",e),null});r=s._calculateFontMetricsAfterFetch(n,w);
}o.push(r.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 r(n,t),Object.defineProperty(n.prototype,"libjassSubsWrapper",{get:function(){return this._libjassSubsWrapper},enumerable:!0,configurable:!0}),n.prototype.resize=function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=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=r.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,r=this._preRenderedSubs.get(e.id);if(r)return r;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 d=document.createElement("style");d.id="libjass-animation-styles-"+this.id+"-"+e.id,d.type="text/css";var c=new a.AnimationCollection(this,d),h=document.createElementNS("http://www.w3.org/2000/svg","svg");h.setAttribute("version","1.1"),
h.setAttribute("class","libjass-filters"),h.width.baseVal.valueAsString="0",h.height.baseVal.valueAsString="0";var g=document.createElementNS("http://www.w3.org/2000/svg","defs");h.appendChild(g);var y=null,b=new l.SpanStyles(this,e,this._scaleX,this._scaleY,this.settings,this._fontSizeElement,g,this._fontMetricsCache),P=null,w=!1,S=function(e){null!==y&&y.hasChildNodes()&&u.appendChild(b.setStylesOnSpan(y,P)),null!==P&&P.animationDelays.forEach(function(e,t){return c.animationDelays.set(t,e)}),e&&(w?u.appendChild(b.makeNewLine()):u.appendChild(document.createElement("br"))),
y=document.createElement("span"),P=new a.AnimationCollection(t,d),w=e};S(!1);for(var _=new i.DrawingStyles(this._scaleX,this._scaleY),T=this.ass.properties.wrappingStyle,I=0,M=0,C=e.parts;M<C.length;M++){var x=C[M];if(x instanceof f.Italic)b.italic=x.value;else if(x instanceof f.Bold)b.bold=x.value;else if(x instanceof f.Underline)b.underline=x.value;else if(x instanceof f.StrikeThrough)b.strikeThrough=x.value;else if(x instanceof f.Border)b.outlineWidth=x.value,b.outlineHeight=x.value;else if(x instanceof f.BorderX)b.outlineWidth=x.value;else if(x instanceof f.BorderY)b.outlineHeight=x.value;else if(x instanceof f.Shadow)b.shadowDepthX=x.value,
b.shadowDepthY=x.value;else if(x instanceof f.ShadowX)b.shadowDepthX=x.value;else if(x instanceof f.ShadowY)b.shadowDepthY=x.value;else if(x instanceof f.Blur)b.blur=x.value;else if(x instanceof f.GaussianBlur)b.gaussianBlur=x.value;else if(x instanceof f.FontName)b.fontName=x.value;else if(x instanceof f.FontSize)b.fontSize=x.value;else if(x instanceof f.FontSizePlus)b.fontSize+=x.value;else if(x instanceof f.FontSizeMinus)b.fontSize-=x.value;else if(x instanceof f.FontScaleX)b.fontScaleX=x.value;else if(x instanceof f.FontScaleY)b.fontScaleY=x.value;else if(x instanceof f.LetterSpacing)b.letterSpacing=x.value;else if(x instanceof f.RotateX)b.rotationX=x.value;else if(x instanceof f.RotateY)b.rotationY=x.value;else if(x instanceof f.RotateZ)b.rotationZ=x.value;else if(x instanceof f.SkewX)b.skewX=x.value;else if(x instanceof f.SkewY)b.skewY=x.value;else if(x instanceof f.PrimaryColor)b.primaryColor=x.value;else if(x instanceof f.SecondaryColor)b.secondaryColor=x.value;else if(x instanceof f.OutlineColor)b.outlineColor=x.value;else if(x instanceof f.ShadowColor)b.shadowColor=x.value;else if(x instanceof f.Alpha)b.primaryAlpha=x.value,
b.secondaryAlpha=x.value,b.outlineAlpha=x.value,b.shadowAlpha=x.value;else if(x instanceof f.PrimaryAlpha)b.primaryAlpha=x.value;else if(x instanceof f.SecondaryAlpha)b.secondaryAlpha=x.value;else if(x instanceof f.OutlineAlpha)b.outlineAlpha=x.value;else if(x instanceof f.ShadowAlpha)b.shadowAlpha=x.value;else if(x instanceof f.Alignment);else if(x instanceof f.ColorKaraoke)S(!1),P.add("step-end",[new o.Keyframe(0,new m.Map([["color",b.secondaryColor.withAlpha(b.secondaryAlpha).toString()]])),new o.Keyframe(I,new m.Map([["color",b.primaryColor.withAlpha(b.primaryAlpha).toString()]]))]),
I+=x.duration;else if(x instanceof f.WrappingStyle)T=x.value;else if(x instanceof f.Reset)b.reset(this.ass.styles.get(x.value));else if(x instanceof f.Position)u.style.position="absolute",u.style.left=(this._scaleX*x.x).toFixed(3)+"px",u.style.top=(this._scaleY*x.y).toFixed(3)+"px";else if(x instanceof f.Move)u.style.position="absolute",c.add("linear",[new o.Keyframe(0,new m.Map([["left",(this._scaleX*x.x1).toFixed(3)+"px"],["top",(this._scaleY*x.y1).toFixed(3)+"px"]])),new o.Keyframe(x.t1,new m.Map([["left",(this._scaleX*x.x1).toFixed(3)+"px"],["top",(this._scaleY*x.y1).toFixed(3)+"px"]])),new o.Keyframe(x.t2,new m.Map([["left",(this._scaleX*x.x2).toFixed(3)+"px"],["top",(this._scaleY*x.y2).toFixed(3)+"px"]])),new o.Keyframe(e.end-e.start,new m.Map([["left",(this._scaleX*x.x2).toFixed(3)+"px"],["top",(this._scaleY*x.y2).toFixed(3)+"px"]]))]);else if(x instanceof f.Fade)c.add("linear",[new o.Keyframe(0,new m.Map([["opacity","0"]])),new o.Keyframe(x.start,new m.Map([["opacity","1"]])),new o.Keyframe(e.end-e.start-x.end,new m.Map([["opacity","1"]])),new o.Keyframe(e.end-e.start,new m.Map([["opacity","0"]]))]);else if(x instanceof f.ComplexFade)c.add("linear",[new o.Keyframe(0,new m.Map([["opacity",x.a1.toFixed(3)]])),new o.Keyframe(x.t1,new m.Map([["opacity",x.a1.toFixed(3)]])),new o.Keyframe(x.t2,new m.Map([["opacity",x.a2.toFixed(3)]])),new o.Keyframe(x.t3,new m.Map([["opacity",x.a2.toFixed(3)]])),new o.Keyframe(x.t4,new m.Map([["opacity",x.a3.toFixed(3)]])),new o.Keyframe(e.end-e.start,new m.Map([["opacity",x.a3.toFixed(3)]]))]);else if(x instanceof f.Transform)for(var E=s<=x.start?0:s>=x.end?1:Math.pow((s-x.start)/(x.end-x.start),x.accel),k=0,D=x.tags;k<D.length;k++){
var A=D[k];A instanceof f.Border?(b.outlineWidth+=E*(A.value-b.outlineWidth),b.outlineHeight+=E*(A.value-b.outlineHeight)):A instanceof f.BorderX?b.outlineWidth+=E*(A.value-b.outlineWidth):A instanceof f.BorderY?b.outlineHeight+=E*(A.value-b.outlineHeight):A instanceof f.Shadow?(b.shadowDepthX+=E*(A.value-b.shadowDepthX),b.shadowDepthY+=E*(A.value-b.shadowDepthY)):A instanceof f.ShadowX?b.shadowDepthX+=E*(A.value-b.shadowDepthX):A instanceof f.ShadowY?b.shadowDepthY+=E*(A.value-b.shadowDepthY):A instanceof f.Blur?b.blur+=E*(A.value-b.blur):A instanceof f.GaussianBlur?b.gaussianBlur+=E*(A.value-b.gaussianBlur):A instanceof f.FontSize?b.fontSize+=E*(A.value-b.fontSize):A instanceof f.FontSizePlus?b.fontSize+=E*A.value:A instanceof f.FontSizeMinus?b.fontSize-=E*A.value:A instanceof f.FontScaleX?b.fontScaleX+=E*(A.value-b.fontScaleX):A instanceof f.FontScaleY?b.fontScaleY+=E*(A.value-b.fontScaleY):A instanceof f.LetterSpacing?b.letterSpacing+=E*(A.value-b.letterSpacing):A instanceof f.RotateX?b.rotationX+=E*(A.value-b.rotationX):A instanceof f.RotateY?b.rotationY+=E*(A.value-b.rotationY):A instanceof f.RotateZ?b.rotationZ+=E*(A.value-b.rotationZ):A instanceof f.SkewX?b.skewX+=E*(A.value-b.skewX):A instanceof f.SkewY?b.skewY+=E*(A.value-b.skewY):A instanceof f.PrimaryColor?b.primaryColor=b.primaryColor.interpolate(A.value,E):A instanceof f.SecondaryColor?b.secondaryColor=b.secondaryColor.interpolate(A.value,E):A instanceof f.OutlineColor?b.outlineColor=b.outlineColor.interpolate(A.value,E):A instanceof f.ShadowColor?b.shadowColor=b.shadowColor.interpolate(A.value,E):A instanceof f.Alpha?(b.primaryAlpha+=E*(A.value-b.primaryAlpha),
b.secondaryAlpha+=E*(A.value-b.secondaryAlpha),b.outlineAlpha+=E*(A.value-b.outlineAlpha),b.shadowAlpha+=E*(A.value-b.shadowAlpha)):A instanceof f.PrimaryAlpha?b.primaryAlpha+=E*(A.value-b.primaryAlpha):A instanceof f.SecondaryAlpha?b.secondaryAlpha+=E*(A.value-b.secondaryAlpha):A instanceof f.OutlineAlpha?b.outlineAlpha+=E*(A.value-b.outlineAlpha):A instanceof f.ShadowAlpha&&(b.shadowAlpha+=E*(A.value-b.shadowAlpha))}else x instanceof f.DrawingMode?0!==x.scale&&(_.scale=x.scale):x instanceof f.DrawingBaselineOffset?_.baselineOffset=x.value:x instanceof f.DrawingInstructions?(y.appendChild(_.toSVG(x,b.primaryColor.withAlpha(b.primaryAlpha))),
S(!1)):x instanceof f.Text?(y.appendChild(document.createTextNode(x.value+"\u200c")),S(!1)):p.debugMode&&x instanceof f.Comment?(y.appendChild(document.createTextNode(x.value)),S(!1)):x instanceof f.NewLine&&S(!0)}for(var O=0,R=e.parts;O<R.length;O++){var x=R[O];if(x instanceof f.Position||x instanceof f.Move){var L=n._transformOrigins[e.alignment],N="translate("+-L[0]+"%, "+-L[1]+"%) translate(-"+u.style.marginLeft+", -"+u.style.marginTop+")",j=L[0]+"% "+L[1]+"%";u.style.webkitTransform=N,u.style.webkitTransformOrigin=j,
u.style.transform=N,u.style.transformOrigin=j;break}}switch(T){case v.WrappingStyle.EndOfLineWrapping:u.style.whiteSpace="pre-wrap";break;case v.WrappingStyle.NoLineWrapping:u.style.whiteSpace="pre";break;case v.WrappingStyle.SmartWrappingWithWiderTopLine:case v.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=c.animationStyle,u.style.animation=c.animationStyle,u.setAttribute("data-dialogue-id",this.id+"-"+e.id),""!==d.textContent&&u.appendChild(d),g.hasChildNodes()&&u.appendChild(h);var U={sub:u,animationDelays:c.animationDelays};return e.containsTransformTag||this._preRenderedSubs.set(e.id,U),U},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 r=n.sub.cloneNode(!0),a=function(r){var a=r.style.animationName||r.style.webkitAnimationName;if(void 0!==a&&""!==a){var i=a.split(",").map(function(r){r=r.trim();var a=n.animationDelays.get(r);return((a+e.start-t.clock.currentTime)/t.clock.rate).toFixed(3)+"s"}).join(", ");r.style.webkitAnimationDelay=i,r.style.animationDelay=i}};a(r);for(var i=r.querySelectorAll('[style*="animation:"]'),s=0;s<i.length;s++)a(i[s]);var o=e.layer,l="absolute"===r.style.position?0:e.alignment;
if(void 0===this._layerWrappers[o]){var u=document.createElement("div");u.className="layer layer"+o;for(var d=null,c=o+1;c<this._layerWrappers.length&&null===d;c++)void 0!==this._layerWrappers[c]&&(d=this._layerWrappers[c]);this._subsWrapper.insertBefore(u,d),this._layerWrappers[o]=u,this._layerAlignmentWrappers[o]=[]}if(void 0===this._layerAlignmentWrappers[o][l]){var f=document.createElement("div");f.className="an an"+l;for(var u=this._layerWrappers[o],d=null,h=l+1;h<this._layerAlignmentWrappers[o].length&&null===d;h++)void 0!==this._layerAlignmentWrappers[o][h]&&(d=this._layerAlignmentWrappers[o][h]);
u.insertBefore(f,d),this._layerAlignmentWrappers[o][l]=f}this._layerAlignmentWrappers[o][l].appendChild(r);var v=r.getElementsByTagName("style")[0];if(void 0!==v){var g=v.sheet;0===g.cssRules.length&&(g.cssText=v.textContent)}this._currentSubs.set(e,r)}},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,r){(r.start>n||r.end<n||r.containsTransformTag)&&(e._currentSubs.delete(r),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}(d.NullRenderer);t.WebRenderer=P,g.mixin(P,[u.EventSource])},function(e,t){var n=t(19),r=function(){function e(e,t,n,r,a,i,s,o){this._scaleX=n,this._scaleY=r,this._settings=a,this._fontSizeElement=i,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,r){var a=t.childNodes[0]instanceof Text,i="";this._italic&&(i+="italic "),this._bold===!0?i+="bold ":this._bold!==!1&&(i+=this._bold+" ");
var s=(this._scaleY*n.fontSizeForLineHeight(this._fontName,this._fontSize*(a?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=""+i+s+"px/"+o+"px "+l;var u="";this._underline&&(u="underline"),
this._strikeThrough&&(u+=" line-through"),t.style.textDecoration=u.trim();var d="";if(a?this._fontScaleY!==this._fontScaleX&&(d+="scaleY("+(this._fontScaleY/this._fontScaleX).toFixed(3)+") "):(1!==this._fontScaleX&&(d+="scaleX("+this._fontScaleX+") "),1!==this._fontScaleY&&(d+="scaleY("+this._fontScaleY+") ")),null!==this._rotationY&&(d+="rotateY("+this._rotationY+"deg) "),null!==this._rotationX&&(d+="rotateX("+this._rotationX+"deg) "),0!==this._rotationZ&&(d+="rotateZ("+-1*this._rotationZ+"deg) "),
null!==this._skewX||null!==this._skewY){var c=e._valueOrDefault(this._skewX,0),f=e._valueOrDefault(this._skewY,0);d+="matrix(1, "+f+", "+c+", 1, 0, 0) "}""!==d&&(t.style.webkitTransform=d,t.style.webkitTransformOrigin="50% 50%",t.style.transform=d,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,h=this._scaleY*this._outlineHeight,v=document.createElement("span");v.appendChild(t);
var g=this._primaryColor.withAlpha(this._primaryAlpha),m=this._outlineColor.withAlpha(this._outlineAlpha),y=this._shadowColor.withAlpha(this._shadowAlpha);if(this._settings.enableSvg||(0!==p||0!==h)&&m.alpha!==g.alpha||(0!==this._shadowDepthX||0!==this._shadowDepthY)&&y.alpha!==g.alpha||(g=this._primaryColor.withAlpha(1),m=this._outlineColor.withAlpha(1),y=this._shadowColor.withAlpha(1),t.style.opacity=this._primaryAlpha.toFixed(3)),t.style.color=g.toString(),this._settings.enableSvg?this._setSvgOutlineOnSpan(v,p,h,m,this._primaryAlpha):this._setTextShadowOutlineOnSpan(t,p,h,m),
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||(v.style.display="inline-block"),t.style.webkitAnimation=r.animationStyle,t.style.animation=r.animationStyle,v},e.prototype._setSvgOutlineOnSpan=function(e,t,n,r,a){var i="svg-filter-"+this._id+"-"+this._nextFilterId++,s=document.createElementNS("http://www.w3.org/2000/svg","filter");
if(s.id=i,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 r;for(r=0;r<=t;r+=l)e(r,n/t*Math.sqrt(t*t-r*r));r!==t+l&&e(t,0)}else e(0,n);else if(n>0){var a;for(a=0;a<=n;a+=l)e(t/n*Math.sqrt(n*n-a*a),a);a!==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 d=document.createElementNS("http://www.w3.org/2000/svg","feFuncA");u.appendChild(d),d.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,
d.slope.baseVal=0===a?1:1/a,d.intercept.baseVal=0;var c=document.createElementNS("http://www.w3.org/2000/svg","feMerge");s.appendChild(c);for(var f=0;f<o;f++){var p=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");c.appendChild(p),p.in1.baseVal="outline"+f}var h=document.createElementNS("http://www.w3.org/2000/svg","feComponentTransfer");s.appendChild(h),h.setAttribute("color-interpolation-filters","sRGB");var v=document.createElementNS("http://www.w3.org/2000/svg","feFuncR");h.appendChild(v),
v.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,v.slope.baseVal=0,v.intercept.baseVal=r.red/255*r.alpha;var g=document.createElementNS("http://www.w3.org/2000/svg","feFuncG");h.appendChild(g),g.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,g.slope.baseVal=0,g.intercept.baseVal=r.green/255*r.alpha;var m=document.createElementNS("http://www.w3.org/2000/svg","feFuncB");h.appendChild(m),m.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,
m.slope.baseVal=0,m.intercept.baseVal=r.blue/255*r.alpha;var y=document.createElementNS("http://www.w3.org/2000/svg","feFuncA");if(h.appendChild(y),y.type.baseVal=SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR,y.slope.baseVal=r.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 f=0;f<this._blur;f++){
var P=document.createElementNS("http://www.w3.org/2000/svg","feConvolveMatrix");s.appendChild(P),P.setAttribute("kernelMatrix","1 2 1 2 4 2 1 2 1"),P.edgeMode.baseVal=SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE}var w=document.createElementNS("http://www.w3.org/2000/svg","feComposite");s.appendChild(w),w.in2.baseVal="source",w.operator.baseVal=SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OUT;var S=document.createElementNS("http://www.w3.org/2000/svg","feMerge");s.appendChild(S);var _=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");
S.appendChild(_);var T=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");S.appendChild(T),T.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 f=0;f<this._blur;f++){var P=document.createElementNS("http://www.w3.org/2000/svg","feConvolveMatrix");s.appendChild(P),P.setAttribute("kernelMatrix","1 2 1 2 4 2 1 2 1"),
P.edgeMode.baseVal=SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE}}s.childElementCount>0&&(this._svgDefsElement.appendChild(s),e.style.webkitFilter='url("#'+i+'")',e.style.filter='url("#'+i+'")')},e.prototype._setTextShadowOutlineOnSpan=function(e,t,n,r){var a=this;if(t>0||n>0){var i="";!function(e){for(var r=0;r<=t;r++)for(var a=0===t?n:n*Math.sqrt(1-r*r/(t*t)),i=0;i<=a;i++)e(r,i),0!==r&&e(-r,i),0!==i&&e(r,-i),0!==r&&0!==i&&e(-r,-i)}(function(e,t){i+=", "+r.toString()+" "+e+"px "+t+"px "+a._gaussianBlur.toFixed(3)+"px";
}),e.style.textShadow=i.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=r},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 r=n(26),a=n(29),i=n(28),s=n(27),o=n(23),l=n(1),u=n(2),d=n(30),c=n(32),f=function(){function t(){if(this._properties=new i.ScriptProperties,this._styles=new d.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 a.Style(new d.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 r="";n.forEach(function(e,t){return r+=t+" = "+e+", "}),console.log("Read style: "+r)}var i=new a.Style(n);this._styles.set(i.name,i)}},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 a="";n.forEach(function(e,t){return a+=t+" = "+e+", "}),console.log("Read dialogue: "+a)}this.dialogues.push(new r.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,r){void 0===r&&(r=s.Format.ASS);var a;return a="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",r)}):c.Promise.reject(new Error("Not supported.")),a.catch(function(e){console.warn("fetch() failed, falling back to XHR: %o",e);var a=new XMLHttpRequest,i=t.fromStream(new l.XhrStream(a),r);return a.open("GET",n,!0),a.send(),i})},t.fromReadableStream=function(e,n,r){return void 0===n&&(n="utf-8"),void 0===r&&(r=s.Format.ASS),
t.fromStream(new l.BrowserReadableStream(e,n),r)},t}();t.ASS=f},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),r=t(3),a=t(8),i=t(23),s=t(30),o=function(){function e(t,r){this._parts=null,this._containsTransformTag=!1;var a=new s.Map;t.forEach(function(e,t){a.set(t.toLowerCase(),e)}),t=a,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=r.styles.get(o),
void 0===this._style&&(i.debugMode&&console.warn("Unrecognized style "+o+'. Falling back to "Default"'),this._style=r.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=r.parse(this._rawPartsString,"dialogueParts"),this._alignment=this._style.alignment,this._parts.forEach(function(t,n){t instanceof a.Alignment?e._alignment=t.value:t instanceof a.Move?null!==t.t1&&null!==t.t2||(e._parts[n]=new a.Move(t.x1,t.y1,t.x2,t.y2,0,e._end-e._start)):t instanceof a.Transform&&(null!==t.start&&null!==t.end&&null!==t.accel||(e._parts[n]=new a.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)}),i.debugMode){var t=this._parts.filter(function(e){return e instanceof a.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,r,a){var i=e.get(t);if(void 0===i)return n(a);
try{var s=n(i);if(null!==r&&!r(s))throw new Error("Validation failed.");return s}catch(o){throw new Error("Property "+t+" has invalid value "+i+" - "+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),r=t(3),a=t(30),i=function(){function e(e){var t=new a.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 r.parse(e,"colorWithAlpha")},null,"&H00FFFFFF"),this._secondaryColor=n.valueOrDefault(e,"secondarycolour",function(e){return r.parse(e,"colorWithAlpha")},null,"&H00FFFF00"),this._outlineColor=n.valueOrDefault(e,"outlinecolour",function(e){return r.parse(e,"colorWithAlpha")},null,"&H00000000"),this._shadowColor=n.valueOrDefault(e,"backcolour",function(e){return r.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=i},function(t){function n(e){null!==e?t.Map=e:t.Map=r}t.Map=e.Map;var r=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,r=Object.keys(this._keys);n<r.length;n++){var a=r[n];e.call(t,this._values[a],this._keys[a],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=r),t.setImplementation=n},function(e){function t(e,t){for(var n=0;n<t.length;n++)for(var r=t[n],a=0,i=Object.getOwnPropertyNames(r.prototype);a<i.length;a++){var s=i[a];e.prototype[s]=r.prototype[s]}}e.mixin=t},function(t){function n(e){null!==e?t.Promise=e:t.Promise=l}function r(e){return a(e,[])}function a(e,n){if(0===e.length)return t.Promise.reject(n);var r=e[0],i=e.slice(1);return r.catch(function(e){return a(i,n.concat(e));
})}function i(e){return new t.Promise(function(n,r){return t.Promise.all(e.map(function(e){return e.then(n,function(e){return e})})).then(r)})}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=[],r=!1,a=document.createElement("div"),i=new t(function(){for(var e=n.splice(0,n.length),t=0;t<e.length;t++){
var i=e[t];i()}r=!1,n.length>0&&(a.classList.toggle("foo"),r=!0)});return i.observe(a,{attributes:!0}),function(e){n.push(e),r||(a.classList.toggle("foo"),r=!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,r=t.reject;try{
e(n,r)}catch(a){r(a)}}return e.prototype.then=function(e,t){var n=new d;"function"!=typeof e&&(e=function(e){return e}),"function"!=typeof t&&(t=function(e){throw e});var r={capabilities:n,handler:e},a={capabilities:n,handler:t};switch(this._state){case u.PENDING:this._fulfillReactions.push(r),this._rejectReactions.push(a);break;case u.FULFILLED:this._enqueueFulfilledReactionJob(r,this._fulfilledValue);break;case u.REJECTED:this._enqueueRejectedReactionJob(a,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,r){var a=[],i=e.length;return 0===i?void n(a):void e.forEach(function(e,s){return t.Promise.resolve(e).then(function(e){a[s]=e,i--,0===i&&n(a)},r)})})},e.race=function(e){return new t.Promise(function(n,r){for(var a=0;a<e.length;a++){var i=e[a];
t.Promise.resolve(i).then(n,r)}})},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 r=n.then}catch(a){return void e._reject(a)}return"function"!=typeof r?void e._fulfill(n):void o(function(){return e._resolveWithThenable(n,r)})}},r=function(n){t||(t=!0,e._reject(n))};return{resolve:n,reject:r}},e.prototype._resolveWithThenable=function(e,t){
var n=this._createResolvingFunctions(),r=n.resolve,a=n.reject;try{t.call(e,r,a)}catch(i){a(i)}},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 r=t[n];this._enqueueFulfilledReactionJob(r,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 r=t[n];this._enqueueRejectedReactionJob(r,e)}},e.prototype._enqueueFulfilledReactionJob=function(e,t){o(function(){var n,r=e.capabilities,a=r.resolve,i=r.reject,s=e.handler;try{n=s(t)}catch(o){return void i(o)}a(n)})},e.prototype._enqueueRejectedReactionJob=function(e,t){o(function(){var n,r=e.capabilities,a=r.resolve,i=r.reject,s=e.handler;try{n=s(t)}catch(o){return void i(o)}a(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 d=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=d,t.first=r,t.any=i,t.lastly=s},function(t){function n(e){null!==e?t.Set=e:t.Set=r}t.Set=e.Set;
var r=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,r=Object.keys(this._elements);n<r.length;n++){var a=r[n],i=this._elements[a];e.call(t,i,i,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=r),t.setImplementation=n},function(e){function t(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n}function n(e,t,n){return arguments.length<3?r(e.reverse(),t):void a(e.reverse(),t,n)}function r(e,t){for(var n=0;n<e.length;n++){var r=e[n];t=r(t)||t}return t}function a(e,t,n){for(var r=0;r<e.length;r++){var a=e[r];a(t,n)}}e.__extends=t,e.__decorate=n},function(e,t){
var n=t(30),r=t(32),a=t(36),i=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 a=new r.DeferredPromise,s=++e._lastRequestId;this._pendingRequests.set(s,a);var o={requestId:s,command:t,parameters:n};return this._comm.postMessage(i.serialize(o)),a.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,r=e.result;n instanceof Error&&(n={message:n.message,stack:n.stack}),this._comm.postMessage(i.serialize({command:a.WorkerCommands.Response,requestId:t,error:n,result:r}))},e.prototype._onMessage=function(e){var t=this,n=i.deserialize(e);if(n.command===a.WorkerCommands.Response){var r=n,s=this._pendingRequests.get(r.requestId);void 0!==s&&(this._pendingRequests.delete(r.requestId),null===r.error?s.resolve(r.result):s.reject(r.error));
}else{var o=n,l=o.requestId,u=i.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,i.registerWorkerCommand(a.WorkerCommands.Ping,function(){return new r.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 r(e){return void 0===e&&(e=s.src),new a.WorkerChannelImpl(new Worker(e))}var a=n(35),i=n(36);t.WorkerCommands=i.WorkerCommands,t.supported="undefined"!=typeof Worker;var s="undefined"!=typeof document&&void 0!==document.currentScript?document.currentScript:null;t.createWorker=r,"undefined"!=typeof WorkerGlobalScope&&e instanceof WorkerGlobalScope&&new a.WorkerChannelImpl(e);
},function(e,t){function n(e,t){l.set(e,t)}function r(e){return l.get(e)}function a(e){e._classTag=u.size,u.set(e._classTag,e)}function i(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)),r=0,a=Object.keys(t);r<a.length;r++){var i=a[r];"_classTag"!==i&&(n[i]=t[i])}t=n}return t})}var o=t(30),l=new o.Map,u=new o.Map;e.registerWorkerCommand=n,
e.getWorkerCommandHandler=r,e.registerClassPrototype=a,e.serialize=i,e.deserialize=s}])})},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var a=n(2568),i=n(2569),s=n(2570),o=n(2571),l=n(2572);r.prototype.clear=a,r.prototype.delete=i,r.prototype.get=s,r.prototype.has=o,r.prototype.set=l,e.exports=r},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var a=n(2578),i=n(2579),s=n(2580),o=n(2581),l=n(2582);
r.prototype.clear=a,r.prototype.delete=i,r.prototype.get=s,r.prototype.has=o,r.prototype.set=l,e.exports=r},function(e,t,n){var r=n(518),a=n(361),i=r(a,"Map");e.exports=i},function(e,t,n){var r=n(518),a=n(361),i=r(a,"Set");e.exports=i},function(e,t,n){var r=n(361),a=r.Symbol;e.exports=a},function(e,t){function n(e,t){for(var n=-1,r=e?e.length:0,a=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[a++]=s)}return i}e.exports=n},function(e,t,n){function r(e,t){var n=s(e)||i(e)?a(e.length,String):[],r=n.length,l=!!r;
for(var d in e)!t&&!u.call(e,d)||l&&("length"==d||o(d,r))||n.push(d);return n}var a=n(2558),i=n(834),s=n(189),o=n(832),l=Object.prototype,u=l.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t,n,r){return void 0===e||a(e,i[n])&&!s.call(r,n)?t:e}var a=n(362),i=Object.prototype,s=i.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t,n){var r=e[t];s.call(e,t)&&a(r,n)&&(void 0!==n||t in e)||(e[t]=n)}var a=n(362),i=Object.prototype,s=i.hasOwnProperty;e.exports=r},function(e,t){function n(e,t,n,r){
for(var a=e.length,i=n+(r?1:-1);r?i--:++i<a;)if(t(e[i],i,e))return i;return-1}e.exports=n},function(e,t,n){function r(e,t,n,s,o){var l=-1,u=e.length;for(n||(n=i),o||(o=[]);++l<u;){var d=e[l];t>0&&n(d)?t>1?r(d,t-1,n,s,o):a(o,d):s||(o[o.length]=d)}return o}var a=n(827),i=n(2573);e.exports=r},function(e,t,n){function r(e,t,n){if(t!==t)return a(e,i,n);for(var r=n-1,s=e.length;++r<s;)if(e[r]===t)return r;return-1}var a=n(2551),i=n(2555);e.exports=r},function(e,t,n){function r(e,t,n){for(var r=n?s:i,c=e[0].length,f=e.length,p=f,h=Array(f),v=1/0,g=[];p--;){
var m=e[p];p&&t&&(m=o(m,l(t))),v=d(m.length,v),h[p]=!n&&(t||c>=120&&m.length>=120)?new a(p&&m):void 0}m=e[0];var y=-1,b=h[0];e:for(;++y<c&&g.length<v;){var P=m[y],w=t?t(P):P;if(P=n||0!==P?P:0,!(b?u(b,w):r(g,w,n))){for(p=f;--p;){var S=h[p];if(!(S?u(S,w):r(e[p],w,n)))continue e}b&&b.push(w),g.push(P)}}return g}var a=n(513),i=n(514),s=n(515),o=n(516),l=n(829),u=n(517),d=Math.min;e.exports=r},function(e,t){function n(e){return e!==e}e.exports=n},function(e,t,n){function r(e){if(!o(e)||s(e))return!1;var t=a(e)||i(e)?v:d;
return t.test(l(e))}var a=n(835),i=n(831),s=n(2576),o=n(284),l=n(2592),u=/[\\^$.*+?()[\]{}|]/g,d=/^\[object .+?Constructor\]$/,c=Function.prototype,f=Object.prototype,p=c.toString,h=f.hasOwnProperty,v=RegExp("^"+p.call(h).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},function(e,t,n){function r(e){if(!a(e))return s(e);var t=i(e),n=[];for(var r in e)("constructor"!=r||!t&&l.call(e,r))&&n.push(r);return n}var a=n(284),i=n(2577),s=n(2588),o=Object.prototype,l=o.hasOwnProperty;
e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}e.exports=n},function(e,t,n){function r(e,t,n){for(var r=-1,o=e.length;++r<o;)var l=l?a(i(l,e[r],t,n),i(e[r],l,t,n)):e[r];return l&&l.length?s(l,t,n):[]}var a=n(827),i=n(828),s=n(830);e.exports=r},function(e,t,n){function r(e){return a(e)?e:[]}var a=n(283);e.exports=r},function(e,t,n){function r(e,t,n,r){n||(n={});for(var i=-1,s=t.length;++i<s;){var o=t[i],l=r?r(n[o],e[o],o,n,e):void 0;a(n,o,void 0===l?e[o]:l);
}return n}var a=n(2550);e.exports=r},function(e,t,n){var r=n(361),a=r["__core-js_shared__"];e.exports=a},function(e,t,n){function r(e){return a(function(t,n){var r=-1,a=n.length,s=a>1?n[a-1]:void 0,o=a>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(a--,s):void 0,o&&i(n[0],n[1],o)&&(s=a<3?void 0:s,a=1),t=Object(t);++r<a;){var l=n[r];l&&e(t,l,r,s)}return t})}var a=n(231),i=n(2574);e.exports=r},function(e,t,n){var r=n(2545),a=n(837),i=n(833),s=1/0,o=r&&1/i(new r([,-0]))[1]==s?function(e){return new r(e);
}:a;e.exports=o},function(e,t){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,function(){return this}())},function(e,t,n){var r=n(2589),a=r(Object.getPrototypeOf,Object);e.exports=a},function(e,t){function n(e,t){return null==e?void 0:e[t]}e.exports=n},function(e,t,n){function r(){this.__data__=a?a(null):{}}var a=n(360);e.exports=r},function(e,t){function n(e){return this.has(e)&&delete this.__data__[e]}e.exports=n},function(e,t,n){function r(e){var t=this.__data__;
if(a){var n=t[e];return n===i?void 0:n}return o.call(t,e)?t[e]:void 0}var a=n(360),i="__lodash_hash_undefined__",s=Object.prototype,o=s.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){var t=this.__data__;return a?void 0!==t[e]:s.call(t,e)}var a=n(360),i=Object.prototype,s=i.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__;return n[e]=a&&void 0===t?i:t,this}var a=n(360),i="__lodash_hash_undefined__";e.exports=r},function(e,t,n){function r(e){return s(e)||i(e)||!!(o&&e&&e[o]);
}var a=n(2546),i=n(834),s=n(189),o=a?a.isConcatSpreadable:void 0;e.exports=r},function(e,t,n){function r(e,t,n){if(!o(n))return!1;var r=typeof t;return!!("number"==r?i(n)&&s(t,n.length):"string"==r&&t in n)&&a(n[t],e)}var a=n(362),i=n(519),s=n(832),o=n(284);e.exports=r},function(e,t){function n(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=n},function(e,t,n){function r(e){return!!i&&i in e}var a=n(2562),i=function(){var e=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||"");
return e?"Symbol(src)_1."+e:""}();e.exports=r},function(e,t){function n(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||r;return e===n}var r=Object.prototype;e.exports=n},function(e,t){function n(){this.__data__=[]}e.exports=n},function(e,t,n){function r(e){var t=this.__data__,n=a(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():s.call(t,n,1),!0}var a=n(358),i=Array.prototype,s=i.splice;e.exports=r},function(e,t,n){function r(e){var t=this.__data__,n=a(t,e);return n<0?void 0:t[n][1];
}var a=n(358);e.exports=r},function(e,t,n){function r(e){return a(this.__data__,e)>-1}var a=n(358);e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__,r=a(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}var a=n(358);e.exports=r},function(e,t,n){function r(){this.__data__={hash:new a,map:new(s||i),string:new a}}var a=n(2542),i=n(2543),s=n(2544);e.exports=r},function(e,t,n){function r(e){return a(this,e).delete(e)}var a=n(359);e.exports=r},function(e,t,n){function r(e){return a(this,e).get(e);
}var a=n(359);e.exports=r},function(e,t,n){function r(e){return a(this,e).has(e)}var a=n(359);e.exports=r},function(e,t,n){function r(e,t){return a(this,e).set(e,t),this}var a=n(359);e.exports=r},function(e,t){function n(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}e.exports=n},function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},function(e,t){function n(e){return this.__data__.set(e,r),this}var r="__lodash_hash_undefined__";e.exports=n},function(e,t){
function n(e){return this.__data__.has(e)}e.exports=n},function(e,t){function n(e){if(null!=e){try{return a.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var r=Function.prototype,a=r.toString;e.exports=n},function(e,t,n){var r=n(2561),a=n(2563),i=n(2597),s=a(function(e,t,n,a){r(t,i(t),e,a)});e.exports=s},function(e,t,n){var r=n(826),a=n(2549),i=n(2593),s=n(231),o=s(function(e){return e.push(void 0,a),r(i,void 0,e)});e.exports=o},function(e,t,n){var r=n(516),a=n(2554),i=n(231),s=n(2560),o=i(function(e){
var t=r(e,s);return t.length&&t[0]===e[0]?a(t):[]});e.exports=o},function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=n},function(e,t,n){function r(e){return s(e)?a(e,!0):i(e)}var a=n(2548),i=n(2557),s=n(519);e.exports=r},function(e,t,n){function r(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(i);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var s=e.apply(this,r);return n.cache=i.set(a,s),
s};return n.cache=new(r.Cache||a),n}var a=n(825),i="Expected a function";r.Cache=a,e.exports=r},function(e,t,n){var r=n(2552),a=n(231),i=n(830),s=n(283),o=a(function(e){return i(r(e,1,s,!0))});e.exports=o},function(e,t,n){var r=n(2547),a=n(231),i=n(2559),s=n(283),o=a(function(e){return i(r(e,s))});e.exports=o},function(e,t,n){var r;!function(a,i,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 w[e.which]?w[e.which]:S[e.which]?S[e.which]:String.fromCharCode(e.which).toLowerCase()}function u(e,t){return e.sort().join(",")===t.sort().join(",")}function d(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 c(e){return e.preventDefault?void e.preventDefault():void(e.returnValue=!1)}function f(e){return e.stopPropagation?void e.stopPropagation():void(e.cancelBubble=!0);
}function p(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function h(){if(!P){P={};for(var e in w)e>95&&e<112||w.hasOwnProperty(e)&&(P[w[e]]=e)}return P}function v(e,t,n){return n||(n=h()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function g(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus"),e.split("+"))}function m(e,t){var n,r,a,i=[];for(n=g(e),a=0;a<n.length;++a)r=n[a],T[r]&&(r=T[r]),t&&"keypress"!=t&&_[r]&&(r=_[r],i.push("shift")),p(r)&&i.push(r);return t=v(r,i,t),
{key:r,modifiers:i,action:t}}function y(e,t){return null!==e&&e!==i&&(e===t||y(e.parentNode,t))}function b(e){function t(e){e=e||{};var t,n=!1;for(t in P)e[t]?n=!0:P[t]=0;n||(_=!1)}function n(e,t,n,r,a,i){var s,o,l=[],d=n.type;if(!g._callbacks[e])return[];for("keyup"==d&&p(e)&&(t=[e]),s=0;s<g._callbacks[e].length;++s)if(o=g._callbacks[e][s],(r||!o.seq||P[o.seq]==o.level)&&d==o.action&&("keypress"==d&&!n.metaKey&&!n.ctrlKey||u(t,o.modifiers))){var c=!r&&o.combo==a,f=r&&o.seq==r&&o.level==i;(c||f)&&g._callbacks[e].splice(s,1),
l.push(o)}return l}function r(e,t,n,r){g.stopCallback(t,t.target||t.srcElement,n,r)||e(t,n)===!1&&(c(t),f(t))}function a(e){"number"!=typeof e.which&&(e.which=e.keyCode);var t=l(e);if(t)return"keyup"==e.type&&w===t?void(w=!1):void g.handleKey(t,d(e),e)}function s(){clearTimeout(y),y=setTimeout(t,1e3)}function h(e,n,a,i){function o(t){return function(){_=t,++P[e],s()}}function u(n){r(a,n,e),"keyup"!==i&&(w=l(n)),setTimeout(t,10)}P[e]=0;for(var d=0;d<n.length;++d){var c=d+1===n.length,f=c?u:o(i||m(n[d+1]).action);
v(n[d],f,i,e,d)}}function v(e,t,r,a,i){g._directMap[e+":"+r]=t,e=e.replace(/\s+/g," ");var s,o=e.split(" ");return o.length>1?void h(e,o,t,r):(s=m(e,r),g._callbacks[s.key]=g._callbacks[s.key]||[],n(s.key,s.modifiers,{type:s.action},a,e,i),void g._callbacks[s.key][a?"unshift":"push"]({callback:t,modifiers:s.modifiers,action:s.action,seq:a,level:i,combo:e}))}var g=this;if(e=e||i,!(g instanceof b))return new b(e);g.target=e,g._callbacks={},g._directMap={};var y,P={},w=!1,S=!1,_=!1;g._handleKey=function(e,a,i){
var s,o=n(e,a,i),l={},u=0,d=!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;d=!0,l[o[s].seq]=1,r(o[s].callback,i,o[s].combo,o[s].seq)}else d||r(o[s].callback,i,o[s].combo);var c="keypress"==i.type&&S;i.type!=_||p(e)||c||t(l),S=d&&"keydown"==i.type},g._bindMultiple=function(e,t,n){for(var r=0;r<e.length;++r)v(e[r],t,n)},o(e,"keypress",a),o(e,"keydown",a),o(e,"keyup",a)}for(var P,w={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"},S={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},_={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},T={option:"alt",command:"meta",
"return":"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},I=1;I<20;++I)w[111+I]="f"+I;for(I=0;I<=9;++I)w[I+96]=I;b.prototype.bind=function(e,t,n){var r=this;return e=e instanceof Array?e:[e],r._bindMultiple.call(r,e,t,n),r},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(i);for(var t in e)"_"!==t.charAt(0)&&(b[t]=function(t){return function(){return e[t].apply(e,arguments)}}(t))},b.init(),a.Mousetrap=b,"undefined"!=typeof e&&e.exports&&(e.exports=b),
r=function(){return b}.call(t,n,t,e),!(r!==s&&(e.exports=r))}(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 r(){return+new Date}function a(){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=r();for(var e in this._originalConsole)this._originalConsoleMethods[e]=this._originalConsole[e]}var i=n(2607),s=n(2605),o=n(841),l=o.isFunction,u=o.isUndefined,d=o.isError,c=o.isEmptyObject,f=o.hasKey,p=o.joinRegExp,h=o.each,v=o.objectMerge,g=o.truncate,m=o.urlencode,y=o.uuid4,b="source protocol user pass host port path".split(" "),P=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;
a.prototype={VERSION:"2.0.5",debug:!1,TraceKit:i,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 r=this._parseDSN(e),a=r.path.lastIndexOf("/"),s=r.path.substr(1,a);return t&&h(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=r.user,this._globalProject=r.path.substr(a+1),this._globalServer="//"+r.host+(r.port?":"+r.port:"")+"/"+s+"api/"+this._globalProject+"/store/",
r.protocol&&(this._globalServer=r.protocol+":"+this._globalServer),this._globalOptions.fetchContext&&(i.remoteFetching=!0),this._globalOptions.linesOfContext&&(i.linesOfContext=this._globalOptions.linesOfContext),i.collectWindowErrors=!!this._globalOptions.collectWindowErrors,this},install:function(){var e=this;return this.isSetup()&&!this._isRavenInstalled&&(i.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=[],a=arguments.length,i=!e||e&&e.deep!==!1;a--;)n[a]=i?r.wrap(e,arguments[a]):arguments[a];try{return t.apply(this,n)}catch(s){throw r._ignoreNextOnError(),r.captureException(s,e),s}}var r=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 a in t)f(t,a)&&(n[a]=t[a]);
return t.__raven_wrapper__=n,n.prototype=t.prototype,n.__raven__=!0,n.__inner__=t,n},uninstall:function(){return i.report.uninstall(),this._isRavenInstalled=!1,this},captureException:function(e,t){if(!d(e))return this.captureMessage(e,t);this._lastCapturedException=e;try{var n=i.computeStackTrace(e);this._handleStackInfo(n,t)}catch(r){if(e!==r)throw r}return this},captureMessage:function(e,t){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e))return this._send(v({
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,r;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(r in t)f(t,r)&&(n[r]=t[r]);
if(document.createEvent)document.dispatchEvent(n);else try{document.fireEvent("on"+n.eventType.toLowerCase(),n)}catch(a){}}},_wrapBuiltIns:function(){function e(e,t,n){var r=e[t];e[t]=n(r)}function n(e){return function(t,n){var a=[].slice.call(arguments),i=a[0];return"function"==typeof i&&(a[0]=r.wrap(i)),e.apply?e.apply(this,a):e(a[0],a[1])}}var r=this;e(window,"setTimeout",n),e(window,"setInterval",n),window.requestAnimationFrame&&e(window,"requestAnimationFrame",function(e){return function(t){
return e(r.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,a,i){try{n&&n.handleEvent&&(n.handleEvent=r.wrap(n.handleEvent))}catch(s){}return e.call(this,t,r.wrap(n),a,i)}}),e(n,"removeEventListener",function(e){return function(t,n,r,a){return n=n&&(n.__raven_wrapper__?n.__raven_wrapper__:n),e.call(this,t,n,r,a)}}))});var a;"XMLHttpRequest"in window&&(a=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 r.wrap(e)})}),a.apply(this,arguments)});var i,s=t||window.$;s&&s.fn&&s.fn.ready&&(i=s.fn.ready,s.fn.ready=function(e){return i.call(this,r.wrap(e))})},_drainPlugins:function(){var e=this;h(this._plugins,function(t,n){var r=n[0],a=n[1];r.apply(e,[e].concat(a))})},_parseDSN:function(e){var t=P.exec(e),n={},r=7;try{for(;r--;)n[b[r]]=t[r]||""}catch(a){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,r=[];
e.stack&&e.stack.length&&h(e.stack,function(e,t){var a=n._normalizeFrame(t);a&&r.push(a)}),this._triggerEvent("handle",{stackInfo:e,options:t}),this._processException(e.name,e.message,e.url,e.lineno,r,t)},_normalizeFrame:function(e){if(e.url){var t,n={filename:e.url,lineno:e.line,colno:e.column,"function":e.func||"?"},r=this._extractContextFromFrame(e);if(r){var a=["pre_context","context_line","post_context"];for(t=3;t--;)n[a[t]]=r[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),r=t.length,a=!1;r--;)if(t[r].length>300){a=!0;break}if(a){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,r,a,i){var s,o;if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t))&&(t+="",t=g(t,this._globalOptions.maxMessageLength),o=e+": "+t,o=g(o,this._globalOptions.maxMessageLength),
a&&a.length?(n=a[0].filename||n,a.reverse(),s={frames:a}):n&&(s={frames:[{filename:n,lineno:r,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(n))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(n)))){var l=v({exception:{values:[{type:e,value:t,stacktrace:s}]},culprit:n,message:o},i);this._send(l)}},_trimPacket:function(e){var t=this._globalOptions.maxMessageLength;if(e.message=g(e.message,t),e.exception){var n=e.exception.values[0];
n.value=g(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,a={project:this._globalProject,logger:n.logger,platform:"javascript"},i=this._getHttpData();i&&(a.request=i),e=v(a,e),e.tags=v(v({},this._globalContext.tags),e.tags),e.extra=v(v({},this._globalContext.extra),e.extra),
e.extra["session:duration"]=r()-this._startTime,c(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&&!c(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+"?"+m(e.auth),r=e.options.crossOrigin;(r||""===r)&&(t.crossOrigin=r),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,r=e.url;n=new XMLHttpRequest,"withCredentials"in n?n.onreadystatechange=function(){4===n.readyState&&t()}:(n=new XDomainRequest,r=r.replace(/^https?:/,""),n.onload=t),n.open("POST",r+"?"+m(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]=v(this._globalContext[e]||{},t)}},a.prototype.setUser=a.prototype.setUserContext,a.prototype.setReleaseContext=a.prototype.setRelease,e.exports=a}).call(t,n(8))},function(e,t,n){"use strict";function r(){
return"undefined"==typeof document?"":document.location.href}var a=n(841),i=a.hasKey,s=a.isString,o=a.isUndefined,l={remoteFetching:!1,collectWindowErrors:!0,linesOfContext:7,debug:!1},u=[].slice,d="?";l.report=function(){function e(e){o(),v.push(e)}function t(e){for(var t=v.length-1;t>=0;--t)v[t]===e&&v.splice(t,1)}function n(){d(),v=[]}function a(e,t){var n=null;if(!t||l.collectWindowErrors){for(var r in v)if(i(v,r))try{v[r].apply(null,[e].concat(u.call(arguments,2)))}catch(a){n=a}if(n)throw n}
}function s(e,t,n,i,s){var o=null;if(y)l.computeStackTrace.augmentStackTraceWithInitialElement(y,t,n,e),c();else if(s)o=l.computeStackTrace(s),a(o,!0);else{var u={url:t,line:n,column:i};u.func=l.computeStackTrace.guessFunctionName(u.url,u.line),u.context=l.computeStackTrace.gatherContext(u.url,u.line),o={message:e,url:r(),stack:[u]},a(o,!0)}return!!p&&p.apply(this,arguments)}function o(){h||(p=window.onerror,window.onerror=s,h=!0)}function d(){h&&(window.onerror=p,h=!1,p=void 0)}function c(){var e=y,t=g;
g=null,y=null,m=null,a.apply(null,[e,!1].concat(t))}function f(e,t){var n=u.call(arguments,1);if(y){if(m===e)return;c()}var r=l.computeStackTrace(e);if(y=r,m=e,g=n,window.setTimeout(function(){m===e&&c()},r.incomplete?2e3:0),t!==!1)throw e}var p,h,v=[],g=null,m=null,y=null;return f.subscribe=e,f.unsubscribe=t,f.uninstall=n,f}(),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(r){return""}}function t(t){if(!s(t))return[];if(!i(w,t)){var n="",r="";try{r=document.domain}catch(a){}t.indexOf(r)!==-1&&(n=e(t)),w[t]=n?n.split("\n"):[]}return w[t]}function n(e,n){var r,a=/function ([^(]*)\(([^)]*)\)/,i=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,s="",l=10,u=t(e);if(!u.length)return d;for(var c=0;c<l;++c)if(s=u[n-c]+s,!o(s)){if(r=i.exec(s))return r[1];if(r=a.exec(s))return r[1]}return d}function a(e,n){
var r=t(e);if(!r.length)return null;var a=[],i=Math.floor(l.linesOfContext/2),s=i+l.linesOfContext%2,u=Math.max(0,n-i-1),d=Math.min(r.length,n+s-1);n-=1;for(var c=u;c<d;++c)o(r[c])||a.push(r[c]);return a.length>0?a:null}function u(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function c(e){return u(e).replace("<","(?:<|&lt;)").replace(">","(?:>|&gt;)").replace("&","(?:&|&amp;)").replace('"','(?:"|&quot;)').replace(/\s+/g,"\\s+")}function f(e,n){for(var r,a,i=0,s=n.length;i<s;++i)if((r=t(n[i])).length&&(r=r.join("\n"),
a=e.exec(r)))return{url:n[i],line:r.substring(0,a.index).split("\n").length,column:a.index-r.lastIndexOf("\n",a.index)-1};return null}function p(e,n,r){var a,i=t(n),s=new RegExp("\\b"+u(e)+"\\b");return r-=1,i&&i.length>r&&(a=s.exec(i[r]))?a.index:null}function h(e){if("undefined"!=typeof document){for(var t,n,r,a,i=[window.location.href],s=document.getElementsByTagName("script"),o=""+e,l=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,d=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,p=0;p<s.length;++p){
var h=s[p];h.src&&i.push(h.src)}if(r=l.exec(o)){var v=r[1]?"\\s+"+r[1]:"",g=r[2].split(",").join("\\s*,\\s*");t=u(r[3]).replace(/;$/,";?"),n=new RegExp("function"+v+"\\s*\\(\\s*"+g+"\\s*\\)\\s*{\\s*"+t+"\\s*}")}else n=new RegExp(u(o).replace(/\s+/g,"\\s+"));if(a=f(n,i))return a;if(r=d.exec(o)){var m=r[1];if(t=c(r[2]),n=new RegExp("on"+m+"=[\\'\"]\\s*"+t+"\\s*[\\'\"]","i"),a=f(n,i[0]))return a;if(n=new RegExp(t),a=f(n,i))return a}return null}}function v(e){if(!o(e.stack)&&e.stack){for(var t,i,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,c=e.stack.split("\n"),f=[],h=/^(.*) is undefined$/.exec(e.message),v=0,g=c.length;v<g;++v){
if(t=l.exec(c[v]))i={url:t[3],func:t[1]||d,args:t[2]?t[2].split(","):"",line:+t[4],column:t[5]?+t[5]:null};else if(t=s.exec(c[v]))i={url:t[2],func:t[1]||d,line:+t[3],column:t[4]?+t[4]:null};else{if(!(t=u.exec(c[v])))continue;i={url:t[2],func:t[1]||d,line:+t[3],column:t[4]?+t[4]:null}}!i.func&&i.line&&(i.func=n(i.url,i.line)),i.line&&(i.context=a(i.url,i.line)),f.push(i)}return f.length?(f[0].line&&!f[0].column&&h?f[0].column=p(h[1],f[0].url,f[0].line):f[0].column||o(e.columnNumber)||(f[0].column=e.columnNumber+1),
{name:e.name,message:e.message,url:r(),stack:f}):null}}function g(e){var t=e.stacktrace;if(!o(e.stacktrace)&&e.stacktrace){for(var i,s=/ line (\d+), column (\d+) in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,l=t.split("\n"),u=[],d=0,c=l.length;d<c;d+=2)if(i=s.exec(l[d])){var f={line:+i[1],column:+i[2],func:i[3]||i[4],args:i[5]?i[5].split(","):[],url:i[6]};if(!f.func&&f.line&&(f.func=n(f.url,f.line)),f.line)try{f.context=a(f.url,f.line)}catch(p){}f.context||(f.context=[l[d+1]]),
u.push(f)}return u.length?{name:e.name,message:e.message,url:r(),stack:u}:null}}function m(e){var s=e.message.split("\n");if(s.length<4)return null;var o,l,u,d,p=/^\s*Line (\d+) of linked script ((?:file|https?)\S+)(?:: in function (\S+))?\s*$/i,h=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?)\S+)(?:: in function (\S+))?\s*$/i,v=/^\s*Line (\d+) of function script\s*$/i,g=[],m=document.getElementsByTagName("script"),y=[];for(l in m)i(m,l)&&!m[l].src&&y.push(m[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=h.exec(s[l])){b={url:o[3],func:o[4]};var P=+o[1],w=y[o[2]-1];if(w&&(d=t(b.url))){d=d.join("\n");var S=d.indexOf(w.innerText);S>=0&&(b.line=P+d.substring(0,S).split("\n").length)}}else if(o=v.exec(s[l])){var _=window.location.href.replace(/#.*$/,""),T=o[1],I=new RegExp(c(s[l+1]));d=f(I,[_]),b={url:_,line:d?d.line:T,func:""}}if(b){b.func||(b.func=n(b.url,b.line));var M=a(b.url,b.line),C=M?M[Math.floor(M.length/2)]:null;M&&C.replace(/^\s*/,"")===s[l+1].replace(/^\s*/,"")?b.context=M:b.context=[s[l+1]],
g.push(b)}}return g.length?{name:e.name,message:s[0],url:r(),stack:g}:null}function y(e,t,r,i){var s={url:t,line:r};if(s.url&&s.line){e.incomplete=!1,s.func||(s.func=n(s.url,s.line)),s.context||(s.context=a(s.url,s.line));var o=/ '([^']+)' /.exec(i);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 a,i,s,o=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,u=[],c={},f=!1,v=b.caller;v&&!f;v=v.caller)if(v!==P&&v!==l.report){if(i={url:null,func:d,line:null,column:null},v.name?i.func=v.name:(a=o.exec(v.toString()))&&(i.func=a[1]),"undefined"==typeof i.func)try{i.func=a.input.substring(0,a.input.indexOf("{"))}catch(g){}if(s=h(v)){i.url=s.url,i.line=s.line,i.func===d&&(i.func=n(i.url,i.line));var m=/ '([^']+)' /.exec(e.message||e.description);
m&&(i.column=p(m[1],s.url,s.line))}c[""+v]?f=!0:c[""+v]=!0,u.push(i)}t&&u.splice(0,t);var w={name:e.name,message:e.message,url:r(),stack:u};return y(w,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),w}function P(e,t){var n=null;t=null==t?0:+t;try{if(n=g(e))return n}catch(a){if(l.debug)throw a}try{if(n=v(e))return n}catch(a){if(l.debug)throw a}try{if(n=m(e))return n}catch(a){if(l.debug)throw a}try{if(n=b(e,t+1))return n}catch(a){if(l.debug)throw a}return{name:e.name,message:e.message,
url:r()}}var w={};return P.augmentStackTraceWithInitialElement=y,P.computeStackTraceFromStackProp=v,P.guessFunctionName=n,P.gatherContext=a,P}(),e.exports=l},function(e,t,n){e.exports=n(2641)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(2599),s=r(i),o=n(838),l=r(o),u=function(){function e(){a(this,e),this.entered=[]}return e.prototype.enter=function(e){
var t=this.entered.length;return this.entered=s.default(this.entered.filter(function(t){return document.documentElement.contains(t)&&(!t.contains||t.contains(e))}),[e]),0===t&&this.entered.length>0},e.prototype.leave=function(e){var t=this.entered.length;return this.entered=l.default(this.entered.filter(function(e){return document.documentElement.contains(e)}),e),t>0&&0===this.entered.length},e.prototype.reset=function(){this.entered=[]},e}();t.default=u,e.exports=t.default},function(e,t,n){"use strict";
function r(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}function a(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var s=n(2594),o=a(s),l=n(2615),u=a(l),d=n(2609),c=a(d),f=n(842),p=n(2613),h=n(2612),v=n(520),g=r(v),m=function(){function e(t){i(this,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),
this.registry=t.getRegistry(),this.sourcePreviewNodes={},this.sourcePreviewNodeOptions={},this.sourceNodes={},this.sourceNodeOptions={},this.enterLeaveCounter=new c.default,this.getSourceClientOffset=this.getSourceClientOffset.bind(this),this.handleTopDragStart=this.handleTopDragStart.bind(this),this.handleTopDragStartCapture=this.handleTopDragStartCapture.bind(this),this.handleTopDragEndCapture=this.handleTopDragEndCapture.bind(this),this.handleTopDragEnter=this.handleTopDragEnter.bind(this),this.handleTopDragEnterCapture=this.handleTopDragEnterCapture.bind(this),
this.handleTopDragLeaveCapture=this.handleTopDragLeaveCapture.bind(this),this.handleTopDragOver=this.handleTopDragOver.bind(this),this.handleTopDragOverCapture=this.handleTopDragOverCapture.bind(this),this.handleTopDrop=this.handleTopDrop.bind(this),this.handleTopDropCapture=this.handleTopDropCapture.bind(this),this.handleSelectStart=this.handleSelectStart.bind(this),this.endDragIfSourceWasRemovedFromDOM=this.endDragIfSourceWasRemovedFromDOM.bind(this),this.endDragNativeItem=this.endDragNativeItem.bind(this);
}return e.prototype.setup=function(){if("undefined"!=typeof window){if(this.constructor.isSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.constructor.isSetUp=!0,this.addEventListeners(window)}},e.prototype.teardown=function(){"undefined"!=typeof window&&(this.constructor.isSetUp=!1,this.removeEventListeners(window),this.clearCurrentDragSourceNode())},e.prototype.addEventListeners=function(e){e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),
e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.removeEventListeners=function(e){
e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),
e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0)},e.prototype.connectDragPreview=function(e,t,n){var r=this;return this.sourcePreviewNodeOptions[e]=n,this.sourcePreviewNodes[e]=t,function(){delete r.sourcePreviewNodes[e],delete r.sourcePreviewNodeOptions[e]}},e.prototype.connectDragSource=function(e,t,n){var r=this;this.sourceNodes[e]=t,this.sourceNodeOptions[e]=n;var a=function(t){return r.handleDragStart(t,e)},i=function(t){return r.handleSelectStart(t,e);
};return t.setAttribute("draggable",!0),t.addEventListener("dragstart",a),t.addEventListener("selectstart",i),function(){delete r.sourceNodes[e],delete r.sourceNodeOptions[e],t.removeEventListener("dragstart",a),t.removeEventListener("selectstart",i),t.setAttribute("draggable",!1)}},e.prototype.connectDropTarget=function(e,t){var n=this,r=function(t){return n.handleDragEnter(t,e)},a=function(t){return n.handleDragOver(t,e)},i=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",r),
t.addEventListener("dragover",a),t.addEventListener("drop",i),function(){t.removeEventListener("dragenter",r),t.removeEventListener("dragover",a),t.removeEventListener("drop",i)}},e.prototype.getCurrentSourceNodeOptions=function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions[e];return o.default(t||{},{dropEffect:"move"})},e.prototype.getCurrentDropEffect=function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect},e.prototype.getCurrentSourcePreviewNodeOptions=function(){
var e=this.monitor.getSourceId(),t=this.sourcePreviewNodeOptions[e];return o.default(t||{},{anchorX:.5,anchorY:.5,captureDraggingState:!1})},e.prototype.getSourceClientOffset=function(e){return p.getNodeClientOffset(this.sourceNodes[e])},e.prototype.isDraggingNativeItem=function(){var e=this.monitor.getItemType();return Object.keys(g).some(function(t){return g[t]===e})},e.prototype.beginDragNativeItem=function(e){this.clearCurrentDragSourceNode();var t=h.createNativeDragSource(e);this.currentNativeSource=new t,
this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle]),f.isFirefox()&&window.addEventListener("mousemove",this.endDragNativeItem,!0)},e.prototype.endDragNativeItem=function(){this.isDraggingNativeItem()&&(f.isFirefox()&&window.removeEventListener("mousemove",this.endDragNativeItem,!0),this.actions.endDrag(),this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},e.prototype.endDragIfSourceWasRemovedFromDOM=function(){
var e=this.currentDragSourceNode;document.body.contains(e)||this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.setCurrentDragSourceNode=function(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.currentDragSourceNodeOffset=p.getNodeClientOffset(e),this.currentDragSourceNodeOffsetChanged=!1,window.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},e.prototype.clearCurrentDragSourceNode=function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,
this.currentDragSourceNodeOffset=null,this.currentDragSourceNodeOffsetChanged=!1,window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0),!0)},e.prototype.checkIfCurrentDragSourceRectChanged=function(){var e=this.currentDragSourceNode;return!!e&&(!!this.currentDragSourceNodeOffsetChanged||(this.currentDragSourceNodeOffsetChanged=!u.default(p.getNodeClientOffset(e),this.currentDragSourceNodeOffset),this.currentDragSourceNodeOffsetChanged))},e.prototype.handleTopDragStartCapture=function(){
this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},e.prototype.handleDragStart=function(e,t){this.dragStartSourceIds.unshift(t)},e.prototype.handleTopDragStart=function(e){var t=this,n=this.dragStartSourceIds;this.dragStartSourceIds=null;var r=p.getEventClientOffset(e);this.actions.beginDrag(n,{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});var a=e.dataTransfer,i=h.matchNativeItemType(a);if(this.monitor.isDragging()){if("function"==typeof a.setDragImage){
var s=this.monitor.getSourceId(),o=this.sourceNodes[s],l=this.sourcePreviewNodes[s]||o,u=this.getCurrentSourcePreviewNodeOptions(),d=u.anchorX,c=u.anchorY,f={anchorX:d,anchorY:c},v=p.getDragPreviewOffset(o,l,r,f);a.setDragImage(l,v.x,v.y)}try{a.setData("application/json",{})}catch(g){}this.setCurrentDragSourceNode(e.target);var m=this.getCurrentSourcePreviewNodeOptions(),y=m.captureDraggingState;y?this.actions.publishDragSource():setTimeout(function(){return t.actions.publishDragSource()})}else if(i)this.beginDragNativeItem(i);else{
if(!(a.types||e.target.hasAttribute&&e.target.hasAttribute("draggable")))return;e.preventDefault()}},e.prototype.handleTopDragEndCapture=function(){this.clearCurrentDragSourceNode()&&this.actions.endDrag()},e.prototype.handleTopDragEnterCapture=function(e){this.dragEnterTargetIds=[];var t=this.enterLeaveCounter.enter(e.target);if(t&&!this.monitor.isDragging()){var n=e.dataTransfer,r=h.matchNativeItemType(n);r&&this.beginDragNativeItem(r)}},e.prototype.handleDragEnter=function(e,t){this.dragEnterTargetIds.unshift(t);
},e.prototype.handleTopDragEnter=function(e){var t=this,n=this.dragEnterTargetIds;if(this.dragEnterTargetIds=[],this.monitor.isDragging()){f.isFirefox()||this.actions.hover(n,{clientOffset:p.getEventClientOffset(e)});var r=n.some(function(e){return t.monitor.canDropOnTarget(e)});r&&(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect())}},e.prototype.handleTopDragOverCapture=function(){this.dragOverTargetIds=[]},e.prototype.handleDragOver=function(e,t){this.dragOverTargetIds.unshift(t);
},e.prototype.handleTopDragOver=function(e){var t=this,n=this.dragOverTargetIds;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer.dropEffect="none");this.actions.hover(n,{clientOffset:p.getEventClientOffset(e)});var r=n.some(function(e){return t.monitor.canDropOnTarget(e)});r?(e.preventDefault(),e.dataTransfer.dropEffect=this.getCurrentDropEffect()):this.isDraggingNativeItem()?(e.preventDefault(),e.dataTransfer.dropEffect="none"):this.checkIfCurrentDragSourceRectChanged()&&(e.preventDefault(),
e.dataTransfer.dropEffect="move")},e.prototype.handleTopDragLeaveCapture=function(e){this.isDraggingNativeItem()&&e.preventDefault();var t=this.enterLeaveCounter.leave(e.target);t&&this.isDraggingNativeItem()&&this.endDragNativeItem()},e.prototype.handleTopDropCapture=function(e){this.dropTargetIds=[],e.preventDefault(),this.isDraggingNativeItem()&&this.currentNativeSource.mutateItemByReadingDataTransfer(e.dataTransfer),this.enterLeaveCounter.reset()},e.prototype.handleDrop=function(e,t){this.dropTargetIds.unshift(t);
},e.prototype.handleTopDrop=function(e){var t=this.dropTargetIds;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:p.getEventClientOffset(e)}),this.actions.drop(),this.isDraggingNativeItem()?this.endDragNativeItem():this.endDragIfSourceWasRemovedFromDOM()},e.prototype.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},e}();t.default=m,e.exports=t.default;
},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(t,r){n(this,e);for(var a=t.length,i=[],s=0;s<a;s++)i.push(s);i.sort(function(e,n){return t[e]<t[n]?-1:1});for(var o=[],l=[],u=[],d=void 0,c=void 0,s=0;s<a-1;s++)d=t[s+1]-t[s],c=r[s+1]-r[s],l.push(d),o.push(c),u.push(c/d);for(var f=[u[0]],s=0;s<l.length-1;s++){var p=u[s],h=u[s+1];if(p*h<=0)f.push(0);else{d=l[s];var v=l[s+1],g=d+v;f.push(3*g/((g+v)/p+(g+d)/h));
}}f.push(u[u.length-1]);for(var m=[],y=[],b=void 0,s=0;s<f.length-1;s++){b=u[s];var P=f[s],w=1/l[s],g=P+f[s+1]-b-b;m.push((b-P-g)*w),y.push(g*w*w)}this.xs=t,this.ys=r,this.c1s=f,this.c2s=m,this.c3s=y}return e.prototype.interpolate=function(e){var t=this.xs,n=this.ys,r=this.c1s,a=this.c2s,i=this.c3s,s=t.length-1;if(e===t[s])return n[s];for(var o=0,l=i.length-1,u=void 0;o<=l;){u=Math.floor(.5*(o+l));var d=t[u];if(d<e)o=u+1;else{if(!(d>e))return n[u];l=u-1}}s=Math.max(0,l);var c=e-t[s],f=c*c;return n[s]+r[s]*c+a[s]*f+i[s]*c*f;
},e}();t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(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}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t,n){var r=t.reduce(function(t,n){return t||e.getData(n);
},null);return null!=r?r:n}function o(e){var t=f[e],n=t.exposeProperty,r=t.matchesTypes,s=t.getData;return function(){function e(){a(this,e),this.item=Object.defineProperties({},i({},n,{get:function(){return console.warn("Browser doesn't allow reading \""+n+'" until the drop event.'),null},configurable:!0,enumerable:!0}))}return e.prototype.mutateItemByReadingDataTransfer=function(e){delete this.item[n],this.item[n]=s(e,r)},e.prototype.canDrag=function(){return!0},e.prototype.beginDrag=function(){
return this.item},e.prototype.isDragging=function(e,t){return t===e.getSourceId()},e.prototype.endDrag=function(){},e}()}function l(e){var t=Array.prototype.slice.call(e.types||[]);return Object.keys(f).filter(function(e){var n=f[e].matchesTypes;return n.some(function(e){return t.indexOf(e)>-1})})[0]||null}t.__esModule=!0;var u;t.createNativeDragSource=o,t.matchNativeItemType=l;var d=n(520),c=r(d),f=(u={},i(u,c.FILE,{exposeProperty:"files",matchesTypes:["Files"],getData:function(e){return Array.prototype.slice.call(e.files);
}}),i(u,c.URL,{exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(e,t){return s(e,t,"").split("\n")}}),i(u,c.TEXT,{exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(e,t){return s(e,t,"")}}),u)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=e.nodeType===d?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top,a=n.left;return{x:a,y:r}}function i(e){return{x:e.clientX,y:e.clientY
}}function s(e,t,n,r){var i="IMG"===t.nodeName&&(o.isFirefox()||!document.documentElement.contains(t)),s=i?e:t,l=a(s),d={x:n.x-l.x,y:n.y-l.y},c=e.offsetWidth,f=e.offsetHeight,p=r.anchorX,h=r.anchorY,v=i?t.width:c,g=i?t.height:f;o.isSafari()&&i?(g/=window.devicePixelRatio,v/=window.devicePixelRatio):o.isFirefox()&&!i&&(g*=window.devicePixelRatio,v*=window.devicePixelRatio);var m=new u.default([0,.5,1],[d.x,d.x/c*v,d.x+v-c]),y=new u.default([0,.5,1],[d.y,d.y/f*g,d.y+g-f]),b=m.interpolate(p),P=y.interpolate(h);
return o.isSafari()&&i&&(P+=(window.devicePixelRatio-1)*g),{x:b,y:P}}t.__esModule=!0,t.getNodeClientOffset=a,t.getEventClientOffset=i,t.getDragPreviewOffset=s;var o=n(842),l=n(2611),u=r(l),d=1},function(e,t){"use strict";function n(){return r||(r=new Image,r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),r}t.__esModule=!0,t.default=n;var r=void 0;e.exports=t.default},522,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){
if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 s(e){g.default.apply(void 0,["DragDropContext","backend"].concat(l.call(arguments)));var t=void 0;t="object"==typeof e&&"function"==typeof e.default?e.default:e,
h.default("function"==typeof t,"Expected the backend to be a function or an ES6 module exporting a default function. Read more: http://gaearon.github.io/react-dnd/docs-drag-drop-context.html");var n={dragDropManager:new f.DragDropManager(t)};return function(e){var t=e.displayName||e.name||"Component";return function(r){function s(){a(this,s),r.apply(this,arguments)}return i(s,r),s.prototype.getDecoratedComponentInstance=function(){return this.refs.child},s.prototype.getManager=function(){return n.dragDropManager;
},s.prototype.getChildContext=function(){return n},s.prototype.render=function(){return c.default.createElement(e,o({},this.props,{ref:"child"}))},u(s,null,[{key:"DecoratedComponent",value:e,enumerable:!0},{key:"displayName",value:"DragDropContext("+t+")",enumerable:!0},{key:"childContextTypes",value:{dragDropManager:d.PropTypes.object.isRequired},enumerable:!0}]),s}(d.Component)}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);
}return e},l=Array.prototype.slice,u=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),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=s;var d=n(4),c=r(d),f=n(2029),p=n(88),h=r(p),v=n(363),g=r(v);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");
}function i(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 s(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return w.default.apply(void 0,["DragLayer","collect[, options]"].concat(l.call(arguments))),b.default("function"==typeof e,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-layer.html",e),
b.default(m.default(t),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-layer.html',t),function(n){var r=t.arePropsEqual,s=void 0===r?v.default:r,l=n.displayName||n.name||"Component";return function(t){function r(e,n){a(this,r),t.call(this,e),this.handleChange=this.handleChange.bind(this),this.manager=n.dragDropManager,b.default("object"==typeof this.manager,"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://gaearon.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",l,l),
this.state=this.getCurrentState()}return i(r,t),r.prototype.getDecoratedComponentInstance=function(){return this.refs.child},r.prototype.shouldComponentUpdate=function(e,t){return!s(e,this.props)||!p.default(t,this.state)},u(r,null,[{key:"DecoratedComponent",value:n,enumerable:!0},{key:"displayName",value:"DragLayer("+l+")",enumerable:!0},{key:"contextTypes",value:{dragDropManager:d.PropTypes.object.isRequired},enumerable:!0}]),r.prototype.componentDidMount=function(){this.isCurrentlyMounted=!0;var e=this.manager.getMonitor();
this.unsubscribeFromOffsetChange=e.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=e.subscribeToStateChange(this.handleChange),this.handleChange()},r.prototype.componentWillUnmount=function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange(),this.unsubscribeFromStateChange()},r.prototype.handleChange=function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();p.default(e,this.state)||this.setState(e)}},r.prototype.getCurrentState=function(){var t=this.manager.getMonitor();
return e(t)},r.prototype.render=function(){return c.default.createElement(n,o({},this.props,this.state,{ref:"child"}))},r}(d.Component)}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=Array.prototype.slice,u=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),Object.defineProperty(e,r.key,r);
}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=s;var d=n(4),c=r(d),f=n(522),p=r(f),h=n(847),v=r(h),g=n(129),m=r(g),y=n(88),b=r(y),P=n(363),w=r(P);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];c.default.apply(void 0,["DragSource","type, spec, collect[, options]"].concat(i.call(arguments)));var a=e;"function"!=typeof e&&(o.default(_.default(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',e),
a=function(){return e}),o.default(u.default(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',t);var s=m.default(t);return o.default("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',n),
o.default(u.default(r),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',n),function(e){return p.default({connectBackend:function(e,t){return e.connectDragSource(t)},containerDisplayName:"DragSource",createHandler:s,registerHandler:v.default,createMonitor:b.default,createConnector:w.default,DecoratedComponent:e,getType:a,collect:n,options:r})}}t.__esModule=!0;
var i=Array.prototype.slice;t.default=a;var s=n(88),o=r(s),l=n(129),u=r(l),d=n(363),c=r(d),f=n(845),p=r(f),h=n(2626),v=r(h),g=n(2621),m=r(g),y=n(2622),b=r(y),P=n(2620),w=r(P),S=n(846),_=r(S);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];c.default.apply(void 0,["DropTarget","type, spec, collect[, options]"].concat(i.call(arguments)));var a=e;"function"!=typeof e&&(o.default(_.default(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',e),
a=function(){return e}),o.default(u.default(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',t);var s=m.default(t);return o.default("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',n),
o.default(u.default(r),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',n),function(e){return p.default({connectBackend:function(e,t){return e.connectDropTarget(t)},containerDisplayName:"DropTarget",createHandler:s,registerHandler:v.default,createMonitor:b.default,createConnector:w.default,DecoratedComponent:e,getType:a,collect:n,options:r})}}t.__esModule=!0;
var i=Array.prototype.slice;t.default=a;var s=n(88),o=r(s),l=n(129),u=r(l),d=n(363),c=r(d),f=n(845),p=r(f),h=n(2627),v=r(h),g=n(2624),m=r(g),y=n(2625),b=r(y),P=n(2623),w=r(P),S=n(846),_=r(S);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){function t(){u&&(u(),u=null),a&&i&&(u=e.connectDragSource(a,i,o))}function n(){f&&(f(),f=null),a&&d&&(f=e.connectDragPreview(a,d,c))}function r(e){e!==a&&(a=e,t(),n())}var a=void 0,i=void 0,o=void 0,u=void 0,d=void 0,c=void 0,f=void 0,p=s.default({
dragSource:function(e,n){e===i&&l.default(n,o)||(i=e,o=n,t())},dragPreview:function(e,t){e===d&&l.default(t,c)||(d=e,c=t,n())}});return{receiveHandlerId:r,hooks:p}}t.__esModule=!0,t.default=a;var i=n(848),s=r(i),o=n(844),l=r(o);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){Object.keys(e).forEach(function(t){o.default(u.indexOf(t)>-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html',u.join(", "),t),
o.default("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html",t,t,e[t])}),d.forEach(function(t){o.default("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drag-source.html",t,t,e[t])});var t=function(){function t(e){
a(this,t),this.monitor=e,this.props=null,this.component=null}return t.prototype.receiveProps=function(e){this.props=e},t.prototype.receiveComponent=function(e){this.component=e},t.prototype.canDrag=function(){return!e.canDrag||e.canDrag(this.props,this.monitor)},t.prototype.isDragging=function(t,n){return e.isDragging?e.isDragging(this.props,this.monitor):n===t.getSourceId()},t.prototype.beginDrag=function(){var t=e.beginDrag(this.props,this.monitor,this.component);return t},t.prototype.endDrag=function(){
e.endDrag&&e.endDrag(this.props,this.monitor,this.component)},t}();return function(e){return new t(e)}}t.__esModule=!0,t.default=i;var s=n(88),o=r(s),l=n(129),u=(r(l),["canDrag","beginDrag","canDrag","isDragging","endDrag"]),d=["beginDrag"];e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return new d(e)}t.__esModule=!0,t.default=i;var s=n(88),o=r(s),l=!1,u=!1,d=function(){
function e(t){a(this,e),this.internalMonitor=t.getMonitor()}return e.prototype.receiveHandlerId=function(e){this.sourceId=e},e.prototype.canDrag=function(){o.default(!l,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drag-source-monitor.html");try{return l=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{l=!1}},e.prototype.isDragging=function(){o.default(!u,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drag-source-monitor.html");
try{return u=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{u=!1}},e.prototype.getItemType=function(){return this.internalMonitor.getItemType()},e.prototype.getItem=function(){return this.internalMonitor.getItem()},e.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},e.prototype.didDrop=function(){return this.internalMonitor.didDrop()},e.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},e.prototype.getInitialSourceClientOffset=function(){
return this.internalMonitor.getInitialSourceClientOffset()},e.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},e.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},e.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e){function t(){o&&(o(),
o=null),r&&a&&(o=e.connectDropTarget(r,a,i))}function n(e){e!==r&&(r=e,t())}var r=void 0,a=void 0,i=void 0,o=void 0,u=s.default({dropTarget:function(e,n){e===a&&l.default(n,i)||(a=e,i=n,t())}});return{receiveHandlerId:n,hooks:u}}t.__esModule=!0,t.default=a;var i=n(848),s=r(i),o=n(844),l=r(o);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){
Object.keys(e).forEach(function(t){o.default(u.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html',u.join(", "),t),o.default("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://gaearon.github.io/react-dnd/docs-drop-target.html",t,t,e[t]);
});var t=function(){function t(e){a(this,t),this.monitor=e,this.props=null,this.component=null}return t.prototype.receiveProps=function(e){this.props=e},t.prototype.receiveMonitor=function(e){this.monitor=e},t.prototype.receiveComponent=function(e){this.component=e},t.prototype.canDrop=function(){return!e.canDrop||e.canDrop(this.props,this.monitor)},t.prototype.hover=function(){e.hover&&e.hover(this.props,this.monitor,this.component)},t.prototype.drop=function(){if(e.drop){var t=e.drop(this.props,this.monitor,this.component);
return t}},t}();return function(e){return new t(e)}}t.__esModule=!0,t.default=i;var s=n(88),o=r(s),l=n(129),u=(r(l),["canDrop","hover","drop"]);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return new u(e)}t.__esModule=!0,t.default=i;var s=n(88),o=r(s),l=!1,u=function(){function e(t){a(this,e),this.internalMonitor=t.getMonitor()}return e.prototype.receiveHandlerId=function(e){
this.targetId=e},e.prototype.canDrop=function(){o.default(!l,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://gaearon.github.io/react-dnd/docs-drop-target-monitor.html");try{return l=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{l=!1}},e.prototype.isOver=function(e){return this.internalMonitor.isOverTarget(this.targetId,e)},e.prototype.getItemType=function(){return this.internalMonitor.getItemType()},e.prototype.getItem=function(){return this.internalMonitor.getItem();
},e.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},e.prototype.didDrop=function(){return this.internalMonitor.didDrop()},e.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},e.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},e.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},e.prototype.getClientOffset=function(){
return this.internalMonitor.getClientOffset()},e.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();e.exports=t.default},function(e,t){"use strict";function n(e,t,n){function r(){a.removeSource(i)}var a=n.getRegistry(),i=a.addSource(e,t);return{handlerId:i,unregister:r}}t.__esModule=!0,t.default=n,e.exports=t.default},function(e,t){"use strict";function n(e,t,n){function r(){a.removeTarget(i)}var a=n.getRegistry(),i=a.addTarget(e,t);
return{handlerId:i,unregister:r}}t.__esModule=!0,t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var n=e.ref;return s.default("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),n?o.cloneElement(e,{ref:function(e){
t(e),n&&n(e)}}):o.cloneElement(e,{ref:t})}t.__esModule=!0,t.default=a;var i=n(88),s=r(i),o=n(4);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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(4),l=n(849),u=r(l),d=function(e){function t(n,r){a(this,t);var s=i(this,e.call(this,n,r));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=d,d.propTypes={store:u.default.isRequired,children:o.PropTypes.element.isRequired},d.childContextTypes={store:u.default.isRequired}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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,_.default)((0,b.default)(e),"`%sToProps` must return an object. Instead received %s.",t?"mapDispatch":"mapState",e),e}function u(e,t,n){function r(e,t,n){var r=y(e,t,n);return(0,_.default)((0,b.default)(r),"`mergeProps` must return an object. Instead received %s.",r),
r}var u=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],f=Boolean(e),h=e||T,g=(0,b.default)(t)?(0,m.default)(t):t||I,y=n||M,P=u.pure,S=void 0===P||P,x=u.withRef,E=void 0!==x&&x,k=S&&y!==M,D=C++;return function(e){var t=function(t){function n(e,r){a(this,n);var s=i(this,t.call(this,e,r));s.version=D,s.store=e.store||r.store,(0,_.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!S||this.haveOwnPropsChanged||this.hasStoreStateChanged},n.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),r=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n);return l(r)},n.prototype.configureFinalMapState=function(e,t){var n=h(e.getState(),t),r="function"==typeof n;
return this.finalMapStateToProps=r?n:h,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,r?this.computeStateProps(e,t):l(n)},n.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,r=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return l(r,!0)},n.prototype.configureFinalMapDispatch=function(e,t){var n=g(e.dispatch,t),r="function"==typeof n;
return this.finalMapDispatchToProps=r?n:g,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,r?this.computeDispatchProps(e,t):l(n,!0)},n.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,v.default)(e,this.stateProps))&&(this.stateProps=e,!0)},n.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,v.default)(e,this.dispatchProps))&&(this.dispatchProps=e,
!0)},n.prototype.updateMergedPropsIfNeeded=function(){var e=r(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&k&&(0,v.default)(e,this.mergedProps))&&(this.mergedProps=e,!0)},n.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},n.prototype.trySubscribe=function(){f&&!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){S&&(0,v.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();S&&e===t||(this.hasStoreStateChanged=!0,this.setState({storeState:t}))}},n.prototype.getWrappedInstance=function(){return(0,_.default)(E,"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,r=this.renderedElement;
this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1;var a=!0,i=!0;S&&r&&(a=n||t&&this.doStatePropsDependOnOwnProps,i=t&&this.doDispatchPropsDependOnOwnProps);var s=!1,o=!1;a&&(s=this.updateStatePropsIfNeeded()),i&&(o=this.updateDispatchPropsIfNeeded());var l=!0;return l=!!(s||o||t)&&this.updateMergedPropsIfNeeded(),!l&&r?r:(E?this.renderedElement=(0,c.createElement)(e,d({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,c.createElement)(e,this.mergedProps),this.renderedElement);
},n}(c.Component);return t.displayName="Connect("+o(e)+")",t.WrappedComponent=e,t.contextTypes={store:p.default},t.propTypes={store:p.default},(0,w.default)(t,e)}}var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.__esModule=!0,t.default=u;var c=n(4),f=n(849),p=r(f),h=n(2631),v=r(h),g=n(2632),m=r(g),y=n(129),b=r(y),P=n(2538),w=r(P),S=n(88),_=r(S),T=function(e){return{}},I=function(e){
return{dispatch:e}},M=function(e,t,n){return d({},n,e,t)},C=0},function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=Object.prototype.hasOwnProperty,i=0;i<n.length;i++)if(!a.call(t,n[i])||e[n[i]]!==t[n[i]])return!1;return!0}t.__esModule=!0,t.default=n},function(e,t,n){"use strict";function r(e){return function(t){return(0,a.bindActionCreators)(e,t)}}t.__esModule=!0,t.default=r;var a=n(2699)},function(e,t,n){"use strict";
var r=n(68),a=n(817),i={focusDOMComponent:function(){a(r.getNodeFromInstance(this))}};e.exports=i},function(e,t,n){"use strict";function r(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function a(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function i(e){switch(e){case x.topCompositionStart:return E.compositionStart;case x.topCompositionEnd:return E.compositionEnd;case x.topCompositionUpdate:return E.compositionUpdate;
}}function s(e,t){return e===x.topKeyDown&&t.keyCode===w}function o(e,t){switch(e){case x.topKeyUp:return P.indexOf(t.keyCode)!==-1;case x.topKeyDown:return t.keyCode!==w;case x.topKeyPress:case x.topMouseDown:case x.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,r){var a,u;if(S?a=i(e):D?o(e,n)&&(a=E.compositionEnd):s(e,n)&&(a=E.compositionStart),!a)return null;I&&(D||a!==E.compositionStart?a===E.compositionEnd&&D&&(u=D.getData()):D=g.getPooled(r));
var d=m.getPooled(a,t,n,r);if(u)d.data=u;else{var c=l(n);null!==c&&(d.data=c)}return h.accumulateTwoPhaseDispatches(d),d}function d(e,t){switch(e){case x.topCompositionEnd:return l(t);case x.topKeyPress:var n=t.which;return n!==M?null:(k=!0,C);case x.topTextInput:var r=t.data;return r===C&&k?null:r;default:return null}}function c(e,t){if(D){if(e===x.topCompositionEnd||o(e,t)){var n=D.getData();return g.release(D),D=null,n}return null}switch(e){case x.topPaste:return null;case x.topKeyPress:return t.which&&!a(t)?String.fromCharCode(t.which):null;
case x.topCompositionEnd:return I?null:t.data;default:return null}}function f(e,t,n,r){var a;if(a=T?d(e,n):c(e,n),!a)return null;var i=y.getPooled(E.beforeInput,t,n,r);return i.data=a,h.accumulateTwoPhaseDispatches(i),i}var p=n(130),h=n(286),v=n(80),g=n(2639),m=n(2681),y=n(2684),b=n(155),P=[9,13,27,32],w=229,S=v.canUseDOM&&"CompositionEvent"in window,_=null;v.canUseDOM&&"documentMode"in document&&(_=document.documentMode);var T=v.canUseDOM&&"TextEvent"in window&&!_&&!r(),I=v.canUseDOM&&(!S||_&&_>8&&_<=11),M=32,C=String.fromCharCode(M),x=p.topLevelTypes,E={
beforeInput:{phasedRegistrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[x.topCompositionEnd,x.topKeyPress,x.topTextInput,x.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[x.topBlur,x.topCompositionEnd,x.topKeyDown,x.topKeyPress,x.topKeyUp,x.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null
})},dependencies:[x.topBlur,x.topCompositionStart,x.topKeyDown,x.topKeyPress,x.topKeyUp,x.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[x.topBlur,x.topCompositionUpdate,x.topKeyDown,x.topKeyPress,x.topKeyUp,x.topMouseDown]}},k=!1,D=null,A={eventTypes:E,extractEvents:function(e,t,n,r){return[u(e,t,n,r),f(e,t,n,r)]}};e.exports=A},function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();
return"select"===t||"input"===t&&"file"===e.type}function a(e){var t=T.getPooled(k.change,A,e,I(e));P.accumulateTwoPhaseDispatches(t),_.batchedUpdates(i,t)}function i(e){b.enqueueEvents(e),b.processEventQueue(!1)}function s(e,t){D=e,A=t,D.attachEvent("onchange",a)}function o(){D&&(D.detachEvent("onchange",a),D=null,A=null)}function l(e,t){if(e===E.topChange)return t}function u(e,t,n){e===E.topFocus?(o(),s(t,n)):e===E.topBlur&&o()}function d(e,t){D=e,A=t,O=e.value,R=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),
Object.defineProperty(D,"value",j),D.attachEvent?D.attachEvent("onpropertychange",f):D.addEventListener("propertychange",f,!1)}function c(){D&&(delete D.value,D.detachEvent?D.detachEvent("onpropertychange",f):D.removeEventListener("propertychange",f,!1),D=null,A=null,O=null,R=null)}function f(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==O&&(O=t,a(e))}}function p(e,t){if(e===E.topInput)return t}function h(e,t,n){e===E.topFocus?(c(),d(t,n)):e===E.topBlur&&c()}function v(e,t){if((e===E.topSelectionChange||e===E.topKeyUp||e===E.topKeyDown)&&D&&D.value!==O)return O=D.value,
A}function g(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function m(e,t){if(e===E.topClick)return t}var y=n(130),b=n(285),P=n(286),w=n(80),S=n(68),_=n(115),T=n(131),I=n(535),M=n(537),C=n(881),x=n(155),E=y.topLevelTypes,k={change:{phasedRegistrationNames:{bubbled:x({onChange:null}),captured:x({onChangeCapture:null})},dependencies:[E.topBlur,E.topChange,E.topClick,E.topFocus,E.topInput,E.topKeyDown,E.topKeyUp,E.topSelectionChange]}},D=null,A=null,O=null,R=null,L=!1;
w.canUseDOM&&(L=M("change")&&(!("documentMode"in document)||document.documentMode>8));var N=!1;w.canUseDOM&&(N=M("input")&&(!("documentMode"in document)||document.documentMode>11));var j={get:function(){return R.get.call(this)},set:function(e){O=""+e,R.set.call(this,e)}},U={eventTypes:k,extractEvents:function(e,t,n,a){var i,s,o=t?S.getNodeFromInstance(t):window;if(r(o)?L?i=l:s=u:C(o)?N?i=p:(i=v,s=h):g(o)&&(i=m),i){var d=i(e,t);if(d){var c=T.getPooled(k.change,d,n,a);return c.type="change",P.accumulateTwoPhaseDispatches(c),
c}}s&&s(e,o,t)}};e.exports=U},function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var a=n(232),i=n(80),s=n(2242),o=n(97),l=n(819),u=n(39),d=/^(<[^ \/>]+)/,c="data-danger-index",f={dangerouslyRenderMarkup:function(e){i.canUseDOM?void 0:u(!1);for(var t,n={},a=0;a<e.length;a++)e[a]?void 0:u(!1),t=r(e[a]),t=l(t)?t:"*",n[t]=n[t]||[],n[t][a]=e[a];var f=[],p=0;for(t in n)if(n.hasOwnProperty(t)){var h,v=n[t];for(h in v)if(v.hasOwnProperty(h)){var g=v[h];v[h]=g.replace(d,"$1 "+c+'="'+h+'" ');
}for(var m=s(v.join(""),o),y=0;y<m.length;++y){var b=m[y];b.hasAttribute&&b.hasAttribute(c)&&(h=+b.getAttribute(c),b.removeAttribute(c),f.hasOwnProperty(h)?u(!1):void 0,f[h]=b,p+=1)}}return p!==f.length?u(!1):void 0,f.length!==e.length?u(!1):void 0,f},dangerouslyReplaceNodeWithMarkup:function(e,t){if(i.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 a.replaceChildWithTree(e,t)}};e.exports=f},function(e,t,n){
"use strict";var r=n(155),a=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];e.exports=a},function(e,t,n){"use strict";var r=n(130),a=n(286),i=n(68),s=n(370),o=n(155),l=r.topLevelTypes,u={mouseEnter:{registrationName:o({onMouseEnter:null}),dependencies:[l.topMouseOut,l.topMouseOver]},mouseLeave:{registrationName:o({onMouseLeave:null}),dependencies:[l.topMouseOut,l.topMouseOver]
}},d={eventTypes:u,extractEvents:function(e,t,n,r){if(e===l.topMouseOver&&(n.relatedTarget||n.fromElement))return null;if(e!==l.topMouseOut&&e!==l.topMouseOver)return null;var o;if(r.window===r)o=r;else{var d=r.ownerDocument;o=d?d.defaultView||d.parentWindow:window}var c,f;if(e===l.topMouseOut){c=t;var p=n.relatedTarget||n.toElement;f=p?i.getClosestInstanceFromNode(p):null}else c=null,f=t;if(c===f)return null;var h=null==c?o:i.getNodeFromInstance(c),v=null==f?o:i.getNodeFromInstance(f),g=s.getPooled(u.mouseLeave,c,n,r);
g.type="mouseleave",g.target=h,g.relatedTarget=v;var m=s.getPooled(u.mouseEnter,f,n,r);return m.type="mouseenter",m.target=v,m.relatedTarget=h,a.accumulateEnterLeaveDispatches(g,m,c,f),[g,m]}};e.exports=d},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var a=n(60),i=n(156),s=n(878);a(r.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,r=n.length,a=this.getText(),i=a.length;for(e=0;e<r&&n[e]===a[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===a[i-t];t++);var o=t>1?1-t:void 0;return this._fallbackText=a.slice(e,o),this._fallbackText}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(190),a=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,s=r.injection.HAS_SIDE_EFFECTS,o=r.injection.HAS_NUMERIC_VALUE,l=r.injection.HAS_POSITIVE_NUMERIC_VALUE,u=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,d={
isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:a|i,cite:0,classID:0,className:0,cols:l,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,coords:0,crossOrigin:0,data:0,dateTime:0,"default":i,defer:i,dir:0,disabled:i,download:u,draggable:0,
encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,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:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:a|i,muted:a|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,poster:0,preload:0,profile:0,
radioGroup:0,readOnly:i,rel:0,required:i,reversed:i,role:0,rows:l,rowSpan:o,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:a|i,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:a|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:i,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=d},function(e,t,n){"use strict";function r(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 a=n(60),i=n(366),s=n(2675),o=n(2642),l=i.createClass({displayName:"ReactCSSTransitionGroup",propTypes:{transitionName:o.propTypes.name,transitionAppear:i.PropTypes.bool,transitionEnter:i.PropTypes.bool,transitionLeave:i.PropTypes.bool,transitionAppearTimeout:r("Appear"),transitionEnterTimeout:r("Enter"),transitionLeaveTimeout:r("Leave")},getDefaultProps:function(){return{transitionAppear:!1,transitionEnter:!0,
transitionLeave:!0}},_wrapChild:function(e){return i.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 i.createElement(s,a({},this.props,{childFactory:this._wrapChild}))}});e.exports=l},function(e,t,n){"use strict";var r=n(366),a=n(858),i=n(2237),s=n(2674),o=n(882),l=17,u=r.createClass({
displayName:"ReactCSSTransitionGroupChild",propTypes:{name:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.shape({enter:r.PropTypes.string,leave:r.PropTypes.string,active:r.PropTypes.string}),r.PropTypes.shape({enter:r.PropTypes.string,enterActive:r.PropTypes.string,leave:r.PropTypes.string,leaveActive:r.PropTypes.string,appear:r.PropTypes.string,appearActive:r.PropTypes.string})]).isRequired,appear:r.PropTypes.bool,enter:r.PropTypes.bool,leave:r.PropTypes.bool,appearTimeout:r.PropTypes.number,
enterTimeout:r.PropTypes.number,leaveTimeout:r.PropTypes.number},transition:function(e,t,n){var r=a.findDOMNode(this);if(!r)return void(t&&t());var o=this.props.name[e]||this.props.name+"-"+e,l=this.props.name[e+"Active"]||o+"-active",u=null,d=function(e){e&&e.target!==r||(clearTimeout(u),i.removeClass(r,o),i.removeClass(r,l),s.removeEndEventListener(r,d),t&&t())};i.addClass(r,o),this.queueClass(l),n?(u=setTimeout(d,n),this.transitionTimeouts.push(u)):s.addEndEventListener(r,d)},queueClass:function(e){
this.classNameQueue.push(e),this.timeout||(this.timeout=setTimeout(this.flushClassNameQueue,l))},flushClassNameQueue:function(){this.isMounted()&&this.classNameQueue.forEach(i.addClass.bind(i,a.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 r(e,t,n){var r=void 0===e[n];null!=t&&r&&(e[n]=i(t))}var a=n(233),i=n(880),s=(n(526),n(539)),o=n(540),l=(n(52),{instantiateChildren:function(e,t,n){
if(null==e)return null;var a={};return o(e,r,a),a},updateChildren:function(e,t,n,r,o){if(t||e){var l,u;for(l in t)if(t.hasOwnProperty(l)){u=e&&e[l];var d=u&&u._currentElement,c=t[l];if(null!=u&&s(d,c))a.receiveComponent(u,c,r,o),t[l]=u;else{u&&(n[l]=a.getNativeNode(u),a.unmountComponent(u,!1));var f=i(c);t[l]=f}}for(l in e)!e.hasOwnProperty(l)||t&&t.hasOwnProperty(l)||(u=e[l],n[l]=a.getNativeNode(u),a.unmountComponent(u,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];
a.unmountComponent(r,t)}}});e.exports=l},function(e,t,n){"use strict";function r(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}function a(e){}function i(e,t){}function s(e){return e.prototype&&e.prototype.isReactComponent}var o=n(60),l=n(528),u=n(157),d=n(107),c=n(529),f=n(530),p=(n(98),n(868)),h=n(369),v=(n(368),n(233)),g=n(871),m=n(356),y=n(39),b=n(539);n(52);a.prototype.render=function(){var e=f.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);
return i(e,t),t};var P=1,w={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,r){
this._context=r,this._mountOrder=P++,this._nativeParent=t,this._nativeContainerInfo=n;var o,l=this._processProps(this._currentElement.props),u=this._processContext(r),c=this._currentElement.type,p=this._constructComponent(l,u);s(c)||null!=p&&null!=p.render||(o=p,i(c,o),null===p||p===!1||d.isValidElement(p)?void 0:y(!1),p=new a(c));p.props=l,p.context=u,p.refs=m,p.updater=g,this._instance=p,f.set(p,this);var h=p.state;void 0===h&&(p.state=h=null),"object"!=typeof h||Array.isArray(h)?y(!1):void 0,this._pendingStateQueue=null,
this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var v;return v=p.unstable_handleError?this.performInitialMountWithErrorHandling(o,t,n,e,r):this.performInitialMount(o,t,n,e,r),p.componentDidMount&&e.getReactMountReady().enqueue(p.componentDidMount,p),v},_constructComponent:function(e,t){return this._constructComponentWithoutOwner(e,t)},_constructComponentWithoutOwner:function(e,t){var n,r=this._currentElement.type;return n=s(r)?new r(e,t,g):r(e,t,g)},performInitialMountWithErrorHandling:function(e,t,n,r,a){
var i,s=r.checkpoint();try{i=this.performInitialMount(e,t,n,r,a)}catch(o){r.rollback(s),this._instance.unstable_handleError(o),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),s=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(s),i=this.performInitialMount(e,t,n,r,a)}return i},performInitialMount:function(e,t,n,r,a){var i=this._instance;i.componentWillMount&&(i.componentWillMount(),this._pendingStateQueue&&(i.state=this._processPendingState(i.props,i.context))),
void 0===e&&(e=this._renderValidatedComponent()),this._renderedNodeType=p.getType(e),this._renderedComponent=this._instantiateReactComponent(e);var s=v.mountComponent(this._renderedComponent,r,t,n,this._processChildContext(a));return s},getNativeNode:function(){return v.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()";
c.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(v.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,f.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;
if(!n)return m;var r={};for(var a in n)r[a]=e[a];return r},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){"object"!=typeof t.childContextTypes?y(!1):void 0;for(var a in r)a in t.childContextTypes?void 0:y(!1);return o({},e,r)}return e},_processProps:function(e){return e},_checkPropTypes:function(e,t,n){var a=this.getName();for(var i in e)if(e.hasOwnProperty(i)){
var s;try{"function"!=typeof e[i]?y(!1):void 0,s=e[i](t,i,a,n)}catch(o){s=o}if(s instanceof Error){r(this);n===h.prop}}},receiveComponent:function(e,t,n){var r=this._currentElement,a=this._context;this._pendingElement=null,this.updateComponent(t,r,e,a,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement?v.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,r,a){var i,s,o=this._instance,l=!1;this._context===a?i=o.context:(i=this._processContext(a),l=!0),t===n?s=n.props:(s=this._processProps(n.props),l=!0),l&&o.componentWillReceiveProps&&o.componentWillReceiveProps(s,i);var u=this._processPendingState(s,i),d=!0;!this._pendingForceUpdate&&o.shouldComponentUpdate&&(d=o.shouldComponentUpdate(s,u,i)),this._updateBatchNumber=null,d?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,s,u,i,e,a)):(this._currentElement=n,
this._context=a,o.props=s,o.state=u,o.context=i)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,a=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(a&&1===r.length)return r[0];for(var i=o({},a?r[0]:n.state),s=a?1:0;s<r.length;s++){var l=r[s];o(i,"function"==typeof l?l.call(n,i,e,t):l)}return i},_performComponentUpdate:function(e,t,n,r,a,i){var s,o,l,u=this._instance,d=Boolean(u.componentDidUpdate);d&&(s=u.props,
o=u.state,l=u.context),u.componentWillUpdate&&u.componentWillUpdate(t,n,r),this._currentElement=e,this._context=i,u.props=t,u.state=n,u.context=r,this._updateRenderedComponent(a,i),d&&a.getReactMountReady().enqueue(u.componentDidUpdate.bind(u,s,o,l),u)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,a=this._renderValidatedComponent();if(b(r,a))v.receiveComponent(n,a,e,this._processChildContext(t));else{var i=v.getNativeNode(n);v.unmountComponent(n,!1),this._renderedNodeType=p.getType(a),
this._renderedComponent=this._instantiateReactComponent(a);var s=v.mountComponent(this._renderedComponent,e,this._nativeParent,this._nativeContainerInfo,this._processChildContext(t));this._replaceNodeWithMarkup(i,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||d.isValidElement(e)?void 0:y(!1),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n?y(!1):void 0;var r=t.getPublicInstance(),a=n.refs===m?n.refs={}:n.refs;a[e]=r},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 a?null:e},_instantiateReactComponent:null},S={Mixin:w};e.exports=S},function(e,t,n){"use strict";var r=n(364),a={getNativeProps:r.getNativeProps};e.exports=a},function(e,t,n){"use strict";function r(e,t){t&&(Q[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?R(!1):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?R(!1):void 0,"object"==typeof t.dangerouslySetInnerHTML&&V in t.dangerouslySetInnerHTML?void 0:R(!1)),null!=t.style&&"object"!=typeof t.style?R(!1):void 0);
}function a(e,t,n,r){if(!(r instanceof A)){var a=e._nativeContainerInfo,s=a._node&&a._node.nodeType===q,o=s?a._node:a._ownerDocument;$(t,o),r.getReactMountReady().enqueue(i,{inst:e,registrationName:t,listener:n})}}function i(){var e=this;P.putListener(e.inst,e.registrationName,e.listener)}function s(){var e=this;x.postMountWrapper(e)}function o(){var e=this;e._rootNodeID?void 0:R(!1);var t=U(e);switch(t?void 0:R(!1),e._tag){case"iframe":case"object":e._wrapperState.listeners=[S.trapBubbledEvent(b.topLevelTypes.topLoad,"load",t)];
break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in W)W.hasOwnProperty(n)&&e._wrapperState.listeners.push(S.trapBubbledEvent(b.topLevelTypes[n],W[n],t));break;case"img":e._wrapperState.listeners=[S.trapBubbledEvent(b.topLevelTypes.topError,"error",t),S.trapBubbledEvent(b.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[S.trapBubbledEvent(b.topLevelTypes.topReset,"reset",t),S.trapBubbledEvent(b.topLevelTypes.topSubmit,"submit",t)];break;case"input":case"select":
case"textarea":e._wrapperState.listeners=[S.trapBubbledEvent(b.topLevelTypes.topInvalid,"invalid",t)]}}function l(){E.postUpdateWrapper(this)}function u(e){Z.call(X,e)||(K.test(e)?void 0:R(!1),X[e]=!0)}function d(e,t){return e.indexOf("-")>=0||null!=t.is}function c(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 f=n(60),p=n(2633),h=n(851),v=n(232),g=n(853),m=n(190),y=n(524),b=n(130),P=n(285),w=n(365),S=n(367),_=n(857),T=n(2645),I=n(859),M=n(68),C=n(2653),x=n(2655),E=n(860),k=n(2658),D=(n(98),n(2668)),A=n(2672),O=(n(97),n(372)),R=n(39),L=(n(537),n(155)),N=(n(820),n(541),n(52),I),j=P.deleteListener,U=M.getNodeFromInstance,$=S.listenTo,z=w.registrationNameModules,F={string:!0,number:!0},B=L({
style:null}),V=L({__html:null}),H={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},q=11,W={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"},G={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},Q=f({menuitem:!0},G),K=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,X={},Z={}.hasOwnProperty,J=1;c.displayName="ReactDOMComponent",c.Mixin={mountComponent:function(e,t,n,a){this._rootNodeID=J++,this._domID=n._idCounter++,
this._nativeParent=t,this._nativeContainerInfo=n;var i=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":i=T.getNativeProps(this,i,t);break;case"input":C.mountWrapper(this,i,t),i=C.getNativeProps(this,i),e.getReactMountReady().enqueue(o,this);break;case"option":x.mountWrapper(this,i,t),i=x.getNativeProps(this,i);break;case"select":E.mountWrapper(this,i,t),
i=E.getNativeProps(this,i),e.getReactMountReady().enqueue(o,this);break;case"textarea":k.mountWrapper(this,i,t),i=k.getNativeProps(this,i),e.getReactMountReady().enqueue(o,this)}r(this,i);var l,u;null!=t?(l=t._namespaceURI,u=t._tag):n._tag&&(l=n._namespaceURI,u=n._tag),(null==l||l===g.svg&&"foreignobject"===u)&&(l=g.html),l===g.html&&("svg"===this._tag?l=g.svg:"math"===this._tag&&(l=g.mathml)),this._namespaceURI=l;var d;if(e.useCreateElement){var c,f=n._ownerDocument;if(l===g.html)if("script"===this._tag){
var h=f.createElement("div"),m=this._currentElement.type;h.innerHTML="<"+m+"></"+m+">",c=h.removeChild(h.firstChild)}else c=f.createElement(this._currentElement.type,i.is||null);else c=f.createElementNS(l,this._currentElement.type);M.precacheNode(this,c),this._flags|=N.hasCachedChildNodes,this._nativeParent||y.setAttributeForRoot(c),this._updateDOMProperties(null,i,e);var b=v(c);this._createInitialChildren(e,i,a,b),d=b}else{var P=this._createOpenTagMarkupAndPutListeners(e,i),w=this._createContentMarkup(e,i,a);
d=!w&&G[this._tag]?P+"/>":P+">"+w+"</"+this._currentElement.type+">"}switch(this._tag){case"button":case"input":case"select":case"textarea":i.autoFocus&&e.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(s,this)}return d},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(z.hasOwnProperty(r))i&&a(this,r,i,e);else{r===B&&(i&&(i=this._previousStyleCopy=f({},t.style)),
i=h.createMarkupForStyles(i,this));var s=null;null!=this._tag&&d(this._tag,t)?H.hasOwnProperty(r)||(s=y.createMarkupForCustomAttribute(r,i)):s=y.createMarkupForProperty(r,i),s&&(n+=" "+s)}}return e.renderToStaticMarkup?n:(this._nativeParent||(n+=" "+y.createMarkupForRoot()),n+=" "+y.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",a=t.dangerouslySetInnerHTML;if(null!=a)null!=a.__html&&(r=a.__html);else{var i=F[typeof t.children]?t.children:null,s=null!=i?null:t.children;
if(null!=i)r=O(i);else if(null!=s){var o=this.mountChildren(s,e,n);r=o.join("")}}return Y[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var a=t.dangerouslySetInnerHTML;if(null!=a)null!=a.__html&&v.queueHTML(r,a.__html);else{var i=F[typeof t.children]?t.children:null,s=null!=i?null:t.children;if(null!=i)v.queueText(r,i);else if(null!=s)for(var o=this.mountChildren(s,e,n),l=0;l<o.length;l++)v.queueChild(r,o[l])}},receiveComponent:function(e,t,n){var r=this._currentElement;
this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,a){var i=t.props,s=this._currentElement.props;switch(this._tag){case"button":i=T.getNativeProps(this,i),s=T.getNativeProps(this,s);break;case"input":C.updateWrapper(this),i=C.getNativeProps(this,i),s=C.getNativeProps(this,s);break;case"option":i=x.getNativeProps(this,i),s=x.getNativeProps(this,s);break;case"select":i=E.getNativeProps(this,i),s=E.getNativeProps(this,s);break;case"textarea":k.updateWrapper(this),i=k.getNativeProps(this,i),
s=k.getNativeProps(this,s)}r(this,s),this._updateDOMProperties(i,s,e),this._updateDOMChildren(i,s,e,a),"select"===this._tag&&e.getReactMountReady().enqueue(l,this)},_updateDOMProperties:function(e,t,n){var r,i,s;for(r in e)if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&null!=e[r])if(r===B){var o=this._previousStyleCopy;for(i in o)o.hasOwnProperty(i)&&(s=s||{},s[i]="");this._previousStyleCopy=null}else z.hasOwnProperty(r)?e[r]&&j(this,r):(m.properties[r]||m.isCustomAttribute(r))&&y.deleteValueForProperty(U(this),r);
for(r in t){var l=t[r],u=r===B?this._previousStyleCopy:null!=e?e[r]:void 0;if(t.hasOwnProperty(r)&&l!==u&&(null!=l||null!=u))if(r===B)if(l?l=this._previousStyleCopy=f({},l):this._previousStyleCopy=null,u){for(i in u)!u.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(s=s||{},s[i]="");for(i in l)l.hasOwnProperty(i)&&u[i]!==l[i]&&(s=s||{},s[i]=l[i])}else s=l;else if(z.hasOwnProperty(r))l?a(this,r,l,n):u&&j(this,r);else if(d(this._tag,t))H.hasOwnProperty(r)||y.setValueForAttribute(U(this),r,l);else if(m.properties[r]||m.isCustomAttribute(r)){
var c=U(this);null!=l?y.setValueForProperty(c,r,l):y.deleteValueForProperty(c,r)}}s&&h.setValueForStyles(U(this),s,this)},_updateDOMChildren:function(e,t,n,r){var a=F[typeof e.children]?e.children:null,i=F[typeof t.children]?t.children:null,s=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,o=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,l=null!=a?null:e.children,u=null!=i?null:t.children,d=null!=a||null!=s,c=null!=i||null!=o;null!=l&&null==u?this.updateChildren(null,n,r):d&&!c&&this.updateTextContent(""),
null!=i?a!==i&&this.updateTextContent(""+i):null!=o?s!==o&&this.updateMarkup(""+o):null!=u&&this.updateChildren(u,n,r)},getNativeNode:function(){return U(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":R(!1)}this.unmountChildren(e),M.uncacheNode(this),P.deleteAllListeners(this),_.unmountIDFromEnvironment(this._rootNodeID),
this._rootNodeID=null,this._domID=null,this._wrapperState=null},getPublicInstance:function(){return U(this)}},f(c.prototype,c.Mixin,D.Mixin),e.exports=c},function(e,t,n){"use strict";function r(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===a?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var a=(n(541),9);e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,a,i){}var a=n(2660),i=(n(52),[]),s={addDevtool:function(e){
i.push(e)},removeDevtool:function(e){for(var t=0;t<i.length;t++)i[t]===e&&(i.splice(t,1),t--)},onCreateMarkupForProperty:function(e,t){r("onCreateMarkupForProperty",e,t)},onSetValueForProperty:function(e,t,n){r("onSetValueForProperty",e,t,n)},onDeleteValueForProperty:function(e,t){r("onDeleteValueForProperty",e,t)}};s.addDevtool(a),e.exports=s},function(e,t,n){"use strict";var r=n(60),a=n(232),i=n(68),s=function(e){this._currentElement=null,this._nativeNode=null,this._nativeParent=null,this._nativeContainerInfo=null,
this._domID=null};r(s.prototype,{mountComponent:function(e,t,n,r){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 i.precacheNode(this,u),a(u)}return e.renderToStaticMarkup?"":"<!--"+o+"-->"},receiveComponent:function(){},getNativeNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),e.exports=s},function(e,t,n){
"use strict";function r(e){return a.createFactory(e)}var a=n(107),i=(n(861),n(2248)),s=i({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"},r);e.exports=s},function(e,t){"use strict";var n={useCreateElement:!0};e.exports=n},function(e,t,n){"use strict";var r=n(523),a=n(68),i={dangerouslyProcessChildrenUpdates:function(e,t){var n=a.getNodeFromInstance(e);
r.processUpdates(n,t)}};e.exports=i},function(e,t,n){"use strict";function r(){this._rootNodeID&&f.updateWrapper(this)}function a(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);d.asap(r,this);var a=t.name;if("radio"===t.type&&null!=a){for(var i=u.getNodeFromInstance(this),s=i;s.parentNode;)s=s.parentNode;for(var o=s.querySelectorAll("input[name="+JSON.stringify(""+a)+'][type="radio"]'),f=0;f<o.length;f++){var p=o[f];if(p!==i&&p.form===i.form){var h=u.getInstanceFromNode(p);h?void 0:c(!1),
d.asap(r,h)}}}return n}var i=n(60),s=n(364),o=n(524),l=n(527),u=n(68),d=n(115),c=n(39),f=(n(52),{getNativeProps:function(e,t){var n=l.getValue(t),r=l.getChecked(t),a=i({type:void 0},s.getNativeProps(e,t),{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return a},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:t.defaultChecked||!1,initialValue:null!=n?n:null,
listeners:null,onChange:a.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&o.setValueForProperty(u.getNodeFromInstance(e),"checked",n||!1);var r=l.getValue(t);null!=r&&o.setValueForProperty(u.getNodeFromInstance(e),"value",""+r)}});e.exports=f},function(e,t,n){"use strict";var r=n(2648);e.exports={debugTool:r}},function(e,t,n){"use strict";var r=n(60),a=n(854),i=n(68),s=n(860),o=(n(52),{mountWrapper:function(e,t,n){var r=null;if(null!=n){var a=n;"optgroup"===a._tag&&(a=a._nativeParent),
null!=a&&"select"===a._tag&&(r=s.getSelectValueContext(a))}var i=null;if(null!=r)if(i=!1,Array.isArray(r)){for(var o=0;o<r.length;o++)if(""+r[o]==""+t.value){i=!0;break}}else i=""+r==""+t.value;e._wrapperState={selected:i}},postMountWrapper:function(e){var t=e._currentElement.props;if(null!=t.value){var n=i.getNodeFromInstance(e);n.setAttribute("value",t.value)}},getNativeProps:function(e,t){var n=r({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(n.selected=e._wrapperState.selected);
var i="";return a.forEach(t.children,function(e){null!=e&&("string"!=typeof e&&"number"!=typeof e||(i+=e))}),i&&(n.children=i),n}});e.exports=o},function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function a(e){var t=document.selection,n=t.createRange(),r=n.text.length,a=n.duplicate();a.moveToElementText(e),a.setEndPoint("EndToStart",n);var i=a.text.length,s=i+r;return{start:i,end:s}}function i(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;
var n=t.anchorNode,a=t.anchorOffset,i=t.focusNode,s=t.focusOffset,o=t.getRangeAt(0);try{o.startContainer.nodeType,o.endContainer.nodeType}catch(l){return null}var u=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),d=u?0:o.toString().length,c=o.cloneRange();c.selectNodeContents(e),c.setEnd(o.startContainer,o.startOffset);var f=r(c.startContainer,c.startOffset,c.endContainer,c.endOffset),p=f?0:c.toString().length,h=p+d,v=document.createRange();v.setStart(n,a),v.setEnd(i,s);var g=v.collapsed;
return{start:g?h:p,end:g?p:h}}function s(e,t){var n,r,a=document.selection.createRange().duplicate();void 0===t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),a.moveToElementText(e),a.moveStart("character",n),a.setEndPoint("EndToStart",a),a.moveEnd("character",r-n),a.select()}function o(e,t){if(window.getSelection){var n=window.getSelection(),r=e[d()].length,a=Math.min(t.start,r),i=void 0===t.end?a:Math.min(t.end,r);if(!n.extend&&a>i){var s=i;i=a,a=s}var o=u(e,a),l=u(e,i);
if(o&&l){var c=document.createRange();c.setStart(o.node,o.offset),n.removeAllRanges(),a>i?(n.addRange(c),n.extend(l.node,l.offset)):(c.setEnd(l.node,l.offset),n.addRange(c))}}}var l=n(80),u=n(2693),d=n(878),c=l.canUseDOM&&"selection"in document&&!("getSelection"in window),f={getOffsets:c?a:i,setOffsets:c?s:o};e.exports=f},function(e,t,n){"use strict";var r=n(60),a=n(523),i=n(232),s=n(68),o=(n(98),n(372)),l=n(39),u=(n(541),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});r(u.prototype,{mountComponent:function(e,t,n,r){var a=n._idCounter++,l=" react-text: "+a+" ",u=" /react-text ";if(this._domID=a,this._nativeParent=t,e.useCreateElement){var d=n._ownerDocument,c=d.createComment(l),f=d.createComment(u),p=i(d.createDocumentFragment());return i.queueChild(p,i(c)),this._stringText&&i.queueChild(p,i(d.createTextNode(this._stringText))),i.queueChild(p,i(f)),s.precacheNode(this,c),
this._closingComment=f,p}var h=o(this._stringText);return e.renderToStaticMarkup?h:"<!--"+l+"-->"+h+"<!--"+u+"-->"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getNativeNode();a.replaceDelimitedText(r[0],r[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 r(){this._rootNodeID&&f.updateWrapper(this)}function a(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);return d.asap(r,this),n}var i=n(60),s=n(364),o=n(524),l=n(527),u=n(68),d=n(115),c=n(39),f=(n(52),{getNativeProps:function(e,t){
null!=t.dangerouslySetInnerHTML?c(!1):void 0;var n=i({},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,r=t.children;null!=r&&(null!=n?c(!1):void 0,Array.isArray(r)&&(r.length<=1?void 0:c(!1),r=r[0]),n=""+r),null==n&&(n="");var i=l.getValue(t);e._wrapperState={initialValue:""+(null!=i?i:n),listeners:null,onChange:a.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=f},function(e,t,n){"use strict";function r(e,t){"_nativeNode"in e?void 0:l(!1),"_nativeNode"in t?void 0:l(!1);for(var n=0,r=e;r;r=r._nativeParent)n++;for(var a=0,i=t;i;i=i._nativeParent)a++;for(;n-a>0;)e=e._nativeParent,n--;for(;a-n>0;)t=t._nativeParent,a--;for(var s=n;s--;){if(e===t)return e;e=e._nativeParent,t=t._nativeParent}return null}function a(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 i(e){return"_nativeNode"in e?void 0:l(!1),e._nativeParent}function s(e,t,n){for(var r=[];e;)r.push(e),e=e._nativeParent;var a;for(a=r.length;a-- >0;)t(r[a],!1,n);for(a=0;a<r.length;a++)t(r[a],!0,n)}function o(e,t,n,a,i){for(var s=e&&t?r(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,a);for(u=l.length;u-- >0;)n(l[u],!1,i)}var l=n(39);e.exports={
isAncestor:a,getLowestCommonAncestor:r,getParentInstance:i,traverseTwoPhase:s,traverseEnterLeave:o}},function(e,t,n){"use strict";var r,a=(n(190),n(365),n(52),{onCreateMarkupForProperty:function(e,t){r(e)},onSetValueForProperty:function(e,t,n){r(t)},onDeleteValueForProperty:function(e,t){r(t)}});e.exports=a},function(e,t,n){"use strict";function r(e,t,n,r,a,i){}function a(e){}var i=(n(80),n(2251),n(52),[]),s={addDevtool:function(e){i.push(e)},removeDevtool:function(e){for(var t=0;t<i.length;t++)i[t]===e&&(i.splice(t,1),
t--)},beginProfiling:function(){},endProfiling:function(){},getFlushHistory:function(){},onBeginFlush:function(){r("onBeginFlush")},onEndFlush:function(){r("onEndFlush")},onBeginLifeCycleTimer:function(e,t){a(e),r("onBeginLifeCycleTimer",e,t)},onEndLifeCycleTimer:function(e,t){a(e),r("onEndLifeCycleTimer",e,t)},onBeginReconcilerTimer:function(e,t){a(e),r("onBeginReconcilerTimer",e,t)},onEndReconcilerTimer:function(e,t){a(e),r("onEndReconcilerTimer",e,t)},onBeginProcessingChildContext:function(){r("onBeginProcessingChildContext");
},onEndProcessingChildContext:function(){r("onEndProcessingChildContext")},onNativeOperation:function(e,t,n){a(e),r("onNativeOperation",e,t,n)},onSetState:function(){r("onSetState")},onSetDisplayName:function(e,t){a(e),r("onSetDisplayName",e,t)},onSetChildren:function(e,t){a(e),r("onSetChildren",e,t)},onSetOwner:function(e,t){a(e),r("onSetOwner",e,t)},onSetText:function(e,t){a(e),r("onSetText",e,t)},onMountRootComponent:function(e){a(e),r("onMountRootComponent",e)},onMountComponent:function(e){a(e),
r("onMountComponent",e)},onUpdateComponent:function(e){a(e),r("onUpdateComponent",e)},onUnmountComponent:function(e){a(e),r("onUnmountComponent",e)}};e.exports=s},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var a=n(60),i=n(115),s=n(371),o=n(97),l={initialize:o,close:function(){f.isBatchingUpdates=!1}},u={initialize:o,close:i.flushBatchedUpdates.bind(i)},d=[u,l];a(r.prototype,s.Mixin,{getTransactionWrappers:function(){return d}});var c=new r,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,a,i){
var s=f.isBatchingUpdates;f.isBatchingUpdates=!0,s?e(t,n,r,a,i):c.perform(e,null,t,n,r,a,i)}};e.exports=f},function(e,t,n){"use strict";function r(){S||(S=!0,m.EventEmitter.injectReactEventListener(g),m.EventPluginHub.injectEventPluginOrder(s),m.EventPluginUtils.injectComponentTree(c),m.EventPluginUtils.injectTreeTraversal(p),m.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:w,EnterLeaveEventPlugin:o,ChangeEventPlugin:i,SelectEventPlugin:P,BeforeInputEventPlugin:a}),m.NativeComponent.injectGenericComponentClass(d),
m.NativeComponent.injectTextComponentClass(h),m.DOMProperty.injectDOMPropertyConfig(l),m.DOMProperty.injectDOMPropertyConfig(b),m.EmptyComponent.injectEmptyComponentFactory(function(e){return new f(e)}),m.Updates.injectReconcileTransaction(y),m.Updates.injectBatchingStrategy(v),m.Component.injectEnvironment(u))}var a=n(2634),i=n(2635),s=n(2637),o=n(2638),l=n(2640),u=n(857),d=n(2646),c=n(68),f=n(2649),p=n(2659),h=n(2657),v=n(2662),g=n(2665),m=n(2666),y=n(2670),b=n(2676),P=n(2677),w=n(2678),S=!1;e.exports={
inject:r}},function(e,t,n){"use strict";function r(e){a.enqueueEvents(e),a.processEventQueue(!1)}var a=n(285),i={handleTopLevel:function(e,t,n,i){var s=a.extractEvents(e,t,n,i);r(s)}};e.exports=i},function(e,t,n){"use strict";function r(e){for(;e._nativeParent;)e=e._nativeParent;var t=c.getNodeFromInstance(e),n=t.parentNode;return c.getClosestInstanceFromNode(n)}function a(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){var t=p(e.nativeEvent),n=c.getClosestInstanceFromNode(t),a=n;
do e.ancestors.push(a),a=a&&r(a);while(a);for(var i=0;i<e.ancestors.length;i++)n=e.ancestors[i],v._handleTopLevel(e.topLevelType,n,e.nativeEvent,p(e.nativeEvent))}function s(e){var t=h(window);e(t)}var o=n(60),l=n(816),u=n(80),d=n(156),c=n(68),f=n(115),p=n(535),h=n(2243);o(a.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),d.addPoolingTo(a,d.twoArgumentPooler);var v={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:u.canUseDOM?window:null,setHandleTopLevel:function(e){
v._handleTopLevel=e},setEnabled:function(e){v._enabled=!!e},isEnabled:function(){return v._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?l.listen(r,t,v.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?l.capture(r,t,v.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=s.bind(null,e);l.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(v._enabled){var n=a.getPooled(e,t);try{f.batchedUpdates(i,n)}finally{a.release(n)}}}};e.exports=v;
},function(e,t,n){"use strict";var r=n(190),a=n(285),i=n(525),s=n(528),o=n(855),l=n(862),u=n(367),d=n(867),c=n(115),f={Component:s.injection,Class:o.injection,DOMProperty:r.injection,EmptyComponent:l.injection,EventPluginHub:a.injection,EventPluginUtils:i.injection,EventEmitter:u.injection,NativeComponent:d.injection,Updates:c.injection};e.exports=f},function(e,t,n){"use strict";var r=n(2689),a=/\/?>/,i=/^<\!\-\-/,s={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);
return i.test(e)?e:e.replace(a," "+s.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(s.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var a=r(e);return a===n}};e.exports=s},function(e,t,n){"use strict";function r(e,t,n){return{type:c.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function a(e,t,n){return{type:c.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:f.getNativeNode(e),toIndex:n,afterNode:t}}function i(e,t){return{type:c.REMOVE_NODE,
content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function s(e){return{type:c.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function o(e){return{type:c.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){d.processChildrenUpdates(e,t)}var d=n(528),c=(n(98),n(866)),f=(n(157),n(233)),p=n(2643),h=(n(97),n(875)),v=n(39),g={Mixin:{_reconcilerInstantiateChildren:function(e,t,n){
return p.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,a){var i;return i=h(t),p.updateChildren(e,i,n,r,a),i},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var a=[],i=0;for(var s in r)if(r.hasOwnProperty(s)){var o=r[s],l=f.mountComponent(o,t,this,this._nativeContainerInfo,n);o._mountIndex=i++,a.push(l)}return a},updateTextContent:function(e){var t=this._renderedChildren;p.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&v(!1);
var r=[o(e)];u(this,r)},updateMarkup:function(e){var t=this._renderedChildren;p.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&v(!1);var r=[s(e)];u(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,a={},i=this._reconcilerUpdateChildren(r,e,a,t,n);if(i||r){var s,o=null,d=0,c=0,p=null;for(s in i)if(i.hasOwnProperty(s)){var h=r&&r[s],v=i[s];h===v?(o=l(o,this.moveChild(h,p,c,d)),d=Math.max(h._mountIndex,d),h._mountIndex=c):(h&&(d=Math.max(h._mountIndex,d)),
o=l(o,this._mountChildAtIndex(v,p,c,t,n))),c++,p=f.getNativeNode(v)}for(s in a)a.hasOwnProperty(s)&&(o=l(o,this._unmountChild(r[s],a[s])));o&&u(this,o),this._renderedChildren=i}},unmountChildren:function(e){var t=this._renderedChildren;p.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){if(e._mountIndex<r)return a(e,t,n)},createChild:function(e,t,n){return r(n,t,e._mountIndex)},removeChild:function(e,t){return i(e,t)},_mountChildAtIndex:function(e,t,n,r,a){var i=f.mountComponent(e,r,this,this._nativeContainerInfo,a);
return e._mountIndex=n,this.createChild(e,t,i)},_unmountChild:function(e,t){var n=this.removeChild(e,t);return e._mountIndex=null,n}}};e.exports=g},function(e,t,n){"use strict";var r=n(39),a={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){a.isValidOwner(n)?void 0:r(!1),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){a.isValidOwner(n)?void 0:r(!1);var i=n.getPublicInstance();i&&i.refs[t]===e.getPublicInstance()&&n.detachRef(t);
}};e.exports=a},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=i.getPooled(null),this.useCreateElement=e}var a=n(60),i=n(852),s=n(156),o=n(367),l=n(864),u=n(371),d={initialize:l.getSelectionInformation,close:l.restoreSelection},c={initialize:function(){var e=o.isEnabled();return o.setEnabled(!1),e},close:function(e){o.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll();
}},p=[d,c,f],h={getTransactionWrappers:function(){return p},getReactMountReady:function(){return this.reactMountReady},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};a(r.prototype,u.Mixin,h),s.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):i.addComponentAsRefTo(t,e,n)}function a(e,t,n){
"function"==typeof e?e(null):i.removeComponentAsRefFrom(t,e,n)}var i=n(2669),s={};s.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},s.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,r=null===t||t===!1;return n||r||t._owner!==e._owner||t.ref!==e.ref},s.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&a(n,e,t._owner)}},e.exports=s},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.useCreateElement=!1;
}var a=n(60),i=n(156),s=n(371),o=[],l={enqueue:function(){}},u={getTransactionWrappers:function(){return o},getReactMountReady:function(){return l},destructor:function(){},checkpoint:function(){},rollback:function(){}};a(r.prototype,s.Mixin,u),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(875),a={getChildMapping:function(e){return e?r(e):e},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var r={},a=[];for(var i in e)t.hasOwnProperty(i)?a.length&&(r[i]=a,
a=[]):a.push(i);var s,o={};for(var l in t){if(r.hasOwnProperty(l))for(s=0;s<r[l].length;s++){var u=r[l][s];o[r[l][s]]=n(u)}o[l]=n(l)}for(s=0;s<a.length;s++)o[a[s]]=n(a[s]);return o}};e.exports=a},function(e,t,n){"use strict";function r(){var e=o("animationend"),t=o("transitionend");e&&l.push(e),t&&l.push(t)}function a(e,t,n){e.addEventListener(t,n,!1)}function i(e,t,n){e.removeEventListener(t,n,!1)}var s=n(80),o=n(879),l=[];s.canUseDOM&&r();var u={addEndEventListener:function(e,t){return 0===l.length?void window.setTimeout(t,0):void l.forEach(function(n){
a(e,n,t)})},removeEndEventListener:function(e,t){0!==l.length&&l.forEach(function(n){i(e,n,t)})}};e.exports=u},function(e,t,n){"use strict";var r=n(60),a=n(366),i=n(2673),s=n(97),o=a.createClass({displayName:"ReactTransitionGroup",propTypes:{component:a.PropTypes.any,childFactory:a.PropTypes.func},getDefaultProps:function(){return{component:"span",childFactory:s.thatReturnsArgument}},getInitialState:function(){return{children:i.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=i.getChildMapping(e.children),n=this.state.children;this.setState({children:i.mergeChildMappings(n,t)});var r;for(r in t){var a=n&&n.hasOwnProperty(r);!t[r]||a||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(r in n){var s=t&&t.hasOwnProperty(r);!n[r]||s||this.currentlyTransitioningKeys[r]||this.keysToLeave.push(r);
}},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=i.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=i.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=i.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)?this.performEnter(e):this.setState(function(t){var n=r({},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(a.cloneElement(this.props.childFactory(n),{ref:t,key:t}))}return a.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"},r={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"},a={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(r).forEach(function(e){a.Properties[e]=0,r[e]&&(a.DOMAttributeNames[e]=r[e])}),e.exports=a},function(e,t,n){"use strict";
function r(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 a(e,t){if(w||null==y||y!==c())return null;var n=r(y);if(!P||!h(P,n)){
P=n;var a=d.getPooled(m.select,b,e,t);return a.type="select",a.target=y,s.accumulateTwoPhaseDispatches(a),a}return null}var i=n(130),s=n(286),o=n(80),l=n(68),u=n(864),d=n(131),c=n(818),f=n(881),p=n(155),h=n(820),v=i.topLevelTypes,g=o.canUseDOM&&"documentMode"in document&&document.documentMode<=11,m={select:{phasedRegistrationNames:{bubbled:p({onSelect:null}),captured:p({onSelectCapture:null})},dependencies:[v.topBlur,v.topContextMenu,v.topFocus,v.topKeyDown,v.topMouseDown,v.topMouseUp,v.topSelectionChange]
}},y=null,b=null,P=null,w=!1,S=!1,_=p({onSelect:null}),T={eventTypes:m,extractEvents:function(e,t,n,r){if(!S)return null;var i=t?l.getNodeFromInstance(t):window;switch(e){case v.topFocus:(f(i)||"true"===i.contentEditable)&&(y=i,b=t,P=null);break;case v.topBlur:y=null,b=null,P=null;break;case v.topMouseDown:w=!0;break;case v.topContextMenu:case v.topMouseUp:return w=!1,a(n,r);case v.topSelectionChange:if(g)break;case v.topKeyDown:case v.topKeyUp:return a(n,r)}return null},didPutListener:function(e,t,n){
t===_&&(S=!0)}};e.exports=T},function(e,t,n){"use strict";var r=n(130),a=n(816),i=n(286),s=n(68),o=n(2679),l=n(2680),u=n(131),d=n(2683),c=n(2685),f=n(370),p=n(2682),h=n(2686),v=n(2687),g=n(287),m=n(2688),y=n(97),b=n(533),P=n(39),w=n(155),S=r.topLevelTypes,_={abort:{phasedRegistrationNames:{bubbled:w({onAbort:!0}),captured:w({onAbortCapture:!0})}},animationEnd:{phasedRegistrationNames:{bubbled:w({onAnimationEnd:!0}),captured:w({onAnimationEndCapture:!0})}},animationIteration:{phasedRegistrationNames:{
bubbled:w({onAnimationIteration:!0}),captured:w({onAnimationIterationCapture:!0})}},animationStart:{phasedRegistrationNames:{bubbled:w({onAnimationStart:!0}),captured:w({onAnimationStartCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:w({onBlur:!0}),captured:w({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:w({onCanPlay:!0}),captured:w({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:w({onCanPlayThrough:!0}),captured:w({onCanPlayThroughCapture:!0})}},
click:{phasedRegistrationNames:{bubbled:w({onClick:!0}),captured:w({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:w({onContextMenu:!0}),captured:w({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:w({onCopy:!0}),captured:w({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:w({onCut:!0}),captured:w({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:w({onDoubleClick:!0}),captured:w({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{
bubbled:w({onDrag:!0}),captured:w({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:w({onDragEnd:!0}),captured:w({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:w({onDragEnter:!0}),captured:w({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:w({onDragExit:!0}),captured:w({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:w({onDragLeave:!0}),captured:w({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:w({
onDragOver:!0}),captured:w({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:w({onDragStart:!0}),captured:w({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:w({onDrop:!0}),captured:w({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:w({onDurationChange:!0}),captured:w({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:w({onEmptied:!0}),captured:w({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:w({
onEncrypted:!0}),captured:w({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:w({onEnded:!0}),captured:w({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:w({onError:!0}),captured:w({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:w({onFocus:!0}),captured:w({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:w({onInput:!0}),captured:w({onInputCapture:!0})}},invalid:{phasedRegistrationNames:{bubbled:w({onInvalid:!0}),captured:w({onInvalidCapture:!0
})}},keyDown:{phasedRegistrationNames:{bubbled:w({onKeyDown:!0}),captured:w({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:w({onKeyPress:!0}),captured:w({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:w({onKeyUp:!0}),captured:w({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:w({onLoad:!0}),captured:w({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:w({onLoadedData:!0}),captured:w({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{
bubbled:w({onLoadedMetadata:!0}),captured:w({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:w({onLoadStart:!0}),captured:w({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:w({onMouseDown:!0}),captured:w({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:w({onMouseMove:!0}),captured:w({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:w({onMouseOut:!0}),captured:w({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{
bubbled:w({onMouseOver:!0}),captured:w({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:w({onMouseUp:!0}),captured:w({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:w({onPaste:!0}),captured:w({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:w({onPause:!0}),captured:w({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:w({onPlay:!0}),captured:w({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:w({onPlaying:!0}),captured:w({
onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:w({onProgress:!0}),captured:w({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:w({onRateChange:!0}),captured:w({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:w({onReset:!0}),captured:w({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:w({onScroll:!0}),captured:w({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:w({onSeeked:!0}),captured:w({onSeekedCapture:!0})
}},seeking:{phasedRegistrationNames:{bubbled:w({onSeeking:!0}),captured:w({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:w({onStalled:!0}),captured:w({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:w({onSubmit:!0}),captured:w({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:w({onSuspend:!0}),captured:w({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:w({onTimeUpdate:!0}),captured:w({onTimeUpdateCapture:!0})}},touchCancel:{
phasedRegistrationNames:{bubbled:w({onTouchCancel:!0}),captured:w({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:w({onTouchEnd:!0}),captured:w({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:w({onTouchMove:!0}),captured:w({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:w({onTouchStart:!0}),captured:w({onTouchStartCapture:!0})}},transitionEnd:{phasedRegistrationNames:{bubbled:w({onTransitionEnd:!0}),captured:w({onTransitionEndCapture:!0
})}},volumeChange:{phasedRegistrationNames:{bubbled:w({onVolumeChange:!0}),captured:w({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:w({onWaiting:!0}),captured:w({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:w({onWheel:!0}),captured:w({onWheelCapture:!0})}}},T={topAbort:_.abort,topAnimationEnd:_.animationEnd,topAnimationIteration:_.animationIteration,topAnimationStart:_.animationStart,topBlur:_.blur,topCanPlay:_.canPlay,topCanPlayThrough:_.canPlayThrough,
topClick:_.click,topContextMenu:_.contextMenu,topCopy:_.copy,topCut:_.cut,topDoubleClick:_.doubleClick,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,topInvalid:_.invalid,topKeyDown:_.keyDown,topKeyPress:_.keyPress,topKeyUp:_.keyUp,
topLoad:_.load,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,topReset:_.reset,topScroll:_.scroll,topSeeked:_.seeked,topSeeking:_.seeking,topStalled:_.stalled,topSubmit:_.submit,topSuspend:_.suspend,topTimeUpdate:_.timeUpdate,
topTouchCancel:_.touchCancel,topTouchEnd:_.touchEnd,topTouchMove:_.touchMove,topTouchStart:_.touchStart,topTransitionEnd:_.transitionEnd,topVolumeChange:_.volumeChange,topWaiting:_.waiting,topWheel:_.wheel};for(var I in T)T[I].dependencies=[I];var M=w({onClick:null}),C={},x={eventTypes:_,extractEvents:function(e,t,n,r){var a=T[e];if(!a)return null;var s;switch(e){case S.topAbort:case S.topCanPlay:case S.topCanPlayThrough:case S.topDurationChange:case S.topEmptied:case S.topEncrypted:case S.topEnded:
case S.topError:case S.topInput:case S.topInvalid:case S.topLoad:case S.topLoadedData:case S.topLoadedMetadata:case S.topLoadStart:case S.topPause:case S.topPlay:case S.topPlaying:case S.topProgress:case S.topRateChange:case S.topReset:case S.topSeeked:case S.topSeeking:case S.topStalled:case S.topSubmit:case S.topSuspend:case S.topTimeUpdate:case S.topVolumeChange:case S.topWaiting:s=u;break;case S.topKeyPress:if(0===b(n))return null;case S.topKeyDown:case S.topKeyUp:s=c;break;case S.topBlur:case S.topFocus:
s=d;break;case S.topClick:if(2===n.button)return null;case S.topContextMenu:case S.topDoubleClick:case S.topMouseDown:case S.topMouseMove:case S.topMouseOut:case S.topMouseOver:case S.topMouseUp:s=f;break;case S.topDrag:case S.topDragEnd:case S.topDragEnter:case S.topDragExit:case S.topDragLeave:case S.topDragOver:case S.topDragStart:case S.topDrop:s=p;break;case S.topTouchCancel:case S.topTouchEnd:case S.topTouchMove:case S.topTouchStart:s=h;break;case S.topAnimationEnd:case S.topAnimationIteration:
case S.topAnimationStart:s=o;break;case S.topTransitionEnd:s=v;break;case S.topScroll:s=g;break;case S.topWheel:s=m;break;case S.topCopy:case S.topCut:case S.topPaste:s=l}s?void 0:P(!1);var y=s.getPooled(a,t,n,r);return i.accumulateTwoPhaseDispatches(y),y},didPutListener:function(e,t,n){if(t===M){var r=e._rootNodeID,i=s.getNodeFromInstance(e);C[r]||(C[r]=a.listen(i,"click",y))}},willDeleteListener:function(e,t){if(t===M){var n=e._rootNodeID;C[n].remove(),delete C[n]}}};e.exports=x},function(e,t,n){
"use strict";function r(e,t,n,r){return a.call(this,e,t,n,r)}var a=n(131),i={animationName:null,elapsedTime:null,pseudoElement:null};a.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return a.call(this,e,t,n,r)}var a=n(131),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};a.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return a.call(this,e,t,n,r)}var a=n(131),i={data:null};a.augmentClass(r,i),
e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return a.call(this,e,t,n,r)}var a=n(370),i={dataTransfer:null};a.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return a.call(this,e,t,n,r)}var a=n(287),i={relatedTarget:null};a.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return a.call(this,e,t,n,r)}var a=n(131),i={data:null};a.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return a.call(this,e,t,n,r);
}var a=n(287),i=n(533),s=n(2692),o=n(534),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?i(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?i(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};a.augmentClass(r,l),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return a.call(this,e,t,n,r)}
var a=n(287),i=n(534),s={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};a.augmentClass(r,s),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return a.call(this,e,t,n,r)}var a=n(131),i={propertyName:null,elapsedTime:null,pseudoElement:null};a.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return a.call(this,e,t,n,r)}var a=n(370),i={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};a.augmentClass(r,i),e.exports=r},function(e,t){"use strict";function n(e){for(var t=1,n=0,a=0,i=e.length,s=i&-4;a<s;){for(var o=Math.min(a+4096,s);a<o;a+=4)n+=(t+=e.charCodeAt(a))+(t+=e.charCodeAt(a+1))+(t+=e.charCodeAt(a+2))+(t+=e.charCodeAt(a+3));t%=r,n%=r}for(;a<i;a++)n+=t+=e.charCodeAt(a);return t%=r,n%=r,t|n<<16}var r=65521;e.exports=n},function(e,t,n){
"use strict";function r(e,t,n){var r=null==t||"boolean"==typeof t||""===t;if(r)return"";var a=isNaN(t);if(a||0===t||i.hasOwnProperty(e)&&i[e])return""+t;if("string"==typeof t){t=t.trim()}return t+"px"}var a=n(850),i=(n(52),a.isUnitlessNumber);e.exports=r},function(e,t,n){"use strict";function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=i.get(e);return t?(t=s(t),t?a.getNodeFromInstance(t):null):void o(("function"==typeof e.render,!1))}var a=(n(157),n(68)),i=n(530),s=n(877),o=n(39);
n(52);e.exports=r},function(e,t,n){"use strict";function r(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=a(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?s[e.keyCode]||"Unidentified":""}var a=n(533),i={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=r},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e;
}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function a(e,t){for(var a=n(e),i=0,s=0;a;){if(3===a.nodeType){if(s=i+a.textContent.length,i<=t&&s>=t)return{node:a,offset:t-i};i=s}a=n(r(a))}}e.exports=a},function(e,t,n){"use strict";function r(e){return'"'+a(e)+'"'}var a=n(372);e.exports=r},function(e,t,n){"use strict";var r=n(865);e.exports=r.renderSubtreeIntoContainer},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];
return function(e){return function(n,r,a){var s=e(n,r,a),l=s.dispatch,u=[],d={getState:s.getState,dispatch:function(e){return l(e)}};return u=t.map(function(e){return e(d)}),l=o.default.apply(void 0,u)(s.dispatch),i({},s,{dispatch:l})}}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=a;var s=n(884),o=r(s)},function(e,t){"use strict";function n(e,t){return function(){
return t(e.apply(void 0,arguments))}}function r(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 r=Object.keys(e),a={},i=0;i<r.length;i++){var s=r[i],o=e[s];"function"==typeof o&&(a[s]=n(o,t))}return a}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";
function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var n=t&&t.type,r=n&&'"'+n.toString()+'"'||"an action";return"Given action "+r+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state.'}function i(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:o.ActionTypes.INIT});if("undefined"==typeof r)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 a="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof n(void 0,{type:a}))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={},r=0;r<t.length;r++){var s=t[r];"function"==typeof e[s]&&(n[s]=e[s])}var o,l=Object.keys(n);try{i(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 r=!1,i={},s=0;s<l.length;s++){var u=l[s],d=n[u],c=e[u],f=d(c,t);if("undefined"==typeof f){var p=a(u,t);throw new Error(p)}i[u]=f,r=r||f!==c}return r?i:e}}t.__esModule=!0,t.default=s;var o=n(542),l=n(129),u=(r(l),n(885));r(u);
},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var a=n(542),i=r(a),s=n(2698),o=r(s),l=n(2697),u=r(l),d=n(2696),c=r(d),f=n(884),p=r(f),h=n(885);r(h);t.createStore=i.default,t.combineReducers=o.default,t.bindActionCreators=u.default,t.applyMiddleware=c.default,t.compose=p.default},function(e,t,n){var r,a;/*! tether 1.3.0 */
!function(i,s){r=s,a="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==a&&(e.exports=a))}(this,function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){var t=getComputedStyle(e)||{},n=t.position,r=[];if("fixed"===n)return[e];for(var a=e;(a=a.parentNode)&&a&&1===a.nodeType;){var i=void 0;try{i=getComputedStyle(a)}catch(s){}if("undefined"==typeof i||null===i)return r.push(a),r;var o=i,l=o.overflow,u=o.overflowX,d=o.overflowY;
/(auto|scroll)/.test(l+d+u)&&("absolute"!==n||["relative","absolute","fixed"].indexOf(i.position)>=0)&&r.push(a)}return r.push(document.body),r}function i(){document.body.removeChild(T),T=void 0}function s(e){var t=void 0;e===document?(t=document,e=document.documentElement):t=e.ownerDocument;var n=t.documentElement,r={},a=e.getBoundingClientRect();for(var i in a)r[i]=a[i];var s=C();return r.top-=s.top,r.left-=s.left,"undefined"==typeof r.width&&(r.width=document.body.scrollWidth-r.left-r.right),"undefined"==typeof r.height&&(r.height=document.body.scrollHeight-r.top-r.bottom),
r.top=r.top-n.clientTop,r.left=r.left-n.clientLeft,r.right=t.body.clientWidth-r.width-r.left,r.bottom=t.body.clientHeight-r.height-r.top,r}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 r=e.offsetWidth;n===r&&(r=t.clientWidth),document.body.removeChild(t);var a=n-r;return{width:a,height:a}}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 d(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"),r=p(e).replace(n," ");h(e,r)}}function c(e,t){if("undefined"!=typeof e.classList)t.split(" ").forEach(function(t){t.trim()&&e.classList.add(t)});else{d(e,t);var n=p(e)+(" "+t);h(e,n)}}function f(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 h(e,t){e.setAttribute("class",t);
}function v(e,t,n){n.forEach(function(n){t.indexOf(n)===-1&&f(e,n)&&d(e,n)}),t.forEach(function(t){f(e,t)||c(e,t)})}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(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 m(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),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){var n=t.top,r=t.left;"string"==typeof n&&(n=parseFloat(n,10)),"string"==typeof r&&(r=parseFloat(r,10)),e.top+=n,e.left+=r}),e}function P(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 w(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,r=getComputedStyle(t);t=[n.left,n.top,e.width+n.left,e.height+n.top],G.forEach(function(e,n){e=e[0].toUpperCase()+e.substr(1),"Top"===e||"Left"===e?t[n]+=parseFloat(r["border"+e+"Width"]):t[n]-=parseFloat(r["border"+e+"Width"]);
})}(),t}var S=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),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=void 0;"undefined"==typeof _&&(_={modules:[]});var T=null,I=function(){var e=0;return function(){return++e}}(),M={},C=function(){var e=T;e||(e=document.createElement("div"),e.setAttribute("data-tether-id",I()),u(e.style,{top:0,left:0,position:"absolute"
}),document.body.appendChild(e),T=e);var t=e.getAttribute("data-tether-id");if("undefined"==typeof M[t]){M[t]={};var n=e.getBoundingClientRect();for(var r in n)M[t][r]=n[r];E(function(){delete M[t]})}return M[t]},x=[],E=function(e){x.push(e)},k=function(){for(var e=void 0;e=x.pop();)e()},D=function(){function e(){r(this,e)}return S(e,[{key:"on",value:function(e,t,n){var r=!(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:r})}},{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,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];
for(;t<this.bindings[e].length;){var i=this.bindings[e][t],s=i.handler,o=i.ctx,l=i.once,u=o;"undefined"==typeof u&&(u=this),s.apply(u,r),l?this.bindings[e].splice(t,1):++t}}}}]),e}();_.Utils={getScrollParents:a,getBounds:s,getOffsetParent:o,extend:u,addClass:c,removeClass:d,hasClass:f,updateClasses:v,defer:E,flush:k,uniqueId:I,Evented:D,getScrollBarSize:l,removeUtilElements:i};var A=function(){function e(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),
!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}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")}}(),S=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),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),
r&&e(t,r),t}}(),O=function(e,t,n){for(var r=!0;r;){var a=e,i=t,s=n;r=!1,null===a&&(a=Function.prototype);var o=Object.getOwnPropertyDescriptor(a,i);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(a);if(null===u)return;e=u,t=i,n=s,r=!0,o=u=void 0}};if("undefined"==typeof _)throw new Error("You must include the utils.js file before tether.js");var R=_.Utils,a=R.getScrollParents,s=R.getBounds,o=R.getOffsetParent,u=R.extend,c=R.addClass,d=R.removeClass,v=R.updateClasses,E=R.defer,k=R.flush,l=R.getScrollBarSize,i=R.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 r=t[n];if(void 0!==e.style[r])return r}}(),N=[],j=function(){N.forEach(function(e){e.position(!1)}),k()};!function(){var e=null,t=null,n=null,r=function a(){return"undefined"!=typeof t&&t>16?(t=Math.min(t-16,250),void(n=setTimeout(a,250))):void("undefined"!=typeof e&&y()-e<10||("undefined"!=typeof n&&(clearTimeout(n),n=null),
e=y(),j(),t=y()-e))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(e){window.addEventListener(e,r)})}();var U={center:"center",left:"right",right:"left"},$={middle:"middle",top:"bottom",bottom:"top"},z={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},F=function(e,t){var n=e.left,r=e.top;return"auto"===n&&(n=U[t.left]),"auto"===r&&(r=$[t.top]),{left:n,top:r}},B=function(e){var t=e.left,n=e.top;return"undefined"!=typeof z[e.left]&&(t=z[e.left]),
"undefined"!=typeof z[e.top]&&(n=z[e.top]),{left:t,top:n}},V=function(e){var t=e.split(" "),n=A(t,2),r=n[0],a=n[1];return{top:r,left:a}},H=V,q=function(e){function t(e){var n=this;r(this,t),O(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.position=this.position.bind(this),N.push(this),this.history=[],this.setOptions(e,!1),_.modules.forEach(function(e){"undefined"!=typeof e.initialize&&e.initialize.call(n)}),this.position()}return g(t,e),S(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],r={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=u(r,e);var i=this.options,s=i.element,o=i.target,l=i.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]))}),c(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&c(this.target,this.getClass("target")),
!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=H(this.options.targetAttachment),this.attachment=H(this.options.attachment),this.offset=V(this.options.offset),this.targetOffset=V(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=a(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 r=getComputedStyle(n),a=n.scrollWidth>n.clientWidth||[r.overflow,r.overflowX].indexOf("scroll")>=0||this.target!==document.body,i=0;
a&&(i=15);var o=e.height-parseFloat(r.borderTopWidth)-parseFloat(r.borderBottomWidth)-i,t={width:15,height:.975*o*(o/n.scrollHeight),left:e.left+e.width-parseFloat(r.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(r.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&&c(this.target,this.getClass("enabled")),c(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;d(this.target,this.getClass("enabled")),d(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&&i()}},{key:"updateAttachClasses",value:function(e,t){
var n=this;e=e||this.attachment,t=t||this.targetAttachment;var r=["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 a=this._addAttachClasses;e.top&&a.push(this.getClass("element-attached")+"-"+e.top),e.left&&a.push(this.getClass("element-attached")+"-"+e.left),t.top&&a.push(this.getClass("target-attached")+"-"+t.top),
t.left&&a.push(this.getClass("target-attached")+"-"+t.left);var i=[];r.forEach(function(e){i.push(n.getClass("element-attached")+"-"+e),i.push(n.getClass("target-attached")+"-"+e)}),E(function(){"undefined"!=typeof n._addAttachClasses&&(v(n.element,n._addAttachClasses,i),n.options.addTargetClasses!==!1&&v(n.target,n._addAttachClasses,i),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=F(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,n);var r=this.cache("element-bounds",function(){return s(e.element)}),a=r.width,i=r.height;if(0===a&&0===i&&"undefined"!=typeof this.lastSize){var u=this.lastSize;a=u.width,i=u.height}else this.lastSize={width:a,height:i};var d=this.cache("target-bounds",function(){return e.getTargetBounds()}),c=d,f=P(B(this.attachment),{width:a,height:i}),p=P(B(n),c),h=P(this.offset,{width:a,height:i}),v=P(this.targetOffset,c);
f=b(f,h),p=b(p,v);for(var g=d.left+p.left-f.left,m=d.top+p.top-f.top,y=0;y<_.modules.length;++y){var w=_.modules[y],S=w.position.call(this,{left:g,top:m,targetAttachment:n,targetPos:d,elementPos:r,offset:f,targetOffset:p,manualOffset:h,manualTargetOffset:v,scrollbarSize:I,attachment:this.attachment});if(S===!1)return!1;"undefined"!=typeof S&&"object"==typeof S&&(m=S.top,g=S.left)}var T={page:{top:m,left:g},viewport:{top:m-pageYOffset,bottom:pageYOffset-m-i+innerHeight,left:g-pageXOffset,right:pageXOffset-g-a+innerWidth
}},I=void 0;return document.body.scrollWidth>window.innerWidth&&(I=this.cache("scrollbar-size",l),T.viewport.bottom-=I.height),document.body.scrollHeight>window.innerHeight&&(I=this.cache("scrollbar-size",l),T.viewport.right-=I.width),["","static"].indexOf(document.body.style.position)!==-1&&["","static"].indexOf(document.body.parentElement.style.position)!==-1||(T.page.bottom=document.body.scrollHeight-m-i,T.page.right=document.body.scrollWidth-g-a),"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)}),r=getComputedStyle(t),a=n,i={};if(["Top","Left","Bottom","Right"].forEach(function(e){i[e.toLowerCase()]=parseFloat(r["border"+e+"Width"])}),n.right=document.body.scrollWidth-n.left-a.width+i.right,n.bottom=document.body.scrollHeight-n.top-a.height+i.bottom,T.page.top>=n.top+i.top&&T.page.bottom>=n.bottom&&T.page.left>=n.left+i.left&&T.page.right>=n.right){var l=t.scrollTop,u=t.scrollLeft;
T.offset={top:T.page.top-n.top+l-i.top,left:T.page.left-n.left+u-i.left}}}(),this.move(T),this.history.unshift(T),this.history.length>3&&this.history.pop(),t&&k(),!0}}},{key:"move",value:function(e){var t=this;if("undefined"!=typeof this.element.parentNode){var n={};for(var r in e){n[r]={};for(var a in e[r]){for(var i=!1,s=0;s<this.history.length;++s){var l=this.history[s];if("undefined"!=typeof l[r]&&!m(l[r][a],e[r][a])){i=!0;break}}i||(n[r][a]=!0)}}var d={top:"",left:"",right:"",bottom:""},c=function(e,n){
var r="undefined"!=typeof t.options.optimizations,a=r?t.options.optimizations.gpu:null;if(a!==!1){var i=void 0,s=void 0;e.top?(d.top=0,i=n.top):(d.bottom=0,i=-n.bottom),e.left?(d.left=0,s=n.left):(d.right=0,s=-n.right),d[L]="translateX("+Math.round(s)+"px) translateY("+Math.round(i)+"px)","msTransform"!==L&&(d[L]+=" translateZ(0)")}else e.top?d.top=n.top+"px":d.bottom=n.bottom+"px",e.left?d.left=n.left+"px":d.right=n.right+"px"},f=!1;if((n.page.top||n.page.bottom)&&(n.page.left||n.page.right)?(d.position="absolute",
c(n.page,e.page)):(n.viewport.top||n.viewport.bottom)&&(n.viewport.left||n.viewport.right)?(d.position="fixed",c(n.viewport,e.viewport)):"undefined"!=typeof n.offset&&n.offset.top&&n.offset.left?!function(){d.position="absolute";var r=t.cache("target-offsetparent",function(){return o(t.target)});o(t.element)!==r&&E(function(){t.element.parentNode.removeChild(t.element),r.appendChild(t.element)}),c(n.offset,e.offset),f=!0}():(d.position="absolute",c({top:!0,left:!0},e.page)),!f){for(var p=!0,h=this.element.parentNode;h&&1===h.nodeType&&"BODY"!==h.tagName;){
if("static"!==getComputedStyle(h).position){p=!1;break}h=h.parentNode}p||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element))}var v={},g=!1;for(var a in d){var y=d[a],b=this.element.style[a];b!==y&&(g=!0,v[a]=y)}g&&E(function(){u(t.element.style,v)})}}}]),t}(D);q.modules=[],_.position=j;var W=u(q,_),A=function(){function e(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){
a=!0,i=l}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}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")}}(),R=_.Utils,s=R.getBounds,u=R.extend,v=R.updateClasses,E=R.defer,G=["left","top","right","bottom"];_.modules.push({position:function(e){var t=this,n=e.top,r=e.left,a=e.targetAttachment;if(!this.options.constraints)return!0;var i=this.cache("element-bounds",function(){
return s(t.element)}),o=i.height,l=i.width;if(0===l&&0===o&&"undefined"!=typeof this.lastSize){var d=this.lastSize;l=d.width,o=d.height}var c=this.cache("target-bounds",function(){return t.getTargetBounds()}),f=c.height,p=c.width,h=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(e){var t=e.outOfBoundsClass,n=e.pinnedClass;t&&h.push(t),n&&h.push(n)}),h.forEach(function(e){["left","top","right","bottom"].forEach(function(t){h.push(e+"-"+t)})});var g=[],m=u({},a),y=u({},this.attachment);
return this.options.constraints.forEach(function(e){var i=e.to,s=e.attachment,u=e.pin;"undefined"==typeof s&&(s="");var d=void 0,c=void 0;if(s.indexOf(" ")>=0){var h=s.split(" "),v=A(h,2);c=v[0],d=v[1]}else d=c=s;var b=w(t,i);"target"!==c&&"both"!==c||(n<b[1]&&"top"===m.top&&(n+=f,m.top="bottom"),n+o>b[3]&&"bottom"===m.top&&(n-=f,m.top="top")),"together"===c&&("top"===m.top&&("bottom"===y.top&&n<b[1]?(n+=f,m.top="bottom",n+=o,y.top="top"):"top"===y.top&&n+o>b[3]&&n-(o-f)>=b[1]&&(n-=o-f,m.top="bottom",
y.top="bottom")),"bottom"===m.top&&("top"===y.top&&n+o>b[3]?(n-=f,m.top="top",n-=o,y.top="bottom"):"bottom"===y.top&&n<b[1]&&n+(2*o-f)<=b[3]&&(n+=o-f,m.top="top",y.top="top")),"middle"===m.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"!==d&&"both"!==d||(r<b[0]&&"left"===m.left&&(r+=p,m.left="right"),r+l>b[2]&&"right"===m.left&&(r-=p,m.left="left")),"together"===d&&(r<b[0]&&"left"===m.left?"right"===y.left?(r+=p,m.left="right",r+=l,y.left="left"):"left"===y.left&&(r+=p,
m.left="right",r-=l,y.left="right"):r+l>b[2]&&"right"===m.left?"left"===y.left?(r-=p,m.left="left",r-=l,y.left="right"):"right"===y.left&&(r-=p,m.left="left",r+=l,y.left="left"):"center"===m.left&&(r+l>b[2]&&"left"===y.left?(r-=l,y.left="right"):r<b[0]&&"right"===y.left&&(r+=l,y.left="left"))),"element"!==c&&"both"!==c||(n<b[1]&&"bottom"===y.top&&(n+=o,y.top="top"),n+o>b[3]&&"top"===y.top&&(n-=o,y.top="bottom")),"element"!==d&&"both"!==d||(r<b[0]&&("right"===y.left?(r+=l,y.left="left"):"center"===y.left&&(r+=l/2,
y.left="left")),r+l>b[2]&&("left"===y.left?(r-=l,y.left="right"):"center"===y.left&&(r-=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 P=[],S=[];n<b[1]&&(u.indexOf("top")>=0?(n=b[1],P.push("top")):S.push("top")),n+o>b[3]&&(u.indexOf("bottom")>=0?(n=b[3]-o,P.push("bottom")):S.push("bottom")),r<b[0]&&(u.indexOf("left")>=0?(r=b[0],P.push("left")):S.push("left")),r+l>b[2]&&(u.indexOf("right")>=0?(r=b[2]-l,
P.push("right")):S.push("right")),P.length&&!function(){var e=void 0;e="undefined"!=typeof t.options.pinnedClass?t.options.pinnedClass:t.getClass("pinned"),g.push(e),P.forEach(function(t){g.push(e+"-"+t)})}(),S.length&&!function(){var e=void 0;e="undefined"!=typeof t.options.outOfBoundsClass?t.options.outOfBoundsClass:t.getClass("out-of-bounds"),g.push(e),S.forEach(function(t){g.push(e+"-"+t)})}(),(P.indexOf("left")>=0||P.indexOf("right")>=0)&&(y.left=m.left=!1),(P.indexOf("top")>=0||P.indexOf("bottom")>=0)&&(y.top=m.top=!1),
m.top===a.top&&m.left===a.left&&y.top===t.attachment.top&&y.left===t.attachment.left||(t.updateAttachClasses(y,m),t.trigger("update",{attachment:y,targetAttachment:m}))}),E(function(){t.options.addTargetClasses!==!1&&v(t.target,g,h),v(t.element,g,h)}),{top:n,left:r}}});var R=_.Utils,s=R.getBounds,v=R.updateClasses,E=R.defer;_.modules.push({position:function(e){var t=this,n=e.top,r=e.left,a=this.cache("element-bounds",function(){return s(t.element)}),i=a.height,o=a.width,l=this.getTargetBounds(),u=n+i,d=r+o,c=[];
n<=l.bottom&&u>=l.top&&["left","right"].forEach(function(e){var t=l[e];t!==r&&t!==d||c.push(e)}),r<=l.right&&d>=l.left&&["top","bottom"].forEach(function(e){var t=l[e];t!==n&&t!==u||c.push(e)});var f=[],p=[],h=["left","top","right","bottom"];return f.push(this.getClass("abutted")),h.forEach(function(e){f.push(t.getClass("abutted")+"-"+e)}),c.length&&p.push(this.getClass("abutted")),c.forEach(function(e){p.push(t.getClass("abutted")+"-"+e)}),E(function(){t.options.addTargetClasses!==!1&&v(t.target,p,f),
v(t.element,p,f)}),!0}});var A=function(){function e(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}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 _.modules.push({position:function(e){var t=e.top,n=e.left;
if(this.options.shift){var r=this.options.shift;"function"==typeof this.options.shift&&(r=this.options.shift.call(this,{top:t,left:n}));var a=void 0,i=void 0;if("string"==typeof r){r=r.split(" "),r[1]=r[1]||r[0];var s=r,o=A(s,2);a=o[0],i=o[1],a=parseFloat(a,10),i=parseFloat(i,10)}else a=r.top,i=r.left;return t+=a,n+=i,{top:t,left:n}}}}),W})},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBzdHlsZT0ic3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPGNpcmNsZSBpZD0iMCIgY3g9IjUwIiBjeT0iNTAiIHI9IjUwIiBzdHlsZT0iZmlsbDp1cmwoIzMpIi8+CiA8Y2lyY2xlIGlkPSIxIiBjeD0iNTAiIGN5PSI1MCIgcj0iNDciIHN0eWxlPSJmaWxsOnVybCgjNCkiLz4KIDxwYXRoIGlkPSIyIiBkPSJtMzIuOSAxOC44bDE4LjE2MSAwIDIwLjAzOSAzMS4yNS0yMC4wMzkgMzEuMjUtMTguMTYxIDAgMjAuMDM5LTMxLjI1LTIwLjAzOS0zMS4yNSIgc3R5bGU9ImZpbGw6dXJsKCM1KSIvPgogPGRlZnM+CiAgPGxpbmVhckdyYWRpZW50IGlkPSIzIiB4MT0iMTAwIiB4Mj0iMCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICA8c3RvcCBvZmZzZXQ9IjAlIiBzdHlsZT0ic3RvcC1jb2xvcjojZjliZTAzIi8+CiAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3R5bGU9InN0b3AtY29sb3I6I2NjN2IxOSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPGxpbmVhckdyYWRpZW50IGlkPSI0IiB4MT0iOTciIHgyPSIzIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgIDxzdG9wIG9mZnNldD0iMCUiIHN0eWxlPSJzdG9wLWNvbG9yOiMyODI4MjgiLz4KICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdHlsZT0ic3RvcC1jb2xvcjojMWYxZjFmIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmFkaWFsR3JhZGllbnQgaWQ9IjUiIGN4PSI2NyIgY3k9IjQ5LjkiIHI9IjU3LjgxMjMiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4bGluazpocmVmPSIjMyIvPgogPC9kZWZzPgo8L3N2Zz4K";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cmVjdCB3aWR0aD0iNTYwIiBoZWlnaHQ9IjU2MCIgc3R5bGU9ImZpbGw6IzJmNDc0MSIvPgogPHBhdGggZD0ibTE0MCAyNDRjMC04LjI0MyA1LjgzMi0xNS4zNDcgMTQtMTYuNTE2bDI4LTMuNDgzaDE5NmwyOCAzLjQ4M2M4LjE4MyAxLjE2OSAxNCA4LjI4MSAxNCAxNi41MTZ2NzJjMCA4LjI0My01LjgzMiAxNS4zNDctMTQgMTYuNTE2bC0yOCAzLjQ4M2gtMTk2bC0yOC0zLjQ4M2MtOC4xODMtMS4xNjktMTQtOC4yODEtMTQtMTYuNTE2di03MiIgc3R5bGU9ImZpbGwtb3BhY2l0eTouMTQ5MDIiLz4KIDxwYXRoIGQ9Im0zNzggMzM2aC0xOTZsLTI4LTMuNDgzYy0uNTA2LS4wNzUtMS4wMS0uMTY4LTEuNTA2LS4yODgtMS4wODktLjI2MS0yLjE0OS0uNjM3LTMuMTU5LTEuMTItMi4xMzItMS4wMTgtNC4wMi0yLjUxNC01LjUyLTQuMzQtMS4yMzEtMS41MDItMi4xOTQtMy4yMi0yLjg0MS01LjA1LS40MzQtMS4yMzItLjcyNi0yLjUxMy0uODY5LTMuODExLS4wNjMtLjU2OS0uMTA0LTEuNzE0LS4xMDQtMS43MTR2LTcyLjM5YzAgMCAuMDQxLTEuMTQ2LjEwNC0xLjcxNi4xNDQtMS4yOTkuNDM2LTIuNTgxLjg3MS0zLjgxMi42NDgtMS44MzIgMS42MTItMy41NTEgMi44NDUtNS4wNSAxLjQ5OC0xLjgyNSAzLjM4OS0zLjMyIDUuNTE5LTQuMzM4IDEuMDEtLjQ4MiAyLjA2OS0uODU3IDMuMTU2LTEuMTE5LjQ5Ny0uMTE5Ljk5OS0uMjEyIDEuNTA0LS4yODdsMjgtMy40ODNoMTk2YzAgMCAxOC42NjcgMi4zMjIgMjggMy40ODMuNTA2LjA3NSAxLjAxLjE2OCAxLjUwNi4yODggMS4wODkuMjYxIDIuMTQ5LjYzNyAzLjE1OSAxLjEyIDIuMTMyIDEuMDE4IDQuMDIgMi41MTQgNS41MiA0LjM0IDEuMjMxIDEuNTAyIDIuMTk0IDMuMjIgMi44NDEgNS4wNS40MzQgMS4yMzIuNzI2IDIuNTEzLjg2OSAzLjgxMS4wNjMuNTY5LjEwNCAxLjcxNC4xMDQgMS43MTR2NzIuMzljMCAwLS4wNDEgMS4xNDYtLjEwNCAxLjcxNi0uMTQ0IDEuMjk5LS40MzYgMi41ODEtLjg3MSAzLjgxMi0uNjQ4IDEuODMyLTEuNjEyIDMuNTUxLTIuODQ1IDUuMDUtMS40OTggMS44MjUtMy4zODkgMy4zMi01LjUxOSA0LjMzOC0xLjAxLjQ4Mi0yLjA2OS44NTctMy4xNTYgMS4xMTktLjQ5Ny4xMTktLjk5OS4yMTItMS41MDQuMjg3bC0yOCAzLjQ4M20tLjU1OC0xMDNoLTE5NC44OGMtOS4xMjQgMS4xMzUtMTguMjc4IDIuMDUyLTI3LjM3MiAzLjQwNS0uMTEzLjAxOS0uMjI2LjAzOS0uMzM4LjA2MS0uNjQxLjEzNC0xLjI2LjM0OC0xLjg0MS42NS0uOTMxLjQ4Ni0xLjc0NSAxLjE4My0yLjM4NCAyLjAxLS40OTcuNjQ4LS44ODkgMS4zNzYtMS4xNjEgMi4xNDYtLjI5OS44NDYtLjQ2MSAyLjYyOS0uNDYxIDIuNjI5bC4wMDEgNzIuMjhjMCAwIC4xOTMgMS44MzQuNTE5IDIuNjk3LjI4Ny43NjIuNjkyIDEuNDc5IDEuMjAyIDIuMTE0LjY3MS44MzcgMS41MjQgMS41MjggMi40OTMgMS45OTEuNTk4LjI4NiAxLjIzMi40NzkgMS44ODQuNTkybC4wODcuMDE0LjAzMi4wMDQgMjcuMzM5IDMuNDAxaDE5NC44OGMwIDAgMTguMjc4LTIuMDUyIDI3LjM3MS0zLjQwNS42ODEtLjExIDEuMzQzLS4zMDcgMS45NjYtLjYwNCAxLjAyLS40ODggMS45MS0xLjIyNiAyLjU5OC0yLjEyMi40OC0uNjI1Ljg2MS0xLjMyNSAxLjEzMi0yLjA2NS4zMTctLjg2OS40OS0yLjcxLjQ5LTIuNzFsLS4wMDEtNzIuMjhjMCAwLS4xOTMtMS44MzQtLjUxOS0yLjY5OC0uMjg3LS43NjEtLjY5Mi0xLjQ3OC0xLjIwMS0yLjExMy0uNjU1LS44MTYtMS40ODItMS40OTQtMi40MjItMS45NTYtLjYxOS0uMzA1LTEuMjc4LS41MDktMS45NTYtLjYyN2wtLjA4Ni0uMDEzLS4wMzItLjAwNS0yNy4zNC0zLjQwMW0tMTMuNDQyIDM4YzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOW0tNDIgMGM0Ljk2NyAwIDkgNC4wMyA5IDkgMCA0Ljk2Ny00LjAzIDktOSA5LTQuOTY3IDAtOS00LjAzLTktOSAwLTQuOTY3IDQuMDMtOSA5LTltLTEyNiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOSIgc3R5bGU9ImZpbGw6IzkxYzUzYiIvPgo8L3N2Zz4K";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cmVjdCB3aWR0aD0iNTYwIiBoZWlnaHQ9IjU2MCIgc3R5bGU9ImZpbGw6IzQxNDEzZSIvPgogPHBhdGggZD0ibTg0IDI0NGMwLTguMjQzIDUuODMyLTE1LjM0NyAxNC0xNi41MTZsNTYtMy40ODNoMjUybDU2IDMuNDgzYzguMTgzIDEuMTY5IDE0IDguMjgxIDE0IDE2LjUxNnY3MmMwIDguMjQzLTUuODMyIDE1LjM0Ny0xNCAxNi41MTZsLTU2IDMuNDgzaC0yNTJsLTU2LTMuNDgzYy04LjE4My0xLjE2OS0xNC04LjI4MS0xNC0xNi41MTZ2LTcyIiBzdHlsZT0iZmlsbC1vcGFjaXR5Oi4xNDkwMiIvPgogPHBhdGggZD0ibTQwNiAzMzZoLTI1MmwtNTYtMy40ODNjLS41MDYtLjA3NS0xLjAxLS4xNjgtMS41MDYtLjI4OC0xLjA4OS0uMjYxLTIuMTQ5LS42MzctMy4xNTktMS4xMi0yLjEzMi0xLjAxOC00LjAyLTIuNTE0LTUuNTItNC4zNC0xLjIzMS0xLjUwMi0yLjE5NC0zLjIyLTIuODQxLTUuMDUtLjQzNC0xLjIzMi0uNzI2LTIuNTEzLS44NjktMy44MTEtLjA2My0uNTY5LS4xMDQtMS43MTQtLjEwNC0xLjcxNHYtNzIuMzljMCAwIC4wNDEtMS4xNDYuMTA0LTEuNzE2LjE0NC0xLjI5OS40MzYtMi41ODEuODcxLTMuODEyLjY0OC0xLjgzMiAxLjYxMi0zLjU1MSAyLjg0NS01LjA1IDEuNDk4LTEuODI1IDMuMzg5LTMuMzIgNS41MTktNC4zMzggMS4wMS0uNDgyIDIuMDY5LS44NTcgMy4xNTYtMS4xMTkuNDk3LS4xMTkuOTk5LS4yMTIgMS41MDQtLjI4N2w1Ni0zLjQ4M2gyNTJjMCAwIDM3LjMzIDIuMzIyIDU2IDMuNDgzLjUwNi4wNzUgMS4wMS4xNjggMS41MDYuMjg4IDEuMDg5LjI2MSAyLjE0OS42MzcgMy4xNTkgMS4xMiAyLjEzMiAxLjAxOCA0LjAyIDIuNTE0IDUuNTIgNC4zNCAxLjIzMSAxLjUwMiAyLjE5NCAzLjIyIDIuODQxIDUuMDUuNDM0IDEuMjMyLjcyNiAyLjUxMy44NjkgMy44MTEuMDYzLjU2OS4xMDQgMS43MTQuMTA0IDEuNzE0djcyLjM5YzAgMC0uMDQxIDEuMTQ2LS4xMDQgMS43MTYtLjE0NCAxLjI5OS0uNDM2IDIuNTgxLS44NzEgMy44MTItLjY0OCAxLjgzMi0xLjYxMiAzLjU1MS0yLjg0NSA1LjA1LTEuNDk4IDEuODI1LTMuMzg5IDMuMzItNS41MTkgNC4zMzgtMS4wMS40ODItMi4wNjkuODU3LTMuMTU2IDEuMTE5LS40OTcuMTE5LS45OTkuMjEyLTEuNTA0LjI4N2wtNTYgMy40ODNtLS4yOC0xMDNoLTI1MS40NGwtNTUuMjkgMy40MzljLS4xMDMuMDE5LS4yMDYuMDQtLjMwOC4wNjMtLjYwOC4xNDItMS4xOTUuMzU2LTEuNzQ1LjY1MS0uOTUxLjUxLTEuNzc2IDEuMjQxLTIuNDEzIDIuMTExLS40NTEuNjE0LS44MDggMS4yOTUtMS4wNjIgMi4wMS0uMjk5Ljg0NS0uNDYxIDIuNjI4LS40NjEgMi42Mjh2NzIuMjhjMCAwIC4xOTMgMS44MzQuNTE5IDIuNjk4LjI4Ny43NjEuNjkyIDEuNDc4IDEuMjAyIDIuMTEzLjY3MS44MzggMS41MjQgMS41MjggMi40OTMgMS45OTEuNTYzLjI2OSAxLjE2LjQ1OSAxLjc3NC41NzJsNTUuMjkgMy40MzloMjUxLjQ0bDU1LjI5LTMuNDM5Yy42MTItLjExMyAxLjIwNy0uMzAyIDEuNzY5LS41NyAxLjAyLS40ODggMS45MS0xLjIyNiAyLjU5OC0yLjEyMi40OC0uNjI1Ljg2MS0xLjMyNSAxLjEzMi0yLjA2NS4zMTctLjg2OS40OS0yLjcxLjQ5LTIuNzFsLS4wMDEtNzIuMjhjMCAwLS4xOTMtMS44MzQtLjUxOS0yLjY5OC0uMjg3LS43NjEtLjY5Mi0xLjQ3OC0xLjIwMS0yLjExMy0uNjcyLS44MzgtMS41MjUtMS41MjgtMi40OTUtMS45OTItLjU2My0uMjY5LTEuMTYtLjQ1OC0xLjc3My0uNTcxbC01NS4yOS0zLjQzOW0tNDEuNzIgMzhjNC45NjcgMCA5IDQuMDMgOSA5IDAgNC45NjctNC4wMyA5LTkgOS00Ljk2NyAwLTktNC4wMy05LTkgMC00Ljk2NyA0LjAzLTkgOS05bS00MiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOW0tNDIgMGM0Ljk2NyAwIDkgNC4wMyA5IDkgMCA0Ljk2Ny00LjAzIDktOSA5LTQuOTY3IDAtOS00LjAzLTktOSAwLTQuOTY3IDQuMDMtOSA5LTltLTg0IDBjNC45NjcgMCA5IDQuMDMgOSA5IDAgNC45NjctNC4wMyA5LTkgOS00Ljk2NyAwLTktNC4wMy05LTkgMC00Ljk2NyA0LjAzLTkgOS05bS00MiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOSIgc3R5bGU9ImZpbGw6I2Y3OTQxZSIvPgo8L3N2Zz4K";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cmVjdCB3aWR0aD0iNTYwIiBoZWlnaHQ9IjU2MCIgc3R5bGU9ImZpbGw6IzFlNDI1NCIvPgogPHBhdGggZD0ibTQyMCAyMzhjMC03LjcyNi02LjI3NS0xNC0xNC0xNGgtMjUyYy03LjcyNyAwLTE0IDYuMjc0LTE0IDE0djg0YzAgNy43MjcgNi4yNzMgMTQgMTQgMTRoMjUyYzcuNzI2IDAgMTQtNi4yNzMgMTQtMTR2LTg0IiBzdHlsZT0iZmlsbC1vcGFjaXR5Oi4xNDkwMiIvPgogPHBhdGggZD0ibTQwNi4xOCAyMjRjMCAwIC45NTIuMDM2IDEuNDI2LjA5IDEuMDM2LjExOSAyLjA1OS4zNTQgMy4wNDMuNzAxIDEuOTE2LjY3NSAzLjY3NSAxLjc3NCA1LjEyOCAzLjE5MiAxLjQ5MiAxLjQ1OCAyLjY1NCAzLjI0NiAzLjM3MiA1LjIwNC4zNTguOTc4LjYwNiAxLjk5Ny43MzcgMy4wMy4wNjguNTMyLjExMiAxLjYwMS4xMTIgMS42MDF2ODQuMzZjMCAwLS4wNDQgMS4wNjktLjExMiAxLjYwMS0uMTMxIDEuMDMzLS4zNzkgMi4wNTItLjczNyAzLjAzLS43MTggMS45NTgtMS44OCAzLjc0Ni0zLjM3MiA1LjIwNC0xLjQ1MyAxLjQxOC0zLjIxMiAyLjUxNy01LjEyOCAzLjE5Mi0uOTg0LjM0Ny0yLjAxLjU4Mi0zLjA0My43MDEtLjQ3NC4wNTQtMS40MjYuMDktMS40MjYuMDloLTI1Mi4zNmMwIDAtLjk1Mi0uMDM2LTEuNDI2LS4wOS0xLjAzNi0uMTE5LTIuMDU5LS4zNTQtMy4wNDMtLjcwMS0xLjkxNi0uNjc1LTMuNjc1LTEuNzc0LTUuMTI4LTMuMTkyLTEuNDkyLTEuNDU4LTIuNjU0LTMuMjQ2LTMuMzcyLTUuMjA0LS4zNTgtLjk3OC0uNjA2LTEuOTk3LS43MzctMy4wMy0uMDY4LS41MzItLjExMi0xLjYwMS0uMTEyLTEuNjAxdi04NC4zNmMwIDAgLjA0NC0xLjA2OS4xMTItMS42MDEuMTMxLTEuMDMzLjM3OS0yLjA1Mi43MzctMy4wMy43MTgtMS45NTggMS44OC0zLjc0NiAzLjM3Mi01LjIwNCAxLjQ1My0xLjQxOCAzLjIxMi0yLjUxNyA1LjEyOC0zLjE5Mi45ODQtLjM0NyAyLjAxLS41ODIgMy4wNDMtLjcwMS40NzQtLjA1NCAxLjQyNi0uMDkgMS40MjYtLjA5aDI1Mi4zNm0tMjUyLjE1IDguOTk5YzAgMC0uNDA4LjAxLS42MTEuMDMzLS40MDYuMDQ3LS44MDYuMTQ0LTEuMTg4LjI4OS0xLjM0NC41MTEtMi40MzQgMS42MTQtMi45MjggMi45NjMtLjE5NC41MjktLjMgMS42NDgtLjMgMS42NDhsLjAwMSA4NC4yYzAgMCAuMTEyIDEuMDc0LjI5OSAxLjU4Mi40OTQgMS4zNDkgMS41ODQgMi40NTIgMi45MjggMi45NjMuNTI0LjIgMS42MzguMzIgMS42MzguMzJoMjUyLjI3YzAgMCAxLjExNC0uMTIgMS42MzktLjMyIDEuMzQzLS41MTEgMi40MzMtMS42MTQgMi45MjctMi45NjMuMTg2LS41MDguMjk5LTEuNTgyLjI5OS0xLjU4MnYtODQuMjdjMCAwLS4xMi0xLjExNC0uMzItMS42MzgtLjUxMS0xLjM0NC0xLjYxNC0yLjQzNC0yLjk2My0yLjkyOC0uNTA4LS4xODctMS41ODItLjI5OS0xLjU4Mi0uMjk5bC0yNTIuMS0uMDAybTEwMS43MSA2My40MmgtNi45NjN2LTMyLjgzOGg2Ljk2M3YxMi44N2gxMy4wMXYtMTIuODdoNi45NDF2MzIuODM4aC02Ljk0MXYtMTQuMTczaC0xMy4wMXYxNC4xNzNtMzcuNTMyIDBoLTkuMjk4di0zMi44MzhoMTAuMzA5YzUuMzYxIDAgOS41MjQgMS40MTUgMTIuNDg4IDQuMjQ1IDIuOTY1IDIuODMgNC40NDggNi43ODMgNC40NDggMTEuODYgMCA1LjQwNS0xLjUzOSA5LjU0NS00LjYxNiAxMi40Mi0zLjA3NyAyLjg3NS03LjUyIDQuMzEzLTEzLjMzMSA0LjMxM20xLjM3MS0yNy4xM2gtMy43MDd2MjEuMzgzaDIuOTg4YzYuNzA4IDAgMTAuMDYtMy42MDEgMTAuMDYtMTAuODA0IDAtNy4wNS0zLjExNC0xMC41NzktOS4zNDMtMTAuNTc5IiBzdHlsZT0iZmlsbDojMzFhZmMwIi8+Cjwvc3ZnPgo=";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cmVjdCB3aWR0aD0iNTYwIiBoZWlnaHQ9IjU2MCIgc3R5bGU9ImZpbGw6IzJmMzM0ZCIvPgogPHBhdGggZD0ibTg0IDI0NGMwLTguMjQzIDUuODMyLTE1LjM0NyAxNC0xNi41MTZsNTYtMy40ODNoMjUybDU2IDMuNDgzYzguMTgzIDEuMTY5IDE0IDguMjgxIDE0IDE2LjUxNnY3MmMwIDguMjQzLTUuODMyIDE1LjM0Ny0xNCAxNi41MTZsLTU2IDMuNDgzaC0yNTJsLTU2LTMuNDgzYy04LjE4My0xLjE2OS0xNC04LjI4MS0xNC0xNi41MTZ2LTcyIiBzdHlsZT0iZmlsbC1vcGFjaXR5Oi4xNDkwMiIvPgogPHBhdGggZD0ibTQwNiAzMzZoLTI1MmwtNTYtMy40ODNjLS41MDYtLjA3NS0xLjAxLS4xNjgtMS41MDYtLjI4OC0xLjA4OS0uMjYxLTIuMTQ5LS42MzctMy4xNTktMS4xMi0yLjEzMi0xLjAxOC00LjAyLTIuNTE0LTUuNTItNC4zNC0xLjIzMS0xLjUwMi0yLjE5NC0zLjIyLTIuODQxLTUuMDUtLjQzNC0xLjIzMi0uNzI2LTIuNTEzLS44NjktMy44MTEtLjA2My0uNTY5LS4xMDQtMS43MTQtLjEwNC0xLjcxNHYtNzIuMzljMCAwIC4wNDEtMS4xNDYuMTA0LTEuNzE2LjE0NC0xLjI5OS40MzYtMi41ODEuODcxLTMuODEyLjY0OC0xLjgzMiAxLjYxMi0zLjU1MSAyLjg0NS01LjA1IDEuNDk4LTEuODI1IDMuMzg5LTMuMzIgNS41MTktNC4zMzggMS4wMS0uNDgyIDIuMDY5LS44NTcgMy4xNTYtMS4xMTkuNDk3LS4xMTkuOTk5LS4yMTIgMS41MDQtLjI4N2w1Ni0zLjQ4M2gyNTJjMCAwIDM3LjMzIDIuMzIyIDU2IDMuNDgzLjUwNi4wNzUgMS4wMS4xNjggMS41MDYuMjg4IDEuMDg5LjI2MSAyLjE0OS42MzcgMy4xNTkgMS4xMiAyLjEzMiAxLjAxOCA0LjAyIDIuNTE0IDUuNTIgNC4zNCAxLjIzMSAxLjUwMiAyLjE5NCAzLjIyIDIuODQxIDUuMDUuNDM0IDEuMjMyLjcyNiAyLjUxMy44NjkgMy44MTEuMDYzLjU2OS4xMDQgMS43MTQuMTA0IDEuNzE0djcyLjM5YzAgMC0uMDQxIDEuMTQ2LS4xMDQgMS43MTYtLjE0NCAxLjI5OS0uNDM2IDIuNTgxLS44NzEgMy44MTItLjY0OCAxLjgzMi0xLjYxMiAzLjU1MS0yLjg0NSA1LjA1LTEuNDk4IDEuODI1LTMuMzg5IDMuMzItNS41MTkgNC4zMzgtMS4wMS40ODItMi4wNjkuODU3LTMuMTU2IDEuMTE5LS40OTcuMTE5LS45OTkuMjEyLTEuNTA0LjI4N2wtNTYgMy40ODNtLS4yOC0xMDNoLTI1MS40NGwtNTUuMjkgMy40MzljLS4xMDMuMDE5LS4yMDYuMDQtLjMwOC4wNjMtLjYwOC4xNDItMS4xOTUuMzU2LTEuNzQ1LjY1MS0uOTUxLjUxLTEuNzc2IDEuMjQxLTIuNDEzIDIuMTExLS40NTEuNjE0LS44MDggMS4yOTUtMS4wNjIgMi4wMS0uMjk5Ljg0NS0uNDYxIDIuNjI4LS40NjEgMi42Mjh2NzIuMjhjMCAwIC4xOTMgMS44MzQuNTE5IDIuNjk4LjI4Ny43NjEuNjkyIDEuNDc4IDEuMjAyIDIuMTEzLjY3MS44MzggMS41MjQgMS41MjggMi40OTMgMS45OTEuNTYzLjI2OSAxLjE2LjQ1OSAxLjc3NC41NzJsNTUuMjkgMy40MzloMjUxLjQ0bDU1LjI5LTMuNDM5Yy42MTItLjExMyAxLjIwNy0uMzAyIDEuNzY5LS41NyAxLjAyLS40ODggMS45MS0xLjIyNiAyLjU5OC0yLjEyMi40OC0uNjI1Ljg2MS0xLjMyNSAxLjEzMi0yLjA2NS4zMTctLjg2OS40OS0yLjcxLjQ5LTIuNzFsLS4wMDEtNzIuMjhjMCAwLS4xOTMtMS44MzQtLjUxOS0yLjY5OC0uMjg3LS43NjEtLjY5Mi0xLjQ3OC0xLjIwMS0yLjExMy0uNjcyLS44MzgtMS41MjUtMS41MjgtMi40OTUtMS45OTItLjU2My0uMjY5LTEuMTYtLjQ1OC0xLjc3My0uNTcxbC01NS4yOS0zLjQzOW0tNDEuNzIgMzhjNC45NjcgMCA5IDQuMDMgOSA5IDAgNC45NjctNC4wMyA5LTkgOS00Ljk2NyAwLTktNC4wMy05LTkgMC00Ljk2NyA0LjAzLTkgOS05bS00MiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOW0tNDIgMGM0Ljk2NyAwIDkgNC4wMyA5IDkgMCA0Ljk2Ny00LjAzIDktOSA5LTQuOTY3IDAtOS00LjAzLTktOSAwLTQuOTY3IDQuMDMtOSA5LTltLTg0IDBjNC45NjcgMCA5IDQuMDMgOSA5IDAgNC45NjctNC4wMyA5LTkgOS00Ljk2NyAwLTktNC4wMy05LTkgMC00Ljk2NyA0LjAzLTkgOS05bS00MiAwYzQuOTY3IDAgOSA0LjAzIDkgOSAwIDQuOTY3LTQuMDMgOS05IDktNC45NjcgMC05LTQuMDMtOS05IDAtNC45NjcgNC4wMy05IDktOSIgc3R5bGU9ImZpbGw6Izk0NTA4ZCIvPgo8L3N2Zz4K";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTQ4IiBoZWlnaHQ9IjM2MCIgdmlld0JveD0iMCAwIDU0OCAzNjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjx0aXRsZT5Hcm91cDwvdGl0bGU+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0xOTYgMTczdjEzSDgxdi0xNCIvPjxtYXNrIGlkPSJqIiB4PSIwIiB5PSIwIiB3aWR0aD0iMTE1IiBoZWlnaHQ9IjE0IiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjxwYXRoIGQ9Ik02LjUyMiAxNzNDMi45MiAxNzMgMCAxNzAuNjMxIDAgMTY3LjcxVjUuMjlDMCAyLjM3IDIuOTIgMCA2LjUyMiAwaDI2Mi45NTZDMjczLjA4IDAgMjc2IDIuMzY5IDI3NiA1LjI5djE2Mi40MmMwIDIuOTIxLTIuOTIgNS4yOS02LjUyMiA1LjI5SDYuNTIyeiIgaWQ9ImIiLz48bWFzayBpZD0iayIgeD0iMCIgeT0iMCIgd2lkdGg9IjI3NiIgaGVpZ2h0PSIxNzMiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2IiLz48L21hc2s+PHBhdGggaWQ9ImMiIGQ9Ik0xMyAxNjAuMTg1aDI0OS45MVYxM0gxM3oiLz48bWFzayBpZD0ibCIgeD0iMCIgeT0iMCIgd2lkdGg9IjI0OS45MTEiIGhlaWdodD0iMTQ3LjE4NSIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYyIvPjwvbWFzaz48cmVjdCBpZD0iZCIgd2lkdGg9IjE5MiIgaGVpZ2h0PSIxNDAiIHJ4PSI2Ii8+PG1hc2sgaWQ9Im0iIHg9IjAiIHk9IjAiIHdpZHRoPSIxOTIiIGhlaWdodD0iMTQwIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNkIi8+PC9tYXNrPjxwYXRoIGlkPSJlIiBkPSJNMjAgMTFoMTUydjExOEgyMHoiLz48bWFzayBpZD0ibiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE1MiIgaGVpZ2h0PSIxMTgiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2UiLz48L21hc2s+PGNpcmNsZSBpZD0iZiIgY3g9IjEyIiBjeT0iNzAiIHI9IjYiLz48bWFzayBpZD0ibyIgeD0iMCIgeT0iMCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEyIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNmIi8+PC9tYXNrPjxwYXRoIGlkPSJnIiBkPSJNMCAxOGg3MnY4NEgweiIvPjxtYXNrIGlkPSJwIiB4PSIwIiB5PSIwIiB3aWR0aD0iNzIiIGhlaWdodD0iODQiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2ciLz48L21hc2s+PGNpcmNsZSBpZD0iaCIgY3g9IjM2IiBjeT0iMTA5IiByPSI1Ii8+PG1hc2sgaWQ9InEiIHg9IjAiIHk9IjAiIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjaCIvPjwvbWFzaz48cmVjdCBpZD0iaSIgd2lkdGg9IjcyIiBoZWlnaHQ9IjEyMCIgcng9IjguNCIvPjxtYXNrIGlkPSJyIiB4PSIwIiB5PSIwIiB3aWR0aD0iNzIiIGhlaWdodD0iMTIwIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNpIi8+PC9tYXNrPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI3MiA4NykiPjx1c2Ugc3Ryb2tlPSIjQkJCIiBtYXNrPSJ1cmwoI2opIiBzdHJva2Utd2lkdGg9IjYiIHhsaW5rOmhyZWY9IiNhIi8+PHVzZSBzdHJva2U9IiNCQkIiIG1hc2s9InVybCgjaykiIHN0cm9rZS13aWR0aD0iNiIgeGxpbms6aHJlZj0iI2IiLz48dXNlIHN0cm9rZT0iI0JCQiIgbWFzaz0idXJsKCNsKSIgc3Ryb2tlLXdpZHRoPSI0IiB4bGluazpocmVmPSIjYyIvPjxwYXRoIGZpbGw9IiNGOEFEMTgiIGQ9Ik0xMzcuMDQyIDEyMC43NUgxMTdsMjIuMTktMzQuMzc1TDExNyA1MmgyMC4wNDJsMjIuMTkgMzQuMzc1eiIvPjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDIyMCkiPjx1c2Ugc3Ryb2tlPSIjQkJCIiBtYXNrPSJ1cmwoI20pIiBzdHJva2Utd2lkdGg9IjYiIHhsaW5rOmhyZWY9IiNkIi8+PHVzZSBzdHJva2U9IiNCQkIiIG1hc2s9InVybCgjbikiIHN0cm9rZS13aWR0aD0iNCIgeGxpbms6aHJlZj0iI2UiLz48dXNlIHN0cm9rZT0iI0JCQiIgbWFzaz0idXJsKCNvKSIgc3Ryb2tlLXdpZHRoPSI0IiB4bGluazpocmVmPSIjZiIvPjxjaXJjbGUgZmlsbD0iI0JCQiIgY3g9IjE4MCIgY3k9IjcwIiByPSIyIi8+PHBhdGggZmlsbD0iI0Y4QUQxOCIgZD0iTTk0LjU4IDEwMkg3NmwyMC42NDUtMzAuOTY4TDc2IDM4aDE4LjU4bDIwLjY0NiAzMy4wMzJ6Ii8+PC9nPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDYwKSI+PHJlY3Qgd2lkdGg9IjcyIiBoZWlnaHQ9IjEyMCIgcng9IjguNCIvPjx1c2Ugc3Ryb2tlPSIjQkJCIiBtYXNrPSJ1cmwoI3ApIiBzdHJva2Utd2lkdGg9IjQiIHhsaW5rOmhyZWY9IiNnIi8+PHVzZSBzdHJva2U9IiNCQkIiIG1hc2s9InVybCgjcSkiIHN0cm9rZS13aWR0aD0iNCIgeGxpbms6aHJlZj0iI2giLz48cmVjdCBmaWxsPSIjQkJCIiB4PSIzMSIgeT0iMTAiIHdpZHRoPSIxMC44IiBoZWlnaHQ9IjIuNCIgcng9IjEuMiIvPjx1c2Ugc3Ryb2tlPSIjQkJCIiBtYXNrPSJ1cmwoI3IpIiBzdHJva2Utd2lkdGg9IjYiIHhsaW5rOmhyZWY9IiNpIi8+PHBhdGggZD0iTTM1LjAzMiA3OUgyNGwxMi4yNTgtMTguMzg3TDI0IDQxaDExLjAzMkw0Ny4yOSA2MC42MTN6IiBmaWxsPSIjRjhBRDE4Ii8+PC9nPjwvZz48L3N2Zz4=";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODEwIiBoZWlnaHQ9IjIzMCIgdmlld0JveD0iMCAwIDgxMCAyMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjx0aXRsZT5QTVMg4oaSIENvbXB1dGVyPC90aXRsZT48ZGVmcz48cGF0aCBkPSJNMTU5LjU5NSAyMDcuNDc3Yy0uNDk0LTIuNDctMi42NS05LjczMi0zLjM0Ny0yMS40NDRIOTkuMzZjLS42OTggMTEuNzEyLTIuODUzIDE4Ljk3NC0zLjM0NiAyMS40NDQtLjk3NiA0Ljg4LTQuNzkgOC44MjktMTIuMDQgMTEuMDU5LTUuOTEyIDEuODE5LTUuMTU4IDEwLjY5MyAxLjY3NCAxMC42OTNoODQuMzE0YzYuODMxIDAgNy41ODctOC44NzMgMS42NzMtMTAuNjkzLTcuMjUtMi4yMy0xMS4wNjQtNi4xNzgtMTIuMDQtMTEuMDU5eiIgaWQ9ImEiLz48bWFzayBpZD0iZCIgeD0iMCIgeT0iMCIgd2lkdGg9Ijk1LjYzMyIgaGVpZ2h0PSI0My4xOTYiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTI1NiAxNDcuNXYzMS41NjRjMCA1LjUyNy00LjQ3IDEwLjAwOC05Ljk5NiAxMC4wMDhIOS45OTZjLTUuNTIgMC05Ljk5Ni00LjQ3Ni05Ljk5Ni0xMC4wMDhWMTAuMDAzQzAgNC40OCA0LjQ3IDAgOS45OTYgMGgyMzYuMDA4QzI1MS41MjQgMCAyNTYgNC40ODUgMjU2IDEwLjAwM1YxNDcuNXoiIGlkPSJiIi8+PG1hc2sgaWQ9ImUiIHg9IjAiIHk9IjAiIHdpZHRoPSIyNTYiIGhlaWdodD0iMTg5LjA3MiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYiIvPjwvbWFzaz48Y2lyY2xlIGlkPSJjIiBjeD0iMTEwIiBjeT0iMTEwIiByPSIxMTAiLz48bWFzayBpZD0iZiIgeD0iMCIgeT0iMCIgd2lkdGg9IjIyMCIgaGVpZ2h0PSIyMjAiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2MiLz48L21hc2s+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTUzKSIgc3Ryb2tlPSIjQkJCIj48dXNlIG1hc2s9InVybCgjZCkiIHN0cm9rZS13aWR0aD0iNiIgeGxpbms6aHJlZj0iI2EiLz48dXNlIG1hc2s9InVybCgjZSkiIHN0cm9rZS13aWR0aD0iNiIgeGxpbms6aHJlZj0iI2IiLz48cGF0aCBkPSJNMS41IDE0Ny41aDI1My4xOTgiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIvPjwvZz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDUpIj48dXNlIHN0cm9rZT0iI0Y4QUQxOCIgbWFzaz0idXJsKCNmKSIgc3Ryb2tlLXdpZHRoPSI4IiBmaWxsPSIjMUYxRjFGIiB4bGluazpocmVmPSIjYyIvPjxwYXRoIGZpbGw9IiNGOEFEMTgiIGQ9Ik0xMTIuMTM0IDE3OS42NjdINzIuMTFsNDQuMzEtNjkuMDU2LTQ0LjMxLTY5LjA1NWg0MC4wMjNsNDQuMzEgNjkuMDU1eiIvPjwvZz48ZyBmaWxsPSIjQkJCIj48cGF0aCBkPSJNNTA0LjUgMTE1bC0xNCAxMy41di0yN3pNNDc5IDExOGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnptLTE2IDBhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2em0tMTYgMGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnptLTE2IDBhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2em0tMTYgMGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnptLTE2IDBhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2em0tMTYgMGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnptLTE2IDBhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2em0tMTYgMGEzIDMgMCAxIDAgMC02IDMgMyAwIDAgMCAwIDZ6bS0xNiAwYTMgMyAwIDEgMCAwLTYgMyAzIDAgMCAwIDAgNnoiLz48L2c+PC9nPjwvc3ZnPg==";
},function(e,t){e.exports="data:image/svg+xml;base64, ";
},function(e,t){e.exports="data:image/svg+xml;base64, ";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO2NsaXAtcnVsZTpldmVub2RkO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZCI+CiA8cGF0aCBkPSJtMjgwIDU2MGMtMTU0LjM1IDAtMjgwLTEyNS42NS0yODAtMjgwIDAtMTU0LjM1IDEyNS42NS0yODAgMjgwLTI4MCAxNTQuMzUgMCAyODAgMTI1LjY1IDI4MCAyODAgMCAxNTQuMzUtMTI1LjQ2IDI4MC0yODAgMjgwbTAtNTQ3LjczYy0xNDcuNjIgMC0yNjcuNTMgMTIwLjExLTI2Ny41MyAyNjcuNTMgMCAxNDcuNjIgMTIwLjExIDI2Ny41MyAyNjcuNTMgMjY3LjUzIDE0Ny40MiAwIDI2Ny41My0xMjAuMTEgMjY3LjUzLTI2Ny41My4xOTgtMTQ3LjQyLTExOS45MS0yNjcuNTMtMjY3LjUzLTI2Ny41M20tMTIuNjUgMzU3LjczbC02MS41IDQ4LjZjLTEuMi45LTIuNyAxLjQtNC4xIDEuNC0xIDAtMi0uMi0yLjktLjctMi4zLTEuMS0zLjgtMy40LTMuOC02di00My4zaC0zNi43Yy0xMSAwLTIwLTktMjAtMjB2LTE1MGMwLTExIDktMjAgMjAtMjBoMjQzLjNjMTEgMCAyMCA5IDIwIDIwdjE1MGMwIDExLTkgMjAtMjAgMjBoLTEzNC4zbTEzNC40LTE3Ni43aC0yNDMuNGMtMy43IDAtNi43IDMtNi43IDYuN3YxNTBjMCAzLjcgMyA2LjcgNi43IDYuN2g0My40YzMuNyAwIDYuNyAzIDYuNyA2Ljd2MzYuMmw1Mi41LTQxLjVjMS4yLS45IDIuNi0xLjQgNC4xLTEuNGgxMzYuN2MzLjcgMCA2LjctMyA2LjctNi43di0xNTBjMC0zLjctMy02LjctNi43LTYuN20tNDMuNCAxMDcuOGgtMTUwYy0zLjcgMC02LjctMy02LjctNi43IDAtMy43IDMtNi43IDYuNy02LjdoMTUwYzMuNyAwIDYuNyAzIDYuNyA2LjcgMCAzLjctMi45OTkgNi42OTktNi43IDYuN20wLTQxLjFoLTE1MGMtMy43IDAtNi43LTMtNi43LTYuNyAwLTMuNyAzLTYuNyA2LjctNi43aDE1MGMzLjcgMCA2LjcgMyA2LjcgNi43IDAgMy43LTIuOTk5IDYuNjk5LTYuNyA2LjciIHN0eWxlPSJmaWxsOiNjYzdiMTk7ZmlsbC1ydWxlOm5vbnplcm8iLz4KPC9zdmc+Cg==";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NC4zNDYgMC0yODAtMTI1LjY1My0yODAtMjgwIDAtMTU0LjM0NyAxMjUuNjUzLTI4MCAyODAtMjgwIDE1NC4zNDYgMCAyODAgMTI1LjY1MyAyODAgMjgwIDAgMTU0LjM0Ny0xMjUuNjUzIDI4MC0yODAgMjgwbTAtNTQ3LjUzM2MtMTQ3LjYxOSAwLTI2Ny41MzQgMTIwLjExMy0yNjcuNTM0IDI2Ny41MzQgMCAxNDcuNjE4IDEyMC4xMTMgMjY3LjUzMyAyNjcuNTM0IDI2Ny41MzMgMTQ3LjQyMSAwIDI2Ny41MzQtMTIwLjExMyAyNjcuNTM0LTI2Ny41MzMgMC0xNDcuNjE5LTExOS45MTUtMjY3LjUzNC0yNjcuNTM0LTI2Ny41MzRtNzcuMTI5IDM3Ni44NDljMC0xOC43ODUtMzUuNjA0LTMzLjk5My03OS40MzgtMzMuOTkzLTQzLjgzNSAwLTc5LjQzOCAxNS4yMDctNzkuNDM4IDMzLjk5MyAwIDE4Ljc4NiAzNS40MjQgMzMuOTk0IDc5LjQzOCAzMy45OTQgNDMuODMzIDAgNzkuNDM4LTE1LjIwNyA3OS40MzgtMzMuOTk0bTExLjQ1LTE0MS42OTljMC01MC4wOTYtNDAuNjE0LTkwLjcwOS05MC43MDktOTAuNzA5LTUwLjA5NiAwLTkwLjcwOSA0MC42MTMtOTAuNzA5IDkwLjcwOSAwIDUwLjA5NSA0MC42MTMgOTAuNzA5IDkwLjcwOSA5MC43MDkgNDkuOTE3IDAgOTAuNzA5LTQwLjYxNCA5MC43MDktOTAuNzA5bTIyLjU0My04NS4xNjNjMC0xMi41MjQtMTAuMTk4LTIyLjcyMy0yMi43MjItMjIuNzIzLTEyLjUyNCAwLTIyLjcyMiAxMC4xOTktMjIuNzIyIDIyLjcyMyAwIDEyLjUyNCAxMC4xOTggMjIuNzIyIDIyLjcyMiAyMi43MjIgMTIuNzAzIDAgMjIuNzIyLTEwLjE5OCAyMi43MjItMjIuNzIyIi8+Cjwvc3ZnPgo=";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCA1NjBjLTE1NCAwLTI4MC0xMjYtMjgwLTI4MCAwLTE1NCAxMjYtMjgwIDI4MC0yODAgMTU0IDAgMjgwIDEyNiAyODAgMjgwIDAgMTU0LTEyNiAyODAtMjgwIDI4MG0wLTU0Ny44N2MtMTQ3LjQ3IDAtMjY3Ljg3IDEyMC40LTI2Ny44NyAyNjcuODcgMCAxNDcuNDcgMTIwLjQgMjY3Ljg3IDI2Ny44NyAyNjcuODcgMTQ3LjQ3IDAgMjY3Ljg3LTEyMC40IDI2Ny44Ny0yNjcuODctLjkzMy0xNDcuNDctMTIwLjQtMjY3Ljg3LTI2Ny44Ny0yNjcuODdtLTI4LjM0IDQwMy44N2gtODkuNzVsLTIuMjk2LS40NTdjLTEuOTMzLTEuMjkxLTEuOTU2LTEuMzE0LTMuMjQ3LTMuMjQ3bC0uNDU3LTIuMjk2di0xMTcuODloLTMwLjkwN2MtLjc2NC0uMTUyLTEuNTczLS4xNTgtMi4yOTMtLjQ1NS0uNzItLjI5OC0xLjM5My0uNzQ3LTEuOTQ1LTEuMjk3LTEuMTI0LTEuMTIzLTEuNzU4LTIuNjQ1LTEuNzYyLTQuMjM0LS4wMDItLjc3OS4xNTQtMS41NzMuNDUtMi4yOTQuMjk2LS43Mi44NjItMS4yOTggMS4yOTItMS45NDhsMTU1LTE1Ni4xMSAxLjk1Mi0xLjMxMSAyLjMwNi0uNDYxYy43NjkuMTU0IDEuNTM3LjMwNyAyLjMwNi40NjFsMS45NTIgMS4zMTEgMTU1IDE1Ni4xMWMuNDMuNjUuOTk2IDEuMjI4IDEuMjkyIDEuOTQ4LjYwNCAxLjQ3LjYgMy4xMTktLjAxMSA0LjU4Ni0uMjk5LjcxOS0uNzUgMS4zOTEtMS4zMDEgMS45NDItLjU1Mi41NS0xLjIyNS45OTktMS45NDUgMS4yOTctLjcyLjI5Ny0xLjUyOC4zMDMtMi4yOTMuNDU1aC0zMC4yNnYxMTcuODlsLS40NTYgMi4yOTZjLTEuMjkyIDEuOTMzLTEuMzE1IDEuOTU2LTMuMjQ4IDMuMjQ3bC0yLjI5Ni40NTdoLTg4LjM0bC0yLjI5Ni0uNDU3Yy0xLjkzNC0xLjI5MS0xLjk1Ni0xLjMxNC0zLjI0OC0zLjI0N2wtLjQ1Ni0yLjI5NnYtNzguMjRoLTQ2LjczM3Y3OC4yNGwtLjQ1NyAyLjI5NmMtMS4yOTEgMS45MzMtMS4zMTQgMS45NTYtMy4yNDcgMy4yNDdsLTIuMjk2LjQ1N20tMTEyLjI1LTEzNS44OWgyMi40OTRsMi4yOTYuNDU3YzEuOTMzIDEuMjkxIDEuOTU2IDEuMzE0IDMuMjQ3IDMuMjQ3bC40NTcgMi4yOTZ2MTE3Ljg5aDc3Ljc1di03OC4yNGwuNDU3LTIuMjk2YzEuMjkyLTEuOTM0IDEuMzE0LTEuOTU2IDMuMjQ3LTMuMjQ4bDIuMjk2LS40NTZoNTguNzMzbDIuMjk2LjQ1NmMxLjkzMyAxLjI5MiAxLjk1NSAxLjMxNSAzLjI0NyAzLjI0OGwuNDU3IDIuMjk2djc4LjI0aDc2LjM0di0xMTcuODlsLjQ1Ny0yLjI5NmMxLjI5Mi0xLjkzMyAxLjMxNC0xLjk1NiAzLjI0Ny0zLjI0N2wyLjI5Ni0uNDU3aDIxLjg1MmwtMTQwLjU5LTE0MS41OS0xNDAuNTkgMTQxLjU5IiBzdHlsZT0iZmlsbC1ydWxlOm5vbnplcm8iLz4KPC9zdmc+Cg==";
},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDU2MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJmaWxsOiNjYzdiMTk7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQiPgogPHBhdGggZD0ibTI4MCAwYy0xNTQgMC0yODAgMTI2LTI4MCAyODAgMCAxNTQgMTI2IDI4MCAyODAgMjgwIDE1NCAwIDI4MC0xMjYgMjgwLTI4MCAwLTE1NC0xMjYtMjgwLTI4MC0yODBtMCA1NDcuNzVjLTE0Ny44NzUgMC0yNjcuNzUtMTE5Ljg3NS0yNjcuNzUtMjY3Ljc1IDAtMTQ3Ljg3NSAxMTkuODc1LTI2Ny43NSAyNjcuNzUtMjY3Ljc1IDE0Ny44NzUgMCAyNjcuNzUgMTE5Ljg3NSAyNjcuNzUgMjY3Ljc1IDAgMTQ3Ljg3NS0xMTkuODc1IDI2Ny43NS0yNjcuNzUgMjY3Ljc1bTQzLjc1LTMwNy4xMjVsLTE2Mi43NS0yNC41Yy01LjI1LS44NzUtOS42MjUtMy41LTEyLjI1LTctMi42MjUtMy41LTQuMzc1LTguNzUtMy41LTEzLjEyNWw1LjI1LTM4LjVjLjg3NS05LjYyNSAxMC41LTE2LjYyNSAyMC4xMjUtMTQuODc1bDIzMy42MjUgMzQuMTI1YzQuMzc1Ljg3NSA4Ljc1IDIuNjI1IDExLjM3NSA2LjEyNSAyLjYyNSAzLjUgNC4zNzUgOC43NSAzLjUgMTMuMTI1bC01LjI1IDM4LjVjMCA0LjM3NS0xLjc1IDctNC4zNzUgOS42MjUgNC4zNzUgMy41IDcgOC43NSA3IDE0bDAgMTM1LjYyNWMwIDEwLjUtOC43NSAxOC4zNzUtMTguMzc1IDE4LjM3NWwtMjM2LjI1IDBjLTEwLjUgMC0xOC4zNzUtOC43NS0xOC4zNzUtMTguMzc1bDAtMTM0Ljc1YzAtMTAuNDk5IDguNzQ5LTE4LjM3NCAxOC4zNzUtMTguMzc1bDE2MS44NzUgMG03NC4zNzUgMTU4LjM3NWMyLjYyNy0uMDAyIDUuMjUtMi42MjYgNS4yNS01LjI1bDAtNzkuNjI1LTI0Ni43NSAwIDAgNzkuNjI1YzAgMi42MjUgMS43NSA1LjI1IDUuMjUgNS4yNWwyMzYuMjUgMG0tMTczLjI1LTk3LjEyNWMuODc1LS44NzUuODc1LS44NzYuODc1LTEuNzVsMjkuNzUtNDcuMjUtNDIgMGMwIC44NzUgMCAuODc1LS44NzUgMi42MjVsLTI4Ljg3NSA0Ni4zNzUgNDEuMTI1IDBtNTYuODc1IDBjLjg3NS0uODc1Ljg3NS0uODc2Ljg3NS0xLjc1bDI5Ljc1LTQ3LjI1LTQyIDBjMCAuMzgzLS4xNjcuNTk4LS4zNTYuNzkzbC0uMTYzLjE2NGMtLjE4OS4xOTUtLjM1Ni40MS0uMzU2Ljc5M2wtMjkuNzUgNDcuMjUgNDIgMG01NiAwYy44NzUtLjg3NS44NzUtLjg3Ni44NzUtMS43NWwyOS43NS00Ny4yNS00MiAwYzAgLjM4My0uMTY3LjU5OC0uMzU2Ljc5M2wtLjE2My4xNjRjLS4xODkuMTk1LS4zNTYuNDEtLjM1Ni43OTNsLTI5Ljc1IDQ3LjI1IDQyIDBtLTE2OC44NzUgMGMuODc1LS44NzUuODc1LS44NzYuODc1LTEuNzVsMjkuNzUtNDcuMjUtMzcuNjI1IDBjLTMuNSAwLTUuMjUgMi42MjUtNi4xMjUgNi4xMjVsMCA0Mi44NzUgMTMuMTI1IDBtMjM0LjUtLjg3NWwwLTQyLjg3NWMwLTIuNjI1LTEuNzUtNS4yNS01LjI1LTUuMjVsLTE0Ljg3NSAwYzAgLjM4My0uMTY3LjU5OC0uMzU2Ljc5M2wtLjE2My4xNjRjLS4xODkuMTk1LS4zNTYuNDEtLjM1Ni43OTNsLTI4Ljg3NSA0Ni4zNzUgNDkuODc1IDBtLS44NzUtMTEybC00My43NS02LjEyNSAyMS44NzUgNDkuODc1IDAgMy41IDE1Ljc1IDEuNzVjMi42MjUgMCA1LjI1LTEuNzUgNS4yNS00LjM3NWw1LjI1LTM4LjVjMC0xLjc1IDAtMy41LS44NzUtNC4zNzUtLjg3NS0uODc1LTIuNjI1LTEuNzUtMy41LTEuNzVtLTc3Ljg3NSAzNS44NzVsMCAyLjYyNSA0Mi44NzUgNy0yMi43NS01MS42MjUgMC0xLjc1LTQyLTYuMTI1IDIxLjg3NSA0OS44NzVtLTU2LTguNzVjMCAuODc1Ljg3NSAyLjYyNSAwIDMuNWw0Mi44NzUgNi4xMjUtMjIuNzUtNTEuNjI1IDAtMS43NS00Mi02LjEyNSAyMS44NzUgNDkuODc1bS01Ni03Ljg3NWMuODc1Ljg3NS44NzUgMS43NSAwIDIuNjI1bDQyLjg3NSA2LjEyNS0yMi43NS01MS42MjUgMC0xLjc1LTQyLTYuMTI1IDIxLjg3NSA1MC43NW0tNTAuNzUtNC4zNzVsMzcuNjI1IDUuMjUtMjIuNzUtNTEuNjI1IDAtMS43NS03Ljg3NS0uODc1Yy0zLjUgMC02LjEyNSAxLjc1LTYuMTI1IDQuMzc1bC01LjI1IDM4LjVjMCAxLjc1IDAgMy41Ljg3NSA0LjM3NS44NzUuODc1IDEuNzUgMS43NSAzLjUgMS43NSIvPgo8L3N2Zz4K";
},function(e,t){(function(t){e.exports=t}).call(t,{})}]);