@clickview/reports 0.0.14-rc.3 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/scripts/{8-4362d8ec47-reports.chunk.js → 8-561ad8215b-reports.chunk.js} +1 -1
  3. package/dist/scripts/{9-2294aec88e-reports.chunk.js → 9-09d4882649-reports.chunk.js} +1 -1
  4. package/dist/scripts/{bundle-a50e7f7abd.min.js → bundle-ea3b1ca1bb.min.js} +1 -1
  5. package/package.json +3 -3
  6. package/dist/css/1-reports.chunk.css +0 -26
  7. package/dist/css/10-reports-1a016faa7a.chunk.css +0 -16
  8. package/dist/css/10-reports-dfc303887f.chunk.css +0 -94
  9. package/dist/css/11-reports-6e0e114b8b.chunk.css +0 -16
  10. package/dist/css/11-reports-c64a3dae3c.chunk.css +0 -24
  11. package/dist/css/12-reports-82f3a62e3f.chunk.css +0 -6
  12. package/dist/css/12-reports-87b0f4ae23.chunk.css +0 -18
  13. package/dist/css/12-reports.chunk.css +0 -39
  14. package/dist/css/13-reports-5101603969.chunk.css +0 -8
  15. package/dist/css/13-reports-d7c596841b.chunk.css +0 -6
  16. package/dist/css/13-reports.chunk.css +0 -4
  17. package/dist/css/14-reports-1b564b1b5c.chunk.css +0 -12
  18. package/dist/css/14-reports.chunk.css +0 -9
  19. package/dist/css/15-reports-c822f03e9f.chunk.css +0 -6
  20. package/dist/css/15-reports.chunk.css +0 -12
  21. package/dist/css/16-reports-e755ceba53.chunk.css +0 -4
  22. package/dist/css/16-reports.chunk.css +0 -9
  23. package/dist/css/17-reports-a851153aa2.chunk.css +0 -6
  24. package/dist/css/17-reports.chunk.css +0 -421
  25. package/dist/css/18-reports-8d22d0432e.chunk.css +0 -2
  26. package/dist/css/18-reports.chunk.css +0 -60
  27. package/dist/css/19-reports-b5e731ba4c.chunk.css +0 -2
  28. package/dist/css/19-reports.chunk.css +0 -152
  29. package/dist/css/2-reports-ee0f55c5ef.chunk.css +0 -6
  30. package/dist/css/20-reports-b24d9e1929.chunk.css +0 -4
  31. package/dist/css/20-reports.chunk.css +0 -15
  32. package/dist/css/21-reports-b5e731ba4c.chunk.css +0 -2
  33. package/dist/css/21-reports.chunk.css +0 -24
  34. package/dist/css/22-reports.chunk.css +0 -22
  35. package/dist/css/23-reports.chunk.css +0 -4
  36. package/dist/css/24-reports.chunk.css +0 -4
  37. package/dist/css/25-reports.chunk.css +0 -9
  38. package/dist/css/26-reports.chunk.css +0 -12
  39. package/dist/css/27-reports.chunk.css +0 -12
  40. package/dist/css/28-reports.chunk.css +0 -12
  41. package/dist/css/3-reports.chunk.css +0 -52
  42. package/dist/css/5-reports.chunk.css +0 -12
  43. package/dist/css/6-reports-7d7912037e.chunk.css +0 -12
  44. package/dist/css/6-reports.chunk.css +0 -83
  45. package/dist/css/8-reports-9e7980819e.chunk.css +0 -94
  46. package/dist/css/9-reports-17de4ec4e3.chunk.css +0 -94
  47. package/dist/css/9-reports-80a3d4c4dc.chunk.css +0 -94
  48. package/dist/css/9-reports.chunk.css +0 -1793
  49. package/dist/css/reports-app-363cd589d6.css +0 -63
  50. package/dist/css/reports-app.css +0 -11386
  51. package/dist/scripts/0-c45f33cf27-reports.chunk.js +0 -1
  52. package/dist/scripts/0-fdb01ce347-reports.chunk.js +0 -1
  53. package/dist/scripts/0-reports.chunk.js +0 -11
  54. package/dist/scripts/1-593f3a2b8d-reports.chunk.js +0 -1
  55. package/dist/scripts/1-c590ecd5b7-reports.chunk.js +0 -1
  56. package/dist/scripts/1-reports.chunk.js +0 -161
  57. package/dist/scripts/10-75042090ca-reports.chunk.js +0 -1
  58. package/dist/scripts/10-d366e632ff-reports.chunk.js +0 -1
  59. package/dist/scripts/10-reports.chunk.js +0 -1270
  60. package/dist/scripts/11-50d5d1ddfd-reports.chunk.js +0 -1
  61. package/dist/scripts/11-60744bb8ca-reports.chunk.js +0 -1
  62. package/dist/scripts/11-reports.chunk.js +0 -59
  63. package/dist/scripts/12-a75cd2076e-reports.chunk.js +0 -1
  64. package/dist/scripts/12-d58e14d944-reports.chunk.js +0 -1
  65. package/dist/scripts/12-reports.chunk.js +0 -191
  66. package/dist/scripts/13-0a16876333-reports.chunk.js +0 -1
  67. package/dist/scripts/13-ff911da0b4-reports.chunk.js +0 -1
  68. package/dist/scripts/13-reports.chunk.js +0 -98
  69. package/dist/scripts/14-27dad36371-reports.chunk.js +0 -1
  70. package/dist/scripts/14-4059f6ff70-reports.chunk.js +0 -1
  71. package/dist/scripts/14-reports.chunk.js +0 -50
  72. package/dist/scripts/15-1ff7d228f0-reports.chunk.js +0 -1
  73. package/dist/scripts/15-6fe99dadbd-reports.chunk.js +0 -1
  74. package/dist/scripts/15-reports.chunk.js +0 -34
  75. package/dist/scripts/16-356448bd82-reports.chunk.js +0 -1
  76. package/dist/scripts/16-f51c2fd114-reports.chunk.js +0 -1
  77. package/dist/scripts/16-reports.chunk.js +0 -18
  78. package/dist/scripts/17-75641e87b3-reports.chunk.js +0 -1
  79. package/dist/scripts/17-903b3a42a8-reports.chunk.js +0 -1
  80. package/dist/scripts/17-reports.chunk.js +0 -450
  81. package/dist/scripts/18-0825e33ae4-reports.chunk.js +0 -1
  82. package/dist/scripts/18-145828e75c-reports.chunk.js +0 -1
  83. package/dist/scripts/18-reports.chunk.js +0 -172
  84. package/dist/scripts/19-a84afe10d6-reports.chunk.js +0 -1
  85. package/dist/scripts/19-ee16e3fc45-reports.chunk.js +0 -1
  86. package/dist/scripts/19-reports.chunk.js +0 -143
  87. package/dist/scripts/2-65f25368c3-reports.chunk.js +0 -1
  88. package/dist/scripts/2-a4d6cdfd17-reports.chunk.js +0 -1
  89. package/dist/scripts/2-reports.chunk.js +0 -17
  90. package/dist/scripts/20-5dc6922f9f-reports.chunk.js +0 -1
  91. package/dist/scripts/20-789131e4b0-reports.chunk.js +0 -1
  92. package/dist/scripts/20-reports.chunk.js +0 -96
  93. package/dist/scripts/21-3eeb7d3987-reports.chunk.js +0 -1
  94. package/dist/scripts/21-ee33292057-reports.chunk.js +0 -1
  95. package/dist/scripts/21-reports.chunk.js +0 -96
  96. package/dist/scripts/22-3c846d6a6f-reports.chunk.js +0 -1
  97. package/dist/scripts/22-853d813bbe-reports.chunk.js +0 -1
  98. package/dist/scripts/22-reports.chunk.js +0 -81
  99. package/dist/scripts/23-f2afd0b1c8-reports.chunk.js +0 -1
  100. package/dist/scripts/23-reports.chunk.js +0 -66
  101. package/dist/scripts/24-reports.chunk.js +0 -58
  102. package/dist/scripts/25-reports.chunk.js +0 -50
  103. package/dist/scripts/26-reports.chunk.js +0 -42
  104. package/dist/scripts/27-reports.chunk.js +0 -34
  105. package/dist/scripts/28-reports.chunk.js +0 -34
  106. package/dist/scripts/29-reports.chunk.js +0 -35
  107. package/dist/scripts/3-5f4ba3c213-reports.chunk.js +0 -1
  108. package/dist/scripts/3-dc412a5e87-reports.chunk.js +0 -1
  109. package/dist/scripts/3-reports.chunk.js +0 -97
  110. package/dist/scripts/30-reports.chunk.js +0 -19
  111. package/dist/scripts/31-reports.chunk.js +0 -11
  112. package/dist/scripts/32-reports.chunk.js +0 -11
  113. package/dist/scripts/4-04ae41a740-reports.chunk.js +0 -1
  114. package/dist/scripts/4-d0e7a012aa-reports.chunk.js +0 -1
  115. package/dist/scripts/4-reports.chunk.js +0 -1118
  116. package/dist/scripts/5-6d052b2b2d-reports.chunk.js +0 -101
  117. package/dist/scripts/5-9ff38a41fa-reports.chunk.js +0 -1
  118. package/dist/scripts/5-reports.chunk.js +0 -74
  119. package/dist/scripts/6-a6302fc5d5-reports.chunk.js +0 -1
  120. package/dist/scripts/6-reports.chunk.js +0 -56
  121. package/dist/scripts/7-reports.chunk.js +0 -43
  122. package/dist/scripts/8-2fb9a98a35-reports.chunk.js +0 -101
  123. package/dist/scripts/8-dee5906c67-reports.chunk.js +0 -101
  124. package/dist/scripts/8-reports.chunk.js +0 -17
  125. package/dist/scripts/9-8bb5696164-reports.chunk.js +0 -101
  126. package/dist/scripts/9-9b86a34919-reports.chunk.js +0 -101
  127. package/dist/scripts/9-d33b0f6f8a-reports.chunk.js +0 -1
  128. package/dist/scripts/9-reports.chunk.js +0 -1184
  129. package/dist/scripts/bundle-04a5b8c96e.min.js +0 -19
  130. package/dist/scripts/bundle-21f98d831e.min.js +0 -19
  131. package/dist/scripts/bundle-e519b5eef9.min.js +0 -19
  132. package/dist/scripts/bundle.js +0 -5722
  133. package/dist/scripts/polyfills-018d301355.min.js +0 -1
  134. package/dist/scripts/polyfills-be148b3001.min.js +0 -1
  135. package/dist/scripts/polyfills.js +0 -2750
@@ -1,101 +0,0 @@
1
- (window.webpackJsonp_clickview_reports=window.webpackJsonp_clickview_reports||[]).push([[8],[,,function(e,t,n){var r=n(12),i=n(56).f,o=n(52),a=n(49),s=n(206),u=n(256),c=n(145);e.exports=function(e,t){var n,l,f,h,d,p=e.target,y=e.global,m=e.stat;if(n=y?r:m?r[p]||s(p,{}):(r[p]||{}).prototype)for(l in t){if(h=t[l],f=e.noTargetGet?(d=i(n,l))&&d.value:n[l],!c(y?l:p+(m?".":"#")+l,e.forced)&&void 0!==f){if(typeof h==typeof f)continue;u(h,f)}(e.sham||f&&f.sham)&&o(h,"sham",!0),a(n,l,h,e)}}},,,,,,,function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},,,function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(139))},,,,function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},,function(e,t,n){var r=n(16);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},,,function(e,t,n){var r=n(9);e.exports=!r((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},,function(e,t,n){var r=n(12),i=n(142),o=n(144),a=n(258),s=r.Symbol,u=i("wks");e.exports=function(e){return u[e]||(u[e]=a&&s[e]||(a?s:o)("Symbol."+e))}},,,function(e,t,n){var r=n(68),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},,,,function(e,t,n){var r=n(21),i=n(248),o=n(18),a=n(76),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(55);e.exports=function(e){return Object(r(e))}},,,,,,,function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},,,,,,function(e,t,n){var r=n(100),i=n(141),o=n(31),a=n(26),s=n(150),u=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,l=4==e,f=6==e,h=5==e||f;return function(d,p,y,m){for(var g,v,b=o(d),_=i(b),T=r(p,y,3),w=a(_.length),S=0,C=m||s,k=t?C(d,w):n?C(d,0):void 0;w>S;S++)if((h||S in _)&&(v=T(g=_[S],S,b),e))if(t)k[S]=v;else if(v)switch(e){case 3:return!0;case 5:return g;case 6:return S;case 2:u.call(k,g)}else if(l)return!1;return f?-1:c||l?l:k}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},,,,,function(e,t,n){var r=n(12),i=n(142),o=n(52),a=n(38),s=n(206),u=n(249),c=n(67),l=c.get,f=c.enforce,h=String(u).split("toString");i("inspectSource",(function(e){return u.call(e)})),(e.exports=function(e,t,n,i){var u=!!i&&!!i.unsafe,c=!!i&&!!i.enumerable,l=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||o(n,"name",t),f(n).source=h.join("string"==typeof t?t:"")),e!==r?(u?!l&&e[t]&&(c=!0):delete e[t],c?e[t]=n:o(e,t,n)):c?e[t]=n:s(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||u.call(this)}))},,,function(e,t,n){var r=n(21),i=n(30),o=n(98);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},,,function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(21),i=n(168),o=n(98),a=n(60),s=n(76),u=n(38),c=n(248),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=a(e),t=s(t,!0),c)try{return l(e,t)}catch(e){}if(u(e,t))return o(!i.f.call(e,t),e[t])}},,,,function(e,t,n){var r=n(141),i=n(55);e.exports=function(e){return r(i(e))}},,,,,,,function(e,t,n){var r,i,o,a=n(250),s=n(12),u=n(16),c=n(52),l=n(38),f=n(166),h=n(143),d=s.WeakMap;if(a){var p=new d,y=p.get,m=p.has,g=p.set;r=function(e,t){return g.call(p,e,t),t},i=function(e){return y.call(p,e)||{}},o=function(e){return m.call(p,e)}}else{var v=f("state");h[v]=!0,r=function(e,t){return c(e,v,t),t},i=function(e){return l(e,v)?e[v]:{}},o=function(e){return l(e,v)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},,function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},,,,function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(257),i=n(12),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},function(e,t,n){var r=n(16);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},,,,,,,function(e,t,n){var r=n(30).f,i=n(38),o=n(23)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(38),i=n(31),o=n(166),a=n(217),s=o("IE_PROTO"),u=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},,,,,function(e,t,n){var r=n(18),i=n(214),o=n(207),a=n(143),s=n(259),u=n(208),c=n(166)("IE_PROTO"),l=function(){},f=function(){var e,t=u("iframe"),n=o.length;for(t.style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),f=e.F;n--;)delete f.prototype[o[n]];return f()};e.exports=Object.create||function(e,t){var n;return null!==e?(l.prototype=r(e),n=new l,l.prototype=null,n[c]=e):n=f(),void 0===t?n:i(n,t)},a[c]=!0},function(e,t,n){"use strict";var r=n(9);e.exports=function(e,t){var n=[][e];return!n||!r((function(){n.call(null,t||function(){throw 1},1)}))}},,,,,,,,function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=!1},function(e,t,n){var r=n(70);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var r=n(68),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},function(e,t,n){var r=n(23),i=n(89),o=n(52),a=r("unscopables"),s=Array.prototype;null==s[a]&&o(s,a,i(null)),e.exports=function(e){s[a][e]=!0}},,,,,,,function(e,t,n){var r=n(143),i=n(16),o=n(38),a=n(30).f,s=n(144),u=n(154),c=s("meta"),l=0,f=Object.isExtensible||function(){return!0},h=function(e){a(e,c,{value:{objectID:"O"+ ++l,weakData:{}}})},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,c)){if(!f(e))return"F";if(!t)return"E";h(e)}return e[c].objectID},getWeakData:function(e,t){if(!o(e,c)){if(!f(e))return!0;if(!t)return!1;h(e)}return e[c].weakData},onFreeze:function(e){return u&&d.REQUIRED&&f(e)&&!o(e,c)&&h(e),e}};r[c]=!0},function(e,t,n){var r=n(251),i=n(207).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(74);e.exports=Array.isArray||function(e){return"Array"==r(e)}},,,,,,,,function(e,t,n){var r=n(18),i=n(262);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},function(e,t,n){var r=n(49);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},,function(e,t,n){var r=n(55),i="["+n(170)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},,,,,,,,,,,,,,,,,function(e,t){e.exports={}},function(e,t,n){var r=n(9),i=n(74),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},function(e,t,n){var r=n(99),i=n(505);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.4.0",mode:r?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports={}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r=n(9),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==c||n!=u&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},function(e,t,n){var r=n(251),i=n(207);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(74),i=n(23)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(18),i=n(216),o=n(26),a=n(100),s=n(153),u=n(260),c=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,l,f){var h,d,p,y,m,g,v,b=a(t,n,l?2:1);if(f)h=e;else{if("function"!=typeof(d=s(e)))throw TypeError("Target is not iterable");if(i(d)){for(p=0,y=o(e.length);y>p;p++)if((m=l?b(r(v=e[p])[0],v[1]):b(e[p]))&&m instanceof c)return m;return new c(!1)}h=d.call(e)}for(g=h.next;!(v=g.call(h)).done;)if("object"==typeof(m=u(h,b,v.value,l))&&m&&m instanceof c)return m;return new c(!1)}).stop=function(e){return new c(!0,e)}},function(e,t,n){var r=n(60),i=n(26),o=n(102),a=function(e){return function(t,n,a){var s,u=r(t),c=i(u.length),l=o(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var r=n(16),i=n(112),o=n(23)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){var r=n(9),i=n(23),o=n(215),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){var r=n(75);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(147),i=n(140),o=n(23)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(9);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},,,,,,,,,,,,function(e,t,n){var r=n(142),i=n(144),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e,t,n){"use strict";var r,i,o=n(178),a=RegExp.prototype.exec,s=String.prototype.replace,u=a,c=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),l=void 0!==/()??/.exec("")[1];(c||l)&&(u=function(e){var t,n,r,i,u=this;return l&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),c&&(t=u.lastIndex),r=a.call(u,e),c&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),l&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=u},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},function(e,t,n){"use strict";var r=n(60),i=n(103),o=n(140),a=n(67),s=n(210),u=a.set,c=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){u(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(e,t,n){var r=n(68),i=n(55),o=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},function(e,t,n){"use strict";var r=n(52),i=n(49),o=n(9),a=n(23),s=n(167),u=a("species"),c=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),l=!o((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var h=a(e),d=!o((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),p=d&&!o((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!d||!p||"replace"===e&&!c||"split"===e&&!l){var y=/./[h],m=n(h,""[e],(function(e,t,n,r,i){return t.exec===s?d&&!i?{done:!0,value:y.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),g=m[0],v=m[1];i(String.prototype,e,g),i(RegExp.prototype,h,2==t?function(e,t){return v.call(e,this,t)}:function(e){return v.call(e,this)}),f&&r(RegExp.prototype[h],"sham",!0)}}},function(e,t,n){var r=n(74),i=n(167);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){var r=n(23)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},function(e,t,n){var r=n(70),i=n(31),o=n(141),a=n(26),s=function(e){return function(t,n,s,u){r(n);var c=i(t),l=o(c),f=a(c.length),h=e?f-1:0,d=e?-1:1;if(s<2)for(;;){if(h in l){u=l[h],h+=d;break}if(h+=d,e?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;e?h>=0:f>h;h+=d)h in l&&(u=n(u,l[h],h,c));return u}};e.exports={left:s(!1),right:s(!0)}},function(e,t,n){"use strict";var r=n(2),i=n(12),o=n(145),a=n(49),s=n(110),u=n(148),c=n(101),l=n(16),f=n(9),h=n(174),d=n(83),p=n(177);e.exports=function(e,t,n,y,m){var g=i[e],v=g&&g.prototype,b=g,_=y?"set":"add",T={},w=function(e){var t=v[e];a(v,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(m&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!l(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!l(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(o(e,"function"!=typeof g||!(m||v.forEach&&!f((function(){(new g).entries().next()})))))b=n.getConstructor(t,e,y,_),s.REQUIRED=!0;else if(o(e,!0)){var S=new b,C=S[_](m?{}:-0,1)!=S,k=f((function(){S.has(1)})),E=h((function(e){new g(e)})),I=!m&&f((function(){for(var e=new g,t=5;t--;)e[_](t,t);return!e.has(-0)}));E||((b=t((function(t,n){c(t,b,e);var r=p(new g,t,b);return null!=n&&u(n,r[_],r,y),r}))).prototype=v,v.constructor=b),(k||I)&&(w("delete"),w("has"),y&&w("get")),(I||C)&&w(_),m&&v.clear&&delete v.clear}return T[e]=b,r({global:!0,forced:b!=g},T),d(b,e),m||n.setStrong(b,e,y),b}},function(e,t,n){var r=n(16),i=n(120);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},function(e,t,n){"use strict";var r=n(18);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){var r=n(12),i=n(52);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var r=n(12),i=n(16),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(2),i=n(261),o=n(84),a=n(120),s=n(83),u=n(52),c=n(49),l=n(23),f=n(99),h=n(140),d=n(253),p=d.IteratorPrototype,y=d.BUGGY_SAFARI_ITERATORS,m=l("iterator"),g=function(){return this};e.exports=function(e,t,n,l,d,v,b){i(n,t,l);var _,T,w,S=function(e){if(e===d&&O)return O;if(!y&&e in E)return E[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},C=t+" Iterator",k=!1,E=e.prototype,I=E[m]||E["@@iterator"]||d&&E[d],O=!y&&I||S(d),x="Array"==t&&E.entries||I;if(x&&(_=o(x.call(new e)),p!==Object.prototype&&_.next&&(f||o(_)===p||(a?a(_,p):"function"!=typeof _[m]&&u(_,m,g)),s(_,C,!0,!0),f&&(h[C]=g))),"values"==d&&I&&"values"!==I.name&&(k=!0,O=function(){return I.call(this)}),f&&!b||E[m]===O||u(E,m,O),h[t]=O,d)if(T={values:S("values"),keys:v?O:S("keys"),entries:S("entries")},b)for(w in T)(y||k||!(w in E))&&c(E,w,T[w]);else r({target:t,proto:!0,forced:y||k},T);return T}},function(e,t,n){"use strict";var r=n(171).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},,function(e,t,n){var r=n(75),i=n(111),o=n(209),a=n(18);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(21),i=n(30),o=n(18),a=n(146);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,u=0;s>u;)i.f(e,n=r[u++],t[n]);return e}},function(e,t,n){var r,i,o=n(12),a=n(152),s=o.process,u=s&&s.versions,c=u&&u.v8;c?i=(r=c.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},function(e,t,n){var r=n(23),i=n(140),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t,n){var r=n(9);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){var r=n(21),i=n(9),o=n(208);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(142);e.exports=r("native-function-to-string",Function.toString)},function(e,t,n){var r=n(12),i=n(249),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i.call(o))},function(e,t,n){var r=n(38),i=n(60),o=n(149).indexOf,a=n(143);e.exports=function(e,t){var n,s=i(e),u=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},function(e,t,n){"use strict";var r=n(44).forEach,i=n(90);e.exports=i("forEach")?function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}:[].forEach},function(e,t,n){"use strict";var r,i,o,a=n(84),s=n(52),u=n(38),c=n(23),l=n(99),f=c("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),l||u(r,f)||s(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},,function(e,t,n){var r=n(38),i=n(213),o=n(56),a=n(30);e.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,c=0;c<n.length;c++){var l=n[c];r(e,l)||s(e,l,u(t,l))}}},function(e,t,n){e.exports=n(12)},function(e,t,n){var r=n(9);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t,n){var r=n(75);e.exports=r("document","documentElement")},function(e,t,n){var r=n(18);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){"use strict";var r=n(253).IteratorPrototype,i=n(89),o=n(98),a=n(83),s=n(140),u=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,c,!1,!0),s[c]=u,e}},function(e,t,n){var r=n(16);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){var r=n(12),i=n(123).trim,o=n(170),a=r.parseInt,s=/^[+-]?0[Xx]/,u=8!==a(o+"08")||22!==a(o+"0x16");e.exports=u?function(e,t){var n=i(String(e));return a(n,t>>>0||(s.test(n)?16:10))}:a},function(e,t,n){"use strict";var r=n(21),i=n(9),o=n(146),a=n(209),s=n(168),u=n(31),c=n(141),l=Object.assign;e.exports=!l||i((function(){var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||"abcdefghijklmnopqrst"!=o(l({},t)).join("")}))?function(e,t){for(var n=u(e),i=arguments.length,l=1,f=a.f,h=s.f;i>l;)for(var d,p=c(arguments[l++]),y=f?o(p).concat(f(p)):o(p),m=y.length,g=0;m>g;)d=y[g++],r&&!h.call(p,d)||(n[d]=p[d]);return n}:l},function(e,t,n){"use strict";var r=n(171).charAt,i=n(67),o=n(210),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(121),i=n(110).getWeakData,o=n(18),a=n(16),s=n(101),u=n(148),c=n(44),l=n(38),f=n(67),h=f.set,d=f.getterFor,p=c.find,y=c.findIndex,m=0,g=function(e){return e.frozen||(e.frozen=new v)},v=function(){this.entries=[]},b=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};v.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=y(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,c){var f=e((function(e,r){s(e,f,t),h(e,{type:t,id:m++,frozen:void 0}),null!=r&&u(r,e[c],e,n)})),p=d(t),y=function(e,t,n){var r=p(e),a=i(o(t),!0);return!0===a?g(r).set(t,n):a[r.id]=n,e};return r(f.prototype,{delete:function(e){var t=p(this);if(!a(e))return!1;var n=i(e);return!0===n?g(t).delete(e):n&&l(n,t.id)&&delete n[t.id]},has:function(e){var t=p(this);if(!a(e))return!1;var n=i(e);return!0===n?g(t).has(e):n&&l(n,t.id)}}),r(f.prototype,n?{get:function(e){var t=p(this);if(a(e)){var n=i(e);return!0===n?g(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return y(this,e,t)}}:{add:function(e){return y(this,e,!0)}}),f}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){var r=n(12),i=n(206),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){"use strict";var r=n(2),i=n(44).filter;r({target:"Array",proto:!0,forced:!n(151)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(2),i=n(252);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},function(e,t,n){"use strict";var r=n(2),i=n(175).left;r({target:"Array",proto:!0,forced:n(90)("reduce")},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(21),i=n(30).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/;r&&!("name"in o)&&i(o,"name",{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},function(e,t,n){var r=n(2),i=n(264);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,n){var r=n(49),i=n(512),o=Object.prototype;i!==o.toString&&r(o,"toString",i,{unsafe:!0})},function(e,t,n){"use strict";var r=n(147),i={};i[n(23)("toStringTag")]="z",e.exports="[object z]"!==String(i)?function(){return"[object "+r(this)+"]"}:i.toString},function(e,t,n){var r=n(2),i=n(263);r({global:!0,forced:parseInt!=i},{parseInt:i})},function(e,t,n){"use strict";var r=n(2),i=n(167);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,n){"use strict";var r=n(172),i=n(18),o=n(26),a=n(55),s=n(211),u=n(173);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=i(e),c=String(this);if(!a.global)return u(a,c);var l=a.unicode;a.lastIndex=0;for(var f,h=[],d=0;null!==(f=u(a,c));){var p=String(f[0]);h[d]=p,""===p&&(a.lastIndex=s(c,o(a.lastIndex),l)),d++}return 0===d?null:h}]}))},function(e,t,n){"use strict";var r=n(172),i=n(18),o=n(31),a=n(26),s=n(68),u=n(55),c=n(211),l=n(173),f=Math.max,h=Math.min,d=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,y=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n){return[function(n,r){var i=u(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,o){var u=n(t,e,this,o);if(u.done)return u.value;var d=i(e),p=String(this),y="function"==typeof o;y||(o=String(o));var m=d.global;if(m){var g=d.unicode;d.lastIndex=0}for(var v=[];;){var b=l(d,p);if(null===b)break;if(v.push(b),!m)break;""===String(b[0])&&(d.lastIndex=c(p,a(d.lastIndex),g))}for(var _,T="",w=0,S=0;S<v.length;S++){b=v[S];for(var C=String(b[0]),k=f(h(s(b.index),p.length),0),E=[],I=1;I<b.length;I++)E.push(void 0===(_=b[I])?_:String(_));var O=b.groups;if(y){var x=[C].concat(E,k,p);void 0!==O&&x.push(O);var P=String(o.apply(void 0,x))}else P=r(C,p,k,E,O,o);k>=w&&(T+=p.slice(w,k)+P,w=k+C.length)}return T+p.slice(w)}];function r(e,n,r,i,a,s){var u=r+e.length,c=i.length,l=y;return void 0!==a&&(a=o(a),l=p),t.call(s,l,(function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":s=a[o.slice(1,-1)];break;default:var l=+o;if(0===l)return t;if(l>c){var f=d(l/10);return 0===f?t:f<=c?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):t}s=i[l-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";var r,i=n(12),o=n(121),a=n(110),s=n(176),u=n(266),c=n(16),l=n(67).enforce,f=n(250),h=!i.ActiveXObject&&"ActiveXObject"in i,d=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},y=e.exports=s("WeakMap",p,u,!0,!0);if(f&&h){r=u.getConstructor(p,"WeakMap",!0),a.REQUIRED=!0;var m=y.prototype,g=m.delete,v=m.has,b=m.get,_=m.set;o(m,{delete:function(e){if(c(e)&&!d(e)){var t=l(this);return t.frozen||(t.frozen=new r),g.call(this,e)||t.frozen.delete(e)}return g.call(this,e)},has:function(e){if(c(e)&&!d(e)){var t=l(this);return t.frozen||(t.frozen=new r),v.call(this,e)||t.frozen.has(e)}return v.call(this,e)},get:function(e){if(c(e)&&!d(e)){var t=l(this);return t.frozen||(t.frozen=new r),v.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(c(e)&&!d(e)){var n=l(this);n.frozen||(n.frozen=new r),v.call(this,e)?_.call(this,e,t):n.frozen.set(e,t)}else _.call(this,e,t);return this}})}},function(e,t,n){var r=n(12),i=n(254),o=n(252),a=n(52);for(var s in i){var u=r[s],c=u&&u.prototype;if(c&&c.forEach!==o)try{a(c,"forEach",o)}catch(e){c.forEach=o}}},function(e,t,n){var r=n(12),i=n(254),o=n(169),a=n(52),s=n(23),u=s("iterator"),c=s("toStringTag"),l=o.values;for(var f in i){var h=r[f],d=h&&h.prototype;if(d){if(d[u]!==l)try{a(d,u,l)}catch(e){d[u]=l}if(d[c]||a(d,c,f),i[f])for(var p in o)if(d[p]!==o[p])try{a(d,p,o[p])}catch(e){d[p]=o[p]}}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(88),i=n(1024),o={views:function(e,t,n,o,a){var s="video:views";return t&&(s+=":".concat(t)),{url:r.a.urlBuilder("{gateway}/v1/analytics/views",Object.assign({objectId:t},Object(i.a)(e))),key:Object(i.b)(s,e),normalize:!1,success:n,error:o,always:a}},individualEngagement:function(e,t,n,o,a){return{url:r.a.urlBuilder("{gateway}/v1/analytics/heat-map",Object.assign({objectId:e},Object(i.a)(t))),key:Object(i.b)("engagement:".concat(e),t),formatData:function(e){var t;return Object.assign(Object.assign({},e),{data:null===(t=e.data)||void 0===t?void 0:t.map((function(e){var t;return Object.assign(Object.assign({},e),{heatMap:null!==(t=e.heatMap)&&void 0!==t?t:[]})}))})},normalize:!1,success:n,error:o,always:a}},aggregateEngagement:function(e,t,n,o,a){return{url:r.a.urlBuilder("{gateway}/v1/analytics/heat-map/aggregations",Object.assign({objectId:e},Object(i.a)(t))),key:Object(i.b)("aggregate:engagement:".concat(e),t),formatData:function(e){var t;return Object.assign(Object.assign({},e),{heatMap:null!==(t=e.heatMap)&&void 0!==t?t:[]})},normalize:!1,success:n,error:o,always:a}}}},function(e,t,n){"use strict";var r,i,o=n(0),a=n.n(o),s=n(869),u=n(859),c=n.n(u);function l(e){var t=e===r.Large?5.8:2,n=e===r.Large?.36:.2;return"".concat(t/2-2*n,"rem")}function f(e){return e>=s.a.HIGH?"text-success":e>=s.a.MODERATE?"text-warning":"text-danger"}function h(e,t){var n="d-inline-block ".concat(c.a.circleContainer);return e===r.Large&&(n+=" ".concat(c.a.lgCircleContainer)),d(t)&&(n+=" ".concat(c.a.pendingCircle)),n}function d(e){return"number"!=typeof e}function p(e){var t,n=a.a.useCallback((function(t){if(t){var n=t.r.baseVal.value,r=2*Math.PI*n,i=r-e.percentage*r;t.style.strokeDasharray="".concat(r," ").concat(r),t.style.strokeDashoffset=i.toString()}}),[]);return a.a.createElement("svg",null,a.a.createElement("circle",{r:l(e.size),className:c.a.backgroundCircle}),!d(e.percentage)&&a.a.createElement("circle",{ref:n,r:l(e.size),className:(t=e.percentage,t>=s.a.HIGH?c.a.circleSuccess:t>=s.a.MODERATE?c.a.circleWarning:c.a.circleDanger)}))}function y(e){var t,n,o=e.layout===i.LabelInside?r.Large:r.Small,s=e.customLabel||(d(n=e.percentage)?"--%":"".concat(Math.round(100*n),"%"));return e.layout===i.LabelOnly?a.a.createElement("span",{className:f(e.percentage)},s):a.a.createElement("div",{className:"d-flex align-items-center justify-content-between ".concat(null!==(t=e.className)&&void 0!==t?t:"")},e.layout===i.LabelBefore&&a.a.createElement("span",{className:"mr-2"},s),a.a.createElement("div",{className:h(o,e.percentage)},a.a.createElement(p,{percentage:e.percentage,size:o}),e.layout===i.LabelInside&&a.a.createElement("span",{className:c.a.centredPercentageText},s)))}!function(e){e.Small="small",e.Large="large"}(r||(r={})),n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return y})),function(e){e.CircleOnly="circle_only",e.LabelOnly="label_only",e.LabelBefore="label_before",e.LabelInside="label_inside"}(i||(i={})),y.defaultProps={layout:i.CircleOnly}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),i=n(27),o=n(247);function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=r.useContext(o.a),s=n.setPageTitle;r.useEffect((function(){"boolean"!=typeof e&&i.a.isFunction(s)&&(e||(e=""),s(e))}),[e].concat(a(t)))}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(874),a=n.n(o);function s(e){var t;return i.a.createElement("img",{alt:"",role:"presentation",src:e.src,className:"".concat(a.a.image," ").concat(null!==(t=e.className)&&void 0!==t?t:"")})}var u=n(3),c=n(27),l=n(212),f=n(41);function h(e){var t=e.className||"btn btn-dark";if(!e.icon){if(e.appLink&&!c.a.isFunction(e.onClick))return i.a.createElement(f.a,{appLink:e.appLink,className:t},e.text);return i.a.createElement("button",{onClick:function(){c.a.isFunction(e.onClick)&&e.onClick(),e.appLink&&u.a.AppLinkHelper.trigger(e.appLink)},className:t},e.text)}return i.a.createElement(l.a,{className:t,onClick:e.onClick,appLink:e.appLink,svgName:e.icon},e.text)}function d(e){var t;return i.a.createElement("div",{className:"text-center d-flex flex-column align-items-center ".concat(null!==(t=e.className)&&void 0!==t?t:"")},e.children)}n.d(t,"a",(function(){return d})),d.defaultProps={className:"pt-5"},d.Image=function(e){return i.a.createElement(s,Object.assign({},e))},d.Cta=function(e){return i.a.createElement(h,Object.assign({},e))},d.Heading=function(e){return i.a.createElement("h2",{className:e.className||"h6"},e.children)},d.Info=function(e){return i.a.createElement("p",{className:e.className||"mb-3 w-50"},e.children)}},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={EmptyStates:{Dashboard:{ComingSoon:"/images/empty-states/generic/coming-soon.png"},Interactives:{StudentInsights:"/images/empty-states/interactives/student-insights.png",SelectQuestion:"/images/empty-states/interactives/select-question.png",NoResponses:"/images/empty-states/interactives/no-responses.png"},Shared:{LoginCount:"/images/empty-states/logins/login-count.png",ViewCount:"/images/empty-states/videos/view-count.png",TypeaheadResults:"/images/empty-states/generic/typeahead-results.png"}},Errors:{TypeaheadError:"/images/errors/typeahead-error.png"}}},function(e,t,n){e.exports={circleContainer:"_3uMQG",backgroundCircle:"_29byp",circleSuccess:"_1leSx",circleWarning:"_1yreR",circleDanger:"_13evQ",lgCircleContainer:"_2gBnl",pendingCircle:"NTTU7",centredPercentageText:"_1wF3E"}},function(e,t,n){"use strict";var r=n(877);n.o(r,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return r.InteractionTypeId}));var i=n(906);n.o(i,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return i.InteractionTypeId}));var o=n(983);n.o(o,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return o.InteractionTypeId}));var a=n(985);n.o(a,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return a.InteractionTypeId}));var s=n(998);n.o(s,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return s.InteractionTypeId}));var u=n(1001);n.o(u,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return u.InteractionTypeId}));n(1020);var c=n(1009);n.o(c,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return c.InteractionTypeId}));var l=n(1010);n.o(l,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return l.InteractionTypeId}));var f=n(1011);n.o(f,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return f.InteractionTypeId}));var h=n(857);n.o(h,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return h.InteractionTypeId}));var d=n(1012);n.o(d,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return d.InteractionTypeId}));var p=n(1013);n.o(p,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return p.InteractionTypeId})),n.o(h,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return h.InteractionTypeId}));var y=n(1014);n.o(y,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return y.InteractionTypeId}));var m=n(1015);n.o(m,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return m.InteractionTypeId}));var g=n(1016);n.o(g,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return g.InteractionTypeId}));var v=n(1017);n.o(v,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return v.InteractionTypeId}));var b=n(1018);n.o(b,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return b.InteractionTypeId}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),i=n(33),o=n(34);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t,n=a(Object(i.a)(o.a.AUDIENCE_FILTER_SELECTED_COUNT),2)[1];Object(r.useEffect)((function(){e.data?n(e.data.count):n(null)}),[null===(t=e.data)||void 0===t?void 0:t.count])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(1045),i=n(7),o=n(165),a=n(868),s=i.a.encloseNamespace("reportsShared.utils");function u(e,t){return t?Object(r.c)(function(e){var t=+"".concat(e.id).concat(Math.floor((new Date).getMinutes()/5));return{dictionaries:[r.b,r.a],separator:" ",length:2,style:"capital",seed:t}}(e)):o.a.getFullName(e)}function c(e){switch(e.toLowerCase()){case a.a.Learner:return s("student");case a.a.Staff:return s("staff");default:return e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),i=n(33),o=n(34);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t=a(Object(i.a)(o.a.HEADER_TITLE),2)[1];Object(r.useEffect)((function(){return t(e),function(){t(null)}}),[e])}},function(e,t,n){"use strict";function r(e){var t=[];return Object.keys(e).forEach((function(n){var r=e[n];r&&t.push("".concat(n,":").concat(Array.isArray(r)?r.join(","):r))})),t.join(":")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(0),i=n.n(r),o=n(11),a=n(41),s=n(91),u=n(866),c=n.n(u);function l(e){var t,n,r="nav-link pl-0 pt-0 pr-2 text-dark";return e.appLink.action===(null===(n=null===(t=s.a.getCurrentRoute())||void 0===t?void 0:t.appLink)||void 0===n?void 0:n.action)?"".concat(r," active font-weight-bold ").concat(c.a.active):r}function f(e){return i.a.createElement(o.Navbar,{className:"p-0 pb-2"},i.a.createElement(o.Nav,null,e.items.map((function(e,t){return i.a.createElement(o.Nav.Item,{key:t},i.a.createElement(a.a,{appLink:e.appLink,className:l(e)},e.label))}))))}},function(e,t,n){e.exports={active:"_3Qdep"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(46),i=n(45),o=n(864),a=n(873);function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e){var t=[];return e.classrooms&&t.push.apply(t,s(e.classrooms)),e.classroomGroups&&t.push.apply(t,s(e.classroomGroups)),{dateRange:{start:Object(a.a)(i.a.startOf(e.from,"day")),end:Object(a.a)(i.a.endOf(e.to,"day"))},userIds:e.users,classroomsAndGroups:t}}var l={interactiveMetadata:function(e,t,n,r){return{url:"{gateway}/v1/objects/".concat(e,"?query=video[thumbnail],clip[video[thumbnail]],thumbnail"),key:"interactive:metadata:".concat(e),success:t,error:n,always:r}},interactive:function(e,t,n,r){return{url:"/api/domain/v1/interactives/".concat(e),key:"interactive:".concat(e),success:t,error:n,always:r}},interactiveResultSet:function(e,t,n,i,a,s){var u="interactive:result:set:".concat(e,":").concat(t),l=Object(o.a)(n);return l&&(u+=":".concat(l)),{url:"/api/domain/v2/analytics/interactives/".concat(e,"/metadata/").concat(t),key:u,data:c(n),type:r.a.POST,normalize:!1,success:i,error:a,always:s}},userInteractiveResultSet:function(e,t,n,r,i,o,a){var s=Object.assign(Object.assign({},r),{users:[n]});return l.interactiveResultSet(e,t,s,i,o,a)},mark:function(e,t,n,i,o,a,s){return{url:"/api/domain/v1/analytics/answers/".concat(n),key:"mark:answer:".concat(n,":").concat(i.resultId),type:r.a.PUT,data:i,normalize:!1,invalidationKeys:"interactive:result:set:".concat(e,":").concat(t),success:o,error:a,always:s}}}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.Unknown="unknown",e.Staff="staff",e.Learner="learner"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={HIGH:.8,MODERATE:.6}},,function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(139))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(45);function i(e){var t=r.a.convertDateToUTC(e);return r.a.format(t,"YYYY-MM-DDTHH:mm:ss")}},function(e,t,n){e.exports={image:"_3T3Ux"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),i=n(33),o=n(34);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t=a(Object(i.a)(o.a.HEADER_ACTIONS),2)[1];Object(r.useEffect)((function(){return t(e),function(){t(null)}}),[!!e])}},,function(e,t,n){"use strict";var r=n(878);n.o(r,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return r.InteractionTypeId}));var i=n(880);n.o(i,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return i.InteractionTypeId}));var o=n(881);n.o(o,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return o.InteractionTypeId}));var a=n(882);n.o(a,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return a.InteractionTypeId}));var s=n(883);n.o(s,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return s.InteractionTypeId}));var u=n(884);n.o(u,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return u.InteractionTypeId}));var c=n(853);n.o(c,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return c.InteractionTypeId}));var l=n(885);n.o(l,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return l.InteractionTypeId}));var f=n(886);n.o(f,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return f.InteractionTypeId}));var h=n(887);n.o(h,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return h.InteractionTypeId}));var d=n(888);n.o(d,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return d.InteractionTypeId}));var p=n(889);n.o(p,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return p.InteractionTypeId}));var y=n(890);n.o(y,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return y.InteractionTypeId})),n.o(c,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return c.InteractionTypeId}));var m=n(891);n.o(m,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return m.InteractionTypeId}));var g=n(892);n.o(g,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return g.InteractionTypeId}));var v=n(893);n.o(v,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return v.InteractionTypeId}));var b=n(894);n.o(b,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return b.InteractionTypeId}));var _=n(895);n.o(_,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return _.InteractionTypeId}));var T=n(896);n.o(T,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return T.InteractionTypeId}));var w=n(897);n.o(w,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return w.InteractionTypeId}));var S=n(898);n.o(S,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return S.InteractionTypeId}));var C=n(899);n.o(C,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return C.InteractionTypeId}));var k=n(900);n.o(k,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return k.InteractionTypeId}));var E=n(901);n.o(E,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return E.InteractionTypeId}));var I=n(902);n.o(I,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return I.InteractionTypeId}));var O=n(903);n.o(O,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return O.InteractionTypeId}));var x=n(904);n.o(x,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return x.InteractionTypeId}));var P=n(905);n.o(P,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return P.InteractionTypeId}))},function(e,t,n){"use strict";var r=n(879);n.o(r,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return r.InteractionTypeId}))},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(907);n.o(r,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return r.InteractionTypeId}));var i=n(910);n.o(i,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return i.InteractionTypeId}));var o=n(916);n.o(o,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return o.InteractionTypeId}));var a=n(922);n.o(a,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return a.InteractionTypeId}));var s=n(923);n.o(s,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return s.InteractionTypeId}));var u=n(924);n.o(u,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return u.InteractionTypeId}));var c=n(925);n.o(c,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return c.InteractionTypeId}));var l=n(926);n.o(l,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return l.InteractionTypeId}));var f=n(927);n.o(f,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return f.InteractionTypeId}));var h=n(928);n.o(h,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return h.InteractionTypeId}));n(929);var d=n(930);n.o(d,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return d.InteractionTypeId}));var p=n(931);n.o(p,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return p.InteractionTypeId}));var y=n(932);n.o(y,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return y.InteractionTypeId}));var m=n(933);n.o(m,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return m.InteractionTypeId}));var g=n(854);n.o(g,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return g.InteractionTypeId}));var v=n(934);n.o(v,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return v.InteractionTypeId}));var b=n(935);n.o(b,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return b.InteractionTypeId}));var _=n(936);n.o(_,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return _.InteractionTypeId}));var T=n(937);n.o(T,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return T.InteractionTypeId}));var w=n(938);n.o(w,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return w.InteractionTypeId}));var S=n(939);n.o(S,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return S.InteractionTypeId}));var C=n(855);n.o(C,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return C.InteractionTypeId}));var k=n(940);n.o(k,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return k.InteractionTypeId})),n.o(C,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return C.InteractionTypeId}));var E=n(941);n.o(E,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return E.InteractionTypeId}));var I=n(942);n.o(I,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return I.InteractionTypeId}));var O=n(943);n.o(O,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return O.InteractionTypeId}));var x=n(944);n.o(x,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return x.InteractionTypeId}));var P=n(945);n.o(P,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return P.InteractionTypeId}));var A=n(856);n.o(A,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return A.InteractionTypeId}));n(946);var L=n(947);n.o(L,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return L.InteractionTypeId}));var R=n(948);n.o(R,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return R.InteractionTypeId}));var j=n(949);n.o(j,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return j.InteractionTypeId}));var D=n(950);n.o(D,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return D.InteractionTypeId}));var M=n(951);n.o(M,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return M.InteractionTypeId}));var N=n(952);n.o(N,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return N.InteractionTypeId}));var B=n(953);n.o(B,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return B.InteractionTypeId}));var U=n(954);n.o(U,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return U.InteractionTypeId}));var F=n(955);n.o(F,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return F.InteractionTypeId}));var V=n(956);n.o(V,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return V.InteractionTypeId}));var H=n(957);n.o(H,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return H.InteractionTypeId}));var W=n(958);n.o(W,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return W.InteractionTypeId}));var z=n(959);n.o(z,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return z.InteractionTypeId}));var q=n(960);n.o(q,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return q.InteractionTypeId}));var G=n(961);n.o(G,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return G.InteractionTypeId}));var Y=n(962);n.o(Y,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return Y.InteractionTypeId}));var X=n(963);n.o(X,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return X.InteractionTypeId}));var K=n(964);n.o(K,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return K.InteractionTypeId})),n.o(A,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return A.InteractionTypeId}));var $=n(965);n.o($,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return $.InteractionTypeId}));var Q=n(966);n.o(Q,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return Q.InteractionTypeId}));var Z=n(967);n.o(Z,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return Z.InteractionTypeId}));var J=n(968);n.o(J,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return J.InteractionTypeId})),n.o(g,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return g.InteractionTypeId}));var ee=n(969);n.o(ee,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return ee.InteractionTypeId}));var te=n(970);n.o(te,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return te.InteractionTypeId}));var ne=n(971);n.o(ne,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return ne.InteractionTypeId}));var re=n(972);n.o(re,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return re.InteractionTypeId}));var ie=n(973);n.o(ie,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return ie.InteractionTypeId}));var oe=n(974);n.o(oe,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return oe.InteractionTypeId}));var ae=n(975);n.o(ae,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return ae.InteractionTypeId}));var se=n(976);n.o(se,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return se.InteractionTypeId}));var ue=n(977);n.o(ue,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return ue.InteractionTypeId}));var ce=n(978);n.o(ce,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return ce.InteractionTypeId}));var le=n(979);n.o(le,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return le.InteractionTypeId}));var fe=n(980);n.o(fe,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return fe.InteractionTypeId}));var he=n(981);n.o(he,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return he.InteractionTypeId}));var de=n(982);n.o(de,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return de.InteractionTypeId}))},function(e,t,n){"use strict";var r=n(908);n.o(r,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return r.InteractionTypeId}));var i=n(909);n.o(i,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return i.InteractionTypeId}))},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(911);n.o(r,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return r.InteractionTypeId}));var i=n(912);n.o(i,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return i.InteractionTypeId}));var o=n(913);n.d(t,"InteractionTypeId",(function(){return o.a}));n(914),n(915)},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e[e.MultipleChoice=1]="MultipleChoice",e[e.ShortAnswer=2]="ShortAnswer",e[e.TrueOrFalse=3]="TrueOrFalse",e[e.Annotation=4]="Annotation",e[e.Image=5]="Image",e[e.MissingWord=6]="MissingWord"}(r||(r={}))},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(917);n.o(r,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return r.InteractionTypeId}));var i=n(918);n.o(i,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return i.InteractionTypeId}));var o=n(919);n.o(o,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return o.InteractionTypeId}));var a=n(920);n.o(a,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return a.InteractionTypeId}));var s=n(921);n.o(s,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return s.InteractionTypeId}))},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r;!function(e){e.Pink="colour:0",e.Orange="colour:1",e.Green="colour:2",e.Blue="colour:3",e.Purple="colour:4",e.Indigo="colour:5"}(r||(r={}))},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r;!function(e){e[e.Row=0]="Row",e[e.LargeRow=1]="LargeRow",e[e.Hero=2]="Hero",e[e.ResourcesTile=3]="ResourcesTile"}(r||(r={}))},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(984);n.o(r,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return r.InteractionTypeId}))},function(e,t){},function(e,t,n){"use strict";var r=n(986);n.o(r,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return r.InteractionTypeId}));var i=n(987);n.o(i,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return i.InteractionTypeId}));var o=n(988);n.o(o,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return o.InteractionTypeId}));var a=n(989);n.o(a,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return a.InteractionTypeId}));var s=n(990);n.o(s,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return s.InteractionTypeId}));var u=n(991);n.o(u,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return u.InteractionTypeId}));var c=n(992);n.o(c,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return c.InteractionTypeId}));var l=n(993);n.o(l,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return l.InteractionTypeId}));var f=n(994);n.o(f,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return f.InteractionTypeId}));var h=n(995);n.o(h,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return h.InteractionTypeId}));var d=n(996);n.o(d,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return d.InteractionTypeId}));n(997)},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict"},function(e,t,n){"use strict";var r=n(999);n.o(r,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return r.InteractionTypeId}));var i=n(1e3);n.o(i,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return i.InteractionTypeId}))},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(1002);n.o(r,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return r.InteractionTypeId}));var i=n(1003);n.o(i,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return i.InteractionTypeId}));var o=n(1004);n.o(o,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return o.InteractionTypeId}));var a=n(1005);n.o(a,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return a.InteractionTypeId}));var s=n(1006);n.o(s,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return s.InteractionTypeId}));var u=n(1007);n.o(u,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return u.InteractionTypeId}));var c=n(1008);n.o(c,"InteractionTypeId")&&n.d(t,"InteractionTypeId",(function(){return c.InteractionTypeId}))},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(7),a=n(15),s=n(17),u=n(33);function c(e){return i.a.createElement("div",Object.assign({},e,{role:"button",tabIndex:0,className:"".concat(e.className?e.className:""," cursor-pointer"),onKeyDown:e.onKeyDown?e.onKeyDown:function(t){return"Enter"===t.key&&e.onClick(t)},onClick:e.onClick,style:e.style?e.style:{}}),e.children)}function l(e){var t=e.disabled?"disabled":"",n=e.hideOutline?"outline-none":"",r=e.on?"on":"";return e.disabled&&!e.showStateWhenDisabled&&(r=""),i.a.createElement(c,{onClick:function(){e.disabled||e.onClick.apply(e,arguments)},className:"".concat("d-inline-block float-right align-top custom-toggle toggle-option"," ").concat(r," ").concat(t," ").concat(n)},i.a.createElement("span",{className:"handle"}))}var f=n(34);function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p=o.a.encloseNamespace("reportsShared.anonymiseAction");function y(){var e=h(Object(u.a)(f.a.ANONYMISE_USERS,!1),2),t=e[0],n=e[1];return i.a.createElement("div",{className:"d-flex align-items center justify-content-between",onClick:function(){return n(!t)}},i.a.createElement("span",{className:"mr-3"},p("hideNames")),i.a.createElement(l,{on:t,onClick:function(){}}))}var m=n(88),g=(n(1),n(1047),/&/g),v=/[\W]+/g,b=/\s+/g,_=function(e){if(e)return e.toLowerCase().replace(g,"and").replace(v," ").trim().replace(b,"-").substr(0,80)},T=n(78),w=function(e,t){var n=e.primaryUrl;if(n){var r="";switch(t.typeId){case T.a.Video:r="/videos/".concat(t.id,"/").concat(_(t.name));break;case T.a.Interactive:r="/interactive/".concat(t.id,"/preview");break;case T.a.Clip:r="/clips/".concat(t.id,"/").concat(_(t.name));break;case T.a.Series:r="/series/".concat(t.id,"/").concat(_(t.name));break;case T.a.Playlist:r="/playlists/".concat(t.id,"/").concat(_(t.name))}if(r)return m.a.safeUrlConcat(n,r)}};n.d(t,"a",(function(){return C}));var S=o.a.encloseNamespace("reportsShared.utils");function C(e,t){if(e&&t){var n=[],r=w(e,t);return r&&n.push({label:function(){return i.a.createElement("span",{className:"d-flex justify-content-between align-items-center"},i.a.createElement("span",{className:"mr-2"},S("seeVideo")),i.a.createElement(a.a,{svgName:s.b.NewWindow}))},href:r,openInNewTab:!0}),n.push({label:function(){return i.a.createElement(y,null)}}),n}}},function(e,t,n){"use strict"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(22),a=n(7),s=n(849),u=n(246),c=n(205),l=n(861),f=n(1029),h=n(1025),d=n(852),p=n(858),y=a.a.encloseNamespace("shared.viewCountPieChartEmptyState");function m(e){return i.a.createElement(d.a,{className:"flex-grow-1 justify-content-center"},i.a.createElement(d.a.Image,{src:p.a.EmptyStates.Shared.ViewCount,className:"w-75 pb-0"}),i.a.createElement(d.a.Heading,null,y("heading")),i.a.createElement(d.a.Info,{className:"w-100"},y(e.singular?"descriptionSingular":"descriptionMultiple")))}n.d(t,"a",(function(){return v}));var g=a.a.encloseNamespace("shared.viewCountPieChartCard");function v(e){var t,n,r,a,d=Object(u.a)(),p=o.a.useBasicFetch(s.a.views(d,e.objectId)),y=o.a.useBasicFetch((null===(t=p.data)||void 0===t?void 0:t.data.length)&&c.a.getById(p.data.data.map((function(e){return e.userId}))));Object(l.a)(p);var v=(null===(n=p.data)||void 0===n?void 0:n.data.length)?!!y.data:!!p.data;return i.a.createElement("div",{className:"bg-white rounded p-3 position-relative d-flex flex-column ".concat(null!==(r=e.className)&&void 0!==r?r:"")},v?i.a.createElement(f.a,{events:p.data.data,users:null!==(a=y.data)&&void 0!==a?a:[],objectId:e.objectId,yearGroupTitle:g("totalStudentPlays"),userTypeTitle:g("totalPlays"),seriesName:g("plays"),emptyStateComponent:i.a.createElement(m,{singular:!!e.objectId})}):i.a.createElement(h.a,null))}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(860),a=n(1023);function s(e){if(e)return(e=function(e){if(e)return e.replace(/<a.*?>/g,"").replace("</a>","")}(e=function(e){if(e)return e.replace(/<p>/g,"").replace(/<\/p>/g,"<br>")}(e=function(e,t){if(e&&t)return t.forEach((function(t){e=e.replace("<"+t+">","").replace("</"+t+">","")})),e}(e,["b","i","u","ul","li","old"])))).split("<br>")[0]||"Annotation"}function u(e){var t=a.a.getTypeInfo(e.interaction.typeId),n=t.name,r=t.bgClassName,u=t.Svg,c=e.questionNumber?"".concat(e.questionNumber,". "):"",l="interaction-type-icon ".concat(r);return e.smallIcon&&(l+=" sm"),(e.showQuestion||e.showTypeName)&&(l+=e.smallIcon?" mr-1":" mr-2"),e.iconClassName&&(l+=" ".concat(e.iconClassName)),i.a.createElement(i.a.Fragment,null,!!e.showIcon&&i.a.createElement("span",{className:l},i.a.createElement(u,null)),!!e.showTypeName&&i.a.createElement("span",{className:e.typeNameClassName},i.a.createElement("strong",null,c,n)),!!e.showQuestion&&i.a.createElement("span",{className:e.questionClassName},e.interaction.typeId===o.InteractionTypeId.Annotation?i.a.createElement("span",{dangerouslySetInnerHTML:{__html:s(e.interaction.data.annotation)}}):e.interaction.name))}n.d(t,"a",(function(){return u})),u.defaultProps={showIcon:!0,showQuestion:!0}},function(e,t,n){"use strict";var r=n(3),i=n(7),o=n(0),a=n.n(o);function s(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(1.000000, 1.000000)"},a.a.createElement("g",{transform:"translate(5.000000, 3.000000)"},a.a.createElement("path",{d:"M5.129,4.52970994e-14 C5.80434375,4.52970994e-14 6.35378125,0.5494375 6.35378125,1.22478125 L6.35378125,1.22478125 L6.35378125,4.12053125 C6.35378125,4.795875 5.80434375,5.3453125 5.129,5.3453125 L5.129,5.3453125 L5.01765625,5.3453125 L5.01765625,5.7625625 C5.14371875,5.7230625 5.2778125,5.70175 5.4166875,5.70175 C5.8579375,5.70175 6.24996875,5.9166875 6.4935,6.24740625 C6.6880625,6.13675 6.9129375,6.0735 7.15228125,6.0735 C7.61575,6.0735 8.024875,6.31059375 8.26471875,6.6699375 C8.450875,6.57140625 8.6629375,6.51559375 8.88784375,6.51559375 C9.6248125,6.51559375 10.2244688,7.11515625 10.2244688,7.85209375 L10.2244688,7.85209375 L10.2239688,11.0194063 C10.22375,12.719125 9.73003125,14.3683438 8.79625,15.7887188 C8.7095625,15.9205625 8.562375,15.9999688 8.4045625,15.9999688 L8.4045625,15.9999688 L3.1323125,15.9999688 C3.0124375,15.9999688 2.897125,15.9540625 2.8100625,15.8716563 C2.80745313,15.8691864 2.80274841,15.8647056 2.79608533,15.8582606 L2.73370254,15.7963915 C2.38498908,15.4434944 0.983540179,13.9211451 0.6698125,11.95725 L0.6698125,11.95725 L0.0538125,9.3209375 C-0.03209375,8.95328125 0.043625,8.5848125 0.261625,8.3100625 C0.46915625,8.04846875 0.78865625,7.89309375 1.14465625,7.8788125 C1.47575,7.8150625 1.81340625,7.8773125 2.10134375,8.0561875 C2.19071875,8.1116875 2.272125,8.17646875 2.34459375,8.24915625 L2.34459375,8.24915625 L2.34459375,5.34534375 L2.23325,5.34534375 C1.55790625,5.34534375 1.00846875,4.79590625 1.00846875,4.1205625 L1.00846875,4.1205625 L1.00846875,1.22478125 C1.00846875,0.5494375 1.55790625,4.52970994e-14 2.23325,4.52970994e-14 L2.23325,4.52970994e-14 Z M3.6810625,3.4381875 C3.46103125,3.4381875 3.282,3.61721875 3.282,3.83725 L3.282,3.83725 L3.282,11.2870938 C3.282,11.4215625 3.22428125,11.5495625 3.12346875,11.6385313 C3.02265625,11.7275 2.88853125,11.7689063 2.7550625,11.7522188 L2.7550625,11.7522188 L2.7175,11.7475313 C2.5228125,11.7231875 2.36390625,11.580125 2.31925,11.3890625 L2.31925,11.3890625 L1.78459375,9.10071875 C1.76034375,8.9969375 1.69715625,8.9088125 1.60659375,8.8525625 C1.51603125,8.7963125 1.407,8.78928125 1.30065625,8.79571875 C1.2585,8.79828125 1.23959375,8.8036875 1.194,8.80803125 C1.10340625,8.81665625 1.035625,8.84275 0.996,8.89271875 C0.956375,8.9426875 0.94596875,9.019 0.96665625,9.107625 L0.96665625,9.107625 L1.58653125,11.7605625 C1.5891875,11.7719063 1.59140625,11.7833438 1.59321875,11.794875 C1.83815625,13.3630313 2.95146875,14.6606563 3.32925,15.0625 L3.32925,15.0625 L8.1469375,15.0625 C8.893,13.8445 9.28625,12.4519688 9.2864375,11.0193125 L9.2864375,11.0193125 L9.2869375,7.85203125 C9.2869375,7.63209375 9.10790625,7.4530625 8.887875,7.4530625 C8.66784375,7.4530625 8.4888125,7.63209375 8.4888125,7.852125 L8.4888125,7.852125 L8.4888125,8.61359375 C8.4888125,8.87246875 8.2789375,9.08234375 8.0200625,9.08234375 C7.7611875,9.08234375 7.5513125,8.87246875 7.5513125,8.61359375 L7.5513125,8.61359375 L7.5513125,7.4100625 C7.5513125,7.19003125 7.3723125,7.011 7.15228125,7.011 C6.93225,7.011 6.75321875,7.19003125 6.75321875,7.4100625 L6.75321875,7.4100625 L6.75321875,8.28625 C6.75321875,8.545125 6.54334375,8.755 6.28446875,8.755 C6.02559375,8.755 5.81571875,8.545125 5.81571875,8.28625 L5.81571875,8.28625 L5.81571875,7.0383125 C5.81571875,6.81828125 5.6366875,6.63928125 5.41665625,6.63928125 C5.196625,6.63928125 5.017625,6.81828125 5.017625,7.0383125 L5.017625,7.0383125 L5.017625,8.232875 C5.017625,8.49175 4.80775,8.701625 4.548875,8.701625 C4.29,8.701625 4.080125,8.49175 4.080125,8.232875 L4.080125,8.232875 L4.080125,3.83725 C4.080125,3.61721875 3.90109375,3.4381875 3.6810625,3.4381875 Z M11.131,-1.59872116e-14 C11.8064063,-1.59872116e-14 12.3558125,0.5494375 12.3558125,1.22478125 L12.3558125,1.22478125 L12.3558125,4.1205625 C12.3558125,4.79590625 11.806375,5.34534375 11.131,5.34534375 L11.131,5.34534375 L8.23525,5.34534375 C7.55990625,5.34534375 7.01046875,4.79590625 7.01046875,4.1205625 L7.01046875,4.1205625 L7.01046875,1.22478125 C7.01046875,0.5494375 7.55990625,-1.59872116e-14 8.23525,-1.59872116e-14 L8.23525,-1.59872116e-14 Z M11.1310313,0.9375 L8.23528125,0.9375 C8.076875,0.9375 7.948,1.066375 7.948,1.22478125 L7.948,1.22478125 L7.948,4.1205625 C7.948,4.27896875 8.076875,4.40784375 8.23528125,4.40784375 L8.23528125,4.40784375 L11.1310313,4.40784375 C11.2894375,4.40784375 11.4183438,4.27896875 11.4183438,4.1205625 L11.4183438,4.1205625 L11.4183438,1.22478125 C11.4183438,1.066375 11.2894375,0.9375 11.1310313,0.9375 L11.1310313,0.9375 Z M5.129,0.9375 L2.23325,0.9375 C2.07484375,0.9375 1.94596875,1.066375 1.94596875,1.22478125 L1.94596875,1.22478125 L1.94596875,4.1205625 C1.94596875,4.27896875 2.07484375,4.40784375 2.2331875,4.40784375 L2.2331875,4.40784375 L2.34453125,4.40784375 L2.34453125,3.83721875 C2.34453125,3.10025 2.944125,2.50065625 3.68109375,2.50065625 C4.4180625,2.50065625 5.01765625,3.10025 5.01765625,3.83721875 L5.01765625,3.83721875 L5.01765625,4.40784375 L5.129,4.40784375 C5.28740625,4.40784375 5.41628125,4.27896875 5.41628125,4.1205625 L5.41628125,4.1205625 L5.41628125,1.22478125 C5.41628125,1.066375 5.28740625,0.9375 5.129,0.9375 L5.129,0.9375 Z"}))))}function u(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(1.000000, 1.000000)"},a.a.createElement("path",{d:"M16.5547082,3.66666667 C17.0307547,3.66666667 17.4166667,4.10561087 17.4166667,4.65176211 L17.4166667,17.3482379 C17.4166667,17.8922911 17.0325905,18.3333333 16.5547082,18.3333333 L5.44529184,18.3333333 C4.9692453,18.3333333 4.58333333,17.8943891 4.58333333,17.3482379 L4.58333333,4.65176211 C4.58333333,4.10770892 4.96740951,3.66666667 5.44529184,3.66666667 L16.5547082,3.66666667 Z M6.64149485,4.58362946 L5.39188119,4.58333333 L5.39188119,4.58333333 L5.39140886,4.63124366 C5.39133174,4.64701901 5.39125542,4.66659213 5.39117991,4.68981696 L5.39052172,4.99349248 C5.39045096,5.0373129 5.39038099,5.08434682 5.39031181,5.13444817 L5.38951907,5.87355262 C5.38945612,5.94585631 5.38939393,6.02064317 5.38933252,6.09776711 L5.38846857,7.41164942 C5.38841476,7.50849255 5.38836171,7.60694243 5.3883094,7.706853 L5.38744819,9.63144592 C5.38740476,9.7436262 5.38736207,9.85639075 5.3873201,9.96959351 L5.38636125,13.0260679 C5.38633211,13.1353268 5.38630366,13.2437094 5.38627591,13.3510694 L5.38541667,17.4092786 L5.38541667,17.4092786 C5.38541667,17.4094727 5.40139773,17.4096625 5.43215374,17.4098483 L5.66621602,17.410657 C5.70239956,17.4107438 5.74182455,17.4108296 5.78434021,17.4109144 L6.24635879,17.4116506 C6.30606164,17.4117294 6.36840286,17.4118072 6.43323171,17.411884 L7.07978636,17.412549 C7.15818403,17.4126199 7.23861702,17.4126899 7.32093458,17.4127589 L8.38955516,17.4135407 C8.48453695,17.413602 8.58080025,17.4136624 8.67819428,17.4137218 L10.2050643,17.4145426 C10.3099966,17.4145926 10.4153058,17.4146418 10.5208411,17.41469 L12.7186143,17.4155682 C12.8199282,17.4156037 12.9204129,17.4156383 13.0199177,17.4156721 L16.5962838,17.4166643 C16.6041235,17.4166659 16.6081188,17.4166667 16.6081188,17.4166667 L16.6083574,17.404543 L16.6083574,17.404543 L16.6092636,17.1281822 C16.609336,17.0909349 16.6094075,17.0503279 16.6094783,17.0065075 L16.6102897,16.3357629 C16.6103542,16.2685716 16.610418,16.1987511 16.6104809,16.1264474 L16.6111995,15.1489598 C16.6112564,15.059128 16.6113124,14.9673972 16.6113678,14.8739137 L16.6122825,13.0334559 C16.6123288,12.924197 16.6123745,12.8140617 16.6124193,12.703196 L16.6132553,10.3177583 C16.6132901,10.2038252 16.6133242,10.0901843 16.6133575,9.97698153 L16.6143069,6.10515513 C16.6143225,6.02803119 16.6143373,5.95324434 16.6143515,5.88094064 L16.6145833,4.59072136 L16.6145833,4.59072136 L16.6027483,4.59043343 L16.6027483,4.59043343 L16.5107818,4.58987601 C16.4881671,4.58978515 16.4620094,4.5896953 16.4324595,4.58960647 L16.0789915,4.58883422 C16.0304453,4.58875142 15.9789591,4.58866963 15.9246838,4.58858883 L15.1491499,4.58766678 C15.0749737,4.58759388 14.9986113,4.58752196 14.9202136,4.58745101 L14.1637515,4.58683864 C14.0744988,4.5867735 13.983663,4.58670932 13.891395,4.58664609 L12.4188002,4.58576887 C12.3159787,4.5857151 12.2124787,4.58566226 12.108451,4.58561036 L10.2115288,4.58477559 C10.1065966,4.58473469 10.0020412,4.58469469 9.89801354,4.5846556 L6.8573146,4.58368638 C6.78313834,4.58366655 6.71114817,4.58364758 6.64149485,4.58362946 Z M9.80280172,11.9166667 C10.0210177,11.9166667 10.1979167,12.1218695 10.1979167,12.375 C10.1979167,12.6281305 10.0210177,12.8333333 9.80280172,12.8333333 L9.80280172,12.8333333 L7.38469828,12.8333333 C7.16648232,12.8333333 6.98958333,12.6281305 6.98958333,12.375 C6.98958333,12.1218695 7.16648232,11.9166667 7.38469828,11.9166667 L7.38469828,11.9166667 Z M14.5678761,9.16666667 C14.8122845,9.16666667 15.0104167,9.37186949 15.0104167,9.625 C15.0104167,9.87813051 14.8122845,10.0833333 14.5678761,10.0833333 L14.5678761,10.0833333 L7.4321239,10.0833333 C7.18771549,10.0833333 6.98958333,9.87813051 6.98958333,9.625 C6.98958333,9.37186949 7.18771549,9.16666667 7.4321239,9.16666667 L7.4321239,9.16666667 Z M14.5678761,6.41666667 C14.8122845,6.41666667 15.0104167,6.62186949 15.0104167,6.875 C15.0104167,7.12813051 14.8122845,7.33333333 14.5678761,7.33333333 L14.5678761,7.33333333 L7.4321239,7.33333333 C7.18771549,7.33333333 6.98958333,7.12813051 6.98958333,6.875 C6.98958333,6.62186949 7.18771549,6.41666667 7.4321239,6.41666667 L7.4321239,6.41666667 Z"})))}function c(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(2.000000, 2.000000)"},a.a.createElement("g",{transform:"translate(3.500000, 2.000000)"},a.a.createElement("path",{d:"M10.78125,7.53125 C11.0285625,7.53125 11.2715937,7.59621875 11.4840312,7.71909375 C11.7963125,7.89971875 12.1875,7.6735625 12.1875,7.31334375 L12.1875,3.3125 C12.1875,3.053625 11.977625,2.84375 11.71875,2.84375 L8.38675,2.84375 C8.42015625,2.680125 8.4375,2.51184375 8.4375,2.34375 C8.4375,1.05140625 7.38609375,0 6.09375,0 C4.80140625,0 3.75,1.05140625 3.75,2.34375 C3.75,2.51184375 3.76734375,2.680125 3.80075,2.84375 L0.46875,2.84375 C0.209875,2.84375 0,3.053625 0,3.3125 L0,7.31334375 C0,7.674125 0.391625,7.899375 0.70346875,7.71909375 C0.91590625,7.59621875 1.1589375,7.53125 1.40625,7.53125 C2.18165625,7.53125 2.8125,8.16209375 2.8125,8.9375 C2.8125,9.71290625 2.18165625,10.34375 1.40625,10.34375 C1.1589375,10.34375 0.91590625,10.2787812 0.70346875,10.1559062 C0.3911875,9.9753125 0,10.2013437 0,10.5616563 L0,15.53125 C0,15.790125 0.209875,16 0.46875,16 L4.46959375,16 C4.8303125,16 5.05578125,15.608375 4.8753125,15.2965312 C4.7524375,15.0840937 4.6875,14.8410938 4.6875,14.59375 C4.6875,13.8183438 5.31834375,13.1875 6.09375,13.1875 C6.86915625,13.1875 7.5,13.8183438 7.5,14.59375 C7.5,14.8410938 7.4350625,15.0840937 7.31215625,15.2965312 C7.13146875,15.6087812 7.3576875,16 7.717875,16 L11.71875,16 C11.977625,16 12.1875,15.790125 12.1875,15.53125 L12.1875,10.5616563 C12.1875,10.2009375 11.7959375,9.97553125 11.4840312,10.1559063 C11.2715937,10.2787812 11.0285625,10.34375 10.78125,10.34375 C10.0058438,10.34375 9.375,9.71290625 9.375,8.9375 C9.375,8.16209375 10.0058438,7.53125 10.78125,7.53125 Z M10.78125,11.28125 C10.9393125,11.28125 11.096375,11.2652812 11.25,11.234 L11.25,15.0625 L8.39021875,15.0625 C8.42153125,14.9088438 8.4375,14.7518125 8.4375,14.59375 C8.4375,13.3014062 7.38609375,12.25 6.09375,12.25 C4.80140625,12.25 3.75,13.3014062 3.75,14.59375 C3.75,14.7518125 3.76596875,14.9088438 3.79728125,15.0625 L0.9375,15.0625 L0.9375,11.234 C1.091125,11.2652812 1.2481875,11.28125 1.40625,11.28125 C2.69859375,11.28125 3.75,10.2298438 3.75,8.9375 C3.75,7.64515625 2.69859375,6.59375 1.40625,6.59375 C1.2481875,6.59375 1.091125,6.60971875 0.9375,6.641 L0.9375,3.78125 L4.46959375,3.78125 C4.8303125,3.78125 5.05578125,3.389625 4.8753125,3.07778125 C4.75596875,2.87140625 4.6875,2.603875 4.6875,2.34375 C4.6875,1.56834375 5.31834375,0.9375 6.09375,0.9375 C6.86915625,0.9375 7.5,1.56834375 7.5,2.34375 C7.5,2.603875 7.43153125,2.87140625 7.31215625,3.07778125 C7.13146875,3.39003125 7.3576875,3.78125 7.717875,3.78125 L11.25,3.78125 L11.25,6.641 C11.096375,6.60971875 10.9393125,6.59375 10.78125,6.59375 C9.48890625,6.59375 8.4375,7.64515625 8.4375,8.9375 C8.4375,10.2298438 9.48890625,11.28125 10.78125,11.28125 Z"}))))}function l(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(1.000000, 1.000000)"},a.a.createElement("path",{d:"M15.125,3.66666667 C16.8969136,3.66666667 18.3333333,5.10308643 18.3333333,6.875 L18.3333333,15.125 C18.3333333,16.8969136 16.8969136,18.3333333 15.125,18.3333333 L6.875,18.3333333 C5.10308643,18.3333333 3.66666667,16.8969136 3.66666667,15.125 L3.66666667,6.875 C3.66666667,5.10308643 5.10308643,3.66666667 6.875,3.66666667 L15.125,3.66666667 Z M15.125,4.58333333 L6.875,4.58333333 C5.60934745,4.58333333 4.58333333,5.60934745 4.58333333,6.875 L4.58333333,15.125 C4.58333333,16.3906526 5.60934745,17.4166667 6.875,17.4166667 L15.125,17.4166667 C16.3906526,17.4166667 17.4166667,16.3906526 17.4166667,15.125 L17.4166667,6.875 C17.4166667,5.60934745 16.3906526,4.58333333 15.125,4.58333333 Z M7.33333333,13.2916667 C7.83959435,13.2916667 8.25,13.7020723 8.25,14.2083333 C8.25,14.7145944 7.83959435,15.125 7.33333333,15.125 C6.82707231,15.125 6.41666667,14.7145944 6.41666667,14.2083333 C6.41666667,13.7020723 6.82707231,13.2916667 7.33333333,13.2916667 Z M15.0349223,13.75 C15.2880528,13.75 15.4932556,13.9552028 15.4932556,14.2083333 C15.4932556,14.4614638 15.2880528,14.6666667 15.0349223,14.6666667 L9.625,14.6666667 C9.37186949,14.6666667 9.16666667,14.4614638 9.16666667,14.2083333 C9.16666667,13.9552028 9.37186949,13.75 9.625,13.75 L15.0349223,13.75 Z M7.33333333,10.0833333 C7.83959435,10.0833333 8.25,10.493739 8.25,11 C8.25,11.506261 7.83959435,11.9166667 7.33333333,11.9166667 C6.82707231,11.9166667 6.41666667,11.506261 6.41666667,11 C6.41666667,10.493739 6.82707231,10.0833333 7.33333333,10.0833333 Z M15.125,10.5416667 C15.3781305,10.5416667 15.5833333,10.7468695 15.5833333,11 C15.5833333,11.2531305 15.3781305,11.4583333 15.125,11.4583333 L9.625,11.4583333 C9.37186949,11.4583333 9.16666667,11.2531305 9.16666667,11 C9.16666667,10.7468695 9.37186949,10.5416667 9.625,10.5416667 L15.125,10.5416667 Z M7.33333333,6.875 C7.83959435,6.875 8.25,7.28540565 8.25,7.79166667 C8.25,8.29792769 7.83959435,8.70833333 7.33333333,8.70833333 C6.82707231,8.70833333 6.41666667,8.29792769 6.41666667,7.79166667 C6.41666667,7.28540565 6.82707231,6.875 7.33333333,6.875 Z M15.125,7.33333333 C15.3781305,7.33333333 15.5833333,7.53853616 15.5833333,7.79166667 C15.5833333,8.04479718 15.3781305,8.25 15.125,8.25 L9.625,8.25 C9.37186949,8.25 9.16666667,8.04479718 9.16666667,7.79166667 C9.16666667,7.53853616 9.37186949,7.33333333 9.625,7.33333333 L15.125,7.33333333 Z"})))}function f(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("path",{d:"M19,5 C19.5522847,5 20,5.44771525 20,6 L20,18 C20,18.5522847 19.5522847,19 19,19 L5,19 C4.44771525,19 4,18.5522847 4,18 L4,6 C4,5.44771525 4.44771525,5 5,5 L19,5 Z M19,6 L5,6 L5,18 L19,18 L19,6 Z M13.5270821,8.72788029 L17.419465,14.7278803 C17.5697525,14.9595444 17.5037838,15.2691774 17.2721197,15.419465 C17.0404556,15.5697525 16.7308226,15.5037838 16.580535,15.2721197 L13.0911139,9.89327406 L11.4091273,12.2874279 C11.2306031,12.5415408 10.866042,12.5731488 10.6464466,12.3535534 L10.0540971,11.7612039 L7.4,15.3 C7.23431458,15.5209139 6.9209139,15.5656854 6.7,15.4 C6.4790861,15.2343146 6.43431458,14.9209139 6.6,14.7 L9.6,10.7 C9.7825648,10.4565803 10.1383987,10.4312919 10.3535534,10.6464466 L10.9328729,11.2257661 L12.6984898,8.71257207 C12.9021272,8.42271292 13.3342903,8.43069712 13.5270821,8.72788029 Z M8,7.5 C8.82842712,7.5 9.5,8.17157288 9.5,9 C9.5,9.82842712 8.82842712,10.5 8,10.5 C7.17157288,10.5 6.5,9.82842712 6.5,9 C6.5,8.17157288 7.17157288,7.5 8,7.5 Z M8,8.5 C7.72385763,8.5 7.5,8.72385763 7.5,9 C7.5,9.27614237 7.72385763,9.5 8,9.5 C8.27614237,9.5 8.5,9.27614237 8.5,9 C8.5,8.72385763 8.27614237,8.5 8,8.5 Z"}))}function h(){return a.a.createElement("svg",{viewBox:"0 0 24 24"},a.a.createElement("g",{transform:"translate(1.000000, 1.000000)"},a.a.createElement("path",{d:"M15.0505278,14.68561 L15.4700891,14.1696106 C16.3000604,13.1488666 16.7599031,11.8782117 16.7599031,10.5341182 C16.7599031,7.34884269 14.1777271,4.76666667 10.9924516,4.76666667 C7.80717602,4.76666667 5.225,7.34884269 5.225,10.5341182 C5.225,13.7193938 7.80717602,16.3015698 10.9924516,16.3015698 C11.8841204,16.3015698 12.744766,16.0998293 13.5263257,15.7168631 L13.9796508,15.4947327 L15.7162646,16.2389957 L15.0505278,14.68561 Z M17.8106022,18.3333333 L14.0103444,16.7046514 C13.0994588,17.1509876 12.0752185,17.4015698 10.9924516,17.4015698 C7.1996628,17.4015698 4.125,14.326907 4.125,10.5341182 C4.125,6.74132946 7.1996628,3.66666667 10.9924516,3.66666667 C14.7852403,3.66666667 17.8599031,6.74132946 17.8599031,10.5341182 C17.8599031,12.175402 17.2841351,13.682208 16.3235621,14.8635731 L17.8106022,18.3333333 Z"})))}var d,p=n(860),y=n(25);function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return b}));var g=i.a.encloseNamespace("shared.interactionTypes"),v=(m(d={},p.InteractionTypeId.Annotation,(function(){return{name:g("annotationName"),bgClassName:"bg-pink",Svg:h,typeName:"annotation"}})),m(d,p.InteractionTypeId.Image,(function(){return{name:g("imageName"),bgClassName:"bg-orange",Svg:f,typeName:"image"}})),m(d,p.InteractionTypeId.MissingWord,(function(){return{name:g("missingWordName"),prompt:g("missingWordPrompt"),bgClassName:"bg-teal",Svg:c,typeName:"missing-word"}})),m(d,p.InteractionTypeId.MultipleChoice,(function(){return{name:g("multipleChoiceName"),prompt:g("multipleChoicePrompt"),bgClassName:"bg-blue",Svg:l,typeName:"multiple-choice"}})),m(d,p.InteractionTypeId.ShortAnswer,(function(){return{name:g("shortAnswerName"),prompt:g("shortAnswerPrompt"),bgClassName:"bg-green",Svg:u,typeName:"short-answer"}})),m(d,p.InteractionTypeId.TrueOrFalse,(function(){return{name:g("trueOrFalseName"),prompt:g("trueOrFalsePrompt"),bgClassName:"bg-purple",Svg:s,typeName:"true-or-false"}})),d),b={getTypeInfo:function(e){var t=v[e];if(t)return t();r.a.ErrorHelper.throw(new y.a("No type info defined for typeId: ".concat(e)))}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return c}));var r=n(45),i=n(873),o=n(864);function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){var n=Object(o.a)(t);return n?e+":".concat(n):e}function c(e){var t,n,o=Object(i.a)(r.a.startOf(e.from,"day")),s=Object(i.a)(r.a.endOf(e.to,"day"));return{userId:e.users,groupId:[].concat(a(null!==(t=e.classrooms)&&void 0!==t?t:[]),a(null!==(n=e.classroomGroups)&&void 0!==n?n:[])),start:o,end:s}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),i=n.n(r),o=n(1030),a=n.n(o);function s(){return i.a.createElement("div",{className:"d-flex align-items-start justify-content-between"},i.a.createElement("div",null,i.a.createElement("div",{className:"partial-loading-background mb-2 ".concat(a.a.partialHeading)}),i.a.createElement("div",{className:"partial-loading-background ".concat(a.a.partialCount)})),i.a.createElement("div",{className:"partial-loading-background rounded ".concat(a.a.partialSelector)}))}},,function(e,t){e.exports={toUnsigned:function(e){return e>>>0},toHexString:function(e){return("00"+e.toString(16)).slice(-2)}}},function(e,t,n){"use strict";var r=n(0),i=n(3),o=n(124),a=n(180),s=n(181),u=n(7),c=n(85);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(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)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m="shared.privateResourceError",g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(o,e);var t,n,r,i=d(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,u.a.getPhrase(m,"title"))}return t=o,(n=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return u.a.getPhrase(m,"heading")}},{key:"description",get:function(){return u.a.getPhrase(m,"description")}}])&&f(t.prototype,n),r&&f(t,r),o}(c.a);function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(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)}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var i=S(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}(o,e);var t,n,r,i=T(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,u.a.getPhrase("shared.regionLockedResourceError","title"))}return t=o,(n=[{key:"name",get:function(){return"RegionLockedResourceError"}},{key:"heading",get:function(){return u.a.getPhrase("shared.regionLockedResourceError","heading")}},{key:"description",get:function(){return u.a.getPhrase("shared.regionLockedResourceError","description")}}])&&b(t.prototype,n),r&&b(t,r),o}(c.a),k={notFound:a.a,forbidden:{rating:g,yearLevel:g,region:C,privacy:g},badRequest:s.a};function E(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign(Object.assign({},k),n);if(e){var a=+(null===(t=null==e?void 0:e.toString())||void 0===t?void 0:t.substr(0,1));a!==o.b.ClientError&&a!==o.b.ServerError||(e!==o.a.NotFound?e!==o.a.Forbidden?i.a.ErrorHelper.throw(new r.badRequest):i.a.ErrorHelper.throw(new r.forbidden.privacy):i.a.ErrorHelper.throw(new r.notFound))}}var I=n(255);n.d(t,"a",(function(){return x}));var O={notFound:I.a};function x(e){var t,n;t=e,n=O,Object(r.useEffect)((function(){E(null==t?void 0:t.statusCode,n)}),[null==t?void 0:t.statusCode,n])}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(1035),a=n.n(o),s=n(1062),u=n.n(s),c=n(11),l=n(7),f=n(1044),h=n(50),d=n(868),p=n(165),y=n(862),m=n(1046),g={title:{text:null},credits:{enabled:!1},chart:{backgroundColor:"transparent",spacing:[0,0,0,0]},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},showInLegend:!0}}},v=l.a.encloseNamespace("shared.userActivityPieChart");function b(e,t){return Object.assign(Object.assign({},g),{series:[{type:"pie",name:t,data:e}]})}var _=n(1030),T=n.n(_);function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return O}));var C=l.a.encloseNamespace("shared.userActivityPieChart"),k=["yearGroup","userType"],E={yearGroup:"yearGroups",userType:"userType"};function I(e){return i.a.createElement(c.Dropdown,{alignRight:!0},i.a.createElement(c.Dropdown.Toggle,{id:"group-by-dropdown",variant:"outline-dark",className:"no-caret"},C("yearGroup"===e.selectedOption?"yearGroups":"userType")),i.a.createElement(c.Dropdown.Menu,null,k.map((function(t,n){return e.selectedOption!==t&&i.a.createElement(c.Dropdown.Item,{key:n,onSelect:function(){return e.onSelect(t)}},C(E[t]))}))))}function O(e){var t=w(i.a.useState("yearGroup"),2),n=t[0],r=t[1];Object(f.a)();var o,s,c,l,g="yearGroup"===n?(o=e.events,s=e.users,c=h.a.toObject(s,"id"),l={},o.forEach((function(e){var t,n,r,i,o=c[e.userId];if(p.a.getUserTypeString(o)===d.a.Learner){var a=null!==(r=null===(n=null===(t=null==o?void 0:o._yearGroup)||void 0===t?void 0:t.value)||void 0===n?void 0:n.name)&&void 0!==r?r:v("unknown");a&&(l[a]=null!==(i=l[a])&&void 0!==i?i:0,l[a]++)}})),Object(m.a)(h.a.sortBy(Object.keys(l).map((function(e){return{name:e,y:l[e],type:"pie"}})),"name"))):function(e,t){var n=h.a.toObject(t,"id"),r={};return e.forEach((function(e){var t,i,o=n[e.userId],a=null!==(t=p.a.getUserTypeString(o))&&void 0!==t?t:v("unknown");r[a]=null!==(i=r[a])&&void 0!==i?i:0,r[a]++})),Object(m.a)(h.a.sortBy(Object.keys(r).map((function(e){return{name:Object(y.b)(e),y:r[e],type:"pie"}})),"name"))}(e.events,e.users);return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"d-flex align-items-start justify-content-between w-100"},i.a.createElement("div",null,i.a.createElement("h6",{className:"m-0"},"yearGroup"===n?e.yearGroupTitle:e.userTypeTitle),i.a.createElement("strong",{className:T.a.totalCount},function(e){return e.reduce((function(e,t){return e+t.y}),0)}(g))),i.a.createElement(I,{selectedOption:n,onSelect:r})),g.length?i.a.createElement(u.a,{highcharts:a.a,options:b(g,e.seriesName),containerProps:{className:"".concat(T.a.chartContainer," position-absolute w-100 h-75 flex-grow-1")}}):e.emptyStateComponent)}},function(e,t,n){e.exports={totalCount:"_3a-8G",chartContainer:"_1QY5r",partialHeading:"l-ees",partialSelector:"_1Jzj5",partialCount:"_2mo-l"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i=n.n(r),o=n(850);function a(e){return i.a.createElement(o.a,{layout:e.layout,className:e.className,percentage:0,customLabel:"--%"})}},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),i=n.n(r),o=n(22),a=n(7),s=n(246),u=n(849),c=n(850),l=n(1031),f=a.a.encloseNamespace("shared.engagementOverviewCard");function h(e){var t,n,r=Object(s.a)(),a=!r.users&&!r.classrooms&&!r.classroomGroups,h=o.a.useBasicFetch(!!e.objectId&&u.a.aggregateEngagement(e.objectId,r)),d=(null===(t=h.data)||void 0===t?void 0:t.engagementRate)>0?h.data.engagementRate:null;return i.a.createElement("div",{className:"d-flex flex-column rounded bg-white p-3 ".concat(null!==(n=e.className)&&void 0!==n?n:"")},i.a.createElement("h6",{className:"mb-2"},f("heading")),i.a.createElement("div",{className:"d-flex align-items-center flex-grow-1\n ".concat("vertical"===e.layout?" flex-column justify-content-center text-center":"")},!!h.data&&i.a.createElement(i.a.Fragment,null,i.a.createElement(c.a,{percentage:d,layout:c.b.LabelInside}),i.a.createElement("p",{className:"horizontal"===e.layout?"ml-2":""},"number"==typeof d?f(a?"descriptionEveryone":"descriptionSome",{percentage:Math.round(100*h.data.engagementRate)}):f("descriptionNoData"))),!h.data&&i.a.createElement(i.a.Fragment,null,i.a.createElement(l.a,{layout:c.b.LabelInside}),"vertical"===e.layout&&i.a.createElement("p",null," "))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(0),i=n.n(r),o=n(7),a=n(14),s=n(32),u=n(865),c=n(246),l=o.a.encloseNamespace("interactives.interactiveNav");function f(e){var t,n,r,o=Object(c.a)(),f=(t=e.interactiveMetadataId,n=o,r=[t],[{label:l("overview"),appLink:{application:a.a.INTERACTIVES,action:s.a.Interactives.OVERVIEW,args:r,params:n}},{label:l("results"),appLink:{application:a.a.INTERACTIVES,action:s.a.Interactives.RESULTS,args:r,params:n}},{label:l("questions"),appLink:{application:a.a.INTERACTIVES,action:s.a.Interactives.QUESTION_LIST,args:r,params:n}},{label:l("engagement"),appLink:{application:a.a.INTERACTIVES,action:s.a.Interactives.ENGAGEMENT,args:r,params:n}}]);return i.a.createElement(u.a,{items:f})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),i=n.n(r),o=n(1039),a=n.n(o);function s(e){var t,n;return i.a.createElement("div",{className:"bg-white rounded ".concat(a.a.table," ").concat(null!==(t=e.className)&&void 0!==t?t:"")},i.a.createElement("div",{className:"border-bottom ".concat(a.a.header," ").concat(null!==(n=e.headerClassName)&&void 0!==n?n:"")}),e.children)}},function(e,t,n){e.exports={table:"_3XPjZ",header:"_1hiMB"}},function(e,t,n){e.exports={left:"_789pr",right:"_1P8qt",button:"_24q_F",hoverText:"p-vNG",chevron:"_3M27X",gradientLeft:"_3fkiw",gradientRight:"_2RDDy",extendedClickableAreaRight:"_13dgy",extendedClickableAreaLeft:"_37LtK",videoTopPos:"_1XTRO",topPos:"_3_p_J"}},function(e,t,n){e.exports={sortIndicator:"_2fe85",scrollContainer:"_1CRya"}},function(e,t,n){"use strict";var r,i=n(0),o=n.n(i),a=n(1033),s=n(15),u=n(17),c=n(1040),l=n.n(c);!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(r||(r={}));var f=i.memo((function(e){var t,n,o=e.direction===r.Left,a=o?u.b.ChevronLeft:u.b.ChevronRight,c=(e.contents,t=o,n=l.a.topPos,n+=t?" "+l.a.left:" "+l.a.right);return e.hide?i.createElement(i.Fragment,null):i.createElement(i.Fragment,null,i.createElement("div",{role:"button",className:"".concat(c," ").concat(l.a.button," ").concat(e.className||""),onClick:e.onClick},e.hoverText&&i.createElement("span",{className:"pl-3 pr-2 ".concat(l.a.hoverText)},e.hoverText),i.createElement(s.a,{svgName:a,size:s.b.Medium,className:"svg-container d-inline-block ".concat(l.a.chevron)})),e.useGradientBackdrop&&i.createElement("div",{className:o?l.a.gradientLeft:l.a.gradientRight}),!e.hideExtendedClickableArea&&i.createElement("div",{role:"button",onClick:e.onClick,className:o?l.a.extendedClickableAreaLeft:l.a.extendedClickableAreaRight}))})),h=n(41),d=n(27);function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e){var t,n,r,i;return{canScrollLeft:(null===(t=e.current)||void 0===t?void 0:t.scrollLeft)>0,canScrollRight:(null===(n=e.current)||void 0===n?void 0:n.scrollLeft)<(null===(r=e.current)||void 0===r?void 0:r.scrollWidth)-(null===(i=e.current)||void 0===i?void 0:i.clientWidth)}}var g=n(1041),v=n.n(g);function b(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return S}));var T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function w(e){var t,n,r,i,c,l,f,d,p={columns:e.columns,data:e.data,disableSortBy:!e.enableSort,manualSortBy:e.manualSort};e.initialSelectedRowIds&&(p.initialState={selectedRowIds:(f=e.initialSelectedRowIds,d={},f.forEach((function(e){return d[e]=!0})),d)}),e.getRowId&&(p.getRowId=e.getRowId);var y=a.useTable.apply(void 0,[p].concat(b([a.useFlexLayout,a.useSortBy,a.useRowSelect]))),m=y.getTableProps,g=y.getTableBodyProps,_=y.headerGroups,T=y.rows,w=y.prepareRow,S=y.toggleAllRowsSelected,C=y.state.sortBy;return o.a.useEffect((function(){e.onSort&&e.onSort(C)}),[C]),o.a.createElement("div",Object.assign({},m(),{className:null!==(n=null===(t=e.theme)||void 0===t?void 0:t.table)&&void 0!==n?n:""}),o.a.createElement("div",{className:null!==(i=null===(r=e.theme)||void 0===r?void 0:r.header)&&void 0!==i?i:""},_.map((function(t){var n,r;return o.a.createElement("div",Object.assign({},t.getHeaderGroupProps(),{className:null!==(r=null===(n=e.theme)||void 0===n?void 0:n.headerRow)&&void 0!==r?r:""}),t.headers.map((function(t){var n,r,i,a;return o.a.createElement("div",Object.assign({},t.getHeaderProps(t.getSortByToggleProps()),{className:null!==(r=null===(n=e.theme)||void 0===n?void 0:n.headerCell)&&void 0!==r?r:""}),t.render("Header"),!!t.canSort&&o.a.createElement("span",{className:"".concat(v.a.sortIndicator,"\n ").concat(t.isSorted?"":"text-muted","\n ").concat(null!==(a=null===(i=e.theme)||void 0===i?void 0:i.sortIndicator)&&void 0!==a?a:"")},o.a.createElement(s.a,{svgName:t.isSortedDesc||!t.isSorted?u.b.ArrowRight:u.b.ArrowLeft,size:s.b.Small})))})))}))),o.a.createElement("div",Object.assign({},g(),{className:null!==(l=null===(c=e.theme)||void 0===c?void 0:c.body)&&void 0!==l?l:""}),T.map((function(t){var n,r,i,a;w(t);var s=null!==(r=null===(n=e.theme)||void 0===n?void 0:n.row)&&void 0!==r?r:"";t.isSelected&&(null===(i=e.theme)||void 0===i?void 0:i.selectedRow)&&(s+=" ".concat(null===(a=e.theme)||void 0===a?void 0:a.selectedRow)),e.onSelectRow&&(s+=" cursor-pointer");var u=!!e.getRowAppLink&&e.getRowAppLink(t);function c(){return t.cells.map((function(t){var n,r,i=null!==(r=null===(n=e.theme)||void 0===n?void 0:n.cell)&&void 0!==r?r:"";return e.onSelectCell&&(i+=" cursor-pointer"),o.a.createElement("div",Object.assign({},t.getCellProps(),{className:i,onClick:function(){e.onSelectCell&&e.onSelectCell(t)}}),t.render("Cell"))}))}return u?o.a.createElement(h.a,Object.assign({},t.getRowProps(),{className:s,appLink:u}),c()):o.a.createElement("div",Object.assign({},t.getRowProps(),{className:s,onClick:function(){e.onSelectRow&&(e.allowSelectMultipleRows||S(!1),e.onSelectRow(t),t.toggleRowSelected(!0))},onMouseOver:e.onRowMouseOver&&function(){return e.onRowMouseOver(t)},onMouseLeave:e.onRowMouseLeave&&function(){return e.onRowMouseLeave(t)}}),c())}))))}function S(e){var t=e.enableSlider,n=e.scrollIncrement,i=T(e,["enableSlider","scrollIncrement"]),a=function(){var e=o.a.useRef(),t=p(o.a.useState(m(e)),2),n=t[0],r=t[1];function i(){r(m(e))}return o.a.useEffect((function(){if(e.current){var t=d.a.throttle(i,200);return r(m(e)),e.current.addEventListener("scroll",t),function(){e.current.removeEventListener("scroll",t)}}}),[e.current]),{ref:e,scrollState:n,scroll:function(t){var n;null===(n=e.current)||void 0===n||n.scrollBy({left:t,top:0,behavior:"smooth"})}}}(),s=a.ref,u=a.scrollState,c=a.scroll;if(!t)return o.a.createElement(w,Object.assign({},i));function l(e){s.current&&c(n*("right"===e?1:-1))}return o.a.createElement("div",{className:"mx-n3 overflow-hidden-x"},o.a.createElement("div",{className:"px-3"},o.a.createElement("div",{className:"position-relative"},o.a.createElement(f,{direction:r.Left,onClick:function(){return l("left")},hide:!u.canScrollLeft}),o.a.createElement("div",{className:v.a.scrollContainer,ref:s},o.a.createElement(w,Object.assign({},i))),o.a.createElement(f,{direction:r.Right,onClick:function(){return l("right")},hide:!u.canScrollRight}))))}S.defaultProps={scrollIncrement:250}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(1158),a=n.n(o),s=n(7),u=n(29),c=r.createContext(""),l=r.memo((function(e){var t=e.phrase,n=e.namespace,i=e.options,o=r.useContext(c),a=n||o,u=s.a.getPhrase(a,t,i);return r.createElement("span",{dangerouslySetInnerHTML:{__html:u}})}),(function(e,t){return e.namespace===t.namespace&&e.phrase===t.phrase&&u.a.isEqual(e.options,t.options)})),f=n(1058),h=n(1159),d=n.n(h);function p(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"b",(function(){return _})),n.d(t,"a",(function(){return T}));var m=a.a.scale(["#daf07d","#08bd1a"]),g=[0,.01,.25,.5,.75,1];function v(e,t){return e?m(e/t).hex():"#f1f1f1"}function b(e,t){for(var n=[],r=0;r<e.length;r++){var i=r>0&&e[r-1],o=e[r],a=r<e.length-1&&e[r+1];o===i&&o===a||n.push("".concat(v(o,t)," ").concat(100/e.length*r,"%"))}return"linear-gradient(to right, ".concat(n.join(","),")")}function _(){var e=Math.max.apply(Math,g),t=100/g.length;return i.a.createElement("div",{className:"d-flex justify-content-between w-100"},i.a.createElement(l,{namespace:"shared.engagementHeatMap",phrase:"less"}),i.a.createElement("div",{className:"d-flex mx-1 flex-grow-1 ".concat(d.a.legend)},g.map((function(n,r){return i.a.createElement("div",{key:r,style:{width:"".concat(t,"%"),backgroundColor:v(n,e)}})}))),i.a.createElement(l,{namespace:"shared.engagementHeatMap",phrase:"more"}))}function T(e){var t,n,r=Object(f.a)(e.engagement),o=null!==(t=e.max)&&void 0!==t?t:Math.max.apply(Math,p(r));return i.a.createElement("div",{className:"border rounded ".concat(d.a.heatMap," ").concat(null!==(n=e.className)&&void 0!==n?n:""),style:{background:b(r,o)}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(33),i=n(34);function o(){Object(r.a)(i.a.LEFT_NAV_STATE)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=["#FF9300","#38A2E8","#7A76E8","#B679C7","#F7847B","#D9584F","#FFCD52","#5DC786","#40BCC3","#40C2BB"];function i(e){return e.map((function(e,t){return Object.assign(Object.assign({},e),{color:r[t%r.length]})}))}},,,,function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return a[e];var n,o=String(e);return(n=r[o.toLowerCase()])?n:(n=i[o.toLowerCase()])||(1===o.length?o.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var o;if(o=r[t.toLowerCase()])return o===n;if(o=i[t.toLowerCase()])return o===n}else if("number"==typeof t)return t===n;return!1}};var r=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};
2
- /*!
3
- * Programatically add the following
4
- */
5
- for(o=97;o<123;o++)r[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)r[o-48]=o;for(o=1;o<13;o++)r["f"+o]=o+111;for(o=0;o<10;o++)r["numpad "+o]=o+96;var a=t.names=t.title={};for(o in r)a[r[o]]=o;for(var s in i)r[s]=i[s]},function(e,t,n){(function(t){var r,i=void 0!==t?t:"undefined"!=typeof window?window:{},o=n(1081);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),e.exports=r}).call(this,n(139))},function(e,t,n){"use strict";
6
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=r(n(1087)),o=r(n(871));e.exports=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=i.buildAbsoluteURL(o.location&&o.location.href||"",e)),i.buildAbsoluteURL(e,t))}},function(e,t,n){"use strict";(function(t){var r,i=(r=n(871))&&"object"==typeof r&&"default"in r?r.default:r;e.exports=function(e){for(var n,r=(n=e,i.atob?i.atob(n):t.from(n,"base64").toString("binary")),o=new Uint8Array(r.length),a=0;a<r.length;a++)o[a]=r.charCodeAt(a);return o}}).call(this,n(1089).Buffer)},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){var r=e.prototype;if(Object.create){var i=Object.create(t.prototype);r.__proto__=i}if(!(r instanceof t)){function o(){}o.prototype=t.prototype,n(r,o=new o),e.prototype=r=o}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var i={},o=i.ELEMENT_NODE=1,a=i.ATTRIBUTE_NODE=2,s=i.TEXT_NODE=3,u=i.CDATA_SECTION_NODE=4,c=i.ENTITY_REFERENCE_NODE=5,l=i.ENTITY_NODE=6,f=i.PROCESSING_INSTRUCTION_NODE=7,h=i.COMMENT_NODE=8,d=i.DOCUMENT_NODE=9,p=i.DOCUMENT_TYPE_NODE=10,y=i.DOCUMENT_FRAGMENT_NODE=11,m=i.NOTATION_NODE=12,g={},v={},b=(g.INDEX_SIZE_ERR=(v[1]="Index size error",1),g.DOMSTRING_SIZE_ERR=(v[2]="DOMString size error",2),g.HIERARCHY_REQUEST_ERR=(v[3]="Hierarchy request error",3)),_=(g.WRONG_DOCUMENT_ERR=(v[4]="Wrong document",4),g.INVALID_CHARACTER_ERR=(v[5]="Invalid character",5),g.NO_DATA_ALLOWED_ERR=(v[6]="No data allowed",6),g.NO_MODIFICATION_ALLOWED_ERR=(v[7]="No modification allowed",7),g.NOT_FOUND_ERR=(v[8]="Not found",8)),T=(g.NOT_SUPPORTED_ERR=(v[9]="Not supported",9),g.INUSE_ATTRIBUTE_ERR=(v[10]="Attribute in use",10));g.INVALID_STATE_ERR=(v[11]="Invalid state",11),g.SYNTAX_ERR=(v[12]="Syntax error",12),g.INVALID_MODIFICATION_ERR=(v[13]="Invalid modification",13),g.NAMESPACE_ERR=(v[14]="Invalid namespace",14),g.INVALID_ACCESS_ERR=(v[15]="Invalid access",15);function w(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,v[e]),this.message=v[e],Error.captureStackTrace&&Error.captureStackTrace(this,w);return n.code=e,t&&(this.message=this.message+": "+t),n}function S(){}function C(e,t){this._node=e,this._refresh=t,k(this)}function k(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);te(e,"length",r.length),n(r,e),e._inc=t}}function E(){}function I(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function O(e,t,n,r){if(r?t[I(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&D(i,e,r),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function x(e,t,n){var r=I(t,n);if(!(r>=0))throw w(_,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var o=e.ownerDocument;o&&(D(o,e,n),n.ownerElement=null)}}function P(e){if(this._features={},e)for(var t in e)this._features=e[t]}function A(){}function L(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function R(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(R(e,t))return!0}while(e=e.nextSibling)}function j(){}function D(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function M(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function N(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,M(e.ownerDocument,e),t}function B(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===y){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do{i.parentNode=e}while(i!==o&&(i=i.nextSibling));return M(e.ownerDocument||e,e),t.nodeType==y&&(t.firstChild=t.lastChild=null),t}function U(){this._nsMap={}}function F(){}function V(){}function H(){}function W(){}function z(){}function q(){}function G(){}function Y(){}function X(){}function K(){}function $(){}function Q(){}function Z(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i&&null==(i=r.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return ee(this,n,e,t,a),n.join("")}function J(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var a=n[o];if(a.prefix==r)return a.namespace!=i}return!0}function ee(e,t,n,r,i){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case o:i||(i=[]);i.length;var l=e.attributes,m=l.length,g=e.firstChild,v=e.tagName;n="http://www.w3.org/1999/xhtml"===e.namespaceURI||n,t.push("<",v);for(var b=0;b<m;b++){"xmlns"==(_=l.item(b)).prefix?i.push({prefix:_.localName,namespace:_.value}):"xmlns"==_.nodeName&&i.push({prefix:"",namespace:_.value})}for(b=0;b<m;b++){var _;if(J(_=l.item(b),0,i)){var T=_.prefix||"",w=_.namespaceURI,S=T?" xmlns:"+T:" xmlns";t.push(S,'="',w,'"'),i.push({prefix:T,namespace:w})}ee(_,t,n,r,i)}if(J(e,0,i)){T=e.prefix||"",w=e.namespaceURI,S=T?" xmlns:"+T:" xmlns";t.push(S,'="',w,'"'),i.push({prefix:T,namespace:w})}if(g||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(v)){if(t.push(">"),n&&/^script$/i.test(v))for(;g;)g.data?t.push(g.data):ee(g,t,n,r,i),g=g.nextSibling;else for(;g;)ee(g,t,n,r,i),g=g.nextSibling;t.push("</",v,">")}else t.push("/>");return;case d:case y:for(g=e.firstChild;g;)ee(g,t,n,r,i),g=g.nextSibling;return;case a:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,L),'"');case s:return t.push(e.data.replace(/[<&]/g,L));case u:return t.push("<![CDATA[",e.data,"]]>");case h:return t.push("\x3c!--",e.data,"--\x3e");case p:var C=e.publicId,k=e.systemId;if(t.push("<!DOCTYPE ",e.name),C)t.push(' PUBLIC "',C),k&&"."!=k&&t.push('" "',k),t.push('">');else if(k&&"."!=k)t.push(' SYSTEM "',k,'">');else{var E=e.internalSubset;E&&t.push(" [",E,"]"),t.push(">")}return;case f:return t.push("<?",e.target," ",e.data,"?>");case c:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function te(e,t,n){e[t]=n}w.prototype=Error.prototype,n(g,w),S.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ee(this[r],n,e,t);return n.join("")}},C.prototype.item=function(e){return k(this),this[e]},r(C,S),E.prototype={length:0,item:S.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new w(T);var n=this.getNamedItem(e.nodeName);return O(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new w(T);return t=this.getNamedItemNS(e.namespaceURI,e.localName),O(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return x(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return x(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},P.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new j;if(r.implementation=this,r.childNodes=new S,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new q;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},A.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return B(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return N(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,n,r){var i=new n.constructor;for(var s in n){var u=n[s];"object"!=typeof u&&u!=i[s]&&(i[s]=u)}n.childNodes&&(i.childNodes=new S);switch(i.ownerDocument=t,i.nodeType){case o:var c=n.attributes,l=i.attributes=new E,f=c.length;l._ownerElement=i;for(var h=0;h<f;h++)i.setAttributeNode(e(t,c.item(h),!0));break;case a:r=!0}if(r)for(var d=n.firstChild;d;)i.appendChild(e(t,d,r)),d=d.nextSibling;return i}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==s&&e.nodeType==s?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(i,A),n(i,A.prototype),j.prototype={nodeName:"#document",nodeType:d,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==y){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==o&&(this.documentElement=e),B(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),N(this,e)},importNode:function(e,t){return function e(t,n,r){var i;switch(n.nodeType){case o:(i=n.cloneNode(!1)).ownerDocument=t;case y:break;case a:r=!0}i||(i=n.cloneNode(!1));if(i.ownerDocument=t,i.parentNode=null,r)for(var s=n.firstChild;s;)i.appendChild(e(t,s,r)),s=s.nextSibling;return i}(this,e,t)},getElementById:function(e){var t=null;return R(this.documentElement,(function(n){if(n.nodeType==o&&n.getAttribute("id")==e)return t=n,!0})),t},createElement:function(e){var t=new U;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new S,(t.attributes=new E)._ownerElement=t,t},createDocumentFragment:function(){var e=new K;return e.ownerDocument=this,e.childNodes=new S,e},createTextNode:function(e){var t=new H;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new W;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new z;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new $;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new F;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new X;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new U,r=t.split(":"),i=n.attributes=new E;return n.childNodes=new S,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new F,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(j,A),U.prototype={nodeType:o,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===y?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);r=e.lastChild}return r=e.lastChild,t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,M(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new C(this,(function(t){var n=[];return R(t,(function(r){r===t||r.nodeType!=o||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new C(this,(function(n){var r=[];return R(n,(function(i){i===n||i.nodeType!==o||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},j.prototype.getElementsByTagName=U.prototype.getElementsByTagName,j.prototype.getElementsByTagNameNS=U.prototype.getElementsByTagNameNS,r(U,A),F.prototype.nodeType=a,r(F,A),V.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(v[b])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(V,A),H.prototype={nodeName:"#text",nodeType:s,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(H,V),W.prototype={nodeName:"#comment",nodeType:h},r(W,V),z.prototype={nodeName:"#cdata-section",nodeType:u},r(z,V),q.prototype.nodeType=p,r(q,A),G.prototype.nodeType=m,r(G,A),Y.prototype.nodeType=l,r(Y,A),X.prototype.nodeType=c,r(X,A),K.prototype.nodeName="#document-fragment",K.prototype.nodeType=y,r(K,A),$.prototype.nodeType=f,r($,A),Q.prototype.serializeToString=function(e,t,n){return Z.call(e,t,n)},A.prototype.toString=Z;try{if(Object.defineProperty){Object.defineProperty(C.prototype,"length",{get:function(){return k(this),this.$$length}}),Object.defineProperty(A.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case o:case y:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case o:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),te=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.DOMImplementation=P,t.XMLSerializer=Q},function(e,t,n){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},function(e,t){var n,r,i,o,a,s,u;n=function(e){return 9e4*e},r=function(e,t){return e*t},i=function(e){return e/9e4},o=function(e,t){return e/t},a=function(e,t){return n(o(e,t))},s=function(e,t){return r(i(e),t)},u=function(e,t,n){return i(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:n,secondsToAudioTs:r,videoTsToSeconds:i,audioTsToSeconds:o,audioTsToVideoTs:a,videoTsToAudioTs:s,metadataTsToSeconds:u}},function(e,t){e.exports=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])}},function(e,t,n){"use strict";function r(e){return new Array(Math.ceil(e.videoDuration)).fill(null).map((function(t,n){return e.heatMap[n]||0}))}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports={playerContainer:"_1-TM0",playerPlaceholder:"_2Gd0W",heatMapContainer:"_2mepP",heatMap:"_3QIok",heatMapTimepointIndicator:"_3EouS",heatMapTimepointIndicatorVisible:"_1472A",partialLoadingContainer:"_1Z2fg"}},,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(46),i={createViewKey:function(e,t,n){var i={mediaId:e.toString(),mediaIdType:t};return n&&(i.shareContextId=n),{url:"/api/player/create-view-key",key:"view:key:".concat(e,":").concat(t),type:r.a.POST,data:i,expiryTime:1/0}}}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.Share="share",e.MasterObject="masterobject"}(r||(r={}))},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(139))},function(e,t,n){(function(t){var r,i=void 0!==t?t:"undefined"!=typeof window?window:{},o=n(1073);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),e.exports=r}).call(this,n(139))},function(e,t){},function(e,t,n){var r=n(520).default,i=n(69);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},function(e,t,n){"use strict";var r=n(871),i=n(61),o=n(1078);function a(e,t,n){var r=e;return o(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=i({},t,{uri:e}),r.callback=n,r}function s(e,t,n){return u(t=a(e,t,n))}function u(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=c.response?c.response:c.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(c),m)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(l),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,g)}function o(){if(!u){var t;clearTimeout(l),t=e.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var i=g,o=null;return 0!==t?(i={body:r(),statusCode:t,method:h,headers:{},url:f,rawRequest:c},c.getAllResponseHeaders&&(i.headers=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t}(c.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),n(o,i,i.body)}}var a,u,c=e.xhr||null;c||(c=e.cors||e.useXDR?new s.XDomainRequest:new s.XMLHttpRequest);var l,f=c.url=e.uri||e.url,h=c.method=e.method||"GET",d=e.body||e.data,p=c.headers=e.headers||{},y=!!e.sync,m=!1,g={body:void 0,headers:{},statusCode:0,method:h,url:f,rawRequest:c};if("json"in e&&!1!==e.json&&(m=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),d=JSON.stringify(!0===e.json?d:e.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(o,0)},c.onload=o,c.onerror=i,c.onprogress=function(){},c.onabort=function(){u=!0},c.ontimeout=i,c.open(h,f,!y,e.username,e.password),y||(c.withCredentials=!!e.withCredentials),!y&&e.timeout>0&&(l=setTimeout((function(){if(!u){u=!0,c.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),c.setRequestHeader)for(a in p)p.hasOwnProperty(a)&&c.setRequestHeader(a,p[a]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(c.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(c),c.send(d||null),c}e.exports=s,e.exports.default=s,s.XMLHttpRequest=r.XMLHttpRequest||function(){},s.XDomainRequest="withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){s["delete"===e?"del":e]=function(t,n,r){return(n=a(t,n,r)).method=e.toUpperCase(),u(n)}}))},function(e,t){e.exports=function(e){if(!e)return!1;var t=n.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString},function(e,t,n){var r=n(871),i=e.exports={WebVTT:n(1080),VTTCue:n(1082),VTTRegion:n(1083)};r.vttjs=i,r.WebVTT=i.WebVTT;var o=i.VTTCue,a=i.VTTRegion,s=r.VTTCue,u=r.VTTRegion;i.shim=function(){r.VTTCue=o,r.VTTRegion=a},i.restore=function(){r.VTTCue=s,r.VTTRegion=u},r.VTTCue||i.shim()},function(e,t,n){var r=n(1051),i=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function o(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function s(){this.values=i(null)}function u(e,t,n,r){var i=r?e.split(r):[e];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);if(2===a.length)t(a[0],a[1])}}function c(e,t,n){var r=e;function i(){var t=a(e);if(null===t)throw new o(o.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function c(){e=e.replace(/^\s+/,"")}if(c(),t.startTime=i(),c(),"--\x3e"!==e.substr(0,3))throw new o(o.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),c(),t.endTime=i(),c(),function(e,t){var r=new s;u(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var o=t.split(","),a=o[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","center","end"]);break;case"position":o=t.split(","),r.percent(e,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");try{t.line=r.get("line","auto")}catch(e){}t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(e){t.position=r.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}o.prototype=i(Error.prototype),o.prototype.constructor=o,o.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},s.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var l=r.createElement("textarea"),f={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},d={v:"title",lang:"lang"},p={rt:"ruby"};function y(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e,t){return!p[t.localName]||p[t.localName]===e.localName}function i(t,n){var r=f[t];if(!r)return null;var i=e.document.createElement(r),o=d[t];return o&&n&&(i[o]=n.trim()),i}for(var o,s,u=e.document.createElement("div"),c=u,y=[];null!==(o=n());)if("<"!==o[0])c.appendChild(e.document.createTextNode((s=o,l.innerHTML=s,s=l.textContent,l.textContent="",s)));else{if("/"===o[1]){y.length&&y[y.length-1]===o.substr(2).replace(">","")&&(y.pop(),c=c.parentNode);continue}var m,g=a(o.substr(1,o.length-2));if(g){m=e.document.createProcessingInstruction("timestamp",g),c.appendChild(m);continue}var v=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!v)continue;if(!(m=i(v[1],v[3])))continue;if(!r(c,m))continue;if(v[2]){var b=v[2].split(".");b.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(h.hasOwnProperty(n)){var r=t?"background-color":"color",i=h[n];m.style[r]=i}})),m.className=b.join(" ")}y.push(v[1]),c.appendChild(m),c=m}return u}var m=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function g(e){for(var t=0;t<m.length;t++){var n=m[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function v(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var o=n.match(/^.*(\n|\r)/);return o?(e.length=0,o[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var o=0;o<n.length;o++)if(g(n.charCodeAt(o)))return"rtl";return"ltr"}function b(){}function _(e,t,n){b.call(this),this.cue=t,this.cueDiv=y(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:v(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(t.positionAlign){case"start":i=t.position;break;case"center":i=t.position-t.size/2;break;case"end":i=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function T(e){var t,n,r,i;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var o=(o=e.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();e=e.div.getBoundingClientRect(),t=o?Math.max(o[0]&&o[0].height||0,e.height/o.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function w(e,t,n,r){var i=new T(t),o=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}(o),s=[];if(o.snapToLines){var u;switch(o.vertical){case"":s=["+y","-y"],u="height";break;case"rl":s=["+x","-x"],u="width";break;case"lr":s=["-x","+x"],u="width"}var c=i.lineHeight,l=c*Math.round(a),f=n[u]+c,h=s[0];Math.abs(l)>f&&(l=l<0?-1:1,l*=Math.ceil(f/c)*c),a<0&&(l+=""===o.vertical?n.height:n.width,s=s.reverse()),i.move(h,l)}else{var d=i.lineHeight/n.height*100;switch(o.lineAlign){case"center":a-=d/2;break;case"end":a-=d}switch(o.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],i=new T(t)}var p=function(e,t){for(var i,o=new T(e),a=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var u=e.intersectPercentage(n);a>u&&(i=new T(e),a=u),e=new T(o)}return i||o}(i,s);t.move(p.toCSSCompatValues(n))}function S(){}b.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},b.prototype.formatStyle=function(e,t){return 0===e?0:e+t},_.prototype=i(b.prototype),_.prototype.constructor=_,T.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},T.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},T.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},T.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},T.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},T.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},S.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},S.convertCueToDOMTree=function(e,t){return e&&t?y(e,t):null};S.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],o=T.getSimpleBoxPosition(r),a={font:Math.round(.05*o.height*100)/100+"px sans-serif"};!function(){for(var n,s,u=0;u<t.length;u++)s=t[u],n=new _(e,s,a),r.appendChild(n.div),w(0,n,o,i),s.displayState=n.div,i.push(T.getSimpleBoxPosition(n))}()}else for(var s=0;s<t.length;s++)r.appendChild(t[s].displayState)},S.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},S.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof o))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}function r(e){e.match(/X-TIMESTAMP-MAP/)?u(e,(function(e,n){switch(e){case"X-TIMESTAMP-MAP":!function(e){var n=new s;u(e,(function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",a(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}}),/=/):u(e,(function(e,n){switch(e){case"Region":!function(e){var n=new s;if(u(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var i=new s;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;n.set(e+"X",i.get("x")),n.set(e+"Y",i.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var r=new(t.vttjs.VTTRegion||t.window.VTTRegion);r.width=n.get("width",100),r.lines=n.get("lines",3),r.regionAnchorX=n.get("regionanchorX",0),r.regionAnchorY=n.get("regionanchorY",100),r.viewportAnchorX=n.get("viewportanchorX",0),r.viewportAnchorY=n.get("viewportanchorY",100),r.scroll=n.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:n.get("id"),region:r})}}(n)}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var l=(i=n()).match(/^WEBVTT([ \t].*)?$/);if(!l||!l[0])throw new o(o.Errors.BadSignature);t.state="HEADER"}for(var f=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(f?f=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(e){t.cue.align="middle"}if(t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":try{c(i,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var h=-1!==i.indexOf("--\x3e");if(!i||h&&(f=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":i||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new o(o.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}},e.exports=S},function(e,t){},function(e,t){var n={"":1,lr:1,rl:1},r={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function i(e){return"string"==typeof e&&(!!r[e.toLowerCase()]&&e.toLowerCase())}function o(e,t,r){this.hasBeenReset=!1;var o="",a=!1,s=e,u=t,c=r,l=null,f="",h=!0,d="auto",p="start",y="auto",m="auto",g=100,v="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return o},set:function(e){o=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a},set:function(e){a=!!e}},startTime:{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");s=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return c},set:function(e){c=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return f},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");f=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return d},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");d=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return p},set:function(e){var t=i(e);t?(p=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=i(e);t?(m=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return v},set:function(e){var t=i(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");v=t,this.hasBeenReset=!0}}}),this.displayState=void 0}o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=o},function(e,t){var n={"":!0,up:!0};function r(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,i=0,o=100,a=0,s=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");o=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return u},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):u=t}}})}},function(e,t,n){var r=n(504),i=n(1085);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(504);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r,i,o,a,s;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,i=/^([^\/?#]*)(.*)$/,o=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var o=s.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return n.alwaysNormalize?(o.path=s.normalizePath(o.path),s.buildURLFromParts(o)):t;var a=s.parseURL(e);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var u=i.exec(a.path);a.netLoc=u[1],a.path=u[2]}a.netLoc&&!a.path&&(a.path="/");var c={scheme:a.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(c.netLoc=a.netLoc,"/"!==o.path[0]))if(o.path){var l=a.path,f=l.substring(0,l.lastIndexOf("/")+1)+o.path;c.path=s.normalizePath(f)}else c.path=a.path,o.params||(c.params=a.params,o.query||(c.query=a.query));return null===c.path&&(c.path=n.alwaysNormalize?s.normalizePath(o.path):o.path),s.buildURLFromParts(c)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(o,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},function(e,t,n){"use strict";
7
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */var r=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),o=t.length,a=0;a<o;++a)t[a].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();e.exports=r},function(e,t,n){"use strict";(function(e){
8
- /*!
9
- * The buffer module from node.js, for the browser.
10
- *
11
- * @author Feross Aboukhadijeh <http://feross.org>
12
- * @license MIT
13
- */
14
- var r=n(1090),i=n(1091),o=n(1092);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|d(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|d(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return I(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){f=!1;break}if(f)return o}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function _(e,t,n,r){return H(F(t,e.length-n),e,n,r)}function T(e,t,n,r){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return T(e,t,n,r)}function S(e,t,n,r){return H(V(t),e,n,r)}function C(e,t,n,r){return H(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?E(this,0,e):y.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(r,i),l=e.slice(t,n),f=0;f<s;++f)if(c[f]!==l[f]){o=c[f],a=l[f];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return T(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function I(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function x(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=U(e[o]);return i}function P(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function A(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function j(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(e,t,n,r,o){return o||D(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,o){return o||D(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):j(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):j(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=u.isBuffer(e)?e:F(new u(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function V(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(139))},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(l(e,a,a+16383>s?s:a+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
15
- /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
16
- t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+d]=255&a,d+=p,a/=256,c-=8);e[n+d-p]|=128*y}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";
17
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(t,"__esModule",{value:!0});var r=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,i=/^application\/dash\+xml/i;t.simpleTypeFromSourceType=function(e){return r.test(e)?"hls":i.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function s(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function u(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new c,o=n.domBuilder||new i,s=n.errorHandler,u=n.locator,l=n.xmlns||{},f={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},o=e instanceof Function;function s(t){var i=e[t];!i&&o&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+a(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),r}(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(f.nbsp=" ",f.copy="©",l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,l,f):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new l).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;u(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var c=0;c<s;c++){e=r.getURI(c);var l=r.getValue(c),f=(n=r.getQName(c),i.createAttributeNS(e,n));this.locator&&o(r.getLocator(c),f),f.value=f.nodeValue=l,a.setAttributeNode(f)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&o(this.locator,n),u(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=s.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=s.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&o(this.locator,r),u(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&o(this.locator,i),u(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,a(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,a(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,a(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){i.prototype[e]=function(){return null}}));var c=n(1095).XMLReader,l=t.DOMImplementation=n(1054).DOMImplementation;t.XMLSerializer=n(1054).XMLSerializer,t.DOMParser=r},function(e,t){var n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+n.source+r.source+"*(?::"+n.source+r.source+"*)?$");function o(){}function a(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function s(e,t,n,r,i,o){for(var a,s=++t,u=0;;){var c=e.charAt(s);switch(c){case"=":if(1===u)a=e.slice(t,s),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(o.warning('attribute value must after "="'),a=e.slice(t,s)),t=s+1,!((s=e.indexOf(c,t))>0))throw new Error("attribute value no end '"+c+"' match");l=e.slice(t,s).replace(/&#?\w+;/g,i),n.add(a,l,t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');l=e.slice(t,s).replace(/&#?\w+;/g,i),n.add(a,l,t),o.warning('attribute "'+a+'" missed start quot('+c+")!!"),t=s+1,u=5}break;case"/":switch(u){case 0:n.setTagName(e.slice(t,s));case 5:case 6:case 7:u=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==u&&n.setTagName(e.slice(t,s)),s;case">":switch(u){case 0:n.setTagName(e.slice(t,s));case 5:case 6:case 7:break;case 4:case 1:"/"===(l=e.slice(t,s)).slice(-1)&&(n.closed=!0,l=l.slice(0,-1));case 2:2===u&&(l=a),4==u?(o.warning('attribute "'+l+'" missed quot(")!!'),n.add(a,l.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&l.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),n.add(l,l,t));break;case 3:throw new Error("attribute value missed!!")}return s;case"€":c=" ";default:if(c<=" ")switch(u){case 0:n.setTagName(e.slice(t,s)),u=6;break;case 1:a=e.slice(t,s),u=2;break;case 4:var l=e.slice(t,s).replace(/&#?\w+;/g,i);o.warning('attribute "'+l+'" missed quot(")!!'),n.add(a,l,t);case 5:u=6}else switch(u){case 2:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&a.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),n.add(a,a,t),t=s,u=1;break;case 5:o.warning('attribute space is required"'+a+'"!!');case 6:u=1,t=s;break;case 3:u=4,t=s;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}s++}}function u(e,t,n){for(var r=e.tagName,i=null,o=e.length;o--;){var a=e[o],s=a.qName,u=a.value;if((d=s.indexOf(":"))>0)var c=a.prefix=s.slice(0,d),l=s.slice(d+1),h="xmlns"===c&&l;else l=s,c=null,h="xmlns"===s&&"";a.localName=l,!1!==h&&(null==i&&(i={},f(n,n={})),n[h]=i[h]=u,a.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,u))}for(o=e.length;o--;){(c=(a=e[o]).prefix)&&("xml"===c&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==c&&(a.uri=n[c||""]))}var d;(d=r.indexOf(":"))>0?(c=e.prefix=r.slice(0,d),l=e.localName=r.slice(d+1)):(c=null,l=e.localName=r);var p=e.uri=n[c||""];if(t.startElement(p,l,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(p,l,r),i)for(c in i)t.endPrefixMapping(c)}function c(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("</"+n+">",t),a=e.substring(t+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}return t+1}function l(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf("</"+n+">"))<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function f(e,t){for(var n in e)t[n]=e[n]}function h(e,t,n,r){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(i=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var o=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=t,i.exec(e);for(;n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],u=a>3&&/^public$/i.test(o[2][0])&&o[3][0],c=a>4&&o[4][0],l=o[a-1];return n.startDTD(s,u&&u.replace(/^(['"])(.*?)\1$/,"$2"),c&&c.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),l.index+l[0].length}}return-1}function d(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function p(e){}function y(e,t){return e.__proto__=t,e}o.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),f(t,t={}),function(e,t,n,r,i){function o(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function f(t){if(t>w){var n=e.substring(w,t).replace(/&#?\w+;/g,o);b&&y(w),r.characters(n,0,t-w),w=t}}function y(t,n){for(;t>=g&&(n=v.exec(e));)m=n.index,g=m+n[0].length,b.lineNumber++;b.columnNumber=t-m+1}var m=0,g=0,v=/.*(?:\r\n?|\n)|.*$/g,b=r.locator,_=[{currentNSMap:t}],T={},w=0;for(;;){try{var S=e.indexOf("<",w);if(S<0){if(!e.substr(w).match(/^\s*$/)){var C=r.doc,k=C.createTextNode(e.substr(w));C.appendChild(k),r.currentElement=k}return}switch(S>w&&f(S),e.charAt(S+1)){case"/":var E=e.indexOf(">",S+3),I=e.substring(S+2,E),O=_.pop();E<0?(I=e.substring(S+2).replace(/[\s<].*/,""),i.error("end tag name: "+I+" is not complete:"+O.tagName),E=S+1+I.length):I.match(/\s</)&&(I=I.replace(/[\s<].*/,""),i.error("end tag name: "+I+" maybe not complete"),E=S+1+I.length);var x=O.localNSMap,P=O.tagName==I;if(P||O.tagName&&O.tagName.toLowerCase()==I.toLowerCase()){if(r.endElement(O.uri,O.localName,I),x)for(var A in x)r.endPrefixMapping(A);P||i.fatalError("end tag name: "+I+" is not match the current start tagName:"+O.tagName)}else _.push(O);E++;break;case"?":b&&y(S),E=d(e,S,r);break;case"!":b&&y(S),E=h(e,S,r,i);break;default:b&&y(S);var L=new p,R=_[_.length-1].currentNSMap,j=(E=s(e,S,L,R,o,i),L.length);if(!L.closed&&l(e,E,L.tagName,T)&&(L.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),b&&j){for(var D=a(b,{}),M=0;M<j;M++){var N=L[M];y(N.offset),N.locator=a(b,{})}r.locator=D,u(L,r,R)&&_.push(L),r.locator=b}else u(L,r,R)&&_.push(L);"http://www.w3.org/1999/xhtml"!==L.uri||L.closed?E++:E=c(e,E,L.tagName,o,r)}}catch(e){i.error("element parse error: "+e),E=-1}E>w?w=E:f(Math.max(S,w)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},p.prototype={setTagName:function(e){if(!i.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!i.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},y({},y.prototype)instanceof y||(y=function(e,t){function n(){}for(t in n.prototype=t,n=new n,e)n[t]=e[t];return n}),t.XMLReader=o},function(e,t){var n=Math.pow(2,32);e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=t.getUint32(i),r.firstOffset=t.getUint32(i+4),i+=8):(r.earliestPresentationTime=t.getUint32(i)*n+t.getUint32(i+4),r.firstOffset=t.getUint32(i+8)*n+t.getUint32(i+12),i+=16),i+=2;var o=t.getUint16(i);for(i+=2;o>0;i+=12,o--)r.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return r}},function(e,t,n){"use strict";
18
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e instanceof Uint8Array?e:new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0)},i=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,r(e));try{return decodeURIComponent(escape(t))}catch(e){}return t},o=function(e,t){void 0===t&&(t=0);var n=(e=r(e))[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?n+20:n+10},a=function e(t,n){return void 0===n&&(n=0),(t=r(t)).length-n<10||"ID3"!==i(t.subarray(n,n+3))?n:e(t,n+=o(t,n))},s={aac:function(e){var t=a(e);return e.length>=t+2&&255==(255&e[t])&&224==(224&e[t+1])&&16==(22&e[t+1])},mp3:function(e){var t=a(e);return e.length>=t+2&&255==(255&e[t])&&224==(224&e[t+1])&&2==(6&e[t+1])},webm:function(e){return e.length>=4&&26==(255&e[0])&&69==(255&e[1])&&223==(255&e[2])&&163==(255&e[3])},mp4:function(e){return e.length>=8&&/^(f|s)typ$/.test(i(e.subarray(4,8)))&&!/^ftyp3g$/.test(i(e.subarray(4,10)))},"3gp":function(e){return e.length>=10&&/^ftyp3g$/.test(i(e.subarray(4,10)))},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){return e.length>=4&&/^fLaC$/.test(i(e.subarray(0,4)))},ogg:function(e){return e.length>=4&&/^OggS$/.test(i(e.subarray(0,4)))}},u=Object.keys(s).filter((function(e){return"ts"!==e})).concat("ts");u.forEach((function(e){var t=s[e];s[e]=function(e){return t(r(e))}}));t.detectContainerForBytes=function(e){e=r(e);for(var t=0;t<u.length;t++){var n=u[t];if(s[n](e))return n}return""},t.getId3Offset=a,t.id3Size=o,t.isLikely=s,t.isLikelyFmp4MediaSegment=function(e){e=r(e);for(var t=0;t<e.length;){var n=(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0;if("moof"===i(e.subarray(t+4,t+8)))return!0;0===n||n+t>e.length?t=e.length:t+=n}return!1}},function(e,t,n){"use strict";
19
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e instanceof Uint8Array?e:new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0)};t.bytesToString=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,r(e));try{return decodeURIComponent(escape(t))}catch(e){}return t},t.concatTypedArrays=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.reduce((function(e,t){return e+=t&&(t.byteLength||t.length)||0}),0),o=new Uint8Array(i),a=0;return t.forEach((function(e){e=r(e),o.set(e,a),a+=e.byteLength})),o},t.isTypedArray=function(e){return ArrayBuffer.isView(e)},t.stringToBytes=function(e,t){void 0===t&&(t=!1);return"string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e?[]:(t||(e=unescape(encodeURIComponent(e))),e.split("").map((function(e){return 255&e.charCodeAt(0)})))},t.toUint8=r},function(e,t,n){"use strict";var r=n(1055),i=n(1100).handleRollover,o={};o.ts=n(1102),o.aac=n(1103);var a=n(1056).ONE_SECOND_IN_TS,s=function(e,t,n){for(var r,i,a,s,u=0,c=188,l=!1;c<=e.byteLength;)if(71!==e[u]||71!==e[c]&&c!==e.byteLength)u++,c++;else{switch(r=e.subarray(u,c),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)}if(l)break;u+=188,c+=188}for(u=(c=e.byteLength)-188,l=!1;u>=0;)if(71!==e[u]||71!==e[c]&&c!==e.byteLength)u--,c--;else{switch(r=e.subarray(u,c),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)}if(l)break;u-=188,c-=188}},u=function(e,t,n){for(var r,i,a,s,u,c,l,f=0,h=188,d=!1,p={data:[],size:0};h<e.byteLength;)if(71!==e[f]||71!==e[h])f++,h++;else{switch(r=e.subarray(f,h),o.ts.parseType(r,t.pid)){case"pes":if(i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!d&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),d=!0),!n.firstKeyFrame)){if(a&&0!==p.size){for(u=new Uint8Array(p.size),c=0;p.data.length;)l=p.data.shift(),u.set(l,c),c+=l.byteLength;if(o.ts.videoPacketContainsKeyFrame(u)){var y=o.ts.parsePesTime(u);y?(n.firstKeyFrame=y,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}p.size=0}p.data.push(r),p.size+=r.byteLength}}if(d&&n.firstKeyFrame)break;f+=188,h+=188}for(f=(h=e.byteLength)-188,d=!1;f>=0;)if(71!==e[f]||71!==e[h])f--,h--;else{switch(r=e.subarray(f,h),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),d=!0)}if(d)break;f-=188,h-=188}},c=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,r=0,i=188;i<e.byteLength;)if(71!==e[r]||71!==e[i])r++,i++;else{switch(n=e.subarray(r,i),o.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=o.ts.parsePat(n));break;case"pmt":t.table||(t.table=o.ts.parsePmt(n))}if(t.pid&&t.table)return;r+=188,i+=188}}(e,t),t.table){if(t.table.hasOwnProperty(i))switch(t.table[i]){case r.H264_STREAM_TYPE:n.video=[],u(e,t,n),0===n.video.length&&delete n.video;break;case r.ADTS_STREAM_TYPE:n.audio=[],s(e,t,n),0===n.audio.length&&delete n.audio}}return n};e.exports={inspect:function(e,t){var n;return(n=o.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,s=null,u=0,c=0;e.length-c>=3;){switch(o.aac.parseType(e,c)){case"timed-metadata":if(e.length-c<10){n=!0;break}if((u=o.aac.parseId3TagSize(e,c))>e.length){n=!0;break}null===s&&(t=e.subarray(c,c+u),s=o.aac.parseAacTimestamp(t)),c+=u;break;case"audio":if(e.length-c<7){n=!0;break}if((u=o.aac.parseAdtsSize(e,c))>e.length){n=!0;break}null===i&&(t=e.subarray(c,c+u),i=o.aac.parseSampleRate(t)),r++,c+=u;break;default:c++}if(n)return null}if(null===i||null===s)return null;var l=a/i;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*r*l,pts:s+1024*r*l}]}}(e):c(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;void 0===n&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=i(e.dts,n),e.pts=i(e.pts,n),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a}))}if(e.video&&e.video.length){var r=t;if(void 0===r&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=i(e.dts,r),e.pts=i(e.pts,r),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a})),e.firstKeyFrame){var o=e.firstKeyFrame;o.dts=i(o.dts,r),o.pts=i(o.pts,r),o.dtsTime=o.dts/a,o.ptsTime=o.dts/a}}}(n,t),n):null},parseAudioPes_:s}},function(e,t,n){"use strict";var r=n(1101),i=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},o=function(e){var t,n;o.prototype.init.call(this),this.type_=e||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===n&&(n=e.dts),e.dts=i(e.dts,n),e.pts=i(e.pts,n),t=e.dts,this.trigger("data",e))},this.flush=function(){n=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};o.prototype=new r,e.exports={TimestampRolloverStream:o,handleRollover:i}},function(e,t,n){"use strict";var r=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,o;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){e={}}}};r.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},r.prototype.push=function(e){this.trigger("data",e)},r.prototype.flush=function(e){this.trigger("done",e)},r.prototype.partialFlush=function(e){this.trigger("partialdone",e)},r.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},r.prototype.reset=function(e){this.trigger("reset",e)},e.exports=r},function(e,t,n){"use strict";var r=n(1055),i=function(e){var t=31&e[1];return t<<=8,t|=e[2]},o=function(e){return!!(64&e[1])},a=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},s=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}};e.exports={parseType:function(e,t){var n=i(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=o(e),n=4+a(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=o(e),r=4+a(e);if(n&&(r+=e[r]+1),1&e[r+5]){var i;i=3+((15&e[r+1])<<8|e[r+2])-4;for(var s=12+((15&e[r+10])<<8|e[r+11]);s<i;){var u=r+s;t[(31&e[u+1])<<8|e[u+2]]=e[u],s+=5+((15&e[u+3])<<8|e[u+4])}return t}},parsePayloadUnitStartIndicator:o,parsePesType:function(e,t){switch(t[i(e)]){case r.H264_STREAM_TYPE:return"video";case r.ADTS_STREAM_TYPE:return"audio";case r.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!o(e))return null;var t=4+a(e);if(t>=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+a(e),n=e.subarray(t),r=0,i=0,o=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),o}}},function(e,t,n){"use strict";var r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},o=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=i(e,t),o(e,t))},a=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]};e.exports={isLikelyAacData:function(e){var t=o(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:i,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return r[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=a(e.subarray(10,14)));do{if((n=a(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(r,0,i))){var o=r.subarray(i+1),s=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return s*=4,s+=3&o[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}}},function(e,t,n){"use strict";var r,i,o,a,s,u,c=n(1027).toUnsigned,l=n(1027).toHexString,f=n(1105),h=n(1057),d=n(1106),p=n(1107),y=n(1109);r=function(e){return f(e,["moov","trak"]).reduce((function(e,t){var n,r,i,o,a;return(n=f(t,["tkhd"])[0])?(r=n[0],o=c(n[i=0===r?12:20]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3]),(a=f(t,["mdia","mdhd"])[0])?(i=0===(r=a[0])?12:20,e[o]=c(a[i]<<24|a[i+1]<<16|a[i+2]<<8|a[i+3]),e):null):null}),{})},i=function(e,t){var n,r,i;return n=f(t,["moof","traf"]),r=[].concat.apply([],n.map((function(t){return f(t,["tfhd"]).map((function(n){var r,i,o;return r=c(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=e[r]||9e4,(o="number"!=typeof(o=f(t,["tfdt"]).map((function(e){var t,n;return t=e[0],n=c(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=c(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n}))[0])||isNaN(o)?1/0:o)/i}))}))),i=Math.min.apply(null,r),isFinite(i)?i:0},o=function(e,t){var n,r=f(t,["moof","traf"]),i=0,o=0;if(r&&r.length){var a=f(r[0],["tfhd"])[0],s=f(r[0],["trun"])[0],u=f(r[0],["tfdt"])[0];if(a)n=d(a).trackId;if(u)i=y(u).baseMediaDecodeTime;if(s){var c=p(s);c.samples&&c.samples.length&&(o=c.samples[0].compositionTimeOffset||0)}}return(i+o)/(e[n]||9e4)},a=function(e){var t=f(e,["moov","trak"]),n=[];return t.forEach((function(e){var t=f(e,["mdia","hdlr"]),r=f(e,["tkhd"]);t.forEach((function(e,t){var i,o,a=h(e.subarray(8,12)),s=r[t];"vide"===a&&(o=0===(i=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),n.push(o))}))})),n},u=function(e){var t=0===e[0]?12:20;return c(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},s=function(e){var t=f(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,r,i={},o=f(e,["tkhd"])[0];o&&(r=(t=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0),i.id=0===r?t.getUint32(12):t.getUint32(20));var a=f(e,["mdia","hdlr"])[0];if(a){var s=h(a.subarray(8,12));i.type="vide"===s?"video":"soun"===s?"audio":s}var c=f(e,["mdia","minf","stbl","stsd"])[0];if(c){var d=c.subarray(8);i.codec=h(d.subarray(4,8));var p,y=f(d,[i.codec])[0];y&&(/^[a-z]vc[1-9]$/i.test(i.codec)?(p=y.subarray(78),"avcC"===h(p.subarray(4,8))&&p.length>11?(i.codec+=".",i.codec+=l(p[9]),i.codec+=l(p[10]),i.codec+=l(p[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)?(p=y.subarray(28),"esds"===h(p.subarray(4,8))&&p.length>20&&0!==p[19]?(i.codec+="."+l(p[19]),i.codec+="."+l(p[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase())}var m=f(e,["mdia","mdhd"])[0];m&&(i.timescale=u(m)),n.push(i)})),n},e.exports={findBox:f,parseType:h,timescale:r,startTime:i,compositionStartTime:o,videoTrackIds:a,tracks:s,getTimescaleFromMediaHeader:u}},function(e,t,n){var r=n(1027).toUnsigned,i=n(1057),o=function(e,t){var n,a,s,u,c,l=[];if(!t.length)return null;for(n=0;n<e.byteLength;)a=r(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),s=i(e.subarray(n+4,n+8)),u=a>1?n+a:e.byteLength,s===t[0]&&(1===t.length?l.push(e.subarray(n+8,u)):(c=o(e.subarray(n+8,u),t.slice(1))).length&&(l=l.concat(c))),n=u;return l};e.exports=o},function(e,t){e.exports=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],c=65536&r.flags[0],l=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),o&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(r.defaultSampleDuration=n.getUint32(t),t+=4),s&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),c&&(r.durationIsEmpty=!0),!i&&l&&(r.baseDataOffsetIsMoof=!0),r}},function(e,t,n){var r=n(1108);e.exports=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},i=new DataView(e.buffer,e.byteOffset,e.byteLength),o=1&n.flags[2],a=4&n.flags[2],s=1&n.flags[1],u=2&n.flags[1],c=4&n.flags[1],l=8&n.flags[1],f=i.getUint32(4),h=8;for(o&&(n.dataOffset=i.getInt32(h),h+=4),a&&f&&(t={flags:r(e.subarray(h,h+4))},h+=4,s&&(t.duration=i.getUint32(h),h+=4),u&&(t.size=i.getUint32(h),h+=4),l&&(1===n.version?t.compositionTimeOffset=i.getInt32(h):t.compositionTimeOffset=i.getUint32(h),h+=4),n.samples.push(t),f--);f--;)t={},s&&(t.duration=i.getUint32(h),h+=4),u&&(t.size=i.getUint32(h),h+=4),c&&(t.flags=r(e.subarray(h,h+4)),h+=4),l&&(1===n.version?t.compositionTimeOffset=i.getInt32(h):t.compositionTimeOffset=i.getUint32(h),h+=4),n.samples.push(t);return n}},function(e,t){e.exports=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}}},function(e,t,n){var r=n(1027).toUnsigned;e.exports=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:r(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=r(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t}},function(e,t,n){"use strict";
20
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(871))&&"object"==typeof r&&"default"in r?r.default:r,o={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},a=["video","audio","text"],s=["Video","Audio","Text"],u=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})):e},c=function(e){return e.map(u)},l=function(e){void 0===e&&(e="");var t=e.split(","),n={},r=[];return t.forEach((function(e){var t;e=e.trim(),a.forEach((function(r){var i=o[r].exec(e.toLowerCase());if(i&&!(i.length<=1)){t=r;var a=e.substring(0,i[1].length),s=e.replace(a,"");n[r]={type:a,details:s}}})),t||r.push(e)})),r.length&&(n.unknown=r),n},f=function(e){return void 0===e&&(e=""),o.audio.test(e.trim().toLowerCase())},h=function(e){return void 0===e&&(e=""),o.text.test(e.trim().toLowerCase())},d=function(e){if(e&&"string"==typeof e){var t=e.toLowerCase().split(",").map((function(e){return u(e.trim())})),n="video";1===t.length&&f(t[0])?n="audio":1===t.length&&h(t[0])&&(n="application");var r="mp4";return t.every((function(e){return o.mp4.test(e)}))?r="mp4":t.every((function(e){return o.webm.test(e)}))?r="webm":t.every((function(e){return o.ogg.test(e)}))&&(r="ogg"),n+"/"+r+';codecs="'+e+'"'}};t.DEFAULT_AUDIO_CODEC="mp4a.40.2",t.DEFAULT_VIDEO_CODEC="avc1.4d400d",t.browserSupportsCodec=function(e){return void 0===e&&(e=""),i.MediaSource&&i.MediaSource.isTypeSupported&&i.MediaSource.isTypeSupported(d(e))||!1},t.codecsFromDefault=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var r in n){var i=n[r];if(i.default&&i.playlists)return l(i.playlists[0].attributes.CODECS)}return null},t.getMimeForCodec=d,t.isAudioCodec=f,t.isTextCodec=h,t.isVideoCodec=function(e){return void 0===e&&(e=""),o.video.test(e.trim().toLowerCase())},t.mapLegacyAvcCodecs=function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e){return c([e])[0]}))},t.muxerSupportsCodec=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<s.length;t++){if(o["muxer"+s[t]].test(e))return!0}return!1}))},t.parseCodecs=l,t.translateLegacyCodec=u,t.translateLegacyCodecs=c},function(e){e.exports=JSON.parse('{"a":"0.0.13"}')},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){var n=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=n},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,c=s||u||Function("return this")(),l=Object.prototype.toString,f=Math.max,h=Math.min,d=function(){return c.Date.now()};function p(e,t,n){var r,i,o,a,s,u,c=0,l=!1,p=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function b(e){return c=e,s=setTimeout(T,t),l?v(e):a}function _(e){var n=e-u;return void 0===u||n>=t||n<0||p&&e-c>=o}function T(){var e=d();if(_(e))return w(e);s=setTimeout(T,function(e){var n=t-(e-u);return p?h(n,o-(e-c)):n}(e))}function w(e){return s=void 0,g&&r?v(e):(r=i=void 0,a)}function S(){var e=d(),n=_(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return b(u);if(p)return s=setTimeout(T,t),v(u)}return void 0===s&&(s=setTimeout(T,t)),a}return t=m(t)||0,y(n)&&(l=!!n.leading,o=(p="maxWait"in n)?f(m(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g),S.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},S.flush=function(){return void 0===s?a:w(d())},S}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return y(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),p(e,t,{leading:r,maxWait:t,trailing:i})}}).call(this,n(139))},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,c=s||u||Function("return this")(),l=Object.prototype.toString,f=Math.max,h=Math.min,d=function(){return c.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,u,c=0,l=!1,m=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function b(e){return c=e,s=setTimeout(T,t),l?v(e):a}function _(e){var n=e-u;return void 0===u||n>=t||n<0||m&&e-c>=o}function T(){var e=d();if(_(e))return w(e);s=setTimeout(T,function(e){var n=t-(e-u);return m?h(n,o-(e-c)):n}(e))}function w(e){return s=void 0,g&&r?v(e):(r=i=void 0,a)}function S(){var e=d(),n=_(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return b(u);if(m)return s=setTimeout(T,t),v(u)}return void 0===s&&(s=setTimeout(T,t)),a}return t=y(t)||0,p(n)&&(l=!!n.leading,o=(m="maxWait"in n)?f(y(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g),S.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},S.flush=function(){return void 0===s?a:w(d())},S}}).call(this,n(139))},function(e,t,n){(function(t){var n=/^\[object .+?Constructor\]$/,r="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();var a,s=Array.prototype,u=Function.prototype,c=Object.prototype,l=o["__core-js_shared__"],f=(a=/[^.]+$/.exec(l&&l.keys&&l.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"",h=u.toString,d=c.hasOwnProperty,p=c.toString,y=RegExp("^"+h.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=s.splice,g=k(o,"Map"),v=k(Object,"create");function b(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function S(e){return!(!I(e)||(t=e,f&&f in t))&&(function(e){var t=I(e)?p.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?y:n).test(function(e){if(null!=e){try{return h.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function C(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function k(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return S(n)?n:void 0}function E(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(E.Cache||T),n}function I(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}b.prototype.clear=function(){this.__data__=v?v(null):{}},b.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},b.prototype.get=function(e){var t=this.__data__;if(v){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return d.call(t,e)?t[e]:void 0},b.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:d.call(t,e)},b.prototype.set=function(e,t){return this.__data__[e]=v&&void 0===t?"__lodash_hash_undefined__":t,this},_.prototype.clear=function(){this.__data__=[]},_.prototype.delete=function(e){var t=this.__data__,n=w(t,e);return!(n<0)&&(n==t.length-1?t.pop():m.call(t,n,1),!0)},_.prototype.get=function(e){var t=this.__data__,n=w(t,e);return n<0?void 0:t[n][1]},_.prototype.has=function(e){return w(this.__data__,e)>-1},_.prototype.set=function(e,t){var n=this.__data__,r=w(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new b,map:new(g||_),string:new b}},T.prototype.delete=function(e){return C(this,e).delete(e)},T.prototype.get=function(e){return C(this,e).get(e)},T.prototype.has=function(e){return C(this,e).has(e)},T.prototype.set=function(e,t){return C(this,e).set(e,t),this},E.Cache=T,e.exports=E}).call(this,n(139))},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,u=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&u()}function s(){o(a)}function u(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=e}return u}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},l=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},f=g(0,0,0,0);function h(e){return parseFloat(e)||0}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+h(e["border-"+n+"-width"])}),0)}function p(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var r=l(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=h(r.width),u=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=d(r,"left","right")+o),Math.round(u+a)!==n&&(u-=d(r,"top","bottom")+a)),!function(e){return e===l(e).document.documentElement}(e)){var c=Math.round(s+o)-t,p=Math.round(u+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(p)&&(u-=p)}return g(i.left,i.top,s,u)}var y="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof l(e).SVGGraphicsElement}:function(e){return e instanceof l(e).SVGElement&&"function"==typeof e.getBBox};function m(e){return r?y(e)?function(e){var t=e.getBBox();return g(0,0,t.width,t.height)}(e):p(e):f}function g(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=g(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=m(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),b=function(e,t){var n,r,i,o,a,s,u,l=(r=(n=t).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),c(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);c(this,{target:e,contentRect:l})},_=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof l(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof l(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new b(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),T="undefined"!=typeof WeakMap?new WeakMap:new n,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new _(t,n,this);T.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){w.prototype[e]=function(){var t;return(t=T.get(this))[e].apply(t,arguments)}}));var S=void 0!==i.ResizeObserver?i.ResizeObserver:w;t.a=S}).call(this,n(139))},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports=function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(e,t,n,r){var i,o,a,s=t||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(a=i+u)>>>2,s.length<=o&&s.push(0),s[o]|=e[i]<<8*(c+r*(a%4));return{value:s,binLen:8*e.length+n}}function r(e,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,a,s;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var u=t||[0],c=(n=n||0)>>>3,l=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(a=(s=(i>>>1)+c)>>>2;u.length<=a;)u.push(0);u[a]|=o<<8*(l+r*(s%4))}return{value:u,binLen:4*e.length+n}}(e,t,n,i)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,a,s,u,c,l,f,h,d=0,p=n||[0],y=(r=r||0)>>>3;if("UTF8"===t)for(f=-1===i?3:0,s=0;s<e.length;s+=1)for(a=[],128>(o=e.charCodeAt(s))?a.push(o):2048>o?(a.push(192|o>>>6),a.push(128|63&o)):55296>o||57344<=o?a.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(s)),a.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),u=0;u<a.length;u+=1){for(c=(l=d+y)>>>2;p.length<=c;)p.push(0);p[c]|=a[u]<<8*(f+i*(l%4)),d+=1}else for(f=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,s=0;s<e.length;s+=1){for(o=e.charCodeAt(s),!0===h&&(o=(u=255&o)<<8|o>>>8),c=(l=d+y)>>>2;p.length<=c;)p.push(0);p[c]|=o<<8*(f+i*(l%4)),d+=2}return{value:p,binLen:8*d+r}}(e,r,t,n,i)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,a,s,u,c,l,f=0,h=n||[0],d=(r=r||0)>>>3,p=-1===i?3:0,y=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==y&&y<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(u=e.substr(o,4),s=0,a=0;a<u.length;a+=1)s|=t.indexOf(u.charAt(a))<<18-6*a;for(a=0;a<u.length-1;a+=1){for(c=(l=f+d)>>>2;h.length<=c;)h.push(0);h[c]|=(s>>>16-8*a&255)<<8*(p+i*(l%4)),f+=1}}return{value:h,binLen:8*f+r}}(e,n,r,i)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,a,s,u=t||[0],c=(n=n||0)>>>3,l=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),a=(s=o+c)>>>2,u.length<=a&&u.push(0),u[a]|=i<<8*(l+r*(s%4));return{value:u,binLen:8*e.length+n}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,r,i){return n(new Uint8Array(e),t,r,i)}(e,t,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return n(e,t,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(e,n,r,i){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,a="",s=t/8,u=-1===n?3:0;for(i=0;i<s;i+=1)o=e[i>>>2]>>>8*(u+n*(i%4)),a+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?a.toUpperCase():a}(e,n,r,i)};case"B64":return function(e){return function(e,n,r,i){var o,a,s,u,c,l="",f=n/8,h=-1===r?3:0;for(o=0;o<f;o+=3)for(u=o+1<f?e[o+1>>>2]:0,c=o+2<f?e[o+2>>>2]:0,s=(e[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(u>>>8*(h+r*((o+1)%4))&255)<<8|c>>>8*(h+r*((o+2)%4))&255,a=0;a<4;a+=1)l+=8*o+6*a<=n?t.charAt(s>>>6*(3-a)&63):i.b64Pad;return l}(e,n,r,i)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",a=t/8,s=-1===n?3:0;for(r=0;r<a;r+=1)i=e[r>>>2]>>>8*(s+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),a=new Uint8Array(o),s=-1===n?3:0;for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(s+n*(r%4))&255;return o}(e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,a=new Uint8Array(i);for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return a}(e,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function o(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function a(e,t){return e<<t|e>>>32-t}function s(e,t,n){return e^t^n}function u(e,t,n){return e&t^e&n^t&n}function c(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function l(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function f(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function h(e,t){var n,r,i,o,f,h,d,p,y=[];for(n=t[0],r=t[1],i=t[2],o=t[3],f=t[4],d=0;d<80;d+=1)y[d]=d<16?e[d]:a(y[d-3]^y[d-8]^y[d-14]^y[d-16],1),h=d<20?l(a(n,5),(p=r)&i^~p&o,f,1518500249,y[d]):d<40?l(a(n,5),s(r,i,o),f,1859775393,y[d]):d<60?l(a(n,5),u(r,i,o),f,2400959708,y[d]):l(a(n,5),s(r,i,o),f,3395469782,y[d]),f=o,o=i,i=a(r,30),r=n,n=h;return t[0]=c(n,t[0]),t[1]=c(r,t[1]),t[2]=c(i,t[2]),t[3]=c(o,t[3]),t[4]=c(f,t[4]),t}function d(e,t,n,r){for(var i,o=15+(t+65>>>9<<4),a=t+n;e.length<=o;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[o]=4294967295&a,e[o-1]=a/4294967296|0,i=0;i<e.length;i+=16)r=h(e.slice(i,i+16),r);return r}return function(t){function n(e,n,i){var o=this;if("SHA-1"!==e)throw new Error("Chosen SHA variant is not supported");var a=i||{};return(o=t.call(this,e,n,i)||this).t=!0,o.i=o.o,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=h,o.p=function(e){return e.slice()},o.l=f,o.R=d,o.U=[1732584193,4023233417,2562383102,271733878,3285377520],o.T=512,o.m=160,o.F=!1,a.hmacKey&&o.B(function(e,t,n,i){var o="hmacKey must include a value and format";if(!t)throw new Error(o);if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}(0,a.hmacKey,o.u)),o}return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.h=t,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=e,this.Y=[],this.I=0,this.C=!1,this.H=0,this.L=!1,this.N=[],this.S=[]}return e.prototype.update=function(e){var t,n=0,r=this.T>>>5,i=this.s(e,this.Y,this.I),o=i.binLen,a=i.value,s=o>>>5;for(t=0;t<s;t+=r)n+this.T<=o&&(this.U=this.A(a.slice(t,t+r),this.U),n+=this.T);this.H+=n,this.Y=a.slice(n>>>5),this.I=o%this.T,this.C=!0},e.prototype.getHash=function(e,t){var n,r,a=this.m,s=o(t);if(!0===this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");a=s.outputLen}var u=i(e,a,this.u,s);if(!0===this.L&&this.i)return u(this.i(s));for(r=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),a),n=1;n<this.numRounds;n+=1)!0===this.F&&a%32!=0&&(r[r.length-1]&=16777215>>>24-a%32),r=this.R(r,a,0,this.l(this.g),a);return u(r)},e.prototype.setHMACKey=function(e,t,n){if(!0!==this.t)throw new Error("Variant does not support HMAC");if(!0===this.C)throw new Error("Cannot set MAC key after calling update");var i=r(t,(n||{}).encoding||"UTF8",this.u);this.B(i(e))},e.prototype.B=function(e){var t,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(!0===this.L)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.R(e.value,e.binLen,0,this.l(this.g),this.m));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.N[t]=909522486^e.value[t],this.S[t]=1549556828^e.value[t];this.U=this.A(this.N,this.U),this.H=this.T,this.L=!0},e.prototype.getHMAC=function(e,t){var n=o(t);return i(e,this.m,this.u,n)(this.o())},e.prototype.o=function(){var e;if(!1===this.L)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),this.m);return e=this.A(this.S,this.l(this.g)),this.R(t,this.m,this.T,e,this.m)},e}())}()},function(e){e.exports=JSON.parse('{"a":"1.0.31"}')},function(e,t,n){},function(e,t,n){"use strict";e.exports=n(1151)},function(e,t,n){"use strict";
21
- /** @license React v16.11.0
22
- * react-dom-server.browser.production.min.js
23
- *
24
- * Copyright (c) Facebook, Inc. and its affiliates.
25
- *
26
- * This source code is licensed under the MIT license found in the
27
- * LICENSE file in the root directory of this source tree.
28
- */var r=n(1152),i=n(0);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a="function"==typeof Symbol&&Symbol.for,s=a?Symbol.for("react.portal"):60106,u=a?Symbol.for("react.fragment"):60107,c=a?Symbol.for("react.strict_mode"):60108,l=a?Symbol.for("react.profiler"):60114,f=a?Symbol.for("react.provider"):60109,h=a?Symbol.for("react.context"):60110,d=a?Symbol.for("react.concurrent_mode"):60111,p=a?Symbol.for("react.forward_ref"):60112,y=a?Symbol.for("react.suspense"):60113,m=a?Symbol.for("react.suspense_list"):60120,g=a?Symbol.for("react.memo"):60115,v=a?Symbol.for("react.lazy"):60116,b=a?Symbol.for("react.fundamental"):60117,_=a?Symbol.for("react.scope"):60119,T=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case u:return"Fragment";case s:return"Portal";case l:return"Profiler";case c:return"StrictMode";case y:return"Suspense";case m:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case h:return"Context.Consumer";case f:return"Context.Provider";case p:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case g:return w(e.type);case v:if(e=1===e._status?e._result:null)return w(e)}return null}T.hasOwnProperty("ReactCurrentDispatcher")||(T.ReactCurrentDispatcher={current:null}),T.hasOwnProperty("ReactCurrentBatchConfig")||(T.ReactCurrentBatchConfig={suspense:null});var S={};function C(e,t){for(var n=0|e._threadCount;n<=t;n++)e[n]=e._currentValue2,e._threadCount=n+1}for(var k=new Uint16Array(16),E=0;15>E;E++)k[E]=E+1;k[15]=0;var I=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,O=Object.prototype.hasOwnProperty,x={},P={};function A(e){return!!O.call(P,e)||!O.call(x,e)&&(I.test(e)?P[e]=!0:(x[e]=!0,!1))}function L(e,t,n,r,i,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o}var R={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){R[e]=new L(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];R[t]=new L(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){R[e]=new L(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){R[e]=new L(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){R[e]=new L(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){R[e]=new L(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){R[e]=new L(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){R[e]=new L(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){R[e]=new L(e,5,!1,e.toLowerCase(),null,!1)}));var j=/[\-:]([a-z])/g;function D(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(j,D);R[t]=new L(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(j,D);R[t]=new L(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(j,D);R[t]=new L(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){R[e]=new L(e,1,!1,e.toLowerCase(),null,!1)})),R.xlinkHref=new L("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){R[e]=new L(e,1,!1,e.toLowerCase(),null,!0)}));var M=/["'&<>]/;function N(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=M.exec(e);if(t){var n,r="",i=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}i!==n&&(r+=e.substring(i,n)),i=n+1,r+=t}e=i!==n?r+e.substring(i,n):r}return e}function B(e,t){var n,r=R.hasOwnProperty(e)?R[e]:null;return(n="style"!==e)&&(n=null!==r?0===r.type:2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])),n||function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(e,t,r,!1)?"":null!==r?(e=r.attributeName,3===(n=r.type)||4===n&&!0===t?e+'=""':(r.sanitizeURL&&(t=""+t),e+'="'+N(t)+'"')):A(e)?e+'="'+N(t)+'"':""}var U="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},F=null,V=null,H=null,W=!1,z=!1,q=null,G=0;function Y(){if(null===F)throw Error(o(321));return F}function X(){if(0<G)throw Error(o(312));return{memoizedState:null,queue:null,next:null}}function K(){return null===H?null===V?(W=!1,V=H=X()):(W=!0,H=V):null===H.next?(W=!1,H=H.next=X()):(W=!0,H=H.next),H}function $(e,t,n,r){for(;z;)z=!1,G+=1,H=null,n=e(t,r);return V=F=null,G=0,H=q=null,n}function Q(e,t){return"function"==typeof t?t(e):t}function Z(e,t,n){if(F=Y(),H=K(),W){var r=H.queue;if(t=r.dispatch,null!==q&&void 0!==(n=q.get(r))){q.delete(r),r=H.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return H.memoizedState=r,[r,t]}return[H.memoizedState,t]}return e=e===Q?"function"==typeof t?t():t:void 0!==n?n(t):t,H.memoizedState=e,e=(e=H.queue={last:null,dispatch:null}).dispatch=J.bind(null,F,e),[H.memoizedState,e]}function J(e,t,n){if(!(25>G))throw Error(o(301));if(e===F)if(z=!0,e={action:n,next:null},null===q&&(q=new Map),void 0===(n=q.get(t)))q.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}function ee(){}var te=0,ne={readContext:function(e){var t=te;return C(e,t),e[t]},useContext:function(e){Y();var t=te;return C(e,t),e[t]},useMemo:function(e,t){if(F=Y(),t=void 0===t?null:t,null!==(H=K())){var n=H.memoizedState;if(null!==n&&null!==t){e:{var r=n[1];if(null===r)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!U(t[i],r[i])){r=!1;break e}r=!0}}if(r)return n[0]}}return e=e(),H.memoizedState=[e,t],e},useReducer:Z,useRef:function(e){F=Y();var t=(H=K()).memoizedState;return null===t?(e={current:e},H.memoizedState=e):t},useState:function(e){return Z(Q,e)},useLayoutEffect:function(){},useCallback:function(e){return e},useImperativeHandle:ee,useEffect:ee,useDebugValue:ee,useResponder:function(e,t){return{props:t,responder:e}},useDeferredValue:function(e){return Y(),e},useTransition:function(){return Y(),[function(e){e()},!1]}},re="http://www.w3.org/1999/xhtml";function ie(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var oe={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},ae=r({menuitem:!0},oe),se={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!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},ue=["Webkit","ms","Moz","O"];Object.keys(se).forEach((function(e){ue.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),se[t]=se[e]}))}));var ce=/([A-Z])/g,le=/^ms-/,fe=i.Children.toArray,he=T.ReactCurrentDispatcher,de={listing:!0,pre:!0,textarea:!0},pe=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,ye={},me={};var ge=Object.prototype.hasOwnProperty,ve={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function be(e,t){if(void 0===e)throw Error(o(152,w(t)||"Component"))}function _e(e,t,n){function a(i,a){var s=a.prototype&&a.prototype.isReactComponent,u=function(e,t,n,r){if(r&&("object"==typeof(r=e.contextType)&&null!==r))return C(r,n),r[n];if(e=e.contextTypes){for(var i in n={},e)n[i]=t[i];t=n}else t=S;return t}(a,t,n,s),c=[],l=!1,f={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===c)return null},enqueueReplaceState:function(e,t){l=!0,c=[t]},enqueueSetState:function(e,t){if(null===c)return null;c.push(t)}};if(s){if(s=new a(i.props,u,f),"function"==typeof a.getDerivedStateFromProps){var h=a.getDerivedStateFromProps.call(null,i.props,s.state);null!=h&&(s.state=r({},s.state,h))}}else if(F={},s=a(i.props,u,f),null==(s=$(a,i.props,s,u))||null==s.render)return void be(e=s,a);if(s.props=i.props,s.context=u,s.updater=f,void 0===(f=s.state)&&(s.state=f=null),"function"==typeof s.UNSAFE_componentWillMount||"function"==typeof s.componentWillMount)if("function"==typeof s.componentWillMount&&"function"!=typeof a.getDerivedStateFromProps&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&"function"!=typeof a.getDerivedStateFromProps&&s.UNSAFE_componentWillMount(),c.length){f=c;var d=l;if(c=null,l=!1,d&&1===f.length)s.state=f[0];else{h=d?f[0]:s.state;var p=!0;for(d=d?1:0;d<f.length;d++){var y=f[d];null!=(y="function"==typeof y?y.call(s,h,i.props,u):y)&&(p?(p=!1,h=r({},h,y)):r(h,y))}s.state=h}}else c=null;if(be(e=s.render(),a),"function"==typeof s.getChildContext&&"object"==typeof(i=a.childContextTypes)){var m=s.getChildContext();for(var g in m)if(!(g in i))throw Error(o(108,w(a)||"Unknown",g))}m&&(t=r({},t,m))}for(;i.isValidElement(e);){var s=e,u=s.type;if("function"!=typeof u)break;a(s,u)}return{child:e,context:t}}var Te=function(){function e(e,t){i.isValidElement(e)?e.type!==u?e=[e]:(e=e.props.children,e=i.isValidElement(e)?[e]:fe(e)):e=fe(e),e={type:null,domNamespace:re,children:e,childIndex:0,context:S,footer:""};var n=k[0];if(0===n){var r=k,a=2*(n=r.length);if(!(65536>=a))throw Error(o(304));var s=new Uint16Array(a);for(s.set(r),(k=s)[0]=n+1,r=n;r<a-1;r++)k[r]=r+1;k[a-1]=0}else k[0]=k[n];this.threadID=n,this.stack=[e],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=t,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}var t=e.prototype;return t.destroy=function(){if(!this.exhausted){this.exhausted=!0,this.clearProviders();var e=this.threadID;k[e]=k[0],k[0]=e}},t.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=this.threadID;C(n,r);var i=n[r];this.contextStack[t]=n,this.contextValueStack[t]=i,n[r]=e.props.value},t.popProvider=function(){var e=this.contextIndex,t=this.contextStack[e],n=this.contextValueStack[e];this.contextStack[e]=null,this.contextValueStack[e]=null,this.contextIndex--,t[this.threadID]=n},t.clearProviders=function(){for(var e=this.contextIndex;0<=e;e--)this.contextStack[e][this.threadID]=this.contextValueStack[e]},t.read=function(e){if(this.exhausted)return null;var t=te;te=this.threadID;var n=he.current;he.current=ne;try{for(var r=[""],i=!1;r[0].length<e;){if(0===this.stack.length){this.exhausted=!0;var a=this.threadID;k[a]=k[0],k[0]=a;break}var s=this.stack[this.stack.length-1];if(i||s.childIndex>=s.children.length){var u=s.footer;if(""!==u&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===s.type)this.currentSelectValue=null;else if(null!=s.type&&null!=s.type.type&&s.type.type.$$typeof===f)this.popProvider(s.type);else if(s.type===y){this.suspenseDepth--;var c=r.pop();if(i){i=!1;var l=s.fallbackFrame;if(!l)throw Error(o(303));this.stack.push(l),r[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}r[this.suspenseDepth]+=c}r[this.suspenseDepth]+=u}else{var h=s.children[s.childIndex++],d="";try{d+=this.render(h,s.context,s.domNamespace)}catch(e){if(null!=e&&"function"==typeof e.then)throw Error(o(294));throw e}r.length<=this.suspenseDepth&&r.push(""),r[this.suspenseDepth]+=d}}return r[0]}finally{he.current=n,te=t}},t.render=function(e,t,n){if("string"==typeof e||"number"==typeof e)return""===(n=""+e)?"":this.makeStaticMarkup?N(n):this.previousWasTextNode?"\x3c!-- --\x3e"+N(n):(this.previousWasTextNode=!0,N(n));if(e=(t=_e(e,t,this.threadID)).child,t=t.context,null===e||!1===e)return"";if(!i.isValidElement(e)){if(null!=e&&null!=e.$$typeof){if((n=e.$$typeof)===s)throw Error(o(257));throw Error(o(258,n.toString()))}return e=fe(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),""}var a=e.type;if("string"==typeof a)return this.renderDOM(e,t,n);switch(a){case c:case d:case l:case m:case u:return e=fe(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case y:throw Error(o(294))}if("object"==typeof a&&null!==a)switch(a.$$typeof){case p:F={};var T=a.render(e.props,e.ref);return T=$(a.render,e.props,T,e.ref),T=fe(T),this.stack.push({type:null,domNamespace:n,children:T,childIndex:0,context:t,footer:""}),"";case g:return e=[i.createElement(a.type,r({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case f:return n={type:e,domNamespace:n,children:a=fe(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case h:a=e.type,T=e.props;var w=this.threadID;return C(a,w),a=fe(T.children(a[w])),this.stack.push({type:e,domNamespace:n,children:a,childIndex:0,context:t,footer:""}),"";case b:throw Error(o(338));case v:switch(function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(a=e.type),a._status){case 1:return e=[i.createElement(a._result,r({ref:e.ref},e.props))],this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case 2:throw a._result;default:throw Error(o(295))}case _:throw Error(o(343))}throw Error(o(130,null==a?a:typeof a,""))},t.renderDOM=function(e,t,n){var a=e.type.toLowerCase();if(n===re&&ie(a),!ye.hasOwnProperty(a)){if(!pe.test(a))throw Error(o(65,a));ye[a]=!0}var s=e.props;if("input"===a)s=r({type:void 0},s,{defaultChecked:void 0,defaultValue:void 0,value:null!=s.value?s.value:s.defaultValue,checked:null!=s.checked?s.checked:s.defaultChecked});else if("textarea"===a){var u=s.value;if(null==u){u=s.defaultValue;var c=s.children;if(null!=c){if(null!=u)throw Error(o(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(o(93));c=c[0]}u=""+c}null==u&&(u="")}s=r({},s,{value:void 0,children:""+u})}else if("select"===a)this.currentSelectValue=null!=s.value?s.value:s.defaultValue,s=r({},s,{value:void 0});else if("option"===a){c=this.currentSelectValue;var l=function(e){if(null==e)return e;var t="";return i.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(s.children);if(null!=c){var f=null!=s.value?s.value+"":l;if(u=!1,Array.isArray(c)){for(var h=0;h<c.length;h++)if(""+c[h]===f){u=!0;break}}else u=""+c===f;s=r({selected:void 0,children:void 0},s,{selected:u,children:l})}}if(u=s){if(ae[a]&&(null!=u.children||null!=u.dangerouslySetInnerHTML))throw Error(o(137,a,""));if(null!=u.dangerouslySetInnerHTML){if(null!=u.children)throw Error(o(60));if("object"!=typeof u.dangerouslySetInnerHTML||!("__html"in u.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=u.style&&"object"!=typeof u.style)throw Error(o(62,""))}for(_ in u=s,c=this.makeStaticMarkup,l=1===this.stack.length,f="<"+e.type,u)if(ge.call(u,_)){var d=u[_];if(null!=d){if("style"===_){h=void 0;var p="",y="";for(h in d)if(d.hasOwnProperty(h)){var m=0===h.indexOf("--"),g=d[h];if(null!=g){if(m)var v=h;else if(v=h,me.hasOwnProperty(v))v=me[v];else{var b=v.replace(ce,"-$1").toLowerCase().replace(le,"-ms-");v=me[v]=b}p+=y+v+":",y=h,p+=m=null==g||"boolean"==typeof g||""===g?"":m||"number"!=typeof g||0===g||se.hasOwnProperty(y)&&se[y]?(""+g).trim():g+"px",y=";"}}d=p||null}h=null;e:if(m=a,g=u,-1===m.indexOf("-"))m="string"==typeof g.is;else switch(m){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":m=!1;break e;default:m=!0}m?ve.hasOwnProperty(_)||(h=A(h=_)&&null!=d?h+'="'+N(d)+'"':""):h=B(_,d),h&&(f+=" "+h)}}c||l&&(f+=' data-reactroot=""');var _=f;u="",oe.hasOwnProperty(a)?_+="/>":(_+=">",u="</"+e.type+">");e:{if(null!=(c=s.dangerouslySetInnerHTML)){if(null!=c.__html){c=c.__html;break e}}else if("string"==typeof(c=s.children)||"number"==typeof c){c=N(c);break e}c=null}return null!=c?(s=[],de[a]&&"\n"===c.charAt(0)&&(_+="\n"),_+=c):s=fe(s.children),e=e.type,n=null==n||"http://www.w3.org/1999/xhtml"===n?ie(e):"http://www.w3.org/2000/svg"===n&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":n,this.stack.push({domNamespace:n,type:a,children:s,childIndex:0,context:t,footer:u}),this.previousWasTextNode=!1,_},e}(),we={renderToString:function(e){e=new Te(e,!1);try{return e.read(1/0)}finally{e.destroy()}},renderToStaticMarkup:function(e){e=new Te(e,!0);try{return e.read(1/0)}finally{e.destroy()}},renderToNodeStream:function(){throw Error(o(207))},renderToStaticNodeStream:function(){throw Error(o(208))},version:"16.11.0"},Se={default:we},Ce=Se&&we||Se;e.exports=Ce.default||Ce},function(e,t,n){"use strict";
29
- /*
30
- object-assign
31
- (c) Sindre Sorhus
32
- @license MIT
33
- */var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){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;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))i.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)o.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){
34
- /**
35
- * chroma.js - JavaScript library for color conversions
36
- *
37
- * Copyright (c) 2011-2019, Gregor Aisch
38
- * All rights reserved.
39
- *
40
- * Redistribution and use in source and binary forms, with or without
41
- * modification, are permitted provided that the following conditions are met:
42
- *
43
- * 1. Redistributions of source code must retain the above copyright notice, this
44
- * list of conditions and the following disclaimer.
45
- *
46
- * 2. Redistributions in binary form must reproduce the above copyright notice,
47
- * this list of conditions and the following disclaimer in the documentation
48
- * and/or other materials provided with the distribution.
49
- *
50
- * 3. The name Gregor Aisch may not be used to endorse or promote products
51
- * derived from this software without specific prior written permission.
52
- *
53
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
54
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
55
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
56
- * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
57
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
58
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
59
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
60
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
61
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
62
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63
- *
64
- * -------------------------------------------------------
65
- *
66
- * chroma.js includes colors from colorbrewer2.org, which are released under
67
- * the following license:
68
- *
69
- * Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
70
- * and The Pennsylvania State University.
71
- *
72
- * Licensed under the Apache License, Version 2.0 (the "License");
73
- * you may not use this file except in compliance with the License.
74
- * You may obtain a copy of the License at
75
- * http://www.apache.org/licenses/LICENSE-2.0
76
- *
77
- * Unless required by applicable law or agreed to in writing,
78
- * software distributed under the License is distributed on an
79
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
80
- * either express or implied. See the License for the specific
81
- * language governing permissions and limitations under the License.
82
- *
83
- * ------------------------------------------------------
84
- *
85
- * Named colors are taken from X11 Color Names.
86
- * http://www.w3.org/TR/css3-color/#svg-color
87
- *
88
- * @preserve
89
- */
90
- e.exports=function(){"use strict";for(var e=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e<t?t:e>n?n:e},t={},n=0,r=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];n<r.length;n+=1){var i=r[n];t["[object "+i+"]"]=i.toLowerCase()}var o=function(e){return t[Object.prototype.toString.call(e)]||"object"},a=Math.PI,s={clip_rgb:function(t){t._clipped=!1,t._unclipped=t.slice(0);for(var n=0;n<=3;n++)n<3?((t[n]<0||t[n]>255)&&(t._clipped=!0),t[n]=e(t[n],0,255)):3===n&&(t[n]=e(t[n],0,1));return t},limit:e,type:o,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==o(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==o(e[t])?e[t].toLowerCase():null},PI:a,TWOPI:2*a,PITHIRD:a/3,DEG2RAD:a/180,RAD2DEG:180/a},u={format:{},autodetect:[]},c=s.last,l=s.clip_rgb,f=s.type,h=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=this;if("object"===f(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var r=c(e),i=!1;if(!r){i=!0,u.sorted||(u.autodetect=u.autodetect.sort((function(e,t){return t.p-e.p})),u.sorted=!0);for(var o=0,a=u.autodetect;o<a.length;o+=1){var s=a[o];if(r=s.test.apply(s,e))break}}if(!u.format[r])throw new Error("unknown format: "+e);var h=u.format[r].apply(null,i?e:e.slice(0,-1));n._rgb=l(h),3===n._rgb.length&&n._rgb.push(1)};h.prototype.toString=function(){return"function"==f(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var d=h,p=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p.Color,[null].concat(e)))};p.Color=d,p.version="2.1.2";var y=p,m=s.unpack,g=Math.max,v=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=m(e,"rgb"),r=n[0],i=n[1],o=n[2],a=1-g(r/=255,g(i/=255,o/=255)),s=a<1?1/(1-a):0,u=(1-r-a)*s,c=(1-i-a)*s,l=(1-o-a)*s;return[u,c,l,a]},b=s.unpack,_=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=b(e,"cmyk"))[0],r=e[1],i=e[2],o=e[3],a=e.length>4?e[4]:1;return 1===o?[0,0,0,a]:[n>=1?0:255*(1-n)*(1-o),r>=1?0:255*(1-r)*(1-o),i>=1?0:255*(1-i)*(1-o),a]},T=s.unpack,w=s.type;d.prototype.cmyk=function(){return v(this._rgb)},y.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["cmyk"])))},u.format.cmyk=_,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=T(e,"cmyk"),"array"===w(e)&&4===e.length)return"cmyk"}});var S=s.unpack,C=s.last,k=function(e){return Math.round(100*e)/100},E=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=S(e,"hsla"),r=C(e)||"lsa";return n[0]=k(n[0]||0),n[1]=k(100*n[1])+"%",n[2]=k(100*n[2])+"%","hsla"===r||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,r="hsla"):n.length=3,r+"("+n.join(",")+")"},I=s.unpack,O=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=I(e,"rgba"))[0],r=e[1],i=e[2];n/=255,r/=255,i/=255;var o,a,s=Math.min(n,r,i),u=Math.max(n,r,i),c=(u+s)/2;return u===s?(o=0,a=Number.NaN):o=c<.5?(u-s)/(u+s):(u-s)/(2-u-s),n==u?a=(r-i)/(u-s):r==u?a=2+(i-n)/(u-s):i==u&&(a=4+(n-r)/(u-s)),(a*=60)<0&&(a+=360),e.length>3&&void 0!==e[3]?[a,o,c,e[3]]:[a,o,c]},x=s.unpack,P=s.last,A=Math.round,L=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=x(e,"rgba"),r=P(e)||"rgb";return"hsl"==r.substr(0,3)?E(O(n),r):(n[0]=A(n[0]),n[1]=A(n[1]),n[2]=A(n[2]),("rgba"===r||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,r="rgba"),r+"("+n.slice(0,"rgb"===r?3:4).join(",")+")")},R=s.unpack,j=Math.round,D=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];var r,i,o,a=(t=R(t,"hsl"))[0],s=t[1],u=t[2];if(0===s)r=i=o=255*u;else{var c=[0,0,0],l=[0,0,0],f=u<.5?u*(1+s):u+s-u*s,h=2*u-f,d=a/360;c[0]=d+1/3,c[1]=d,c[2]=d-1/3;for(var p=0;p<3;p++)c[p]<0&&(c[p]+=1),c[p]>1&&(c[p]-=1),6*c[p]<1?l[p]=h+6*(f-h)*c[p]:2*c[p]<1?l[p]=f:3*c[p]<2?l[p]=h+(f-h)*(2/3-c[p])*6:l[p]=h;r=(e=[j(255*l[0]),j(255*l[1]),j(255*l[2])])[0],i=e[1],o=e[2]}return t.length>3?[r,i,o,t[3]]:[r,i,o,1]},M=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,N=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,B=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,U=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,F=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,V=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,H=Math.round,W=function(e){var t;if(e=e.toLowerCase().trim(),u.format.named)try{return u.format.named(e)}catch(e){}if(t=e.match(M)){for(var n=t.slice(1,4),r=0;r<3;r++)n[r]=+n[r];return n[3]=1,n}if(t=e.match(N)){for(var i=t.slice(1,5),o=0;o<4;o++)i[o]=+i[o];return i}if(t=e.match(B)){for(var a=t.slice(1,4),s=0;s<3;s++)a[s]=H(2.55*a[s]);return a[3]=1,a}if(t=e.match(U)){for(var c=t.slice(1,5),l=0;l<3;l++)c[l]=H(2.55*c[l]);return c[3]=+c[3],c}if(t=e.match(F)){var f=t.slice(1,4);f[1]*=.01,f[2]*=.01;var h=D(f);return h[3]=1,h}if(t=e.match(V)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var p=D(d);return p[3]=+t[4],p}};W.test=function(e){return M.test(e)||N.test(e)||B.test(e)||U.test(e)||F.test(e)||V.test(e)};var z=W,q=s.type;d.prototype.css=function(e){return L(this._rgb,e)},y.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["css"])))},u.format.css=z,u.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===q(e)&&z.test(e))return"css"}});var G=s.unpack;u.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=G(e,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},y.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["gl"])))},d.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var Y=s.unpack,X=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=Y(e,"rgb"),i=r[0],o=r[1],a=r[2],s=Math.min(i,o,a),u=Math.max(i,o,a),c=u-s,l=100*c/255,f=s/(255-c)*100;return 0===c?n=Number.NaN:(i===u&&(n=(o-a)/c),o===u&&(n=2+(a-i)/c),a===u&&(n=4+(i-o)/c),(n*=60)<0&&(n+=360)),[n,l,f]},K=s.unpack,$=Math.floor,Q=function(){for(var e,t,n,r,i,o,a=[],s=arguments.length;s--;)a[s]=arguments[s];var u,c,l,f=(a=K(a,"hcg"))[0],h=a[1],d=a[2];d*=255;var p=255*h;if(0===h)u=c=l=d;else{360===f&&(f=0),f>360&&(f-=360),f<0&&(f+=360);var y=$(f/=60),m=f-y,g=d*(1-h),v=g+p*(1-m),b=g+p*m,_=g+p;switch(y){case 0:u=(e=[_,b,g])[0],c=e[1],l=e[2];break;case 1:u=(t=[v,_,g])[0],c=t[1],l=t[2];break;case 2:u=(n=[g,_,b])[0],c=n[1],l=n[2];break;case 3:u=(r=[g,v,_])[0],c=r[1],l=r[2];break;case 4:u=(i=[b,g,_])[0],c=i[1],l=i[2];break;case 5:u=(o=[_,g,v])[0],c=o[1],l=o[2]}}return[u,c,l,a.length>3?a[3]:1]},Z=s.unpack,J=s.type;d.prototype.hcg=function(){return X(this._rgb)},y.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["hcg"])))},u.format.hcg=Q,u.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Z(e,"hcg"),"array"===J(e)&&3===e.length)return"hcg"}});var ee=s.unpack,te=s.last,ne=Math.round,re=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ee(e,"rgba"),r=n[0],i=n[1],o=n[2],a=n[3],s=te(e)||"auto";void 0===a&&(a=1),"auto"===s&&(s=a<1?"rgba":"rgb");var u=(r=ne(r))<<16|(i=ne(i))<<8|(o=ne(o)),c="000000"+u.toString(16);c=c.substr(c.length-6);var l="0"+ne(255*a).toString(16);switch(l=l.substr(l.length-2),s.toLowerCase()){case"rgba":return"#"+c+l;case"argb":return"#"+l+c;default:return"#"+c}},ie=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,oe=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,ae=function(e){if(e.match(ie)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(oe)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var n=parseInt(e,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+e)},se=s.type;d.prototype.hex=function(e){return re(this._rgb,e)},y.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["hex"])))},u.format.hex=ae,u.autodetect.push({p:4,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===se(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var ue=s.unpack,ce=s.TWOPI,le=Math.min,fe=Math.sqrt,he=Math.acos,de=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=ue(e,"rgb"),i=r[0],o=r[1],a=r[2],s=le(i/=255,o/=255,a/=255),u=(i+o+a)/3,c=u>0?1-s/u:0;return 0===c?n=NaN:(n=(i-o+(i-a))/2,n/=fe((i-o)*(i-o)+(i-a)*(o-a)),n=he(n),a>o&&(n=ce-n),n/=ce),[360*n,c,u]},pe=s.unpack,ye=s.limit,me=s.TWOPI,ge=s.PITHIRD,ve=Math.cos,be=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=pe(e,"hsi"))[0],a=e[1],s=e[2];return isNaN(o)&&(o=0),isNaN(a)&&(a=0),o>360&&(o-=360),o<0&&(o+=360),(o/=360)<1/3?r=1-((i=(1-a)/3)+(n=(1+a*ve(me*o)/ve(ge-me*o))/3)):o<2/3?i=1-((n=(1-a)/3)+(r=(1+a*ve(me*(o-=1/3))/ve(ge-me*o))/3)):n=1-((r=(1-a)/3)+(i=(1+a*ve(me*(o-=2/3))/ve(ge-me*o))/3)),[255*(n=ye(s*n*3)),255*(r=ye(s*r*3)),255*(i=ye(s*i*3)),e.length>3?e[3]:1]},_e=s.unpack,Te=s.type;d.prototype.hsi=function(){return de(this._rgb)},y.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["hsi"])))},u.format.hsi=be,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=_e(e,"hsi"),"array"===Te(e)&&3===e.length)return"hsi"}});var we=s.unpack,Se=s.type;d.prototype.hsl=function(){return O(this._rgb)},y.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["hsl"])))},u.format.hsl=D,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=we(e,"hsl"),"array"===Se(e)&&3===e.length)return"hsl"}});var Ce=s.unpack,ke=Math.min,Ee=Math.max,Ie=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=Ce(e,"rgb"))[0],a=e[1],s=e[2],u=ke(o,a,s),c=Ee(o,a,s),l=c-u;return i=c/255,0===c?(n=Number.NaN,r=0):(r=l/c,o===c&&(n=(a-s)/l),a===c&&(n=2+(s-o)/l),s===c&&(n=4+(o-a)/l),(n*=60)<0&&(n+=360)),[n,r,i]},Oe=s.unpack,xe=Math.floor,Pe=function(){for(var e,t,n,r,i,o,a=[],s=arguments.length;s--;)a[s]=arguments[s];var u,c,l,f=(a=Oe(a,"hsv"))[0],h=a[1],d=a[2];if(d*=255,0===h)u=c=l=d;else{360===f&&(f=0),f>360&&(f-=360),f<0&&(f+=360);var p=xe(f/=60),y=f-p,m=d*(1-h),g=d*(1-h*y),v=d*(1-h*(1-y));switch(p){case 0:u=(e=[d,v,m])[0],c=e[1],l=e[2];break;case 1:u=(t=[g,d,m])[0],c=t[1],l=t[2];break;case 2:u=(n=[m,d,v])[0],c=n[1],l=n[2];break;case 3:u=(r=[m,g,d])[0],c=r[1],l=r[2];break;case 4:u=(i=[v,m,d])[0],c=i[1],l=i[2];break;case 5:u=(o=[d,m,g])[0],c=o[1],l=o[2]}}return[u,c,l,a.length>3?a[3]:1]},Ae=s.unpack,Le=s.type;d.prototype.hsv=function(){return Ie(this._rgb)},y.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["hsv"])))},u.format.hsv=Pe,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ae(e,"hsv"),"array"===Le(e)&&3===e.length)return"hsv"}});var Re=18,je=.95047,De=1,Me=1.08883,Ne=.137931034,Be=.206896552,Ue=.12841855,Fe=.008856452,Ve=s.unpack,He=Math.pow,We=function(e){return(e/=255)<=.04045?e/12.92:He((e+.055)/1.055,2.4)},ze=function(e){return e>Fe?He(e,1/3):e/Ue+Ne},qe=function(e,t,n){return e=We(e),t=We(t),n=We(n),[ze((.4124564*e+.3575761*t+.1804375*n)/je),ze((.2126729*e+.7151522*t+.072175*n)/De),ze((.0193339*e+.119192*t+.9503041*n)/Me)]},Ge=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Ve(e,"rgb"),r=n[0],i=n[1],o=n[2],a=qe(r,i,o),s=a[0],u=a[1],c=a[2],l=116*u-16;return[l<0?0:l,500*(s-u),200*(u-c)]},Ye=s.unpack,Xe=Math.pow,Ke=function(e){return 255*(e<=.00304?12.92*e:1.055*Xe(e,1/2.4)-.055)},$e=function(e){return e>Be?e*e*e:Ue*(e-Ne)},Qe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=Ye(e,"lab"))[0],a=e[1],s=e[2];return r=(o+16)/116,n=isNaN(a)?r:r+a/500,i=isNaN(s)?r:r-s/200,r=De*$e(r),n=je*$e(n),i=Me*$e(i),[Ke(3.2404542*n-1.5371385*r-.4985314*i),Ke(-.969266*n+1.8760108*r+.041556*i),Ke(.0556434*n-.2040259*r+1.0572252*i),e.length>3?e[3]:1]},Ze=s.unpack,Je=s.type;d.prototype.lab=function(){return Ge(this._rgb)},y.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["lab"])))},u.format.lab=Qe,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ze(e,"lab"),"array"===Je(e)&&3===e.length)return"lab"}});var et=s.unpack,tt=s.RAD2DEG,nt=Math.sqrt,rt=Math.atan2,it=Math.round,ot=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=et(e,"lab"),r=n[0],i=n[1],o=n[2],a=nt(i*i+o*o),s=(rt(o,i)*tt+360)%360;return 0===it(1e4*a)&&(s=Number.NaN),[r,a,s]},at=s.unpack,st=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=at(e,"rgb"),r=n[0],i=n[1],o=n[2],a=Ge(r,i,o),s=a[0],u=a[1],c=a[2];return ot(s,u,c)},ut=s.unpack,ct=s.DEG2RAD,lt=Math.sin,ft=Math.cos,ht=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ut(e,"lch"),r=n[0],i=n[1],o=n[2];return isNaN(o)&&(o=0),[r,ft(o*=ct)*i,lt(o)*i]},dt=s.unpack,pt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=dt(e,"lch"))[0],r=e[1],i=e[2],o=ht(n,r,i),a=o[0],s=o[1],u=o[2],c=Qe(a,s,u),l=c[0],f=c[1],h=c[2];return[l,f,h,e.length>3?e[3]:1]},yt=s.unpack,mt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=yt(e,"hcl").reverse();return pt.apply(void 0,n)},gt=s.unpack,vt=s.type;d.prototype.lch=function(){return st(this._rgb)},d.prototype.hcl=function(){return st(this._rgb).reverse()},y.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["lch"])))},y.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["hcl"])))},u.format.lch=pt,u.format.hcl=mt,["lch","hcl"].forEach((function(e){return u.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=gt(t,e),"array"===vt(t)&&3===t.length)return e}})}));var bt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},_t=s.type;d.prototype.name=function(){for(var e=re(this._rgb,"rgb"),t=0,n=Object.keys(bt);t<n.length;t+=1){var r=n[t];if(bt[r]===e)return r.toLowerCase()}return e},u.format.named=function(e){if(e=e.toLowerCase(),bt[e])return ae(bt[e]);throw new Error("unknown color name: "+e)},u.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===_t(e)&&bt[e.toLowerCase()])return"named"}});var Tt=s.unpack,wt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Tt(e,"rgb"),r=n[0],i=n[1],o=n[2];return(r<<16)+(i<<8)+o},St=s.type,Ct=function(e){if("number"==St(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},kt=s.type;d.prototype.num=function(){return wt(this._rgb)},y.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["num"])))},u.format.num=Ct,u.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===kt(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var Et=s.unpack,It=s.type,Ot=Math.round;d.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Ot)},d.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,n){return n<3?!1===e?t:Ot(t):t}))},y.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["rgb"])))},u.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Et(e,"rgba");return void 0===n[3]&&(n[3]=1),n},u.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Et(e,"rgba"),"array"===It(e)&&(3===e.length||4===e.length&&"number"==It(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var xt=Math.log,Pt=function(e){var t,n,r,i=e/100;return i<66?(t=255,n=-155.25485562709179-.44596950469579133*(n=i-2)+104.49216199393888*xt(n),r=i<20?0:.8274096064007395*(r=i-10)-254.76935184120902+115.67994401066147*xt(r)):(t=351.97690566805693+.114206453784165*(t=i-55)-40.25366309332127*xt(t),n=325.4494125711974+.07943456536662342*(n=i-50)-28.0852963507957*xt(n),r=255),[t,n,r,1]},At=s.unpack,Lt=Math.round,Rt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n,r=At(e,"rgb"),i=r[0],o=r[2],a=1e3,s=4e4,u=.4;s-a>u;){var c=Pt(n=.5*(s+a));c[2]/c[0]>=o/i?s=n:a=n}return Lt(n)};d.prototype.temp=d.prototype.kelvin=d.prototype.temperature=function(){return Rt(this._rgb)},y.temp=y.kelvin=y.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["temp"])))},u.format.temp=u.format.kelvin=u.format.temperature=Pt;var jt=s.type;d.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===jt(e)?t?(this._rgb[3]=e,this):new d([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},d.prototype.clipped=function(){return this._rgb._clipped||!1},d.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=Re*e,new d(t,"lab").alpha(this.alpha(),!0)},d.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},d.prototype.darker=d.prototype.darken,d.prototype.brighter=d.prototype.brighten,d.prototype.get=function(e){var t=e.split("."),n=t[0],r=t[1],i=this[n]();if(r){var o=n.indexOf(r);if(o>-1)return i[o];throw new Error("unknown channel "+r+" in mode "+n)}return i};var Dt=s.type,Mt=Math.pow;d.prototype.luminance=function(e){if(void 0!==e&&"number"===Dt(e)){if(0===e)return new d([0,0,0,this._rgb[3]],"rgb");if(1===e)return new d([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),n=20,r=function(t,i){var o=t.interpolate(i,.5,"rgb"),a=o.luminance();return Math.abs(e-a)<1e-7||!n--?o:a>e?r(t,o):r(o,i)},i=(t>e?r(new d([0,0,0]),this):r(this,new d([255,255,255]))).rgb();return new d(i.concat([this._rgb[3]]))}return Nt.apply(void 0,this._rgb.slice(0,3))};var Nt=function(e,t,n){return.2126*(e=Bt(e))+.7152*(t=Bt(t))+.0722*(n=Bt(n))},Bt=function(e){return(e/=255)<=.03928?e/12.92:Mt((e+.055)/1.055,2.4)},Ut={},Ft=s.type,Vt=function(e,t,n){void 0===n&&(n=.5);for(var r=[],i=arguments.length-3;i-- >0;)r[i]=arguments[i+3];var o=r[0]||"lrgb";if(Ut[o]||r.length||(o=Object.keys(Ut)[0]),!Ut[o])throw new Error("interpolation mode "+o+" is not defined");return"object"!==Ft(e)&&(e=new d(e)),"object"!==Ft(t)&&(t=new d(t)),Ut[o](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};d.prototype.mix=d.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Vt.apply(void 0,[this,e,t].concat(n))},d.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new d([t[0]*n,t[1]*n,t[2]*n,n],"rgb")},d.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=Re*e,t[1]<0&&(t[1]=0),new d(t,"lch").alpha(this.alpha(),!0)},d.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var Ht=s.type;d.prototype.set=function(e,t,n){void 0===n&&(n=!1);var r=e.split("."),i=r[0],o=r[1],a=this[i]();if(o){var s=i.indexOf(o);if(s>-1){if("string"==Ht(t))switch(t.charAt(0)){case"+":case"-":a[s]+=+t;break;case"*":a[s]*=+t.substr(1);break;case"/":a[s]/=+t.substr(1);break;default:a[s]=+t}else{if("number"!==Ht(t))throw new Error("unsupported value for Color.set");a[s]=t}var u=new d(a,i);return n?(this._rgb=u._rgb,this):u}throw new Error("unknown channel "+o+" in mode "+i)}return a},Ut.rgb=function(e,t,n){var r=e._rgb,i=t._rgb;return new d(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"rgb")};var Wt=Math.sqrt,zt=Math.pow;Ut.lrgb=function(e,t,n){var r=e._rgb,i=r[0],o=r[1],a=r[2],s=t._rgb,u=s[0],c=s[1],l=s[2];return new d(Wt(zt(i,2)*(1-n)+zt(u,2)*n),Wt(zt(o,2)*(1-n)+zt(c,2)*n),Wt(zt(a,2)*(1-n)+zt(l,2)*n),"rgb")},Ut.lab=function(e,t,n){var r=e.lab(),i=t.lab();return new d(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"lab")};var qt=function(e,t,n,r){var i,o,a,s,u,c,l,f,h,p,y,m;return"hsl"===r?(a=e.hsl(),s=t.hsl()):"hsv"===r?(a=e.hsv(),s=t.hsv()):"hcg"===r?(a=e.hcg(),s=t.hcg()):"hsi"===r?(a=e.hsi(),s=t.hsi()):"lch"!==r&&"hcl"!==r||(r="hcl",a=e.hcl(),s=t.hcl()),"h"===r.substr(0,1)&&(u=(i=a)[0],l=i[1],h=i[2],c=(o=s)[0],f=o[1],p=o[2]),isNaN(u)||isNaN(c)?isNaN(u)?isNaN(c)?m=Number.NaN:(m=c,1!=h&&0!=h||"hsv"==r||(y=f)):(m=u,1!=p&&0!=p||"hsv"==r||(y=l)):m=u+n*(c>u&&c-u>180?c-(u+360):c<u&&u-c>180?c+360-u:c-u),void 0===y&&(y=l+n*(f-l)),new d([m,y,h+n*(p-h)],r)},Gt=function(e,t,n){return qt(e,t,n,"lch")};Ut.lch=Gt,Ut.hcl=Gt,Ut.num=function(e,t,n){var r=e.num(),i=t.num();return new d(r+n*(i-r),"num")},Ut.hcg=function(e,t,n){return qt(e,t,n,"hcg")},Ut.hsi=function(e,t,n){return qt(e,t,n,"hsi")},Ut.hsl=function(e,t,n){return qt(e,t,n,"hsl")},Ut.hsv=function(e,t,n){return qt(e,t,n,"hsv")};var Yt=s.clip_rgb,Xt=Math.pow,Kt=Math.sqrt,$t=Math.PI,Qt=Math.cos,Zt=Math.sin,Jt=Math.atan2,en=function(e,t){for(var n=e.length,r=[0,0,0,0],i=0;i<e.length;i++){var o=e[i],a=t[i]/n,s=o._rgb;r[0]+=Xt(s[0],2)*a,r[1]+=Xt(s[1],2)*a,r[2]+=Xt(s[2],2)*a,r[3]+=s[3]*a}return r[0]=Kt(r[0]),r[1]=Kt(r[1]),r[2]=Kt(r[2]),r[3]>.9999999&&(r[3]=1),new d(Yt(r))},tn=s.type,nn=Math.pow,rn=function(e){var t="rgb",n=y("#ccc"),r=0,i=[0,1],o=[],a=[0,0],s=!1,u=[],c=!1,l=0,f=1,h=!1,d={},p=!0,m=1,g=function(e){if((e=e||["#fff","#000"])&&"string"===tn(e)&&y.brewer&&y.brewer[e.toLowerCase()]&&(e=y.brewer[e.toLowerCase()]),"array"===tn(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t<e.length;t++)e[t]=y(e[t]);o.length=0;for(var n=0;n<e.length;n++)o.push(n/(e.length-1))}return T(),u=e},v=function(e){return e},b=function(e){return e},_=function(e,r){var i,c;if(null==r&&(r=!1),isNaN(e)||null===e)return n;c=r?e:s&&s.length>2?function(e){if(null!=s){for(var t=s.length-1,n=0;n<t&&e>=s[n];)n++;return n-1}return 0}(e)/(s.length-2):f!==l?(e-l)/(f-l):1,c=b(c),r||(c=v(c)),1!==m&&(c=nn(c,m)),c=a[0]+c*(1-a[0]-a[1]),c=Math.min(1,Math.max(0,c));var h=Math.floor(1e4*c);if(p&&d[h])i=d[h];else{if("array"===tn(u))for(var g=0;g<o.length;g++){var _=o[g];if(c<=_){i=u[g];break}if(c>=_&&g===o.length-1){i=u[g];break}if(c>_&&c<o[g+1]){c=(c-_)/(o[g+1]-_),i=y.interpolate(u[g],u[g+1],c,t);break}}else"function"===tn(u)&&(i=u(c));p&&(d[h]=i)}return i},T=function(){return d={}};g(e);var w=function(e){var t=y(_(e));return c&&t[c]?t[c]():t};return w.classes=function(e){if(null!=e){if("array"===tn(e))s=e,i=[e[0],e[e.length-1]];else{var t=y.analyze(i);s=0===e?[t.min,t.max]:y.limits(t,"e",e)}return w}return s},w.domain=function(e){if(!arguments.length)return i;l=e[0],f=e[e.length-1],o=[];var t=u.length;if(e.length===t&&l!==f)for(var n=0,r=Array.from(e);n<r.length;n+=1){var a=r[n];o.push((a-l)/(f-l))}else{for(var s=0;s<t;s++)o.push(s/(t-1));if(e.length>2){var c=e.map((function(t,n){return n/(e.length-1)})),h=e.map((function(e){return(e-l)/(f-l)}));h.every((function(e,t){return c[t]===e}))||(b=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=h[t+1];)t++;var n=(e-h[t])/(h[t+1]-h[t]);return c[t]+n*(c[t+1]-c[t])})}}return i=[l,f],w},w.mode=function(e){return arguments.length?(t=e,T(),w):t},w.range=function(e,t){return g(e),w},w.out=function(e){return c=e,w},w.spread=function(e){return arguments.length?(r=e,w):r},w.correctLightness=function(e){return null==e&&(e=!0),h=e,T(),v=h?function(e){for(var t=_(0,!0).lab()[0],n=_(1,!0).lab()[0],r=t>n,i=_(e,!0).lab()[0],o=t+(n-t)*e,a=i-o,s=0,u=1,c=20;Math.abs(a)>.01&&c-- >0;)r&&(a*=-1),a<0?(s=e,e+=.5*(u-e)):(u=e,e+=.5*(s-e)),i=_(e,!0).lab()[0],a=i-o;return e}:function(e){return e},w},w.padding=function(e){return null!=e?("number"===tn(e)&&(e=[e,e]),a=e,w):a},w.colors=function(t,n){arguments.length<2&&(n="hex");var r=[];if(0===arguments.length)r=u.slice(0);else if(1===t)r=[w(.5)];else if(t>1){var o=i[0],a=i[1]-o;r=on(0,t,!1).map((function(e){return w(o+e/(t-1)*a)}))}else{e=[];var c=[];if(s&&s.length>2)for(var l=1,f=s.length,h=1<=f;h?l<f:l>f;h?l++:l--)c.push(.5*(s[l-1]+s[l]));else c=i;r=c.map((function(e){return w(e)}))}return y[n]&&(r=r.map((function(e){return e[n]()}))),r},w.cache=function(e){return null!=e?(p=e,w):p},w.gamma=function(e){return null!=e?(m=e,w):m},w.nodata=function(e){return null!=e?(n=y(e),w):n},w};function on(e,t,n){for(var r=[],i=e<t,o=n?i?t+1:t-1:t,a=e;i?a<o:a>o;i?a++:a--)r.push(a);return r}var an=function(e){var t,n,r,i,o,a,s;if(2===(e=e.map((function(e){return new d(e)}))).length)t=e.map((function(e){return e.lab()})),o=t[0],a=t[1],i=function(e){var t=[0,1,2].map((function(t){return o[t]+e*(a[t]-o[t])}));return new d(t,"lab")};else if(3===e.length)n=e.map((function(e){return e.lab()})),o=n[0],a=n[1],s=n[2],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*o[t]+2*(1-e)*e*a[t]+e*e*s[t]}));return new d(t,"lab")};else if(4===e.length){var u;r=e.map((function(e){return e.lab()})),o=r[0],a=r[1],s=r[2],u=r[3],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*o[t]+3*(1-e)*(1-e)*e*a[t]+3*(1-e)*e*e*s[t]+e*e*e*u[t]}));return new d(t,"lab")}}else if(5===e.length){var c=an(e.slice(0,3)),l=an(e.slice(2,5));i=function(e){return e<.5?c(2*e):l(2*(e-.5))}}return i},sn=function(e,t,n){if(!sn[n])throw new Error("unknown blend mode "+n);return sn[n](e,t)},un=function(e){return function(t,n){var r=y(n).rgb(),i=y(t).rgb();return y.rgb(e(r,i))}},cn=function(e){return function(t,n){var r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r}};sn.normal=un(cn((function(e){return e}))),sn.multiply=un(cn((function(e,t){return e*t/255}))),sn.screen=un(cn((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),sn.overlay=un(cn((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),sn.darken=un(cn((function(e,t){return e>t?t:e}))),sn.lighten=un(cn((function(e,t){return e>t?e:t}))),sn.dodge=un(cn((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),sn.burn=un(cn((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var ln=sn,fn=s.type,hn=s.clip_rgb,dn=s.TWOPI,pn=Math.pow,yn=Math.sin,mn=Math.cos,gn=Math.floor,vn=Math.random,bn=Math.log,_n=Math.pow,Tn=Math.floor,wn=Math.abs,Sn=function(e,t){void 0===t&&(t=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===o(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===o(e)&&(e=e[t]),null==e||isNaN(e)||(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(e,t){return Cn(n,e,t)},n},Cn=function(e,t,n){void 0===t&&(t="equal"),void 0===n&&(n=7),"array"==o(e)&&(e=Sn(e));var r=e.min,i=e.max,a=e.values.sort((function(e,t){return e-t}));if(1===n)return[r,i];var s=[];if("c"===t.substr(0,1)&&(s.push(r),s.push(i)),"e"===t.substr(0,1)){s.push(r);for(var u=1;u<n;u++)s.push(r+u/n*(i-r));s.push(i)}else if("l"===t.substr(0,1)){if(r<=0)throw new Error("Logarithmic scales are only possible for values > 0");var c=Math.LOG10E*bn(r),l=Math.LOG10E*bn(i);s.push(r);for(var f=1;f<n;f++)s.push(_n(10,c+f/n*(l-c)));s.push(i)}else if("q"===t.substr(0,1)){s.push(r);for(var h=1;h<n;h++){var d=(a.length-1)*h/n,p=Tn(d);if(p===d)s.push(a[p]);else{var y=d-p;s.push(a[p]*(1-y)+a[p+1]*y)}}s.push(i)}else if("k"===t.substr(0,1)){var m,g=a.length,v=new Array(g),b=new Array(n),_=!0,T=0,w=null;(w=[]).push(r);for(var S=1;S<n;S++)w.push(r+S/n*(i-r));for(w.push(i);_;){for(var C=0;C<n;C++)b[C]=0;for(var k=0;k<g;k++)for(var E=a[k],I=Number.MAX_VALUE,O=void 0,x=0;x<n;x++){var P=wn(w[x]-E);P<I&&(I=P,O=x),b[O]++,v[k]=O}for(var A=new Array(n),L=0;L<n;L++)A[L]=null;for(var R=0;R<g;R++)null===A[m=v[R]]?A[m]=a[R]:A[m]+=a[R];for(var j=0;j<n;j++)A[j]*=1/b[j];_=!1;for(var D=0;D<n;D++)if(A[D]!==w[D]){_=!0;break}w=A,++T>200&&(_=!1)}for(var M={},N=0;N<n;N++)M[N]=[];for(var B=0;B<g;B++)M[m=v[B]].push(a[B]);for(var U=[],F=0;F<n;F++)U.push(M[F][0]),U.push(M[F][M[F].length-1]);U=U.sort((function(e,t){return e-t})),s.push(U[0]);for(var V=1;V<U.length;V+=2){var H=U[V];isNaN(H)||-1!==s.indexOf(H)||s.push(H)}}return s},kn={analyze:Sn,limits:Cn},En=Math.sqrt,In=Math.atan2,On=Math.abs,xn=Math.cos,Pn=Math.PI,An={cool:function(){return rn([y.hsl(180,1,.9),y.hsl(250,.7,.4)])},hot:function(){return rn(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Ln={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Rn=0,jn=Object.keys(Ln);Rn<jn.length;Rn+=1){var Dn=jn[Rn];Ln[Dn.toLowerCase()]=Ln[Dn]}var Mn=Ln;return y.average=function(e,t,n){void 0===t&&(t="lrgb"),void 0===n&&(n=null);var r=e.length;n||(n=Array.from(new Array(r)).map((function(){return 1})));var i=r/n.reduce((function(e,t){return e+t}));if(n.forEach((function(e,t){n[t]*=i})),e=e.map((function(e){return new d(e)})),"lrgb"===t)return en(e,n);for(var o=e.shift(),a=o.get(t),s=[],u=0,c=0,l=0;l<a.length;l++)if(a[l]=(a[l]||0)*n[0],s.push(isNaN(a[l])?0:n[0]),"h"===t.charAt(l)&&!isNaN(a[l])){var f=a[l]/180*$t;u+=Qt(f)*n[0],c+=Zt(f)*n[0]}var h=o.alpha()*n[0];e.forEach((function(e,r){var i=e.get(t);h+=e.alpha()*n[r+1];for(var o=0;o<a.length;o++)if(!isNaN(i[o]))if(s[o]+=n[r+1],"h"===t.charAt(o)){var l=i[o]/180*$t;u+=Qt(l)*n[r+1],c+=Zt(l)*n[r+1]}else a[o]+=i[o]*n[r+1]}));for(var p=0;p<a.length;p++)if("h"===t.charAt(p)){for(var y=Jt(c/s[p],u/s[p])/$t*180;y<0;)y+=360;for(;y>=360;)y-=360;a[p]=y}else a[p]=a[p]/s[p];return h/=r,new d(a,t).alpha(h>.99999?1:h,!0)},y.bezier=function(e){var t=an(e);return t.scale=function(){return rn(t)},t},y.blend=ln,y.cubehelix=function(e,t,n,r,i){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=[0,1]);var o,a=0;"array"===fn(i)?o=i[1]-i[0]:(o=0,i=[i,i]);var s=function(s){var u=dn*((e+120)/360+t*s),c=pn(i[0]+o*s,r),l=(0!==a?n[0]+s*a:n)*c*(1-c)/2,f=mn(u),h=yn(u);return y(hn([255*(c+l*(-.14861*f+1.78277*h)),255*(c+l*(-.29227*f-.90649*h)),255*(c+l*(1.97294*f)),1]))};return s.start=function(t){return null==t?e:(e=t,s)},s.rotations=function(e){return null==e?t:(t=e,s)},s.gamma=function(e){return null==e?r:(r=e,s)},s.hue=function(e){return null==e?n:("array"===fn(n=e)?0==(a=n[1]-n[0])&&(n=n[1]):a=0,s)},s.lightness=function(e){return null==e?i:("array"===fn(e)?(i=e,o=e[1]-e[0]):(i=[e,e],o=0),s)},s.scale=function(){return y.scale(s)},s.hue(n),s},y.mix=y.interpolate=Vt,y.random=function(){for(var e="#",t=0;t<6;t++)e+="0123456789abcdef".charAt(gn(16*vn()));return new d(e,"hex")},y.scale=rn,y.analyze=kn.analyze,y.contrast=function(e,t){e=new d(e),t=new d(t);var n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},y.deltaE=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1),e=new d(e),t=new d(t);for(var i=Array.from(e.lab()),o=i[0],a=i[1],s=i[2],u=Array.from(t.lab()),c=u[0],l=u[1],f=u[2],h=En(a*a+s*s),p=En(l*l+f*f),y=o<16?.511:.040975*o/(1+.01765*o),m=.0638*h/(1+.0131*h)+.638,g=h<1e-6?0:180*In(s,a)/Pn;g<0;)g+=360;for(;g>=360;)g-=360;var v=g>=164&&g<=345?.56+On(.2*xn(Pn*(g+168)/180)):.36+On(.4*xn(Pn*(g+35)/180)),b=h*h*h*h,_=En(b/(b+1900)),T=m*(_*v+1-_),w=h-p,S=a-l,C=s-f,k=(o-c)/(n*y),E=w/(r*m);return En(k*k+E*E+(S*S+C*C-w*w)/(T*T))},y.distance=function(e,t,n){void 0===n&&(n="lab"),e=new d(e),t=new d(t);var r=e.get(n),i=t.get(n),o=0;for(var a in r){var s=(r[a]||0)-(i[a]||0);o+=s*s}return Math.sqrt(o)},y.limits=kn.limits,y.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(d,[null].concat(e))),!0}catch(e){return!1}},y.scales=An,y.colors=bt,y.brewer=Mn,y}()},function(e,t,n){e.exports={heatMap:"_3eiuN",legend:"_2Ubvw"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(0),i=n.n(r),o=n(7),a=n(1043),s=n(1059),u=n.n(s),c=o.a.encloseNamespace("shared.videoEngagementOverlay");function l(){return i.a.createElement("div",{className:"bg-white rounded d-flex flex-column justify-content-end p-2 ".concat(u.a.partialLoadingContainer)},i.a.createElement("div",{className:u.a.heatMapContainer},i.a.createElement("div",{className:"position-relative"},i.a.createElement(a.a,{engagement:{heatMap:[],videoDuration:0},className:u.a.heatMap}))),i.a.createElement("div",{className:"d-flex justify-content-between mt-2"},i.a.createElement("strong",null,c("engagement")),i.a.createElement("div",{className:"w-33"},i.a.createElement(a.b,null))))}},function(e,t,n){e.exports={heatMap:"_29m1b"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(0),i=n(22),o=n(33),a=n(34),s=n(849);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){var t=u(Object(o.a)(a.a.DATE_RANGE_QUERY_PARAMS),1)[0],n=i.a.useBasicFetch(s.a.individualEngagement(e,t)),c=u(Object(o.a)(a.a.AUDIENCE_FILTER_SUGGESTIONS),2)[1];Object(r.useEffect)((function(){var e;n.data&&c("users",null===(e=n.data)||void 0===e?void 0:e.data.map((function(e){return e.userId})))}),[n.isFetching])}},,,,,,,,,function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(7),a=n(1071),s=n.n(a),u=n(1072),c=n.n(u),l=n(61),f=n.n(l),h=n(69),d=n.n(h),p=(n(1074),n(1075),n(57)),y=n.n(p),m=n(1076),g=n.n(m),v=n(1050),b=n.n(v),_=n(1077),T=n.n(_),w=n(1079),S=n.n(w),C=n(1084),k=n.n(C),E=n(1086),I=n.n(E),O=n(1052),x=n.n(O),P=n(1088),A=n.n(P),L=n(1053),R=n.n(L),j=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return y()(t,e),t.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(A.a),D=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},i=n.length;i--;)""!==n[i]&&((t=/([^=]*)=(.*)/.exec(n[i]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),r[t[0]]=t[1]);return r},M=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}y()(t,e);var n=t.prototype;return n.push=function(e){var t,n,r=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce((function(t,n){var r=n(e);return r===e?t:t.concat([r])}),[e]).forEach((function(e){for(var i=0;i<r.customParsers.length;i++)if(r.customParsers[i].call(r,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))r.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void r.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"totalduration"},t[1]&&(n.duration=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void r.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"byterange"},t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),void r.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var o=D(t[1]);if(o.URI&&(n.uri=o.URI),o.BYTERANGE){var a=o.BYTERANGE.split("@"),s=a[0],u=a[1];n.byterange={},s&&(n.byterange.length=parseInt(s,10)),u&&(n.byterange.offset=parseInt(u,10))}}r.trigger("data",n)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=D(t[1]),n.attributes.RESOLUTION){var c=n.attributes.RESOLUTION.split("x"),l={};c[0]&&(l.width=parseInt(c[0],10)),c[1]&&(l.height=parseInt(c[1],10)),n.attributes.RESOLUTION=l}n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))}r.trigger("data",n)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=D(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e))r.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))r.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=D(t[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void r.trigger("data",n);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return n={type:"tag",tagType:"start"},t[1]&&(n.attributes=D(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);r.trigger("data",{type:"tag",data:e.slice(4)})}}}else r.trigger("data",{type:"comment",text:e.slice(1)})})):this.trigger("data",{type:"uri",uri:e}))},n.addParser=function(e){var t=this,n=e.expression,r=e.customType,i=e.dataParser,o=e.segment;"function"!=typeof i&&(i=function(e){return e}),this.customParsers.push((function(e){if(n.exec(e))return t.trigger("data",{type:"custom",data:i(e),customType:r,segment:o}),!0}))},n.addTagMapper=function(e){var t=e.expression,n=e.map;this.tagMappers.push((function(e){return t.test(e)?n(e):e}))},t}(A.a),N=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new j,t.parseStream=new M,t.lineStream.pipe(t.parseStream);var n,r,i=d()(t),o=[],a={},s=function(){},u={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var l=0;return t.parseStream.on("data",(function(e){var t,h;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(a.byterange=t,t.length=e.length,"offset"in e||(e.offset=l)),"offset"in e&&(a.byterange=t,t.offset=e.offset),l=t.offset+t.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(a.duration=e.duration),0===e.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=o},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?void(this.manifest.contentProtection={"com.widevine.alpha":{attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:R()(e.attributes.URI.split(",")[1])}}):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(r.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){n={},e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange)},"stream-inf":function(){this.manifest.playlists=o,this.manifest.mediaGroups=this.manifest.mediaGroups||u,e.attributes?(a.attributes||(a.attributes={}),f()(a.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||u,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var n=this.manifest.mediaGroups[e.attributes.TYPE];n[e.attributes["GROUP-ID"]]=n[e.attributes["GROUP-ID"]]||{},t=n[e.attributes["GROUP-ID"]],(h={default:/yes/i.test(e.attributes.DEFAULT)}).default?h.autoselect=!0:h.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(h.language=e.attributes.LANGUAGE),e.attributes.URI&&(h.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(h.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(h.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(h.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=h}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){c+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(o.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),a.dateTimeString=e.dateTimeString,a.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):this.manifest.targetDuration=e.duration},totalduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration}):this.manifest.totalDuration=e.duration},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=e.data},"cue-out-cont":function(){a.cueOutCont=e.data},"cue-in":function(){a.cueIn=e.data}}[e.tagType]||s).call(i)},uri:function(){a.uri=e.uri,o.push(a),this.manifest.targetDuration&&!("duration"in a)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),r&&(a.key=r),a.timeline=c,n&&(a.map=n),a={}},comment:function(){},custom:function(){e.segment?(a.custom=a.custom||{},a.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(i)})),t}y()(t,e);var n=t.prototype;return n.push=function(e){this.lineStream.push(e)},n.end=function(){this.lineStream.push("\n")},n.addParser=function(e){this.parseStream.addParser(e)},n.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(A.a),B=n(1093),U=n(871),F=n.n(U),V=n(1094),H=function(e){return!!e&&"object"==typeof e},W=function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(t,n){return"object"!=typeof n||Object.keys(n).forEach((function(r){Array.isArray(t[r])&&Array.isArray(n[r])?t[r]=t[r].concat(n[r]):H(t[r])&&H(n[r])?t[r]=e(t[r],n[r]):t[r]=n[r]})),t}),{})},z=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},q=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},G="INVALID_NUMBER_OF_PERIOD",Y="DASH_EMPTY_MANIFEST",X="DASH_INVALID_XML",K="NO_BASE_URL",$="SEGMENT_TIME_UNSPECIFIED",Q="UNSUPPORTED_UTC_TIMING_SCHEME",Z=function(e){var t=e.baseUrl,n=void 0===t?"":t,r=e.source,i=void 0===r?"":r,o=e.range,a=void 0===o?"":o,s=e.indexRange,u=void 0===s?"":s,c={uri:i,resolvedUri:x()(n||"",i)};if(a||u){var l=(a||u).split("-"),f=parseInt(l[0],10),h=parseInt(l[1],10);c.byterange={length:h-f+1,offset:f}}return c},J={static:function(e){var t=e.duration,n=e.timescale,r=void 0===n?1:n,i=e.sourceDuration;return{start:0,end:Math.ceil(i/(t/r))}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,r=e.availabilityStartTime,i=e.timescale,o=void 0===i?1:i,a=e.duration,s=e.start,u=void 0===s?0:s,c=e.minimumUpdatePeriod,l=void 0===c?0:c,f=e.timeShiftBufferDepth,h=void 0===f?1/0:f,d=(t+n)/1e3,p=r+u,y=d+l-p,m=Math.ceil(y*o/a),g=Math.floor((d-p-h)*o/a),v=Math.floor((d-p)*o/a);return{start:Math.max(0,g),end:Math.min(m,v)}}},ee=function(e){var t=e.type,n=void 0===t?"static":t,r=e.duration,i=e.timescale,o=void 0===i?1:i,a=e.sourceDuration,s=J[n](e),u=function(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n}(s.start,s.end).map(function(e){return function(t,n){var r=e.duration,i=e.timescale,o=void 0===i?1:i,a=e.periodIndex,s=e.startNumber;return{number:(void 0===s?1:s)+t,duration:r/o,timeline:a,time:n*r}}}(e));if("static"===n){var c=u.length-1;u[c].duration=a-r/o*c}return u},te=function(e){var t=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,i=e.sourceDuration,o=e.indexRange,a=void 0===o?"":o,s=e.duration;if(!t)throw new Error(K);var u=Z({baseUrl:t,source:r.sourceURL,range:r.range}),c=Z({baseUrl:t,source:t,indexRange:a});if(c.map=u,s){var l=ee(e);l.length&&(c.duration=l[0].duration,c.timeline=l[0].timeline)}else i&&(c.duration=i,c.timeline=0);return c.number=0,[c]},ne=function(e,t,n){for(var r=e.sidx.map?e.sidx.map:null,i=e.sidx.duration,o=e.timeline||0,a=e.sidx.byterange,s=a.offset+a.length,u=t.timescale,c=t.references.filter((function(e){return 1!==e.referenceType})),l=[],f=s+t.firstOffset,h=0;h<c.length;h++){var d=t.references[h],p=d.referencedSize,y=d.subsegmentDuration,m=te({baseUrl:n,timescale:u,timeline:o,periodIndex:o,duration:y,sourceDuration:i,indexRange:f+"-"+(f+p-1)})[0];r&&(m.map=r),l.push(m),f+=p}return e.segments=l,e},re=function(e){var t;return(t=e.reduce((function(e,t){var n,r=t.attributes.id+(t.attributes.lang||"");return e[r]?(t.segments[0]&&(t.segments[0].discontinuity=!0),(n=e[r].segments).push.apply(n,t.segments),t.attributes.contentProtection&&(e[r].attributes.contentProtection=t.attributes.contentProtection)):e[r]=t,e}),{}),Object.keys(t).map((function(e){return t[e]}))).map((function(e){var t,n;return e.discontinuityStarts=(t=e.segments,n="discontinuity",t.reduce((function(e,t,r){return t[n]&&e.push(r),e}),[])),e}))},ie=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e){var r=e[n];if(r.sidx){var i=r.sidx.uri+"-"+(a=r.sidx.byterange,s=void 0,s=a.offset+a.length-1,a.offset+"-"+s),o=t[i]&&t[i].sidx;r.sidx&&o&&ne(r,o,r.sidx.resolvedUri)}}var a,s;return e},oe=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,o={attributes:(t={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},ae=function(e){var t,n=e.attributes,r=e.segments;void 0===r&&(r=[{uri:n.baseUrl,timeline:n.periodIndex,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var i=((t={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,t);return n.codecs&&(i.CODECS=n.codecs),{attributes:i,uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:n.baseUrl||"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1}},se=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,o={attributes:(t={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},ue=function(e,t,n){var r;if(void 0===n&&(n={}),!e.length)return{};var i=e[0].attributes,o=i.sourceDuration,a=i.type,s=void 0===a?"static":a,u=i.suggestedPresentationDelay,c=i.minimumUpdatePeriod,l=re(e.filter((function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType}))).map(se),f=re(e.filter((function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType}))),h=e.filter((function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType})),d={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(r={AUDIO:{},VIDEO:{}},r["CLOSED-CAPTIONS"]={},r.SUBTITLES={},r),uri:"",duration:o,playlists:ie(l,n)};return c>=0&&(d.minimumUpdatePeriod=1e3*c),t&&(d.locations=t),"dynamic"===s&&(d.suggestedPresentationDelay=u),f.length&&(d.mediaGroups.AUDIO.audio=function(e,t){var n;void 0===t&&(t={});var r=e.reduce((function(e,r){var i=r.attributes.role&&r.attributes.role.value||"",o=r.attributes.lang||"",a="main";if(o){var s=i?" ("+i+")":"";a=""+r.attributes.lang+s}return e[a]&&e[a].playlists[0].attributes.BANDWIDTH>r.attributes.bandwidth||(e[a]={language:o,autoselect:!0,default:"main"===i,playlists:ie([oe(r)],t),uri:""},void 0===n&&"main"===i&&((n=r).default=!0)),e}),{});n||(r[Object.keys(r)[0]].default=!0);return r}(f,n)),h.length&&(d.mediaGroups.SUBTITLES.subs=function(e,t){return void 0===t&&(t={}),e.reduce((function(e,n){var r=n.attributes.lang||"text";return e[r]||(e[r]={language:r,default:!1,autoselect:!1,playlists:ie([ae(n)],t),uri:""}),e}),{})}(h,n)),d},ce=function(e,t,n){var r=e.NOW,i=e.clientOffset,o=e.availabilityStartTime,a=e.timescale,s=void 0===a?1:a,u=e.start,c=void 0===u?0:u,l=e.minimumUpdatePeriod,f=(r+i)/1e3+(void 0===l?0:l)-(o+c);return Math.ceil((f*s-t)/n)},le=function(e,t){for(var n=e.type,r=void 0===n?"static":n,i=e.minimumUpdatePeriod,o=void 0===i?0:i,a=e.media,s=void 0===a?"":a,u=e.sourceDuration,c=e.timescale,l=void 0===c?1:c,f=e.startNumber,h=void 0===f?1:f,d=e.periodIndex,p=[],y=-1,m=0;m<t.length;m++){var g=t[m],v=g.d,b=g.r||0,_=g.t||0;y<0&&(y=_),_&&_>y&&(y=_);var T=void 0;if(b<0){var w=m+1;T=w===t.length?"dynamic"===r&&o>0&&s.indexOf("$Number$")>0?ce(e,y,v):(u*l-y)/v:(t[w].t-y)/v}else T=b+1;for(var S=h+p.length+T,C=h+p.length;C<S;)p.push({number:C,duration:v/l,time:y,timeline:d}),y+=v,C++}return p},fe=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,he=function(e,t){return e.replace(fe,function(e){return function(t,n,r,i){if("$$"===t)return"$";if(void 0===e[n])return t;var o=""+e[n];return"RepresentationID"===n?o:(i=r?parseInt(i,10):1,o.length>=i?o:""+new Array(i-o.length+1).join("0")+o)}}(t))},de=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},r=e.initialization,i=void 0===r?{sourceURL:"",range:""}:r,o=Z({baseUrl:e.baseUrl,source:he(i.sourceURL,n),range:i.range});return function(e,t){return e.duration||t?e.duration?ee(e):le(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]}(e,t).map((function(t){n.Number=t.number,n.Time=t.time;var r=he(e.media||"",n);return{uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:x()(e.baseUrl||"",r),map:o,number:t.number}}))},pe=function(e,t){var n=e.duration,r=e.segmentUrls,i=void 0===r?[]:r;if(!n&&!t||n&&t)throw new Error($);var o,a=i.map((function(t){return function(e,t){var n=e.baseUrl,r=e.initialization,i=void 0===r?{}:r,o=Z({baseUrl:n,source:i.sourceURL,range:i.range}),a=Z({baseUrl:n,source:t.media,range:t.mediaRange});return a.map=o,a}(e,t)}));return n&&(o=ee(e)),t&&(o=le(e,t)),o.map((function(e,t){if(a[t]){var n=a[t];return n.timeline=e.timeline,n.duration=e.duration,n.number=e.number,n}})).filter((function(e){return e}))},ye=function(e){var t,n,r=e.attributes,i=e.segmentInfo;i.template?(n=de,t=W(r,i.template)):i.base?(n=te,t=W(r,i.base)):i.list&&(n=pe,t=W(r,i.list));var o={attributes:r};if(!n)return o;var a=n(t,i.timeline);if(t.duration){var s=t,u=s.duration,c=s.timescale,l=void 0===c?1:c;t.duration=u/l}else a.length?t.duration=a.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return o.attributes=t,o.segments=a,i.base&&t.indexRange&&(o.sidx=a[0],o.segments=[]),o},me=function(e,t){return q(e.childNodes).filter((function(e){return e.tagName===t}))},ge=function(e){return e.textContent.trim()},ve=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var n=t.slice(1),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(i||0)+86400*parseFloat(o||0)+3600*parseFloat(a||0)+60*parseFloat(s||0)+parseFloat(u||0)},be={mediaPresentationDuration:function(e){return ve(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return ve(e)},suggestedPresentationDelay:function(e){return ve(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return ve(e)},start:function(e){return ve(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?ve(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},_e=function(e){return e&&e.attributes?q(e.attributes).reduce((function(e,t){var n=be[t.name]||be.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},Te={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},we=function(e,t){return t.length?z(e.map((function(e){return t.map((function(t){return x()(e,ge(t))}))}))):e},Se=function(e){var t=me(e,"SegmentTemplate")[0],n=me(e,"SegmentList")[0],r=n&&me(n,"SegmentURL").map((function(e){return W({tag:"SegmentURL"},_e(e))})),i=me(e,"SegmentBase")[0],o=n||t,a=o&&me(o,"SegmentTimeline")[0],s=n||i||t,u=s&&me(s,"Initialization")[0],c=t&&_e(t);c&&u?c.initialization=u&&_e(u):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});var l={template:c,timeline:a&&me(a,"S").map((function(e){return _e(e)})),list:n&&W(_e(n),{segmentUrls:r,initialization:_e(u)}),base:i&&W(_e(i),{initialization:_e(u)})};return Object.keys(l).forEach((function(e){l[e]||delete l[e]})),l},Ce=function(e,t,n){return function(r){var i=_e(r),o=we(t,me(r,"BaseURL")),a=me(r,"Role")[0],s={role:_e(a)},u=W(e,i,s),c=me(r,"ContentProtection").reduce((function(e,t){var n=_e(t),r=Te[n.schemeIdUri];if(r){e[r]={attributes:n};var i=me(t,"cenc:pssh")[0];if(i){var o=ge(i),a=o&&R()(o);e[r].pssh=a}}return e}),{});Object.keys(c).length&&(u=W(u,{contentProtection:c}));var l=Se(r),f=me(r,"Representation"),h=W(n,l);return z(f.map(function(e,t,n){return function(r){var i=me(r,"BaseURL"),o=we(t,i),a=W(e,_e(r)),s=Se(r);return o.map((function(e){return{segmentInfo:W(n,s),attributes:W(a,{baseUrl:e})}}))}}(u,o,h)))}},ke=function(e,t){return function(n,r){var i=we(t,me(n,"BaseURL")),o=_e(n),a=parseInt(o.id,10),s=F.a.isNaN(a)?r:a,u=W(e,{periodIndex:s}),c=me(n,"AdaptationSet"),l=Se(n);return z(c.map(Ce(u,i,l)))}},Ee=function(e){if(""===e)throw new Error(Y);var t,n,r=new V.DOMParser;try{n=(t=r.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(X);return n},Ie=function(e,t){void 0===t&&(t={});var n=function(e,t){void 0===t&&(t={});var n=t,r=n.manifestUri,i=void 0===r?"":r,o=n.NOW,a=void 0===o?Date.now():o,s=n.clientOffset,u=void 0===s?0:s,c=me(e,"Period");if(!c.length)throw new Error(G);var l=me(e,"Location"),f=_e(e),h=we([i],me(e,"BaseURL"));return f.sourceDuration=f.mediaPresentationDuration||0,f.NOW=a,f.clientOffset=u,l.length&&(f.locations=l.map(ge)),{locations:f.locations,representationInfo:z(c.map(ke(f,h)))}}(Ee(e),t),r=n.representationInfo.map(ye);return ue(r,n.locations,t.sidxMapping)},Oe=function(e){return function(e){var t=me(e,"UTCTiming")[0];if(!t)return null;var n=_e(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(Q)}return n}(Ee(e))},xe=ne,Pe=n(1096),Ae=n.n(Pe),Le=n(1097),Re=n(1098),je=n(1099),De=n.n(je),Me=n(1056),Ne=n(1104),Be=n.n(Ne),Ue=n(1110),Fe=[];var Ve=function e(t){var n,r="info",i=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n("log",r,t)};return n=function(e,t){return function(n,r,i){var o=t.levels[r],a=new RegExp("^("+o+")$");if("log"!==n&&i.unshift(n.toUpperCase()+":"),i.unshift(e+":"),Fe){Fe.push([].concat(i));var u=Fe.length-1e3;Fe.splice(0,u>0?u:0)}if(s.a.console){var c=s.a.console[n];c||"debug"!==n||(c=s.a.console.info||s.a.console.log),c&&o&&a.test(n)&&c[Array.isArray(i)?"apply":"call"](s.a.console,i)}}}(t,i),i.createLogger=function(n){return e(t+": "+n)},i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},i.level=function(e){if("string"==typeof e){if(!i.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},(i.history=function(){return Fe?[].concat(Fe):[]}).filter=function(e){return(Fe||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},i.history.clear=function(){Fe&&(Fe.length=0)},i.history.disable=function(){null!==Fe&&(Fe.length=0,Fe=null)},i.history.enable=function(){null===Fe&&(Fe=[])},i.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("error",r,t)},i.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("warn",r,t)},i.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("debug",r,t)},i}("VIDEOJS"),He=Ve.createLogger,We=Object.prototype.toString,ze=function(e){return Ye(e)?Object.keys(e):[]};function qe(e,t){ze(e).forEach((function(n){return t(e[n],n)}))}function Ge(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.assign?f.a.apply(void 0,[e].concat(n)):(n.forEach((function(t){t&&qe(t,(function(t,n){e[n]=t}))})),e)}function Ye(e){return!!e&&"object"==typeof e}function Xe(e){return Ye(e)&&"[object Object]"===We.call(e)&&e.constructor===Object}function Ke(e,t){if(!e||!t)return"";if("function"==typeof s.a.getComputedStyle){var n=s.a.getComputedStyle(e);return n?n.getPropertyValue(t)||n[t]:""}return""}function $e(e){return"string"==typeof e&&Boolean(e.trim())}function Qe(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Ze(){return c.a===s.a.document}function Je(e){return Ye(e)&&1===e.nodeType}function et(){try{return s.a.parent!==s.a.self}catch(e){return!0}}function tt(e){return function(t,n){if(!$e(t))return c.a[e](null);$e(n)&&(n=c.a.querySelector(n));var r=Je(n)?n:c.a;return r[e]&&r[e](t)}}function nt(e,t,n,r){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var i=c.a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Ve.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+n+"."),i.setAttribute(e,n)):"textContent"===e?rt(i,n):i[e]===n&&"tabIndex"!==e||(i[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){i.setAttribute(e,n[e])})),r&&wt(i,r),i}function rt(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function it(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function ot(e,t){return Qe(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function at(e,t){return e.classList?e.classList.add(t):ot(e,t)||(e.className=(e.className+" "+t).trim()),e}function st(e,t){return e.classList?e.classList.remove(t):(Qe(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function ut(e,t,n){var r=ot(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n!==r)return n?at(e,t):st(e,t),e}function ct(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];null==r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)}))}function lt(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var r=e.attributes,i=r.length-1;i>=0;i--){var o=r[i].name,a=r[i].value;"boolean"!=typeof e[o]&&-1===n.indexOf(","+o+",")||(a=null!==a),t[o]=a}return t}function ft(e,t){return e.getAttribute(t)}function ht(e,t,n){e.setAttribute(t,n)}function dt(e,t){e.removeAttribute(t)}function pt(){c.a.body.focus(),c.a.onselectstart=function(){return!1}}function yt(){c.a.onselectstart=function(){return!0}}function mt(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(Ke(e,"height"))),n.width||(n.width=parseFloat(Ke(e,"width"))),n}}function gt(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};var t=e.offsetWidth,n=e.offsetHeight,r=0,i=0;do{r+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent}while(e);return{left:r,top:i,width:t,height:n}}function vt(e,t){var n={},r=gt(t.target),i=gt(e),o=i.width,a=i.height,s=t.offsetY-(i.top-r.top),u=t.offsetX-(i.left-r.left);return t.changedTouches&&(u=t.changedTouches[0].pageX-i.left,s=t.changedTouches[0].pageY+i.top),n.y=1-Math.max(0,Math.min(1,s/a)),n.x=Math.max(0,Math.min(1,u/o)),n}function bt(e){return Ye(e)&&3===e.nodeType}function _t(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Tt(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),Je(e)||bt(e)?e:"string"==typeof e&&/\S/.test(e)?c.a.createTextNode(e):void 0})).filter((function(e){return e}))}function wt(e,t){return Tt(t).forEach((function(t){return e.appendChild(t)})),e}function St(e,t){return wt(_t(e),t)}function Ct(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var kt,Et=tt("querySelector"),It=tt("querySelectorAll"),Ot=Object.freeze({__proto__:null,isReal:Ze,isEl:Je,isInFrame:et,createEl:nt,textContent:rt,prependTo:it,hasClass:ot,addClass:at,removeClass:st,toggleClass:ut,setAttributes:ct,getAttributes:lt,getAttribute:ft,setAttribute:ht,removeAttribute:dt,blockTextSelection:pt,unblockTextSelection:yt,getBoundingClientRect:mt,findPosition:gt,getPointerPosition:vt,isTextNode:bt,emptyEl:_t,normalizeContent:Tt,appendContent:wt,insertContent:St,isSingleLeftClick:Ct,$:Et,$$:It}),xt=!1,Pt=function(){if(Ze()&&!1!==kt.options.autoSetup){var e=Array.prototype.slice.call(c.a.getElementsByTagName("video")),t=Array.prototype.slice.call(c.a.getElementsByTagName("audio")),n=Array.prototype.slice.call(c.a.getElementsByTagName("video-js")),r=e.concat(t,n);if(r&&r.length>0)for(var i=0,o=r.length;i<o;i++){var a=r[i];if(!a||!a.getAttribute){At(1);break}void 0===a.player&&null!==a.getAttribute("data-setup")&&kt(a)}else xt||At(1)}};function At(e,t){t&&(kt=t),s.a.setTimeout(Pt,e)}function Lt(){xt=!0,s.a.removeEventListener("load",Lt)}Ze()&&("complete"===c.a.readyState?Lt():s.a.addEventListener("load",Lt));var Rt,jt=function(e){var t=c.a.createElement("style");return t.className=e,t},Dt=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},Mt=3;function Nt(){return Mt++}s.a.WeakMap||(Rt=function(){function e(){this.vdata="vdata"+Math.floor(s.a.performance&&s.a.performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var n=e[this.vdata]||Nt();return e[this.vdata]||(e[this.vdata]=n),this.data[n]=t,this},t.get=function(e){var t=e[this.vdata];if(t)return this.data[t];Ve("We have no data for this element",e)},t.has=function(e){return e[this.vdata]in this.data},t.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var Bt,Ut=s.a.WeakMap?new WeakMap:new Rt;function Ft(e,t){if(Ut.has(e)){var n=Ut.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Ut.delete(e)}}function Vt(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function Ht(e){if(e.fixed_)return e;function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped){var r=e||s.a.event;for(var i in e={},r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(e[i]=r[i]));if(e.target||(e.target=e.srcElement||c.a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var o=c.a.documentElement,a=c.a.body;e.pageX=e.clientX+(o&&o.scrollLeft||a&&a.scrollLeft||0)-(o&&o.clientLeft||a&&a.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||a&&a.scrollTop||0)-(o&&o.clientTop||a&&a.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}var Wt=["touchstart","touchmove"];function zt(e,t,n){if(Array.isArray(t))return Vt(zt,e,t,n);Ut.has(e)||Ut.set(e,{});var r=Ut.get(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=Nt()),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=Ht(t);var i=r.handlers[t.type];if(i)for(var o=i.slice(0),a=0,s=o.length;a<s&&!t.isImmediatePropagationStopped();a++)try{o[a].call(e,t,n)}catch(e){Ve.error(e)}}}),1===r.handlers[t].length)if(e.addEventListener){var i=!1;(function(){if("boolean"!=typeof Bt){Bt=!1;try{var e=Object.defineProperty({},"passive",{get:function(){Bt=!0}});s.a.addEventListener("test",null,e),s.a.removeEventListener("test",null,e)}catch(e){}}return Bt})()&&Wt.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function qt(e,t,n){if(Ut.has(e)){var r=Ut.get(e);if(r.handlers){if(Array.isArray(t))return Vt(qt,e,t,n);var i=function(e,t){r.handlers[t]=[],Ft(e,t)};if(void 0!==t){var o=r.handlers[t];if(o)if(n){if(n.guid)for(var a=0;a<o.length;a++)o[a].guid===n.guid&&o.splice(a--,1);Ft(e,t)}else i(e,t)}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(e,s)}}}function Gt(e,t,n){var r=Ut.has(e)?Ut.get(e):{},i=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Ht(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)Gt.call(null,i,t,n);else if(!i&&!t.defaultPrevented&&t.target&&t.target[t.type]){Ut.has(t.target)||Ut.set(t.target,{});var o=Ut.get(t.target);t.target[t.type]&&(o.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),o.disabled=!1)}return!t.defaultPrevented}function Yt(e,t,n){if(Array.isArray(t))return Vt(Yt,e,t,n);var r=function r(){qt(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Nt(),zt(e,t,r)}function Xt(e,t,n){var r=function r(){qt(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Nt(),zt(e,t,r)}var Kt,$t=Object.freeze({__proto__:null,fixEvent:Ht,on:zt,off:qt,trigger:Gt,one:Yt,any:Xt}),Qt=function(e,t,n){t.guid||(t.guid=Nt());var r=t.bind(e);return r.guid=n?n+"_"+t.guid:t.guid,r},Zt=function(e,t){var n=s.a.performance.now();return function(){var r=s.a.performance.now();r-n>=t&&(e.apply(void 0,arguments),n=r)}},Jt=function(){};Jt.prototype.allowedEvents_={},Jt.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},zt(this,e,t),this.addEventListener=n},Jt.prototype.addEventListener=Jt.prototype.on,Jt.prototype.off=function(e,t){qt(this,e,t)},Jt.prototype.removeEventListener=Jt.prototype.off,Jt.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Yt(this,e,t),this.addEventListener=n},Jt.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Xt(this,e,t),this.addEventListener=n},Jt.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=Ht(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Gt(this,e)},Jt.prototype.dispatchEvent=Jt.prototype.trigger,Jt.prototype.queueTrigger=function(e){var t=this;Kt||(Kt=new Map);var n=e.type||e,r=Kt.get(this);r||(r=new Map,Kt.set(this,r));var i=r.get(n);r.delete(n),s.a.clearTimeout(i);var o=s.a.setTimeout((function(){0===r.size&&(r=null,Kt.delete(t)),t.trigger(e)}),0);r.set(n,o)};var en=function(e){return e instanceof Jt||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},tn=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},nn=function(e){if(!e.nodeName&&!en(e))throw new Error("Invalid target; must be a DOM node or evented object.")},rn=function(e){if(!tn(e))throw new Error("Invalid event type; must be a non-empty string or array.")},on=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},an=function(e,t){var n,r,i,o=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return o?(n=e.eventBusEl_,t.length>=3&&t.shift(),r=t[0],i=t[1]):(n=t[0],r=t[1],i=t[2]),nn(n),rn(r),on(i),{isTargetingSelf:o,target:n,type:r,listener:i=Qt(e,i)}},sn=function(e,t,n,r){nn(e),e.nodeName?$t[t](e,n,r):e[t](n,r)},un={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=an(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(sn(a,"on",s,u),!o){var c=function(){return e.off(a,s,u)};c.guid=u.guid;var l=function(){return e.off("dispose",c)};l.guid=u.guid,sn(this,"on","dispose",c),sn(a,"on","dispose",l)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=an(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)sn(a,"one",s,u);else{var c=function t(){e.off(a,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};c.guid=u.guid,sn(a,"one",s,c)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=an(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)sn(a,"any",s,u);else{var c=function t(){e.off(a,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};c.guid=u.guid,sn(a,"any",s,c)}},off:function(e,t,n){if(!e||tn(e))qt(this.eventBusEl_,e,t);else{var r=e,i=t;nn(r),rn(i),on(n),n=Qt(this,n),this.off("dispose",n),r.nodeName?(qt(r,i,n),qt(r,"dispose",n)):en(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){return Gt(this.eventBusEl_,e,t)}};function cn(e,t){void 0===t&&(t={});var n=t.eventBusKey;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');e.eventBusEl_=e[n]}else e.eventBusEl_=nt("span",{className:"vjs-event-bus"});return Ge(e,un),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()})),e.on("dispose",(function(){e.off(),s.a.setTimeout((function(){e.eventBusEl_=null}),0)})),e}var ln={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),qe(e,(function(e,r){n.state[r]!==e&&((t=t||{})[r]={from:n.state[r],to:e}),n.state[r]=e})),t&&en(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function fn(e,t){return Ge(e,ln),e.state=Ge({},e.state,t),"function"==typeof e.handleStateChanged&&en(e)&&e.on("statechanged",e.handleStateChanged),e}var hn=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},dn=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function pn(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&qe(t,(function(t,n){Xe(t)?(Xe(e[n])||(e[n]={}),e[n]=pn(e[n],t)):e[n]=t}))})),e}var yn=function(){function e(){this.map_={}}var t=e.prototype;return t.has=function(e){return e in this.map_},t.delete=function(e){var t=this.has(e);return delete this.map_[e],t},t.set=function(e,t){return this.map_[e]=t,this},t.forEach=function(e,t){for(var n in this.map_)e.call(t,this.map_[n],n,this)},e}(),mn=s.a.Map?s.a.Map:yn,gn=function(){function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in this.set_},t.delete=function(e){var t=this.has(e);return delete this.set_[e],t},t.add=function(e){return this.set_[e]=1,this},t.forEach=function(e,t){for(var n in this.set_)e.call(t,n,n,this)},e}(),vn=s.a.Set?s.a.Set:gn,bn=function(){function e(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=pn({},this.options_),t=this.options_=pn(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var r=e&&e.id&&e.id()||"no_player";this.id_=r+"_component_"+Nt()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&(cn(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),fn(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new vn,this.setIntervalIds_=new vn,this.rafIds_=new vn,this.namedRafs_=new mn,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var t=e.prototype;return t.dispose=function(){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Ut.has(this.el_)&&Ut.delete(this.el_),this.el_=null),this.player_=null}},t.isDisposed=function(){return Boolean(this.isDisposed_)},t.player=function(){return this.player_},t.options=function(e){return e?(this.options_=pn(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return nt(e,t,n)},t.localize=function(e,t,n){void 0===n&&(n=e);var r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],a=r&&r.split("-")[0],s=i&&i[a],u=n;return o&&o[e]?u=o[e]:s&&s[e]&&(u=s[e]),t&&(u=u.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],i=r;return void 0===r&&(i=e),i}))),u},t.handleLanguagechange=function(){},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(e){return this.childIndex_[e]},t.getChild=function(e){if(e)return this.childNameIndex_[e]},t.getDescendant=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reduce((function(e,t){return e.concat(t)}),[]);for(var r=this,i=0;i<t.length;i++)if(!(r=r.getChild(t[i]))||!r.getChild)return;return r},t.addChild=function(t,n,r){var i,o;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"==typeof t){o=dn(t);var a=n.componentClass||o;n.name=o;var s=e.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,n)}else i=t;if(i.parentComponent_&&i.parentComponent_.removeChild(i),this.children_.splice(r,0,i),i.parentComponent_=this,"function"==typeof i.id&&(this.childIndex_[i.id()]=i),(o=o||i.name&&dn(i.name()))&&(this.childNameIndex_[o]=i,this.childNameIndex_[hn(o)]=i),"function"==typeof i.el&&i.el()){var u=null;this.children_[r+1]&&(this.children_[r+1].el_?u=this.children_[r+1].el_:Je(this.children_[r+1])&&(u=this.children_[r+1])),this.contentEl().insertBefore(i.el(),u)}return i},t.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[dn(e.name())]=null,this.childNameIndex_[hn(e.name())]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var r,i=this.options_,o=e.getComponent("Tech");(r=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!r.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var r,i;return"string"==typeof e?i=n[r=e]||t.options_[r]||{}:(r=e.name,i=e),{name:r,opts:i}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||dn(t.name));return n&&!o.isTech(n)})).forEach((function(e){var n=e.name,r=e.opts;if(void 0!==i[n]&&(r=i[n]),!1!==r){!0===r&&(r={}),r.playerOptions=t.options_.playerOptions;var o=t.addChild(n,r);o&&(t[n]=o)}}))}},t.buildCSSClass=function(){return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},t.$=function(e,t){return Et(e,t||this.contentEl())},t.$$=function(e,t){return It(e,t||this.contentEl())},t.hasClass=function(e){return ot(this.el_,e)},t.addClass=function(e){at(this.el_,e)},t.removeClass=function(e){st(this.el_,e)},t.toggleClass=function(e,t){ut(this.el_,e,t)},t.show=function(){this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-hidden")},t.lockShowing=function(){this.addClass("vjs-lock-showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.getAttribute=function(e){return ft(this.el_,e)},t.setAttribute=function(e,t){ht(this.el_,e,t)},t.removeAttribute=function(e){dt(this.el_,e)},t.width=function(e,t){return this.dimension("width",e,t)},t.height=function(e,t){return this.dimension("height",e,t)},t.dimensions=function(e,t){this.width(e,!0),this.height(t)},t.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+dn(e)],10)},t.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=Ke(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+dn(e);t=this.el_[n]}return t},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e){this.handleKeyDown(e)},t.emitTapEvents=function(){var e,t=0,n=null;this.on("touchstart",(function(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=s.a.performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(n){var r=t.touches[0].pageX-n.pageX,i=t.touches[0].pageY-n.pageY;Math.sqrt(r*r+i*i)>10&&(e=!1)}}));var r=function(){e=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){(n=null,!0===e)&&(s.a.performance.now()-t<200&&(r.preventDefault(),this.trigger("tap")))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=Qt(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.setTimeout=function(e,t){var n,r=this;return e=Qt(this,e),this.clearTimersOnDispose_(),n=s.a.setTimeout((function(){r.setTimeoutIds_.has(n)&&r.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),s.a.clearTimeout(e)),e},t.setInterval=function(e,t){e=Qt(this,e),this.clearTimersOnDispose_();var n=s.a.setInterval(e,t);return this.setIntervalIds_.add(n),n},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),s.a.clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=Qt(this,e),t=s.a.requestAnimationFrame((function(){n.rafIds_.has(t)&&n.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},t.requestNamedAnimationFrame=function(e,t){var n=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=Qt(this,t);var r=this.requestAnimationFrame((function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}));return this.namedRafs_.set(e,r),e}},t.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},t.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),s.a.cancelAnimationFrame(e)),e):this.clearTimeout(e)},t.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var n=t[0],r=t[1];e[n].forEach((function(t,n){return e[r](n)}))})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var r,i=e.getComponent("Tech"),o=i&&i.isTech(n),a=e===n||e.prototype.isPrototypeOf(n.prototype);if(o||!a)throw r=o?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+r+".");t=dn(t),e.components_||(e.components_={});var s=e.getComponent("Player");if("Player"===t&&s&&s.players){var u=s.players,c=Object.keys(u);if(u&&c.length>0&&c.map((function(e){return u[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[hn(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();bn.prototype.supportsRaf_="function"==typeof s.a.requestAnimationFrame&&"function"==typeof s.a.cancelAnimationFrame,bn.registerComponent("Component",bn);var _n,Tn=s.a.navigator&&s.a.navigator.userAgent||"",wn=/AppleWebKit\/([\d.]+)/i.exec(Tn),Sn=wn?parseFloat(wn.pop()):null,Cn=/iPod/i.test(Tn),kn=(_n=Tn.match(/OS (\d+)_/i))&&_n[1]?_n[1]:null,En=/Android/i.test(Tn),In=function(){var e=Tn.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),On=En&&In<5&&Sn<537,xn=/Firefox/i.test(Tn),Pn=/Edg/i.test(Tn),An=!Pn&&(/Chrome/i.test(Tn)||/CriOS/i.test(Tn)),Ln=function(){var e=Tn.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),Rn=function(){var e=/MSIE\s(\d+)\.\d/.exec(Tn),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(Tn)&&/rv:11.0/.test(Tn)&&(t=11),t}(),jn=/Safari/i.test(Tn)&&!An&&!En&&!Pn,Dn=/Windows/i.test(Tn),Mn=Boolean(Ze()&&("ontouchstart"in s.a||s.a.navigator.maxTouchPoints||s.a.DocumentTouch&&s.a.document instanceof s.a.DocumentTouch)),Nn=/iPad/i.test(Tn)||jn&&Mn&&!/iPhone/i.test(Tn),Bn=/iPhone/i.test(Tn)&&!Nn,Un=Bn||Nn||Cn,Fn=(jn||Un)&&!An,Vn=Object.freeze({__proto__:null,IS_IPOD:Cn,IOS_VERSION:kn,IS_ANDROID:En,ANDROID_VERSION:In,IS_NATIVE_ANDROID:On,IS_FIREFOX:xn,IS_EDGE:Pn,IS_CHROME:An,CHROME_VERSION:Ln,IE_VERSION:Rn,IS_SAFARI:jn,IS_WINDOWS:Dn,TOUCH_ENABLED:Mn,IS_IPAD:Nn,IS_IPHONE:Bn,IS_IOS:Un,IS_ANY_SAFARI:Fn});function Hn(e,t,n,r){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,r,n.length-1),n[r][t]}function Wn(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Hn.bind(null,"start",0,e),end:Hn.bind(null,"end",1,e)}}function zn(e,t){return Array.isArray(e)?Wn(e):void 0===e||void 0===t?Wn():Wn([[e,t]])}function qn(e,t){var n,r,i=0;if(!t)return 0;e&&e.length||(e=zn(0,0));for(var o=0;o<e.length;o++)n=e.start(o),(r=e.end(o))>t&&(r=t),i+=r-n;return i/t}for(var Gn,Yn={prefixed:!0},Xn=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],Kn=Xn[0],$n=0;$n<Xn.length;$n++)if(Xn[$n][1]in c.a){Gn=Xn[$n];break}if(Gn){for(var Qn=0;Qn<Gn.length;Qn++)Yn[Kn[Qn]]=Gn[Qn];Yn.prefixed=Gn[0]!==Kn[0]}function Zn(e){if(e instanceof Zn)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:Ye(e)&&("number"==typeof e.code&&(this.code=e.code),Ge(this,e)),this.message||(this.message=Zn.defaultMessages[this.code]||"")}Zn.prototype.code=0,Zn.prototype.message="",Zn.prototype.status=null,Zn.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Zn.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Jn=0;Jn<Zn.errorTypes.length;Jn++)Zn[Zn.errorTypes[Jn]]=Jn,Zn.prototype[Zn.errorTypes[Jn]]=Jn;function er(e){return null!=e&&"function"==typeof e.then}function tr(e){er(e)&&e.then(null,(function(e){}))}var nr=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,r){return e[n]&&(t[n]=e[n]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},rr=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track}));return Array.prototype.map.call(t,(function(e){var t=nr(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map(nr))},ir=function(e,t){return e.forEach((function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return n.addCue(e)}))})),t.textTracks()},or=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=nt("div",{className:"vjs-modal-dialog-content"},{role:"document"}),r.descEl_=nt("p",{className:"vjs-modal-dialog-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),rt(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}y()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},n.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+e.prototype.buildCSSClass.call(this)},n.label=function(){return this.localize(this.options_.label||"Modal Window")},n.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},n.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},n.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},n.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},n.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close)}!t&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},n.fill=function(){this.fillWith(this.content())},n.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),St(t,e),this.trigger("modalfill"),r?n.insertBefore(t,r):n.appendChild(t);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},n.empty=function(){this.trigger("beforemodalempty"),_t(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return void 0!==e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=c.a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},n.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},n.handleKeyDown=function(e){if(e.stopPropagation(),b.a.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(b.a.isEventKey(e,"Tab")){for(var t,n=this.focusableEls_(),r=this.el_.querySelector(":focus"),i=0;i<n.length;i++)if(r===n[i]){t=i;break}c.a.activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(n[n.length-1].focus(),e.preventDefault()):e.shiftKey||t!==n.length-1||(n[0].focus(),e.preventDefault())}},n.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof s.a.HTMLAnchorElement||e instanceof s.a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof s.a.HTMLInputElement||e instanceof s.a.HTMLSelectElement||e instanceof s.a.HTMLTextAreaElement||e instanceof s.a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof s.a.HTMLIFrameElement||e instanceof s.a.HTMLObjectElement||e instanceof s.a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(bn);or.prototype.options_={pauseOnOpen:!0,temporary:!0},bn.registerComponent("ModalDialog",or);var ar=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty(d()(n),"length",{get:function(){return this.tracks_.length}});for(var r=0;r<t.length;r++)n.addTrack(t[r]);return n}y()(t,e);var n=t.prototype;return n.addTrack=function(e){var t=this,n=this.tracks_.length;""+n in this||Object.defineProperty(this,n,{get:function(){return this.tracks_[n]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){t.trigger({track:e,type:"labelchange",target:t})},en(e)&&e.addEventListener("labelchange",e.labelchange_)},n.removeTrack=function(e){for(var t,n=0,r=this.length;n<r;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},n.getTrackById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},t}(Jt);for(var sr in ar.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},ar.prototype.allowedEvents_)ar.prototype["on"+sr]=null;var ur=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},cr=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].enabled){ur(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,n}y()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&ur(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,ur(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(ar),lr=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)},fr=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].selected){lr(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(d()(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}y()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&lr(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,lr(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(ar),hr=function(e){function t(){return e.apply(this,arguments)||this}y()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;e.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return n.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return n.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(ar),dr=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},t.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),pr=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(e){var t=this.length||0,n=0,r=e.length;this.cues_=e,this.length_=e.length;var i=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<r)for(n=t;n<r;n++)i.call(this,n)},t.getCueById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},e}(),yr={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},mr={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},gr={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},vr={disabled:"disabled",hidden:"hidden",showing:"showing"},br=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var r={id:t.id||"vjs_track_"+Nt(),kind:t.kind||"",language:t.language||""},i=t.label||"",o=function(e){Object.defineProperty(d()(n),e,{get:function(){return r[e]},set:function(){}})};for(var a in r)o(a);return Object.defineProperty(d()(n),"label",{get:function(){return i},set:function(e){e!==i&&(i=e,this.trigger("labelchange"))}}),n}return y()(t,e),t}(Jt),_r=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=c.a.createElement("a");n.href=e;var r,i=""===n.host&&"file:"!==n.protocol;i&&((r=c.a.createElement("div")).innerHTML='<a href="'+e+'"></a>',n=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),c.a.body.appendChild(r));for(var o={},a=0;a<t.length;a++)o[t[a]]=n[t[a]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=s.a.location.protocol),i&&c.a.body.removeChild(r),o},Tr=function(e){if(!e.match(/^https?:\/\//)){var t=c.a.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},wr=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},Sr=function(e,t){void 0===t&&(t=s.a.location);var n=_r(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},Cr=Object.freeze({__proto__:null,parseUrl:_r,getAbsoluteURL:Tr,getFileExtension:wr,isCrossOrigin:Sr}),kr=function(e,t){var n=new s.a.WebVTT.Parser(s.a,s.a.vttjs,s.a.WebVTT.StringDecoder()),r=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),r.length>0&&(s.a.console&&s.a.console.groupCollapsed&&s.a.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return Ve.error(e)})),s.a.console&&s.a.console.groupEnd&&s.a.console.groupEnd()),n.flush()},Er=function(e,t){var n={uri:e},r=Sr(e);r&&(n.cors=r);var i="use-credentials"===t.tech_.crossOrigin();i&&(n.withCredentials=i),T()(n,Qt(this,(function(e,n,r){if(e)return Ve.error(e,n);t.loaded_=!0,"function"!=typeof s.a.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return kr(r,t);Ve.error("vttjs failed to load, stopping trying to process "+t.src)})):kr(r,t)})))},Ir=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var r=pn(t,{kind:gr[t.kind]||"subtitles",language:t.language||t.srclang||""}),i=vr[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(i="hidden"),(n=e.call(this,r)||this).tech_=r.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var a=new pr(n.cues_),s=new pr(n.activeCues_),u=!1,c=Qt(d()(n),(function(){this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1)}));return"disabled"!==i&&n.tech_.ready((function(){n.tech_.on("timeupdate",c)}),!0),Object.defineProperties(d()(n),{default:{get:function(){return o},set:function(){}},mode:{get:function(){return i},set:function(e){var t=this;vr[e]&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||Er(this.src,this),"disabled"!==i?this.tech_.ready((function(){t.tech_.on("timeupdate",c)}),!0):this.tech_.off("timeupdate",c),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];(i.startTime<=e&&i.endTime>=e||i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e)&&t.push(i)}if(u=!1,t.length!==this.activeCues_.length)u=!0;else for(var o=0;o<t.length;o++)-1===this.activeCues_.indexOf(t[o])&&(u=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set:function(){}}}),r.src?(n.src=r.src,n.preload_||(n.loaded_=!0),(n.preload_||o||"subtitles"!==r.kind&&"captions"!==r.kind)&&Er(n.src,d()(n))):n.loaded_=!0,n}y()(t,e);var n=t.prototype;return n.addCue=function(e){var t=e;if(s.a.vttjs&&!(e instanceof s.a.vttjs.VTTCue)){for(var n in t=new s.a.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},n.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(br);Ir.prototype.allowedEvents_={cuechange:"cuechange"};var Or=function(e){function t(t){var n;void 0===t&&(t={});var r=pn(t,{kind:mr[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(d()(n),"enabled",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),r.enabled&&(n.enabled=r.enabled),n.loaded_=!0,n}return y()(t,e),t}(br),xr=function(e){function t(t){var n;void 0===t&&(t={});var r=pn(t,{kind:yr[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(d()(n),"selected",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),r.selected&&(n.selected=r.selected),n}return y()(t,e),t}(br),Pr=function(e){function t(t){var n,r;void 0===t&&(t={}),n=e.call(this)||this;var i=new Ir(t);return n.kind=i.kind,n.src=i.src,n.srclang=i.language,n.label=i.label,n.default=i.default,Object.defineProperties(d()(n),{readyState:{get:function(){return r}},track:{get:function(){return i}}}),r=0,i.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:d()(n)})})),n}return y()(t,e),t}(Jt);Pr.prototype.allowedEvents_={load:"load"},Pr.NONE=0,Pr.LOADING=1,Pr.LOADED=2,Pr.ERROR=3;var Ar={audio:{ListClass:cr,TrackClass:Or,capitalName:"Audio"},video:{ListClass:fr,TrackClass:xr,capitalName:"Video"},text:{ListClass:hr,TrackClass:Ir,capitalName:"Text"}};Object.keys(Ar).forEach((function(e){Ar[e].getterName=e+"Tracks",Ar[e].privateName=e+"Tracks_"}));var Lr={remoteText:{ListClass:hr,TrackClass:Ir,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:dr,TrackClass:Pr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Rr=f()({},Ar,Lr);Lr.names=Object.keys(Lr),Ar.names=Object.keys(Ar),Rr.names=[].concat(Lr.names).concat(Ar.names);var jr=function(e){function t(t,n){var r;return void 0===t&&(t={}),void 0===n&&(n=function(){}),t.reportTouchActivity=!1,(r=e.call(this,null,t,n)||this).hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),Rr.names.forEach((function(e){var n=Rr[e];t&&t[n.getterName]&&(r[n.privateName]=t[n.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===t["native"+e+"Tracks"]&&(r["featuresNative"+e+"Tracks"]=!1)})),!1===t.nativeCaptions||!1===t.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.preloadTextTracks=!1!==t.preloadTextTracks,r.autoRemoteTextTracks_=new Rr.text.ListClass,r.initTrackListeners(),t.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}y()(t,e);var n=t.prototype;return n.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},n.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},n.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},n.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Qt(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},n.onDurationChange=function(e){this.duration_=this.duration()},n.buffered=function(){return zn(0,0)},n.bufferedPercent=function(){return qn(this.buffered(),this.duration_)},n.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},n.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},n.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},n.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},n.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.dispose=function(){this.clearTracks(Ar.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},n.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===e&&t.removeRemoteTextTrack(i),n.removeTrack(i)}}))},n.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.crossOrigin=function(){},n.setCrossOrigin=function(){},n.error=function(e){return void 0!==e&&(this.error_=new Zn(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?zn(0,0):zn()},n.play=function(){},n.setScrubbing=function(){},n.scrubbing=function(){},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTrackListeners=function(){var e=this;Ar.names.forEach((function(t){var n=Ar[t],r=function(){e.trigger(t+"trackchange")},i=e[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),e.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},n.addWebVttScript_=function(){var e=this;if(!s.a.WebVTT)if(c.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&Xe(S.a)&&Object.keys(S.a).length>0)return void this.trigger("vttjsloaded");var t=c.a.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),s.a.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return e.trigger("texttrackchange")},a=function(){o();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",o),"showing"===n.mode&&n.addEventListener("cuechange",o)}};a(),t.addEventListener("change",a),t.addEventListener("addtrack",a),t.addEventListener("removetrack",a),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",a),t.removeEventListener("addtrack",a),t.removeEventListener("removetrack",a);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",o)}}))},n.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,r,i){void 0===i&&(i={});var o=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var a=new Rr.text.TrackClass(i);return o.addTrack(a),a}(this,e,t,n)},n.createRemoteTextTrack=function(e){var t=pn(e,{tech:this});return new Lr.remoteTextEl.TrackClass(t)},n.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var r=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(Ve.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==t&&this.ready((function(){return n.autoRemoteTextTracks_.addTrack(r.track)})),r},n.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},n.getVideoPlaybackQuality=function(){return{}},n.requestPictureInPicture=function(){var e=this.options_.Promise||s.a.Promise;if(e)return e.reject()},n.disablePictureInPicture=function(){return!0},n.setDisablePictureInPicture=function(){},n.setPoster=function(){},n.playsinline=function(){},n.setPlaysinline=function(){},n.overrideNativeAudioTracks=function(){},n.overrideNativeVideoTracks=function(){},n.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=dn(e),t.techs_[e]=n,t.techs_[hn(e)]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return t.techs_&&t.techs_[e]?t.techs_[e]:(e=dn(e),s.a&&s.a.videojs&&s.a.videojs[e]?(Ve.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),s.a.videojs[e]):void 0)},t}(bn);Rr.names.forEach((function(e){var t=Rr[e];jr.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),jr.prototype.featuresVolumeControl=!0,jr.prototype.featuresMuteControl=!0,jr.prototype.featuresFullscreenResize=!1,jr.prototype.featuresPlaybackRate=!1,jr.prototype.featuresProgressEvents=!1,jr.prototype.featuresSourceset=!1,jr.prototype.featuresTimeupdateEvents=!1,jr.prototype.featuresNativeTextTracks=!1,jr.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n,r=e.sourceHandlers||[],i=0;i<r.length;i++)if(n=r[i].canPlayType(t))return n;return""},e.selectSourceHandler=function(t,n){for(var r=e.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(t,n))return r[i];return null},e.canPlaySource=function(t,n){var r=e.selectSourceHandler(t,n);return r?r.canHandleSource(t,n):""};["seekable","seeking","duration"].forEach((function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:Ve.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},bn.registerComponent("Tech",jr),jr.registerTech("Tech",jr),jr.defaultTechOrder_=[];var Dr={},Mr={},Nr={};function Br(e,t,n){e.setTimeout((function(){return function e(t,n,r,i,o,a){void 0===t&&(t={});void 0===n&&(n=[]);void 0===o&&(o=[]);void 0===a&&(a=!1);var s=n,u=s[0],c=s.slice(1);if("string"==typeof u)e(t,Dr[u],r,i,o,a);else if(u){var l=function(e,t){var n=Mr[e.id()],r=null;if(null==n)return r=t(e),Mr[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var o=n[i],a=o[0],s=o[1];a===t&&(r=s)}null===r&&(r=t(e),n.push([t,r]));return r}(i,u);if(!l.setSource)return o.push(l),e(t,c,r,i,o,a);l.setSource(Ge({},t),(function(n,s){if(n)return e(t,c,r,i,o,a);o.push(l),e(s,t.type===s.type?c:Dr[s.type],r,i,o,a)}))}else c.length?e(t,c,r,i,o,a):a?r(t,o):e(t,Dr["*"],r,i,o,!0)}(t,Dr[t.type],n,e)}),1)}function Ur(e,t,n,r){void 0===r&&(r=null);var i="call"+dn(n),o=e.reduce(Wr(i),r),a=o===Nr,s=a?null:t[n](o);return function(e,t,n,r){for(var i=e.length-1;i>=0;i--){var o=e[i];o[t]&&o[t](r,n)}}(e,n,s,a),s}var Fr={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},Vr={setCurrentTime:1,setMuted:1,setVolume:1},Hr={play:1,pause:1};function Wr(e){return function(t,n){return t===Nr?Nr:n[e]?n[e](t):t}}var zr={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},qr=function(e){void 0===e&&(e="");var t=wr(e);return zr[t.toLowerCase()]||""};function Gr(e){if(!e.type){var t=qr(e.src);t&&(e.type=t)}return e}var Yr=function(e){function t(t,n,r){var i,o=pn({createEl:!1},n);if(i=e.call(this,t,o,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var a=0,s=n.playerOptions.techOrder;a<s.length;a++){var u=dn(s[a]),c=jr.getTech(u);if(u||(c=bn.getComponent(u)),c&&c.isSupported()){t.loadTech_(u);break}}return i}return y()(t,e),t}(bn);bn.registerComponent("MediaLoader",Yr);var Xr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).emitTapEvents(),r.enable(),r}y()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){void 0===t&&(t="div"),void 0===n&&(n={}),void 0===r&&(r={}),n=Ge({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&Ve.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=Ge({role:"button"},r),this.tabIndex_=n.tabIndex;var i=e.prototype.createEl.call(this,t,n,r);return this.createControlTextEl(i),i},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=nt("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},n.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,rt(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},n.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},n.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("keydown",this.handleKeyDown))},n.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver),this.off("mouseout",this.handleMouseOut),this.off(["tap","click"],this.handleClick),this.off("keydown",this.handleKeyDown)},n.handleLanguagechange=function(){this.controlText(this.controlText_)},n.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},n.handleKeyDown=function(t){b.a.isEventKey(t,"Space")||b.a.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(bn);bn.registerComponent("ClickableComponent",Xr);var Kr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update(),t.on("posterchange",Qt(d()(r),r.update)),r}y()(t,e);var n=t.prototype;return n.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},n.createEl=function(){return nt("div",{className:"vjs-poster",tabIndex:-1})},n.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},n.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},n.handleClick=function(e){if(this.player_.controls()){var t=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;!this.player_.tech(!0)||(Rn||Pn)&&t||this.player_.tech(!0).focus(),this.player_.paused()?tr(this.player_.play()):this.player_.pause()}},t}(Xr);bn.registerComponent("PosterImage",Kr);var $r={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Qr(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function Zr(e,t,n){try{e.style[t]=n}catch(e){return}}var Jr=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=Qt(d()(i),i.updateDisplay);return t.on("loadstart",Qt(d()(i),i.toggleDisplay)),t.on("texttrackchange",o),t.on("loadedmetadata",Qt(d()(i),i.preselectTrack)),t.ready(Qt(d()(i),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",o),t.on("playerresize",o),s.a.addEventListener("orientationchange",o),t.on("dispose",(function(){return s.a.removeEventListener("orientationchange",o)}));for(var e=this.options_.playerOptions.tracks||[],n=0;n<e.length;n++)this.player_.addRemoteTextTrack(e[n],!0);this.preselectTrack()}}))),i}y()(t,e);var n=t.prototype;return n.preselectTrack=function(){for(var e,t,n,r={captions:1,subtitles:1},i=this.player_.textTracks(),o=this.player_.cache_.selectedLanguage,a=0;a<i.length;a++){var s=i[a];o&&o.enabled&&o.language&&o.language===s.language&&s.kind in r?s.kind===o.kind?n=s:n||(n=s):o&&!o.enabled?(n=null,e=null,t=null):s.default&&("descriptions"!==s.kind||e?s.kind in r&&!t&&(t=s):e=s)}n?n.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},n.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"==typeof s.a.WebVTT&&s.a.WebVTT.processCues(s.a,[],this.el_)},n.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var n=[],r=0;r<e.length;++r){var i=e[r];"showing"===i.mode&&n.push(i)}this.updateForTrack(n)}else{for(var o=null,a=null,s=e.length;s--;){var u=e[s];"showing"===u.mode&&("descriptions"===u.kind?o=u:a=u)}a?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(a)):o&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(o))}},n.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;r--;){var i=n[r];if(i){var o=i.displayState;if(t.color&&(o.firstChild.style.color=t.color),t.textOpacity&&Zr(o.firstChild,"color",Qr(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(o.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Zr(o.firstChild,"backgroundColor",Qr(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Zr(o,"backgroundColor",Qr(t.windowColor,t.windowOpacity)):o.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?o.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===t.edgeStyle&&(o.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),t.fontPercent&&1!==t.fontPercent){var a=s.a.parseFloat(o.style.fontSize);o.style.fontSize=a*t.fontPercent+"px",o.style.height="auto",o.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=$r[t.fontFamily])}}},n.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof s.a.WebVTT&&!e.every((function(e){return!e.activeCues}))){for(var t=[],n=0;n<e.length;++n)for(var r=e[n],i=0;i<r.activeCues.length;++i)t.push(r.activeCues[i]);s.a.WebVTT.processCues(s.a,t,this.el_);for(var o=0;o<e.length;++o){for(var a=e[o],u=0;u<a.activeCues.length;++u){var c=a.activeCues[u].displayState;at(c,"vjs-text-track-cue"),at(c,"vjs-text-track-cue-"+(a.language?a.language:o))}this.player_.textTrackSettings&&this.updateDisplayState(a)}}},t}(bn);bn.registerComponent("TextTrackDisplay",Jr);var ei=function(e){function t(){return e.apply(this,arguments)||this}return y()(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),r=nt("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[n])}),i=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i},t}(bn);bn.registerComponent("LoadingSpinner",ei);var ti=function(e){function t(){return e.apply(this,arguments)||this}y()(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={}),t=Ge({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=Ge({type:"button"},n);var r=bn.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(r),r},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return Ve.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),bn.prototype.addChild.call(this,e,t)},n.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(t){b.a.isEventKey(t,"Space")||b.a.isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(Xr);bn.registerComponent("Button",ti);var ni=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).mouseused_=!1,r.on("mousedown",r.handleMouseDown),r}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-big-play-button"},n.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var n=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return tr(t),void(!this.player_.tech(!0)||(Rn||Pn)&&n||this.player_.tech(!0).focus())}var r=this.player_.getChild("controlBar"),i=r&&r.getChild("playToggle");if(i){var o=function(){return i.focus()};er(t)?t.then(o,(function(){})):this.setTimeout(o,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(ti);ni.prototype.controlText_="Play Video",bn.registerComponent("BigPlayButton",ni);var ri=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(t){b.a.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(ti);bn.registerComponent("CloseButton",ri);var ii=function(e){function t(t,n){var r;return void 0===n&&(n={}),r=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,r.on(t,"play",r.handlePlay),r.on(t,"pause",r.handlePause),n.replay&&r.on(t,"ended",r.handleEnded),r}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},n.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(ti);ii.prototype.controlText_="Play",bn.registerComponent("PlayToggle",ii);var oi=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},ai=oi;function si(e,t){return void 0===t&&(t=e),ai(e,t)}var ui=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["timeupdate","ended"],r.updateContent),r.updateTextNode_(),r}y()(t,e);var n=t.prototype;return n.createEl=function(){var t=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=nt("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},n.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},n.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=si(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(t.contentEl_){var e=t.textNode_;e&&!t.contentEl_.contains(e)&&(e=null,Ve.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=c.a.createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},n.updateContent=function(e){},t}(bn);ui.prototype.labelText_="Time",ui.prototype.controlText_="Time",bn.registerComponent("TimeDisplay",ui);var ci=function(e){function t(){return e.apply(this,arguments)||this}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(e){var t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)},t}(ui);ci.prototype.labelText_="Current Time",ci.prototype.controlText_="Current Time",bn.registerComponent("CurrentTimeDisplay",ci);var li=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",r.updateContent),r.on(t,"loadstart",r.updateContent),r.on(t,"loadedmetadata",r.updateContent),r}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},t}(ui);li.prototype.labelText_="Duration",li.prototype.controlText_="Duration",bn.registerComponent("DurationDisplay",li);var fi=function(e){function t(){return e.apply(this,arguments)||this}return y()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},t}(bn);bn.registerComponent("TimeDivider",fi);var hi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",r.updateContent),r}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var t=e.prototype.createEl.call(this);return t.insertBefore(nt("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.updateContent=function(e){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},t}(ui);hi.prototype.labelText_="Remaining Time",hi.prototype.controlText_="Remaining Time",bn.registerComponent("RemainingTimeDisplay",hi);var di=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateShowing(),r.on(r.player(),"durationchange",r.updateShowing),r}y()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=nt("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(bn);bn.registerComponent("LiveDisplay",di);var pi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatus),r}y()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=nt("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},n.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},n.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},n.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,e.prototype.dispose.call(this)},t}(ti);pi.prototype.controlText_="Seek to live, currently playing live",bn.registerComponent("SeekToLive",pi);var yi=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},mi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}y()(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("keydown",this.handleKeyDown),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},n.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("keydown",this.handleKeyDown),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},n.createEl=function(t,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),n.className=n.className+" vjs-slider",n=Ge({tabIndex:0},n),r=Ge({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||An||e.preventDefault(),pt(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},n.handleMouseMove=function(e){},n.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;yt(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},n.update=function(){var e=this;if(this.el_&&this.bar){var t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",(function(){var n=e.vertical()?"height":"width";e.bar.el().style[n]=(100*t).toFixed(2)+"%"}))),t}},n.getProgress=function(){return Number(yi(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=vt(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){b.a.isEventKey(t,"Left")||b.a.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):b.a.isEventKey(t,"Right")||b.a.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){e.stopPropagation(),e.preventDefault()},n.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(bn);bn.registerComponent("Slider",mi);var gi=function(e,t){return yi(e/t*100,0,100).toFixed(2)+"%"},vi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).partEls_=[],r.on(t,"progress",r.update),r}y()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=nt("span",{className:"vjs-control-text"}),r=nt("span",{textContent:this.localize("Loaded")}),i=c.a.createTextNode(": ");return this.percentageEl_=nt("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(r),n.appendChild(i),n.appendChild(this.percentageEl_),t},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var e=t.player_.liveTracker,n=t.player_.buffered(),r=e&&e.isLive()?e.seekableEnd():t.player_.duration(),i=t.player_.bufferedEnd(),o=t.partEls_,a=gi(i,r);t.percent_!==a&&(t.el_.style.width=a,rt(t.percentageEl_,a),t.percent_=a);for(var s=0;s<n.length;s++){var u=n.start(s),c=n.end(s),l=o[s];l||(l=t.el_.appendChild(nt()),o[s]=l),l.dataset.start===u&&l.dataset.end===c||(l.dataset.start=u,l.dataset.end=c,l.style.left=gi(u,i),l.style.width=gi(c-u,i))}for(var f=o.length;f>n.length;f--)t.el_.removeChild(o[f-1]);o.length=n.length}))},t}(bn);bn.registerComponent("LoadProgressBar",vi);var bi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Zt(Qt(d()(r),r.update),30),r}y()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var r=gt(this.el_),i=mt(this.player_.el()),o=e.width*t;if(i&&r){var a=e.left-i.left+o,s=e.width-o+(i.right-e.right),u=r.width/2;a<u?u+=u-a:s<u&&(u=s),u<0?u=0:u>r.width&&(u=r.width),u=Math.round(u),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(e){rt(this.el_,e)},n.updateTime=function(e,t,n,r){var i=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var o,a=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var s=i.player_.liveTracker.liveWindow(),u=s-t*s;o=(u<1?"":"-")+si(u,s)}else o=si(n,a);i.update(e,t,o),r&&r()}))},t}(bn);bn.registerComponent("TimeTooltip",bi);var _i=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Zt(Qt(d()(r),r.update),30),r}y()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,r)}},t}(bn);_i.prototype.options_={children:[]},Un||En||_i.prototype.options_.children.push("timeTooltip"),bn.registerComponent("PlayProgressBar",_i);var Ti=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Zt(Qt(d()(r),r.update),30),r}y()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,r=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,r,(function(){n.el_.style.left=e.width*t+"px"}))},t}(bn);Ti.prototype.options_={children:["timeTooltip"]},bn.registerComponent("MouseTimeDisplay",Ti);var wi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).setEventHandlers_(),r}y()(t,e);var n=t.prototype;return n.setEventHandlers_=function(){this.update_=Qt(this,this.update),this.update=Zt(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in c.a&&"visibilityState"in c.a&&this.on(c.a,"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){c.a.hidden?this.disableInterval_(e):(this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},n.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.update=function(t){var n=this,r=e.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,i=n.player_.duration();t&&t.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[si(e,i),si(i,i)],"{1} of {2}")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(mt(n.el()),n.getProgress())})),r},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},n.handleMouseDown=function(t){Ct(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},n.handleMouseMove=function(e){if(Ct(e)){var t,n=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(n>=.99)return void r.seekToLiveEdge();var i=r.seekableStart(),o=r.liveCurrentTime();if((t=i+n*r.liveWindow())>=o&&(t=o),t<=i&&(t=i+.1),t===1/0)return}else(t=n*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)}},n.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},n.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},n.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?tr(this.player_.play()):this.update_()},n.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},n.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},n.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleKeyDown=function(t){if(b.a.isEventKey(t,"Space")||b.a.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(b.a.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(0);else if(b.a.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(b()(t))){t.preventDefault(),t.stopPropagation();var n=10*(b.a.codes[b()(t)]-b.a.codes[0])/100;this.player_.currentTime(this.player_.duration()*n)}else b.a.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):b.a.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},n.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableInterval_),this.off(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in c.a&&"visibilityState"in c.a&&this.off(c.a,"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(mi);wi.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Un||En||wi.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),bn.registerComponent("SeekBar",wi);var Si=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseMove=Zt(Qt(d()(r),r.handleMouseMove),30),r.throttledHandleMouseSeek=Zt(Qt(d()(r),r.handleMouseSeek),30),r.enable(),r}y()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("playProgressBar"),r=t.getChild("mouseTimeDisplay");if(n||r){var i=t.el(),o=gt(i),a=vt(i,e).x;a=yi(a,0,1),r&&r.update(o,a),n&&n.update(o,t.getProgress())}}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.disable=function(){this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},n.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(bn);Si.prototype.options_={children:["seekBar"]},bn.registerComponent("ProgressControl",Si);var Ci=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],r.handlePictureInPictureChange),r.on(t,["disablepictureinpicturechanged","loadedmetadata"],r.handlePictureInPictureEnabledChange),r.disable(),r}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){c.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},n.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},n.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(ti);Ci.prototype.controlText_="Picture-in-Picture",bn.registerComponent("PictureInPictureToggle",Ci);var ki=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"fullscreenchange",r.handleFullscreenChange),!1===c.a[t.fsApi_.fullscreenEnabled]&&r.disable(),r}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(ti);ki.prototype.controlText_="Fullscreen",bn.registerComponent("FullscreenToggle",ki);var Ei=function(e){function t(){return e.apply(this,arguments)||this}return y()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(bn);bn.registerComponent("VolumeLevel",Ei);var Ii=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on("slideractive",r.updateLastVolume_),r.on(t,"volumechange",r.updateARIAAttributes),t.ready((function(){return r.updateARIAAttributes()})),r}y()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.handleMouseDown=function(t){Ct(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){Ct(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},n.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},n.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},n.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},n.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(mi);Ii.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Ii.prototype.playerEvent="volumechange",bn.registerComponent("VolumeBar",Ii);var Oi=function(e){function t(t,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||Xe(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(d()(r),t),r.throttledHandleMouseMove=Zt(Qt(d()(r),r.handleMouseMove),30),r.on("mousedown",r.handleMouseDown),r.on("touchstart",r.handleMouseDown),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}y()(t,e);var n=t.prototype;return n.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},n.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},n.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(bn);Oi.prototype.options_={children:["volumeBar"]},bn.registerComponent("VolumeControl",Oi);var xi=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(d()(r),t),r.on(t,["loadstart","volumechange"],r.update),r}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;Un&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)st(this.el_,"vjs-vol-"+n);at(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(ti);xi.prototype.controlText_="Mute",bn.registerComponent("MuteToggle",xi);var Pi=function(e){function t(t,n){var r;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||Xe(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=e.call(this,t,n)||this).on(t,["loadstart"],r.volumePanelState_),r.on(r.muteToggle,"keyup",r.handleKeyPress),r.on(r.volumeControl,"keyup",r.handleVolumeControlKeyUp),r.on("keydown",r.handleKeyPress),r.on("mouseover",r.handleMouseOver),r.on("mouseout",r.handleMouseOut),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}y()(t,e);var n=t.prototype;return n.sliderActive_=function(){this.addClass("vjs-slider-active")},n.sliderInactive_=function(){this.removeClass("vjs-slider-active")},n.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},n.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},n.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},n.handleVolumeControlKeyUp=function(e){b.a.isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),zt(c.a,"keyup",Qt(this,this.handleKeyPress))},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),qt(c.a,"keyup",Qt(this,this.handleKeyPress))},n.handleKeyPress=function(e){b.a.isEventKey(e,"Esc")&&this.handleMouseOut()},t}(bn);Pi.prototype.options_={children:["muteToggle","volumeControl"]},bn.registerComponent("VolumePanel",Pi);var Ai=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",r.handleKeyDown),r.boundHandleBlur_=Qt(d()(r),r.handleBlur),r.boundHandleTapClick_=Qt(d()(r),r.handleTapClick),r}y()(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof bn&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof bn&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},n.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},n.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},n.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=nt(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),zt(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},n.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},n.handleBlur=function(e){var t=e.relatedTarget||c.a.activeElement;if(!this.children().some((function(e){return e.el()===t}))){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},n.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var n=t.filter((function(t){return t.el()===e.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(e){b.a.isEventKey(e,"Left")||b.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(b.a.isEventKey(e,"Right")||b.a.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},n.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},n.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},n.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(bn);bn.registerComponent("Menu",Ai);var Li=function(e){function t(t,n){var r;void 0===n&&(n={}),(r=e.call(this,t,n)||this).menuButton_=new ti(t,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var i=ti.prototype.buildCSSClass();return r.menuButton_.el_.className=r.buildCSSClass()+" "+i,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0,r.on(r.menuButton_,"tap",r.handleClick),r.on(r.menuButton_,"click",r.handleClick),r.on(r.menuButton_,"keydown",r.handleKeyDown),r.on(r.menuButton_,"mouseenter",(function(){r.addClass("vjs-hover"),r.menu.show(),zt(c.a,"keyup",Qt(d()(r),r.handleMenuKeyUp))})),r.on("mouseleave",r.handleMouseLeave),r.on("keydown",r.handleSubmenuKeyDown),r}y()(t,e);var n=t.prototype;return n.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},n.createMenu=function(){var e=new Ai(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=nt("li",{className:"vjs-menu-title",innerHTML:dn(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var n=new bn(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r<this.items.length;r++)e.addItem(this.items[r]);return e},n.createItems=function(){},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},n.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+ti.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},n.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},n.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},n.dispose=function(){this.handleMouseLeave(),e.prototype.dispose.call(this)},n.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},n.handleMouseLeave=function(e){this.removeClass("vjs-hover"),qt(c.a,"keyup",Qt(this,this.handleMenuKeyUp))},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(e){b.a.isEventKey(e,"Esc")||b.a.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),b.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(b.a.isEventKey(e,"Up")||b.a.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(e){(b.a.isEventKey(e,"Esc")||b.a.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},n.handleSubmenuKeyDown=function(e){(b.a.isEventKey(e,"Esc")||b.a.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),b.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},n.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Un&&et())return;this.menu.focus()}},n.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},n.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},n.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(bn);bn.registerComponent("MenuButton",Li);var Ri=function(e){function t(t,n){var r,i=n.tracks;if((r=e.call(this,t,n)||this).items.length<=1&&r.hide(),!i)return d()(r);var o=Qt(d()(r),r.update);return i.addEventListener("removetrack",o),i.addEventListener("addtrack",o),i.addEventListener("labelchange",o),r.player_.on("ready",o),r.player_.on("dispose",(function(){i.removeEventListener("removetrack",o),i.removeEventListener("addtrack",o),i.removeEventListener("labelchange",o)})),r}return y()(t,e),t}(Li);bn.registerComponent("TrackButton",Ri);var ji=["Tab","Esc","Up","Down","Right","Left"],Di=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}y()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",Ge({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),r)},n.handleKeyDown=function(t){ji.some((function(e){return b.a.isEventKey(t,e)}))||e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){this.selected(!0)},n.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(Xr);bn.registerComponent("MenuItem",Di);var Mi=function(e){function t(t,n){var r,i=n.track,o=t.textTracks();n.label=i.label||i.language||"Unknown",n.selected="showing"===i.mode,(r=e.call(this,t,n)||this).track=i,r.kinds=(n.kinds||[n.kind||r.track.kind]).filter(Boolean);var a,u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(d()(r),t)},l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleSelectedLanguageChange.apply(d()(r),t)};(t.on(["loadstart","texttrackchange"],u),o.addEventListener("change",u),o.addEventListener("selectedlanguagechange",l),r.on("dispose",(function(){t.off(["loadstart","texttrackchange"],u),o.removeEventListener("change",u),o.removeEventListener("selectedlanguagechange",l)})),void 0===o.onchange)&&r.on(["tap","click"],(function(){if("object"!=typeof s.a.Event)try{a=new s.a.Event("change")}catch(e){}a||(a=c.a.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(a)}));return r.handleTracksChange(),r}y()(t,e);var n=t.prototype;return n.handleClick=function(t){var n=this.track,r=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),r)for(var i=0;i<r.length;i++){var o=r[i];-1!==this.kinds.indexOf(o.kind)&&(o===n?"showing"!==o.mode&&(o.mode="showing"):"disabled"!==o.mode&&(o.mode="disabled"))}},n.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},n.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},n.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(Di);bn.registerComponent("TextTrackMenuItem",Mi);var Ni=function(e){function t(t,n){return n.track={player:t,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,e.call(this,t,n)||this}y()(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var o=t[r];if(this.options_.kinds.indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var o=t[r];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Mi);bn.registerComponent("OffTextTrackMenuItem",Ni);var Bi=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return y()(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=Mi),this.label_&&(n=this.label_+" off"),e.push(new Ni(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new t(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+o.kind+"-menu-item"),e.push(a)}}return e},t}(Ri);bn.registerComponent("TextTrackButton",Bi);var Ui=function(e){function t(t,n){var r,i=n.track,o=n.cue,a=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=o.text,n.selected=o.startTime<=a&&a<o.endTime,(r=e.call(this,t,n)||this).track=i,r.cue=o,i.addEventListener("cuechange",Qt(d()(r),r.update)),r}y()(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},n.update=function(e){var t=this.cue,n=this.player_.currentTime();this.selected(t.startTime<=n&&n<t.endTime)},t}(Di);bn.registerComponent("ChaptersTrackMenuItem",Ui);var Fi=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},n.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},n.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},n.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(dn(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},n.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new Ui(this.player_,{track:this.track_,cue:i});e.push(o)}return e},t}(Bi);Fi.prototype.kind_="chapters",Fi.prototype.controlText_="Chapters",bn.registerComponent("ChaptersButton",Fi);var Vi=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=t.textTracks(),a=Qt(d()(i),i.handleTracksChange);return o.addEventListener("change",a),i.on("dispose",(function(){o.removeEventListener("change",a)})),i}y()(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,r=0,i=t.length;r<i;r++){var o=t[r];if(o.kind!==this.kind_&&"showing"===o.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Bi);Vi.prototype.kind_="descriptions",Vi.prototype.controlText_="Descriptions",bn.registerComponent("DescriptionsButton",Vi);var Hi=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Bi);Hi.prototype.kind_="subtitles",Hi.prototype.controlText_="Subtitles",bn.registerComponent("SubtitlesButton",Hi);var Wi=function(e){function t(t,n){var r;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(r=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return y()(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Mi);bn.registerComponent("CaptionSettingsMenuItem",Wi);var zi=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Wi(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Bi);zi.prototype.kind_="captions",zi.prototype.controlText_="Captions",bn.registerComponent("CaptionsButton",zi);var qi=function(e){function t(){return e.apply(this,arguments)||this}return y()(t,e),t.prototype.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),i+="</span>",e.prototype.createEl.call(this,t,Ge({innerHTML:i},n),r)},t}(Mi);bn.registerComponent("SubsCapsMenuItem",qi);var Gi=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(dn(r.label_)),r}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Wi(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,qi)},t}(Bi);Gi.prototype.kinds_=["captions","subtitles"],Gi.prototype.controlText_="Subtitles",bn.registerComponent("SubsCapsButton",Gi);var Yi=function(e){function t(t,n){var r,i=n.track,o=t.audioTracks();n.label=i.label||i.language||"Unknown",n.selected=i.enabled,(r=e.call(this,t,n)||this).track=i,r.addClass("vjs-"+i.kind+"-menu-item");var a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(d()(r),t)};return o.addEventListener("change",a),r.on("dispose",(function(){o.removeEventListener("change",a)})),r}y()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),i+="</span>",e.prototype.createEl.call(this,t,Ge({innerHTML:i},n),r)},n.handleClick=function(t){var n=this.player_.audioTracks();e.prototype.handleClick.call(this,t);for(var r=0;r<n.length;r++){var i=n[r];i.enabled=i===this.track}},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(Di);bn.registerComponent("AudioTrackMenuItem",Yi);var Xi=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var r=t[n];e.push(new Yi(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},t}(Ri);Xi.prototype.controlText_="Audio Track",bn.registerComponent("AudioTrackButton",Xi);var Ki=function(e){function t(t,n){var r,i=n.rate,o=parseFloat(i,10);return n.label=i,n.selected=1===o,n.selectable=!0,n.multiSelectable=!1,(r=e.call(this,t,n)||this).label=i,r.rate=o,r.on(t,"ratechange",r.update),r}y()(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},n.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(Di);Ki.prototype.contentElType="button",bn.registerComponent("PlaybackRateMenuItem",Ki);var $i=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateVisibility(),r.updateLabel(),r.on(t,"loadstart",r.updateVisibility),r.on(t,"ratechange",r.updateLabel),r}y()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=nt("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},n.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},n.createMenu=function(){var e=new Ai(this.player()),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addChild(new Ki(this.player(),{rate:t[n]+"x"}));return e},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>t){r=n[i];break}this.player().playbackRate(r)},n.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(Li);$i.prototype.controlText_="Playback Rate",bn.registerComponent("PlaybackRateMenuButton",$i);var Qi=function(e){function t(){return e.apply(this,arguments)||this}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(bn);bn.registerComponent("Spacer",Qi);var Zi=function(e){function t(){return e.apply(this,arguments)||this}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(Qi);bn.registerComponent("CustomControlSpacer",Zi);var Ji=function(e){function t(){return e.apply(this,arguments)||this}return y()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(bn);Ji.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in c.a&&Ji.prototype.options_.children.splice(Ji.prototype.options_.children.length-1,0,"pictureInPictureToggle"),bn.registerComponent("ControlBar",Ji);var eo=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"error",r.open),r}y()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},n.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(or);eo.prototype.options_=f()({},or.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),bn.registerComponent("ErrorDisplay",eo);var to=["#000","Black"],no=["#00F","Blue"],ro=["#0FF","Cyan"],io=["#0F0","Green"],oo=["#F0F","Magenta"],ao=["#F00","Red"],so=["#FFF","White"],uo=["#FF0","Yellow"],co=["1","Opaque"],lo=["0.5","Semi-Transparent"],fo=["0","Transparent"],ho={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[to,so,ao,io,no,uo,oo,ro]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[co,lo,fo]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[so,to,ao,io,no,uo,oo,ro]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[co,lo]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[fo,lo,co]}};function po(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}ho.windowColor.options=ho.backgroundColor.options;var yo=function(e){function t(t,n){var r;return n.temporary=!1,(r=e.call(this,t,n)||this).updateDisplay=Qt(d()(r),r.updateDisplay),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=nt("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),qe(ho,(function(e){r.on(r.$(e.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}y()(t,e);var n=t.prototype;return n.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},n.createElSelect_=function(e,t,n){var r=this;void 0===t&&(t=""),void 0===n&&(n="label");var i=ho[e],o=i.id.replace("%s",this.id_),a=[t,o].join(" ").trim();return["<"+n+' id="'+o+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"</"+n+">",'<select aria-labelledby="'+a+'">'].concat(i.options.map((function(e){var t=o+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+a+" "+t+'">',r.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},n.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},n.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},n.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},n.createElColors_=function(){return nt("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return nt("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},n.createElControls_=function(){var e=this.localize("restore all settings to the default values");return nt("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},n.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.label=function(){return this.localize("Caption Settings Dialog")},n.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var e,t,n,r=this;return t=function(e,t,n){var i,o,a=(i=r.$(t.selector),o=t.parser,po(i.options[i.options.selectedIndex].value,o));return void 0!==a&&(e[n]=a),e},void 0===(n={})&&(n=0),ze(e=ho).reduce((function(n,r){return t(n,e[r],r)}),n)},n.setValues=function(e){var t=this;qe(ho,(function(n,r){!function(e,t,n){if(t)for(var r=0;r<e.options.length;r++)if(po(e.options[r].value,n)===t){e.selectedIndex=r;break}}(t.$(n.selector),e[r],n.parser)}))},n.setDefaults=function(){var e=this;qe(ho,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},n.restoreSettings=function(){var e;try{e=JSON.parse(s.a.localStorage.getItem("vjs-text-track-settings"))}catch(e){Ve.warn(e)}e&&this.setValues(e)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?s.a.localStorage.setItem("vjs-text-track-settings",JSON.stringify(e)):s.a.localStorage.removeItem("vjs-text-track-settings")}catch(e){Ve.warn(e)}}},n.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},n.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},t}(or);bn.registerComponent("TextTrackSettings",yo);var mo=function(e){function t(t,n){var r,i=n.ResizeObserver||s.a.ResizeObserver;null===n.ResizeObserver&&(i=!1);var o=pn({createEl:!i,reportTouchActivity:!1},n);return(r=e.call(this,t,o)||this).ResizeObserver=n.ResizeObserver||s.a.ResizeObserver,r.loadListener_=null,r.resizeObserver_=null,r.debouncedHandler_=function(e,t,n,r){var i;void 0===r&&(r=s.a);var o=function(){var o=this,a=arguments,s=function(){i=null,s=null,n||e.apply(o,a)};!i&&n&&e.apply(o,a),r.clearTimeout(i),i=r.setTimeout(s,t)};return o.cancel=function(){r.clearTimeout(i),i=null},o}((function(){r.resizeHandler()}),100,!1,d()(r)),i?(r.resizeObserver_=new r.ResizeObserver(r.debouncedHandler_),r.resizeObserver_.observe(t.el())):(r.loadListener_=function(){if(r.el_&&r.el_.contentWindow){var e=r.debouncedHandler_,t=r.unloadListener_=function(){qt(this,"resize",e),qt(this,"unload",t),t=null};zt(r.el_.contentWindow,"unload",t),zt(r.el_.contentWindow,"resize",e)}},r.one("load",r.loadListener_)),r}y()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},n.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},n.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,e.prototype.dispose.call(this)},t}(bn);bn.registerComponent("ResizeManager",mo);var go={trackingThreshold:30,liveTolerance:15},vo=function(e){function t(t,n){var r,i=pn(go,n,{createEl:!1});return(r=e.call(this,t,i)||this).reset_(),r.on(r.player_,"durationchange",r.handleDurationchange),Rn&&"hidden"in c.a&&"visibilityState"in c.a&&r.on(c.a,"visibilitychange",r.handleVisibilityChange),r}y()(t,e);var n=t.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(c.a.hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(s.a.performance.now().toFixed(4)),n=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+n;var r=this.liveCurrentTime(),i=this.player_.currentTime(),o=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-i)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(o=!1),o!==this.behindLiveEdge_&&(this.behindLiveEdge_=o,this.trigger("liveedgechange"))}},n.handleDurationchange=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},n.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLive_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLive_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked):(this.one(this.player_,"play",this.handlePlay),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate)))},n.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked)},n.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=!this.skipNextSeeked_&&e>2,this.skipNextSeeked_=!1,this.trackLive_()},n.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)},n.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.skipNextSeeked_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLive_),this.off(this.player_,"seeked",this.handleSeeked),this.off(this.player_,"play",this.handlePlay),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate),this.off(this.player_,"timeupdate",this.seekToLiveEdge)},n.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},n.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},n.isLive=function(){return this.isTracking()},n.atLiveEdge=function(){return!this.behindLiveEdge()},n.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},n.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},n.behindLiveEdge=function(){return this.behindLiveEdge_},n.isTracking=function(){return"number"==typeof this.trackingInterval_},n.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.skipNextSeeked_=!0,this.player_.currentTime(this.liveCurrentTime()))},n.dispose=function(){this.off(c.a,"visibilitychange",this.handleVisibilityChange),this.stopTracking(),e.prototype.dispose.call(this)},t}(bn);bn.registerComponent("LiveTracker",vo);var bo,_o=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),r=[],i="";if(!n.length)return!1;for(var o=0;o<n.length;o++){var a=n[o].src;a&&-1===r.indexOf(a)&&r.push(a)}return!!r.length&&(1===r.length&&(i=r[0]),e.triggerSourceset(i),!0)},To=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=c.a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=c.a.createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",s.a.Element.prototype.appendChild.call(this,n),this.innerHTML}}),wo=function(e,t){for(var n={},r=0;r<e.length&&!((n=Object.getOwnPropertyDescriptor(e[r],t))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},So=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},r=function(e){return wo([e.el(),s.a.HTMLMediaElement.prototype,s.a.Element.prototype,To],"innerHTML")}(e),i=function(n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=n.apply(t,i);return _o(e),a}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=i(n[e]))})),Object.defineProperty(t,"innerHTML",pn(r,{set:i(r.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach((function(e){t[e]=n[e]})),Object.defineProperty(t,"innerHTML",r)},e.one("sourceset",t.resetSourceWatch_)}},Co=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Tr(s.a.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return s.a.Element.prototype.setAttribute.call(this,"src",e),e}}),ko=function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=function(e){return wo([e.el(),s.a.HTMLMediaElement.prototype,Co],"src")}(e),r=t.setAttribute,i=t.load;Object.defineProperty(t,"src",pn(n,{set:function(r){var i=n.set.call(t,r);return e.triggerSourceset(t.src),i}})),t.setAttribute=function(n,i){var o=r.call(t,n,i);return/src/i.test(n)&&e.triggerSourceset(t.src),o},t.load=function(){var n=i.call(t);return _o(e)||(e.triggerSourceset(""),So(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):_o(e)||So(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=i,t.setAttribute=r,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}},Eo=function(e,t,n,r){void 0===r&&(r=!0);var i=function(n){return Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0})},o={configurable:!0,enumerable:!0,get:function(){var e=n();return i(e),e}};return r&&(o.set=i),Object.defineProperty(e,t,o)},Io=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i=t.source,o=!1;if(i&&(r.el_.currentSrc!==i.src||t.tag&&3===t.tag.initNetworkState_)?r.setSource(i):r.handleLateInit_(r.el_),t.enableSourceset&&r.setupSourcesetHandling_(),r.isScrubbing_=!1,r.el_.hasChildNodes()){for(var a=r.el_.childNodes,s=a.length,u=[];s--;){var c=a[s];"track"===c.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(c),r.remoteTextTracks().addTrack(c.track),r.textTracks().addTrack(c.track),o||r.el_.hasAttribute("crossorigin")||!Sr(c.src)||(o=!0)):u.push(c))}for(var l=0;l<u.length;l++)r.el_.removeChild(u[l])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&o&&Ve.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),r.restoreMetadataTracksInIOSNativePlayer_(),(Mn||Bn||On)&&!0===t.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}y()(t,e);var n=t.prototype;return n.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},n.setupSourcesetHandling_=function(){ko(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),n=function(){e=[];for(var n=0;n<t.length;n++){var r=t[n];"metadata"===r.kind&&e.push({track:r,storedMode:r.mode})}};n(),t.addEventListener("change",n),this.on("dispose",(function(){return t.removeEventListener("change",n)}));var r=function n(){for(var r=0;r<e.length;r++){var i=e[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",n),t.removeEventListener("change",r),t.addEventListener("change",r)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",r)}))},n.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var r=e.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach((function(e){n.el()[r+"Tracks"].removeEventListener(e,n[r+"TracksListeners_"][e])})),this["featuresNative"+e+"Tracks"]=!t,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},n.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},n.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},n.proxyNativeTracksForType_=function(e){var t=this,n=Ar[e],r=this.el()[n.getterName],i=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var o={change:function(n){var r={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(r),"text"===e&&t[Lr.remoteText.getterName]().trigger(r)},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},a=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,o=0;o<r.length;o++)if(r[o]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=o,Object.keys(o).forEach((function(e){var n=o[e];r.addEventListener(e,n),t.on("dispose",(function(t){return r.removeEventListener(e,n)}))})),this.on("loadstart",a),this.on("dispose",(function(e){return t.off("loadstart",a)}))}},n.proxyNativeTracks_=function(){var e=this;Ar.names.forEach((function(t){e.proxyNativeTracksForType_(t)}))},n.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n}else{e=c.a.createElement("video");var r=pn({},this.options_.tag&&lt(this.options_.tag));Mn&&!0===this.options_.nativeControlsForTouch||delete r.controls,ct(e,Ge(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&ht(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var i=["loop","muted","playsinline","autoplay"],o=0;o<i.length;o++){var a=i[o],s=this.options_[a];void 0!==s&&(s?ht(e,a,a):dt(e,a),e[a]=s)}return e},n.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")}))}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(e){this.trigger(e)}),this)}))}},n.setScrubbing=function(e){this.isScrubbing_=e},n.scrubbing=function(){return this.isScrubbing_},n.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Fn?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){Ve(e,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;if(this.el_.duration===1/0&&En&&An&&0===this.el_.currentTime){return this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN}return this.el_.duration||NaN},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},n.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=s.a.navigator&&s.a.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},n.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)tr(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},n.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},n.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},n.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},n.reset=function(){t.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(e){this.el_.controls=!!e},n.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=c.a.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},n.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},n.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),s.a.performance&&"function"==typeof s.a.performance.now?e.creationTime=s.a.performance.now():s.a.performance&&s.a.performance.timing&&"number"==typeof s.a.performance.timing.navigationStart&&(e.creationTime=s.a.Date.now()-s.a.performance.timing.navigationStart),e},t}(jr);Eo(Io,"TEST_VID",(function(){if(Ze()){var e=c.a.createElement("video"),t=c.a.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),Io.isSupported=function(){try{Io.TEST_VID.volume=.5}catch(e){return!1}return!(!Io.TEST_VID||!Io.TEST_VID.canPlayType)},Io.canPlayType=function(e){return Io.TEST_VID.canPlayType(e)},Io.canPlaySource=function(e,t){return Io.canPlayType(e.type)},Io.canControlVolume=function(){try{var e=Io.TEST_VID.volume;return Io.TEST_VID.volume=e/2+.1,e!==Io.TEST_VID.volume}catch(e){return!1}},Io.canMuteVolume=function(){try{var e=Io.TEST_VID.muted;return Io.TEST_VID.muted=!e,Io.TEST_VID.muted?ht(Io.TEST_VID,"muted","muted"):dt(Io.TEST_VID,"muted"),e!==Io.TEST_VID.muted}catch(e){return!1}},Io.canControlPlaybackRate=function(){if(En&&An&&Ln<58)return!1;try{var e=Io.TEST_VID.playbackRate;return Io.TEST_VID.playbackRate=e/2+.1,e!==Io.TEST_VID.playbackRate}catch(e){return!1}},Io.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(c.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(c.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(c.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(c.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Io.supportsNativeTextTracks=function(){return Fn||Un&&An},Io.supportsNativeVideoTracks=function(){return!(!Io.TEST_VID||!Io.TEST_VID.videoTracks)},Io.supportsNativeAudioTracks=function(){return!(!Io.TEST_VID||!Io.TEST_VID.audioTracks)},Io.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresVolumeControl","canControlVolume"],["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function(e){var t=e[0],n=e[1];Eo(Io.prototype,t,(function(){return Io[n]()}),!0)})),Io.prototype.movingMediaElementInDOM=!Un,Io.prototype.featuresFullscreenResize=!0,Io.prototype.featuresProgressEvents=!0,Io.prototype.featuresTimeupdateEvents=!0,Io.patchCanPlayType=function(){In>=4&&!xn&&!An&&(bo=Io.TEST_VID&&Io.TEST_VID.constructor.prototype.canPlayType,Io.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":bo.call(this,e)})},Io.unpatchCanPlayType=function(){var e=Io.TEST_VID.constructor.prototype.canPlayType;return bo&&(Io.TEST_VID.constructor.prototype.canPlayType=bo),e},Io.patchCanPlayType(),Io.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},Io.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Io.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Io.prototype["set"+dn(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){Io.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){Io.prototype["set"+dn(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Io.prototype[e]=function(){return this.el_[e]()}})),jr.withSourceHandlers(Io),Io.nativeSourceHandler={},Io.nativeSourceHandler.canPlayType=function(e){try{return Io.TEST_VID.canPlayType(e)}catch(e){return""}},Io.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Io.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=wr(e.src);return Io.nativeSourceHandler.canPlayType("video/"+n)}return""},Io.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Io.nativeSourceHandler.dispose=function(){},Io.registerSourceHandler(Io.nativeSourceHandler),jr.registerTech("Html5",Io);var Oo=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],xo={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Po=["tiny","xsmall","small","medium","large","xlarge","huge"],Ao={};Po.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Ao[e]="vjs-layout-"+t}));var Lo={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Ro=function(e){function t(n,r,i){var o;if(n.id=n.id||r.id||"vjs_video_"+Nt(),(r=Ge(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var a=n.closest("[lang]");a&&a.getAttribute&&(r.language=a.getAttribute("lang"))}else for(var s=n;s&&1===s.nodeType;){if(lt(s).hasOwnProperty("lang")){r.language=s.getAttribute("lang");break}s=s.parentNode}if((o=e.call(this,null,r,i)||this).boundDocumentFullscreenChange_=Qt(d()(o),o.documentFullscreenChange_),o.boundFullWindowOnEscKey_=Qt(d()(o),o.fullWindowOnEscKey),o.isFullscreen_=!1,o.log=He(o.id_),o.fsApi_=Yn,o.isPosterFromTech_=!1,o.queuedCallbacks_=[],o.isReady_=!1,o.hasStarted_=!1,o.userActive_=!1,o.debugEnabled_=!1,!o.options_||!o.options_.techOrder||!o.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(o.tag=n,o.tagAttributes=n&&lt(n),o.language(o.options_.language),r.languages){var u={};Object.getOwnPropertyNames(r.languages).forEach((function(e){u[e.toLowerCase()]=r.languages[e]})),o.languages_=u}else o.languages_=t.prototype.options_.languages;o.resetCache_(),o.poster_=r.poster||"",o.controls_=!!r.controls,n.controls=!1,n.removeAttribute("controls"),o.changingSrc_=!1,o.playCallbacks_=[],o.playTerminatedQueue_=[],n.hasAttribute("autoplay")?o.autoplay(!0):o.autoplay(o.options_.autoplay),r.plugins&&Object.keys(r.plugins).forEach((function(e){if("function"!=typeof o[e])throw new Error('plugin "'+e+'" does not exist')})),o.scrubbing_=!1,o.el_=o.createEl(),cn(d()(o),{eventBusKey:"el_"}),o.fsApi_.requestFullscreen&&(zt(c.a,o.fsApi_.fullscreenchange,o.boundDocumentFullscreenChange_),o.on(o.fsApi_.fullscreenchange,o.boundDocumentFullscreenChange_)),o.fluid_&&o.on(["playerreset","resize"],o.updateStyleEl_);var l=pn(o.options_);r.plugins&&Object.keys(r.plugins).forEach((function(e){o[e](r.plugins[e])})),r.debug&&o.debug(!0),o.options_.playerOptions=l,o.middleware_=[],o.initChildren(),o.isAudio("audio"===n.nodeName.toLowerCase()),o.controls()?o.addClass("vjs-controls-enabled"):o.addClass("vjs-controls-disabled"),o.el_.setAttribute("role","region"),o.isAudio()?o.el_.setAttribute("aria-label",o.localize("Audio Player")):o.el_.setAttribute("aria-label",o.localize("Video Player")),o.isAudio()&&o.addClass("vjs-audio"),o.flexNotSupported_()&&o.addClass("vjs-no-flex"),Mn&&o.addClass("vjs-touch-enabled"),Un||o.addClass("vjs-workinghover"),t.players[o.id_]=d()(o);var f="7.11.2".split(".")[0];return o.addClass("vjs-v"+f),o.userActive(!0),o.reportUserActivity(),o.one("play",o.listenForUserActivity_),o.on("stageclick",o.handleStageClick_),o.on("keydown",o.handleKeyDown),o.on("languagechange",o.handleLanguagechange),o.breakpoints(o.options_.breakpoints),o.responsive(o.options_.responsive),o}y()(t,e);var n=t.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),qt(c.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),qt(c.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Mr[this.id()]=null,Rr.names.forEach((function(e){var t=Rr[e],r=n[t.getterName]();r&&r.off&&r.off()})),e.prototype.dispose.call(this)},n.createEl=function(){var t,n=this.tag,r=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),i="video-js"===this.tag.tagName.toLowerCase();r?t=this.el_=n.parentNode:i||(t=this.el_=e.prototype.createEl.call(this,"div"));var o=lt(n);if(i){for(t=this.el_=n,n=this.tag=c.a.createElement("video");t.children.length;)n.appendChild(t.firstChild);ot(t,"video-js")||at(t,"video-js"),t.appendChild(n),r=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{n[e]=t[e]}catch(e){}}))}if(n.setAttribute("tabindex","-1"),o.tabindex="-1",(Rn||An&&Dn)&&(n.setAttribute("role","application"),o.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach((function(e){i&&"class"===e||t.setAttribute(e,o[e]),i&&n.setAttribute(e,o[e])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==s.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=jt("vjs-styles-dimensions");var a=Et(".vjs-styles-defaults"),u=Et("head");u.insertBefore(this.styleEl_,a?a.nextSibling:u.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var l=n.getElementsByTagName("a"),f=0;f<l.length;f++){var h=l.item(f);at(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!r&&n.parentNode.insertBefore(t,n),it(n,t),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_=t,t},n.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):Ve.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},n.width=function(e){return this.dimension("width",e)},n.height=function(e){return this.dimension("height",e)},n.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t||"auto"===t)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(t);isNaN(r)?Ve.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},n.fluid=function(e){var t,n,r=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,en(this)&&this.off(["playerreset","resize"],this.updateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){r.on(["playerreset","resize"],r.updateStyleEl_)},en(t=this)?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},n.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},n.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},n.updateStyleEl_=function(){if(!0!==s.a.VIDEOJS_NO_DYNAMIC_STYLE){var e,t,n,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),i=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*i,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Dt(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*i+"%;\n }\n ")}else{var o="number"==typeof this.width_?this.width_:this.options_.width,a="number"==typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(o>=0&&(u.width=o),a>=0&&(u.height=a))}},n.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=dn(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(jr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};Rr.names.forEach((function(e){var t=Rr[e];o[t.getterName]=n[t.privateName]})),Ge(o,this.options_[r]),Ge(o,this.options_[i]),Ge(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);var a=jr.getTech(e);if(!a)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new a(o),this.tech_.ready(Qt(this,this.handleTechReady_),!0),ir(this.textTracksJson_||[],this.tech_),Oo.forEach((function(e){n.on(n.tech_,e,n["handleTech"+dn(e)+"_"])})),Object.keys(xo).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+xo[e]+"_"].bind(n),event:t}):n["handleTech"+xo[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"fullscreenerror",this.handleTechFullscreenError_),this.on(this.tech_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_),this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||it(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e=this;Rr.names.forEach((function(t){var n=Rr[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=rr(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},n.tech=function(e){return void 0===e&&Ve.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},n.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mouseup",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},n.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mouseup",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},n.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},n.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},n.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n,r=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var r=t.play();if(er(r))return r.catch(n)};if("any"===e&&!0!==this.muted()?er(n=this.play())&&(n=n.catch(r)):n="muted"===e&&!0!==this.muted()?r():this.play(),er(n))return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(n){t.trigger({type:"autoplay-failure",autoplay:e})}))}},n.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),i=0;i<r.length;i++){var o=r[i];if(o.type&&o.src&&o.src===t)return o.type}return qr(t)}(this,t)),this.cache_.source=pn({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),i=[],o=this.$$("source"),a=[],s=0;s<o.length;s++){var u=lt(o[s]);i.push(u),u.src&&u.src===t&&a.push(u.src)}a.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},n.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},r=this.currentSource().src,i=e.src;r&&!/^blob:/.test(r)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==r)&&(n=function(){}),n(i),e.src||this.tech_.any(["sourceset","loadstart"],(function(e){if("sourceset"!==e.type){var n=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},n.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},n.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},n.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",(function n(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",n))}))},n.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},n.handleTechFirstPlay_=function(){this.options_.starttime&&(Ve.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},n.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},n.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},n.handleTechClick_=function(e){Ct(e)&&this.controls_&&(this.paused()?tr(this.play()):this.pause())},n.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(t){return t.contains(e.target)}))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},n.handleTechTap_=function(){this.userActive(!this.userActive())},n.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},n.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},n.handleTechTouchEnd_=function(e){e.preventDefault()},n.handleStageClick_=function(){this.reportUserActivity()},n.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var n=this.el(),r=c.a[this.fsApi_.fullscreenElement]===n;!r&&n.matches?r=n.matches(":"+this.fsApi_.fullscreen):!r&&n.msMatchesSelector&&(r=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}},n.handleTechFullscreenChange_=function(e,t){t&&(t.nativeIOSFullscreen&&this.toggleClass("vjs-ios-native-fs"),this.isFullscreen(t.isFullscreen))},n.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},n.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},n.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},n.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},n.handleTechError_=function(){var e=this.tech_.error();this.error(e)},n.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},n.getCache=function(){return this.cache_},n.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},n.techCall_=function(e,t){this.ready((function(){if(e in Vr)return function(e,t,n,r){return t[n](e.reduce(Wr(n),r))}(this.middleware_,this.tech_,e,t);if(e in Hr)return Ur(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw Ve(e),e}}),!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in Fr)return function(e,t,n){return e.reduceRight(Wr(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Hr)return Ur(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw Ve("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw Ve("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw Ve(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||s.a.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},n.play_=function(e){var t=this;void 0===e&&(e=tr),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(n||!Fn&&!Un||this.load());var r=this.techGet_("play");null===r?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)},n.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},n.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||zn(0,0)},n.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},n.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.applyInitTime_),void this.one("canplay",this.applyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},n.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},n.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},n.remainingTime=function(){return this.duration()-this.currentTime()},n.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},n.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=zn(0,0)),e},n.bufferedPercent=function(){return qn(this.buffered(),this.duration())},n.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},n.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},n.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},n.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},n.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},n.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},n.isFullscreen=function(e){if(void 0!==e){var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},n.requestFullscreen=function(e){var t=this.options_.Promise||s.a.Promise;if(t){var n=this;return new t((function(t,r){function i(){n.off("fullscreenerror",a),n.off("fullscreenchange",o)}function o(){i(),t()}function a(e,t){i(),r(t)}n.one("fullscreenchange",o),n.one("fullscreenerror",a);var s=n.requestFullscreenHelper_(e);if(s)return s.then(i,i),s}))}return this.requestFullscreenHelper_()},n.requestFullscreenHelper_=function(e){var t,n=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var r=this.el_[this.fsApi_.requestFullscreen](t);return r&&r.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),r}this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var e=this.options_.Promise||s.a.Promise;if(e){var t=this;return new e((function(e,n){function r(){t.off("fullscreenerror",o),t.off("fullscreenchange",i)}function i(){r(),e()}function o(e,t){r(),n(t)}t.one("fullscreenchange",i),t.one("fullscreenerror",o);var a=t.exitFullscreenHelper_();if(a)return a.then(r,r),a}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=c.a[this.fsApi_.exitFullscreen]();return t&&t.then((function(){return e.isFullscreen(!1)})),t}this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):this.exitFullWindow()},n.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=c.a.documentElement.style.overflow,zt(c.a,"keydown",this.boundFullWindowOnEscKey_),c.a.documentElement.style.overflow="hidden",at(c.a.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){b.a.isEventKey(e,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,qt(c.a,"keydown",this.boundFullWindowOnEscKey_),c.a.documentElement.style.overflow=this.docOrigOverflow,st(c.a.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},n.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},n.requestPictureInPicture=function(){if("pictureInPictureEnabled"in c.a&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in c.a)return c.a.exitPictureInPicture()},n.handleKeyDown=function(e){var t=this.options_.userActions;if(t&&t.hotkeys){(function(e){var t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if("input"===t)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type);return-1!==["textarea"].indexOf(t)})(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}},n.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,r=void 0===n?function(e){return b.a.isEventKey(e,"f")}:n,i=t.muteKey,o=void 0===i?function(e){return b.a.isEventKey(e,"m")}:i,a=t.playPauseKey,s=void 0===a?function(e){return b.a.isEventKey(e,"k")||b.a.isEventKey(e,"Space")}:a;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();var u=bn.getComponent("FullscreenToggle");!1!==c.a[this.fsApi_.fullscreenEnabled]&&u.prototype.handleClick.call(this,e)}else if(o.call(this,e)){e.preventDefault(),e.stopPropagation(),bn.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation(),bn.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},n.canPlayType=function(e){for(var t,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=jr.getTech(i);if(o||(o=bn.getComponent(i)),o){if(o.isSupported()&&(t=o.canPlayType(e)))return t}else Ve.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(e){var t,n=this,r=this.options_.techOrder.map((function(e){return[e,jr.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(Ve.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),i=function(e,t,n){var r;return e.some((function(e){return t.some((function(t){if(r=n(e,t))return!0}))})),r},o=function(e,t){var r=e[0];if(e[1].canPlaySource(t,n.options_[r.toLowerCase()]))return{source:t,tech:r}};return(this.options_.sourceOrder?i(e,r,(t=o,function(e,n){return t(n,e)})):i(r,e,o))||!1},n.src=function(e){var t=this;if(void 0===e)return this.cache_.src||"";var n=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):Ye(t)&&n.push(t)})),t=n}else t="string"==typeof t&&t.trim()?[Gr({src:t})]:Ye(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[Gr(t)]:[];return t}(e);n.length?(this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),Br(this,n[0],(function(e,r){var i,o;if(t.middleware_=r,t.cache_.sources=n,t.updateSourceCaches_(e),t.src_(e))return n.length>1?t.src(n.slice(1)):(t.changingSrc_=!1,t.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void t.triggerReady());i=r,o=t.tech_,i.forEach((function(e){return e.setTech&&e.setTech(o)}))}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},n.src_=function(e){var t,n,r=this,i=this.selectSource([e]);return!i||(t=i.tech,n=this.techName_,dn(t)!==dn(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},n.load=function(){this.techCall_("load")},n.reset=function(){var e=this,t=this.options_.Promise||s.a.Promise;this.paused()||!t?this.doReset_():tr(this.play().then((function(){return e.doReset_()})))},n.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),en(this)&&this.trigger("playerreset")},n.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},n.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},n.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},n.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},n.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},n.currentSource=function(){return this.cache_.source||{}},n.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},n.currentType=function(){return this.currentSource()&&this.currentSource().type||""},n.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},n.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},n.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},n.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},n.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},n.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},n.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},n.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},n.error=function(e){if(void 0===e)return this.error_||null;if(this.options_.suppressNotSupportedError&&e&&4===e.code){var t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Zn(e),this.addClass("vjs-error"),Ve.error("(CODE:"+this.error_.code+" "+Zn.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},n.reportUserActivity=function(e){this.userActivity_=!0},n.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},n.listenForUserActivity_=function(){var e,t,n,r=Qt(this,this.reportUserActivity),i=function(t){r(),this.clearInterval(e)};this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",i),this.on("mouseleave",i);var o,a=this.getChild("controlBar");!a||Un||En||(a.on("mouseenter",(function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0})),a.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(o);var e=this.options_.inactivityTimeout;e<=0||(o=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},n.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},n.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},n.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},n.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},n.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},n.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},n.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},n.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},n.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),en(this)&&this.trigger("languagechange"))},n.languages=function(){return pn(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=pn(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];(r=pn(r)).player=void 0,e.tracks[n]=r}return e},n.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var r=new or(this,t);return this.addChild(r),r.on("dispose",(function(){n.removeChild(r)})),r.open(),r},n.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<Po.length;n++){var r=Po[n];if(t<=this.breakpoints_[r]){if(e===r)return;e&&this.removeClass(Ao[e]),this.addClass(Ao[r]),this.breakpoint_=r;break}}},n.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},n.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=Ge({},Lo,e),this.updateCurrentBreakpoint_()),Ge(this.breakpoints_)},n.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},n.currentBreakpoint=function(){return this.breakpoint_},n.currentBreakpointClass=function(){return Ao[this.breakpoint_]||""},n.loadMedia=function(e,t){var n=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=pn(e);var r=this.cache_.media,i=r.artwork,o=r.poster,a=r.src,s=r.textTracks;!i&&o&&(this.cache_.media.artwork=[{src:o,type:qr(o)}]),a&&this.src(a),o&&this.poster(o),Array.isArray(s)&&s.forEach((function(e){return n.addRemoteTextTrack(e,!1)})),this.ready(t)}},n.getMedia=function(){if(!this.cache_.media){var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:qr(t.poster)}]),t}return pn(this.cache_.media)},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=lt(e),r=n["data-setup"];if(ot(e,"vjs-fill")&&(n.fill=!0),ot(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=g()(r||"{}"),o=i[0],a=i[1];o&&Ve.error(o),Ge(n,a)}if(Ge(t,n),e.hasChildNodes())for(var s=e.childNodes,u=0,c=s.length;u<c;u++){var l=s[u],f=l.nodeName.toLowerCase();"source"===f?t.sources.push(lt(l)):"track"===f&&t.tracks.push(lt(l))}return t},n.flexNotSupported_=function(){var e=c.a.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},n.debug=function(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},t}(bn);Rr.names.forEach((function(e){var t=Rr[e];Ro.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Ro.prototype.crossorigin=Ro.prototype.crossOrigin,Ro.players={};var jo=s.a.navigator;Ro.prototype.options_={techOrder:jr.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:jo&&(jo.languages&&jo.languages[0]||jo.userLanguage||jo.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){Ro.prototype[e]=function(){return this.techGet_(e)}})),Oo.forEach((function(e){Ro.prototype["handleTech"+dn(e)+"_"]=function(){return this.trigger(e)}})),bn.registerComponent("Player",Ro);var Do={},Mo=function(e){return Do.hasOwnProperty(e)},No=function(e){return Mo(e)?Do[e]:void 0},Bo=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},Uo=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},Fo=function(e,t){return t.prototype.name=e,function(){Uo(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=k()(t,[this].concat(r));return this[e]=function(){return o},Uo(this,o.getEventHash()),o}},Vo=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,this.log||(this.log=this.player.log.createLogger(this.name)),cn(this),delete this.trigger,fn(this,this.constructor.defaultState),Bo(t,this.name),this.dispose=Qt(this,this.dispose),t.on("dispose",this.dispose)}var t=e.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},t.trigger=function(e,t){return void 0===t&&(t={}),Gt(this.eventBusEl_,e,this.getEventHash(t))},t.handleStateChanged=function(e){},t.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t.activePlugins_[e]=!1,this.player=this.state=null,t[e]=Fo(e,Do[e])},e.isBasic=function(t){var n="string"==typeof t?No(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(Mo(t))Ve.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Ro.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof n+".");return Do[t]=n,"plugin"!==t&&(e.isBasic(n)?Ro.prototype[t]=function(e,t){var n=function(){Uo(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return Bo(this,e),Uo(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):Ro.prototype[t]=Fo(t,n)),n},e.deregisterPlugin=function(e){if("plugin"===e)throw new Error("Cannot de-register base plugin.");Mo(e)&&(delete Do[e],delete Ro.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(Do)),e.forEach((function(e){var n=No(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=No(e);return t&&t.VERSION||""},e}();Vo.getPlugin=No,Vo.BASE_PLUGIN_NAME="plugin",Vo.registerPlugin("plugin",Vo),Ro.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},Ro.prototype.hasPlugin=function(e){return!!Mo(e)};var Ho=function(e){return 0===e.indexOf("#")?e.slice(1):e};function Wo(e,t,n){var r=Wo.getPlayer(e);if(r)return t&&Ve.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"==typeof e?Et("#"+Ho(e)):e;if(!Je(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");i.ownerDocument.defaultView&&i.ownerDocument.body.contains(i)||Ve.warn("The element supplied is not included in the DOM"),t=t||{},Wo.hooks("beforesetup").forEach((function(e){var n=e(i,pn(t));Ye(n)&&!Array.isArray(n)?t=pn(t,n):Ve.error("please return an object in beforesetup hooks")}));var o=bn.getComponent("Player");return r=new o(i,t,n),Wo.hooks("setup").forEach((function(e){return e(r)})),r}if(Wo.hooks_={},Wo.hooks=function(e,t){return Wo.hooks_[e]=Wo.hooks_[e]||[],t&&(Wo.hooks_[e]=Wo.hooks_[e].concat(t)),Wo.hooks_[e]},Wo.hook=function(e,t){Wo.hooks(e,t)},Wo.hookOnce=function(e,t){Wo.hooks(e,[].concat(t).map((function(t){return function n(){return Wo.removeHook(e,n),t.apply(void 0,arguments)}})))},Wo.removeHook=function(e,t){var n=Wo.hooks(e).indexOf(t);return!(n<=-1)&&(Wo.hooks_[e]=Wo.hooks_[e].slice(),Wo.hooks_[e].splice(n,1),!0)},!0!==s.a.VIDEOJS_NO_DYNAMIC_STYLE&&Ze()){var zo=Et(".vjs-styles-defaults");if(!zo){zo=jt("vjs-styles-defaults");var qo=Et("head");qo&&qo.insertBefore(zo,qo.firstChild),Dt(zo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}At(1,Wo),Wo.VERSION="7.11.2",Wo.options=Ro.prototype.options_,Wo.getPlayers=function(){return Ro.players},Wo.getPlayer=function(e){var t,n=Ro.players;if("string"==typeof e){var r=Ho(e),i=n[r];if(i)return i;t=Et("#"+r)}else t=e;if(Je(t)){var o=t,a=o.player,s=o.playerId;if(a||n[s])return a||n[s]}},Wo.getAllPlayers=function(){return Object.keys(Ro.players).map((function(e){return Ro.players[e]})).filter(Boolean)},Wo.players=Ro.players,Wo.getComponent=bn.getComponent,Wo.registerComponent=function(e,t){jr.isTech(t)&&Ve.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),bn.registerComponent.call(bn,e,t)},Wo.getTech=jr.getTech,Wo.registerTech=jr.registerTech,Wo.use=function(e,t){Dr[e]=Dr[e]||[],Dr[e].push(t)},Object.defineProperty(Wo,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Wo.middleware,"TERMINATOR",{value:Nr,writeable:!1,enumerable:!0}),Wo.browser=Vn,Wo.TOUCH_ENABLED=Mn,Wo.extend=function(e,t){void 0===t&&(t={});var n=function(){e.apply(this,arguments)},r={};for(var i in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),I()(n,e),e&&(n.super_=e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},Wo.mergeOptions=pn,Wo.bind=Qt,Wo.registerPlugin=Vo.registerPlugin,Wo.deregisterPlugin=Vo.deregisterPlugin,Wo.plugin=function(e,t){return Ve.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Vo.registerPlugin(e,t)},Wo.getPlugins=Vo.getPlugins,Wo.getPlugin=Vo.getPlugin,Wo.getPluginVersion=Vo.getPluginVersion,Wo.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),Wo.options.languages=pn(Wo.options.languages,((n={})[e]=t,n)),Wo.options.languages[e]},Wo.log=Ve,Wo.createLogger=He,Wo.createTimeRange=Wo.createTimeRanges=zn,Wo.formatTime=si,Wo.setFormatTime=function(e){ai=e},Wo.resetFormatTime=function(){ai=oi},Wo.parseUrl=_r,Wo.isCrossOrigin=Sr,Wo.EventTarget=Jt,Wo.on=zt,Wo.one=Yt,Wo.off=qt,Wo.trigger=Gt,Wo.xhr=T.a,Wo.TextTrack=Ir,Wo.AudioTrack=Or,Wo.VideoTrack=xr,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){Wo[e]=function(){return Ve.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Ot[e].apply(null,arguments)}})),Wo.computedStyle=Ke,Wo.dom=Ot,Wo.url=Cr,Wo.defineLazyProperty=Eo;
91
- /*! @name @videojs/http-streaming @version 2.4.2 @license Apache-2.0 */
92
- var Go,Yo=x.a,Xo=function(e,t,n){return e&&n&&n.responseURL&&t!==n.responseURL?n.responseURL:t},Ko=Wo.log,$o=function(e,t){return e+"-"+t},Qo=function(e){var t=e.manifestString,n=e.customTagParsers,r=void 0===n?[]:n,i=e.customTagMappers,o=void 0===i?[]:i,a=new N;return r.forEach((function(e){return a.addParser(e)})),o.forEach((function(e){return a.addTagMapper(e)})),a.push(t),a.end(),a.manifest},Zo=function(e,t){["AUDIO","SUBTITLES"].forEach((function(n){for(var r in e.mediaGroups[n])for(var i in e.mediaGroups[n][r]){var o=e.mediaGroups[n][r][i];t(o,n,r,i)}}))},Jo=function(e){var t=e.playlist,n=e.uri,r=e.id;t.id=r,n&&(t.uri=n),t.attributes=t.attributes||{}},ea=function(e,t){e.uri=t;for(var n=0;n<e.playlists.length;n++)if(!e.playlists[n].uri){var r="placeholder-uri-"+n;e.playlists[n].uri=r}Zo(e,(function(t,n,r,i){if(t.playlists&&t.playlists.length&&!t.playlists[0].uri){var o="placeholder-uri-"+n+"-"+r+"-"+i,a=$o(0,o);t.playlists[0].uri=o,t.playlists[0].id=a,e.playlists[a]=t.playlists[0],e.playlists[o]=t.playlists[0]}})),function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];Jo({playlist:n,id:$o(t,n.uri)}),n.resolvedUri=Yo(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||Ko.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){Zo(e,(function(t){t.uri&&(t.resolvedUri=Yo(e.uri,t.uri))}))}(e)},ta=Wo.mergeOptions,na=Wo.EventTarget,ra=function(e,t){e.resolvedUri||(e.resolvedUri=Yo(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Yo(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Yo(t,e.map.uri))},ia=function(e,t){var n=ta(e,{}),r=n.playlists[t.id];if(!r)return null;if(r.segments&&t.segments&&r.segments.length===t.segments.length&&r.endList===t.endList&&r.mediaSequence===t.mediaSequence)return null;var i=ta(r,t);r.segments&&(i.segments=function(e,t,n){var r=t.slice();n=n||0;for(var i=Math.min(e.length,t.length+n),o=n;o<i;o++)r[o-n]=ta(e[o],r[o-n]);return r}(r.segments,t.segments,t.mediaSequence-r.mediaSequence)),i.segments.forEach((function(e){ra(e,i.resolvedUri)}));for(var o=0;o<n.playlists.length;o++)n.playlists[o].id===t.id&&(n.playlists[o]=i);return n.playlists[t.id]=i,n.playlists[t.uri]=i,n},oa=function(e,t){var n=e.segments[e.segments.length-1];return t&&n&&n.duration?1e3*n.duration:500*(e.targetDuration||10)},aa=function(e){function t(t,n,r){var i;if(void 0===r&&(r={}),i=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");var o=r,a=o.withCredentials,s=void 0!==a&&a,u=o.handleManifestRedirects,c=void 0!==u&&u;i.src=t,i.vhs_=n,i.withCredentials=s,i.handleManifestRedirects=c;var l=n.options_;return i.customTagParsers=l&&l.customTagParsers||[],i.customTagMappers=l&&l.customTagMappers||[],i.state="HAVE_NOTHING",i.on("mediaupdatetimeout",(function(){"HAVE_METADATA"===i.state&&(i.state="HAVE_CURRENT_METADATA",i.request=i.vhs_.xhr({uri:Yo(i.master.uri,i.media().uri),withCredentials:i.withCredentials},(function(e,t){if(i.request)return e?i.playlistRequestError(i.request,i.media(),"HAVE_METADATA"):void i.haveMetadata({playlistString:i.request.responseText,url:i.media().uri,id:i.media().id})})))})),i}y()(t,e);var n=t.prototype;return n.playlistRequestError=function(e,t,n){var r=t.uri,i=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[i],status:e.status,message:"HLS playlist request error at URL: "+r+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},n.haveMetadata=function(e){var t=this,n=e.playlistString,r=e.playlistObject,i=e.url,o=e.id;this.request=null,this.state="HAVE_METADATA";var a=r||Qo({manifestString:n,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers});a.lastRequest=Date.now(),Jo({playlist:a,uri:i,id:o});var u=ia(this.master,a);this.targetDuration=a.targetDuration,u?(this.master=u,this.media_=this.master.playlists[o]):this.trigger("playlistunchanged"),this.media().endList||(s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=s.a.setTimeout((function(){t.trigger("mediaupdatetimeout")}),oa(this.media(),!!u))),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),s.a.clearTimeout(this.mediaUpdateTimeout),s.a.clearTimeout(this.finalRenditionTimeout),this.off()},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e,t){var n=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(s.a.clearTimeout(this.finalRenditionTimeout),t){var r=e.targetDuration/2*1e3||5e3;this.finalRenditionTimeout=s.a.setTimeout(this.media.bind(this,e,!1),r)}else{var i=this.state,o=!this.media_||e.id!==this.media_.id;if(this.master.playlists[e.id].endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(o&&(this.trigger("mediachanging"),"HAVE_MASTER"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(o){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(function(t,r){if(n.request){if(e.lastRequest=Date.now(),e.resolvedUri=Xo(n.handleManifestRedirects,e.resolvedUri,r),t)return n.playlistRequestError(n.request,e,i);n.haveMetadata({playlistString:r.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===i?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}},n.pause=function(){this.stopRequest(),s.a.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},n.load=function(e){var t=this;s.a.clearTimeout(this.mediaUpdateTimeout);var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=s.a.setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=s.a.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((function(){e.setupInitialPlaylist(e.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=Xo(e.handleManifestRedirects,e.src,n);var r=Qo({manifestString:n.responseText,customTagParsers:e.customTagParsers,customTagMappers:e.customTagMappers});e.setupInitialPlaylist(r)}}))},n.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},n.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,ea(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments&&e.segments.forEach((function(t){ra(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||s.a.location.href;this.master=function(e,t){var n=$o(0,t),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:s.a.location.href,resolvedUri:s.a.location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return r.playlists[n]=r.playlists[0],r.playlists[t]=r.playlists[0],r}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(na),sa=function(e,t){var n,r=[];if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&r.push([e.start(n),e.end(n)]);return Wo.createTimeRanges(r)},ua=function(e,t){return sa(e,(function(e,n){return e-.1<=t&&n+.1>=t}))},ca=function(e,t){return sa(e,(function(e){return e-1/30>=t}))},la=function(e){var t=[];if(!e||!e.length)return"";for(var n=0;n<e.length;n++)t.push(e.start(n)+" => "+e.end(n));return t.join(", ")},fa=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},ha=Wo.createTimeRange,da=function(e,t,n){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var r=function(e,t){var n=0,r=t-e.mediaSequence,i=e.segments[r];if(i){if(void 0!==i.start)return{result:i.start,precise:!0};if(void 0!==i.end)return{result:i.end-i.duration,precise:!0}}for(;r--;){if(void 0!==(i=e.segments[r]).end)return{result:n+i.end,precise:!0};if(n+=i.duration,void 0!==i.start)return{result:n+i.start,precise:!0}}return{result:n,precise:!1}}(e,t);if(r.precise)return r.result;var i=function(e,t){for(var n,r=0,i=t-e.mediaSequence;i<e.segments.length;i++){if(void 0!==(n=e.segments[i]).start)return{result:n.start-r,precise:!0};if(r+=n.duration,void 0!==n.end)return{result:n.end-r,precise:!0}}return{result:-1,precise:!1}}(e,t);return i.precise?i.result:r.result+n},pa=function(e,t,n){if(!e)return 0;if("number"!=typeof n&&(n=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return s.a.Infinity}return da(e,t,n)},ya=function(e,t,n){var r=0;if(t>n){var i=[n,t];t=i[0],n=i[1]}if(t<0){for(var o=t;o<Math.min(0,n);o++)r+=e.targetDuration;t=0}for(var a=t;a<n;a++)r+=e.segments[a].duration;return r},ma=function(e,t){if(!e.segments.length)return 0;var n=e.segments.length,r=e.segments[n-1].duration||e.targetDuration,i="number"==typeof t?t:r+2*e.targetDuration;if(0===i)return n;for(var o=0;n--&&!((o+=e.segments[n].duration)>=i););return Math.max(0,n)},ga=function(e,t,n,r){if(!e||!e.segments)return null;if(e.endList)return pa(e);if(null===t)return null;t=t||0;var i=n?ma(e,r):e.segments.length;return da(e,e.mediaSequence+i,t)},va=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},ba=function(e){return e.excludeUntil&&e.excludeUntil===1/0},_a=function(e){var t=va(e);return!e.disabled&&!t},Ta=function(e,t){return t.attributes&&t.attributes[e]},wa=function(e,t){if(1===e.playlists.length)return!0;var n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!_a(e)&&(e.attributes.BANDWIDTH||0)<n})).length},Sa={duration:pa,seekable:function(e,t,n){var r=t||0,i=ga(e,t,!0,n);return null===i?ha():ha(r,i)},safeLiveIndex:ma,getMediaInfoForTime:function(e,t,n,r){var i,o=e.segments.length,a=t-r;if(a<0){if(n>0)for(i=n-1;i>=0;i--)if((a+=e.segments[i].duration+1/30)>0)return{mediaIndex:i,startTime:r-ya(e,n,i)};return{mediaIndex:0,startTime:t}}if(n<0){for(i=n;i<0;i++)if((a-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};n=0}for(i=n;i<o;i++)if((a-=e.segments[i].duration+1/30)<0)return{mediaIndex:i,startTime:r+ya(e,n,i)};return{mediaIndex:o-1,startTime:t}},isEnabled:_a,isDisabled:function(e){return e.disabled},isBlacklisted:va,isIncompatible:ba,playlistEnd:ga,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Ta,estimateSegmentRequestTime:function(e,t,n,r){return void 0===r&&(r=0),Ta("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*r)/t:NaN},isLowestEnabledRendition:wa},Ca=Wo.xhr,ka=Wo.mergeOptions,Ea=function(e,t,n,r){var i="arraybuffer"===e.responseType?e.response:e.responseText;!t&&i&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=i.byteLength||i.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(i||e.responseText)))),r(t,e)},Ia=function(){return function e(t,n){t=ka({timeout:45e3},t);var r=e.beforeRequest||Wo.Vhs.xhr.beforeRequest;if(r&&"function"==typeof r){var i=r(t);i&&(t=i)}var o=Ca(t,(function(e,t){return Ea(o,e,t,n)})),a=o.abort;return o.abort=function(){return o.aborted=!0,a.apply(o,arguments)},o.uri=t.uri,o.requestTime=Date.now(),o}},Oa=function(e){var t,n,r={};return e.byterange&&(r.Range=(t=e.byterange,n=t.offset+t.length-1,"bytes="+t.offset+"-"+n)),r},xa=function(e,t){return e.start(t)+"-"+e.end(t)},Pa=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},Aa=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},La=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];ArrayBuffer.isView(r)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t},Ra=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},ja=function(e){return e.resolvedUri},Da=function(e){for(var t=Array.prototype.slice.call(e),n="",r=0;r<t.length/16;r++)n+=t.slice(16*r,16*r+16).map(Pa).join("")+" "+t.slice(16*r,16*r+16).map(Aa).join("")+"\n";return n},Ma=Object.freeze({__proto__:null,createTransferableMessage:La,initSegmentId:Ra,segmentKeyId:ja,hexDump:Da,tagDump:function(e){var t=e.bytes;return Da(t)},textRanges:function(e){var t,n="";for(t=0;t<e.length;t++)n+=xa(e,t)+" ";return n}}),Na=function(e){var t=e.playlist,n=e.time,r=void 0===n?void 0:n,i=e.callback;if(!i)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===r)return i({message:"getProgramTime: playlist and time must be provided"});var o=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var n,r=0,i=0;i<t.segments.length&&!(e<=(r=(n=t.segments[i]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:r+n.duration));i++);var o=t.segments[t.segments.length-1];if(o.videoTimingInfo&&o.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>r){if(e>r+.25*o.duration)return null;n=o}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:r-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(r,t);if(!o)return i({message:"valid programTime was not found"});if("estimate"===o.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:o.estimatedStart});var a={mediaSeconds:r},s=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,r=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*r)}(r,o.segment);return s&&(a.programDateTime=s.toISOString()),i(null,a)},Ba=function e(t){var n=t.programTime,r=t.playlist,i=t.retryCount,o=void 0===i?2:i,a=t.seekTo,s=t.pauseAfterSeek,u=void 0===s||s,c=t.tech,l=t.callback;if(!l)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!r||!a)return l({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.endList&&!c.hasStarted_)return l({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++){if(!e.segments[t].dateTimeObject)return!1}return!0}(r))return l({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});var f=function(e,t){var n;try{n=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var r=t.segments[0];if(n<r.dateTimeObject)return null;for(var i=0;i<t.segments.length-1;i++){if(r=t.segments[i],n<t.segments[i+1].dateTimeObject)break}var o,a=t.segments[t.segments.length-1],s=a.dateTimeObject,u=a.videoTimingInfo?(o=a.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:a.duration+.25*a.duration;return n>new Date(s.getTime()+1e3*u)?null:(n>s&&(r=a),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:Sa.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(n,r);if(!f)return l({message:n+" was not found in the stream"});var h=f.segment,d=function(e,t){var n,r;try{n=new Date(e),r=new Date(t)}catch(e){}var i=n.getTime();return(r.getTime()-i)/1e3}(h.dateTimeObject,n);if("estimate"===f.type)return 0===o?l({message:n+" is not buffered yet. Try again"}):(a(f.estimatedStart+d),void c.one("seeked",(function(){e({programTime:n,playlist:r,retryCount:o-1,seekTo:a,pauseAfterSeek:u,tech:c,callback:l})})));var p=h.start+d;c.one("seeked",(function(){return l(null,c.currentTime())})),u&&c.pause(),a(p)},Ua=function(e,t){if(4===e.readyState)return t()},Fa=Wo.EventTarget,Va=Wo.mergeOptions,Ha=function(e){var t=e.byterange.offset+e.byterange.length-1;return e.uri+"-"+e.byterange.offset+"-"+t},Wa=function(e,t){var n,r,i={};for(var o in e){var a=e[o].sidx;if(a){var s=Ha(a);if(!t[s])break;var u=t[s].sidxInfo;n=u,r=a,(Boolean(!n.map&&!r.map)||Boolean(n.map&&r.map&&n.map.byterange.offset===r.map.byterange.offset&&n.map.byterange.length===r.map.byterange.length))&&n.uri===r.uri&&n.byterange.offset===r.byterange.offset&&n.byterange.length===r.byterange.length&&(i[s]=t[s])}}return i},za=function(e){function t(t,n,r,i){var o;void 0===r&&(r={}),(o=e.call(this)||this).masterPlaylistLoader_=i||d()(o),i||(o.isMaster_=!0);var a=r,s=a.withCredentials,u=void 0!==s&&s,c=a.handleManifestRedirects,l=void 0!==c&&c;if(o.vhs_=n,o.withCredentials=u,o.handleManifestRedirects=l,!t)throw new Error("A non-empty playlist URL or object is required");return o.on("minimumUpdatePeriod",(function(){o.refreshXml_()})),o.on("mediaupdatetimeout",(function(){o.refreshMedia_(o.media().id)})),o.state="HAVE_NOTHING",o.loadedPlaylists_={},o.isMaster_?(o.masterPlaylistLoader_.srcUrl=t,o.masterPlaylistLoader_.sidxMapping_={}):o.childPlaylist_=t,o}y()(t,e);var n=t.prototype;return n.requestErrored_=function(e,t,n){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,n&&(this.state=n),this.trigger("error"),!0):void 0)},n.addSidxSegments_=function(e,t,n){var r=this,i=e.sidx&&Ha(e.sidx);if(e.sidx&&i&&!this.masterPlaylistLoader_.sidxMapping_[i]){var o=Xo(this.handleManifestRedirects,e.sidx.resolvedUri),a=this.masterPlaylistLoader_.sidxMapping_;a[i]={sidxInfo:e.sidx};var u=function(o,s){if(!r.requestErrored_(o,s,t)){var u=Ae()(Object(Re.toUint8)(s.response).subarray(8));return a[i].sidx=u,xe(e,u,e.sidx.resolvedUri),n(!0)}};this.request=function(e,t,n){var r,i=[],o=!1,a=function(e,t,r,i){return t.abort(),o=!0,n(e,t,r,i)},s=function(e,t){if(!o){if(e)return a(e,t,"",i);var n=t.responseText.substring(i&&i.byteLength||0,t.responseText.length);if(i=Object(Re.concatTypedArrays)(i,Object(Re.stringToBytes)(n,!0)),r=r||Object(Le.getId3Offset)(i),i.length<10||r&&i.length<r+2)return Ua(t,(function(){return a(e,t,"",i)}));var s=Object(Le.detectContainerForBytes)(i);return"ts"===s&&i.length<188||!s&&i.length<376?Ua(t,(function(){return a(e,t,"",i)})):a(null,t,s,i)}},u=t({uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){t.total,t.loaded;return Ea(e,null,{statusCode:e.status},s)}))}},(function(e,t){return Ea(u,e,t,s)}));return u}(o,this.vhs_.xhr,(function(t,n,i,a){if(t)return u(t,n);if(!i||"mp4"!==i)return u({status:n.status,message:"Unsupported "+(i||"unknown")+" container type for sidx segment at URL: "+o,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},n);var s=e.sidx.byterange,c=s.offset,l=s.length;if(a.length>=l+c)return u(t,{response:a.subarray(c,c+l),status:n.status,uri:n.uri});r.request=r.vhs_.xhr({uri:o,responseType:"arraybuffer",headers:Oa({byterange:e.sidx.byterange})},u)}))}else this.mediaRequest_=s.a.setTimeout((function(){return n(!1)}),0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},s.a.clearTimeout(this.minimumUpdatePeriodTimeout_),s.a.clearTimeout(this.mediaRequest_),s.a.clearTimeout(this.mediaUpdateTimeout),this.off()},n.hasPendingRequest=function(){return this.request||this.mediaRequest_},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,(function(r){t.haveMetadata({startingState:n,playlist:e})})))},n.haveMetadata=function(e){var t=e.startingState,n=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,this.mediaRequest_=null,this.refreshMedia_(n.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},n.pause=function(){this.stopRequest(),s.a.clearTimeout(this.mediaUpdateTimeout),s.a.clearTimeout(this.minimumUpdatePeriodTimeout_),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(e){var t=this;s.a.clearTimeout(this.mediaUpdateTimeout),s.a.clearTimeout(this.minimumUpdatePeriodTimeout_);var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=s.a.setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_((function(t,n){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=s.a.setTimeout((function(){return e.haveMaster_()}),0)},n.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(n,r){if(!t.requestErrored_(n,r)){var i=r.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=r.responseText,r.responseHeaders&&r.responseHeaders.date?t.masterLoaded_=Date.parse(r.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=Xo(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,r),i?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(r,i)}))):e(r,i)}"HAVE_NOTHING"===t.state&&(t.started=!1)}))},n.syncClientServerClock_=function(e){var t=this,n=Oe(this.masterPlaylistLoader_.masterXml_);return null===n?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===n.method?(this.masterPlaylistLoader_.clientOffset_=n.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Yo(this.masterPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},(function(r,i){if(t.request){if(r)return t.masterPlaylistLoader_.clientOffset_=t.masterLoaded_-Date.now(),e();var o;o="HEAD"===n.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):t.masterLoaded_:Date.parse(i.responseText),t.masterPlaylistLoader_.clientOffset_=o-Date.now(),e()}})))},n.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},n.handleMaster_=function(){this.mediaRequest_=null;var e,t,n,r,i,o,a=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_},t=e.masterXml,n=e.srcUrl,r=e.clientOffset,i=e.sidxMapping,o=Ie(t,{manifestUri:n,clientOffset:r,sidxMapping:i}),ea(o,n),o),s=this.masterPlaylistLoader_.master;s&&(a=function(e,t,n){for(var r=!0,i=Va(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),o=0;o<t.playlists.length;o++){var a=t.playlists[o];if(a.sidx){var s=Ha(a.sidx);n&&n[s]&&xe(a,n[s].sidx,a.sidx.resolvedUri)}var u=ia(i,a);u&&(i=u,r=!1)}return Zo(t,(function(e,t,n,o){if(e.playlists&&e.playlists.length){var a=e.playlists[0].id,s=ia(i,e.playlists[0]);s&&((i=s).mediaGroups[t][n][o].playlists[0]=i.playlists[a],r=!1)}})),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(r=!1),r?null:i}(s,a,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=a||s;var u=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return u&&u!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=u),(!s||a&&s.minimumUpdatePeriod!==a.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(a)},n.updateMinimumUpdatePeriodTimeout_=function(){var e=this;s.a.clearTimeout(this.minimumUpdatePeriodTimeout_);var t=function t(n){e.minimumUpdatePeriodTimeout_=s.a.setTimeout((function(){e.trigger("minimumUpdatePeriod"),t(n)}),n)},n=this.masterPlaylistLoader_.master&&this.masterPlaylistLoader_.master.minimumUpdatePeriod;n>0?t(n):0===n&&(this.media()?t(1e3*this.media().targetDuration):this.one("loadedplaylist",(function(){t(1e3*e.media().targetDuration)})))},n.refreshXml_=function(){var e=this;this.requestMaster_((function(t,n){var r,i,o;n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(r=e.masterPlaylistLoader_.master,i=e.masterPlaylistLoader_.sidxMapping_,o=Wa(r.playlists,i),Zo(r,(function(e,t,n,r){if(e.playlists&&e.playlists.length){var a=e.playlists;o=Va(o,Wa(a,i))}})),o),e.addSidxSegments_(e.media(),e.state,(function(t){e.refreshMedia_(e.media().id)})))}))},n.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var n=this.masterPlaylistLoader_.master.playlists,r=!this.media_||this.media_!==n[e];r?this.media_=n[e]:this.trigger("playlistunchanged"),this.media().endList||(this.mediaUpdateTimeout=s.a.setTimeout((function(){t.trigger("mediaupdatetimeout")}),oa(this.media(),Boolean(r)))),this.trigger("loadedplaylist")},t}(Fa),qa={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},Ga=function(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer},Ya=[],Xa=function(e){var t=e.transmuxer,n=e.bytes,r=e.audioAppendStart,i=e.gopsToAlignWith,o=e.isPartial,a=e.remux,s=e.onData,u=e.onTrackInfo,c=e.onAudioTimingInfo,l=e.onVideoTimingInfo,f=e.onVideoSegmentTimingInfo,h=e.onAudioSegmentTimingInfo,d=e.onId3,p=e.onCaptions,y=e.onDone,m={isPartial:o,buffer:[]};if(t.onmessage=function(e){Go&&("data"===e.data.action&&function(e,t,n){var r=e.data.segment,i=r.type,o=r.initSegment,a=r.captions,s=r.captionStreams,u=r.metadata,c=r.videoFrameDtsTime,l=r.videoFramePtsTime;t.buffer.push({captions:a,captionStreams:s,metadata:u});var f=e.data.segment.boxes||{data:e.data.segment.data},h={type:i,data:new Uint8Array(f.data,f.data.byteOffset,f.data.byteLength),initSegment:new Uint8Array(o.data,o.byteOffset,o.byteLength)};void 0!==c&&(h.videoFrameDtsTime=c),void 0!==l&&(h.videoFramePtsTime=l),n(h)}(e,m,s),"trackinfo"===e.data.action&&u(e.data.trackInfo),"gopInfo"===e.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(e,m),"audioTimingInfo"===e.data.action&&c(e.data.audioTimingInfo),"videoTimingInfo"===e.data.action&&l(e.data.videoTimingInfo),"videoSegmentTimingInfo"===e.data.action&&f(e.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===e.data.action&&h(e.data.audioSegmentTimingInfo),"id3Frame"===e.data.action&&d([e.data.id3Frame],e.data.id3Frame.dispatchType),"caption"===e.data.action&&p(e.data.caption),"transmuxed"===e.data.type&&(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:m,callback:y}),Ka()))},r&&t.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(i)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:i}),void 0!==a&&t.postMessage({action:"setRemux",remux:a}),n.byteLength){var g=n instanceof ArrayBuffer?n:n.buffer,v=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:g,byteOffset:v,byteLength:n.byteLength},[g])}t.postMessage({action:o?"partialFlush":"flush"})},Ka=function(){Go=null,Ya.length&&("function"==typeof(Go=Ya.shift())?Go():Xa(Go))},$a=function(e,t){e.postMessage({action:t}),Ka()},Qa=function(e,t){if(!Go)return Go=e,void $a(t,e);Ya.push($a.bind(null,t,e))},Za=function(e){if(!Go)return Go=e,void Xa(e);Ya.push(e)},Ja=function(e){Qa("reset",e)},es=function(){Go=null,Ya.length=0},ts=function(e){Qa("endTimeline",e)},ns=2,rs=-101,is=-102,os=function(e){e.forEach((function(e){e.abort()}))},as=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:rs,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:is,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:ns,xhr:t}:null},ss=function(e){var t=e.segment,n=e.bytes,r=e.isPartial,i=e.trackInfoFn,o=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,u=e.id3Fn,c=e.captionsFn,l=e.dataFn,f=e.doneFn,h=t.map&&t.map.tracks||{},d=Boolean(h.audio&&h.video),p=o.bind(null,t,"audio","start"),y=o.bind(null,t,"audio","end"),m=o.bind(null,t,"video","start"),g=o.bind(null,t,"video","end");if(!r&&!t.lastReachedChar){var v=function(e,t){var n=De.a.inspect(e,t*Me.ONE_SECOND_IN_TS);if(!n)return null;var r={hasVideo:n.video&&2===n.video.length||!1,hasAudio:n.audio&&2===n.audio.length||!1};return r.hasVideo&&(r.videoStart=n.video[0].ptsTime),r.hasAudio&&(r.audioStart=n.audio[0].ptsTime),r}(n,t.baseStartTime);v&&(i(t,{hasAudio:v.hasAudio,hasVideo:v.hasVideo,isMuxed:d}),i=null,v.hasAudio&&!d&&p(v.audioStart),v.hasVideo&&m(v.videoStart),p=null,m=null)}Za({bytes:n,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,isPartial:r,remux:d,onData:function(e){e.type="combined"===e.type?"video":e.type,l(t,e)},onTrackInfo:function(e){i&&(d&&(e.isMuxed=!0),i(t,e))},onAudioTimingInfo:function(e){p&&void 0!==e.start&&(p(e.start),p=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:function(e){m&&void 0!==e.start&&(m(e.start),m=null),g&&void 0!==e.end&&g(e.end)},onVideoSegmentTimingInfo:function(e){a(e)},onAudioSegmentTimingInfo:function(e){s(e)},onId3:function(e,n){u(t,e,n)},onCaptions:function(e){c(t,[e])},onDone:function(e){f&&!r&&(e.type="combined"===e.type?"video":e.type,f(null,t,e))}})},us=function(e){var t=e.segment,n=e.bytes,r=e.isPartial,i=e.trackInfoFn,o=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,u=e.id3Fn,c=e.captionsFn,l=e.dataFn,f=e.doneFn,h=new Uint8Array(n);if(Object(Le.isLikelyFmp4MediaSegment)(h)){t.isFmp4=!0;var d=t.map.tracks,p={isFmp4:!0,hasVideo:!!d.video,hasAudio:!!d.audio};d.audio&&d.audio.codec&&"enca"!==d.audio.codec&&(p.audioCodec=d.audio.codec),d.video&&d.video.codec&&"encv"!==d.video.codec&&(p.videoCodec=d.video.codec),d.video&&d.audio&&(p.isMuxed=!0),i(t,p);var y=Be.a.startTime(t.map.timescales,h);p.hasAudio&&!p.isMuxed&&o(t,"audio","start",y),p.hasVideo&&o(t,"video","start",y);var m=function(e){l(t,{data:n,type:p.hasAudio&&!p.isMuxed?"audio":"video"}),e&&e.length&&c(t,e),f(null,t,{})};if(!d.video||!n.byteLength||!t.transmuxer)return void m();var g=n instanceof ArrayBuffer?n:n.buffer,v=n instanceof ArrayBuffer?0:n.byteOffset;return t.transmuxer.addEventListener("message",(function e(r){if("mp4Captions"===r.data.action){t.transmuxer.removeEventListener("message",e);var i=r.data.data;t.bytes=n=new Uint8Array(i,i.byteOffset||0,i.byteLength),m(r.data.captions)}})),void t.transmuxer.postMessage({action:"pushMp4Captions",timescales:t.map.timescales,trackIds:[d.video.id],data:g,byteOffset:v,byteLength:n.byteLength},[g])}if(t.transmuxer){if(void 0===t.container&&(t.container=Object(Le.detectContainerForBytes)(h)),"ts"!==t.container&&"aac"!==t.container)return i(t,{hasAudio:!1,hasVideo:!1}),void f(null,t,{});ss({segment:t,bytes:n,isPartial:r,trackInfoFn:i,timingInfoFn:o,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:u,captionsFn:c,dataFn:l,doneFn:f})}else f(null,t,{})},cs=function(e){var t=e.activeXhrs,n=e.decryptionWorker,r=e.trackInfoFn,i=e.timingInfoFn,o=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,c=e.dataFn,l=e.doneFn,f=0,h=!1;return function(e,d){if(!h){if(e)return h=!0,os(t),l(e,d);if((f+=1)===t.length){if(d.endOfAllRequests=Date.now(),d.encryptedBytes)return function(e){var t,n=e.decryptionWorker,r=e.segment,i=e.trackInfoFn,o=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,u=e.id3Fn,c=e.captionsFn,l=e.dataFn,f=e.doneFn;n.addEventListener("message",(function e(t){if(t.data.source===r.requestId){n.removeEventListener("message",e);var h=t.data.decrypted;r.bytes=new Uint8Array(h.bytes,h.byteOffset,h.byteLength),us({segment:r,bytes:r.bytes,isPartial:!1,trackInfoFn:i,timingInfoFn:o,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:u,captionsFn:c,dataFn:l,doneFn:f})}})),t=r.key.bytes.slice?r.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(r.key.bytes)),n.postMessage(La({source:r.requestId,encrypted:r.encryptedBytes,key:t,iv:r.key.iv}),[r.encryptedBytes.buffer,t.buffer])}({decryptionWorker:n,segment:d,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:u,dataFn:c,doneFn:l});us({segment:d,bytes:d.bytes,isPartial:!1,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:u,dataFn:c,doneFn:l})}}}},ls=function(e){var t=e.segment,n=e.progressFn,r=e.trackInfoFn,i=e.timingInfoFn,o=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,c=e.dataFn,l=e.handlePartialData;return function(e){var f=e.target;if(!f.aborted){if(l&&!t.key&&f.responseText&&f.responseText.length>=8){var h=Ga(f.responseText.substring(t.lastReachedChar||0));!t.lastReachedChar&&Object(Le.isLikelyFmp4MediaSegment)(new Uint8Array(h))||(t.lastReachedChar=f.responseText.length,us({segment:t,bytes:h,isPartial:!0,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:u,dataFn:c}))}return t.stats=Wo.mergeOptions(t.stats,function(e){var t=e.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n}(e)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),n(e,t)}}},fs=function(e){var t=e.xhr,n=e.xhrOptions,r=e.decryptionWorker,i=e.segment,o=e.abortFn,a=e.progressFn,s=e.trackInfoFn,u=e.timingInfoFn,c=e.videoSegmentTimingInfoFn,l=e.audioSegmentTimingInfoFn,f=e.id3Fn,h=e.captionsFn,d=e.dataFn,p=e.doneFn,y=e.handlePartialData,m=[],g=cs({activeXhrs:m,decryptionWorker:r,trackInfoFn:s,timingInfoFn:u,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:l,id3Fn:f,captionsFn:h,dataFn:d,doneFn:p});if(i.key&&!i.key.bytes){var v=t(Wo.mergeOptions(n,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),function(e,t){return function(n,r){var i=r.response,o=as(n,r);if(o)return t(o,e);if(16!==i.byteLength)return t({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:ns,xhr:r},e);var a=new DataView(i);return e.key.bytes=new Uint32Array([a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)]),t(null,e)}}(i,g));m.push(v)}if(i.map&&!i.map.bytes){var b=t(Wo.mergeOptions(n,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:Oa(i.map)}),function(e){var t=e.segment,n=e.finishProcessingFn;return function(e,r){var i=r.response,o=as(e,r);if(o)return n(o,t);if(0===i.byteLength)return n({status:r.status,message:"Empty HLS segment content at URL: "+r.uri,code:ns,xhr:r},t);t.map.bytes=new Uint8Array(r.response);var a=Object(Le.detectContainerForBytes)(t.map.bytes);return"mp4"!==a?n({status:r.status,message:"Found unsupported "+(a||"unknown")+" container for initialization segment at URL: "+r.uri,code:ns,internal:!0,xhr:r},t):(Be.a.tracks(t.map.bytes).forEach((function(e){t.map.tracks=t.map.tracks||{},t.map.tracks[e.type]||(t.map.tracks[e.type]=e,"number"==typeof e.id&&e.timescale&&(t.map.timescales=t.map.timescales||{},t.map.timescales[e.id]=e.timescale))})),n(null,t))}}({segment:i,finishProcessingFn:g}));m.push(b)}var _=Wo.mergeOptions(n,{uri:i.resolvedUri,responseType:"arraybuffer",headers:Oa(i)});y&&(_.responseType="text",_.beforeSend=function(e){e.overrideMimeType("text/plain; charset=x-user-defined")});var T=t(_,function(e){var t=e.segment,n=e.finishProcessingFn,r=e.responseType;return function(e,i){var o=i.response,a=as(e,i);if(a)return n(a,t);var s="arraybuffer"!==r&&i.responseText?Ga(i.responseText.substring(t.lastReachedChar||0)):i.response;return 0===o.byteLength?n({status:i.status,message:"Empty HLS segment content at URL: "+i.uri,code:ns,xhr:i},t):(t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(i),t.key?t.encryptedBytes=new Uint8Array(s):t.bytes=new Uint8Array(s),n(null,t))}}({segment:i,finishProcessingFn:g,responseType:_.responseType}));T.addEventListener("progress",ls({segment:i,progressFn:a,trackInfoFn:s,timingInfoFn:u,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:l,id3Fn:f,captionsFn:h,dataFn:d,handlePartialData:y})),m.push(T);var w={};return m.forEach((function(e){e.addEventListener("loadend",function(e){var t=e.loadendState,n=e.abortFn;return function(e){e.target.aborted&&n&&!t.calledAbortFn&&(n(),t.calledAbortFn=!0)}}({loadendState:w,abortFn:o}))})),function(){return os(m)}},hs="undefined"!=typeof window?window:{},ds="undefined"==typeof Symbol?"__target":Symbol(),ps=hs.BlobBuilder||hs.WebKitBlobBuilder||hs.MozBlobBuilder||hs.MSBlobBuilder,ys=hs.URL||hs.webkitURL||ys&&ys.msURL,ms=hs.Worker;function gs(e,t){return function(n){var r=this;if(!t)return new ms(e);if(ms&&!n){var i=Ts(t.toString().replace(/^function.+?{/,"").slice(0,-1));return this[ds]=new ms(i),function(e,t){if(!e||!t)return;var n=e.terminate;e.objURL=t,e.terminate=function(){e.objURL&&ys.revokeObjectURL(e.objURL),n.call(e)}}(this[ds],i),this[ds]}var o={postMessage:function(e){r.onmessage&&setTimeout((function(){r.onmessage({data:e,target:o})}))}};t.call(o),this.postMessage=function(e){setTimeout((function(){o.onmessage({data:e,target:r})}))},this.isThisThread=!0}}if(ms){var vs,bs=Ts("self.onmessage = function () {}"),_s=new Uint8Array(1);try{(vs=new ms(bs)).postMessage(_s,[_s.buffer])}catch(e){ms=null}finally{ys.revokeObjectURL(bs),vs&&vs.terminate()}}function Ts(e){try{return ys.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(n){var t=new ps;return t.append(e),ys.createObjectURL(t.getBlob(type))}}var ws=new gs("./transmuxer-worker.worker.js",(function(e,t){var n=this;
93
- /*! @name @videojs/http-streaming @version 2.4.2 @license Apache-2.0 */!function(){var e=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,o;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){e={}}}};e.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},e.prototype.push=function(e){this.trigger("data",e)},e.prototype.flush=function(e){this.trigger("done",e)},e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},e.prototype.reset=function(e){this.trigger("reset",e)};var t,r,i,o,a,s,u,c,l,f,h,d,p,y,m,g,v,b,_,T,w,S,C,k,E,I,O,x,P,A,L,R,j,D,M,N,B,U,F,V,H=e,W=Math.pow(2,32)-1;!function(){var e;if(S={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in S)S.hasOwnProperty(e)&&(S[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);C=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),E=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),I=new Uint8Array([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]),O=new Uint8Array([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]),x={video:I,audio:O},L=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),A=new Uint8Array([0,0,0,0,0,0,0,0]),R=new Uint8Array([0,0,0,0,0,0,0,0]),j=R,D=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=R,P=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),t=function(e){var t,n,r=[],i=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)i+=r[t].byteLength;for(n=new Uint8Array(i+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,i=8;t<r.length;t++)n.set(r[t],i),i+=r[t].byteLength;return n},r=function(){return t(S.dinf,t(S.dref,L))},i=function(e){return t(S.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},m=function(e){return t(S.hdlr,x[e])},y=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(n[12]=e.samplerate>>>24&255,n[13]=e.samplerate>>>16&255,n[14]=e.samplerate>>>8&255,n[15]=255&e.samplerate),t(S.mdhd,n)},p=function(e){return t(S.mdia,y(e),m(e.type),s(e))},a=function(e){return t(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},s=function(e){return t(S.minf,"video"===e.type?t(S.vmhd,P):t(S.smhd,A),r(),v(e))},u=function(e,n){for(var r=[],i=n.length;i--;)r[i]=_(n[i]);return t.apply(null,[S.moof,a(e)].concat(r))},c=function(e){for(var n=e.length,r=[];n--;)r[n]=h(e[n]);return t.apply(null,[S.moov,f(4294967295)].concat(r).concat(l(e)))},l=function(e){for(var n=e.length,r=[];n--;)r[n]=T(e[n]);return t.apply(null,[S.mvex].concat(r))},f=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,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,255,255,255,255]);return t(S.mvhd,n)},g=function(e){var n,r,i=e.samples||[],o=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,o[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t(S.sdtp,o)},v=function(e){return t(S.stbl,b(e),t(S.stts,M),t(S.stsc,j),t(S.stsz,D),t(S.stco,R))},b=function(e){return t(S.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?N(e):B(e))},N=function(e){var n,r,i=e.sps||[],o=e.pps||[],a=[],s=[];for(n=0;n<i.length;n++)a.push((65280&i[n].byteLength)>>>8),a.push(255&i[n].byteLength),a=a.concat(Array.prototype.slice.call(i[n]));for(n=0;n<o.length;n++)s.push((65280&o[n].byteLength)>>>8),s.push(255&o[n].byteLength),s=s.concat(Array.prototype.slice.call(o[n]));if(r=[S.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),t(S.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length],a,[o.length],s))),t(S.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var u=e.sarRatio[0],c=e.sarRatio[1];r.push(t(S.pasp,new Uint8Array([(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return t.apply(null,r)},B=function(e){return t(S.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),i(e))},d=function(e){var n=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,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,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return t(S.tkhd,n)},_=function(e){var n,r,i,o,a,s;return n=t(S.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/(W+1)),s=Math.floor(e.baseMediaDecodeTime%(W+1)),r=t(S.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===e.type?(i=w(e,92),t(S.traf,n,r,i)):(o=g(e),i=w(e,o.length+92),t(S.traf,n,r,i,o))},h=function(e){return e.duration=e.duration||4294967295,t(S.trak,d(e),p(e))},T=function(e){var n=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(n[n.length-1]=0),t(S.trex,n)},V=function(e,t){var n=0,r=0,i=0,o=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(i=4),void 0!==e[0].compositionTimeOffset&&(o=8)),[0,0,n|r|i|o,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,n){var r,i,o,a,s,u;for(n+=20+16*(a=e.samples||[]).length,o=V(a,n),(i=new Uint8Array(o.length+16*a.length)).set(o),r=o.length,u=0;u<a.length;u++)s=a[u],i[r++]=(4278190080&s.duration)>>>24,i[r++]=(16711680&s.duration)>>>16,i[r++]=(65280&s.duration)>>>8,i[r++]=255&s.duration,i[r++]=(4278190080&s.size)>>>24,i[r++]=(16711680&s.size)>>>16,i[r++]=(65280&s.size)>>>8,i[r++]=255&s.size,i[r++]=s.flags.isLeading<<2|s.flags.dependsOn,i[r++]=s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,i[r++]=61440&s.flags.degradationPriority,i[r++]=15&s.flags.degradationPriority,i[r++]=(4278190080&s.compositionTimeOffset)>>>24,i[r++]=(16711680&s.compositionTimeOffset)>>>16,i[r++]=(65280&s.compositionTimeOffset)>>>8,i[r++]=255&s.compositionTimeOffset;return t(S.trun,i)},U=function(e,n){var r,i,o,a,s,u;for(n+=20+8*(a=e.samples||[]).length,o=V(a,n),(r=new Uint8Array(o.length+8*a.length)).set(o),i=o.length,u=0;u<a.length;u++)s=a[u],r[i++]=(4278190080&s.duration)>>>24,r[i++]=(16711680&s.duration)>>>16,r[i++]=(65280&s.duration)>>>8,r[i++]=255&s.duration,r[i++]=(4278190080&s.size)>>>24,r[i++]=(16711680&s.size)>>>16,r[i++]=(65280&s.size)>>>8,r[i++]=255&s.size;return t(S.trun,r)},w=function(e,t){return"audio"===e.type?U(e,t):F(e,t)};o=function(){return t(S.ftyp,C,k,C,E)};var z,q,G,Y,X,K,$,Q,Z=function(e){return t(S.mdat,e)},J=u,ee=function(e){var t,n=o(),r=c(e);return(t=new Uint8Array(n.byteLength+r.byteLength)).set(n),t.set(r,n.byteLength),t},te=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},ne=function(e){var t,n,r=[],i=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,r.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(r.length&&(r.duration=n.dts-r.dts,i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r)),(r=[n]).byteLength=n.data.byteLength,r.pts=n.pts,r.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(r.keyFrame=!0),r.duration=n.dts-r.dts,r.byteLength+=n.data.byteLength,r.push(n));return i.length&&(!r.duration||r.duration<=0)&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r),i},re=function(e){var t,n,r=[],i=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(r.length&&(i.push(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration),(r=[n]).nalCount=n.length,r.byteLength=n.byteLength,r.pts=n.pts,r.dts=n.dts,r.duration=n.duration):(r.duration+=n.duration,r.nalCount+=n.length,r.byteLength+=n.byteLength,r.push(n));return i.length&&r.duration<=0&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration,i.push(r),i},ie=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},oe=function(e,t){var n,r,i,o,a,s=t||0,u=[];for(n=0;n<e.length;n++)for(o=e[n],r=0;r<o.length;r++)a=o[r],s+=(i=te(a,s)).size,u.push(i);return u},ae=function(e){var t,n,r,i,o,a,s=0,u=e.byteLength,c=e.nalCount,l=new Uint8Array(u+4*c),f=new DataView(l.buffer);for(t=0;t<e.length;t++)for(i=e[t],n=0;n<i.length;n++)for(o=i[n],r=0;r<o.length;r++)a=o[r],f.setUint32(s,a.data.byteLength),s+=4,l.set(a.data,s),s+=a.data.byteLength;return l},se=function(e,t){var n,r=[];return n=te(e,t||0),r.push(n),r},ue=function(e){var t,n,r=0,i=e.byteLength,o=e.length,a=new Uint8Array(i+4*o),s=new DataView(a.buffer);for(t=0;t<e.length;t++)n=e[t],s.setUint32(r,n.data.byteLength),r+=4,a.set(n.data,r),r+=n.data.byteLength;return a},ce=[33,16,5,32,164,27],le=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],fe=function(e){for(var t=[];e--;)t.push(0);return t},he=function(){if(!z){var e={96e3:[ce,[227,64],fe(154),[56]],88200:[ce,[231],fe(170),[56]],64e3:[ce,[248,192],fe(240),[56]],48e3:[ce,[255,192],fe(268),[55,148,128],fe(54),[112]],44100:[ce,[255,192],fe(268),[55,163,128],fe(84),[112]],32e3:[ce,[255,192],fe(268),[55,234],fe(226),[112]],24e3:[ce,[255,192],fe(268),[55,255,128],fe(268),[111,112],fe(126),[224]],16e3:[ce,[255,192],fe(268),[55,255,128],fe(268),[111,255],fe(269),[223,108],fe(195),[1,192]],12e3:[le,fe(268),[3,127,248],fe(268),[6,255,240],fe(268),[13,255,224],fe(268),[27,253,128],fe(259),[56]],11025:[le,fe(268),[3,127,248],fe(268),[6,255,240],fe(268),[13,255,224],fe(268),[27,255,192],fe(268),[55,175,128],fe(108),[112]],8e3:[le,fe(268),[3,121,16],fe(47),[7]]};t=e,z=Object.keys(t).reduce((function(e,n){return e[n]=new Uint8Array(t[n].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return z};K=function(e,t){return q(X(e,t))},$=function(e,t){return G(Y(e),t)},Q=function(e,t,n){return Y(n?e:e-t)};var de=9e4,pe=q=function(e){return 9e4*e},ye=(G=function(e,t){return e*t},Y=function(e){return e/9e4}),me=(X=function(e,t){return e/t},K),ge=$,ve=Q,be=function(e,t,n,r){var i,o,a,s,u,c=0,l=0,f=0;if(t.length&&(i=me(e.baseMediaDecodeTime,e.samplerate),o=Math.ceil(de/(e.samplerate/1024)),n&&r&&(c=i-Math.max(n,r),f=(l=Math.floor(c/o))*o),!(l<1||f>de/2))){for((a=he()[e.samplerate])||(a=t[0].data),s=0;s<l;s++)u=t[0],t.splice(0,0,{data:a,dts:u.dts-o,pts:u.pts-o});return e.baseMediaDecodeTime-=Math.floor(ge(f,e.samplerate)),f}},_e=function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},Te=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],r.push({size:n.data.byteLength,duration:1024});return r},we=function(e){var t,n,r=0,i=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],i.set(n.data,r),r+=n.data.byteLength;return i},Se=de,Ce=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},ke=function(e,t){var n,r=e.minSegmentDts;return t||(r-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=r,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/Se,n=Math.floor(n)),n},Ee=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},Ie=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},r=0,i=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)i+=255,t++;if(i+=e[t++],!n.payload&&4===r){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){n.payloadType=r,n.payloadSize=i,n.payload=e.subarray(t,t+i);break}n.payload=void 0}t+=i,r=0,i=0}return n},Oe=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},xe=function(e,t){var n,r,i,o,a=[];if(!(64&t[0]))return a;for(r=31&t[0],n=0;n<r;n++)o={type:3&t[(i=3*n)+2],pts:e},4&t[i+2]&&(o.ccData=t[i+3]<<8|t[i+4],a.push(o));return a},Pe=function(e){for(var t,n,r=e.byteLength,i=[],o=1;o<r-2;)0===e[o]&&0===e[o+1]&&3===e[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var a=0;for(o=0;o<t;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=e[a];return n},Ae=4,Le=function e(){e.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new He(0,0),new He(0,1),new He(1,0),new He(1,1)],this.cc708Stream_=new Ne,this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done"))};(Le.prototype=new H).push=function(e){var t,n,r;if("sei_rbsp"===e.nalUnitType&&(t=Ie(e.escapedRBSP)).payload&&t.payloadType===Ae&&(n=Oe(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=xe(e.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Le.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},Le.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},Le.prototype.flush=function(){return this.flushStream("flush")},Le.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Le.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},Le.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},Le.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},Le.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},Le.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},Le.prototype.dispatchCea708Packet=function(e){this.cc708Stream_.push(e)};var Re={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},je=function(e){return 32<=e&&e<=127||160<=e&&e<=255},De=function(e){this.windowNum=e,this.reset()};De.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},De.prototype.getText=function(){return this.rows.join("\n")},De.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},De.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},De.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},De.prototype.addText=function(e){this.rows[this.rowIdx]+=e},De.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Me=function(e){this.serviceNum=e,this.text="",this.currentWindow=new De(-1),this.windows=[]};Me.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new De(n),"function"==typeof t&&(this.windows[n].beforeRowOverflow=t)},Me.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]};var Ne=function e(){e.prototype.init.call(this);var t=this;this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(t.new708Packet(),t.add708Bytes(e)):(null===t.current708Packet&&t.new708Packet(),t.add708Bytes(e))}};Ne.prototype=new H,Ne.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Ne.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,r=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(r)},Ne.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,r=null,i=0,o=t[i++];for(e.seq=o>>6,e.sizeCode=63&o;i<t.length;i++)r=31&(o=t[i++]),7===(n=o>>5)&&r>0&&(n=o=t[i++]),this.pushServiceBlock(n,i,r),r>0&&(i+=r-1)},Ne.prototype.pushServiceBlock=function(e,t,n){var r,i=t,o=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,i));i<t+n&&i<o.length;i++)r=o[i],je(r)?i=this.handleText(i,a):16===r?i=this.extendedCommands(i,a):128<=r&&r<=135?i=this.setCurrentWindow(i,a):152<=r&&r<=159?i=this.defineWindow(i,a):136===r?i=this.clearWindows(i,a):140===r?i=this.deleteWindows(i,a):137===r?i=this.displayWindows(i,a):138===r?i=this.hideWindows(i,a):139===r?i=this.toggleWindows(i,a):151===r?i=this.setWindowAttributes(i,a):144===r?i=this.setPenAttributes(i,a):145===r?i=this.setPenColor(i,a):146===r?i=this.setPenLocation(i,a):143===r?a=this.reset(i,a):8===r?a.currentWindow.backspace():12===r?a.currentWindow.clearText():13===r?a.currentWindow.pendingNewLine=!0:14===r?a.currentWindow.clearText():141===r&&i++},Ne.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return je(n)&&(e=this.handleText(e,t,!0)),e},Ne.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Ne.prototype.initService=function(e,t){var n=this;return this.services[e]=new Me(e),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Ne.prototype.handleText=function(e,t,n){var r,i,o=this.current708Packet.data[e],a=(i=Re[r=(n?4096:0)|o]||r,4096&r&&r===i?"":String.fromCharCode(i)),s=t.currentWindow;return s.pendingNewLine&&!s.isEmpty()&&s.newLine(this.getPts(e)),s.pendingNewLine=!1,s.addText(a),e},Ne.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},Ne.prototype.defineWindow=function(e,t){var n=this.current708Packet.data,r=n[e],i=7&r;t.setCurrentWindow(i);var o=t.currentWindow;return r=n[++e],o.visible=(32&r)>>5,o.rowLock=(16&r)>>4,o.columnLock=(8&r)>>3,o.priority=7&r,r=n[++e],o.relativePositioning=(128&r)>>7,o.anchorVertical=127&r,r=n[++e],o.anchorHorizontal=r,r=n[++e],o.anchorPoint=(240&r)>>4,o.rowCount=15&r,r=n[++e],o.columnCount=63&r,r=n[++e],o.windowStyle=(56&r)>>3,o.penStyle=7&r,o.virtualRowCount=o.rowCount+1,e},Ne.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.winAttr;return r=n[++e],i.fillOpacity=(192&r)>>6,i.fillRed=(48&r)>>4,i.fillGreen=(12&r)>>2,i.fillBlue=3&r,r=n[++e],i.borderType=(192&r)>>6,i.borderRed=(48&r)>>4,i.borderGreen=(12&r)>>2,i.borderBlue=3&r,r=n[++e],i.borderType+=(128&r)>>5,i.wordWrap=(64&r)>>6,i.printDirection=(48&r)>>4,i.scrollDirection=(12&r)>>2,i.justify=3&r,r=n[++e],i.effectSpeed=(240&r)>>4,i.effectDirection=(12&r)>>2,i.displayEffect=3&r,e},Ne.prototype.flushDisplayed=function(e,t){for(var n=[],r=0;r<8;r++)t.windows[r].visible&&!t.windows[r].isEmpty()&&n.push(t.windows[r].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},Ne.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Ne.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=1);return e},Ne.prototype.hideWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=0);return e},Ne.prototype.toggleWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible^=1);return e},Ne.prototype.clearWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].clearText();return e},Ne.prototype.deleteWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].reset();return e},Ne.prototype.setPenAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penAttr;return r=n[++e],i.textTag=(240&r)>>4,i.offset=(12&r)>>2,i.penSize=3&r,r=n[++e],i.italics=(128&r)>>7,i.underline=(64&r)>>6,i.edgeType=(56&r)>>3,i.fontStyle=7&r,e},Ne.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penColor;return r=n[++e],i.fgOpacity=(192&r)>>6,i.fgRed=(48&r)>>4,i.fgGreen=(12&r)>>2,i.fgBlue=3&r,r=n[++e],i.bgOpacity=(192&r)>>6,i.bgRed=(48&r)>>4,i.bgGreen=(12&r)>>2,i.bgBlue=3&r,r=n[++e],i.edgeRed=(48&r)>>4,i.edgeGreen=(12&r)>>2,i.edgeBlue=3&r,e},Ne.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,r=n[++e],i.row=15&r,r=n[++e],i.column=63&r,e},Ne.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var Be={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Ue=function(e){return null===e?"":(e=Be[e]||e,String.fromCharCode(e))},Fe=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ve=function(){for(var e=[],t=15;t--;)e.push("");return e},He=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,r,i,o;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Ve();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ve();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Ve()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,i))o=Ue((r=(3&r)<<8)|i),this[this.mode_](e.pts,o),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),o=Ue((r=(3&r)<<8)|i),this[this.mode_](e.pts,o),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var a=Fe.indexOf(7968&t);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),o=Ue(r),o+=Ue(i),this[this.mode_](e.pts,o),this.column_+=o.length)}else this.lastControlCode_=null}};He.prototype=new H,He.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e){try{return e.trim()}catch(e){return console.error("Skipping malformed caption."),""}})).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},He.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ve(),this.nonDisplayed_=Ve(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},He.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},He.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},He.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},He.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},He.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},He.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},He.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},He.prototype.isNormalChar=function(e){return e>=32&&e<=127},He.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Ve(),this.displayed_=Ve()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},He.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,n)},He.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},He.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},He.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},He.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},He.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var We={CaptionStream:Le,Cea608Stream:He,Cea708Stream:Ne},ze={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},qe=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Ge=function e(t){var n,r;e.prototype.init.call(this),this.type_=t||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===r&&(r=e.dts),e.dts=qe(e.dts,r),e.pts=qe(e.pts,r),n=e.dts,this.trigger("data",e))},this.flush=function(){r=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){r=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ge.prototype=new H;var Ye,Xe=Ge,Ke=function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i},$e=function(e,t,n){return decodeURIComponent(Ke(e,t,n))},Qe=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Ze={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=$e(e.data,1,t),e.value=$e(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=$e(e.data,1,t),e.url=$e(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,n;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(n=e.data,unescape(Ke(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(Ye=function(e){var t,n={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},r=0,i=[],o=0;if(Ye.prototype.init.call(this),this.dispatchType=ze.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,a,s,u,c;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(o=0,i.length=0),0===i.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))n.debug&&console.log("Skipping unrecognized metadata packet");else if(i.push(e),o+=e.data.byteLength,1===i.length&&(r=Qe(e.data.subarray(6,10)),r+=10),!(o<r)){for(t={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},c=0;c<r;)t.data.set(i[0].data.subarray(0,r-c),c),c+=i[0].data.byteLength,o-=i[0].data.byteLength,i.shift();a=10,64&t.data[5]&&(a+=4,a+=Qe(t.data.subarray(10,14)),r-=Qe(t.data.subarray(16,20)));do{if((s=Qe(t.data.subarray(a+4,a+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((u={id:String.fromCharCode(t.data[a],t.data[a+1],t.data[a+2],t.data[a+3]),data:t.data.subarray(a+10,a+s+10)}).key=u.id,Ze[u.id]&&(Ze[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){var l=u.data,f=(1&l[3])<<30|l[4]<<22|l[5]<<14|l[6]<<6|l[7]>>>2;f*=4,f+=3&l[7],u.timeStamp=f,void 0===t.pts&&void 0===t.dts&&(t.pts=u.timeStamp,t.dts=u.timeStamp),this.trigger("timestamp",u)}t.frames.push(u),a+=10,a+=s}while(a<r);this.trigger("data",t)}}}).prototype=new H;var Je,et,tt,nt=Ye,rt=Xe;(Je=function(){var e=new Uint8Array(188),t=0;Je.prototype.init.call(this),this.push=function(n){var r,i=0,o=188;for(t?((r=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),r.set(n,t),t=0):r=n;o<r.byteLength;)71!==r[i]||71!==r[o]?(i++,o++):(this.trigger("data",r.subarray(i,o)),i+=188,o+=188);i<r.byteLength&&(e.set(r.subarray(i),0),t=r.byteLength-i)},this.flush=function(){188===t&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new H,(et=function(){var e,t,n,r;et.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var i=0;r.payloadUnitStartIndicator&&(i+=e[i]+1),"pat"===r.type?t(e.subarray(i),r):n(e.subarray(i),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},n=function(e,t){var n,i;if(1&e[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,i=12+((15&e[10])<<8|e[11]);i<n;){var o=e[i],a=(31&e[i+1])<<8|e[i+2];o===ze.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=a:o===ze.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=a:o===ze.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][a]=o),i+=5+((15&e[i+3])<<8|e[i+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===n.pid)n.type="pat",e(t.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,n]):this.processPes_(t,r,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=ze.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=ze.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}}).prototype=new H,et.STREAM_TYPES={h264:27,adts:15},(tt=function(){var e,t=this,n={data:[],size:0},r={data:[],size:0},i={data:[],size:0},o=function(e,n,r){var i,o,a=new Uint8Array(e.size),s={type:n},u=0,c=0;if(e.data.length&&!(e.size<9)){for(s.trackId=e.data[0].pid,u=0;u<e.data.length;u++)o=e.data[u],a.set(o.data,c),c+=o.data.byteLength;var l,f,h;l=a,(f=s).packetLength=6+(l[4]<<8|l[5]),f.dataAlignmentIndicator=0!=(4&l[6]),192&(h=l[7])&&(f.pts=(14&l[9])<<27|(255&l[10])<<20|(254&l[11])<<12|(255&l[12])<<5|(254&l[13])>>>3,f.pts*=4,f.pts+=(6&l[13])>>>1,f.dts=f.pts,64&h&&(f.dts=(14&l[14])<<27|(255&l[15])<<20|(254&l[16])<<12|(255&l[17])<<5|(254&l[18])>>>3,f.dts*=4,f.dts+=(6&l[18])>>>1)),f.data=l.subarray(9+l[8]),i="video"===n||s.packetLength<=e.size,(r||i)&&(e.size=0,e.data.length=0),i&&t.trigger("data",s)}};tt.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var e,t;switch(a.streamType){case ze.H264_STREAM_TYPE:e=n,t="video";break;case ze.ADTS_STREAM_TYPE:e=r,t="audio";break;case ze.METADATA_STREAM_TYPE:e=i,t="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&o(e,t,!0),e.data.push(a),e.size+=a.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(e=a.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",n)}})[a.type]()},this.reset=function(){n.size=0,n.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){o(n,"video"),o(r,"audio"),o(i,"timed-metadata")},this.flush=function(){this.flushStreams_(),this.trigger("done")}}).prototype=new H;var it={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Je,TransportParseStream:et,ElementaryStream:tt,TimestampRolloverStream:rt,CaptionStream:We.CaptionStream,Cea608Stream:We.Cea608Stream,Cea708Stream:We.Cea708Stream,MetadataStream:nt};for(var ot in ze)ze.hasOwnProperty(ot)&&(it[ot]=ze[ot]);var at,st=it,ut=de,ct=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(at=function(e){var t,n=0;at.prototype.init.call(this),this.push=function(r){var i,o,a,s,u,c,l=0;if(e||(n=0),"audio"===r.type)for(t?(s=t,(t=new Uint8Array(s.byteLength+r.data.byteLength)).set(s),t.set(r.data,s.byteLength)):t=r.data;l+5<t.length;)if(255===t[l]&&240==(246&t[l+1])){if(o=2*(1&~t[l+1]),i=(3&t[l+3])<<11|t[l+4]<<3|(224&t[l+5])>>5,c=(u=1024*(1+(3&t[l+6])))*ut/ct[(60&t[l+2])>>>2],a=l+i,t.byteLength<a)return;if(this.trigger("data",{pts:r.pts+n*c,dts:r.dts+n*c,sampleCount:u,audioobjecttype:1+(t[l+2]>>>6&3),channelcount:(1&t[l+2])<<2|(192&t[l+3])>>>6,samplerate:ct[(60&t[l+2])>>>2],samplingfrequencyindex:(60&t[l+2])>>>2,samplesize:16,data:t.subarray(l+7+o,a)}),n++,t.byteLength===a)return void(t=void 0);t=t.subarray(a)}else l++},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}}).prototype=new H;var lt,ft,ht,dt=at,pt=function(e){var t=e.byteLength,n=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var i=e.byteLength-t,o=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");o.set(e.subarray(i,i+a)),n=new DataView(o.buffer).getUint32(0),r=8*a,t-=a},this.skipBits=function(e){var i;r>e?(n<<=e,r-=e):(e-=r,e-=8*(i=Math.floor(e/8)),t-=i,this.loadWord(),n<<=e,r-=e)},this.readBits=function(e){var i=Math.min(r,e),o=n>>>32-i;return(r-=i)>0?n<<=i:t>0&&this.loadWord(),(i=e-i)>0?o<<i|this.readBits(i):o},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(0!=(n&2147483648>>>e))return n<<=e,r-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(ft=function(){var e,t,n=0;ft.prototype.init.call(this),this.push=function(r){var i;t?((i=new Uint8Array(t.byteLength+r.data.byteLength)).set(t),i.set(r.data,t.byteLength),t=i):t=r.data;for(var o=t.byteLength;n<o-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<o;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<o);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.reset=function(){t=null,n=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new H,ht={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(lt=function(){var e,t,n,r,i,o,a,s=new ft;lt.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,r=e.dts,s.push(e))},s.on("data",(function(a){var s={trackId:t,pts:n,dts:r,data:a};switch(31&a[0]){case 5:s.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:s.nalUnitType="sei_rbsp",s.escapedRBSP=i(a.subarray(1));break;case 7:s.nalUnitType="seq_parameter_set_rbsp",s.escapedRBSP=i(a.subarray(1)),s.config=o(s.escapedRBSP);break;case 8:s.nalUnitType="pic_parameter_set_rbsp";break;case 9:s.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",s)})),s.on("done",(function(){e.trigger("done")})),s.on("partialdone",(function(){e.trigger("partialdone")})),s.on("reset",(function(){e.trigger("reset")})),s.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){s.flush()},this.partialFlush=function(){s.partialFlush()},this.reset=function(){s.reset()},this.endTimeline=function(){s.endTimeline()},a=function(e,t){var n,r=8,i=8;for(n=0;n<e;n++)0!==i&&(i=(r+t.readExpGolomb()+256)%256),r=0===i?r:i},i=function(e){for(var t,n,r=e.byteLength,i=[],o=1;o<r-2;)0===e[o]&&0===e[o+1]&&3===e[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var a=0;for(o=0;o<t;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=e[a];return n},o=function(e){var t,n,r,i,o,s,u,c,l,f,h,d,p,y=0,m=0,g=0,v=0,b=1;if(n=(t=new pt(e)).readUnsignedByte(),i=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ht[n]&&(3===(o=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==o?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(s=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===s)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),p=0;p<u;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),c=t.readUnsignedExpGolomb(),l=t.readUnsignedExpGolomb(),0===(f=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(y=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:d=[1,1];break;case 2:d=[12,11];break;case 3:d=[10,11];break;case 4:d=[16,11];break;case 5:d=[40,33];break;case 6:d=[24,11];break;case 7:d=[20,11];break;case 8:d=[32,11];break;case 9:d=[80,33];break;case 10:d=[18,11];break;case 11:d=[15,11];break;case 12:d=[64,33];break;case 13:d=[160,99];break;case 14:d=[4,3];break;case 15:d=[3,2];break;case 16:d=[2,1];break;case 255:d=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}d&&(b=d[0]/d[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:Math.ceil((16*(c+1)-2*y-2*m)*b),height:(2-f)*(l+1)*16-2*g-2*v,sarRatio:d}}}).prototype=new H;var yt,mt={H264Stream:lt,NalByteStream:ft},gt=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},vt=function(e){var t=function e(t,n){return t.length-n<10||t[n]!=="I".charCodeAt(0)||t[n+1]!=="D".charCodeAt(0)||t[n+2]!=="3".charCodeAt(0)?n:e(t,n+=gt(t,n))}(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},bt=gt,_t=function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n};(yt=function(){var e=new Uint8Array,t=0;yt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var r,i,o,a,s=0,u=0;for(e.length?(a=e.length,(e=new Uint8Array(n.byteLength+a)).set(e.subarray(0,a)),e.set(n,a)):e=n;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(255!=(255&e[u])||240!=(240&e[u+1]))u++;else{if(e.length-u<7)break;if(u+(s=_t(e,u))>e.length)break;o={type:"audio",data:e.subarray(u,u+s),pts:t,dts:t},this.trigger("data",o),u+=s}else{if(e.length-u<10)break;if(u+(s=bt(e,u))>e.length)break;i={type:"timed-metadata",data:e.subarray(u,u+s)},this.trigger("data",i),u+=s}r=e.length-u,e=r>0?e.subarray(u):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new H;var Tt,wt,St,Ct,kt=yt,Et=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],It=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Ot=mt.H264Stream,xt=vt,Pt=de,At=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},Lt=function(e,t,n,r,i,o){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(r-t),pts:e+(i-n)},prependedContentDuration:o,baseMediaDecodeTime:e}};(wt=function(e,t){var n=[],r=0,i=0,o=0,a=1/0;t=t||{},wt.prototype.init.call(this),this.push=function(t){Ee(e,t),e&&Et.forEach((function(n){e[n]=t[n]})),n.push(t)},this.setEarliestDts=function(e){i=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){o=e},this.flush=function(){var s,u,c,l,f,h,d;0!==n.length?(s=_e(n,e,i),e.baseMediaDecodeTime=ke(e,t.keepOriginalTimestamps),d=be(e,s,o,a),e.samples=Te(s),c=Z(we(s)),n=[],u=J(r,[e]),l=new Uint8Array(u.byteLength+c.byteLength),r++,l.set(u),l.set(c,u.byteLength),Ce(e),f=Math.ceil(1024*Pt/e.samplerate),s.length&&(h=s.length*f,this.trigger("segmentTimingInfo",Lt(me(e.baseMediaDecodeTime,e.samplerate),s[0].dts,s[0].pts,s[0].dts+h,s[0].pts+h,d||0)),this.trigger("timingInfo",{start:s[0].pts,end:s[0].pts+h})),this.trigger("data",{track:e,boxes:l}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){Ce(e),n=[],this.trigger("reset")}}).prototype=new H,(Tt=function(e,t){var n,r,i=0,o=[],a=[];t=t||{},Tt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Ee(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],It.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),o.push(t)},this.flush=function(){for(var n,r,s,u,c,l,f,h,d=0;o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift();if(0===o.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=ne(o),(s=re(n))[0][0].keyFrame||((r=this.getGopForFusion_(o[0],e))?(d=r.duration,s.unshift(r),s.byteLength+=r.byteLength,s.nalCount+=r.nalCount,s.pts=r.pts,s.dts=r.dts,s.duration+=r.duration):s=ie(s)),a.length){var p;if(!(p=t.alignGopsAtEnd?this.alignGopsAtEnd_(s):this.alignGopsAtStart_(s)))return this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Ce(e),s=p}Ee(e,s),e.samples=oe(s),c=Z(ae(s)),e.baseMediaDecodeTime=ke(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",s.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),f=s[0],h=s[s.length-1],this.trigger("segmentTimingInfo",Lt(e.baseMediaDecodeTime,f.dts,f.pts,h.dts+h.duration,h.pts+h.duration,d)),this.trigger("timingInfo",{start:s[0].pts,end:s[s.length-1].pts+s[s.length-1].duration}),this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=J(i,[e]),l=new Uint8Array(u.byteLength+c.byteLength),i++,l.set(u),l.set(c,u.byteLength),this.trigger("data",{track:e,boxes:l}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),o=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){Ce(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var n,r,i,o,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)i=(o=this.gopCache_[a]).gop,e.pps&&At(e.pps[0],o.pps[0])&&e.sps&&At(e.sps[0],o.sps[0])&&(i.dts<e.timelineStartInfo.dts||(n=t.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||s>n)&&(r=o,s=n));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,n,r,i,o,s,u,c;for(o=e.byteLength,s=e.nalCount,u=e.duration,t=n=0;t<a.length&&n<e.length&&(r=a[t],i=e[n],r.pts!==i.pts);)i.pts>r.pts?t++:(n++,o-=i.byteLength,s-=i.nalCount,u-=i.duration);return 0===n?e:n===e.length?null:((c=e.slice(n)).byteLength=o,c.duration=u,c.nalCount=s,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(e){var t,n,r,i,o,s,u;for(t=a.length-1,n=e.length-1,o=null,s=!1;t>=0&&n>=0;){if(r=a[t],i=e[n],r.pts===i.pts){s=!0;break}r.pts>i.pts?t--:(t===a.length-1&&(o=n),n--)}if(!s&&null===o)return null;if(0===(u=s?n:o))return e;var c=e.slice(u),l=c.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=l.byteLength,c.duration=l.duration,c.nalCount=l.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(e){a=e}}).prototype=new H,(Ct=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Ct.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}}).prototype=new H,Ct.prototype.flush=function(e){var t,n,r,i,o=0,a={captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,It.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,Et.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,r=ee(this.pendingTracks),a.initSegment=new Uint8Array(r.byteLength),a.initSegment.set(r),a.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)a.data.set(this.pendingBoxes[i],o),o+=this.pendingBoxes[i].byteLength;for(i=0;i<this.pendingCaptions.length;i++)(t=this.pendingCaptions[i]).startTime=ve(t.startPts,s,this.keepOriginalTimestamps),t.endTime=ve(t.endPts,s,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(i=0;i<this.pendingMetadata.length;i++)(n=this.pendingMetadata[i]).cueTime=ve(n.pts,s,this.keepOriginalTimestamps),a.metadata.push(n);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),i=0;i<a.captions.length;i++)t=a.captions[i],this.trigger("caption",t);for(i=0;i<a.metadata.length;i++)n=a.metadata[i],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Ct.prototype.setRemux=function(e){this.remuxTracks=e},(St=function(e){var t,n,r=this,i=!0;St.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="aac",i.metadataStream=new st.MetadataStream,i.aacStream=new kt,i.audioTimestampRolloverStream=new st.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new st.TimestampRolloverStream("timed-metadata"),i.adtsStream=new dt,i.coalesceStream=new Ct(e,i.metadataStream),i.headOfPipeline=i.aacStream,i.aacStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.aacStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.metadataStream.on("timestamp",(function(e){i.aacStream.setTimestamp(e.timeStamp)})),i.aacStream.on("data",(function(o){"timed-metadata"!==o.type&&"audio"!==o.type||i.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new wt(n,e),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new st.MetadataStream,i.packetStream=new st.TransportPacketStream,i.parseStream=new st.TransportParseStream,i.elementaryStream=new st.ElementaryStream,i.timestampRolloverStream=new st.TimestampRolloverStream,i.adtsStream=new dt,i.h264Stream=new Ot,i.captionStream=new st.CaptionStream,i.coalesceStream=new Ct(e,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",(function(o){var a;if("metadata"===o.type){for(a=o.tracks.length;a--;)t||"video"!==o.tracks[a].type?n||"audio"!==o.tracks[a].type||((n=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new Tt(t,e),i.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts-r.baseMediaDecodeTime))})),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),i.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new wt(n,e),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",(function(e){e.dispatchType=i.metadataStream.dispatchType,r.trigger("id3Frame",e)})),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(r){var i=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,Ce(n),i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity()),t&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Ce(t),i.captionStream.reset()),i.timestampRolloverStream&&i.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(i){var t=xt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new H;var Rt={Transmuxer:St,VideoSegmentStream:Tt,AudioSegmentStream:wt,AUDIO_PROPERTIES:Et,VIDEO_PROPERTIES:It,generateSegmentTimingInfo:Lt},jt={Adts:dt,h264:mt},Dt=de,Mt=function e(t,n){var r=[],i=0,o=0,a=0,s=1/0,u=null,c=null;n=n||{},e.prototype.init.call(this),this.push=function(e){Ee(t,e),t&&Et.forEach((function(n){t[n]=e[n]})),r.push(e)},this.setEarliestDts=function(e){o=e},this.setVideoBaseMediaDecodeTime=function(e){s=e},this.setAudioAppendStart=function(e){a=e},this.processFrames_=function(){var e,l,f,h,d;0!==r.length&&0!==(e=_e(r,t,o)).length&&(t.baseMediaDecodeTime=ke(t,n.keepOriginalTimestamps),be(t,e,a,s),t.samples=Te(e),f=Z(we(e)),r=[],l=J(i,[t]),i++,t.initSegment=ee([t]),(h=new Uint8Array(l.byteLength+f.byteLength)).set(l),h.set(f,l.byteLength),Ce(t),null===u&&(c=u=e[0].pts),c+=e.length*(1024*Dt/t.samplerate),d={start:u},this.trigger("timingInfo",d),this.trigger("data",{track:t,boxes:h}))},this.flush=function(){this.processFrames_(),this.trigger("timingInfo",{start:u,end:c}),this.resetTiming_(),this.trigger("done","AudioSegmentStream")},this.partialFlush=function(){this.processFrames_(),this.trigger("partialdone","AudioSegmentStream")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline","AudioSegmentStream")},this.resetTiming_=function(){Ce(t),u=null,c=null},this.reset=function(){this.resetTiming_(),r=[],this.trigger("reset")}};Mt.prototype=new H;var Nt=Mt,Bt=function e(t,n){var r,i,o,a=0,s=[],u=[],c=null,l=null,f=!0;n=n||{},e.prototype.init.call(this),this.push=function(e){Ee(t,e),void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),"seq_parameter_set_rbsp"!==e.nalUnitType||r||(r=e.config,t.sps=[e.data],It.forEach((function(e){t[e]=r[e]}),this)),"pic_parameter_set_rbsp"!==e.nalUnitType||i||(i=e.data,t.pps=[e.data]),s.push(e)},this.processNals_=function(e){var r;for(s=u.concat(s);s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();if(0!==s.length){var i=ne(s);if(i.length)if(u=i[i.length-1],e&&(i.pop(),i.duration-=u.duration,i.nalCount-=u.length,i.byteLength-=u.byteLength),i.length){if(this.trigger("timelineStartInfo",t.timelineStartInfo),f){if(!(o=re(i))[0][0].keyFrame){if(!(o=ie(o))[0][0].keyFrame)return s=[].concat.apply([],i).concat(u),void(u=[]);(i=[].concat.apply([],o)).duration=o.duration}f=!1}for(null===c&&(c=i[0].pts,l=c),l+=i.duration,this.trigger("timingInfo",{start:c,end:l}),r=0;r<i.length;r++){var h=i[r];t.samples=se(h);var d=Z(ue(h));Ce(t),Ee(t,h),t.baseMediaDecodeTime=ke(t,n.keepOriginalTimestamps);var p=J(a,[t]);a++,t.initSegment=ee([t]);var y=new Uint8Array(p.byteLength+d.byteLength);y.set(p),y.set(d,p.byteLength),this.trigger("data",{track:t,boxes:y,sequence:a,videoFrameDts:h.dts,videoFramePts:h.pts})}s=[]}else s=[]}},this.resetTimingAndConfig_=function(){r=void 0,i=void 0,c=null,l=null},this.partialFlush=function(){this.processNals_(!0),this.trigger("partialdone","VideoSegmentStream")},this.flush=function(){this.processNals_(!1),this.resetTimingAndConfig_(),this.trigger("done","VideoSegmentStream")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline","VideoSegmentStream")},this.reset=function(){this.resetTimingAndConfig_(),u=[],s=[],f=!0,this.trigger("reset")}};Bt.prototype=new H;var Ut=Bt,Ft=vt,Vt=function(e){return e.prototype=new H,e.prototype.init.call(e),e},Ht=function(e,t){e.on("data",t.trigger.bind(t,"data")),e.on("done",t.trigger.bind(t,"done")),e.on("partialdone",t.trigger.bind(t,"partialdone")),e.on("endedtimeline",t.trigger.bind(t,"endedtimeline")),e.on("audioTimingInfo",t.trigger.bind(t,"audioTimingInfo")),e.on("videoTimingInfo",t.trigger.bind(t,"videoTimingInfo")),e.on("trackinfo",t.trigger.bind(t,"trackinfo")),e.on("id3Frame",(function(n){n.dispatchType=e.metadataStream.dispatchType,n.cueTime=ye(n.pts),t.trigger("id3Frame",n)})),e.on("caption",(function(e){t.trigger("caption",e)}))},Wt=function e(t){var n=null,r=!0;t=t||{},e.prototype.init.call(this),t.baseMediaDecodeTime=t.baseMediaDecodeTime||0,this.push=function(e){if(r){var i=Ft(e);!i||n&&"aac"===n.type?i||n&&"ts"===n.type||(n=function(e){var t={type:"ts",tracks:{audio:null,video:null},packet:new st.TransportPacketStream,parse:new st.TransportParseStream,elementary:new st.ElementaryStream,timestampRollover:new st.TimestampRolloverStream,adts:new jt.Adts,h264:new jt.h264.H264Stream,captionStream:new st.CaptionStream,metadataStream:new st.MetadataStream};return t.headOfPipeline=t.packet,t.packet.pipe(t.parse).pipe(t.elementary).pipe(t.timestampRollover),t.timestampRollover.pipe(t.h264),t.h264.pipe(t.captionStream),t.timestampRollover.pipe(t.metadataStream),t.timestampRollover.pipe(t.adts),t.elementary.on("data",(function(n){if("metadata"===n.type){for(var r=0;r<n.tracks.length;r++)t.tracks[n.tracks[r].type]||(t.tracks[n.tracks[r].type]=n.tracks[r],t.tracks[n.tracks[r].type].timelineStartInfo.baseMediaDecodeTime=e.baseMediaDecodeTime);t.tracks.video&&!t.videoSegmentStream&&(t.videoSegmentStream=new Ut(t.tracks.video,e),t.videoSegmentStream.on("timelineStartInfo",(function(n){t.tracks.audio&&!e.keepOriginalTimestamps&&t.audioSegmentStream.setEarliestDts(n.dts-e.baseMediaDecodeTime)})),t.videoSegmentStream.on("timingInfo",t.trigger.bind(t,"videoTimingInfo")),t.videoSegmentStream.on("data",(function(e){t.trigger("data",{type:"video",data:e})})),t.videoSegmentStream.on("done",t.trigger.bind(t,"done")),t.videoSegmentStream.on("partialdone",t.trigger.bind(t,"partialdone")),t.videoSegmentStream.on("endedtimeline",t.trigger.bind(t,"endedtimeline")),t.h264.pipe(t.videoSegmentStream)),t.tracks.audio&&!t.audioSegmentStream&&(t.audioSegmentStream=new Nt(t.tracks.audio,e),t.audioSegmentStream.on("data",(function(e){t.trigger("data",{type:"audio",data:e})})),t.audioSegmentStream.on("done",t.trigger.bind(t,"done")),t.audioSegmentStream.on("partialdone",t.trigger.bind(t,"partialdone")),t.audioSegmentStream.on("endedtimeline",t.trigger.bind(t,"endedtimeline")),t.audioSegmentStream.on("timingInfo",t.trigger.bind(t,"audioTimingInfo")),t.adts.pipe(t.audioSegmentStream)),t.trigger("trackinfo",{hasAudio:!!t.tracks.audio,hasVideo:!!t.tracks.video})}})),t.captionStream.on("data",(function(n){var r;r=t.tracks.video&&t.tracks.video.timelineStartInfo.pts||0,n.startTime=ve(n.startPts,r,e.keepOriginalTimestamps),n.endTime=ve(n.endPts,r,e.keepOriginalTimestamps),t.trigger("caption",n)})),(t=Vt(t)).metadataStream.on("data",t.trigger.bind(t,"id3Frame")),t}(t),Ht(n,this)):(n=function(e){var t={type:"aac",tracks:{audio:null},metadataStream:new st.MetadataStream,aacStream:new kt,audioRollover:new st.TimestampRolloverStream("audio"),timedMetadataRollover:new st.TimestampRolloverStream("timed-metadata"),adtsStream:new dt(!0)};return t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioRollover).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataRollover).pipe(t.metadataStream),t.metadataStream.on("timestamp",(function(e){t.aacStream.setTimestamp(e.timeStamp)})),t.aacStream.on("data",(function(n){"timed-metadata"!==n.type&&"audio"!==n.type||t.audioSegmentStream||(t.tracks.audio=t.tracks.audio||{timelineStartInfo:{baseMediaDecodeTime:e.baseMediaDecodeTime},codec:"adts",type:"audio"},t.audioSegmentStream=new Nt(t.tracks.audio,e),t.audioSegmentStream.on("data",(function(e){t.trigger("data",{type:"audio",data:e})})),t.audioSegmentStream.on("partialdone",t.trigger.bind(t,"partialdone")),t.audioSegmentStream.on("done",t.trigger.bind(t,"done")),t.audioSegmentStream.on("endedtimeline",t.trigger.bind(t,"endedtimeline")),t.audioSegmentStream.on("timingInfo",t.trigger.bind(t,"audioTimingInfo")),t.adtsStream.pipe(t.audioSegmentStream),t.trigger("trackinfo",{hasAudio:!!t.tracks.audio,hasVideo:!!t.tracks.video}))})),(t=Vt(t)).metadataStream.on("data",t.trigger.bind(t,"id3Frame")),t}(t),Ht(n,this)),r=!1}n.headOfPipeline.push(e)},this.flush=function(){n&&(r=!0,n.headOfPipeline.flush())},this.partialFlush=function(){n&&n.headOfPipeline.partialFlush()},this.endTimeline=function(){n&&n.headOfPipeline.endTimeline()},this.reset=function(){n&&n.headOfPipeline.reset()},this.setBaseMediaDecodeTime=function(e){t.keepOriginalTimestamps||(t.baseMediaDecodeTime=e),n&&(n.tracks.audio&&(n.tracks.audio.timelineStartInfo.dts=void 0,n.tracks.audio.timelineStartInfo.pts=void 0,Ce(n.tracks.audio),n.audioRollover&&n.audioRollover.discontinuity()),n.tracks.video&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),n.tracks.video.timelineStartInfo.dts=void 0,n.tracks.video.timelineStartInfo.pts=void 0,Ce(n.tracks.video)),n.timestampRollover&&n.timestampRollover.discontinuity())},this.setRemux=function(e){t.remux=e,n&&n.coalesceStream&&n.coalesceStream.setRemux(e)},this.setAudioAppendStart=function(e){n&&n.tracks.audio&&n.audioSegmentStream&&n.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){}};Wt.prototype=new H;var zt=Wt,qt=function(e){return e>>>0},Gt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Yt=qt,Xt=function e(t,n){var r,i,o,a,s,u=[];if(!n.length)return null;for(r=0;r<t.byteLength;)i=Yt(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]),o=Gt(t.subarray(r+4,r+8)),a=i>1?r+i:t.byteLength,o===n[0]&&(1===n.length?u.push(t.subarray(r+8,a)):(s=e(t.subarray(r+8,a),n.slice(1))).length&&(u=u.concat(s))),r=a;return u},Kt=qt,$t=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:Kt(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=Kt(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t},Qt=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},Zt=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=1&n.flags[2],o=4&n.flags[2],a=1&n.flags[1],s=2&n.flags[1],u=4&n.flags[1],c=8&n.flags[1],l=r.getUint32(4),f=8;for(i&&(n.dataOffset=r.getInt32(f),f+=4),o&&l&&(t={flags:Qt(e.subarray(f,f+4))},f+=4,a&&(t.duration=r.getUint32(f),f+=4),s&&(t.size=r.getUint32(f),f+=4),c&&(1===n.version?t.compositionTimeOffset=r.getInt32(f):t.compositionTimeOffset=r.getUint32(f),f+=4),n.samples.push(t),l--);l--;)t={},a&&(t.duration=r.getUint32(f),f+=4),s&&(t.size=r.getUint32(f),f+=4),u&&(t.flags=Qt(e.subarray(f,f+4)),f+=4),c&&(1===n.version?t.compositionTimeOffset=r.getInt32(f):t.compositionTimeOffset=r.getUint32(f),f+=4),n.samples.push(t);return n},Jt=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],c=65536&r.flags[0],l=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),o&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(r.defaultSampleDuration=n.getUint32(t),t+=4),s&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),c&&(r.durationIsEmpty=!0),!i&&l&&(r.baseDataOffsetIsMoof=!0),r},en=Pe,tn=We.CaptionStream,nn=function(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(n<i.size)return i;n-=i.size}return null},rn=function(e,t){var n=Xt(e,["moof","traf"]),r=Xt(e,["mdat"]),i={},o=[];return r.forEach((function(e,t){var r=n[t];o.push({mdat:e,traf:r})})),o.forEach((function(e){var n,r=e.mdat,o=e.traf,a=Xt(o,["tfhd"]),s=Jt(a[0]),u=s.trackId,c=Xt(o,["tfdt"]),l=c.length>0?$t(c[0]).baseMediaDecodeTime:0,f=Xt(o,["trun"]);t===u&&f.length>0&&(n=function(e,t,n){var r,i,o,a,s=new DataView(e.buffer,e.byteOffset,e.byteLength),u=[];for(i=0;i+4<e.length;i+=o)if(o=s.getUint32(i),i+=4,!(o<=0))switch(31&e[i]){case 6:var c=e.subarray(i+1,i+1+o),l=nn(i,t);if(r={nalUnitType:"sei_rbsp",size:o,data:c,escapedRBSP:en(c),trackId:n},l)r.pts=l.pts,r.dts=l.dts,a=l;else{if(!a){console.log("We've encountered a nal unit without data. See mux.js#233.");break}r.pts=a.pts,r.dts=a.dts}u.push(r)}return u}(r,function(e,t,n){var r=t,i=n.defaultSampleDuration||0,o=n.defaultSampleSize||0,a=n.trackId,s=[];return e.forEach((function(e){var t=Zt(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=i),void 0===e.size&&(e.size=o),e.trackId=a,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=r+e.compositionTimeOffset,r+=e.duration})),s=s.concat(t)})),s}(f,l,s),u),i[u]||(i[u]=[]),i[u]=i[u].concat(n))})),i},on=function(){var e,t,n,r,i,o,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new tn,a=!0,o=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,i.captions.push(e),i.captionStreams[e.stream]=!0}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(n!==e[0]||r!==t[n])},this.parse=function(e,o,a){var s;if(!this.isInitialized())return null;if(!o||!a)return null;if(this.isNewInit(o,a))n=o[0],r=a[n];else if(null===n||!r)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,o,a)}return null!==(s=function(e,t,n){return null===t?null:{seiNals:rn(e,t)[t],timescale:n}}(e,n,r))&&s.seiNals?(this.pushNals(s.seiNals),this.flushStream(),i):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;o?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){i.captions=[],i.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,r=null,i?this.clearParsedCaptions():i={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()},an=function(e){return"AudioSegmentStream"===e?"audio":"VideoSegmentStream"===e?"video":""},sn=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=this.options.handlePartialData?new zt(this.options):new Rt.Transmuxer(this.options),this.options.handlePartialData?function(e,t){t.on("data",(function(t){var n={data:t.data.track.initSegment.buffer,byteOffset:t.data.track.initSegment.byteOffset,byteLength:t.data.track.initSegment.byteLength},r={boxes:{data:t.data.boxes.buffer,byteOffset:t.data.boxes.byteOffset,byteLength:t.data.boxes.byteLength},initSegment:n,type:t.type,sequence:t.data.sequence};void 0!==t.data.videoFrameDts&&(r.videoFrameDtsTime=ye(t.data.videoFrameDts)),void 0!==t.data.videoFramePts&&(r.videoFramePtsTime=ye(t.data.videoFramePts)),e.postMessage({action:"data",segment:r},[r.boxes.data,r.initSegment.data])})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("done",(function(t){e.postMessage({action:"done",type:an(t)})})),t.on("partialdone",(function(t){e.postMessage({action:"partialdone",type:an(t)})})),t.on("endedsegment",(function(t){e.postMessage({action:"endedSegment",type:an(t)})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){if(null!==t.start){var n={start:ye(t.start)};t.end&&(n.end=ye(t.end)),e.postMessage({action:"audioTimingInfo",audioTimingInfo:n})}else e.postMessage({action:"audioTimingInfo",audioTimingInfo:t})})),t.on("videoTimingInfo",(function(t){var n={start:ye(t.start)};t.end&&(n.end=ye(t.end)),e.postMessage({action:"videoTimingInfo",videoTimingInfo:n})}))}(this.self,this.transmuxer):function(e,t){t.on("data",(function(t){var n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var r=t.data;t.data=r.buffer,e.postMessage({action:"data",segment:t,byteOffset:r.byteOffset,byteLength:r.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){var n={start:{decode:ye(t.start.dts),presentation:ye(t.start.pts)},end:{decode:ye(t.end.dts),presentation:ye(t.end.pts)},baseMediaDecodeTime:ye(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=ye(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){var n={start:{decode:ye(t.start.dts),presentation:ye(t.start.pts)},end:{decode:ye(t.end.dts),presentation:ye(t.end.pts)},baseMediaDecodeTime:ye(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=ye(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:ye(t.start),end:ye(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:ye(t.start),end:ye(t.end)}})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new on,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],data:t.buffer},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(pe(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(pe(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),n.postMessage({action:"done",type:"transmuxed"})},t.partialFlush=function(e){this.transmuxer.partialFlush(),n.postMessage({action:"partialdone",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),n.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();new function(e){e.onmessage=function(t){"init"===t.data.action&&t.data.options?this.messageHandlers=new sn(e,t.data.options):(this.messageHandlers||(this.messageHandlers=new sn(e)),t.data&&t.data.action&&"init"!==t.data.action&&this.messageHandlers[t.data.action]&&this.messageHandlers[t.data.action](t.data))}}(n)}()})),Ss=function(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},Cs=function(e,t){var n=t.attributes||{},r=function(e){var t=e.attributes||{};if(t.CODECS)return Object(Ue.parseCodecs)(t.CODECS)}(t)||{};if(Ss(e,t)&&!r.audio&&!function(e,t){if(!Ss(e,t))return!0;var n=t.attributes||{},r=e.mediaGroups.AUDIO[n.AUDIO];for(var i in r)if(!r[i].uri&&!r[i].playlists)return!0;return!1}(e,t)){var i=Object(Ue.codecsFromDefault)(e,n.AUDIO);i&&(r.audio=i.audio)}var o={};return r.video&&(o.video=Object(Ue.translateLegacyCodec)(""+r.video.type+r.video.details)),r.audio&&(o.audio=Object(Ue.translateLegacyCodec)(""+r.audio.type+r.audio.details)),r.text&&(o.text=r.text.type),r.unknown&&(o.unknown=r.unknown),o},ks=function(e){return Wo.log.debug?Wo.log.debug.bind(Wo,"VHS:",e+" >"):function(){}},Es=ks("PlaylistSelector"),Is=function(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}},Os=function(e,t){if(!e)return"";var n=s.a.getComputedStyle(e);return n?n[t]:""},xs=function(e,t){var n=e.slice();e.sort((function(e,r){var i=t(e,r);return 0===i?n.indexOf(e)-n.indexOf(r):i}))},Ps=function(e,t){var n,r;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||s.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),n-(r=r||s.a.Number.MAX_VALUE)},As=function(e,t,n,r,i){if(e){var o={bandwidth:t,width:n,height:r,limitRenditionByPlayerDimensions:i},a=e.playlists.map((function(e){var t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes.BANDWIDTH||s.a.Number.MAX_VALUE,width:t,height:n,playlist:e}}));xs(a,(function(e,t){return e.bandwidth-t.bandwidth}));var u=(a=a.filter((function(e){return!Sa.isIncompatible(e.playlist)}))).filter((function(e){return Sa.isEnabled(e.playlist)}));u.length||(u=a.filter((function(e){return!Sa.isDisabled(e.playlist)})));var c=u.filter((function(e){return e.bandwidth*qa.BANDWIDTH_VARIANCE<t})),l=c[c.length-1],f=c.filter((function(e){return e.bandwidth===l.bandwidth}))[0];if(!1===i){var h=f||u[0]||a[0];if(h&&h.playlist){var d="sortedPlaylistReps";return f&&(d="bandwidthBestRep"),u[0]&&(d="enabledPlaylistReps"),Es("choosing "+Is(h)+" using "+d+" with options",o),h.playlist}return Es("could not choose a playlist with options",o),null}var p=c.filter((function(e){return e.width&&e.height}));xs(p,(function(e,t){return e.width-t.width}));var y=p.filter((function(e){return e.width===n&&e.height===r}));l=y[y.length-1];var m,g,v,b=y.filter((function(e){return e.bandwidth===l.bandwidth}))[0];b||(g=(m=p.filter((function(e){return e.width>n||e.height>r}))).filter((function(e){return e.width===m[0].width&&e.height===m[0].height})),l=g[g.length-1],v=g.filter((function(e){return e.bandwidth===l.bandwidth}))[0]);var _=v||b||f||u[0]||a[0];if(_&&_.playlist){var T="sortedPlaylistReps";return v?T="resolutionPlusOneRep":b?T="resolutionBestRep":f?T="bandwidthBestRep":u[0]&&(T="enabledPlaylistReps"),Es("choosing "+Is(_)+" using "+T+" with options",o),_.playlist}return Es("could not choose a playlist with options",o),null}},Ls=function(){var e=this.useDevicePixelRatio&&s.a.devicePixelRatio||1;return As(this.playlists.master,this.systemBandwidth,parseInt(Os(this.tech_.el(),"width"),10)*e,parseInt(Os(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions)},Rs=function(e){var t=e.inbandTextTracks,n=e.metadataArray,r=e.timestampOffset,i=e.videoDuration;if(n){var o=s.a.WebKitDataCue||s.a.VTTCue,a=t.metadataTrack_;if(a&&(n.forEach((function(e){var t=e.cueTime+r;!("number"!=typeof t||s.a.isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var n=new o(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Wo.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Wo.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Wo.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),a.addCue(n)}))})),a.cues&&a.cues.length)){for(var u=a.cues,c=[],l=0;l<u.length;l++)u[l]&&c.push(u[l]);var f=c.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),h=Object.keys(f).sort((function(e,t){return Number(e)-Number(t)}));h.forEach((function(e,t){var n=f[e],r=Number(h[t+1])||i;n.forEach((function(e){e.endTime=r}))}))}}},js=function(e,t,n){var r,i;if(n&&n.cues)for(r=n.cues.length;r--;)(i=n.cues[r]).startTime>=e&&i.endTime<=t&&n.removeCue(i)},Ds=function(e){return"number"==typeof e&&isFinite(e)},Ms=function(e){return e+"TimingInfo"},Ns=function(e){var t=e.segmentTimeline,n=e.currentTimeline,r=e.startOfSegment,i=e.buffered;return e.overrideCheck||t!==n?t<n?r:i.length?i.end(i.length-1):r:null},Bs=function(e){var t=e.timelineChangeController,n=e.currentTimeline,r=e.segmentTimeline,i=e.loaderType,o=e.audioDisabled;if(n===r)return!1;if("audio"===i){var a=t.lastTimelineChange({type:"main"});return!a||a.to!==r}if("main"===i&&o){var s=t.pendingTimelineChange({type:"audio"});return!s||s.to!==r}return!1},Us=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+1/30},Fs=function(e,t){if("hls"!==t)return null;var n,r,i,o,a=(n=e.audioTimingInfo,r=e.videoTimingInfo,i=n&&"number"==typeof n.start&&"number"==typeof n.end?n.end-n.start:0,o=r&&"number"==typeof r.start&&"number"==typeof r.end?r.end-r.start:0,Math.max(i,o));if(!a)return null;var s=e.playlist.targetDuration,u=Us({segmentDuration:a,maxDuration:2*s}),c=Us({segmentDuration:a,maxDuration:s}),l="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+a+" when the reported duration is "+e.duration+" and the target duration is "+s+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return u||c?{severity:u?"warn":"info",message:l}:null},Vs=function(e){function t(t,n){var r;if(r=e.call(this)||this,!t)throw new TypeError("Initialization settings are required");if("function"!=typeof t.currentTime)throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");return r.bandwidth=t.bandwidth,r.throughput={rate:0,count:0},r.roundTrip=NaN,r.resetStats_(),r.mediaIndex=null,r.hasPlayed_=t.hasPlayed,r.currentTime_=t.currentTime,r.seekable_=t.seekable,r.seeking_=t.seeking,r.duration_=t.duration,r.mediaSource_=t.mediaSource,r.vhs_=t.vhs,r.loaderType_=t.loaderType,r.currentMediaInfo_=void 0,r.startingMediaInfo_=void 0,r.segmentMetadataTrack_=t.segmentMetadataTrack,r.goalBufferLength_=t.goalBufferLength,r.sourceType_=t.sourceType,r.sourceUpdater_=t.sourceUpdater,r.inbandTextTracks_=t.inbandTextTracks,r.state_="INIT",r.handlePartialData_=t.handlePartialData,r.timelineChangeController_=t.timelineChangeController,r.shouldSaveSegmentTimingInfo_=!0,r.checkBufferTimeout_=null,r.error_=void 0,r.currentTimeline_=-1,r.pendingSegment_=null,r.xhrOptions_=null,r.pendingSegments_=[],r.audioDisabled_=!1,r.isPendingTimestampOffset_=!1,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=Wo.browser.IE_VERSION>=11,r.appendInitSegment_={audio:!0,video:!0},r.playlistOfLastInitSegment_={audio:null,video:null},r.callQueue_=[],r.loadQueue_=[],r.metadataQueue_={id3:[],caption:[]},r.activeInitSegmentId_=null,r.initSegments_={},r.cacheEncryptionKeys_=t.cacheEncryptionKeys,r.keyCache_={},r.decrypter_=t.decrypter,r.syncController_=t.syncController,r.syncPoint_={segmentIndex:0,time:0},r.transmuxer_=r.createTransmuxer_(),r.triggerSyncInfoUpdate_=function(){return r.trigger("syncinfoupdate")},r.syncController_.on("syncinfoupdate",r.triggerSyncInfoUpdate_),r.mediaSource_.addEventListener("sourceopen",(function(){r.isEndOfStream_()||(r.ended_=!1)})),r.fetchAtBuffer_=!1,r.logger_=ks("SegmentLoader["+r.loaderType_+"]"),Object.defineProperty(d()(r),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),r.sourceUpdater_.on("ready",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"main"===r.loaderType_&&r.timelineChangeController_.on("pendingtimelinechange",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"audio"===r.loaderType_&&r.timelineChangeController_.on("timelinechange",(function(){r.hasEnoughInfoToLoad_()&&r.processLoadQueue_(),r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),r}y()(t,e);var n=t.prototype;return n.createTransmuxer_=function(){var e=new ws;return e.postMessage({action:"init",options:{remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,handlePartialData:this.handlePartialData_}}),e},n.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0},n.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&(this.transmuxer_.terminate(),es()),this.resetStats_(),this.checkBufferTimeout_&&s.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},n.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},n.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},n.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_)},n.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},n.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Ja(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){if(!this.sourceUpdater_||!this.startingMediaInfo_)return Wo.createTimeRanges();if("main"===this.loaderType_){var e=this.startingMediaInfo_,t=e.hasAudio,n=e.hasVideo,r=e.isMuxed;if(n&&t&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Ra(e),r=this.initSegments_[n];return t&&!r&&e.bytes&&(this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=ja(e),r=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[n]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});var i={resolvedUri:(r||e).resolvedUri};return r&&(i.bytes=r.bytes),i},n.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},n.load=function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.playlist=function(e,t){if(void 0===t&&(t={}),e){var n=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0});var i=null;if(n&&(n.id?i=n.id:n.uri&&(i=n.uri)),this.logger_("playlist update ["+i+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri)return(null!==this.mediaIndex||this.handlePartialData_)&&this.resyncLoader(),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var o=e.mediaSequence-n.mediaSequence;this.logger_("live window shift ["+o+"]"),null!==this.mediaIndex&&(this.mediaIndex-=o),r&&(r.mediaIndex-=o,r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(n,e)}},n.pause=function(){this.checkBufferTimeout_&&(s.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"})},n.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},n.resyncLoader=function(){this.transmuxer_&&Ja(this.transmuxer_),this.mediaIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},n.remove=function(e,t,n){if(void 0===n&&(n=function(){}),t===1/0&&(t=this.duration_()),this.sourceUpdater_&&this.currentMediaInfo_){var r=1,i=function(){0===--r&&n()};for(var o in this.audioDisabled_||(r++,this.sourceUpdater_.removeAudio(e,t,i)),"main"===this.loaderType_&&this.currentMediaInfo_&&this.currentMediaInfo_.hasVideo&&(this.gopBuffer_=function(e,t,n,r){for(var i=Math.ceil((t-r)*Me.ONE_SECOND_IN_TS),o=Math.ceil((n-r)*Me.ONE_SECOND_IN_TS),a=e.slice(),s=e.length;s--&&!(e[s].pts<=o););if(-1===s)return a;for(var u=s+1;u--&&!(e[u].pts<=i););return u=Math.max(u,0),a.splice(u,s-u+1),a}(this.gopBuffer_,e,t,this.timeMapping_),r++,this.sourceUpdater_.removeVideo(e,t,i)),this.inbandTextTracks_)js(e,t,this.inbandTextTracks_[o]);js(e,t,this.segmentMetadataTrack_),i()}},n.monitorBuffer_=function(){this.checkBufferTimeout_&&s.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=s.a.setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&s.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=s.a.setTimeout(this.monitorBufferTick_.bind(this),500)},n.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.buffered_(),t=this.checkBuffer_(e,this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);t&&(t.timestampOffset=Ns({segmentTimeline:t.timeline,currentTimeline:this.currentTimeline_,startOfSegment:t.startOfSegment,buffered:e,overrideCheck:this.isPendingTimestampOffset_}),this.isPendingTimestampOffset_=!1,"number"==typeof t.timestampOffset&&this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline}),this.loadSegment_(t))}},n.isEndOfStream_=function(e,t){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),!t||!this.mediaSource_)return!1;var n=e+1===t.segments.length;return t.endList&&"open"===this.mediaSource_.readyState&&n},n.checkBuffer_=function(e,t,n,r,i,o){var a=0;e.length&&(a=e.end(e.length-1));var s=Math.max(0,a-i);if(!t.segments.length)return null;if(s>=this.goalBufferLength_())return null;if(!r&&s>=1)return null;var u,c=null,l=!1;if(null===o)c=this.getSyncSegmentCandidate_(t),l=!0;else if(null!==n){var f=t.segments[n];u=f&&f.end?f.end:a,c=n+1}else if(this.fetchAtBuffer_){var h=Sa.getMediaInfoForTime(t,a,o.segmentIndex,o.time);c=h.mediaIndex,u=h.startTime}else{var d=Sa.getMediaInfoForTime(t,i,o.segmentIndex,o.time);c=d.mediaIndex,u=d.startTime}var p=this.generateSegmentInfo_(t,c,u,l);return!p||this.mediaSource_&&this.playlist_&&p.mediaIndex===this.playlist_.segments.length-1&&"ended"===this.mediaSource_.readyState&&!this.seeking_()?void 0:(this.logger_("checkBuffer_ returning "+p.uri,{segmentInfo:p,playlist:t,currentMediaIndex:n,nextMediaIndex:c,startOfSegment:u,isSyncRequest:l}),p)},n.getSyncSegmentCandidate_=function(e){var t=this;if(-1===this.currentTimeline_)return 0;var n=e.segments.map((function(e,t){return{timeline:e.timeline,segmentIndex:t}})).filter((function(e){return e.timeline===t.currentTimeline_}));return n.length?n[Math.min(n.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0)},n.generateSegmentInfo_=function(e,t,n,r){if(t<0||t>=e.segments.length)return null;var i,o,a=e.segments[t],s=this.sourceUpdater_.audioBuffered(),u=this.sourceUpdater_.videoBuffered();return s.length&&(i=s.end(s.length-1)-this.sourceUpdater_.audioTimestampOffset()),u.length&&(o=function(e,t,n){if(null==t||!e.length)return[];var r,i=Math.ceil((t-n+3)*Me.ONE_SECOND_IN_TS);for(r=0;r<e.length&&!(e[r].pts>i);r++);return e.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),{requestId:"segment-loader-"+Math.random(),uri:a.resolvedUri,mediaIndex:t,isSyncRequest:r,startOfSegment:n,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:a.timeline,duration:a.duration,segment:a,byteLength:0,transmuxer:this.transmuxer_,audioAppendStart:i,gopsToAlignWith:o}},n.earlyAbortWhenNeeded_=function(e){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t=this.currentTime_(),n=e.bandwidth,r=this.pendingSegment_.duration,i=Sa.estimateSegmentRequestTime(r,n,this.playlist_,e.bytesReceived),o=function(e,t,n){return void 0===n&&(n=1),((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(i<=o)){var a=function(e){var t=e.master,n=e.currentTime,r=e.bandwidth,i=e.duration,o=e.segmentDuration,a=e.timeUntilRebuffer,s=e.currentTimeline,u=e.syncController,c=t.playlists.filter((function(e){return!Sa.isIncompatible(e)})),l=c.filter(Sa.isEnabled);l.length||(l=c.filter((function(e){return!Sa.isDisabled(e)})));var f=l.filter(Sa.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var t=u.getSyncPoint(e,i,s,n)?1:2;return{playlist:e,rebufferingImpact:Sa.estimateSegmentRequestTime(o,r,e)*t-a}})),h=f.filter((function(e){return e.rebufferingImpact<=0}));return xs(h,(function(e,t){return Ps(t.playlist,e.playlist)})),h.length?h[0]:(xs(f,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),f[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:o,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(a){var s=i-o-a.rebufferingImpact,u=.5;o<=1/30&&(u=1),!a.playlist||a.playlist.uri===this.playlist_.uri||s<u||(this.bandwidth=a.playlist.attributes.BANDWIDTH*qa.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},n.handleAbort_=function(){this.mediaRequestsAborted+=1},n.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},n.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++){var o=n[i];if(o!==r[i])return!1;if(e[o]!==t[o])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},n.handleTimingInfo_=function(e,t,n,r){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var i=this.pendingSegment_,o=Ms(t);i[o]=i[o]||{},i[o][n]=r,this.logger_("timinginfo: "+t+" - "+n+" - "+r),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},n.handleCaptions_=function(e,t){var n=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),i={};t.forEach((function(e){i[e.stream]=i[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=i[e.stream];t.startTime=Math.min(t.startTime,e.startTime+r),t.endTime=Math.max(t.endTime,e.endTime+r),t.captions.push(e)})),Object.keys(i).forEach((function(e){var t=i[e],o=t.startTime,a=t.endTime,u=t.captions,c=n.inbandTextTracks_;n.logger_("adding cues from "+o+" -> "+a+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var r=t.textTracks().getTrackById(n);e[n]=r||t.addRemoteTextTrack({kind:"captions",id:n,label:n},!1).track}}(c,n.vhs_.tech_,e),js(o,a,c[e]),function(e){var t=e.inbandTextTracks,n=e.captionArray,r=e.timestampOffset;if(n){var i=s.a.WebKitDataCue||s.a.VTTCue;n.forEach((function(e){var n=e.stream;t[n].addCue(new i(e.startTime+r,e.endTime+r,e.text))}))}}({captionArray:u,inbandTextTracks:c,timestampOffset:r})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_("SegmentLoader received no captions from a caption event")},n.handleId3_=function(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,n){e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,n,this.vhs_.tech_),Rs({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:r,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))},n.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(e){return e()})),this.metadataQueue_.caption.forEach((function(e){return e()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},n.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach((function(e){return e()}))},n.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach((function(e){return e()}))},n.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.currentMediaInfo_||!Bs({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;var e=this.pendingSegment_;if(!e||!e.trackInfo)return!1;if(!this.handlePartialData_){var t=this.currentMediaInfo_,n=t.hasAudio,r=t.hasVideo,i=t.isMuxed;if(r&&!e.videoTimingInfo)return!1;if(n&&!this.audioDisabled_&&!i&&!e.audioTimingInfo)return!1}return!Bs({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})},n.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[Ms(t.type)].start;else{var r,i="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo;i&&(r=this.handlePartialData_?t.videoFramePtsTime:n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:i,firstVideoFrameTimeForData:r,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},n.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},n.getInitSegmentAndUpdateState_=function(e){var t=e.type,n=e.initSegment,r=e.map,i=e.playlist;if(r){var o=Ra(r);if(this.activeInitSegmentId_===o)return null;n=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=o}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=i,this.appendInitSegment_[t]=!!r,this.activeInitSegmentId_=null,n):null},n.appendToSourceBuffer_=function(e){var t=this,n=e.segmentInfo,r=e.type,i=e.initSegment,o=e.data,a=[o],s=o.byteLength;i&&(a.unshift(i),s+=i.byteLength);var u,c,l,f=(l=0,(u={bytes:s,segments:a}).bytes&&(c=new Uint8Array(u.bytes),u.segments.forEach((function(e){c.set(e,l),l+=e.byteLength}))),c);this.sourceUpdater_.appendBuffer({segmentInfo:n,type:r,bytes:f},(function(e){e&&(t.error(r+" append of "+f.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),t.trigger("appenderror"))}))},n.handleSegmentTimingInfo_=function(e,t,n){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var r=this.pendingSegment_.segment,i=e+"TimingInfo";r[i]||(r[i]={}),r[i].transmuxerPrependedSeconds=n.prependedContentDuration||0,r[i].transmuxedPresentationStart=n.start.presentation,r[i].transmuxedDecodeStart=n.start.decode,r[i].transmuxedPresentationEnd=n.end.presentation,r[i].transmuxedDecodeEnd=n.end.decode,r[i].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(e,t){var n=t.type,r=t.data;if(r&&r.byteLength&&("audio"!==n||!this.audioDisabled_)){var i=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:i,data:r})}},n.loadSegment_=function(e){var t=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push((function(){var n=t.buffered_();"number"==typeof e.timestampOffset&&(e.timestampOffset=Ns({segmentTimeline:e.timeline,currentTimeline:t.currentTimeline_,startOfSegment:e.startOfSegment,buffered:n,overrideCheck:!0})),delete e.audioAppendStart;var r=t.sourceUpdater_.audioBuffered();r.length&&(e.audioAppendStart=r.end(r.length-1)-t.sourceUpdater_.audioTimestampOffset()),t.updateTransmuxerAndRequestSegment_(e)}))},n.updateTransmuxerAndRequestSegment_=function(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var t=this.createSimplifiedSegmentObj_(e);e.abortRequests=fs({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,handlePartialData:this.handlePartialData_,abortFn:this.handleAbort_.bind(this),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this)})},n.trimBackBuffer_=function(e){var t=function(e,t,n){var r=t-qa.BACK_BUFFER_LENGTH;e.length&&(r=Math.max(r,e.start(0)));var i=t-n;return Math.min(i,r)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},n.createSimplifiedSegmentObj_=function(e){var t=e.segment,n={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith},r=e.playlist.segments[e.mediaIndex-1];if(r&&r.timeline===t.timeline&&(r.videoTimingInfo?n.baseStartTime=r.videoTimingInfo.transmuxedDecodeEnd:r.audioTimingInfo&&(n.baseStartTime=r.audioTimingInfo.transmuxedDecodeEnd)),t.key){var i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);n.key=this.segmentKey(t.key),n.key.iv=i}return t.map&&(n.map=this.initSegmentForMap(t.map)),n},n.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},n.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<1/60?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+1/60):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},n.segmentRequestFinished_=function(e,t,n){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===is)return;return this.pause(),e.code===rs?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),r.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var r=t[0].pts,i=0;i<e.length&&!(e[i].pts>=r);i++);return e.slice(0,i).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING";var i=this.isEndOfStream_(r.mediaIndex,r.playlist),o=null!==this.mediaIndex,a=r.timeline!==this.currentTimeline_&&r.timeline>0;!r.isFmp4&&(i||o&&a)&&ts(this.transmuxer_),this.trigger("appending"),this.waitForAppendsToComplete_(r)}},n.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},n.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},n.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},n.trueSegmentStart_=function(e){var t=e.currentStart,n=e.playlist,r=e.mediaIndex,i=e.firstVideoFrameTimeForData,o=e.currentVideoTimestampOffset,a=e.useVideoTimingInfo,s=e.videoTimingInfo,u=e.audioTimingInfo;if(void 0!==t)return t;if(!a)return u.start;var c=n.segments[r-1];return 0!==r&&c&&void 0!==c.start&&c.end===i+o?s.start:i},n.waitForAppendsToComplete_=function(e){if(!this.currentMediaInfo_)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var t=this.currentMediaInfo_,n=t.hasAudio,r=t.hasVideo,i=t.isMuxed,o="main"===this.loaderType_&&r,a=!this.audioDisabled_&&n&&!i;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);o&&e.waitingOnAppends++,a&&e.waitingOnAppends++,o&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},n.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},n.checkForIllegalMediaSwitch=function(e){var t=function(e,t,n){return"main"===e&&t&&n?n.hasAudio||n.hasVideo?t.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.currentMediaInfo_,e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0)},n.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var t=!1;e.timestampOffset-=e.timingInfo.start,e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}},n.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;t&&(e.timingInfo.end="number"==typeof t.end?t.end:t.start+e.duration)},n.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_}),this.logger_(function(e){var t=e.segment,n=t.start,r=t.end,i=e.playlist,o=i.mediaSequence,a=i.id,s=i.segments,u=void 0===s?[]:s,c=e.mediaIndex,l=e.timeline;return["appending ["+c+"] of ["+o+", "+(o+u.length)+"] from playlist ["+a+"]","["+n+" => "+r+"] in timeline ["+l+"]"].join(" ")}(e));var t=Fs(e,this.sourceType_);if(t&&("warn"===t.severity?Wo.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest)this.trigger("syncinfoupdate");else{this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var n=e.segment;if(n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration)this.resetEverything();else null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.isEndOfStream_(e.mediaIndex,e.playlist)&&this.endOfStream(),this.trigger("appended"),this.paused()||this.monitorBuffer_()}},n.recordThroughput_=function(e){if(e.duration<1/60)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+1/60);else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,r=t.end;if(Ds(n)&&Ds(r)){js(n,r,this.segmentMetadataTrack_);var i=s.a.WebKitDataCue||s.a.VTTCue,o={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:n,end:r},a=new i(n,r,JSON.stringify(o));a.value=o,this.segmentMetadataTrack_.addCue(a)}}},t}(Wo.EventTarget);function Hs(){}var Ws,zs=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},qs=["video","audio"],Gs=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},Ys=function e(t,n){if(0!==n.queue.length){var r=0,i=n.queue[r];if("mediaSource"!==i.type){if("mediaSource"!==t&&n.ready()&&"closed"!==n.mediaSource.readyState&&!Gs(t,n)){if(i.type!==t){if(null===(r=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("mediaSource"===r.type)return null;if(r.type===e)return n}return null}(t,n.queue)))return;i=n.queue[r]}n.queue.splice(r,1),i.action(t,n),i.doneFn?n.queuePending[t]=i:e(t,n)}}else n.updating()||"closed"===n.mediaSource.readyState||(n.queue.shift(),i.action(n),i.doneFn&&i.doneFn(),e("audio",n),e("video",n))}},Xs=function(e,t){var n=t[e+"Buffer"],r=zs(e);n&&(n.removeEventListener("updateend",t["on"+r+"UpdateEnd_"]),n.removeEventListener("error",t["on"+r+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},Ks=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},$s=function(e,t){return function(n,r){var i=r[n+"Buffer"];Ks(r.mediaSource,i)&&(r.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+n+"Buffer"),i.appendBuffer(e))}},Qs=function(e,t){return function(n,r){var i=r[n+"Buffer"];Ks(r.mediaSource,i)&&(r.logger_("Removing "+e+" to "+t+" from "+n+"Buffer"),i.remove(e,t))}},Zs=function(e){return function(t,n){var r=n[t+"Buffer"];Ks(n.mediaSource,r)&&(n.logger_("Setting "+t+"timestampOffset to "+e),r.timestampOffset=e)}},Js=function(e){return function(t,n){e()}},eu=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(e){Wo.log.warn("Failed to call media source endOfStream",e)}}}},tu=function(e){return function(t){t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(e){Wo.log.warn("Failed to set media source duration",e)}}},nu=function(){return function(e,t){if("open"===t.mediaSource.readyState){var n=t[e+"Buffer"];if(Ks(t.mediaSource,n)){t.logger_("calling abort on "+e+"Buffer");try{n.abort()}catch(t){Wo.log.warn("Failed to abort on "+e+"Buffer",t)}}}}},ru=function(e,t){return function(n){var r=zs(e),i=Object(Ue.getMimeForCodec)(t);n.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var o=n.mediaSource.addSourceBuffer(i);o.addEventListener("updateend",n["on"+r+"UpdateEnd_"]),o.addEventListener("error",n["on"+r+"Error_"]),n.codecs[e]=t,n[e+"Buffer"]=o}},iu=function(e){return function(t){var n=t[e+"Buffer"];if(Xs(e,t),Ks(t.mediaSource,n)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(n)}catch(t){Wo.log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},ou=function(e){return function(t,n){var r=n[t+"Buffer"],i=Object(Ue.getMimeForCodec)(e);Ks(n.mediaSource,r)&&n.codecs[t]!==e&&(n.logger_("changing "+t+"Buffer codec from "+n.codecs[t]+" to "+e),r.changeType(i),n.codecs[t]=e)}},au=function(e){var t=e.type,n=e.sourceUpdater,r=e.action,i=e.doneFn,o=e.name;n.queue.push({type:t,action:r,doneFn:i,name:o}),Ys(t,n)},su=function(e,t){return function(n){if(t.queuePending[e]){var r=t.queuePending[e].doneFn;t.queuePending[e]=null,r&&r(t[e+"Error_"])}Ys(e,t)}},uu=function(e){function t(t){var n;return(n=e.call(this)||this).mediaSource=t,n.sourceopenListener_=function(){return Ys("mediaSource",d()(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=ks("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null},n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=su("video",d()(n)),n.onAudioUpdateEnd_=su("audio",d()(n)),n.onVideoError_=function(e){n.videoError_=e},n.onAudioError_=function(e){n.audioError_=e},n.createdSourceBuffers_=!1,n.initializedEme_=!1,n.triggeredReady_=!1,n}y()(t,e);var n=t.prototype;return n.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},n.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},n.hasInitializedAnyEme=function(){return this.initializedEme_},n.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},n.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},n.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},n.addSourceBuffer=function(e,t){au({type:"mediaSource",sourceUpdater:this,action:ru(e,t),name:"addSourceBuffer"})},n.abort=function(e){au({type:e,sourceUpdater:this,action:nu(e),name:"abort"})},n.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?au({type:"mediaSource",sourceUpdater:this,action:iu(e),name:"removeSourceBuffer"}):Wo.log.error("removeSourceBuffer is not supported!")},n.canRemoveSourceBuffer=function(){return!Wo.browser.IE_VERSION&&!Wo.browser.IS_FIREFOX&&s.a.MediaSource&&s.a.MediaSource.prototype&&"function"==typeof s.a.MediaSource.prototype.removeSourceBuffer},t.canChangeType=function(){return s.a.SourceBuffer&&s.a.SourceBuffer.prototype&&"function"==typeof s.a.SourceBuffer.prototype.changeType},n.canChangeType=function(){return this.constructor.canChangeType()},n.changeType=function(e,t){this.canChangeType()?au({type:e,sourceUpdater:this,action:ou(t),name:"changeType"}):Wo.log.error("changeType is not supported!")},n.addOrChangeSourceBuffers=function(e){var t=this;if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((function(n){var r=e[n];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(n,r);t.canChangeType()&&t.changeType(n,r)}))},n.appendBuffer=function(e,t){var n=this,r=e.segmentInfo,i=e.type,o=e.bytes;if(this.processedAppend_=!0,"audio"===i&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+o.length+" until video append");if(au({type:i,sourceUpdater:this,action:$s(o,r||{mediaIndex:-1}),doneFn:t,name:"appendBuffer"}),"video"===i){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var a=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+a.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,a.forEach((function(e){n.appendBuffer.apply(n,e)}))}},n.audioBuffered=function(){return Ks(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Wo.createTimeRange()},n.videoBuffered=function(){return Ks(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Wo.createTimeRange()},n.buffered=function(){var e=Ks(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Ks(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var n=null,r=null,i=0,o=[],a=[];if(!(e&&e.length&&t&&t.length))return Wo.createTimeRange();for(var s=e.length;s--;)o.push({time:e.start(s),type:"start"}),o.push({time:e.end(s),type:"end"});for(s=t.length;s--;)o.push({time:t.start(s),type:"start"}),o.push({time:t.end(s),type:"end"});for(o.sort((function(e,t){return e.time-t.time})),s=0;s<o.length;s++)"start"===o[s].type?2===++i&&(n=o[s].time):"end"===o[s].type&&1===--i&&(r=o[s].time),null!==n&&null!==r&&(a.push([n,r]),n=null,r=null);return Wo.createTimeRanges(a)}(this.audioBuffered(),this.videoBuffered())},n.setDuration=function(e,t){void 0===t&&(t=Hs),au({type:"mediaSource",sourceUpdater:this,action:tu(e),name:"duration",doneFn:t})},n.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=Hs),"string"!=typeof e&&(e=void 0),au({type:"mediaSource",sourceUpdater:this,action:eu(e),name:"endOfStream",doneFn:t})},n.removeAudio=function(e,t,n){void 0===n&&(n=Hs),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?au({type:"audio",sourceUpdater:this,action:Qs(e,t),doneFn:n,name:"remove"}):n()},n.removeVideo=function(e,t,n){void 0===n&&(n=Hs),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?au({type:"video",sourceUpdater:this,action:Qs(e,t),doneFn:n,name:"remove"}):n()},n.updating=function(){return!(!Gs("audio",this)&&!Gs("video",this))},n.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(au({type:"audio",sourceUpdater:this,action:Zs(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},n.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(au({type:"video",sourceUpdater:this,action:Zs(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},n.audioQueueCallback=function(e){this.audioBuffer&&au({type:"audio",sourceUpdater:this,action:Js(e),name:"callback"})},n.videoQueueCallback=function(e){this.videoBuffer&&au({type:"video",sourceUpdater:this,action:Js(e),name:"callback"})},n.dispose=function(){var e=this;this.trigger("dispose"),qs.forEach((function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"]((function(){return Xs(t,e)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},t}(Wo.EventTarget),cu=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},lu=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),fu=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).handlePartialData_=!1,r.mediaSource_=null,r.subtitlesTrack_=null,r.loaderType_="subtitle",r.featuresNativeTextTracks_=t.featuresNativeTextTracks,r.shouldSaveSegmentTimingInfo_=!1,r}y()(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return null},n.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return Wo.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Wo.createTimeRanges([[t,n]])},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Ra(e),r=this.initSegments_[n];if(t&&!r&&e.bytes){var i=lu.byteLength+e.bytes.byteLength,o=new Uint8Array(i);o.set(e.bytes),o.set(lu,e.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:o}}return r||e},n.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.track=function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},n.remove=function(e,t){js(e,t,this.subtitlesTrack_)},n.fillBuffer_=function(){var e=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(t=this.skipEmptySegments_(t)){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){return this.syncController_.one("timestampoffset",(function(){e.state="READY",e.paused()||e.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}},n.skipEmptySegments_=function(e){for(;e&&e.segment.empty;)e=this.generateSegmentInfo_(e.playlist,e.mediaIndex+1,e.startOfSegment+e.duration,e.isSyncRequest);return e},n.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},n.segmentRequestFinished_=function(e,t,n){var r=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===rs&&this.handleTimeout_(),e.code===is?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,t.stats),this.state="APPENDING",this.trigger("appending");var o=i.segment;if(o.map&&(o.map.bytes=t.map.bytes),i.bytes=t.bytes,"function"!=typeof s.a.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var a,u=function(){r.subtitlesTrack_.tech_.off("vttjsloaded",a),r.stopForError({message:"Error loading vtt.js"})};return a=function(){r.subtitlesTrack_.tech_.off("vttjserror",u),r.segmentRequestFinished_(e,t,n)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",a),void this.subtitlesTrack_.tech_.one("vttjserror",u)}o.requested=!0;try{this.parseVTTCues_(i)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(i,this.syncController_.timelines[i.timeline],this.playlist_),i.cues.length?i.timingInfo={start:i.cues[0].startTime,end:i.cues[i.cues.length-1].endTime}:i.timingInfo={start:i.startOfSegment,end:i.startOfSegment+i.duration},i.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");i.byteLength=i.bytes.byteLength,this.mediaSecondsLoaded+=o.duration,i.cues.forEach((function(e){r.subtitlesTrack_.addCue(r.featuresNativeTextTracks_?new s.a.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){var t=e.cues;if(t)for(var n=0;n<t.length;n++){for(var r=[],i=0,o=0;o<t.length;o++)t[n].startTime===t[o].startTime&&t[n].endTime===t[o].endTime&&t[n].text===t[o].text&&++i>1&&r.push(t[o]);r.length&&r.forEach((function(t){return e.removeCue(t)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},n.handleData_=function(){},n.updateTimingInfoEnd_=function(){},n.parseVTTCues_=function(e){var t,n=!1;"function"==typeof s.a.TextDecoder?t=new s.a.TextDecoder("utf8"):(t=s.a.WebVTT.StringDecoder(),n=!0);var r=new s.a.WebVTT.Parser(s.a,s.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=function(t){e.timestampmap=t},r.onparsingerror=function(e){Wo.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var i=e.segment.map.bytes;n&&(i=cu(i)),r.parse(i)}var o=e.bytes;n&&(o=cu(o)),r.parse(o),r.flush()},n.updateTimeMapping_=function(e,t,n){var r=e.segment;if(t)if(e.cues.length){var i=e.timestampmap,o=i.MPEGTS/Me.ONE_SECOND_IN_TS-i.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=o,e.endTime+=o})),!n.syncInfo){var a=e.cues[0].startTime,s=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(a,s-r.duration)}}}else r.empty=!0},t}(Vs),hu=function(e,t){for(var n=e.cues,r=0;r<n.length;r++){var i=n[r];if(t>=i.adStartTime&&t<=i.adEndTime)return i}return null},du=[{name:"VOD",run:function(e,t,n,r,i){if(n!==1/0){return{time:0,segmentIndex:0}}return null}},{name:"ProgramDateTime",run:function(e,t,n,r,i){if(!e.datetimeToDisplayTime)return null;var o=t.segments||[],a=null,s=null;i=i||0;for(var u=0;u<o.length;u++){var c=o[u];if(c.dateTimeObject){var l=c.dateTimeObject.getTime()/1e3+e.datetimeToDisplayTime,f=Math.abs(i-l);if(null!==s&&(0===f||s<f))break;s=f,a={time:l,segmentIndex:u}}}return a}},{name:"Segment",run:function(e,t,n,r,i){var o=t.segments||[],a=null,s=null;i=i||0;for(var u=0;u<o.length;u++){var c=o[u];if(c.timeline===r&&void 0!==c.start){var l=Math.abs(i-c.start);if(null!==s&&s<l)break;(!a||null===s||s>=l)&&(s=l,a={time:c.start,segmentIndex:u})}}return a}},{name:"Discontinuity",run:function(e,t,n,r,i){var o=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var a=null,s=0;s<t.discontinuityStarts.length;s++){var u=t.discontinuityStarts[s],c=t.discontinuitySequence+s+1,l=e.discontinuities[c];if(l){var f=Math.abs(i-l.time);if(null!==a&&a<f)break;(!o||null===a||a>=f)&&(a=f,o={time:l.time,segmentIndex:u})}}return o}},{name:"Playlist",run:function(e,t,n,r,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],pu=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.datetimeToDisplayTime=null,n.logger_=ks("SyncController"),n}y()(t,e);var n=t.prototype;return n.getSyncPoint=function(e,t,n,r){var i=this.runStrategies_(e,t,n,r);return i.length?this.selectSyncPoint_(i,{key:"time",value:r}):null},n.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+ya(e,r.segmentIndex,0))},n.runStrategies_=function(e,t,n,r){for(var i=[],o=0;o<du.length;o++){var a=du[o],s=a.run(this,e,t,n,r);s&&(s.strategy=a.name,i.push({strategy:a.name,syncPoint:s}))}return i},n.selectSyncPoint_=function(e,t){for(var n=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),i=e[0].strategy,o=1;o<e.length;o++){var a=Math.abs(e[o].syncPoint[t.key]-t.value);a<r&&(r=a,n=e[o].syncPoint,i=e[o].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+i+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+"]"),n},n.saveExpiredSegmentInfo=function(e,t){for(var n=t.mediaSequence-e.mediaSequence-1;n>=0;n--){var r=e.segments[n];if(r&&void 0!==r.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:r.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},n.setDateTimeMapping=function(e){if(!this.datetimeToDisplayTime&&e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-t}},n.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,n=e.shouldSaveTimelineMapping;this.calculateSegmentTimeMapping_(t,t.timingInfo,n)&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:t.segment.start}))},n.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},n.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},n.calculateSegmentTimeMapping_=function(e,t,n){var r=e.segment,i=this.timelines[e.timeline];if(null!==e.timestampOffset)i={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=i,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+i.time+"] [mapping: "+i.mapping+"]")),r.start=e.startOfSegment,r.end=t.end+i.mapping;else{if(!i)return!1;r.start=t.start+i.mapping,r.end=t.end+i.mapping}return!0},n.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var r=0;r<t.discontinuityStarts.length;r++){var i=t.discontinuityStarts[r],o=t.discontinuitySequence+r+1,a=i-e.mediaIndex,s=Math.abs(a);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>s){var u=void 0;u=a<0?n.start-ya(t,e.mediaIndex,i):n.end+ya(t,e.mediaIndex+1,i),this.discontinuities[o]={time:u,accuracy:s}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(Wo.EventTarget),yu=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}y()(t,e);var n=t.prototype;return n.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},n.pendingTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},n.lastTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.lastTimelineChanges_[t]={type:t,from:n,to:r},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(Wo.EventTarget),mu=new gs("./decrypter-worker.worker.js",(function(e,t){var n=this;
94
- /*! @name @videojs/http-streaming @version 2.4.2 @license Apache-2.0 */!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)}}var t=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t};var r=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t},i=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),o=t.length,a=0;a<o;++a)t[a].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();
95
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */
96
- /*! @name aes-decrypter @version 3.1.0 @license Apache-2.0 */
97
- var o=null,a=function(){function e(e){var t,n,r;o||(o=function(){var e,t,n,r,i,o,a,s,u=[[[],[],[],[],[]],[[],[],[],[],[]]],c=u[0],l=u[1],f=c[4],h=l[4],d=[],p=[];for(e=0;e<256;e++)p[(d[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!f[t];t^=r||1,n=p[n]||1)for(o=(o=n^n<<1^n<<2^n<<3^n<<4)>>8^255&o^99,f[t]=o,h[o]=t,s=16843009*d[i=d[r=d[t]]]^65537*i^257*r^16843008*t,a=257*d[o]^16843008*o,e=0;e<4;e++)c[e][t]=a=a<<24^a>>>8,l[e][o]=s=s<<24^s>>>8;for(e=0;e<5;e++)c[e]=c[e].slice(0),l[e]=l[e].slice(0);return u}()),this._tables=[[o[0][0].slice(),o[0][1].slice(),o[0][2].slice(),o[0][3].slice(),o[0][4].slice()],[o[1][0].slice(),o[1][1].slice(),o[1][2].slice(),o[1][3].slice(),o[1][4].slice()]];var i=this._tables[0][4],a=this._tables[1],s=e.length,u=1;if(4!==s&&6!==s&&8!==s)throw new Error("Invalid aes key size");var c=e.slice(0),l=[];for(this._key=[c,l],t=s;t<4*s+28;t++)r=c[t-1],(t%s==0||8===s&&t%s==4)&&(r=i[r>>>24]<<24^i[r>>16&255]<<16^i[r>>8&255]<<8^i[255&r],t%s==0&&(r=r<<8^r>>>24^u<<24,u=u<<1^283*(u>>7))),c[t]=c[t-s]^r;for(n=0;t;n++,t--)r=c[3&n?t:t-4],l[n]=t<=4||n<4?r:a[0][i[r>>>24]]^a[1][i[r>>16&255]]^a[2][i[r>>8&255]]^a[3][i[255&r]]}return e.prototype.decrypt=function(e,t,n,r,i,o){var a,s,u,c,l=this._key[1],f=e^l[0],h=r^l[1],d=n^l[2],p=t^l[3],y=l.length/4-2,m=4,g=this._tables[1],v=g[0],b=g[1],_=g[2],T=g[3],w=g[4];for(c=0;c<y;c++)a=v[f>>>24]^b[h>>16&255]^_[d>>8&255]^T[255&p]^l[m],s=v[h>>>24]^b[d>>16&255]^_[p>>8&255]^T[255&f]^l[m+1],u=v[d>>>24]^b[p>>16&255]^_[f>>8&255]^T[255&h]^l[m+2],p=v[p>>>24]^b[f>>16&255]^_[h>>8&255]^T[255&d]^l[m+3],m+=4,f=a,h=s,d=u;for(c=0;c<4;c++)i[(3&-c)+o]=w[f>>>24]<<24^w[h>>16&255]<<16^w[d>>8&255]<<8^w[255&p]^l[m++],a=f,f=h,h=d,d=p,p=a},e}(),s=function(e){function t(){var t;return(t=e.call(this,i)||this).jobs=[],t.delay=1,t.timeout_=null,t}r(t,e);var n=t.prototype;return n.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},n.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(i),u=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},c=function(){function e(t,n,r,i){var o=e.STEP,a=new Int32Array(t.buffer),c=new Uint8Array(t.byteLength),l=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(a.subarray(l,l+o),n,r,c)),l=o;l<a.length;l+=o)r=new Uint32Array([u(a[l-4]),u(a[l-3]),u(a[l-2]),u(a[l-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(l,l+o),n,r,c));this.asyncStream_.push((function(){
98
- /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */
99
- var e;i(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return e.prototype.decryptChunk_=function(e,t,n,r){return function(){var i=function(e,t,n){var r,i,o,s,c,l,f,h,d,p=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),y=new a(Array.prototype.slice.call(t)),m=new Uint8Array(e.byteLength),g=new Int32Array(m.buffer);for(r=n[0],i=n[1],o=n[2],s=n[3],d=0;d<p.length;d+=4)c=u(p[d]),l=u(p[d+1]),f=u(p[d+2]),h=u(p[d+3]),y.decrypt(c,l,f,h,g,d),g[d]=u(g[d]^r),g[d+1]=u(g[d+1]^i),g[d+2]=u(g[d+2]^o),g[d+3]=u(g[d+3]^s),r=c,i=l,o=f,s=h;return m}(e,t,n);r.set(i,e.byteOffset)}},t(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();new function(e){e.onmessage=function(t){var n=t.data,r=new Uint8Array(n.encrypted.bytes,n.encrypted.byteOffset,n.encrypted.byteLength),i=new Uint32Array(n.key.bytes,n.key.byteOffset,n.key.byteLength/4),o=new Uint32Array(n.iv.bytes,n.iv.byteOffset,n.iv.byteLength/4);new c(r,i,o,(function(t,r){var i,o;e.postMessage((i={source:n.source,decrypted:r},o={},Object.keys(i).forEach((function(e){var t=i[e];ArrayBuffer.isView(t)?o[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:o[e]=t})),o),[r.buffer])}))}}(n)}()})),gu=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},vu=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},bu=function(e,t){t.activePlaylistLoader=e,e.load()},_u={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],i=t.blacklistCurrentPlaylist;vu(n,r);var o=r.activeTrack(),a=r.activeGroup(),s=(a.filter((function(e){return e.default}))[0]||a[0]).id,u=r.tracks[s];if(o!==u){for(var c in Wo.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[c].enabled=r.tracks[c]===u;r.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e];Wo.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),vu(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},Tu={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();o.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&o.load()})),t.on("loadedplaylist",(function(){o.playlist(t.media(),i),r.paused()||o.load()})),t.on("error",_u[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[e],a=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();o.playlist(e,i),o.track(a.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&o.load()})),t.on("loadedplaylist",(function(){o.playlist(t.media(),i),r.paused()||o.load()})),t.on("error",_u[e](e,n))}},wu={AUDIO:function(e,t){var n=t.vhs,r=t.sourceType,i=t.segmentLoaders[e],o=t.requestOptions,a=t.master,s=a.mediaGroups,u=a.playlists,c=t.mediaTypes[e],l=c.groups,f=c.tracks,h=t.masterPlaylistLoader;s[e]&&0!==Object.keys(s[e]).length||(s[e]={main:{default:{default:!0}}});var d=function(i){l[i]||(l[i]=[]);var a=u.filter((function(t){return t.attributes[e]===i})),c=function(u){var c=s[e][i][u];!a.filter((function(e){return e.resolvedUri!==c.resolvedUri})).length&&a.length&&delete c.resolvedUri;var d=void 0;if(d="vhs-json"===r&&c.playlists?new aa(c.playlists[0],n,o):c.resolvedUri?new aa(c.resolvedUri,n,o):c.playlists&&"dash"===r?new za(c.playlists[0],n,o,h):null,c=Wo.mergeOptions({id:u,playlistLoader:d},c),Tu[e](e,c.playlistLoader,t),l[i].push(c),void 0===f[u]){var p=new Wo.AudioTrack({id:u,kind:gu(c),enabled:!1,language:c.language,default:c.default,label:u});f[u]=p}};for(var d in s[e][i])c(d)};for(var p in s[e])d(p);i.on("error",_u[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.vhs,i=t.sourceType,o=t.segmentLoaders[e],a=t.requestOptions,s=t.master.mediaGroups,u=t.mediaTypes[e],c=u.groups,l=u.tracks,f=t.masterPlaylistLoader;for(var h in s[e])for(var d in c[h]||(c[h]=[]),s[e][h])if(!s[e][h][d].forced){var p=s[e][h][d],y=void 0;if("hls"===i)y=new aa(p.resolvedUri,r,a);else if("dash"===i){if(!p.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;y=new za(p.playlists[0],r,a,f)}else"vhs-json"===i&&(y=new aa(p.playlists?p.playlists[0]:p.resolvedUri,r,a));if(p=Wo.mergeOptions({id:d,playlistLoader:y},p),Tu[e](e,p.playlistLoader,t),c[h].push(p),void 0===l[d]){var m=n.addRemoteTextTrack({id:d,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:d},!1).track;l[d]=m}}o.on("error",_u[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,i=t.mediaTypes[e],o=i.groups,a=i.tracks;for(var s in r[e])for(var u in o[s]||(o[s]=[]),r[e][s]){var c=r[e][s][u];if(c.instreamId.match(/CC\d/)&&(o[s].push(Wo.mergeOptions({id:u},c)),void 0===a[u])){var l=n.addRemoteTextTrack({id:c.instreamId,kind:"captions",default:c.default&&c.autoselect,language:c.language,label:u},!1).track;a[u]=l}}}},Su={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if(n[r].enabled)return n[r];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if("showing"===n[r].mode||"hidden"===n[r].mode)return n[r];return null}}},Cu=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){wu[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,i=e.vhs;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var r=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,o=r.media();if(!o)return null;var a=null;return o.attributes[e]&&(a=i[o.attributes[e]]),a=a||i.main,void 0===n?a:null===n?null:a.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=Su[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,o=t.mediaTypes[e],a=o.activeTrack(),s=o.activeGroup(a),u=o.activePlaylistLoader;vu(r,o),s&&(s.playlistLoader?(r.resyncLoader(),bu(s.playlistLoader,o)):u&&i.resetEverything())}}(n,e),t[n].onGroupChanging=function(e,t){return function(){var n=t.segmentLoaders[e];n.abort(),n.pause()}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,o=t.mediaTypes[e],a=o.activeTrack(),s=o.activeGroup(a),u=o.activePlaylistLoader;if(vu(r,o),s){if("AUDIO"===e){if(!s.playlistLoader)return i.setAudio(!0),void i.resetEverything();r.setAudio(!0),i.setAudio(!1)}u!==s.playlistLoader?(r.track&&r.track(a),r.resetEverything(),bu(s.playlistLoader,o)):bu(s.playlistLoader,o)}}}(n,e)}));var o=t.AUDIO.activeGroup();if(o){var a=(o.filter((function(e){return e.default}))[0]||o[0]).id;t.AUDIO.tracks[a].enabled=!0,t.AUDIO.onTrackChanged()}n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))})),n.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanging()}))}));var s=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"}),r.trigger({type:"usage",name:"hls-audio-change"})};for(var u in r.audioTracks().addEventListener("change",s),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",(function(){r.audioTracks().removeEventListener("change",s),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[u])},ku=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],Eu=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},Iu=function(e){function t(t){var n;n=e.call(this)||this;var r,i=t.src,o=t.handleManifestRedirects,a=t.withCredentials,u=t.tech,c=t.bandwidth,l=t.externVhs,f=t.useCueTags,h=t.blacklistDuration,p=t.enableLowInitialPlaylist,y=t.sourceType,m=t.cacheEncryptionKeys,g=t.handlePartialData,v=t.experimentalBufferBasedABR;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");Ws=l,n.experimentalBufferBasedABR=Boolean(v),n.withCredentials=a,n.tech_=u,n.vhs_=u.vhs,n.sourceType_=y,n.useCueTags_=f,n.blacklistDuration=h,n.enableLowInitialPlaylist=p,n.useCueTags_&&(n.cueTagsTrack_=n.tech_.addTextTrack("metadata","ad-cues"),n.cueTagsTrack_.inBandMetadataTrackDispatchType=""),n.requestOptions_={withCredentials:a,handleManifestRedirects:o,timeout:null},n.on("error",n.pauseLoading),n.mediaTypes_=(r={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(e){r[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Hs,activeTrack:Hs,onGroupChanged:Hs,onTrackChanged:Hs}})),r),n.mediaSource=new s.a.MediaSource,n.handleDurationChange_=n.handleDurationChange_.bind(d()(n)),n.handleSourceOpen_=n.handleSourceOpen_.bind(d()(n)),n.handleSourceEnded_=n.handleSourceEnded_.bind(d()(n)),n.mediaSource.addEventListener("durationchange",n.handleDurationChange_),n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_),n.mediaSource.addEventListener("sourceended",n.handleSourceEnded_),n.seekable_=Wo.createTimeRanges(),n.hasPlayed_=!1,n.syncController_=new pu(t),n.segmentMetadataTrack_=u.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new mu,n.sourceUpdater_=new uu(n.mediaSource),n.inbandTextTracks_={},n.timelineChangeController_=new yu;var b={vhs:n.vhs_,mediaSource:n.mediaSource,currentTime:n.tech_.currentTime.bind(n.tech_),seekable:function(){return n.seekable()},seeking:function(){return n.tech_.seeking()},duration:function(){return n.duration()},hasPlayed:function(){return n.hasPlayed_},goalBufferLength:function(){return n.goalBufferLength()},bandwidth:c,syncController:n.syncController_,decrypter:n.decrypter_,sourceType:n.sourceType_,inbandTextTracks:n.inbandTextTracks_,cacheEncryptionKeys:m,handlePartialData:g,sourceUpdater:n.sourceUpdater_,timelineChangeController:n.timelineChangeController_};return n.masterPlaylistLoader_="dash"===n.sourceType_?new za(i,n.vhs_,n.requestOptions_):new aa(i,n.vhs_,n.requestOptions_),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new Vs(Wo.mergeOptions(b,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),t),n.audioSegmentLoader_=new Vs(Wo.mergeOptions(b,{loaderType:"audio"}),t),n.subtitleSegmentLoader_=new fu(Wo.mergeOptions(b,{loaderType:"vtt",featuresNativeTextTracks:n.tech_.featuresNativeTextTracks}),t),n.setupSegmentLoaderListeners_(),n.experimentalBufferBasedABR&&(n.masterPlaylistLoader_.one("loadedplaylist",(function(){return n.startABRTimer_()})),n.tech_.on("pause",(function(){return n.stopABRTimer_()})),n.tech_.on("play",(function(){return n.startABRTimer_()}))),ku.forEach((function(e){n[e+"_"]=Eu.bind(d()(n),e)})),n.logger_=ks("MPC"),n.triggeredFmp4Usage=!1,n.masterPlaylistLoader_.load(),n}y()(t,e);var n=t.prototype;return n.checkABR_=function(){var e=this.selectPlaylist();this.shouldSwitchToMedia_(e)&&this.masterPlaylistLoader_.media(e)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=s.a.setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(s.a.clearInterval(this.abrTimer_),this.abrTimer_=null)},n.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;wa(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),Cu({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(function(){e.trigger("selectedinitialmedia")}))})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){var t=e.masterPlaylistLoader_.media();if(!t){var n;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),!n||!e.shouldSwitchToMedia_(n))return;if(e.initialMedia_=n,e.masterPlaylistLoader_.media(e.initialMedia_),!("vhs-json"===e.sourceType_&&e.initialMedia_.segments))return;t=e.initialMedia_}e.handleUpdatedMediaPlaylist(t)})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;wa(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var t=e.masterPlaylistLoader_.media();e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),e.tech_.trigger("playliststuck"))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))},n.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},n.triggerPresenceUsage_=function(e,t){var n=e.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var o in n.AUDIO)for(var a in n.AUDIO[o]){n.AUDIO[o][a].uri||(r=!1)}r&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(n.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),Ws.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),i.length&&Object.keys(n.AUDIO[i[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},n.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media(),n=this.tech_.buffered();return function(e){var t=e.currentPlaylist,n=e.nextPlaylist,r=e.forwardBuffer,i=e.bufferLowWaterLine,o=e.bufferHighWaterLine,a=e.duration,s=e.experimentalBufferBasedABR,u=e.log;if(!n)return Wo.log.warn("We received no playlist to switch to. Please check your stream."),!1;var c="allowing switch "+(t&&t.id||"null")+" -> "+n.id;if(!t||!t.endList)return u(c+" as current playlist "+(t?"is live":"is not set")),!0;if(n.id===t.id)return!1;var l=s?qa.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:qa.MAX_BUFFER_LOW_WATER_LINE;if(a<l)return u(c+" as duration < max low water line ("+a+" < "+l+")"),!0;var f=n.attributes.BANDWIDTH,h=t.attributes.BANDWIDTH;if(f<h&&(!s||r<o)){var d=c+" as next bandwidth < current bandwidth ("+f+" < "+h+")";return s&&(d+=" and forwardBuffer < bufferHighWaterLine ("+r+" < "+o+")"),u(d),!0}if((!s||f>h)&&r>=i){var p=c+" as forwardBuffer >= bufferLowWaterLine ("+r+" >= "+i+")";return s&&(p+=" and next bandwidth > current bandwidth ("+f+" > "+h+")"),u(p),!0}return u("not "+c+" as no switching criteria met"),!1}({currentPlaylist:t,nextPlaylist:e,forwardBuffer:n.length?n.end(n.length-1)-this.tech_.currentTime():0,bufferLowWaterLine:this.bufferLowWaterLine(),bufferHighWaterLine:this.bufferHighWaterLine(),duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist();e.shouldSwitchToMedia_(t)&&e.masterPlaylistLoader_.media(t),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")}))),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("appenderror",(function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("ended",(function(){e.logger_("main segment loader ended"),e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))}));var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()}))},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())},n.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetEverything((function(){Wo.browser.IE_VERSION||Wo.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())})))},n.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},n.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var n=this.seekable();if(!n.length)return!1;if(Wo.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(n.end(0)),e.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(n.end(0))}return this.hasPlayed_=!0,this.load(),!0},n.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")},n.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(e&&e.length){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},n.handleDurationChange_=function(){this.tech_.trigger("durationchange")},n.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=!this.mainSegmentLoader_.currentMediaInfo_||this.mainSegmentLoader_.currentMediaInfo_.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},n.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var n=Ws.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=.1;var o=i.end(i.length-1);return o-r<=.1&&n-o<=.1},n.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var n=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!n)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));var r=this.masterPlaylistLoader_.master.playlists,i=r.filter(_a),o=1===i.length&&i[0]===n;if(1===r.length&&t!==1/0)return Wo.log.warn("Problem encountered with playlist "+n.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(o);if(o){var a=!1;r.forEach((function(e){if(e!==n){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(a=!0,delete e.excludeUntil)}})),a&&(Wo.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}n.excludeUntil=Date.now()+1e3*t,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var s=this.selectPlaylist();if(!s)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var u=e.internal?this.logger_:Wo.log.warn,c=e.message?" "+e.message:"";u((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+c+" Switching to playlist "+s.id+"."),s.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),s.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var l=s.targetDuration/2*1e3||5e3,f="number"==typeof s.lastRequest&&Date.now()-s.lastRequest<=l;return this.masterPlaylistLoader_.media(s,o||f)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n=this,r=[],i="all"===e;(i||"main"===e)&&r.push(this.masterPlaylistLoader_);var o=[];(i||"audio"===e)&&o.push("AUDIO"),(i||"subtitle"===e)&&(o.push("CLOSED-CAPTIONS"),o.push("SUBTITLES")),o.forEach((function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&r.push(t)})),["main","audio","subtitle"].forEach((function(t){var i=n[t+"SegmentLoader_"];!i||e!==t&&"all"!==e||r.push(i)})),r.forEach((function(e){return t.forEach((function(t){"function"==typeof e[t]&&e[t]()}))}))},n.setCurrentTime=function(e){var t=ua(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Ws.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.duration());if(null!==n){var r=this.masterPlaylistLoader_.master.suggestedPresentationDelay,i=Ws.Playlist.seekable(t,n,r);if(0!==i.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=Ws.Playlist.seekable(t,n,r)).length)return}var o,a;this.seekable_&&this.seekable_.length&&(o=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>i.end(0)||i.start(0)>e.end(0)?this.seekable_=i:this.seekable_=Wo.createTimeRanges([[e.start(0)>i.start(0)?e.start(0):i.start(0),e.end(0)<i.end(0)?e.end(0):i.end(0)]]):this.seekable_=i,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===o&&this.seekable_.start(0)===a||(this.logger_("seekable updated ["+la(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},n.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var n=this.tech_.buffered(),r=Ws.Playlist.duration(this.masterPlaylistLoader_.media());n.length>0&&(r=Math.max(r,n.end(n.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}},n.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var r in n)n[r].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader;return!(!this.mainSegmentLoader_.currentMediaInfo_||e&&!this.audioSegmentLoader_.currentMediaInfo_)},n.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.currentMediaInfo_||{},audio:this.audioSegmentLoader_.currentMediaInfo_||{}};t.video=t.main;var n=Cs(this.master(),this.media()),r={},i=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(r.video=n.video||t.main.videoCodec||Ue.DEFAULT_VIDEO_CODEC),t.main.isMuxed&&(r.video+=","+(n.audio||t.main.audioCodec||Ue.DEFAULT_AUDIO_CODEC)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||i)&&(r.audio=n.audio||t.main.audioCodec||t.audio.audioCodec||Ue.DEFAULT_AUDIO_CODEC,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),r.audio||r.video){var o,a={};if(["video","audio"].forEach((function(e){if(r.hasOwnProperty(e)&&(i=t[e].isFmp4,s=r[e],!(i?Object(Ue.browserSupportsCodec)(s):Object(Ue.muxerSupportsCodec)(s)))){var n=t[e].isFmp4?"browser":"muxer";a[n]=a[n]||[],a[n].push(r[e]),"audio"===e&&(o=n)}var i,s})),i&&o&&this.media().attributes.AUDIO){var s=this.media().attributes.AUDIO;this.master().playlists.forEach((function(t){(t.attributes&&t.attributes.AUDIO)===s&&t!==e.media()&&(t.excludeUntil=1/0)})),this.logger_("excluding audio group "+s+" as "+o+' does not support codec(s): "'+r.audio+'"')}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var u=[];if(["video","audio"].forEach((function(t){var n=(Object(Ue.parseCodecs)(e.sourceUpdater_.codecs[t]||"")[t]||{}).type,i=(Object(Ue.parseCodecs)(r[t]||"")[t]||{}).type;n&&i&&n.toLowerCase()!==i.toLowerCase()&&u.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+r[t]+'"')})),u.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+u.join(", ")+".",blacklistDuration:1/0,internal:!0})}return r}var c=Object.keys(a).reduce((function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+a[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:c,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach((function(r){var i=t[r];if(-1===n.indexOf(i.id)){n.push(i.id);var o=Cs(e.master,i),a=[];!o.audio||Object(Ue.muxerSupportsCodec)(o.audio)||Object(Ue.browserSupportsCodec)(o.audio)||(i.excludeUntil=1/0,a.push("audio codec "+o.audio)),!o.video||Object(Ue.muxerSupportsCodec)(o.video)||Object(Ue.browserSupportsCodec)(o.video)||(i.excludeUntil=1/0,a.push("video codec "+o.video)),o.text&&"stpp.ttml.im1t"===o.text&&(i.excludeUntil=1/0,a.push("text codec "+o.text)),a.length&&e.logger_("excluding "+i.id+" as codecs "+a.join(", ")+" are unsupported")}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=Object(Ue.parseCodecs)(e),r=Object.keys(n).length;this.master().playlists.forEach((function(e){if(e.excludeUntil!==1/0){var i={},o=2,a=[],s=Cs(t.masterPlaylistLoader_.master,e);if(s.audio||s.video){var u=[s.video,s.audio].filter(Boolean).join(",");i=Object(Ue.parseCodecs)(u),o=Object.keys(i).length}o!==r&&(a.push('codec count "'+o+'" !== "'+r+'"'),e.excludeUntil=1/0),t.sourceUpdater_.canChangeType()||(i.video&&n.video&&i.video.type.toLowerCase()!==n.video.type.toLowerCase()&&(a.push('video codec "'+i.video.type+'" !== "'+n.video.type+'"'),e.excludeUntil=1/0),i.audio&&n.audio&&i.audio.type.toLowerCase()!==n.audio.type.toLowerCase()&&(e.excludeUntil=1/0,a.push('audio codec "'+i.audio.type+'" !== "'+n.audio.type+'"'))),a.length&&t.logger_("blacklisting "+e.id+": "+a.join(" && "))}}))},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t,n){if(void 0===n&&(n=0),e.segments)for(var r,i=n,o=0;o<e.segments.length;o++){var a=e.segments[o];if(r||(r=hu(t,i+a.duration/2)),r){if("cueIn"in a){r.endTime=i,r.adEndTime=i,i+=a.duration,r=null;continue}if(i<r.endTime){i+=a.duration;continue}r.endTime+=a.duration}else if("cueOut"in a&&((r=new s.a.VTTCue(i,i+a.duration,a.cueOut)).adStartTime=i,r.adEndTime=i+parseFloat(a.cueOut),t.addCue(r)),"cueOutCont"in a){var u=a.cueOutCont.split("/").map(parseFloat),c=u[0],l=u[1];(r=new s.a.VTTCue(i,i+a.duration,"")).adStartTime=i-c,r.adEndTime=r.adStartTime+l,t.addCue(r)}i+=a.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var e=this.tech_.currentTime(),t=qa.GOAL_BUFFER_LENGTH,n=qa.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,qa.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)},n.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=qa.BUFFER_LOW_WATER_LINE,n=qa.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,qa.MAX_BUFFER_LOW_WATER_LINE),i=Math.max(t,qa.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?i:r)},n.bufferHighWaterLine=function(){return qa.BUFFER_HIGH_WATER_LINE},t}(Wo.EventTarget),Ou=function(e,t,n){var r,i,o,a=e.masterPlaylistController_,s=a[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(a);if(t.attributes.RESOLUTION){var u=t.attributes.RESOLUTION;this.width=u.width,this.height=u.height}this.bandwidth=t.attributes.BANDWIDTH,this.codecs=Cs(a.master(),t),this.playlist=t,this.id=n,this.enabled=(r=e.playlists,i=t.id,o=s,function(e){var t=r.master.playlists[i],n=ba(t),a=_a(t);return void 0===e?a:(e?delete t.disabled:t.disabled=!0,e===a||n||(o(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},xu=["seeking","seeked","pause","playing","error"],Pu=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=ks("PlaybackWatcher"),this.logger_("initialize");var n=function(){return t.monitorCurrentTime_()},r=function(){return t.techWaiting_()},i=function(){return t.cancelTimer_()},o=function(){return t.fixesBadSeeks_()},a=this.masterPlaylistController_,u=["main","subtitle","audio"],c={};u.forEach((function(e){c[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},a[e+"SegmentLoader_"].on("appendsdone",c[e].updateend),a[e+"SegmentLoader_"].on("playlistupdate",c[e].reset),t.tech_.on(["seeked","seeking"],c[e].reset)})),this.tech_.on("seekablechanged",o),this.tech_.on("waiting",r),this.tech_.on(xu,i),this.tech_.on("canplay",n),this.dispose=function(){t.logger_("dispose"),t.tech_.off("seekablechanged",o),t.tech_.off("waiting",r),t.tech_.off(xu,i),t.tech_.off("canplay",n),u.forEach((function(e){a[e+"SegmentLoader_"].off("appendsdone",c[e].updateend),a[e+"SegmentLoader_"].off("playlistupdate",c[e].reset),t.tech_.off(["seeked","seeking"],c[e].reset)})),t.checkCurrentTimeTimeout_&&s.a.clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&s.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=s.a.setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,n=t[e+"SegmentLoader_"],r=n.buffered_(),i=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this[e+"Buffered_"],r);this[e+"Buffered_"]=r,i?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:n.playlist_&&n.playlist_.id,buffered:fa(r)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&t.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+.1>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),n=this.tech_.currentTime();this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,n)){var r=t.start(0);e=r+(r===t.end(0)?0:.1)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+la(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;var i=this.tech_.buffered();return!!function(e){var t=e.buffered,n=e.targetDuration,r=e.currentTime;return!!t.length&&(!(t.end(0)-t.start(0)<2*n)&&(!(r>t.start(0))&&t.start(0)-r<n))}({buffered:i,targetDuration:this.media().targetDuration,currentTime:n})&&(e=i.start(0)+.1,this.logger_("Buffered region starts ("+i.start(0)+") just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=ua(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+n.start(0)+" -> "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var o=ca(i,t);if(o.length>0){var a=o.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+o.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,r){if(void 0===r&&(r=!1),!e.length)return!1;var i=e.end(e.length-1)+.1;return!n.endList&&r&&(i=e.end(e.length-1)+3*n.targetDuration),t>i},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t=e.videoBuffered,n=e.audioBuffered,r=e.currentTime;if(t){var i;if(t.length&&n.length){var o=ua(t,r-3),a=ua(t,r),s=ua(n,r);s.length&&!a.length&&o.length&&(i={start:o.end(0),end:s.end(0)})}else{ca(t,r).length||(i=this.gapFromVideoUnderflow_(t,r))}return!!i&&(this.logger_("Encountered a gap in video from "+i.start+" to "+i.end+". Seeking to current time "+r),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=ca(t,n);this.cancelTimer_(),0!==r.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+1/30),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},t.gapFromVideoUnderflow_=function(e,t){for(var n=function(e){if(e.length<2)return Wo.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var r=e.end(n-1),i=e.start(n);t.push([r,i])}return Wo.createTimeRanges(t)}(e),r=0;r<n.length;r++){var i=n.start(r),o=n.end(r);if(t-i<4&&t-i>2)return{start:i,end:o}}return null},e}(),Au={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Lu=function(e){!function e(t,n){var r=0,i=0,o=Wo.mergeOptions(Au,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var a=function(){i&&t.currentTime(i)},s=function(e){null!=e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",a),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){return Date.now()-r<1e3*o.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):o.getSource&&"function"==typeof o.getSource?(r=Date.now(),o.getSource.call(t,s)):void Wo.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},c=function e(){t.off("loadedmetadata",a),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",c),t.reloadSourceOnError=function(n){c(),e(t,n)}}(this,e)},Ru={PlaylistLoader:aa,Playlist:Sa,utils:Ma,STANDARD_PLAYLIST_SELECTOR:Ls,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(Sa.isEnabled);return xs(t,(function(e,t){return Ps(e,t)})),t.filter((function(t){return!!Cs(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:Ls,movingAverageBandwidthSelector:function(e){var t=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var n=this.useDevicePixelRatio&&s.a.devicePixelRatio||1;return t<0&&(t=this.systemBandwidth),t=e*this.systemBandwidth+(1-e)*t,As(this.playlists.master,t,parseInt(Os(this.tech_.el(),"width"),10)*n,parseInt(Os(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions)}},comparePlaylistBandwidth:Ps,comparePlaylistResolution:function(e,t){var n,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||s.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),n===(r=r||s.a.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-r},xhr:Ia()};Object.keys(qa).forEach((function(e){Object.defineProperty(Ru,e,{get:function(){return Wo.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),qa[e]},set:function(t){Wo.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?Wo.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):qa[e]=t}})}));var ju=function(e,t){for(var n=t.media(),r=-1,i=0;i<e.length;i++)if(e[i].id===n.id){r=i;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};Ru.canPlaySource=function(){return Wo.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Du=function(e){var t=e.player,n=e.sourceKeySystems,r=e.audioMedia,i=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var o=function(e,t){return e.reduce((function(e,n){if(!n.contentProtection)return e;var r=t.reduce((function(e,t){var r=n.contentProtection[t];return r&&r.pssh&&(e[t]={pssh:r.pssh}),e}),{});return Object.keys(r).length&&e.push(r),e}),[])}(r?i.concat([r]):i,Object.keys(n)),a=[],s=[];return o.forEach((function(e){s.push(new Promise((function(e,n){t.tech_.one("keysessioncreated",e)}))),a.push(new Promise((function(n,r){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?r(e):n()}))})))})),Promise.race([Promise.all(a),Promise.race(s)])},Mu=function(e){var t=e.player,n=function(e,t,n){if(!e)return e;var r={video:t&&t.attributes&&t.attributes.CODECS,audio:n&&n.attributes&&n.attributes.CODECS};!r.audio&&r.video&&r.video.split(",").length>1&&r.video.split(",").forEach((function(e){e=e.trim(),Object(Ue.isAudioCodec)(e)?r.audio=e:Object(Ue.isVideoCodec)(e)&&(r.video=e)}));var i=r.video?'video/mp4;codecs="'+r.video+'"':null,o=r.audio?'audio/mp4;codecs="'+r.audio+'"':null,a={};for(var s in e)a[s]={audioContentType:o,videoContentType:i},t.contentProtection&&t.contentProtection[s]&&t.contentProtection[s].pssh&&(a[s].pssh=t.contentProtection[s].pssh),"string"==typeof e[s]&&(a[s].url=e[s]);return Wo.mergeOptions(e,a)}(e.sourceKeySystems,e.media,e.audioMedia);return!!n&&(t.currentSource().keySystems=n,!(n&&!t.eme)||(Wo.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},Nu=function(){if(!s.a.localStorage)return null;var e=s.a.localStorage.getItem("videojs-vhs");if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};Ru.supportsNativeHls=function(){if(!c.a||!c.a.createElement)return!1;var e=c.a.createElement("video");if(!Wo.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Ru.supportsNativeDash=!!(c.a&&c.a.createElement&&Wo.getTech("Html5").isSupported())&&/maybe|probably/i.test(c.a.createElement("video").canPlayType("application/dash+xml")),Ru.supportsTypeNatively=function(e){return"hls"===e?Ru.supportsNativeHls:"dash"===e&&Ru.supportsNativeDash},Ru.isSupported=function(){return Wo.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Bu=function(e){function t(t,n,r){var i;if(i=e.call(this,n,Wo.mergeOptions(r.hls,r.vhs))||this,r.hls&&Object.keys(r.hls).length&&Wo.log.warn("Using hls options is deprecated. Use vhs instead."),i.logger_=ks("VhsHandler"),n.options_&&n.options_.playerId){var o=Wo(n.options_.playerId);o.hasOwnProperty("hls")||Object.defineProperty(o,"hls",{get:function(){return Wo.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"hls-player-access"}),d()(i)},configurable:!0}),o.hasOwnProperty("vhs")||Object.defineProperty(o,"vhs",{get:function(){return Wo.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"vhs-player-access"}),d()(i)},configurable:!0}),o.hasOwnProperty("dash")||Object.defineProperty(o,"dash",{get:function(){return Wo.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),d()(i)},configurable:!0}),i.player_=o}if(i.tech_=n,i.source_=t,i.stats={},i.ignoreNextSeekingEvent_=!1,i.setOptions_(),i.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(i.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return i.on(c.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=c.a.fullscreenElement||c.a.webkitFullscreenElement||c.a.mozFullScreenElement||c.a.msFullscreenElement;t&&t.contains(i.tech_.el())&&i.masterPlaylistController_.smoothQualityChange_()})),i.on(i.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),i.on(i.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),i.on(i.tech_,"play",i.play),i}y()(t,e);var n=t.prototype;return n.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.handlePartialData=this.options_.handlePartialData||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=Nu();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=qa.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===qa.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","handlePartialData","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta"].forEach((function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},n.src=function(e,t){var n=this;if(e){var r;this.setOptions_(),this.options_.src=0===(r=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(r.substring(r.indexOf(",")+1)):r,this.options_.tech=this.tech_,this.options_.externVhs=Ru,this.options_.sourceType=Object(B.simpleTypeFromSourceType)(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.masterPlaylistController_=new Iu(this.options_);var i=Wo.mergeOptions({liveRangeSafeTimeDelta:.1},this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new Pu(i),this.masterPlaylistController_.on("error",(function(){var e=Wo.players[n.tech_.options_.playerId],t=n.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var o=this.options_.experimentalBufferBasedABR?Ru.movingAverageBandwidthSelector(.55):Ru.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):o.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Ru.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){Wo.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return fa(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return fa(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(!s.a.localStorage)return!1;var t=Nu();t=t?Wo.mergeOptions(t,e):e;try{s.a.localStorage.setItem("videojs-vhs",JSON.stringify(t))}catch(e){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e,t;t=(e=n).playlists,e.representations=function(){return t&&t.master&&t.master.playlists?t.master.playlists.filter((function(e){return!ba(e)})).map((function(t,n){return new Ou(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){n.setupEme_()})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=s.a.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=Mu({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});11!==Wo.browser.IE_VERSION&&n?(this.logger_("waiting for EME key session creation"),Du({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(t){e.logger_("error while creating EME key session",t),e.player_.error({message:"Failed to initialize media keys for EME",code:3})}))):this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=Wo.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,n;t=e.qualityLevels_,(n=e).representations().forEach((function(e){t.addQualityLevel(e)})),ju(t,n.playlists)})),this.playlists.on("mediachange",(function(){ju(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":"2.4.2","mux.js":"5.8.0","mpd-parser":"0.15.0","m3u8-parser":"4.5.0","aes-decrypter":"3.1.0"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return uu.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&s.a.URL.revokeObjectURL&&(s.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),e.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return Na({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=2),Ba({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(Wo.getComponent("Component")),Uu={name:"videojs-http-streaming",VERSION:"2.4.2",canHandleSource:function(e,t){void 0===t&&(t={});var n=Wo.mergeOptions(Wo.options,t);return Uu.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var r=Wo.mergeOptions(Wo.options,n);return t.vhs=new Bu(e,t,r),Wo.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return Wo.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=Ia(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){void 0===t&&(t={});var n=Wo.mergeOptions(Wo.options,t).vhs.overrideNative,r=void 0===n?!Wo.browser.IS_ANY_SAFARI:n,i=Object(B.simpleTypeFromSourceType)(e);return i&&(!Ru.supportsTypeNatively(i)||r)?"maybe":""}};Object(Ue.browserSupportsCodec)("avc1.4d400d,mp4a.40.2")&&Wo.getTech("Html5").registerSourceHandler(Uu,0),Wo.VhsHandler=Bu,Object.defineProperty(Wo,"HlsHandler",{get:function(){return Wo.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Bu},configurable:!0}),Wo.VhsSourceHandler=Uu,Object.defineProperty(Wo,"HlsSourceHandler",{get:function(){return Wo.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Uu},configurable:!0}),Wo.Vhs=Ru,Object.defineProperty(Wo,"Hls",{get:function(){return Wo.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Ru},configurable:!0}),Wo.use||(Wo.registerComponent("Hls",Ru),Wo.registerComponent("Vhs",Ru)),Wo.options.vhs=Wo.options.vhs||{},Wo.options.hls=Wo.options.hls||{},Wo.registerPlugin?Wo.registerPlugin("reloadSourceOnError",Lu):Wo.plugin("reloadSourceOnError",Lu);var Fu=Wo,Vu=n(1051),Hu=n.n(Vu);function Wu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var zu=function e(t){var n=this;if(Fu.browser.IS_IE8)for(var r in n=Hu.a.createElement("custom"),e.prototype)"constructor"!==r&&(n[r]=e.prototype[r]);return n.id=t.id,n.label=n.id,n.width=t.width,n.height=t.height,n.bitrate=t.bandwidth,n.enabled_=t.enabled,Object.defineProperty(n,"enabled",{get:function(){return n.enabled_()},set:function(e){n.enabled_(e)}}),n},qu=function(e){
100
- /*! @name videojs-contrib-quality-levels @version 2.0.9 @license Apache-2.0 */
101
- var t,n;function r(){var t,n=Wu(Wu(t=e.call(this)||this));if(Fu.browser.IS_IE8)for(var i in n=Hu.a.createElement("custom"),r.prototype)"constructor"!==i&&(n[i]=r.prototype[i]);return n.levels_=[],n.selectedIndex_=-1,Object.defineProperty(n,"selectedIndex",{get:function(){return n.selectedIndex_}}),Object.defineProperty(n,"length",{get:function(){return n.levels_.length}}),n||Wu(t)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var n=this.levels_.length;return t=new zu(e),""+n in this||Object.defineProperty(this,n,{get:function(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t},i.removeQualityLevel=function(e){for(var t=null,n=0,r=this.length;n<r;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},i.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var r=this[t];if(r.id===e)return r}return null},i.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},r}(Fu.EventTarget);for(var Gu in qu.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},qu.prototype.allowedEvents_)qu.prototype["on"+Gu]=null;var Yu=Fu.registerPlugin||Fu.plugin,Xu=function(e){return t=this,Fu.mergeOptions({},e),n=t.qualityLevels,r=new qu,t.on("dispose",(function e(){r.dispose(),t.qualityLevels=n,t.off("dispose",e)})),t.qualityLevels=function(){return r},t.qualityLevels.VERSION="2.0.9",r;var t,n,r};Yu("qualityLevels",Xu),Xu.VERSION="2.0.9";var Ku=n(1111),$u="cv-persisttest",Qu=function(){try{return window.localStorage.setItem($u,"cv-player-storage-test"),window.localStorage.removeItem($u),!0}catch(e){return!1}},Zu=function(e){return window.localStorage.getItem(e)},Ju=function(e,t){window.localStorage.setItem(e,t)},ec=function(e){window.localStorage.removeItem(e)};function tc(e){return(tc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nc(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)}}function rc(e,t){return(rc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ic(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ac(e);if(t){var i=ac(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oc(this,n)}}function oc(e,t){return!t||"object"!==tc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ac(e){return(ac=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sc=Fu.getPlugin("plugin"),uc="cvplayer-mute",cc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rc(e,t)}(o,e);var t,n,r,i=ic(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).player.ready((function(){return t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){var e=this;if(Qu()){this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.one("dispose",(function(){e.player.off("volumechange",e.saveVolumeState)}));var t=Zu("cvplayer-volume"),n=Zu(uc);t&&this.player.volume(+t),n&&this.player.muted("true"===n)}}},{key:"saveVolumeState",value:function(){Ju("cvplayer-volume",this.player.volume().toString()),Ju(uc,this.player.muted().toString())}}])&&nc(t.prototype,n),r&&nc(t,r),o}(sc);function lc(e){return(lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fc(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)}}function hc(e,t){return(hc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=mc(e);if(t){var i=mc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pc(this,n)}}function pc(e,t){return!t||"object"!==lc(t)&&"function"!=typeof t?yc(e):t}function yc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mc(e){return(mc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistVolumePlugin",cc);var gc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hc(e,t)}(o,e);var t,n,r,i=dc(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).hasScreenOrientation()&&t.player.supportsFullScreen()?(t.onRotate=t.onRotate.bind(yc(t)),t.onFullscreenChange=t.onFullscreenChange.bind(yc(t)),t.player.ready((function(){return t.initialize()})),t):pc(t)}return t=o,(n=[{key:"initialize",value:function(){var e=this;window.addEventListener("orientationchange",this.onRotate),this.hasScreenLock()&&this.player.on("fullscreenchange",this.onFullscreenChange),this.one("dispose",(function(){window.removeEventListener("orientationchange",e.onRotate),e.hasScreenLock()&&e.player.off("fullscreenchange",e.onFullscreenChange)}))}},{key:"onFullscreenChange",value:function(){!this.getAngle()&&this.player.isFullscreen()?window.screen.orientation.lock("portrait-primary"):window.screen.orientation.unlock()}},{key:"onRotate",value:function(){var e=this.getAngle();90===e||-90===e||270===e?this.player.requestFullscreen():this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"hasScreenOrientation",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"hasScreenLock",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"getAngle",value:function(){var e,t;return"number"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.angle)?window.screen.orientation.angle:0}}])&&fc(t.prototype,n),r&&fc(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("fullscreenOnRotatePlugin",gc);var vc="\n <svg viewBox='0 0 434 71'>\n <g>\n <path fill='#FFFFFF' d='M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z'/>\n <path fill='#F8981D' d='M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z'/>\n </g>\n </svg>\n";n(1112);function bc(e){return(bc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _c(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)}}function Tc(e,t){return(Tc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kc(e);if(t){var i=kc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sc(this,n)}}function Sc(e,t){return!t||"object"!==bc(t)&&"function"!=typeof t?Cc(e):t}function Cc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kc(e){return(kc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ec=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tc(e,t)}(o,e);var t,n,r,i=wc(o);function o(e,t){var n,r,a,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update=(r=n.update.bind(Cc(n)),a=1e3,s=window.performance.now(),function(){var e=window.performance.now();e-s>=a&&(r.apply(void 0,arguments),s=e)}),e.on("timeupdate",n.update),e.one("dispose",(function(){e.off("timeupdate",n.update),n.el_.removeEventListener("click",n.pause)})),n}return t=o,(n=[{key:"update",value:function(){var e=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(e)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var e={innerHTML:vc,className:this.buildCSSClass()},t={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=Fu.dom.createEl("a",e,t);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&_c(t.prototype,n),r&&_c(t,r),o}(Fu.getComponent("Button"));function Ic(e){return(Ic="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Oc(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)}}function xc(e,t){return(xc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Lc(e);if(t){var i=Lc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ac(this,n)}}function Ac(e,t){return!t||"object"!==Ic(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Lc(e){return(Lc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ec.prototype.controlText_="Open in ClickView",Fu.registerComponent("OpenExternallyButton",Ec);var Rc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xc(e,t)}(o,e);var t,n,r,i=Pc(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){var e=this.player.getChild("collapserator"),t=e.getChild("customControlSpacer"),n=e.children_.indexOf(t);e.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&Oc(t.prototype,n),r&&Oc(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("openExternallyPlugin",Rc);n(1113);function jc(e){return(jc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dc(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)}}function Mc(e,t,n){return(Mc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Fc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Nc(e,t){return(Nc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Fc(e);if(t){var i=Fc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Uc(this,n)}}function Uc(e,t){return!t||"object"!==jc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fc(e){return(Fc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nc(e,t)}(o,e);var t,n,r,i=Bc(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(Mc(Fc(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Mc(Fc(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"setUi",value:function(e,t){var n=this,r=e>0,i=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(i,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*e,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){n.removeText()}),t)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Dc(t.prototype,n),r&&Dc(t,r),o}(Fu.getComponent("component"));function Hc(e){return(Hc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wc(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)}}function zc(e,t,n){return(zc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function qc(e,t){return(qc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xc(e);if(t){var i=Xc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yc(this,n)}}function Yc(e,t){return!t||"object"!==Hc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xc(e){return(Xc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("TouchControls",Vc);var Kc=Fu.getPlugin("plugin"),$c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qc(e,t)}(o,e);var t,n,r,i=Gc(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).doubleTouchCount=0,t.seekStartTime=0,t.directionModifier=0,t.bindFunctions(),t.player.ready((function(){return t.initialize()})),t}return t=o,(n=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this)}},{key:"initialize",value:function(){var e=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){e.player.off("ready",e.reBindEventListeners)})),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.on(this.tech,"touchstart",this.onTouchStart),this.on(this.tech,"touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&(this.off(this.tech,"touchstart",this.onTouchStart),this.off(this.tech,"touchend",this.onTouchEnd))}},{key:"dispose",value:function(){zc(Xc(o.prototype),"dispose",this).call(this),this.unBindEventListeners()}},{key:"onTouchStart",value:function(e){this.touchStartTime=e.timeStamp}},{key:"onTouchEnd",value:function(e){var t=this;if(e.changedTouches.length){if(e.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(e),void(this.lastTouchTime=e.timeStamp);this.resetProperties(),this.lastTouchTime=e.timeStamp,e.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){t.doubleTouchCount||(t.player.paused()?t.player.play():t.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(e){var t=this.player.el().getBoundingClientRect(),n=t.left+t.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),e.changedTouches[0].pageX<n?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}])&&Wc(t.prototype,n),r&&Wc(t,r),o}(Kc);function Qc(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)}}Fu.registerPlugin("touchControls",$c);var Zc=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=n.id,this.plugin=t,this.source=n,this.enabled=this.enabled.bind(this)}var t,n,r;return t=e,(n=[{key:"enabled",value:function(e){return void 0===e?this.plugin.currentSource===this.source:(e&&this.plugin.setSource(this.source.id),e)}}])&&Qc(t.prototype,n),r&&Qc(t,r),e}();function Jc(e){return(Jc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function el(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)}}function tl(e,t){return(tl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=il(e);if(t){var i=il(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return rl(this,n)}}function rl(e,t){return!t||"object"!==Jc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function il(e){return(il=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ol=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tl(e,t)}(o,e);var t,n,r,i=nl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options_=t,n.player.ready((function(){return n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources)}},{key:"currentSource",get:function(){return this._currentSource}},{key:"setSource",value:function(e){var t=this,n=this.getSourceById(e);if(null===n)return this.currentSource;var r=this.player.currentTime(),i=!this.player.paused();return this._currentSource=n,this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",(function(){t.player.currentTime()!==r&&t.player.currentTime(r),i&&t.player.play()})),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(e){return this.sources.find((function(t){return t.id===e}))}},{key:"sortSources",value:function(e){return e.sort((function(e,t){return e.id===t.id?0:+e.id>+t.id?-1:1}))}},{key:"populateSources",value:function(e){var t=this,n=null;(e=this.sortSources(e)).forEach((function(e){t.qualityLevels.addQualityLevel(new Zc(t,e)),t.sources.push(e),t.trigger({event:"addsource",source:e}),e.default&&(n=e)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(e){for(var t=this.qualityLevels,n=-1,r=0;r<t.length;r++)if(t[r].id===e.id){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})}}])&&el(t.prototype,n),r&&el(t,r),o}(Fu.getPlugin("plugin"));function al(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)}}Fu.registerPlugin("progressiveFiles",ol);var sl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},ul=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.name,this.playbackProfile=t.playbackProfile,this.address=new URL(t.httpsAddress)}var t,n,r;return t=e,(n=[{key:"getUrl",value:function(e){return e?this.address+"cache?file="+encodeURIComponent(e):null}},{key:"ping",value:function(){return sl(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new AbortController,n=setTimeout((function(){return t.abort()}),1e3),e.prev=3,e.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:t.signal});case 6:return r=e.sent,e.next=9,r.text();case 9:return i=e.sent,clearTimeout(n),e.abrupt("return","PONG"===i);case 14:return e.prev=14,e.t0=e.catch(3),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,this,[[3,14]])})))}}])&&al(t.prototype,n),r&&al(t,r),e}();function cl(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)}}var ll=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(e,t){var n=e.getQualityLevelById(t);if(n||(n=this.getNextBestQuality(e,t)),!n)return null;for(var r=0;r<e.length;r++){var i=e[r];i.enabled=n.id===i.id}return n}},{key:"getNextBestQuality",value:function(e,t){var n=this.getKnownProfiles(),r=n.indexOf(t);if(r>=0){for(var i=r+1;i<n.length;i++){var o=n[i],a=e.getQualityLevelById(o);if(a)return a}for(var s=r-1;s>0;s--){var u=n[s],c=e.getQualityLevelById(u);if(c)return c}}return null}}],(n=null)&&cl(t.prototype,n),r&&cl(t,r),e}();function fl(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)}}var hl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},dl=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.logger=Fu.log.createLogger("localcache")}var t,n,r;return t=e,(n=[{key:"setSource",value:function(e,t){return hl(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.player.localCache||void 0===(null==e?void 0:e.src)){n.next=5;break}return n.next=3,this.player.localCache().getActiveLocalCache();case 3:null!==(r=n.sent)&&(this.logger.debug("Using Local Cache",r),e.src=r.getUrl(e.src));case 5:t(null,e);case 6:case"end":return n.stop()}}),n,this)})))}}])&&fl(t.prototype,n),r&&fl(t,r),e}();Fu.use("*",(function(e){return new dl(e)}));n(1114);function pl(e){return(pl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yl(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)}}function ml(e,t,n){return(ml="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Tl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function gl(e,t){return(gl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Tl(e);if(t){var i=Tl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bl(this,n)}}function bl(e,t){return!t||"object"!==pl(t)&&"function"!=typeof t?_l(e):t}function _l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tl(e){return(Tl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Sl='<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.9"><g id="Local-Cache" transform="translate(2.000000, 2.000000)"><rect id="Rectangle" fill="#FFFFFF" x="0" y="2.4" width="18.8" height="15.2"></rect><ellipse id="Oval" fill="#FFFFFF" cx="9.4" cy="2.4" rx="9.4" ry="2.4"></ellipse><ellipse id="Oval-Copy" fill="#FFFFFF" cx="9.4" cy="17.6" rx="9.4" ry="2.4"></ellipse><g id="Logo/Circle" transform="translate(2.500000, 3.000000)"><circle id="Oval" fill="#FFFFFF" cx="7" cy="7" r="7"></circle><polygon id="Fill-1" fill="#F8981D" points="4.66666667 2.33333333 4.66666667 11.4245258 10.0383286 6.87866667"></polygon></g></g></g></svg>',Cl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gl(e,t)}(o,e);var t,n,r,i=vl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(_l(n)),e.ready((function(){n.initialize()})),n}return t=o,(n=[{key:"createEl",value:function(){return ml(Tl(o.prototype),"createEl",this).call(this,"div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(Sl,"</div>"),title:"Streaming from ClickView Local Cache"})}},{key:"initialize",value:function(){var e=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){e.localCachePlugin.off("localcachechanged",e.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return wl(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.localCachePlugin.getActiveLocalCache();case 2:e.sent?this.show():this.hide();case 4:case"end":return e.stop()}}),e,this)})))}}])&&yl(t.prototype,n),r&&yl(t,r),o}(Fu.getComponent("Component"));function kl(e){return(kl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function El(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)}}function Il(e,t,n){return(Il="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ll(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ol(e,t){return(Ol=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ll(e);if(t){var i=Ll(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Pl(this,n)}}function Pl(e,t){return!t||"object"!==kl(t)&&"function"!=typeof t?Al(e):t}function Al(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ll(e){return(Ll=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("localCacheIndicator",Cl);var Rl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},jl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ol(e,t)}(o,e);var t,n,r,i=xl(o);function o(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).logger_=Fu.log.createLogger("localcache"),void 0===t)throw Error("no options defined");return n.onPlayerError=n.onPlayerError.bind(Al(n)),n.localCaches_=t.localCacheAddresses.map((function(e){return new ul(e)})),n.player.ready((function(){n.initialize(),t.enabled&&n.enable()})),n}return t=o,(n=[{key:"isEnabled",get:function(){return this.enabled_}},{key:"enable",value:function(){this.enabled_=!0,this.resetActiveLocalCache()}},{key:"disable",value:function(){this.enabled_=!1}},{key:"getActiveLocalCache",value:function(){return this.enabled_?this.activeLocalCache_:null}},{key:"resetActiveLocalCache",value:function(){this.clearActiveLocalCache(),this.activeLocalCache_=this.getActiveLocalCacheInternal()}},{key:"clearActiveLocalCache",value:function(){this.activeLocalCache_&&(this.activeLocalCache_=null,this.onLocalCacheChange(null))}},{key:"dispose",value:function(){this.player.off("error",this.onPlayerError),Il(Ll(o.prototype),"dispose",this).call(this)}},{key:"initialize",value:function(){this.player.on("error",this.onPlayerError),this.player.controlBar.addChild("localCacheIndicator")}},{key:"onPlayerError",value:function(){var e;(null===(e=this.player.error())||void 0===e?void 0:e.code)===MediaError.MEDIA_ERR_NETWORK&&this.resetActiveLocalCache()}},{key:"getActiveLocalCacheInternal",value:function(){return Rl(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],n=function(e){return Rl(i,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.ping();case 2:if(!n.sent){n.next=4;break}t.push(e);case 4:case"end":return n.stop()}}),n)})))},e.next=4,Promise.all(this.localCaches_.map((function(e){return n(e)})));case 4:if(!(t.length>0)){e.next=8;break}return r=t[0],this.onLocalCacheChange(r),e.abrupt("return",r);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"onLocalCacheChange",value:function(e){this.logger_.debug("Local Cache changed",e),this.trigger("localcachechanged",{localCache:e});var t=!1;e&&e.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",e.playbackProfile),ll.enableProfileOrNextBest(this.player.qualityLevels(),e.playbackProfile),t=!0),t||this.player.src(this.player.src())}}])&&El(t.prototype,n),r&&El(t,r),o}(Fu.getPlugin("plugin"));function Dl(e){return(Dl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ml(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)}}function Nl(e,t){return(Nl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Fl(e);if(t){var i=Fl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ul(this,n)}}function Ul(e,t){return!t||"object"!==Dl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fl(e){return(Fl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("localCache",jl);var Vl=Fu.getPlugin("plugin"),Hl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nl(e,t)}(o,e);var t,n,r,i=Bl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options=t,n.initialize(),n}return t=o,(n=[{key:"initialize",value:function(){if(this.player.textTracks().length){this.bindEventListeners();var e=!!this.options.showSubtitles,t=this.safeGet("cvplayer-show-subtitles");if("true"===t&&(e=!0),"false"===t&&(e=!1),e){var n=this.guessWhichTrack();n&&(n.mode="showing")}var r=this.safeGet("cvplayer-subtitle-size");r||(r=this.options.subtitleSize),r&&this.player.textTrackSettings.setSizeSetting(r)}}},{key:"safeGet",value:function(e){if(Qu())return Zu(e)}},{key:"onSelectedLanguageChange",value:function(){for(var e=this.player.textTracks(),t=0;t<e.length;t++){var n=e[t];if("showing"===n.mode)return Ju("cvplayer-show-subtitles","true"),void Ju("cvplayer-selected-language",n.language)}Ju("cvplayer-show-subtitles","false"),ec("cvplayer-selected-language")}},{key:"bindEventListeners",value:function(){var e=this;Qu()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",(function(){e.player.off("cv:languageselected",e.onSelectedLanguageChange),e.player.off("changesubtitlesize",e.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var e=this.player.textTrackSettings.getSizeSetting();Ju("cvplayer-subtitle-size",e)}},{key:"guessWhichTrack",value:function(){for(var e,t,n=this.safeGet("cvplayer-selected-language")||window.navigator.language,r=this.getLanguageParts(n),i=r.language,o=r.country,a=this.player.textTracks(),s=0;s<a.length;s++){var u=a[s],c=this.getLanguageParts(u.language),l=c.language,f=c.country;if(l===i&&(e=u,f||(t=u),f===o))return e}return t||e||null}},{key:"getLanguageParts",value:function(e){var t=e.toLowerCase().split("-");return{language:t[0],country:t[1]}}}])&&Ml(t.prototype,n),r&&Ml(t,r),o}(Vl);function Wl(e){return(Wl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zl(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)}}function ql(e,t){return(ql=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xl(e);if(t){var i=Xl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yl(this,n)}}function Yl(e,t){return!t||"object"!==Wl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xl(e){return(Xl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistSubtitleSettingsPlugin",Hl);var Kl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},$l=Fu.getPlugin("plugin"),Ql=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ql(e,t)}(o,e);var t,n,r,i=Gl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options=t,n.player.ready((function(){return n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){return Kl(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getActiveLocalCache();case 2:if(t=e.sent,(n=t?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),Qu()&&(r=Zu(this.getStorageKey(!!t)))&&(n=r),i=this.player.qualityLevels(),(null==t?void 0:t.playbackProfile)||ll.enableProfileOrNextBest(i,n),Qu()){e.next=10;break}return e.abrupt("return");case 10:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),i.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){i.off("change",o.onQualityLevelsChange)}));case 13:case"end":return e.stop()}}),e,this)})))}},{key:"onQualityLevelsChange",value:function(){return Kl(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isLocalCacheActive();case 2:t=e.sent,n=this.player.qualityLevels(),r=n[n.selectedIndex],Ju(this.getStorageKey(t),r.id);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"isLocalCacheActive",value:function(){return Kl(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.player.localCache().getActiveLocalCache();case 2:return e.abrupt("return",!!e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(e){return e?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&zl(t.prototype,n),r&&zl(t,r),o}($l);function Zl(e){return(Zl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ef(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)}}function tf(e,t){return(tf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=of(e);if(t){var i=of(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return rf(this,n)}}function rf(e,t){return!t||"object"!==Zl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function of(e){return(of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistQualitySettingsPlugin",Ql);var af=Fu.getPlugin("plugin"),sf="play",uf="playing",cf="pause",lf="seeking",ff="seekstart",hf="seekend",df="ended",pf="pausedseek",yf="timeupdate",mf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tf(e,t)}(o,e);var t,n,r,i=nf(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=t,n.player.ready((function(){return n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var e,t=this,n=(Jl(e={},sf,(function(){return t.onPlay()})),Jl(e,cf,(function(){return t.onPause()})),Jl(e,yf,(function(){return t.onTimeUpdate()})),Jl(e,lf,(function(){return t.onSeeking()})),Jl(e,df,(function(){return t.onEnded()})),e),r=Object.keys(n);r.forEach((function(e){return t.player.on(e,n[e])})),this.one("dispose",(function(){r.forEach((function(e){return t.player.off(e,n[e])}))}))}},{key:"startInterval",value:function(){var e=this,t=this.options.interval||5e3;setInterval((function(){return e.flushBuffer()}),t)}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent(hf),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(sf)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){e.isPlaying=!1,e.logEvent(cf),delete e.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(sf)),this.isPlaying&&!this.isSeeking&&this.logEvent(uf)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(pf),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(ff))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(df)}},{key:"logEvent",value:function(e){if(this.player){var t=this.player.currentTime();e===ff&&(t=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:t,type:e})}}},{key:"shouldUseCarriedOverTime",value:function(e){return this.lastPlayingTime&&(e===uf||e===sf)}},{key:"shouldSaveCarriedOverTime",value:function(e){return e===uf||e===cf}},{key:"shouldClearCarriedOverTime",value:function(e){return e===df||e===pf}},{key:"flushBuffer",value:function(){for(var e,t=[],n={};this.eventBuffer.length;){var r=this.eventBuffer.shift();this.shouldClearCarriedOverTime(r.type)?delete this.lastPlayingTime:n.start?r.type===uf&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(r.type)&&(this.lastPlayingTime=r.time),n.end=r,t.push(n),n={}):(this.shouldUseCarriedOverTime(r.type)&&(r.time=this.lastPlayingTime,delete this.lastPlayingTime),n.start=r)}this.eventBuffer=[],t.length&&(this.options.onFlush(t),null===(e=this.player)||void 0===e||e.trigger("progressflush"))}}])&&ef(t.prototype,n),r&&ef(t,r),o}(af);Fu.registerPlugin("progressReporterPlugin",mf);n(1115);function gf(e){return(gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bf(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)}}function _f(e,t){return(_f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sf(e);if(t){var i=Sf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return wf(this,n)}}function wf(e,t){return!t||"object"!==gf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Sf(e){return(Sf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_f(e,t)}(o,e);var t,n,r,i=Tf(o);function o(){return vf(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&bf(t.prototype,n),r&&bf(t,r),o}(Fu.getComponent("Component")),kf=["top","left","right","bottom"],Ef={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};n(1116);function If(e){return(If="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Of(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xf(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)}}function Pf(e,t,n){return t&&xf(e.prototype,t),n&&xf(e,n),e}function Af(e,t,n){return(Af="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Mf(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Lf(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rf(e,t)}function Rf(e,t){return(Rf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mf(e);if(t){var i=Mf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Df(this,n)}}function Df(e,t){return!t||"object"!==If(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Mf(e){return(Mf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nf=Fu.getComponent("Component"),Bf=function(e){Lf(n,e);var t=jf(n);function n(e,r){var i;return Of(this,n),(i=t.call(this,e,r)).bindEventListeners(),i}return Pf(n,[{key:"createEl",value:function(){return Af(Mf(n.prototype),"createEl",this).call(this,"div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)})}},{key:"bindEventListeners",value:function(){var e=this,t=this.el(),n=function(t){t.preventDefault(),t.dataTransfer.dropEffect="move",e.addClass("cv-drag-over")},r=function(t){t.preventDefault(),e.removeClass("cv-drag-over"),e.player_.whiteboardModePlugin().setWhiteboardMode(e.options_.side)},i=function(){e.removeClass("cv-drag-over")};t.addEventListener("dragover",n),t.addEventListener("drop",r),t.addEventListener("dragleave",i),this.on("dispose",(function(){t.removeEventListener("dragover",n),t.removeEventListener("drop",r),t.removeEventListener("dragleave",i)}))}}]),n}(Nf),Uf=function(e){Lf(n,e);var t=jf(n);function n(e,r){var i;return Of(this,n),(i=t.call(this,e,r)).addChildren(),i}return Pf(n,[{key:"addChildren",value:function(){var e=this;kf.forEach((function(t){e.addChild(new Bf(e.player_,{side:t}))}))}}]),n}(Nf);function Ff(e){return(Ff="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vf(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)}}function Hf(e,t,n){return(Hf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Gf(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Wf(e,t){return(Wf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gf(e);if(t){var i=Gf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qf(this,n)}}function qf(e,t){return!t||"object"!==Ff(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gf(e){return(Gf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wf(e,t)}(o,e);var t,n,r,i=zf(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(e){var t=this;Hf(Gf(o.prototype),"handleClick",this).call(this,e),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}])&&Vf(t.prototype,n),r&&Vf(t,r),o}(Fu.getComponent("MenuItem"));function Xf(e){return(Xf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kf(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)}}function $f(e,t){return($f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Jf(e);if(t){var i=Jf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zf(this,n)}}function Zf(e,t){return!t||"object"!==Xf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Jf(e){return(Jf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var eh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$f(e,t)}(o,e);var t,n,r,i=Qf(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Kf(t.prototype,n),r&&Kf(t,r),o}(Fu.getComponent("MenuItem"));function th(e){return(th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rh(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)}}function ih(e,t,n){return(ih="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=uh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function oh(e,t){return(oh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ah(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=uh(e);if(t){var i=uh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return sh(this,n)}}function sh(e,t){return!t||"object"!==th(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function uh(e){return(uh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ch=Fu.getComponent("MenuButton"),lh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oh(e,t)}(o,e);var t,n,r,i=ah(o);function o(){var e;return nh(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"createItems",value:function(){var e=this,t=this.player_.whiteboardModePlugin().side,n=[new Yf(this.player_,{label:"Video Controls"})];return kf.forEach((function(r){n.push(new eh(e.player_,{side:r,label:Ef[r],selectable:!0,multiSelectable:!1,selected:r===t}))})),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(ih(uh(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.whiteboardModePlugin().side;return Ef[e]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){ch.prototype.handleClick.apply(this)}}])&&rh(t.prototype,n),r&&rh(t,r),o}(ch);n(1117);function fh(e){return(fh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hh(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)}}function dh(e,t){return(dh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ph(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=mh(e);if(t){var i=mh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yh(this,n)}}function yh(e,t){return!t||"object"!==fh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mh(e){return(mh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gh="cv-whiteboard-side",vh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dh(e,t)}(o,e);var t,n,r,i=ph(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).side="bottom",t.player.ready((function(){t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){if(Qu()){var e=Zu(gh);e&&(this.side=e)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}},{key:"initCollapserator",value:function(){var e=this,t=this.player.getChild("collapserator"),n=new Cf(this.player);this.button=new lh(this.player),t.addChild(n),t.addChild(this.button),this.player.trigger("cv-updatecog");var r=function(){t.el().setAttribute("draggable","true")},i=function(){t.el().setAttribute("draggable","false")},o=function(t){e.player.addClass("cv-dragging"),t.dataTransfer.setData("text/plain","handle")},a=function(){e.player.removeClass("cv-dragging"),t.el().setAttribute("draggable","false")};n.el().addEventListener("mousedown",r),n.el().addEventListener("mouseup",i),t.el().addEventListener("dragstart",o),t.el().addEventListener("dragend",a),this.on("dispose",(function(){n.el().removeEventListener("mousedown",r),n.el().removeEventListener("mouseup",i),t.el().removeEventListener("dragstart",o),t.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new Uf(this.player))}},{key:"initFullscreenListener",value:function(){var e=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.one("dispose",(function(){e.player.off("fullscreenchange",e.update)}))}},{key:"setWhiteboardMode",value:function(e){this.side=e,this.button.update(),Qu()&&Ju(gh,e),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"update",value:function(){this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),this.player.trigger("resizemenus"),this.player.isFullscreen()&&"bottom"!==this.side&&this.player.addClass("cv-whiteboard-".concat(this.side))}}])&&hh(t.prototype,n),r&&hh(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("whiteboardModePlugin",vh);n(507),n(518);var bh=n(1118),_h=n.n(bh),Th=(n(506),n(169),n(510),n(511),n(513),n(265),n(517),n(519),n(1119)),wh=n.n(Th),Sh=n(1120),Ch=n.n(Sh),kh=n(1121),Eh=n.n(kh),Ih=n(1122),Oh=(n(508),n(509),n(514),n(515),n(516),null),xh=null;function Ph(){if(null===Oh){if("undefined"==typeof document)return Oh=0;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),Oh=n}return Oh}_h.a&&window.addEventListener("resize",(function(){xh!==window.devicePixelRatio&&(xh=window.devicePixelRatio,Oh=null)}));var Ah=function(e){return Array.prototype.reduce.call(e,(function(e,t){var n=t.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(e,t){return t.toUpperCase()}));switch(t.value){case"true":e[r]=!0;break;case"false":e[r]=!1;break;case void 0:e[r]=!0;break;default:e[r]=t.value}}return e}),{})};function Lh(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function Rh(e){return e&&e.ownerDocument?e.ownerDocument:document}var jh=function(){function e(t,n){var r=this;this.onScroll=function(){var e=Lh(r.el);r.scrollXTicking||(e.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(e.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(e){r.mouseX=e.clientX,r.mouseY=e.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(t=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(e,"x"):r.onTrackClick(e,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(e,"y"):r.onTrackClick(e,"y"))))},this.drag=function(t){var n=r.axis[r.draggedAxis].track,i=n.rect[r.axis[r.draggedAxis].sizeAttr],o=r.axis[r.draggedAxis].scrollbar,a=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],s=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var u=(("y"===r.draggedAxis?t.pageY:t.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(i-o.size)*(a-s);"x"===r.draggedAxis&&(u=r.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u-(i+o.size):u,u=r.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-u:u),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=u},this.onEndDrag=function(e){var t=Rh(r.el),n=Lh(r.el);e.preventDefault(),e.stopPropagation(),r.el.classList.remove(r.classNames.dragging),t.removeEventListener("mousemove",r.drag,!0),t.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout((function(){t.removeEventListener("click",r.preventClick,!0),t.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null}))},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,{},n),this.classNames=Object.assign({},e.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,e.instances.has(this.el)||(this.recalculate=wh()(this.recalculate.bind(this),64),this.onMouseMove=wh()(this.onMouseMove.bind(this),64),this.hideScrollbars=Ch()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Ch()(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=Eh()(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=t.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var i=e.getOffset(n),o=e.getOffset(r);n.scrollLeft=999;var a=e.getOffset(r);return{isRtlScrollingInverted:i.left!==o.left&&o.left-a.left!=0,isRtlScrollbarInverted:i.left!==o.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=Rh(e),r=Lh(e);return{top:t.top+(r.pageYOffset||n.documentElement.scrollTop),left:t.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),_h.a&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(e.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),n=document.createElement("div");t.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),t.appendChild(n),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this,t=Lh(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize);var n=!1,r=t.ResizeObserver||Ih.a;this.resizeObserver=new r((function(){n&&e.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new t.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var e=Lh(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var s=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=n?r+"px":"auto",this.placeholderEl.style.height=s+"px";var c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=u>r,this.axis.y.isOverflowing=s>c,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==a&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var l=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&s>c-l,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(e){if(void 0===e&&(e="y"),!this.axis[e].isOverflowing)return 0;var t,n=this.contentEl[this.axis[e].scrollSizeAttr],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=r/n;return t=Math.max(~~(i*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},t.positionScrollbar=function(t){if(void 0===t&&(t="y"),this.axis[t].isOverflowing){var n=this.contentWrapperEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[t].sizeAttr],10),o=this.axis[t].scrollbar,a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=(a="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-a:a)/(n-i),u=~~((r-o.size)*s);u="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u+(r-o.size):u,o.el.style.transform="x"===t?"translate3d("+u+"px, 0, 0)":"translate3d(0, "+u+"px, 0)"}},t.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,n=this.axis[e].scrollbar.el;this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden"),this.axis[e].isOverflowing?n.style.display="block":n.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.rect=this.axis[e].track.el.getBoundingClientRect(),this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[e].scrollbar.rect)?this.axis[e].scrollbar.el.classList.add(this.classNames.hover):this.axis[e].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[e].track.rect)?(this.showScrollbar(e),this.axis[e].track.el.classList.add(this.classNames.hover)):this.axis[e].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.el.classList.remove(this.classNames.hover),this.axis[e].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(e){void 0===e&&(e="y");var t=this.axis[e].scrollbar.el;this.axis[e].isVisible||(t.classList.add(this.classNames.visible),this.axis[e].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(e,t){void 0===t&&(t="y");var n=Rh(this.el),r=Lh(this.el),i=this.axis[t].scrollbar,o="y"===t?e.pageY:e.pageX;this.axis[t].dragOffset=o-i.rect[this.axis[t].offsetAttr],this.draggedAxis=t,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var r=Lh(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var i=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],o=parseInt(this.elStyles[this.axis[t].sizeAttr],10),a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=("y"===t?this.mouseY-i:this.mouseX-i)<0?-1:1,u=-1===s?a-o:a+o;!function e(){var i,o;-1===s?a>u&&(a-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((i={})[n.axis[t].offsetAttr]=a,i)),r.requestAnimationFrame(e)):a<u&&(a+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((o={})[n.axis[t].offsetAttr]=a,o)),r.requestAnimationFrame(e))}()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Ph()}catch(e){return Ph()}},t.removeListeners=function(){var e=this,t=Lh(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.findChild=function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,(function(e){return n.call(e,t)}))[0]},e}();jh.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},jh.instances=new WeakMap,jh.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||jh.instances.has(e)||new jh(e,Ah(e.attributes))}))},jh.removeObserver=function(){this.globalObserver.disconnect()},jh.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(jh.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},jh.handleMutations=function(e){e.forEach((function(e){Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?!jh.instances.has(e)&&new jh(e,Ah(e.attributes)):Array.prototype.forEach.call(e.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||jh.instances.has(e)||new jh(e,Ah(e.attributes))})))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&(e.hasAttribute('[data-simplebar="init"]')?jh.instances.has(e)&&jh.instances.get(e).unMount():Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar="init"]'),(function(e){jh.instances.has(e)&&jh.instances.get(e).unMount()})))}))}))},jh.getOptions=Ah,_h.a&&jh.initHtmlApi();var Dh=jh;function Mh(e){return(Mh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bh(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)}}function Uh(e,t,n){return(Uh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Wh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Fh(e,t){return(Fh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wh(e);if(t){var i=Wh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Hh(this,n)}}function Hh(e,t){return!t||"object"!==Mh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wh(e){return(Wh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zh=Fu.getComponent("Menu"),qh=zh.prototype,Gh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fh(e,t)}(o,e);var t,n,r,i=Vh(o);function o(){return Nh(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createEl",value:function(){var e=Uh(Wh(o.prototype),"createEl",this).call(this);return this.simpleBar=new Dh(this.contentEl(),{autoHide:!1}),e}},{key:"contentEl",value:function(){return this.simpleBar?this.simpleBar.getContentElement():Uh(Wh(o.prototype),"contentEl",this).call(this)}},{key:"dispose",value:function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),Uh(Wh(o.prototype),"dispose",this).call(this)}},{key:"addItem",value:function(e){Uh(Wh(o.prototype),"addItem",this).call(this,e),this.simpleBar.recalculate()}},{key:"lockShowing",value:function(){Uh(Wh(o.prototype),"lockShowing",this).call(this),this.simpleBar.recalculate()}},{key:"recalculateScrollBar",value:function(){this.simpleBar.recalculate()}},{key:"handleBlur",value:function(e){var t=e.relatedTarget||document.activeElement;this.el().contains(t)||qh.handleBlur.call(this,e)}}])&&Bh(t.prototype,n),r&&Bh(t,r),o}(zh);function Yh(e){return(Yh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kh(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)}}function $h(e,t){return($h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Jh(e);if(t){var i=Jh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zh(this,n)}}function Zh(e,t){return!t||"object"!==Yh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Jh(e){return(Jh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}zh.prototype=Gh.prototype,Fu.registerComponent("Menu",Gh);var ed=Fu.getComponent("Component"),td=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$h(e,t)}(o,e);var t,n,r,i=Qh(o);function o(){return Xh(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createMenu",value:function(){var e,t=new Gh(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=Fu.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(e=this.options_.title,"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var r=new ed(this.player_,{el:n});t.addItem(r)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)t.addItem(this.items[i]);return t}}])&&Kh(t.prototype,n),r&&Kh(t,r),o}(Fu.getComponent("MenuButton"));Fu.registerComponent("MenuButton",td);n(1123);function nd(e){return(nd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function id(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)}}function od(e,t,n){return(od="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=cd(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ad(e,t){return(ad=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cd(e);if(t){var i=cd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ud(this,n)}}function ud(e,t){return!t||"object"!==nd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cd(e){return(cd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ld=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ad(e,t)}(o,e);var t,n,r,i=sd(o);function o(){return rd(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(od(cd(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return od(cd(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&id(t.prototype,n),r&&id(t,r),o}(Fu.getComponent("Component"));ld.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},Fu.registerComponent("TimeWrapper",ld);n(1124);function fd(e){return(fd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dd(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)}}function pd(e,t,n){return t&&dd(e.prototype,t),n&&dd(e,n),e}function yd(e,t,n){return(yd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function md(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gd(e,t)}function gd(e,t){return(gd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_d(e);if(t){var i=_d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bd(this,n)}}function bd(e,t){return!t||"object"!==fd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _d(e){return(_d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Td=function(e){md(n,e);var t=vd(n);function n(e,r){return hd(this,n),t.call(this,e,r)}return pd(n,[{key:"handleClick",value:function(e){var t=this;yd(_d(n.prototype),"handleClick",this).call(this,e),this.requestAnimationFrame((function(){t.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(e,t,r){if(!this.options_.item)return yd(_d(n.prototype),"createEl",this).call(this,e,t,r);var i=this.options_.item.getCollabsibleName(),o=this.options_.item.getCollabsibleValue(),a='<span class="vjs-menu-item-text">'.concat(i,"</span>");this.valueHolder_=Fu.dom.createEl("span",{innerHTML:o});var s=yd(_d(n.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item ".concat(o?"cv-has-cog-value":""),innerHTML:a},r);return s.appendChild(this.valueHolder_),s}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}]),n}(Fu.getComponent("MenuItem")),wd=function(e){md(n,e);var t=vd(n);function n(e,r){return hd(this,n),t.call(this,e,r)}return pd(n,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(yd(_d(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(yd(_d(n.prototype),"buildCSSClass",this).call(this))}},{key:"pressButton",value:function(){this.menu.children_.forEach((function(e){e.updateCollapsibleValue&&e.updateCollapsibleValue()})),yd(_d(n.prototype),"pressButton",this).call(this)}},{key:"createItems",value:function(){for(var e,t=this,n=[],r=0;r<this.options_.items.length;r++){var i=this.options_.items[r];i.isCollabsible&&(i.showInCollabsibleMenu()&&i.isCollapsed&&n.push(new Td(this.player_,{item:i})))}return(null===(e=this.additionalItems)||void 0===e?void 0:e.length)&&this.additionalItems.forEach((function(e){var r,i=new e.ctor(t.player_,Object.assign(Object.assign({},t.options_),null!==(r=e.options)&&void 0!==r?r:{}));n.splice(e.index,0,i)})),n}},{key:"update",value:function(){yd(_d(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(e){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(t){return t.name===e.name}))||(this.additionalItems.push(e),this.update())}}]),n}(Fu.getComponent("MenuButton"));function Sd(e){return(Sd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cd(e,t,n){return(Cd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ld(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function kd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ed(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)}}function Id(e,t,n){return t&&Ed(e.prototype,t),n&&Ed(e,n),e}function Od(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xd(e,t)}function xd(e,t){return(xd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ld(e);if(t){var i=Ld(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ad(this,n)}}function Ad(e,t){return!t||"object"!==Sd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ld(e){return(Ld=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("cogButton",wd);var Rd=Fu.getComponent("MenuItem"),jd=Fu.getComponent("MenuButton"),Dd=["large","medium","small"],Md=function(e){Od(n,e);var t=Pd(n);function n(e,r){return kd(this,n),t.call(this,e,r)}return Id(n,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}]),n}(Rd),Nd=function(e){Od(n,e);var t=Pd(n);function n(e,r){var i;return kd(this,n),(i=t.call(this,e,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.player_.ready((function(){i.update()})),i}return Id(n,[{key:"createItems",value:function(){var e=this,t=this.player_.textTrackSettings;if(t){var n=t.getSizeSetting(),r=[new Yf(this.player_,{label:"Caption Text Size",onClickBack:function(){e.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return Dd.map((function(t){r.push(new Md(e.player_,{label:t.charAt(0).toUpperCase()+t.substring(1),selectable:!0,multiSelectable:!1,selected:t===n,value:t}))})),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Cd(Ld(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){jd.prototype.handleClick.apply(this)}}]),n}(jd);function Bd(e,t,n,r){e.kind===t&&(n&&e.label!==n||(e.loaded_?r(e):e.one("loadeddata",(function(){r(e)}))))}Fu.registerComponent("SubtitleSizeButton",Nd);var Ud=function(e,t,n,r){var i=function(e){Bd(e.track,t,n,r)},o=e.textTracks(),a=function(e,t,n){if(e.length)for(var r=e.length-1;r>=0;r--){var i=e[r];if(i.kind===t){if(n&&i.label!==n)continue;return i}}}(o,t,n);a?Bd(a,t,n,r):(o.addEventListener("addtrack",i),e.one("dispose",(function(){o.removeEventListener("addtrack",i)})))},Fd=function(e){if(!e)return null;for(var t=e.textTracks(),n=0;n<t.length;n++){var r=t[n];if("showing"===r.mode)return r}return null};function Vd(e){return(Vd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hd(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)}}function Wd(e,t){return(Wd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gd(e);if(t){var i=Gd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qd(this,n)}}function qd(e,t){return!t||"object"!==Vd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gd(e){return(Gd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wd(e,t)}(o,e);var t,n,r,i=zd(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"update",value:function(e,t){var n=this;if(null==e?void 0:e.length){var r=[],i=0;e.forEach((function(e){var o=n.options_.label.substr(i,e);o&&r.push(o),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(e,t)),r.push("</span>"),i=e+t})),r.push(this.options_.label.substring(i,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&Hd(t.prototype,n),r&&Hd(t,r),o}(Fu.getComponent("MenuItem"));function Xd(e){return(Xd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kd(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)}}function $d(e,t,n){return($d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=tp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Qd(e,t){return(Qd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tp(e);if(t){var i=tp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Jd(this,n)}}function Jd(e,t){return!t||"object"!==Xd(t)&&"function"!=typeof t?ep(e):t}function ep(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tp(e){return(tp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var np=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qd(e,t)}(o,e);var t,n,r,i=Zd(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).onChange=function(e,t,n){var r,i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){o.clearTimeout(r),r=null},s=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var c=function(){r=null,c=null,n||e.apply(this,s)};!r&&n&&e.apply(i,s),o.clearTimeout(r),r=o.setTimeout(c,t)};return s.cancel=a,s}(n.onChange,100,!1,ep(n)),n.bindEventListeners(),n}return t=o,(n=[{key:"createEl",value:function(){return $d(tp(o.prototype),"createEl",this).call(this,"li",{innerHTML:'\n <div class="cv-subtitle-search-input">\n <span class="cv-search-icon">\n <svg viewBox="0 0 24 24">\n <path d="M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"/>\n </svg>\n </span><input placeholder="Search" type="text" autocomplete="off" spellcheck="false" aria-label="Search" />\n </div>\n '})}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("input");this.onChange=this.onChange.bind(this),t.addEventListener("keyup",this.onChange),t.addEventListener("blur",(function(t){e.options_.menuButton.menu.handleBlur(t)}))}},{key:"onChange",value:function(e){var t=e.target;this.options_.menuButton.search(t.value)}}])&&Kd(t.prototype,n),r&&Kd(t,r),o}(Fu.getComponent("MenuItem"));n(1125);function rp(e){return(rp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ip(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function op(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)}}function ap(e,t,n){return t&&op(e.prototype,t),n&&op(e,n),e}function sp(e,t,n){return(sp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=dp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function up(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cp(e,t)}function cp(e,t){return(cp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dp(e);if(t){var i=dp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return fp(this,n)}}function fp(e,t){return!t||"object"!==rp(t)&&"function"!=typeof t?hp(e):t}function hp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dp(e){return(dp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pp=Fu.getComponent("MenuItem"),yp=Fu.getComponent("MenuButton"),mp=function(e){up(n,e);var t=lp(n);function n(){return ip(this,n),t.apply(this,arguments)}return ap(n,[{key:"createEl",value:function(e,t,r){return sp(dp(n.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:"vjs-menu-item cv-no-results"}),r)}}]),n}(pp),gp=function(e){up(n,e);var t=lp(n);function n(e,r){var i;return ip(this,n),(i=t.call(this,e,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.update=i.update.bind(hp(i)),i.player_.textTracks().addEventListener("selectedlanguagechange",i.update),i}return ap(n,[{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.update),e.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){e.removeEventListener("loadeddata",t.update)}))}},{key:"createItems",value:function(){var e,t=Fd(this.player_);if(t){if(null===(e=t.cues)||void 0===e?void 0:e.length){for(var n=[new np(this.player_,{menuButton:this})],r=0;r<t.cues.length;r++){var i=t.cues[r];n.push(new Yd(this.player_,{cue:i,label:i.text,selected:!1,multiSelectable:!1}))}var o=new mp(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return o.hide(),n.push(o),n}this.bindTrackEvents(t)}}},{key:"search",value:function(e){var t;e=e.trim();var n=Fd(this.player_);if(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length){var r=this.findMatches(e,n);this.toggleItemVisibility(e,r),this.toggleNoResults(e,r)}}},{key:"findMatches",value:function(e,t){var n={};if(!e)return n;for(var r=new RegExp(e,"gi"),i=0;i<t.cues.length;i++){for(var o=t.cues[i].text,a=[],s=void 0;s=r.exec(o);)a.push(s.index);a.length&&(n[i]=a)}return n}},{key:"toggleItemVisibility",value:function(e,t){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(n,r){!e||t[r]?n.show():n.hide(),n.update(t[r],e.length)}))}},{key:"toggleNoResults",value:function(e,t){var n=this.menu.children_[this.menu.children_.length-1];!e||Object.keys(t).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(sp(dp(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"update",value:function(){sp(dp(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){sp(dp(n.prototype),"pressButton",this).call(this);var e=this.menu.children_[0];(null==e?void 0:e.focus)&&(null==e||e.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){yp.prototype.handleClick.apply(this)}}]),n}(yp);Fu.registerComponent("subtitleSearchButton",gp);n(1126);function vp(e){return(vp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bp(e,t,n){return(bp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ip(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function _p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tp(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)}}function wp(e,t,n){return t&&Tp(e.prototype,t),n&&Tp(e,n),e}function Sp(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cp(e,t)}function Cp(e,t){return(Cp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ip(e);if(t){var i=Ip(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ep(this,n)}}function Ep(e,t){return!t||"object"!==vp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ip(e){return(Ip=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Op=Fu.getComponent("MenuItem"),xp=Fu.getComponent("MenuButton"),Pp=[{label:"Play / Pause",type:"play-pause"},{label:"Volume",type:"volume"},{label:"Mute",type:"mute"},{label:"Toggle fullscreen",type:"fullscreen"},{label:"Exit fullscreen",type:"exit-fullscreen"}],Ap=function(e){Sp(n,e);var t=kp(n);function n(e,r){return _p(this,n),t.call(this,e,r)}return wp(n,[{key:"createEl",value:function(){return Fu.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(e){switch(e){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">&uArr;</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">&dArr;</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>'}return""}}]),n}(Op),Lp=function(e){Sp(n,e);var t=kp(n);function n(){var e;return _p(this,n),(e=t.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return wp(n,[{key:"createItems",value:function(){var e=this,t=[];return t.push(new Yf(this.player_,{label:"Keyboard Shortcuts"})),Pp.forEach((function(n){t.push(new Ap(e.player_,n))})),t}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat(bp(Ip(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Keyboard Shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){xp.prototype.handleClick.apply(this)}}]),n}(xp);Fu.registerComponent("KeyboardShortcutsButton",Lp);n(1127),n(1128);function Rp(e){return(Rp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jp(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)}}function Dp(e,t,n){return(Dp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Fp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Mp(e,t){return(Mp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Np(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Fp(e);if(t){var i=Fp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Bp(this,n)}}function Bp(e,t){return!t||"object"!==Rp(t)&&"function"!=typeof t?Up(e):t}function Up(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fp(e){return(Fp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mp(e,t)}(o,e);var t,n,r,i=Np(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(Up(n)),n.player_.on("cv-updatecog",n.update),n.player_.on("playerresize",n.update),n.player_.on("dispose",(function(){n.player_.off("cv-updatecog",n.update),n.player_.off("playerresize",n.update)})),n}return t=o,(n=[{key:"togglehidden",value:function(e){for(var t=0;t<this.children_.length;t++){var n=this.children_[t];n.isCollabsible&&(n.alwaysCollapsed||e?(n.isCollapsed=!0,n.addClass("cv-collapsed")):(n.isCollapsed=!1,n.removeClass("cv-collapsed")))}this.getChild("cogButton").update()}},{key:"update",value:function(){var e=this.player_.el().getBoundingClientRect();0!==e.width&&(this.addClass("cv-collapsorator-ready"),this.togglehidden(e.width<600))}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(Dp(Fp(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Dp(Fp(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&jp(t.prototype,n),r&&jp(t,r),o}(Fu.getComponent("Component"));function Hp(e){return(Hp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zp(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)}}function qp(e,t){return(qp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xp(e);if(t){var i=Xp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yp(this,n)}}function Yp(e,t){return!t||"object"!==Hp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xp(e){return(Xp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Vp.prototype.options_={children:["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"]},Fu.registerComponent("collapserator",Vp);var Kp=Fu.getComponent("SeekBar"),$p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qp(e,t)}(o,e);var t,n,r,i=Gp(o);function o(){return Wp(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleMouseDown",value:function(e){Kp.prototype.handleMouseDown.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback")}},{key:"handleMouseUp",value:function(e){var t=this;Kp.prototype.handleMouseUp.call(this,e),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&zp(t.prototype,n),r&&zp(t,r),o}(Kp);Fu.registerComponent("SeekBar",$p);n(1129);function Qp(e){return(Qp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jp(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)}}function ey(e,t,n){return(ey="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=iy(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ty(e,t){return(ty=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ny(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=iy(e);if(t){var i=iy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ry(this,n)}}function ry(e,t){return!t||"object"!==Qp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function iy(e){return(iy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ty(e,t)}(o,e);var t,n,r,i=ny(o);function o(){return Zp(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(ey(iy(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return ey(iy(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(e){e.update()}))}},{key:"updateBuffered",value:function(){var e=this;this.children_.forEach((function(t){t.updateBuffered(function(e){for(var t=e.buffered(),n=e.currentTime(),r=0,i=0;i<t.length;i++){var o=t.start(i),a=t.end(i);if(o<=n&&a>=n){r=a;break}}return r}(e.player_))}))}}])&&Jp(t.prototype,n),r&&Jp(t,r),o}(Fu.getComponent("Component"));function ay(e){return(ay="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uy(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)}}function cy(e,t,n){return(cy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=dy(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ly(e,t){return(ly=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dy(e);if(t){var i=dy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hy(this,n)}}function hy(e,t){return!t||"object"!==ay(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dy(e){return(dy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var py=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ly(e,t)}(o,e);var t,n,r,i=fy(o);function o(){return sy(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(cy(dy(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return cy(dy(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){this.el_.style.width=100*e+"%"}}])&&uy(t.prototype,n),r&&uy(t,r),o}(Fu.getComponent("Component"));function yy(e){return(yy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function my(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gy(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)}}function vy(e,t,n){return(vy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=wy(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function by(e,t){return(by=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wy(e);if(t){var i=wy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ty(this,n)}}function Ty(e,t){return!t||"object"!==yy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wy(e){return(wy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Sy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&by(e,t)}(o,e);var t,n,r,i=_y(o);function o(){return my(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(vy(wy(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return vy(wy(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){e>0&&e<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*e+"%"}}])&&gy(t.prototype,n),r&&gy(t,r),o}(Fu.getComponent("Component"));function Cy(e){return(Cy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ky(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)}}function Ey(e,t,n){return(Ey="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Py(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Iy(e,t){return(Iy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Py(e);if(t){var i=Py(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xy(this,n)}}function xy(e,t){return!t||"object"!==Cy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Py(e){return(Py=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ay=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Iy(e,t)}(o,e);var t,n,r,i=Oy(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).playProgress=new Sy(n.player_),n.addChild(n.playProgress),n.loadProgress=new py(n.player_),n.addChild(n.loadProgress),n.update(),n.updateBuffered(0),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(Ey(Py(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Ey(Py(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var e=this.player_.duration()||3600,t=this.options_.endTime-this.options_.startTime;if(e!==this.duration_){var n=t/e;this.el_.style.width=100*n+"%";var r=this.options_.startTime/e;this.el_.style.left=100*r+"%",this.duration_=e}var i=this.getCurrentTime();i<this.options_.startTime?this.playProgress.update(0):i>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((i-this.options_.startTime)/t)}},{key:"updateBuffered",value:function(e){var t=this.options_.endTime-this.options_.startTime;e<this.options_.startTime?this.loadProgress.update(0):e>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((e-this.options_.startTime)/t)}}])&&ky(t.prototype,n),r&&ky(t,r),o}(Fu.getComponent("Component"));function Ly(e){return(Ly="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ry(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)}}function jy(e,t,n){return(jy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Uy(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Dy(e,t){return(Dy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function My(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Uy(e);if(t){var i=Uy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ny(this,n)}}function Ny(e,t){return!t||"object"!==Ly(t)&&"function"!=typeof t?By(e):t}function By(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Uy(e){return(Uy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dy(e,t)}(o,e);var t,n,r,i=My(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).onDurationChange=n.onDurationChange.bind(By(n)),n.createChapterItems=n.createChapterItems.bind(By(n)),n.updateBuffered=n.updateBuffered.bind(By(n)),Ud(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("progress",n.updateBuffered),n.createChapterItems(),n.update(),n}return t=o,(n=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),jy(Uy(o.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){return Fu.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar")})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var e=jy(Uy(o.prototype),"update",this).call(this);return this.chapterBarItems&&this.chapterBarItems.update(),e}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"createChapterItems",value:function(e){var t,n;e&&(this.track_=e);var r=new oy(this.player_);if((null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var i=0;i<this.track_.cues.length;i++){var o=this.track_.cues[i],a=o.startTime,s=o.endTime,u=this.player_.duration();u&&(i===this.track_.cues.length-1&&o.endTime<this.player_.duration()&&(s=this.player_.duration()),s>u&&(s=u));var c=new Ay(this.player_,{startTime:a,endTime:s});if(r.addChild(c),u&&s===u)break}else r.addChild(new Ay(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&Ry(t.prototype,n),r&&Ry(t,r),o}(Fu.getComponent("SeekBar"));Fy.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},Fu.browser.IS_IOS||Fu.browser.IS_ANDROID||Fy.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Fu.registerComponent("ChapterSeekBar",Fy);n(1130);function Vy(e){return(Vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wy(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)}}function zy(e,t,n){return(zy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xy(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function qy(e,t){return(qy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xy(e);if(t){var i=Xy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yy(this,n)}}function Yy(e,t){return!t||"object"!==Vy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xy(e){return(Xy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ky=Fu.getComponent("ProgressControl"),$y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qy(e,t)}(o,e);var t,n,r,i=Gy(o);function o(){var e;return Hy(this,o),(e=i.apply(this,arguments)).seekBarName_="seekBar",e}return t=o,(n=[{key:"setSeekBarName",value:function(e){this.seekBarName_=e}},{key:"getChild",value:function(e){return(null==e?void 0:e.toLowerCase())==="seekBar".toLowerCase()&&(e=this.seekBarName_),zy(Xy(o.prototype),"getChild",this).call(this,e)}}])&&Wy(t.prototype,n),r&&Wy(t,r),o}(Ky);function Qy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)}$y.prototype.options_={children:[]},Fu.registerComponent("ProgressControl",$y);n(1131);function Zy(e){return(Zy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jy(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)}}function em(e,t,n){return(em="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=im(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function tm(e,t){return(tm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=im(e);if(t){var i=im(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return rm(this,n)}}function rm(e,t){return!t||"object"!==Zy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function im(e){return(im=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var om=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tm(e,t)}(o,e);var t,n,r,i=nm(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).hasCustomChapterText=!1,Ud(n.player_,"chapters",!1,(function(e){n.track_=e})),n}return t=o,(n=[{key:"createEl",value:function(){var e=em(im(o.prototype),"createEl",this).call(this);return this.chapter_=Fu.dom.createEl("div"),e.appendChild(this.chapter_),this.time_=Fu.dom.createEl("div"),e.appendChild(this.time_),e}},{key:"updateTime",value:function(e){var t=this.player_.duration();if(Fu.dom.textContent(this.time_,Qy(e,t)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],i=r.endTime||t;if(r.startTime<=e&&i>=e)return void Fu.dom.textContent(this.chapter_,r.text)}Fu.dom.textContent(this.chapter_,"")}}},{key:"setCustomChapterText",value:function(e){this.hasCustomChapterText=!!e,Fu.dom.textContent(this.chapter_,null!=e?e:"")}}])&&Jy(t.prototype,n),r&&Jy(t,r),o}(Fu.getComponent("TimeTooltip"));Fu.registerComponent("TimeTooltip",om);n(1132);function am(e){return(am="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sm(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)}}function um(e,t,n){return(um="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=hm(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function cm(e,t){return(cm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=hm(e);if(t){var i=hm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return fm(this,n)}}function fm(e,t){return!t||"object"!==am(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hm(e){return(hm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cm(e,t)}(o,e);var t,n,r,i=lm(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"setTrack",value:function(e){this.track_=e}},{key:"createEl",value:function(){var e=um(hm(o.prototype),"createEl",this).call(this,"div",{className:"cv-thumbnail-display"});return this.img_=Fu.dom.createEl("img"),e.appendChild(this.img_),e}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(e){var t=e.indexOf("#");if(-1===t)return{src:e,w:0,h:0,x:0,y:0};var n=e.substr(0,t),r=e.substr(t+1);if("xywh="!==r.substr(0,5))return{src:e,w:0,h:0,x:0,y:0};var i=this.getScale(),o=r.substr(5).split(",");return{src:n,w:parseInt(o[2])*i,h:parseInt(o[3])*i,x:parseInt(o[0])*i,y:parseInt(o[1])*i}}},{key:"getScale",value:function(){var e=this.options_.scaleFactor,t=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==t&&(e*=2),e}},{key:"update",value:function(e){var t,n;if(null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length){for(var r,i=e,o=0;o<this.track_.cues.length;){var a=this.track_.cues[o];if(a.startTime<=i&&a.endTime>=i){r=this.parseImageLink(a.text);break}o++}if(null==r?void 0:r.src){this.enable();var s=r,u=s.src,c=s.w,l=s.h,f=s.x,h=s.y,d=this.getScale();this.img_.src=u,this.img_.style.left=-f+"px",this.img_.style.top=-h+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(d,")"),this.el_.style.width=c+"px",this.el_.style.height=l+"px"}else this.disable()}}}])&&sm(t.prototype,n),r&&sm(t,r),o}(Fu.getComponent("Component"));dm.prototype.options_={scaleFactor:1},Fu.registerComponent("ThumbnailDisplay",dm);n(1133);function pm(e){return(pm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ym(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)}}function mm(e,t){return(mm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_m(e);if(t){var i=_m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vm(this,n)}}function vm(e,t){return!t||"object"!==pm(t)&&"function"!=typeof t?bm(e):t}function bm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _m(e){return(_m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Tm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mm(e,t)}(o,e);var t,n,r,i=gm(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),Ud(n.player_,"metadata","thumbnails",(function(e){n.getChild("ThumbnailDisplay").setTrack(e)})),n.update=n.update.bind(bm(n)),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return t=o,(n=[{key:"update",value:function(e,t){var n=this;this.requestAnimationFrame((function(){var r=t*n.player_.duration();n.getChild("ThumbnailDisplay").update(r),n.getChild("TimeTooltip").updateTime(r);var i=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-i.width/2+"px";var o=e.width*t;o<i.width/2?n.el_.style.left=i.width/2+"px":o>e.width-i.width/2?n.el_.style.left=e.width-i.width/2+"px":n.el_.style.left=e.width*t+"px"}))}},{key:"forceShow",value:function(){this.addClass("cv-mouse-time-display-force-show")}},{key:"removeForceShow",value:function(){this.removeClass("cv-mouse-time-display-force-show")}}])&&ym(t.prototype,n),r&&ym(t,r),o}(Fu.getComponent("MouseTimeDisplay"));Tm.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},Fu.registerComponent("MouseTimeDisplay",Tm);n(1134);function wm(e){return(wm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sm(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)}}function Cm(e,t,n){return(Cm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Om(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function km(e,t){return(km=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Em(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Om(e);if(t){var i=Om(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Im(this,n)}}function Im(e,t){return!t||"object"!==wm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Om(e){return(Om=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xm=Fu.getComponent("ChaptersTrackMenuItem"),Pm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&km(e,t)}(o,e);var t,n,r,i=Em(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).nonIconControl=!1,n.thumbnailDisplay=new dm(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),Ud(n.player_,"metadata","thumbnails",(function(e){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(e),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return t=o,(n=[{key:"update",value:function(){this.player_&&xm.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(e,t,n){return this.nonIconControl=!0,Cm(Om(o.prototype),"createEl",this).call(this,"li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},t),n)}},{key:"getInnerHTML",value:function(){var e=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat(Qy(this.options_.cue.startTime,e),")</p>")+"</span>"}}])&&Sm(t.prototype,n),r&&Sm(t,r),o}(xm);n(1135);function Am(e){return(Am="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lm(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)}}function Rm(e,t,n){return(Rm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bm(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function jm(e,t){return(jm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bm(e);if(t){var i=Bm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Mm(this,n)}}function Mm(e,t){return!t||"object"!==Am(t)&&"function"!=typeof t?Nm(e):t}function Nm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bm(e){return(Bm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Um=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jm(e,t)}(o,e);var t,n,r,i=Dm(o);function o(e,t,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,e,t,n)).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(Nm(r)),r.player_.on("cv-whiteboard-change",r.update),r.player_.on("fullscreenchange",r.update),r.player_.on("dispose",(function(){r.player_.off("cv-whiteboard-change",r.update),r.player_.off("fullscreenchange",r.update)})),r}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(Rm(Bm(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Rm(Bm(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new Pm(this.player_,{track:this.track_,cue:i});e.push(o)}return e}},{key:"setTrack",value:function(e){var t=this;Rm(Bm(o.prototype),"setTrack",this).call(this,e),this.track_&&"chapters"===this.track_.kind&&e.one("loadeddata",(function(){t.update()}))}},{key:"update",value:function(e){Rm(Bm(o.prototype),"update",this).call(this,e)}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var e=this.track_.activeCues[0];return(null==e?void 0:e.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var e=this.track_.cues;return!(!e||!e.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&Lm(t.prototype,n),r&&Lm(t,r),o}(Fu.getComponent("ChaptersButton"));function Fm(e){return(Fm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hm(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)}}function Wm(e,t){return(Wm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gm(e);if(t){var i=Gm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qm(this,n)}}function qm(e,t){return!t||"object"!==Fm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gm(e){return(Gm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("ChaptersButton",Um);var Ym=Fu.getComponent("OffTextTrackMenuItem"),Xm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wm(e,t)}(o,e);var t,n,r,i=zm(o);function o(){return Vm(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleClick",value:function(e){Ym.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}}])&&Hm(t.prototype,n),r&&Hm(t,r),o}(Ym);function Km(e){return(Km="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qm(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)}}function Zm(e,t){return(Zm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tg(e);if(t){var i=tg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return eg(this,n)}}function eg(e,t){return!t||"object"!==Km(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tg(e){return(tg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("OffTextTrackMenuItem",Xm);var ng=Fu.getComponent("TextTrackButton"),rg=Fu.getComponent("TextTrackMenuItem"),ig=Fu.getComponent("OffTextTrackMenuItem"),og=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zm(e,t)}(o,e);var t,n,r,i=Jm(o);function o(){return $m(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createItems",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rg;this.label_&&(e="".concat(this.label_," off")),t.push(new ig(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new n(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(o.kind,"-menu-item")),t.push(a)}}return t}}])&&Qm(t.prototype,n),r&&Qm(t,r),o}(ng);function ag(e){return(ag="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ug(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)}}function cg(e,t){return(cg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=hg(e);if(t){var i=hg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return fg(this,n)}}function fg(e,t){return!t||"object"!==ag(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hg(e){return(hg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("TextTrackButton",og);var dg=Fu.getComponent("SubsCapsMenuItem"),pg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cg(e,t)}(o,e);var t,n,r,i=lg(o);function o(){return sg(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleClick",value:function(e){dg.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}}])&&ug(t.prototype,n),r&&ug(t,r),o}(dg);function yg(e){return(yg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mg(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)}}function gg(e,t){return(gg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_g(e);if(t){var i=_g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bg(this,n)}}function bg(e,t){return!t||"object"!==yg(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _g(e){return(_g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Tg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gg(e,t)}(o,e);var t,n,r,i=vg(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};return n.track={player:e,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(t=i.call(this,e,n)).addClass("vjs-texttrack-settings"),t.addClass("cv-divider-after-menu-item"),t.addClass("cv-subtitle-size-menu-item"),t.controlText(", opens subtitle size settings"),t}return t=o,(n=[{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&mg(t.prototype,n),r&&mg(t,r),o}(Fu.getComponent("TextTrackMenuItem"));function wg(e){return(wg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sg(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)}}function Cg(e,t){return(Cg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Og(e);if(t){var i=Og(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Eg(this,n)}}function Eg(e,t){return!t||"object"!==wg(t)&&"function"!=typeof t?Ig(e):t}function Ig(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Og(e){return(Og=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cg(e,t)}(o,e);var t,n,r,i=kg(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};n.track={player:e,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(t=i.call(this,e,n)).addClass("vjs-texttrack-settings"),t.addClass("cv-subtitle-search-menu-item"),t.controlText(", opens subtitle search"),t.toggleEnabled=t.toggleEnabled.bind(Ig(t));var r=t.player_.textTracks();return r.addEventListener("selectedlanguagechange",t.toggleEnabled),t.player_.one("dispose",(function(){r.removeEventListener("selectedlanguagechange",t.toggleEnabled)})),t.toggleEnabled(),t}return t=o,(n=[{key:"toggleEnabled",value:function(){var e;if(this.player_){var t=Fd(this.player_);t?(null===(e=t.cues)||void 0===e?void 0:e.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(t),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(e){var t=this;e.removeEventListener("loadeddata",this.toggleEnabled),e.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){e.removeEventListener("loadeddata",t.toggleEnabled)}))}},{key:"handleClick",value:function(){var e,t=this,n=Fd(this.player_);(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length)&&this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&Sg(t.prototype,n),r&&Sg(t,r),o}(Fu.getComponent("TextTrackMenuItem"));function Pg(e){return(Pg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ag(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lg(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)}}function Rg(e,t,n){return(Rg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ng(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function jg(e,t){return(jg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ng(e);if(t){var i=Ng(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Mg(this,n)}}function Mg(e,t){return!t||"object"!==Pg(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ng(e){return(Ng=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Bg=Fu.getComponent("OffTextTrackMenuItem"),Ug=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jg(e,t)}(o,e);var t,n,r,i=Dg(o);function o(){return Ag(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createEl",value:function(e,t,n){return Rg(Ng(o.prototype),"createEl",this).call(this,"li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},t),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),n)}}])&&Lg(t.prototype,n),r&&Lg(t,r),o}(Bg);Bg.prototype=Ug.prototype,Fu.registerComponent("OffTextTrackMenuItem",Ug);n(1136);function Fg(e){return(Fg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hg(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)}}function Wg(e,t,n){return(Wg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Yg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function zg(e,t){return(zg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yg(e);if(t){var i=Yg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gg(this,n)}}function Gg(e,t){return!t||"object"!==Fg(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yg(e){return(Yg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xg=Fu.getComponent("TextTrackButton"),Kg=Fu.getComponent("SubsCapsButton"),$g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zg(e,t)}(o,e);var t,n,r,i=qg(o);function o(){var e;return Vg(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Wg(Yg(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[new xg(this.player_),new Tg(this.player_)];return this.hideThreshold_=this.hideThreshold_+2,Xg.prototype.createItems.call(this,e,pg)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Kg.prototype.handleClick.apply(this)}}])&&Hg(t.prototype,n),r&&Hg(t,r),o}(Kg);function Qg(e){return(Qg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zg(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)}}function Jg(e,t){return(Jg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ev(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rv(e);if(t){var i=rv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return tv(this,n)}}function tv(e,t){return!t||"object"!==Qg(t)&&"function"!=typeof t?nv(e):t}function nv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rv(e){return(rv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("SubsCapsButton",$g);var iv=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},ov="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Sl,"</span>"),av=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jg(e,t)}(o,e);var t,n,r,i=ev(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).qualityId=t.qualityId;var r=e.qualityLevels(),a=n.handleQualityChange.bind(nv(n));return r.on("change",a),e.one("dispose",(function(){r.off("change",a)})),n.handleLocalCacheChange=n.handleLocalCacheChange.bind(nv(n)),n.player_.ready((function(){n.player_&&(n.player_.on("localcachechanged",n.handleLocalCacheChange),n.player_.one("dispose",(function(){var e;null===(e=n.player_)||void 0===e||e.off("localcachechanged",n.handleLocalCacheChange)})),n.handleLocalCacheChange())})),n}return t=o,(n=[{key:"handleLocalCacheChange",value:function(){return iv(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.player_.localCache(),e.next=3,t.getActiveLocalCache();case 3:if(null==(n=e.sent)?void 0:n.playbackProfile){e.next=9;break}return this.show(),this.enable(),this.setLabel(this.options_.label),e.abrupt("return");case 9:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+ov);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"setLabel",value:function(e){var t=this.$(".vjs-menu-item-text");t&&(t.innerHTML=e)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var e=this.player_.qualityLevels(),t=0;t<e.length;t++){var n=e[t];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var e=this.player_.qualityLevels(),t=e[e.selectedIndex],n=t&&t.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&Zg(t.prototype,n),r&&Zg(t,r),o}(Fu.getComponent("MenuItem"));n(1137);function sv(e){return(sv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uv(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)}}function cv(e,t,n){return(cv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=pv(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function lv(e,t){return(lv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pv(e);if(t){var i=pv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hv(this,n)}}function hv(e,t){return!t||"object"!==sv(t)&&"function"!=typeof t?dv(e):t}function dv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pv(e){return(pv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yv={240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},mv=Fu.getComponent("MenuButton"),gv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lv(e,t)}(o,e);var t,n,r,i=fv(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0;var r=n.player_.qualityLevels(),a=n.update.bind(dv(n));return r.on("addqualitylevel",a),r.on("removequalitylevel",a),e.one("dispose",(function(){r.removeEventListener("addqualitylevel",a),r.removeEventListener("removequalitylevel",a)})),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(cv(pv(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(cv(pv(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[],t=this.player_.qualityLevels();e.push(new Yf(this.player_,{label:"Quality"}));for(var n=0;n<t.length;n++){var r=t[n];if(r){var i=yv[r.id];i&&e.push(new av(this.player_,{qualityId:r.id,label:i,selectable:!0,multiSelectable:!1}))}}return e}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.qualityLevels(),t=e[e.selectedIndex];return t?yv[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){mv.prototype.handleClick.apply(this)}}])&&uv(t.prototype,n),r&&uv(t,r),o}(mv);Fu.registerComponent("QualityButton",gv);n(1138);function vv(e){return(vv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _v(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)}}function Tv(e,t,n){return(Tv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=kv(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function wv(e,t){return(wv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kv(e);if(t){var i=kv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cv(this,n)}}function Cv(e,t){return!t||"object"!==vv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kv(e){return(kv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ev=Fu.getComponent("Menu"),Iv=Fu.getComponent("MenuButton"),Ov=Fu.getComponent("PlaybackRateMenuItem"),xv=Fu.getComponent("PlaybackRateMenuButton"),Pv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wv(e,t)}(o,e);var t,n,r,i=Sv(o);function o(){var e;return bv(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=Iv.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Tv(kv(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createMenu",value:function(){var e=new Ev(this.player(),{menuButton:this});e.addItem(new Yf(this.player_,{label:"Playback Speed"}));var t=this.playbackRates();if(t)for(var n=0;n<t.length;n++){var r=t[n]+"x";1===t[n]&&(r+=" (Normal)"),e.addItem(new Ov(this.player(),{rate:r}))}return e}},{key:"handleClick",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=Iv.prototype.handleClick).apply.apply(e,[this].concat(n))}},{key:"updateLabel",value:function(){var e;this.setupLabelEl();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=xv.prototype.updateLabel).apply.apply(e,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var e=this.$("button");e&&(this.labelEl_=Fu.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&_v(t.prototype,n),r&&_v(t,r),o}(xv);function Av(e){return(Av="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rv(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)}}function jv(e,t){return(jv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nv(e);if(t){var i=Nv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Mv(this,n)}}function Mv(e,t){return!t||"object"!==Av(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Nv(e){return(Nv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("PlaybackRateMenuButton",Pv);var Bv=Fu.getComponent("TextTrackSettings"),Uv={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},Fv={small:Uv,medium:Object.assign(Object.assign({},Uv),{fontPercent:1.5}),large:Object.assign(Object.assign({},Uv),{fontPercent:2})},Vv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jv(e,t)}(o,e);var t,n,r,i=Dv(o);function o(){return Lv(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setSizeSetting",value:function(e){this.size_=e,this.player_.getChild("textTrackDisplay").updateDisplay(),this.player_.getChild("collapserator").getChild("subtitleSizeButton").update(),this.player_.trigger("resizemenus"),this.player_.trigger("changesubtitlesize",this.size_)}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return Fv[this.size_]?Fv[this.size_]:Uv}}])&&Rv(t.prototype,n),r&&Rv(t,r),o}(Bv);Fu.registerComponent("TextTrackSettings",Vv);n(1139);function Hv(e){return(Hv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zv(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)}}function qv(e,t,n){return(qv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Kv(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Gv(e,t){return(Gv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Kv(e);if(t){var i=Kv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xv(this,n)}}function Xv(e,t){return!t||"object"!==Hv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Kv(e){return(Kv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $v=window.navigator&&window.navigator.userAgent||"",Qv=(/iPod/i.test($v),/Android/i.test($v),Fu.getComponent("Player")),Zv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gv(e,t)}(o,e);var t,n,r,i=Yv(o);function o(){return Wv(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"lock",value:function(e){this.callback_=e}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(e,t){var n=this;if("number"!=typeof e||!this.callback_||t)return qv(Kv(o.prototype),"currentTime",this).call(this,e);this.callback_((function(){n.unlock(),n.currentTime(e)}))}},{key:"play",value:function(){var e=this;if(!this.callback_)return qv(Kv(o.prototype),"play",this).call(this);this.callback_((function(){e.unlock(),e.play()}))}},{key:"updateStyleEl_",value:function(){if(Qv.prototype.updateStyleEl_.call(this),this.options_.fluid){var e=this.el_.parentNode;if(e&&this.options_.setMaxHeight){var t=this.aspectRatio();void 0!==t&&"auto"!==t||(t=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9");var n=t.split(":"),r=+n[1]/+n[0];e.style.maxWidth=85/r+"vh",e.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var e=this;Qv.prototype.listenForUserActivity_.call(this);var t=this.getChild("collapserator");t.on("mouseenter",(function(){e.player().cache_.inactivityTimeout=e.player().options_.inactivityTimeout,e.player().options_.inactivityTimeout=0})),t.on("mouseleave",(function(){e.player().options_.inactivityTimeout=e.player().cache_.inactivityTimeout}))}}])&&zv(t.prototype,n),r&&zv(t,r),o}(Qv);Zv.prototype.options_=Object.assign(Object.assign({},Qv.prototype.options_),{setMaxHeight:!0}),Fu.registerComponent("player",Zv);n(1140);function Jv(e){return(Jv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eb(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)}}function tb(e,t){return(tb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ob(e);if(t){var i=ob(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return rb(this,n)}}function rb(e,t){return!t||"object"!==Jv(t)&&"function"!=typeof t?ib(e):t}function ib(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ob(e){return(ob=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ab=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tb(e,t)}(o,e);var t,n,r,i=nb(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).player_.addClass("cv-disable-play-pause-feedback"),n.onFirstPlay=n.onFirstPlay.bind(ib(n)),n.player_.one("firstplay",n.onFirstPlay),n}return t=o,(n=[{key:"dispose",value:function(){this.player_.off("firstplay",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var e=this;window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return Fu.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&eb(t.prototype,n),r&&eb(t,r),o}(Fu.getComponent("Component"));Fu.registerComponent("PlayPauseFeedback",ab);n(1141);function sb(e){return(sb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ub(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cb(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)}}function lb(e,t){return(lb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=db(e);if(t){var i=db(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hb(this,n)}}function hb(e,t){return!t||"object"!==sb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function db(e){return(db=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pb=Fu.getComponent("PlayToggle"),yb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lb(e,t)}(o,e);var t,n,r,i=fb(o);function o(){return ub(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleClick",value:function(e){var t=this;pb.prototype.handleClick.call(this,e),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&cb(t.prototype,n),r&&cb(t,r),o}(pb);Fu.registerComponent("PlayToggle",yb);var mb;n(1142),n(1143),n(1144),n(1145),n(1146);function gb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vb(e){e.paused()?e.play():e.pause()}function bb(e,t){e.currentTime(e.currentTime()+t)}function _b(e,t){e.volume(e.volume()+t)}var Tb=(gb(mb={},"f",(function(e){document[e.fsApi_.fullscreenEnabled]&&(e.isFullscreen()?e.exitFullscreen():e.requestFullscreen())})),gb(mb,"m",(function(e){var t=e.volume(),n=e.lastVolume_();if(0===t){var r=n<.1?.1:n;e.volume(r),e.muted(!1)}else e.muted(!e.muted())})),gb(mb,"k",vb),gb(mb,"space",vb),gb(mb,"left",(function(e){return bb(e,-5)})),gb(mb,"right",(function(e){return bb(e,5)})),gb(mb,"j",(function(e){return bb(e,-10)})),gb(mb,"l",(function(e){return bb(e,10)})),gb(mb,"up",(function(e){return _b(e,.05)})),gb(mb,"down",(function(e){return _b(e,-.05)})),mb);function wb(e){var t=b()(e);Tb[t]&&(["space"].includes(t)&&(e.preventDefault(),e.stopPropagation()),Tb[t](this,e))}function Sb(e){return(Sb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cb(e,t){return!t||"object"!==Sb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kb(e){var t="function"==typeof Map?new Map:void 0;return(kb=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Eb(e,arguments,xb(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ob(r,e)})(e)}function Eb(e,t,n){return(Eb=Ib()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Ob(i,n.prototype),i}).apply(null,arguments)}function Ib(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Ob(e,t){return(Ob=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xb(e){return(xb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ob(e,t)}(i,e);var t,n,r=(t=i,n=Ib(),function(){var e,r=xb(t);if(n){var i=xb(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return Cb(this,e)});function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=r.call(this,e)).url=t,n}return i}(kb(Error));function Ab(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)}}var Lb=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Rb=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tokens={gateway:null}}var t,n,r;return t=e,(n=[{key:"get",value:function(e,t){return Lb(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=this,n.next=3,fetch(e,{method:"GET",mode:"cors",headers:this.getHeaders(t)});case 3:return n.t1=n.sent,n.next=6,n.t0.parseResponse.call(n.t0,n.t1);case 6:return n.abrupt("return",n.sent);case 7:case"end":return n.stop()}}),n,this)})))}},{key:"delete",value:function(e,t){return Lb(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fetch(e,{method:"DELETE",headers:this.getHeaders(t)});case 2:case"end":return n.stop()}}),n,this)})))}},{key:"post",value:function(e,t,n){return Lb(this,void 0,void 0,regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(e,{method:"POST",headers:this.getHeaders(n),body:t,mode:"cors"});case 3:return r.t1=r.sent,r.next=6,r.t0.parseResponse.call(r.t0,r.t1);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"put",value:function(e,t,n){return Lb(this,void 0,void 0,regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(e,{method:"PUT",headers:this.getHeaders(n),body:t,mode:"cors"});case 3:return r.t1=r.sent,r.next=6,r.t0.parseResponse.call(r.t0,r.t1);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"setToken",value:function(e,t){this.tokens[e]=t}},{key:"getHeaders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={"Content-Type":"application/json"};return this.tokens[e.tokenName]&&(t.authorization="Bearer ".concat(this.tokens[e.tokenName])),t}},{key:"parseResponse",value:function(e){return Lb(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(404!==e.status){t.next=2;break}return t.abrupt("return",null);case 2:if(e.ok){t.next=4;break}throw new Pb("Ajax error",e.url);case 4:return t.next=6,e.json();case 6:return n=t.sent,t.abrupt("return",n);case 8:case"end":return t.stop()}}),t)})))}}])&&Ab(t.prototype,n),r&&Ab(t,r),e}()),jb=n(198),Db="URLSearchParams"in self,Mb="Symbol"in self&&"iterator"in Symbol,Nb="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),Bb="FormData"in self,Ub="ArrayBuffer"in self;if(Ub)var Fb=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Vb=ArrayBuffer.isView||function(e){return e&&Fb.indexOf(Object.prototype.toString.call(e))>-1};function Hb(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function Wb(e){return"string"!=typeof e&&(e=String(e)),e}function zb(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Mb&&(t[Symbol.iterator]=function(){return t}),t}function qb(e){this.map={},e instanceof qb?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function Gb(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Yb(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Xb(e){var t=new FileReader,n=Yb(t);return t.readAsArrayBuffer(e),n}function Kb(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function $b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Nb&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Bb&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Db&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Ub&&Nb&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Kb(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Ub&&(ArrayBuffer.prototype.isPrototypeOf(e)||Vb(e))?this._bodyArrayBuffer=Kb(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Db&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Nb&&(this.blob=function(){var e=Gb(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?Gb(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(Xb)}),this.text=function(){var e,t,n,r=Gb(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=Yb(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Bb&&(this.formData=function(){return this.text().then(Jb)}),this.json=function(){return this.text().then(JSON.parse)},this}qb.prototype.append=function(e,t){e=Hb(e),t=Wb(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},qb.prototype.delete=function(e){delete this.map[Hb(e)]},qb.prototype.get=function(e){return e=Hb(e),this.has(e)?this.map[e]:null},qb.prototype.has=function(e){return this.map.hasOwnProperty(Hb(e))},qb.prototype.set=function(e,t){this.map[Hb(e)]=Wb(t)},qb.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},qb.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),zb(e)},qb.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),zb(e)},qb.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),zb(e)},Mb&&(qb.prototype[Symbol.iterator]=qb.prototype.entries);var Qb=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Zb(e,t){var n,r,i=(t=t||{}).body;if(e instanceof Zb){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new qb(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new qb(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),Qb.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function Jb(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function e_(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"",this.headers=new qb(t.headers),this.url=t.url||"",this._initBody(e)}Zb.prototype.clone=function(){return new Zb(this,{body:this._bodyInit})},$b.call(Zb.prototype),$b.call(e_.prototype),e_.prototype.clone=function(){return new e_(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new qb(this.headers),url:this.url})},e_.error=function(){var e=new e_(null,{status:0,statusText:""});return e.type="error",e};var t_=[301,302,303,307,308];e_.redirect=function(e,t){if(-1===t_.indexOf(t))throw new RangeError("Invalid status code");return new e_(null,{status:t,headers:{location:e}})};var n_=self.DOMException;try{new n_}catch(e){(n_=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),n_.prototype.constructor=n_}function r_(e,t){return new Promise((function(n,r){var i=new Zb(e,t);if(i.signal&&i.signal.aborted)return r(new n_("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new qb,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){n(new e_(i,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new n_("Aborted","AbortError"))}),0)},o.open(i.method,function(e){try{return""===e&&self.location.href?self.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(Nb?o.responseType="blob":Ub&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),i.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}r_.polyfill=!0,self.fetch||(self.fetch=r_,self.Headers=qb,self.Request=Zb,self.Response=e_);var i_=n(1147),o_=n.n(i_),a_=n(1148);function s_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u_(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c_={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i};function l_(e,t,n){var r=s_(t.exec(n)||[],1)[0];return r||(r="Unknown"),{name:e,version:r}}function f_(e,t,n){if(!t)return{name:e,version:"Unknown"};var r=t.exec(n);return{name:e,version:r&&r.length?r[0].trim():"Unknown"}}var h_=function(){var e=window.navigator.userAgent;return c_.android.test(e)?f_("Android",c_.androidVersion,e):c_.iphone.test(e)||c_.ipad.test(e)?f_("iOS",c_.iosVersion,e):c_.linux.test(e)?f_("Linux",null,e):c_.unix.test(e)?f_("Unix",null,e):c_.mac.test(e)?f_("Macintosh",c_.osxVersion,e):c_.windows.test(e)?function(e,t){var n={name:e,version:null};return c_.win2000.test(t)&&(n.version="2000"),c_.winXP.test(t)&&(n.version="XP"),c_.winVista.test(t)&&(n.version="Vista"),c_.win7.test(t)&&(n.version="7"),c_.win8.test(t)&&(n.version="8"),c_.win81.test(t)&&(n.version="8.1"),c_.win10.test(t)&&(n.version="10"),n.version||(n.version="Unknown"),n}("Windows",e):c_.blackberry.test(e)?f_("BlackBerry",c_.blackberryVersion,e):c_.windowsPhone.test(e)?f_("Windows Phone",c_.windowsPhoneVersion,e):{name:"Unknown",version:"Unknown"}},d_=function(){var e=window.navigator.userAgent;return c_.chrome.test(e)?l_("Chrome",c_.generalVersion,e):c_.firefox.test(e)?l_("Firefox",c_.generalVersion,e):c_.safari.test(e)?l_("Safari",c_.generalVersion,e):c_.ie.test(e)?l_("Internet Explorer",c_.ieVersion,e):c_.edge.test(e)?l_("Edge",c_.edgeVersion,e):c_.opera.test(e)?l_("Opera",c_.operaVersion,e):{name:"Unknown",version:"Unknown"}};function p_(e){return(p_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var y_,m_=function(e){var t=p_(e);return"function"===t||"object"===t&&!!e},g_=function(e){return"function"==typeof e},v_=n(270),b_=n(267);!function(e){e.CvApSoutheast1="cv-ap-southeast-1",e.CvApSoutheast2="cv-ap-southeast-2",e.CvEuWest1="cv-eu-west-1",e.CvNaWest1="cv-na-west-1"}(y_||(y_={}));var __={CvApSoutheast1:{systemName:y_.CvApSoutheast1},CvApSoutheast2:{systemName:y_.CvApSoutheast2},CvEuWest1:{systemName:y_.CvEuWest1},CvNaWest1:{systemName:y_.CvNaWest1}};function T_(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)}}var w_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},S_=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){this.validateOptions()}},{key:"name",get:function(){return"CollectionApiClient"}},{key:"log",value:function(e){return w_(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Array.isArray(e)){t.next=2;break}return t.abrupt("return",this.logBulk(e));case 2:if(this.shouldLog(e)){t.next=4;break}return t.abrupt("return");case 4:return this.validateEvent(e),t.t0=this,t.next=8,this.formatData(e);case 8:return t.t1=t.sent,t.next=11,t.t0.postData.call(t.t0,t.t1);case 11:case"end":return t.stop()}}),t,this)})))}},{key:"logBulk",value:function(e){return w_(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.filter((function(e){return i.shouldLog(e)}))).length){t.next=3;break}return t.abrupt("return");case 3:return n.forEach((function(e){return i.validateEvent(e)})),t.next=6,Promise.all(n.map((function(e){return i.formatData(e)})));case 6:return r=t.sent,t.next=9,this.postData(r);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"validateOptions",value:function(){if(!g_(this.options.getUser))throw new Error("getUser option is required.")}},{key:"shouldLog",value:function(e){return!g_(this.options.shouldLog)||this.options.shouldLog(e)}},{key:"postData",value:function(e){return w_(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegionalUrl(this.options.collectionApiUrls);case 2:return n=t.sent,r=JSON.stringify(e),i=Object.assign({"Content-Type":"application/json"},this.getSignatureHeader(r)),o=v_.a.safeUrlConcat(n,"/v1/ingest"),Array.isArray(e)&&(o=v_.a.safeUrlConcat(o,"/bulk")),t.next=9,fetch(o,{method:"POST",mode:"cors",headers:i,body:r});case 9:case"end":return t.stop()}}),t,this)})))}},{key:"getSignatureHeader",value:function(e){var t=new o_.a("SHA-1","TEXT",{hmacKey:{value:"zXJL9nOHxzDlMUDjiP41",format:"TEXT",encoding:"UTF8"}});return t.update(e),{"cv-analytics-signature":"".concat(this.options.collectionApiClientId,".").concat(t.getHash("B64"))}}},{key:"getRegionalUrl",value:function(e){return w_(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegion();case 2:n=t.sent,t.t0=n.systemName,t.next=t.t0===y_.CvEuWest1?6:t.t0===y_.CvApSoutheast2?7:t.t0===y_.CvNaWest1?8:(t.t0,y_.CvApSoutheast1,9);break;case 6:return t.abrupt("return",e.cvEuWest1);case 7:return t.abrupt("return",e.cvApSoutheast2);case 8:return t.abrupt("return",e.cvNaWest1);case 9:return t.abrupt("return",e.cvApSoutheast1);case 10:case"end":return t.stop()}}),t,this)})))}},{key:"validateEvent",value:function(e){if("string"!=typeof e.type)throw new Error("Event type is required.");if(!m_(e.actionContext))throw new Error("Event actionContext is required.");if(!e.actionContext.entity)throw new Error("Event actionContext entity is required.")}},{key:"formatData",value:function(e){return w_(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=e.type,t.next=3,this.getEventData(e);case 3:return t.t1=t.sent,t.t2=this.getEventMetadata(e),t.abrupt("return",{type:t.t0,data:t.t1,metadata:t.t2});case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getEventData",value:function(e){return w_(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i,o,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.actionContext,t.next=3,this.getUserData();case 3:return r=t.sent,i={user:r,action:n,platform:this.getPlatformMetadata(),product:{name:this.options.productName,version:this.options.productVersion}},o=this.extractData(e),a=Object.keys(i).map((function(e){return e.toLowerCase()})),s=Object.keys(o).map((function(e){return e.toLowerCase()})),a.forEach((function(e){if(s.includes(e))throw Error("".concat(e," is a reserved key."))})),t.abrupt("return",Object.assign(Object.assign({},i),o));case 10:case"end":return t.stop()}}),t,this)})))}},{key:"extractData",value:function(e){return g_(this.options.formatData)?this.options.formatData(e):(t={},n=e.actionContext.entity,r=e.data,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t);var t,n,r}},{key:"getUserData",value:function(){var e,t;return w_(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.options.getUser();case 3:if(null==(r=n.sent)?void 0:r.id){n.next=6;break}return n.abrupt("return");case 6:return n.t0=r.id,n.t1=(null===(e=r.role)||void 0===e?void 0:e.toLowerCase())||"unknown",n.t2=(null===(t=r.userGroup)||void 0===t?void 0:t.toLowerCase())||b_.a.Unknown,n.t3=this.normalizeYearGroup(r.yearGroup),n.t4=r.customerId,n.t5=r.customerName,n.t6=r.customerGuid,n.t7=r.crmId,n.t8=r.countryCode,n.next=17,this.getRegion();case 17:return n.t9=n.sent,n.t10=r.isOpenCustomer,n.t11={id:n.t4,name:n.t5,customerGuid:n.t6,crmId:n.t7,country:n.t8,region:n.t9,openCustomer:n.t10},n.abrupt("return",{id:n.t0,role:n.t1,userGroup:n.t2,yearGroup:n.t3,customer:n.t11});case 23:n.prev=23,n.t12=n.catch(0);case 25:case"end":return n.stop()}}),n,this,[[0,23]])})))}},{key:"getRegion",value:function(){return w_(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.options.regionName,e.prev=1,e.next=4,this.options.getUser();case 4:(null==(n=e.sent)?void 0:n.instanceRegion)&&(t=n.instanceRegion),e.next=10;break;case 8:e.prev=8,e.t0=e.catch(1);case 10:if(t){e.next=12;break}throw Error("RegionName is not set.");case 12:return e.abrupt("return",this.getRegionByName(t.toLowerCase()));case 13:case"end":return e.stop()}}),e,this,[[1,8]])})))}},{key:"getPlatformMetadata",value:function(){return{browser:d_(),os:h_(),request:{url:window.location.href,referrer:document.referrer},screenResolution:"".concat(window.screen.width,"x").concat(window.screen.height)}}},{key:"getEventMetadata",value:function(e){return{client:{name:"".concat(this.name,".ts"),version:a_.a,region:this.getRegionByName(this.options.regionName)},timestamp:(new Date).toISOString(),eventVersion:e.eventVersion}}},{key:"getRegionByName",value:function(e){var t;return Object.values(__).forEach((function(n){n.systemName===e&&(t=n)})),t}},{key:"normalizeYearGroup",value:function(e){return e?e.toLowerCase().split(" ").join("_"):"unknown"}}])&&T_(t.prototype,n),r&&T_(t,r),e}(),C_=n(36),k_=function(){return!0},E_=function(){return!1};var I_,O_,x_,P_,A_=function(e){return e},L_={getUploadData:function(e,t){var n=t.actionContext.entity;if(n===C_.EntityType.Video)return L_.formatVideoUpload(e,t);if(n===C_.EntityType.Resource||n===C_.EntityType.Subtitle)return L_.formatResourceUpload(e);if(n===C_.EntityType.Banner||n===C_.EntityType.Thumbnail)return e;throw new Error("Upload data event not correctly formatted.")},formatVideoUpload:function(e,t){var n=t.actionContext.workflowPhase;return n===C_.WorkflowPhase.Start?L_.getStartVideoUploadData(e):n===C_.WorkflowPhase.Discard?L_.getDiscardVideoUploadData(e):n===C_.WorkflowPhase.Complete?L_.getCompleteUploadData(e):void 0},getStartVideoUploadData:function(e){return e&&e.length?(e instanceof FileList&&(e=Array.from(e)),e.map((function(t){return{fileName:t.name,size:t.size,type:t.type,count:e.length}}))):[]},getDiscardVideoUploadData:function(e){var t=function(t){var n=t.file,r=n.type,i=n.name,o=n.status,a=n.cvUpload,s={fileName:i,count:Array.isArray(e)?e.length:1,type:r,status:o};return t.progress&&(s.progress=t.progress.toFixed(2)),a&&(s.uploadId=a.uploadId),s};return Array.isArray(e)?e.map((function(e){return t(e)})):[t(e)]},getCompleteUploadData:function(e){return e&&e.length?e.map((function(t){return{fileName:t.fileName,libraryId:t.libraryId,folderId:t.folderId,autoCaption:t.autoCaption,count:e.length}})):[]},formatResourceUpload:function(e){var t={id:e.id,name:e.name};return m_(e.metadata)&&(t.type=e.metadata.type),t}};function R_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var j_=(R_(I_={},C_.UserAction.Navigate,E_),R_(I_,C_.UserAction.Click,k_),R_(I_,C_.UserAction.Search,k_),R_(I_,C_.UserAction.InstantSearch,k_),R_(I_,C_.UserAction.Play,k_),R_(I_,C_.UserAction.Stream,k_),R_(I_,C_.UserAction.WebPlayerStream,k_),R_(I_,C_.UserAction.StreamProgress,k_),R_(I_,C_.UserAction.Rename,k_),R_(I_,C_.UserAction.Move,k_),R_(I_,C_.UserAction.Create,k_),R_(I_,C_.UserAction.Delete,k_),R_(I_,C_.UserAction.Associate,k_),R_(I_,C_.UserAction.Dissociate,k_),R_(I_,C_.UserAction.Filter,k_),R_(I_,C_.UserAction.Sort,k_),R_(I_,C_.UserAction.Approve,k_),R_(I_,C_.UserAction.Reject,k_),R_(I_,C_.UserAction.Disable,k_),R_(I_,C_.UserAction.Upload,k_),R_(I_,C_.UserAction.Download,E_),R_(I_,C_.UserAction.SetAccess,k_),R_(I_,C_.UserAction.AddToLocalCache,E_),R_(I_,C_.UserAction.Share,k_),R_(I_,C_.UserAction.Unshare,k_),R_(I_,C_.UserAction.Edit,k_),R_(I_,C_.UserAction.Suggest,k_),R_(I_,C_.UserAction.Favourite,k_),R_(I_,C_.UserAction.ResolveWarning,k_),R_(I_,C_.UserAction.DismissWarning,k_),R_(I_,C_.UserAction.EditAssoc,k_),R_(I_,C_.UserAction.Follow,k_),R_(I_,C_.UserAction.Print,k_),R_(I_,C_.UserAction.Copy,k_),R_(I_,C_.UserAction.Activate,k_),R_(I_,C_.UserAction.VerifyEmail,k_),R_(I_,C_.UserAction.ChangePassword,k_),R_(I_,C_.UserAction.Export,k_),R_(I_,C_.UserAction.SendEmail,k_),R_(I_,C_.UserAction.Publish,k_),R_(I_,C_.UserAction.Answer,k_),R_(I_,C_.UserAction.Complete,k_),I_),D_=(R_(O_={},C_.UserAction.Search,A_),R_(O_,C_.UserAction.InstantSearch,A_),R_(O_,C_.UserAction.Play,A_),R_(O_,C_.UserAction.Stream,A_),R_(O_,C_.UserAction.StreamProgress,A_),R_(O_,C_.UserAction.Click,A_),R_(O_,C_.UserAction.Filter,A_),R_(O_,C_.UserAction.Sort,A_),R_(O_,C_.UserAction.SetAccess,A_),R_(O_,C_.UserAction.Approve,A_),R_(O_,C_.UserAction.Reject,A_),R_(O_,C_.UserAction.Create,A_),R_(O_,C_.UserAction.Delete,A_),R_(O_,C_.UserAction.Rename,A_),R_(O_,C_.UserAction.Move,A_),R_(O_,C_.UserAction.Edit,A_),R_(O_,C_.UserAction.Share,A_),R_(O_,C_.UserAction.Disable,A_),R_(O_,C_.UserAction.Suggest,A_),R_(O_,C_.UserAction.Upload,L_.getUploadData),R_(O_,C_.UserAction.ResolveWarning,A_),R_(O_,C_.UserAction.DismissWarning,A_),R_(O_,C_.UserAction.Follow,A_),R_(O_,C_.UserAction.Print,A_),R_(O_,C_.UserAction.Copy,A_),O_),M_=(R_(x_={},C_.UserAction.Search,(function(){return"search"})),R_(x_,C_.UserAction.InstantSearch,(function(){return"search"})),R_(x_,C_.UserAction.Filter,(function(){return"filter"})),R_(x_,C_.UserAction.Stream,(function(){return C_.EntityType.Video})),x_),N_={user:"target_user"},B_=(R_(P_={},C_.UserAction.StreamProgress,!0),R_(P_,C_.UserAction.WebPlayerStream,!0),P_),U_={shouldLog:function(e){return!!j_[e.type](e)},formatData:function(e){var t=D_[e.type],n=g_(t)?t(e.data,e):e.data;if(B_[e.type])return n;var r=e.actionContext.entity;return g_(M_[e.type])&&(r=M_[e.type](e)),N_[r]&&(r=N_[r]),R_({},r,n)}};function F_(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)}}var V_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},H_=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}var t,n,r;return t=e,(n=[{key:"logStream",value:function(){var e="v:".concat(this.options.videoId);jb.a.cacheExists(e)||(this.collectionApiClient.log({type:C_.UserAction.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:C_.EventVersion.V2}),jb.a&&jb.a.cacheSet(e,null,300))}},{key:"logVideoProgress",value:function(e){var t=this,n=this.getAnalyticsData();this.collectionApiClient.log(e.map((function(e){return{type:C_.UserAction.StreamProgress,actionContext:t.getActionContext(),data:Object.assign(Object.assign({},n),{progress:e}),eventVersion:C_.EventVersion.V1}})))}},{key:"logUserAction",value:function(e,t){var n=Object.assign(Object.assign({},this.getAnalyticsData()),e);this.collectionApiClient.log({type:t.actionType,data:n,actionContext:{productArea:t.productArea,location:this.getLocationContext(),entity:t.entity,descriptor:t.descriptor,workflowPhase:t.workflowPhase},eventVersion:C_.EventVersion.V1})}},{key:"getAnalyticsData",value:function(){var e=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(e.video.shareId=this.options.shareId);var t=this.getEntityType();return t===C_.EntityType.Interactive?e.interactive={id:this.options.mediaId}:t===C_.EntityType.Clip&&(e.clip={id:this.options.mediaId}),e}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var e=this;this.collectionApiClient=new S_({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return e.getCurrentUser()},shouldLog:U_.shouldLog,formatData:U_.formatData})}},{key:"getCurrentUser",value:function(){return V_(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{id:this.options.userId,customerId:this.options.customerId});case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?C_.PlayerDescriptor.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return C_.EntityType.Video;case"MasterInteractive":return C_.EntityType.Interactive;case"MasterClip":return C_.EntityType.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return C_.LocationContext.Player;case"interactive-player":return C_.LocationContext.InteractivePlayer;case"create-clip-player":return C_.LocationContext.CreateClipPlayer}}}])&&F_(t.prototype,n),r&&F_(t,r),e}();function W_(e){return(W_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function z_(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)}}function q_(e,t,n){return(q_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=K_(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function G_(e,t){return(G_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Y_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=K_(e);if(t){var i=K_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return X_(this,n)}}function X_(e,t){return!t||"object"!==W_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function K_(e){return(K_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G_(e,t)}(o,e);var t,n,r,i=Y_(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options_=t,n}return t=o,(n=[{key:"createEl",value:function(e,t,n){var r="<h1>".concat(this.options_.title,"</h1>");if(!this.options_.seriesName)return q_(K_(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n);var i=this.buildSeasonEpisodeString();return i?(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase()," ").concat(i,"</div>")+r,q_(K_(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n)):(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+r,q_(K_(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var e=this.padNumber(this.options_.seasonNumber,2),t=this.padNumber(this.options_.episodeNumber,2);return"S".concat(e," • E").concat(t)}},{key:"padNumber",value:function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n}}])&&z_(t.prototype,n),r&&z_(t,r),o}(Fu.getComponent("Component"));function Q_(e){return(Q_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z_(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)}}function J_(e,t,n){return(J_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rT(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function eT(e,t){return(eT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rT(e);if(t){var i=rT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nT(this,n)}}function nT(e,t){return!t||"object"!==Q_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rT(e){return(rT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var iT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eT(e,t)}(o,e);var t,n,r,i=tT(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options_=t,n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-splash-warning-container ".concat(J_(rT(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){var r=J_(rT(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n);if(!this.options_.ratingCode)return r;var i=this.mapCodeToColourClass(this.options_.ratingCode);return r.appendChild(Fu.dom.createEl("div",{className:"cv-splash-rating badge rating-badge ".concat(i),innerHTML:this.options_.ratingCode})),this.options_.warning&&r.appendChild(Fu.dom.createEl("div",{className:"cv-splash-warning",innerHTML:this.options_.warning})),r}},{key:"mapCodeToColourClass",value:function(e){switch(e){case"E":return"bg-purple";case"G":return"bg-green";case"PG":return"bg-info";case"M":return"bg-red";case"MA15+":return"bg-pink";case"R18+":return"bg-yellow"}}}])&&Z_(t.prototype,n),r&&Z_(t,r),o}(Fu.getComponent("Component"));function oT(e){return(oT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function aT(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)}}function sT(e,t){return(sT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=lT(e);if(t){var i=lT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return cT(this,n)}}function cT(e,t){return!t||"object"!==oT(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lT(e){return(lT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sT(e,t)}(o,e);var t,n,r,i=uT(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"createEl",value:function(){var e=Fu.dom.createEl("div",{className:"cv-splash-metadata ".concat(this.options_.embed?"cv-embed-splash-metadata":"")});return this.options_.embed&&e.appendChild(new $_(this.player_,{title:this.options_.title,seriesName:this.options_.seriesName,seasonNumber:this.options_.seasonNumber,episodeNumber:this.options_.episodeNumber}).el()),e.appendChild(new iT(this.player_,{warning:this.options_.warning,ratingCode:this.options_.ratingCode}).el()),e}}])&&aT(t.prototype,n),r&&aT(t,r),o}(Fu.getComponent("Component"));n(1149);function hT(e){return(hT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dT(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)}}function pT(e,t,n){return(pT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=vT(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function yT(e,t){return(yT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vT(e);if(t){var i=vT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gT(this,n)}}function gT(e,t){return!t||"object"!==hT(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vT(e){return(vT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yT(e,t)}(o,e);var t,n,r,i=mT(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addChild(new fT(n.player_,n.options_)),n}return t=o,(n=[{key:"createEl",value:function(e,t,n){var r="<div class='cv-player-mask'></div>";return this.options_.embed&&(r+="<div class='cv-embed-logo'>".concat(vc,"</div>")),pT(vT(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:r}),n)}}])&&dT(t.prototype,n),r&&dT(t,r),o}(Fu.getComponent("Component"));function _T(e){return function(e){if(Array.isArray(e))return TT(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return TT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TT(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function TT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wT(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)}}var ST,CT=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},kT=Fu.getComponent("Player"),ET=450,IT=function(){function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamLogged=!1,this.options=Fu.mergeOptions({},e.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(t),this.buildVideoJs(),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready((function(){r._configurePlugins(),r.options.setup&&r.options.setup(r.options,r.player),r.fetch().catch((function(e){r.player.error(e.message),r.options.onError&&r.options.onError(e)}))}))}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(e){var t;null===(t=this.analyticsService)||void 0===t||t.logVideoProgress(e)}},{key:"buildVideoJs",value:function(){return this.player=Fu(this.el,this.getPlayerOptions())}},{key:"getPlayerOptions",value:function(){var e=kT.prototype.options_.children;return e=e.filter((function(e){return"bigPlayButton"!==e&&"posterImage"!==e})),{controls:this.options.controls,fluid:!this.options.embed,fill:!!this.options.embed,inactivityTimeout:500,controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(_T(e),["collapserator","playPauseFeedback"]),userActions:{hotkeys:wb},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0}}},{key:"fetch",value:function(){var e,t,n;return CT(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o,a,s=this;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this.options.fetch,void 0===this.options.fetch&&(i=function(e){var t="".concat(s.options.playerApi.origin,"/api/playback?viewKey=").concat(e);return Rb.get(t)}),this.options.viewKey){r.next=4;break}throw new Error("Please specify a viewKey or a fetch function");case 4:return r.next=6,i(this.options.viewKey);case 6:if(o=r.sent){r.next=9;break}throw new Error("Error fetching playback object");case 9:o.chapters.list.length>0&&(a=this.player.addTextTrack("chapters"),o.chapters.list.forEach((function(e){a.addCue({startTime:e.timestamp,endTime:e.endTimestamp,text:e.name})})),a.trigger({type:"loadeddata",target:a})),this.player.localCache({localCacheAddresses:o.localCacheAddresses,enabled:null===(e=this.options.enableLocalCache)||void 0===e||e}),this.player.progressiveFiles({sources:o.files.progressive.map((function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}}))}),o.subtitles.list.length>0&&(o.subtitles.list.forEach((function(e){"text/vtt"===e.mimeType&&s.player.addRemoteTextTrack({kind:"subtitles",src:e.url,language:e.language,label:e.label},!0)})),this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(t=o.settings)||void 0===t?void 0:t.showSubtitles,subtitleSize:null===(n=o.settings)||void 0===n?void 0:n.playbackSubtitleSizeDefault})),o.posterUrl&&this.player.poster(o.posterUrl),this.options.autoplay||this.setupSplash(o),this.additionalSetup(o),this.options.autoplay&&this.player.ready((function(){s.player.play().catch((function(){s.setupSplash(o)}))})),this.options.startTime&&this.player.currentTime(this.options.startTime);case 18:case"end":return r.stop()}}),r,this)})))}},{key:"fetchConfig",value:function(){var e=this;if(!ST&&!this.options.fetch){var t="".concat(this.options.playerApi.origin,"/api/config");Rb.get(t).then((function(t){ST=t,e.trigger("config:loaded")}))}}},{key:"additionalSetup",value:function(e){var t,n,r,i=this;this.player.persistQualitySettingsPlugin({playbackProfile:null===(t=e.settings)||void 0===t?void 0:t.playbackProfile,playbackProfileLocalCache:null===(n=e.settings)||void 0===n?void 0:n.playbackProfileLocalCache}),this.player.whiteboardModePlugin();var o=this.options.enableLocalCache&&!!(null===(r=e.localCacheAddresses)||void 0===r?void 0:r.length);ST?this.setupAnalyticsService(e,o):this.one("config:loaded",(function(){return i.setupAnalyticsService(e,o)}))}},{key:"setupAnalyticsService",value:function(e,t){this.analyticsService=new H_({collectionApiUrls:ST.collectionApi.urls,collectionApiClientId:ST.collectionApi.clientId,productVersion:Ku.a,regionName:"cv-ap-southeast-1",videoId:e.videoId,mediaId:e.mediaId,userId:e.viewerId,shareId:e.shareId,customerId:e.viewerCustomerId,mediaType:e.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:!!this.options.embed,isUsingLocalCache:t,additionalAnalyticsData:this.getAdditionalAnalyticsData(e)}),this.on("timeupdate",this.logStream)}},{key:"getAdditionalAnalyticsData",value:function(e){return{}}},{key:"logStream",value:function(){this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(e){var t;"string"==typeof e?(e=function(e){return 0===e.indexOf("#")?e.slice(1):e}(e),t=Fu.dom.$("#"+e)):t=e;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=Fu.dom.createEl("video",{},{class:n}),t.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(e,t){this.player.on(e,t)}},{key:"one",value:function(e,t){this.player.one(e,t)}},{key:"off",value:function(e,t){this.player.off(e,t)}},{key:"trigger",value:function(e,t){return this.player.trigger(e,t)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(e){this.player.ready(e)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"currentTime",value:function(e){return this.player.currentTime(e)}},{key:"bindEventListeners",value:function(){var e=this,t=function(){return e.configureMenuDimensions()};if(this.player.ready(t),this.on("resize",t),this.on("fullscreenchange",t),this.one("play",t),this.on("resizemenus",t),this.player.one("dispose",(function(){e.off("resize",t),e.off("fullscreenchange",t),e.off("resizemenus",t)})),this.options.hotkeyElQuerySelector){var n=Fu.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){e.player.off(n,"keydown",e.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var e=this.getSeekBarName(),t=this.player.controlBar.getChild("progressControl");t.addChild(e,this.getSeekBarOptions()),t.setSeekBarName(e)}},{key:"setupSplash",value:function(e){var t=this.player.addChild("posterImage");this.player.addChild("bigPlayButton");var n=new bT(this.player,{embed:this.options.embed,posterUrl:e.posterUrl,title:e.title,ratingCode:e.ratingCode,seriesName:e.seriesName,seasonNumber:e.seasonNumber,episodeNumber:e.episodeNumber});t.addChild(n),t.show()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}},{key:"configureMenuDimensions",value:function(){var e=this;if(this.player.isFullscreen()){var t=this.player.whiteboardModePlugin().side;if("top"===t){var n=this.player.getChild("collapserator"),r=n.getChild("volumePanel"),i=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:!1},i)}else{var o=this.player.getChild("collapserator"),a=o.getChild("volumePanel"),s=o.children_.indexOf(a);o.removeChild(a),o.addChild("volumePanel",{inline:!0},s)}if("left"===t||"right"===t||"top"===t){var u=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(e){e.style.paddingTop=null,e.style.marginBottom=null,e.style.width="calc(".concat(u,"px - 4em)")}))}}var c=this.player.currentWidth(),l=this.player.currentHeight()/c*100,f=this.player.el().querySelector(".cv-collapsorator"),h=this.player.el().querySelectorAll(".vjs-menu"),d=f&&f.offsetHeight;d?("CreateClipSeekBar"===this.getSeekBarName()&&(d+=22),h&&h.length&&h.forEach((function(t){t.style.paddingTop="calc(".concat(l,"% - ").concat(d,"px)"),t.style.marginBottom="".concat(d,"px"),t.style.width=null,t.querySelector(".vjs-menu-content")&&(c<=ET?e.player.addClass("cv-player-small"):e.player.removeClass("cv-player-small"))}))):this.one("play",(function(){return e.configureMenuDimensions()}))}}])&&wT(t.prototype,n),r&&wT(t,r),e}();IT.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0};var OT=n(1035),xT=n.n(OT),PT=n(1150),AT=n.n(PT),LT=n(1022);function RT(e){var t,n=e.interactive.timepoints.find((function(t){var n=t.visibleAt/1e3;return Math.floor(e.time)===Math.floor(n)||Math.ceil(e.time)===Math.ceil(n)}));if(!(null===(t=null==n?void 0:n.interactions)||void 0===t?void 0:t.length))return i.a.createElement(i.a.Fragment,null);var r=n.interactions.length>3?n.interactions.slice(0,2):n.interactions,o=n.interactions.length-r.length;return i.a.createElement("div",{className:"d-flex justify-content-end ml-2"},r.map((function(e,t){return i.a.createElement(LT.a,{key:t,interaction:e,showQuestion:!1,iconClassName:"ml-1"})})),!!o&&i.a.createElement("div",{className:"interaction-type-icon d-flex justify-content-center align-items-center border border-dark text-body ml-1"},"+".concat(o)))}function jT(e){return function(e){if(Array.isArray(e))return DT(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return DT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DT(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var MT={title:{text:null},xAxis:{visible:!1,minPadding:0,maxPadding:0},legend:{enabled:!1},credits:{enabled:!1},defs:{gradient:{tagName:"linearGradient",id:"area-gradient",x1:0,y1:1,x2:0,y2:0,children:[{tagName:"stop",offset:0},{tagName:"stop",offset:1}]}}};function NT(e,t){return{styledMode:!0,spacing:[15,0,0,0],width:e,height:t}}function BT(e){return{formatter:function(){var t=e?function(e,t){return AT.a.renderToStaticMarkup(i.a.createElement(RT,{time:t,interactive:e}))}(e,this.x):"";return'<div class="cv-engagement-tooltip bg-white rounded"><div class="d-flex justify-content-between">'+"<strong>".concat(Qy(this.x),"</strong>")+"".concat(t)+'</div><div class="d-flex justify-content-between rounded bg-light cv-view-count-container">'+'<strong>Views</strong> <span class="cv-view-count">'.concat(this.y,"</span>")+"</div></div>"},positioner:function(e,t,n){var r=this.chart.plotWidth-e,i=n.plotX-e/2;return{x:Math.min(Math.max(i,0),r),y:this.chart.plotTop}},useHTML:!0,padding:0}}n(1153);function UT(e){return(UT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function FT(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)}}function VT(e,t,n){return(VT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=qT(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function HT(e,t){return(HT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function WT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qT(e);if(t){var i=qT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zT(this,n)}}function zT(e,t){return!t||"object"!==UT(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qT(e){return(qT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var GT=Fu.getComponent("Component");xT.a.AST.allowedTags.push("g"),xT.a.AST.allowedAttributes.push("viewBox","transform");var YT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&HT(e,t)}(o,e);var t,n,r,i=WT(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).initialize(),n.bindListeners(),n}return t=o,(n=[{key:"initialize",value:function(){var e=this;this.player().ready((function(){return e.buildChart()}))}},{key:"buildCSSClass",value:function(){return"cv-engagement-overlay"}},{key:"createEl",value:function(e,t,n){return VT(qT(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:'<div class="cv-engagement-chart"></div><div class="cv-engagement-timepoint-indicator"></div>'}),n)}},{key:"toggleChart",value:function(e){e?this.buildChart():this.destroyChart()}},{key:"bindListeners",value:function(){var e=this;this.handleClick=this.handleClick.bind(this),this.resizeChart=this.resizeChart.bind(this),this.player().on("playerresize",this.resizeChart),this.on(this.el(),"mouseup",this.handleClick),this.player().on("dispose",(function(){e.player().off("playerresize",e.resizeChart),e.off(e.el(),"mouseup",e.handleClick)}))}},{key:"handleClick",value:function(e){Fu.dom.isSingleLeftClick(e)&&(this.player().paused()?this.player().play():this.player().pause())}},{key:"buildChart",value:function(){var e=this;if(!this.chart){var t=this.getChartDimensions();if(t){var n=this.el().querySelector(".cv-engagement-chart");this.chart=xT.a.chart(n,this.getHighchartOptions(t))}else this.player().one("play",(function(){return e.buildChart()}))}}},{key:"resizeChart",value:function(){var e=this.getChartDimensions();this.chart&&e&&this.chart.setSize(e.width,e.height)}},{key:"destroyChart",value:function(){var e;null===(e=this.chart)||void 0===e||e.destroy(),this.chart=null}},{key:"getChartDimensions",value:function(){var e=this.player().getChild("collapserator"),t=null==e?void 0:e.currentHeight(),n=this.el().clientWidth;return t&&n?{width:n,height:this.player().currentDimensions().height-t}:null}},{key:"getHighchartOptions",value:function(e){var t,n,r=e.width,i=e.height;return Object.assign(Object.assign({},MT),{chart:NT(r,i),yAxis:(n=this.options_.heatMap,{max:1.05*Math.max.apply(Math,jT(n)),min:0,minPadding:0,maxPadding:0,allowDecimals:!0,startOnTick:!1,endOnTick:!1,visible:!1}),tooltip:BT(this.options_.interactive),plotOptions:(t=this.moveTimepointIndicator.bind(this),{area:{point:{events:{mouseOver:function(){t(this.x)},mouseOut:function(){t(null)}}}}}),series:[{type:"area",data:this.options_.heatMap}]})}},{key:"moveTimepointIndicator",value:function(e){this.options_.onTimepointHover&&this.options_.onTimepointHover(e);var t=this.el().querySelector(".cv-engagement-timepoint-indicator");null!==e?(Fu.dom.addClass(t,"cv-engagement-timepoint-indicator-visible"),t.style.left="".concat(e/this.options_.heatMap.length*100,"%")):Fu.dom.removeClass(t,"cv-engagement-timepoint-indicator-visible")}}])&&FT(t.prototype,n),r&&FT(t,r),o}(GT);function XT(e){return(XT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function KT(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)}}function $T(e,t,n){return($T="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ew(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function QT(e,t){return(QT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ZT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ew(e);if(t){var i=ew(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return JT(this,n)}}function JT(e,t){return!t||"object"!==XT(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ew(e){return(ew=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("EngagementOverlay",YT);var tw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&QT(e,t)}(o,e);var t,n,r,i=ZT(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).overlayVisible=t.overlayVisible,n.toggle(n.overlayVisible),n}return t=o,(n=[{key:"handleToggle",value:function(){this.toggle(!this.overlayVisible)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){Fu.dom.addClass(this.toggleEl,"on"),this.overlayVisible=!0,this.player().engagementOverlayPlugin().toggleOverlay(this.overlayVisible),this.player().addClass("cv-reports-player-overlay-visible")}},{key:"toggleOff",value:function(){Fu.dom.removeClass(this.toggleEl,"on"),this.overlayVisible=!1,this.player().engagementOverlayPlugin().toggleOverlay(this.overlayVisible),this.player().removeClass("cv-reports-player-overlay-visible")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=Fu.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=$T(ew(o.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Heat Map</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&KT(t.prototype,n),r&&KT(t,r),o}(Fu.getComponent("MenuItem"));function nw(e){return(nw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rw(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)}}function iw(e,t){return(iw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ow(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sw(e);if(t){var i=sw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return aw(this,n)}}function aw(e,t){return!t||"object"!==nw(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sw(e){return(sw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("EngagementOverlayMenuItem",tw);var uw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&iw(e,t)}(o,e);var t,n,r,i=ow(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){var e;this.hasHeatMapData()&&(this.player.addChild("engagementOverlay",{heatMap:this.options.heatMap,interactive:this.options.interactive,onTimepointHover:this.options.onTimepointHover}),(null===(e=this.player.getChild("collapserator"))||void 0===e?void 0:e.getChild("cogButton")).addItem({index:0,ctor:tw,name:"EngagementOverlayMenuItem",options:{overlayVisible:!0}}))}},{key:"toggleOverlay",value:function(e){var t=this.player.getChild("engagementOverlay");null==t||t.toggleChart(e)}},{key:"hasHeatMapData",value:function(){var e;return(null===(e=this.options.heatMap)||void 0===e?void 0:e.reduce((function(e,t){return e+t}),0))>0}}])&&rw(t.prototype,n),r&&rw(t,r),o}(Fu.getPlugin("plugin"));function cw(e){return(cw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lw(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)}}function fw(e,t,n){return(fw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=mw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function hw(e,t){return(hw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=mw(e);if(t){var i=mw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pw(this,n)}}function pw(e,t){return!t||"object"!==cw(t)&&"function"!=typeof t?yw(e):t}function yw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mw(e){return(mw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("engagementOverlayPlugin",uw);var gw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hw(e,t)}(o,e);var t,n,r,i=dw(o);function o(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e),void 0===t.startTime)throw Error("Invalid clip start");if(void 0===t.endTime)throw Error("Invalid clip end");if(t.startTime>t.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=t.startTime,n._clipEnd=t.endTime,n.playerEndedFn=n.player.ended.bind(e),n.playerDurationFn=n.player.duration.bind(e),n.playerCurrentTimeFn=n.player.currentTime.bind(e),n.playerbufferedFn=n.player.buffered.bind(e),n.player.ended=n.ended.bind(yw(n)),n.player.duration=n.duration.bind(yw(n)),n.player.currentTime=n.currentTime.bind(yw(n)),n.player.buffered=n.buffered.bind(yw(n)),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return t=o,(n=[{key:"clipStart",get:function(){var e=this.playerDurationFn();return this._clipStart>e?e:this._clipStart}},{key:"clipEnd",get:function(){var e=this.playerDurationFn();return this._clipEnd>e?e:this._clipEnd}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.player.off("play",this.onPlay),this.player.ended=this.playerEndedFn,this.player.duration=this.playerDurationFn,this.player.currentTime=this.playerCurrentTimeFn,this.player.buffered=this.playerbufferedFn,this.player.trigger("durationchange"),fw(mw(o.prototype),"dispose",this).call(this)}},{key:"initialize",value:function(){this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay)}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var e=this.getCurrentTime(!1);e>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,e<this.clipStart&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(e){return void 0!==e&&this.playerDurationFn(e),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(e){if(void 0===e)return this.getCurrentTime(!0);for(var t=e+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.playerCurrentTimeFn.apply(this,[t].concat(r))}},{key:"getCurrentTime",value:function(e){var t=this.playerCurrentTimeFn(),n=0;return t>=this.clipStart&&(n=t-this.clipStart),this.player.getCache().currentTime=n,e?n:t}},{key:"buffered",value:function(){for(var e=this.playerbufferedFn(),t=[],n=0;n<e.length;n++)t[n]=[Math.max(0,e.start(n)-this.clipStart),Math.min(Math.max(0,e.end(n)-this.clipStart),this.player.duration())];return Fu.createTimeRanges(t)}}])&&lw(t.prototype,n),r&&lw(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("clipPlugin",gw);var vw=n(1023);n(1154);function bw(e){return(bw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _w(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)}}function Tw(e,t,n){return(Tw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=kw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ww(e,t){return(ww=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kw(e);if(t){var i=kw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cw(this,n)}}function Cw(e,t){return!t||"object"!==bw(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kw(e){return(kw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ew=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ww(e,t)}(o,e);var t,n,r,i=Sw(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).timepoint_=t.timepoint,n.time_=t.timepoint.visibleAt/1e3;var r=t.timepoint.interactions[0];r||n.hide();var a=vw.a.getTypeInfo(r.typeId).bgClassName;return n.$(".vjs-icon-placeholder").classList.add(a),n.controlText(r.name),n.update(),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-item ".concat(Tw(kw(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Tw(kw(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),Object.assign(Object.assign({},n),{tabIndex:0}))}},{key:"update",value:function(){var e=this.player_.duration(),t=this.time_/e;this.el().style.left=100*t+"%",t>100||t<0?this.hide():this.show()}},{key:"handleClick",value:function(e){e.stopPropagation(),this.player_.currentTime(this.time_)}}])&&_w(t.prototype,n),r&&_w(t,r),o}(Fu.getComponent("Button"));n(1155);function Iw(e){return(Iw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ow(e){return function(e){if(Array.isArray(e))return xw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return xw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xw(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pw(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)}}function Aw(e,t,n){return(Aw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Mw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Lw(e,t){return(Lw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mw(e);if(t){var i=Mw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jw(this,n)}}function jw(e,t){return!t||"object"!==Iw(t)&&"function"!=typeof t?Dw(e):t}function Dw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mw(e){return(Mw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Lw(e,t)}(o,e);var t,n,r,i=Rw(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).track_=t.track,n.interactive_=t.interactive,n.onDurationChange=n.onDurationChange.bind(Dw(n)),n.createInteractionItems=n.createInteractionItems.bind(Dw(n)),n.createInteractionItems(),n.track_.on("cv:cuechange",n.createInteractionItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("dispose",(function(){n.track_.off("cv:cuechange"),n.player_.off("durationchange",n.onDurationChange)})),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-items ".concat(Aw(Mw(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Aw(Mw(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(e){e.update()}))}},{key:"createInteractionItems",value:function(){var e,t=this;if(this.track_){Ow(this.children_).forEach((function(e){t.removeChild(e)}));for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],i=this.getTimepointById(r.text);i&&(null===(e=i.interactions)||void 0===e?void 0:e.length)&&this.addChild(new Ew(this.player_,{timepoint:i}))}}}},{key:"onDurationChange",value:function(){this.update()}},{key:"getTimepointById",value:function(e){var t;return null===(t=this.interactive_.timepoints)||void 0===t?void 0:t.find((function(t){return t.id.toString()===e.toString()}))}}])&&Pw(t.prototype,n),r&&Pw(t,r),o}(Fu.getComponent("Component"));n(1156);function Bw(e){return(Bw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Uw(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)}}function Fw(e,t){return(Fw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zw(e);if(t){var i=zw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Hw(this,n)}}function Hw(e,t){return!t||"object"!==Bw(t)&&"function"!=typeof t?Ww(e):t}function Ww(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zw(e){return(zw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fw(e,t)}(o,e);var t,n,r,i=Vw(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options=t,n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize.bind(Ww(n)))})),n}return t=o,(n=[{key:"initialize",value:function(){Ud(this.player,"metadata","interactive",this.onTrackLoaded.bind(this)),this.player.addClass("cv-interactive-plugin")}},{key:"onTrackLoaded",value:function(e){this.addChildren(e)}},{key:"addChildren",value:function(e){this.player.controlBar.getChild("progressControl").getChild("SeekBar").addChild(new Nw(this.player,{interactive:this.options.interactive,track:e}))}}])&&Uw(t.prototype,n),r&&Uw(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("interactiveSeekBarPlugin",qw);var Gw=function(e,t){var n,r=e.addTextTrack("metadata","interactive"),i=t.additionalData.interactive,o=null===(n=t.additionalData.clipData)||void 0===n?void 0:n.startTime;return i.timepoints.forEach((function(e){var t,n=e.visibleAt/1e3,i=e.visibleFor?n+e.visibleFor/1e3:n+1;o&&(n+=o,i+=o),(null===(t=e.interactions)||void 0===t?void 0:t.length)&&r.addCue({startTime:n-.001,endTime:i,text:e.id})})),r};n(1157);function Yw(e){return(Yw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xw(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)}}function Kw(e,t,n){return(Kw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Jw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function $w(e,t){return($w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Jw(e);if(t){var i=Jw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zw(this,n)}}function Zw(e,t){return!t||"object"!==Yw(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Jw(e){return(Jw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var eS=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},tS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$w(e,t)}(o,e);var t,n,r,i=Qw(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"getPlayerClassName",value:function(){return"cv-reports-player"}},{key:"getAnalyticsPlayerType",value:function(){return"reports-player"}},{key:"additionalSetup",value:function(e){var t=this,n=Object.create(null,{additionalSetup:{get:function(){return Kw(Jw(o.prototype),"additionalSetup",t)}}});return eS(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n.additionalSetup.call(this,e),this.setupEngagementOverlayPlugin(e),this.setupUpClipPlugin(e),this.setupInteractiveSeekBarPlugin(e);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"setupEngagementOverlayPlugin",value:function(e){var t;this.player.engagementOverlayPlugin({heatMap:this.options.heatMap,interactive:null===(t=e.additionalData)||void 0===t?void 0:t.interactive,onTimepointHover:this.options.onTimepointHover})}},{key:"setupUpClipPlugin",value:function(e){var t,n=null===(t=e.additionalData)||void 0===t?void 0:t.clipData;n&&this.player.clipPlugin({startTime:n.startTime,endTime:n.endTime})}},{key:"setupInteractiveSeekBarPlugin",value:function(e){var t,n,r=null===(t=e.additionalData)||void 0===t?void 0:t.interactive;(null===(n=e.additionalData)||void 0===n?void 0:n.interactive)&&(this.track=Gw(this.player,e),this.player.interactiveSeekBarPlugin({interactive:r}))}},{key:"getSeekBarOptions",value:function(){return{ignoreChapters:!0}}}])&&Xw(t.prototype,n),r&&Xw(t,r),o}(IT);function nS(e){var t=i.a.useRef(),n=i.a.useRef();return i.a.useEffect((function(){n.current=new tS(t.current,e)}),[]),i.a.createElement("div",{ref:t})}var rS=n(1058),iS=n(1043),oS=n(1059),aS=n.n(oS);n.d(t,"a",(function(){return uS}));var sS=o.a.encloseNamespace("shared.videoEngagementOverlay");function uS(e){var t=i.a.useRef(),n=Object(rS.a)(e.engagement);return i.a.createElement("div",{className:"bg-white rounded p-2 h-100"},i.a.createElement("div",{className:"mb-2 position-relative"},i.a.createElement("div",{className:aS.a.playerPlaceholder}),i.a.createElement("div",{className:aS.a.playerContainer},i.a.createElement(nS,{viewKey:e.viewKey,playerApi:new URL(e.playerApiUrl),hotkeyElQuerySelector:"body",heatMap:n,onTimepointHover:function(e){var r=t.current;r&&(null!==e?(r.classList.add(aS.a.heatMapTimepointIndicatorVisible),r.style.left="".concat(e/n.length*100,"%")):r.classList.remove(aS.a.heatMapTimepointIndicatorVisible))}}))),i.a.createElement("div",{className:aS.a.heatMapContainer},i.a.createElement("div",{className:"position-relative"},i.a.createElement(iS.a,{engagement:e.engagement,className:aS.a.heatMap}),i.a.createElement("div",{ref:t,className:aS.a.heatMapTimepointIndicator}))),i.a.createElement("div",{className:"d-flex justify-content-between mt-2"},i.a.createElement("strong",null,sS("engagement")),i.a.createElement("div",{className:"w-33"},i.a.createElement(iS.b,null))))}},,,function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(1042),a=n(7),s=n(33),u=n(34),c=n(862),l=n(850),f=n(1043),h=n(1161),d=n.n(h);function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||m(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||m(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v=a.a.encloseNamespace("shared.engagementTable");function b(e){var t;return i.a.createElement("div",{className:"p-2 ".concat(null!==(t=e.className)&&void 0!==t?t:"")},e.children)}function _(e){return i.a.createElement(b,{className:"d-inline-block ".concat(e.column.isSorted?"font-weight-bold":"")},v(e.phraseKey))}function T(e){var t=p(Object(s.a)(u.a.ANONYMISE_USERS),1)[0];return i.a.useMemo((function(){var n=function(e){var t=0;return e.forEach((function(e){var n=Math.max.apply(Math,y(e.heatMap));n>t&&(t=n)})),t}(e);return[{Header:function(e){var t=e.column;return i.a.createElement(_,{column:t,phraseKey:"name"})},width:8,accessor:"user",sortType:function(e,n){return Object(c.a)(e.values.user,t)>Object(c.a)(n.values.user,t)?1:-1},Cell:function(e){var n=e.value;return i.a.createElement(b,{className:"text-truncate"},Object(c.a)(n,t))}},{Header:function(e){var t=e.column;return i.a.createElement(_,{column:t,phraseKey:"views"})},accessor:"viewCount",width:4,sortType:"basic",sortDescFirst:!0,Cell:function(e){var t=e.value;return i.a.createElement(b,null,t)}},{Header:function(e){var t=e.column;return i.a.createElement(_,{column:t,phraseKey:"engagement"})},accessor:"engagementRate",width:8,sortType:"basic",sortDescFirst:!0,Cell:function(e){var t=e.value;return i.a.createElement(b,{className:"w-33"},i.a.createElement(l.a,{percentage:t,layout:l.b.LabelBefore}))}},{Header:function(e){var t=e.column;return i.a.createElement(_,{column:t,phraseKey:"heatMap"})},accessor:"heatMap",width:15,disableSortBy:!0,Cell:function(e){var t=e.row.original;return i.a.createElement(b,{className:"d-flex align-items-center h-100"},i.a.createElement(f.a,{engagement:t,max:n,className:"".concat(d.a.heatMap," flex-grow-1")}))}}]}),[t])}n.d(t,"a",(function(){return S}));var w={table:"bg-white rounded",header:"border-bottom"};function S(e){var t,n,r=T(e.engagement),a=(t=e.engagement,n=e.users,i.a.useMemo((function(){return t.map((function(e){return Object.assign(Object.assign({},e),{user:n.find((function(t){return t.id===e.userId}))})}))}),[]));return i.a.createElement(o.a,{columns:r,data:a,theme:w,enableSort:!0})}},,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports={viewCountContainer:"lA7G_",engagementPercentageContainer:"_1D53y",engagementGraphContainer:"_8US2G",partialTable:"_3UtUn"}},,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"InteractiveEngagementView",(function(){return L}));var r=n(0),i=n.n(r),o=n(22),a=n(7),s=n(851),u=n(1069),c=n(122),l=n(1070),f=n(867),h=n(863),d=n(205),p=n(1028),y=n(849),m=n(246),g=n(864),v=n(1021),b=n(861),_=n(875),T=n(1038),w=n(1036),S=n(1171),C=n(1160),k=n(1174),E=n(1019),I=n(1162),O=n(1037),x=n(1195),P=n.n(x),A=a.a.encloseNamespace("reportsInteractives.interactiveEngagement");function L(e){var t,n,r=Object(m.a)(),a=o.a.useBasicFetch(f.a.interactiveMetadata(e.interactiveMetadataId)),x=o.a.useBasicFetch(!!a.data&&f.a.interactive(a.data.interactiveId)),L=o.a.useBasicFetch(y.a.aggregateEngagement(e.interactiveMetadataId,r)),R=o.a.useBasicFetch(y.a.individualEngagement(e.interactiveMetadataId,r)),j=o.a.useBasicFetch((null===(t=R.data)||void 0===t?void 0:t.data.length)&&d.a.getById(R.data.data.map((function(e){return e.userId})))),D=o.a.useBasicFetch(u.a.createViewKey(e.interactiveMetadataId,l.a.MasterObject)),M=o.a.useBasicFetch(c.a.config());Object(s.a)(a.data?A("pageTitle",{interactive:a.data.name}):""),Object(h.a)(null===(n=a.data)||void 0===n?void 0:n.name),Object(_.a)(Object(E.a)(M.data,a.data)),Object(I.a)(e.interactiveMetadataId),Object(b.a)(R),Object(p.a)(a);var N=!!(x.data&&a.data&&L.data&&D.data&&M.data);return i.a.createElement("div",null,i.a.createElement(O.a,{interactiveMetadataId:e.interactiveMetadataId}),i.a.createElement("div",{className:"d-flex pb-3"},i.a.createElement("div",{className:"pr-2 ".concat(P.a.viewCountContainer)},i.a.createElement(v.a,{objectId:e.interactiveMetadataId,className:"h-100"})),i.a.createElement("div",{className:"px-2 ".concat(P.a.engagementPercentageContainer)},i.a.createElement(w.a,{objectId:e.interactiveMetadataId,className:"h-100",layout:"vertical"})),i.a.createElement("div",{className:"pl-2 ".concat(P.a.engagementGraphContainer)},N?i.a.createElement(S.a,{key:Object(g.a)(r),engagement:L.data,viewKey:D.data.viewKey,imageCdnUrl:M.data.imageCdnUrl,playerApiUrl:M.data.playerApiUrl}):i.a.createElement(C.a,null))),i.a.createElement("div",{className:"pb-3"},R.data&&j.data?i.a.createElement(k.a,{key:Object(g.a)(r),engagement:R.data.data,users:j.data}):i.a.createElement(T.a,{className:P.a.partialTable})))}}]]);