"use strict";var _utils=require("../../utils/utils");function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,o)}return r}function _objectSpread(t){for(var e=1;e1e11?Math.floor(e/1e3):Math.floor(e):0},getProgramEndTime=function(t,e){var r=normalizeSeconds((null==t?void 0:t.PlayEndTime)||(null==t?void 0:t.EndTime)||(null==t?void 0:t.AutoEndTime));if(r)return r;var o=normalizeSeconds(null==t?void 0:t.PlayStartTime),n=normalizeSeconds(null==e?void 0:e.PlayStartTime);if(n>o)return n;var i=Number((null==t?void 0:t.VideoTime)||(null==t?void 0:t.Duration)||(null==t?void 0:t.MediaDuration)||0);return o&&i>0?Math.floor(o+i):0};Component({properties:{sdkInstance:{type:Object,value:null},themeColor:{type:Object,value:null}},data:{programList:[]},observers:{sdkInstance:function(t){var e=this;t&&("function"==typeof this.unsub&&this.unsub(),this.unsub=null,this.sdkInstance=t,this.store=t.store,this.unsub=this.store.get({liveInfo:function(t){var r,o,n=(null===(r=e.store)||void 0===r||null===(o=r.get)||void 0===o?void 0:o.call(r,"PullStreamUrl"))||(null==t?void 0:t.PullStreamUrl)||[],i=(0,_utils.getCurrentLoopVideoProgram)(t,n),u=Array.isArray(null==i?void 0:i.LoopVideos)?i.LoopVideos:[],l=u.map(function(t,e){return _objectSpread(_objectSpread({},t),{},{startTimeText:formatProgramTime(null==t?void 0:t.PlayStartTime),endTimeText:formatProgramTime(getProgramEndTime(t,u[e+1])),videoNameText:(0,_utils.getBySplit)(null==t?void 0:t.VideoName)})});JSON.stringify(e.data.programList)!==JSON.stringify(l)&&e.setData({programList:l})}}))}},lifetimes:{detached:function(){"function"==typeof this.unsub&&this.unsub(),this.unsub=null}}});