@clickview/library-editor 1.11.0 → 1.11.1-rc.0

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 (162) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/101-library-editor-389fe4dd5e.chunk.css +2 -0
  3. package/dist/css/{8906-library-editor-7e2a53583a.chunk.css → 1086-library-editor-cc4b3d990e.chunk.css} +3 -7
  4. package/dist/css/1203-library-editor-016463a9e3.chunk.css +11 -0
  5. package/dist/css/1409-library-editor-bc215e1152.chunk.css +1 -0
  6. package/dist/css/{1601-library-editor-ecad02e1a4.chunk.css → 1601-library-editor-f2f7a579a7.chunk.css} +2 -6
  7. package/dist/css/{1832-library-editor-16982d18f9.chunk.css → 1832-library-editor-e123877850.chunk.css} +0 -1
  8. package/dist/css/{1887-library-editor-2e57df189d.chunk.css → 1887-library-editor-cca972c080.chunk.css} +11 -29
  9. package/dist/css/1911-library-editor-689507eb58.chunk.css +17 -0
  10. package/dist/css/243-library-editor-decee8d957.chunk.css +2 -0
  11. package/dist/css/{1086-library-editor-7e2a53583a.chunk.css → 2692-library-editor-cc4b3d990e.chunk.css} +3 -7
  12. package/dist/css/3746-library-editor-2c6240c06c.chunk.css +1 -0
  13. package/dist/css/{3969-library-editor-3382f0875b.chunk.css → 3969-library-editor-30997910e2.chunk.css} +0 -2
  14. package/dist/css/4000-library-editor-4c9381e16c.chunk.css +8 -0
  15. package/dist/css/4177-library-editor-4a82cc89e1.chunk.css +13 -0
  16. package/dist/css/{4353-library-editor-ab9b6e56f4.chunk.css → 4353-library-editor-7a8f34cf74.chunk.css} +3 -7
  17. package/dist/css/{4830-library-editor-1d6a95fb9f.chunk.css → 4830-library-editor-a1247bffda.chunk.css} +0 -2
  18. package/dist/css/{4860-library-editor-27c2a56d40.chunk.css → 4860-library-editor-f5eddb2400.chunk.css} +0 -1
  19. package/dist/css/514-library-editor-ff3ae710cc.chunk.css +1 -0
  20. package/dist/css/{5424-library-editor-2ea33d243e.chunk.css → 5424-library-editor-1e43443d6a.chunk.css} +4 -9
  21. package/dist/css/{5747-library-editor-615300053c.chunk.css → 5747-library-editor-de4ea80bfc.chunk.css} +0 -1
  22. package/dist/css/{58-library-editor-272966901c.chunk.css → 58-library-editor-d7f24abcd2.chunk.css} +18 -47
  23. package/dist/css/5891-library-editor-2c6240c06c.chunk.css +1 -0
  24. package/dist/css/5970-library-editor-be87afcf0c.chunk.css +39 -0
  25. package/dist/css/{6093-library-editor-3b3ef2f270.chunk.css → 6093-library-editor-446ee2e049.chunk.css} +0 -1
  26. package/dist/css/{6220-library-editor-e66d80c18a.chunk.css → 6220-library-editor-cfb71135bb.chunk.css} +10 -27
  27. package/dist/css/627-library-editor-29076e38d6.chunk.css +32 -0
  28. package/dist/css/{6732-library-editor-e65d819068.chunk.css → 6732-library-editor-6d33677430.chunk.css} +4 -10
  29. package/dist/css/6963-library-editor-2c6240c06c.chunk.css +1 -0
  30. package/dist/css/{6999-library-editor-c9c844221a.chunk.css → 6999-library-editor-d855c3a356.chunk.css} +12 -34
  31. package/dist/css/{7053-library-editor-43ee5fb1f9.chunk.css → 7053-library-editor-cbe896c46a.chunk.css} +0 -1
  32. package/dist/css/708-library-editor-54b890f687.chunk.css +7 -0
  33. package/dist/css/{7136-library-editor-7f0d6cc8e2.chunk.css → 7136-library-editor-bd1f6e2ee3.chunk.css} +7 -24
  34. package/dist/css/7295-library-editor-cdf829452c.chunk.css +9 -0
  35. package/dist/css/{7634-library-editor-fe9fc69e35.chunk.css → 7634-library-editor-154066beaa.chunk.css} +8 -22
  36. package/dist/css/{8762-library-editor-7e2a53583a.chunk.css → 8762-library-editor-cc4b3d990e.chunk.css} +3 -7
  37. package/dist/css/{2692-library-editor-7e2a53583a.chunk.css → 8906-library-editor-cc4b3d990e.chunk.css} +3 -7
  38. package/dist/css/9379-library-editor-2c6240c06c.chunk.css +1 -0
  39. package/dist/css/{9383-library-editor-898835bbbe.chunk.css → 9383-library-editor-c6a9216107.chunk.css} +11 -27
  40. package/dist/css/{9695-library-editor-a3a0f8d8e8.chunk.css → 9695-library-editor-c5004a1fec.chunk.css} +0 -1
  41. package/dist/css/{9927-library-editor-e3b21e68b0.chunk.css → 9927-library-editor-a11669ad9d.chunk.css} +0 -1
  42. package/dist/css/9976-library-editor-36adaf7380.chunk.css +13 -0
  43. package/dist/css/library-editor-app-2206a274a7.css +59 -0
  44. package/dist/languages/en.json +1 -1
  45. package/dist/scripts/{1216-5fd9636d12.chunk.js → 1216-d2eaa054d9.chunk.js} +1 -1
  46. package/dist/scripts/{1364-ea01d99311.chunk.js → 1364-829c593162.chunk.js} +1 -1
  47. package/dist/scripts/{1409-40f217b9ff.chunk.js → 1409-143f4dbe22.chunk.js} +1 -1
  48. package/dist/scripts/{1601-52f8e3cec5.chunk.js → 1601-8de9a1268a.chunk.js} +2 -2
  49. package/dist/scripts/{1887-4a4581b103.chunk.js → 1887-94b401e383.chunk.js} +1 -1
  50. package/dist/scripts/1911-300b8f6723.chunk.js +1 -0
  51. package/dist/scripts/{1934-3f8be23263.chunk.js → 1934-2a68903c81.chunk.js} +1 -1
  52. package/dist/scripts/{243-5fae01d256.chunk.js → 243-aad803b582.chunk.js} +1 -1
  53. package/dist/scripts/{2802-e26f3e45b0.chunk.js → 2802-8e6b167d04.chunk.js} +1 -1
  54. package/dist/scripts/{3096-6bb727f466.chunk.js → 3096-f3dab15729.chunk.js} +1 -1
  55. package/dist/scripts/{3763-7bc0f591a5.chunk.js → 3763-362fec49af.chunk.js} +1 -1
  56. package/dist/scripts/{4000-1ae4f1c7b4.chunk.js → 4000-90c2c6b3b7.chunk.js} +1 -1
  57. package/dist/scripts/4177-7bcd7d8f58.chunk.js +1 -0
  58. package/dist/scripts/{4353-eb7e1815d1.chunk.js → 4353-31aea0c397.chunk.js} +1 -1
  59. package/dist/scripts/{4885-5665393708.chunk.js → 4885-c57cc4967d.chunk.js} +1 -1
  60. package/dist/scripts/{514-6bbcc11ccd.chunk.js → 514-1cf3235a5b.chunk.js} +1 -1
  61. package/dist/scripts/{5173-1375c05784.chunk.js → 5173-8a6910db27.chunk.js} +1 -1
  62. package/dist/scripts/5235-be21559a4b.chunk.js +1 -0
  63. package/dist/scripts/5745-3212b59a8b.chunk.js +2 -0
  64. package/dist/scripts/{5745-668c325bb8.chunk.js.LICENSE.txt → 5745-3212b59a8b.chunk.js.LICENSE.txt} +3 -3
  65. package/dist/scripts/5747-7775fd8e3c.chunk.js +1 -0
  66. package/dist/scripts/5970-dff014e4ff.chunk.js +2 -0
  67. package/dist/scripts/{6220-24ae226c29.chunk.js → 6220-76eb94f15b.chunk.js} +1 -1
  68. package/dist/scripts/{627-d6a5ccd216.chunk.js → 627-05ff44de8c.chunk.js} +1 -1
  69. package/dist/scripts/{6788-c31fca9e55.chunk.js → 6788-8e09f3bd44.chunk.js} +1 -1
  70. package/dist/scripts/{6995-1472a9ad98.chunk.js → 6995-01a680bb84.chunk.js} +1 -1
  71. package/dist/scripts/{6999-d783593ecd.chunk.js → 6999-b438eaa494.chunk.js} +1 -1
  72. package/dist/scripts/{708-62038305e2.chunk.js → 708-20c405d691.chunk.js} +1 -1
  73. package/dist/scripts/7190-3632c1b97b.chunk.js +1 -0
  74. package/dist/scripts/{7295-610cfe5e68.chunk.js → 7295-8fc4b6b822.chunk.js} +1 -1
  75. package/dist/scripts/{7634-9c882c55f9.chunk.js → 7634-63f4333ed0.chunk.js} +1 -1
  76. package/dist/scripts/8726-4cbbe381ff.chunk.js +1 -0
  77. package/dist/scripts/8727-81c92d12d3.chunk.js +1 -0
  78. package/dist/scripts/9040-70b08a74ae.chunk.js +1 -0
  79. package/dist/scripts/{9357-f27151e9a5.chunk.js → 9357-e68056eb1e.chunk.js} +1 -1
  80. package/dist/scripts/{9927-5fc9373f85.chunk.js → 9927-9c5b52fd04.chunk.js} +1 -1
  81. package/dist/scripts/9976-3c47299575.chunk.js +1 -0
  82. package/dist/scripts/bundle-017d0f8778.min.js +2 -0
  83. package/package.json +2 -3
  84. package/dist/css/101-library-editor-808f785991.chunk.css +0 -4
  85. package/dist/css/1203-library-editor-53b01520c3.chunk.css +0 -14
  86. package/dist/css/1409-library-editor-c2f01466c5.chunk.css +0 -2
  87. package/dist/css/1911-library-editor-f7158ba599.chunk.css +0 -34
  88. package/dist/css/243-library-editor-ef57ff2380.chunk.css +0 -4
  89. package/dist/css/3746-library-editor-76fe7e394b.chunk.css +0 -2
  90. package/dist/css/4000-library-editor-da3fe51fcb.chunk.css +0 -16
  91. package/dist/css/4177-library-editor-4cba18186c.chunk.css +0 -26
  92. package/dist/css/4973-library-editor-df33c921f0.chunk.css +0 -78
  93. package/dist/css/514-library-editor-a74706f512.chunk.css +0 -2
  94. package/dist/css/5891-library-editor-76fe7e394b.chunk.css +0 -2
  95. package/dist/css/627-library-editor-3cd7420a3d.chunk.css +0 -64
  96. package/dist/css/6963-library-editor-76fe7e394b.chunk.css +0 -2
  97. package/dist/css/708-library-editor-7417a89428.chunk.css +0 -14
  98. package/dist/css/7295-library-editor-b0c43d2c79.chunk.css +0 -18
  99. package/dist/css/9379-library-editor-76fe7e394b.chunk.css +0 -2
  100. package/dist/css/9976-library-editor-db9baf23c2.chunk.css +0 -26
  101. package/dist/css/library-editor-app-2091496ed5.css +0 -113
  102. package/dist/scripts/1911-b0ca319b7b.chunk.js +0 -1
  103. package/dist/scripts/4177-b425441d97.chunk.js +0 -1
  104. package/dist/scripts/4973-33da21ba6c.chunk.js +0 -2
  105. package/dist/scripts/5235-bc21e7571f.chunk.js +0 -1
  106. package/dist/scripts/5745-668c325bb8.chunk.js +0 -2
  107. package/dist/scripts/5747-4bbf211b9d.chunk.js +0 -1
  108. package/dist/scripts/7190-52ecd1333c.chunk.js +0 -1
  109. package/dist/scripts/8727-17faa28384.chunk.js +0 -1
  110. package/dist/scripts/8947-7242c90cef.chunk.js +0 -1
  111. package/dist/scripts/9040-cf768d840f.chunk.js +0 -1
  112. package/dist/scripts/9976-f46ac4bb71.chunk.js +0 -1
  113. package/dist/scripts/bundle-5206d50704.min.js +0 -2
  114. /package/dist/scripts/{101-5f391fde59.chunk.js → 101-2cc3ff8d10.chunk.js} +0 -0
  115. /package/dist/scripts/{1010-cca9607505.chunk.js → 1010-db874c3e6e.chunk.js} +0 -0
  116. /package/dist/scripts/{1086-53200b17d0.chunk.js → 1086-b673ebd9ae.chunk.js} +0 -0
  117. /package/dist/scripts/{1203-2fbc5898fa.chunk.js → 1203-a58109bd25.chunk.js} +0 -0
  118. /package/dist/scripts/{1269-5ece71eeb9.chunk.js → 1269-5cffbcb252.chunk.js} +0 -0
  119. /package/dist/scripts/{1601-52f8e3cec5.chunk.js.LICENSE.txt → 1601-8de9a1268a.chunk.js.LICENSE.txt} +0 -0
  120. /package/dist/scripts/{1832-fdaaff5a29.chunk.js → 1832-fd5b7686ca.chunk.js} +0 -0
  121. /package/dist/scripts/{1934-3f8be23263.chunk.js.LICENSE.txt → 1934-2a68903c81.chunk.js.LICENSE.txt} +0 -0
  122. /package/dist/scripts/{259-de67df82b8.chunk.js → 259-962c7919c1.chunk.js} +0 -0
  123. /package/dist/scripts/{2692-960ba7e67f.chunk.js → 2692-48302690ca.chunk.js} +0 -0
  124. /package/dist/scripts/{2802-e26f3e45b0.chunk.js.LICENSE.txt → 2802-8e6b167d04.chunk.js.LICENSE.txt} +0 -0
  125. /package/dist/scripts/{2803-7570954088.chunk.js → 2803-89f9a2f7e2.chunk.js} +0 -0
  126. /package/dist/scripts/{2888-eb32d5080d.chunk.js → 2888-84785fdaab.chunk.js} +0 -0
  127. /package/dist/scripts/{299-31df2ff19f.chunk.js → 299-9441b30e23.chunk.js} +0 -0
  128. /package/dist/scripts/{3400-bd718e889d.chunk.js → 3400-af8bc305c4.chunk.js} +0 -0
  129. /package/dist/scripts/{3639-d119eeab5a.chunk.js → 3639-81854e5c72.chunk.js} +0 -0
  130. /package/dist/scripts/{3746-5c295544de.chunk.js → 3746-eb8689b8aa.chunk.js} +0 -0
  131. /package/dist/scripts/{3969-721ddec9cc.chunk.js → 3969-943c9420c5.chunk.js} +0 -0
  132. /package/dist/scripts/{4201-95bf1e627c.chunk.js → 4201-252f427930.chunk.js} +0 -0
  133. /package/dist/scripts/{4245-a4ab06b0e3.chunk.js → 4245-8cf0fd9f7c.chunk.js} +0 -0
  134. /package/dist/scripts/{4591-3bafdf04eb.chunk.js → 4591-4cce5ce693.chunk.js} +0 -0
  135. /package/dist/scripts/{4830-dfe262f4fd.chunk.js → 4830-d257ad6495.chunk.js} +0 -0
  136. /package/dist/scripts/{4860-b5a0c5a4f7.chunk.js → 4860-a61fc07da6.chunk.js} +0 -0
  137. /package/dist/scripts/{5412-49e9416193.chunk.js → 5412-4974685490.chunk.js} +0 -0
  138. /package/dist/scripts/{5418-e74c7fda2f.chunk.js → 5418-9aa54c0e13.chunk.js} +0 -0
  139. /package/dist/scripts/{5424-95917d027e.chunk.js → 5424-8fdd5fb503.chunk.js} +0 -0
  140. /package/dist/scripts/{546-9118f60b37.chunk.js → 546-f3cbb33611.chunk.js} +0 -0
  141. /package/dist/scripts/{58-05be7f28b0.chunk.js → 58-843e7d0559.chunk.js} +0 -0
  142. /package/dist/scripts/{5891-a032e82ee2.chunk.js → 5891-6f61310f41.chunk.js} +0 -0
  143. /package/dist/scripts/{4973-33da21ba6c.chunk.js.LICENSE.txt → 5970-dff014e4ff.chunk.js.LICENSE.txt} +0 -0
  144. /package/dist/scripts/{6093-b7bb0fe8ff.chunk.js → 6093-04325272eb.chunk.js} +0 -0
  145. /package/dist/scripts/{6732-a203523ce8.chunk.js → 6732-e0a01b8de1.chunk.js} +0 -0
  146. /package/dist/scripts/{6774-ed211c8b34.chunk.js → 6774-9a047cb158.chunk.js} +0 -0
  147. /package/dist/scripts/{6963-11ccb0392a.chunk.js → 6963-62f3f0be14.chunk.js} +0 -0
  148. /package/dist/scripts/{7002-297c6c52fd.chunk.js → 7002-2b3d79cee4.chunk.js} +0 -0
  149. /package/dist/scripts/{7053-58277bab40.chunk.js → 7053-cdc82e2481.chunk.js} +0 -0
  150. /package/dist/scripts/{7136-6d81d93941.chunk.js → 7136-944e4ccce7.chunk.js} +0 -0
  151. /package/dist/scripts/{7376-4d9b431384.chunk.js → 7376-feb982bf08.chunk.js} +0 -0
  152. /package/dist/scripts/{8362-e6279acee7.chunk.js → 8362-7fc63cfe1b.chunk.js} +0 -0
  153. /package/dist/scripts/{8495-718f82fe43.chunk.js → 8495-84aa8f4c80.chunk.js} +0 -0
  154. /package/dist/scripts/{8762-e44f72c32c.chunk.js → 8762-09cceb364b.chunk.js} +0 -0
  155. /package/dist/scripts/{8906-dddb217ad3.chunk.js → 8906-ca7d93a242.chunk.js} +0 -0
  156. /package/dist/scripts/{9268-4dd3486dc4.chunk.js → 9268-a215d62098.chunk.js} +0 -0
  157. /package/dist/scripts/{9379-621391591b.chunk.js → 9379-c2470a6ab7.chunk.js} +0 -0
  158. /package/dist/scripts/{9383-682ac753f6.chunk.js → 9383-8090ded7fd.chunk.js} +0 -0
  159. /package/dist/scripts/{9695-995f37e82e.chunk.js → 9695-9896cd36aa.chunk.js} +0 -0
  160. /package/dist/scripts/{9770-717c5d2e82.chunk.js → 9770-15c287afb4.chunk.js} +0 -0
  161. /package/dist/scripts/{bundle-5206d50704.min.js.LICENSE.txt → bundle-017d0f8778.min.js.LICENSE.txt} +0 -0
  162. /package/dist/scripts/{polyfills-513148dd03.min.js → polyfills-8a6a6be34b.min.js} +0 -0
@@ -1,2 +0,0 @@
1
- /*! For license information please see 5745-668c325bb8.chunk.js.LICENSE.txt */
2
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[5745],{53019:function(e){window,e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=173)}([function(e,t,n){var i=n(8),r=n(17).f,a=n(18),s=n(37),o=n(47),u=n(87),l=n(88);e.exports=function(e,t){var n,c,h,d,f,p=e.target,m=e.global,g=e.stat;if(n=m?i:g?i[p]||o(p,{}):(i[p]||{}).prototype)for(c in t){if(d=t[c],h=e.noTargetGet?(f=r(n,c))&&f.value:n[c],!l(m?c:p+(g?".":"#")+c,e.forced)&&void 0!==h){if(typeof d==typeof h)continue;u(d,h)}(e.sham||h&&h.sham)&&a(d,"sham",!0),s(n,c,d,e)}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var i=n(46);e.exports=function(e){return Object(i(e))}},function(e,t,n){var i=n(1);e.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var i=n(21),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},function(e,t,n){var i=n(8),r=n(48),a=n(9),s=n(39),o=n(53),u=n(64),l=r("wks"),c=i.Symbol,h=u?c:c&&c.withoutSetter||s;e.exports=function(e){return a(l,e)||(o&&a(c,e)?l[e]=c[e]:l[e]=h("Symbol."+e)),l[e]}},function(e,t,n){var i=n(3),r=n(58),a=n(14),s=n(20),o=Object.defineProperty;t.f=i?o:function(e,t,n){if(a(e),t=s(t,!0),a(n),r)try{return o(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){(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(85))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var i=n(3),r=n(1),a=n(9),s=Object.defineProperty,o={},u=function(e){throw e};e.exports=function(e,t){if(a(o,e))return o[e];t||(t={});var n=[][e],l=!!a(t,"ACCESSORS")&&t.ACCESSORS,c=a(t,0)?t[0]:u,h=a(t,1)?t[1]:void 0;return o[e]=!!n&&!r((function(){if(l&&!i)return!0;var e={length:-1};l?s(e,1,{enumerable:!0,get:u}):e[1]=1,n.call(e,c,h)}))}},function(e,t,n){var i=n(25),r=n(46);e.exports=function(e){return i(r(e))}},function(e,t,n){var i=n(6),r=n(41),a=n(7),s=i("unscopables"),o=Array.prototype;null==o[s]&&a.f(o,s,{configurable:!0,value:r(null)}),e.exports=function(e){o[s][e]=!0}},function(e,t,n){"use strict";var i=n(1);e.exports=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){var i=n(4);e.exports=function(e){if(!i(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var i=n(45);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){var i=n(42),r=n(25),a=n(2),s=n(5),o=n(32),u=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,c=4==e,h=6==e,d=5==e||h;return function(f,p,m,g){for(var v,y,_=a(f),b=r(_),T=i(p,m,3),S=s(b.length),w=0,E=g||o,k=t?E(f,S):n?E(f,0):void 0;S>w;w++)if((d||w in b)&&(y=T(v=b[w],w,_),e))if(t)k[w]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:u.call(k,v)}else if(c)return!1;return h?-1:l||c?c:k}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},function(e,t,n){var i=n(3),r=n(36),a=n(24),s=n(11),o=n(20),u=n(9),l=n(58),c=Object.getOwnPropertyDescriptor;t.f=i?c:function(e,t){if(e=s(e),t=o(t,!0),l)try{return c(e,t)}catch(e){}if(u(e,t))return a(!r.f.call(e,t),e[t])}},function(e,t,n){var i=n(3),r=n(7),a=n(24);e.exports=i?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var i=n(20),r=n(7),a=n(24);e.exports=function(e,t,n){var s=i(t);s in e?r.f(e,s,a(0,n)):e[s]=n}},function(e,t,n){var i=n(4);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},function(e,t,n){var i=n(63),r=n(51);e.exports=Object.keys||function(e){return i(e,r)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var i=n(1),r=n(45),a="".split;e.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?a.call(e,""):Object(e)}:Object},function(e,t,n){var i,r,a,s=n(86),o=n(8),u=n(4),l=n(18),c=n(9),h=n(38),d=n(28),f=o.WeakMap;if(s){var p=new f,m=p.get,g=p.has,v=p.set;i=function(e,t){return v.call(p,e,t),t},r=function(e){return m.call(p,e)||{}},a=function(e){return g.call(p,e)}}else{var y=h("state");d[y]=!0,i=function(e,t){return l(e,y,t),t},r=function(e){return c(e,y)?e[y]:{}},a=function(e){return c(e,y)}}e.exports={set:i,get:r,has:a,enforce:function(e){return a(e)?r(e):i(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t){e.exports=!1},function(e,t){e.exports={}},function(e,t,n){var i=n(40),r=n(8),a=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?a(i[e])||a(r[e]):i[e]&&i[e][t]||r[e]&&r[e][t]}},function(e,t,n){var i=n(21),r=Math.max,a=Math.min;e.exports=function(e,t){var n=i(e);return n<0?r(n+t,0):a(n,t)}},function(e,t,n){var i=n(7).f,r=n(9),a=n(6)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,a)&&i(e,a,{configurable:!0,value:t})}},function(e,t,n){var i=n(4),r=n(15),a=n(6)("species");e.exports=function(e,t){var n;return r(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!r(n.prototype)?i(n)&&null===(n=n[a])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t){e.exports={}},function(e,t,n){var i=n(9),r=n(2),a=n(38),s=n(73),o=a("IE_PROTO"),u=Object.prototype;e.exports=s?Object.getPrototypeOf:function(e){return e=r(e),i(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},function(e,t,n){var i=n(1),r=n(6),a=n(78),s=r("species");e.exports=function(e){return a>=51||!i((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){"use strict";var i={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!i.call({1:2},1);t.f=a?function(e){var t=r(this,e);return!!t&&t.enumerable}:i},function(e,t,n){var i=n(8),r=n(18),a=n(9),s=n(47),o=n(60),u=n(26),l=u.get,c=u.enforce,h=String(String).split("String");(e.exports=function(e,t,n,o){var u=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,d=!!o&&!!o.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||r(n,"name",t),c(n).source=h.join("string"==typeof t?t:"")),e!==i?(u?!d&&e[t]&&(l=!0):delete e[t],l?e[t]=n:r(e,t,n)):l?e[t]=n:s(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||o(this)}))},function(e,t,n){var i=n(48),r=n(39),a=i("keys");e.exports=function(e){return a[e]||(a[e]=r(e))}},function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+i).toString(36)}},function(e,t,n){var i=n(8);e.exports=i},function(e,t,n){var i,r=n(14),a=n(65),s=n(51),o=n(28),u=n(89),l=n(59),c=n(38)("IE_PROTO"),h=function(){},d=function(e){return"<script>"+e+"<\/script>"},f=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;f=i?function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t}(i):((t=l("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F);for(var n=s.length;n--;)delete f.prototype[s[n]];return f()};o[c]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h.prototype=r(e),n=new h,h.prototype=null,n[c]=e):n=f(),void 0===t?n:a(n,t)}},function(e,t,n){var i=n(23);e.exports=function(e,t,n){if(i(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,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var i=n(1);e.exports=!i((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var i=n(27),r=n(8),a=n(1);e.exports=i||!a((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete r[e]}))},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},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 i=n(8),r=n(18);e.exports=function(e,t){try{r(i,e,t)}catch(n){i[e]=t}return t}},function(e,t,n){var i=n(27),r=n(61);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var i=n(63),r=n(51).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},function(e,t,n){var i=n(11),r=n(5),a=n(30),s=function(e){return function(t,n,s){var o,u=i(t),l=r(u.length),c=a(s,l);if(e&&n!=n){for(;l>c;)if((o=u[c++])!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var i=n(1);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},function(e,t,n){var i=n(28),r=n(4),a=n(9),s=n(7).f,o=n(39),u=n(43),l=o("meta"),c=0,h=Object.isExtensible||function(){return!0},d=function(e){s(e,l,{value:{objectID:"O"+ ++c,weakData:{}}})},f=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,l)){if(!h(e))return"F";if(!t)return"E";d(e)}return e[l].objectID},getWeakData:function(e,t){if(!a(e,l)){if(!h(e))return!0;if(!t)return!1;d(e)}return e[l].weakData},onFreeze:function(e){return u&&f.REQUIRED&&h(e)&&!a(e,l)&&d(e),e}};i[l]=!0},function(e,t,n){var i={};i[n(6)("toStringTag")]="z",e.exports="[object z]"===String(i)},function(e,t,n){"use strict";var i=n(26),r=n(75),a=n(9),s=n(22),o=n(2),u=i.set,l=i.getterFor("Object Iterator");e.exports=r((function(e,t){var n=o(e);u(this,{type:"Object Iterator",mode:t,object:n,keys:s(n),index:0})}),"Object",(function(){for(var e=l(this),t=e.keys;;){if(null===t||e.index>=t.length)return e.object=e.keys=null,{value:void 0,done:!0};var n=t[e.index++],i=e.object;if(a(i,n)){switch(e.mode){case"keys":return{value:n,done:!1};case"values":return{value:i[n],done:!1}}return{value:[n,i[n]],done:!1}}}}))},function(e,t,n){"use strict";function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],i=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,a=e}finally{try{i||null==o.return||o.return()}finally{if(r)throw a}}return n}}(e,t)||s(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 r(e){return(r="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 a(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||s(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){if(e){if("string"==typeof e)return o(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)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var u=n(170),l=n(171),c=n(172);function h(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(e,t){return t.encode?t.strict?u(e):encodeURIComponent(e):e}function f(e,t){return t.decode?l(e):e}function p(e){var t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function m(e){var t=(e=p(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function g(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function v(e,t){h((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,i){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===i[e]&&(i[e]={}),i[e][t[1]]=n):i[e]=n};case"bracket":return function(e,n,i){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==i[e]?i[e]=[].concat(i[e],n):i[e]=[n]:i[e]=n};case"comma":case"separator":return function(t,n,i){var r="string"==typeof n&&n.split("").indexOf(e.arrayFormatSeparator)>-1?n.split(e.arrayFormatSeparator).map((function(t){return f(t,e)})):null===n?n:f(n,e);i[t]=r};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),a=Object.create(null);if("string"!=typeof e)return a;if(!(e=e.trim().replace(/^[?#&]/,"")))return a;var o,u=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=s(e))){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(u)throw a}}}}(e.split("&"));try{for(u.s();!(o=u.n()).done;){var l=o.value,d=i(c(t.decode?l.replace(/\+/g," "):l,"="),2),p=d[0],m=d[1];m=void 0===m?null:["comma","separator"].includes(t.arrayFormat)?m:f(m,t),n(f(p,t),m,a)}}catch(e){u.e(e)}finally{u.f()}for(var v=0,y=Object.keys(a);v<y.length;v++){var _=y[v],b=a[_];if("object"===r(b)&&null!==b)for(var T=0,S=Object.keys(b);T<S.length;T++){var w=S[T];b[w]=g(b[w],t)}else a[_]=g(b,t)}return!1===t.sort?a:(!0===t.sort?Object.keys(a).sort():Object.keys(a).sort(t.sort)).reduce((function(e,t){var n=a[t];return Boolean(n)&&"object"===r(n)&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"===r(t)?e(Object.keys(t)).sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return t[e]})):t}(n):e[t]=n,e}),Object.create(null))}t.extract=m,t.parse=v,t.stringify=function(e,t){if(!e)return"";h((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);for(var n=function(n){return t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n]},i=function(e){switch(e.arrayFormat){case"index":return function(t){return function(n,i){var r=n.length;return void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:[].concat(a(n),null===i?[[d(t,e),"[",r,"]"].join("")]:[[d(t,e),"[",d(r,e),"]=",d(i,e)].join("")])}};case"bracket":return function(t){return function(n,i){return void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:[].concat(a(n),null===i?[[d(t,e),"[]"].join("")]:[[d(t,e),"[]=",d(i,e)].join("")])}};case"comma":case"separator":return function(t){return function(n,i){return null==i||0===i.length?n:0===n.length?[[d(t,e),"=",d(i,e)].join("")]:[[n,d(i,e)].join(e.arrayFormatSeparator)]}};default:return function(t){return function(n,i){return void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:[].concat(a(n),null===i?[d(t,e)]:[[d(t,e),"=",d(i,e)].join("")])}}}}(t),r={},s=0,o=Object.keys(e);s<o.length;s++){var u=o[s];n(u)||(r[u]=e[u])}var l=Object.keys(r);return!1!==t.sort&&l.sort(t.sort),l.map((function(n){var r=e[n];return void 0===r?"":null===r?d(n,t):Array.isArray(r)?r.reduce(i(n),[]).join("&"):d(n,t)+"="+d(r,t)})).filter((function(e){return e.length>0})).join("&")},t.parseUrl=function(e,t){t=Object.assign({decode:!0},t);var n=i(c(e,"#"),2),r=n[0],a=n[1];return Object.assign({url:r.split("?")[0]||"",query:v(m(e),t)},t&&t.parseFragmentIdentifier&&a?{fragmentIdentifier:f(a,t)}:{})},t.stringifyUrl=function(e,n){n=Object.assign({encode:!0,strict:!0},n);var i=p(e.url).split("?")[0]||"",r=t.extract(e.url),a=t.parse(r,{sort:!1}),s=Object.assign(a,e.query),o=t.stringify(s,n);o&&(o="?".concat(o));var u=function(e){var t="",n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(u="#".concat(d(e.fragmentIdentifier,n))),"".concat(i).concat(o).concat(u)}},function(e,t,n){var i=n(3),r=n(1),a=n(59);e.exports=!i&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var i=n(8),r=n(4),a=i.document,s=r(a)&&r(a.createElement);e.exports=function(e){return s?a.createElement(e):{}}},function(e,t,n){var i=n(61),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(e){return r.call(e)}),e.exports=i.inspectSource},function(e,t,n){var i=n(8),r=n(47),a=i["__core-js_shared__"]||r("__core-js_shared__",{});e.exports=a},function(e,t,n){var i=n(29),r=n(49),a=n(52),s=n(14);e.exports=i("Reflect","ownKeys")||function(e){var t=r.f(s(e)),n=a.f;return n?t.concat(n(e)):t}},function(e,t,n){var i=n(9),r=n(11),a=n(50).indexOf,s=n(28);e.exports=function(e,t){var n,o=r(e),u=0,l=[];for(n in o)!i(s,n)&&i(o,n)&&l.push(n);for(;t.length>u;)i(o,n=t[u++])&&(~a(l,n)||l.push(n));return l}},function(e,t,n){var i=n(53);e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var i=n(3),r=n(7),a=n(14),s=n(22);e.exports=i?Object.defineProperties:function(e,t){a(e);for(var n,i=s(t),o=i.length,u=0;o>u;)r.f(e,n=i[u++],t[n]);return e}},function(e,t,n){var i=n(11),r=n(49).f,a={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"[object Window]"==a.call(e)?function(e){try{return r(e)}catch(e){return s.slice()}}(e):r(i(e))}},function(e,t,n){var i=n(6);t.f=i},function(e,t,n){var i=n(3),r=n(22),a=n(11),s=n(36).f,o=function(e){return function(t){for(var n,o=a(t),u=r(o),l=u.length,c=0,h=[];l>c;)n=u[c++],i&&!s.call(o,n)||h.push(e?[n,o[n]]:o[n]);return h}};e.exports={entries:o(!0),values:o(!1)}},function(e,t,n){var i=n(6),r=n(33),a=i("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||s[a]===e)}},function(e,t,n){var i=n(71),r=n(33),a=n(6)("iterator");e.exports=function(e){if(null!=e)return e[a]||e["@@iterator"]||r[i(e)]}},function(e,t,n){var i=n(55),r=n(45),a=n(6)("toStringTag"),s="Arguments"==r(function(){return arguments}());e.exports=i?r:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),a))?n:s?r(t):"Object"==(i=r(t))&&"function"==typeof t.callee?"Arguments":i}},function(e,t,n){var i=n(14);e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&i(a.call(e)),t}}},function(e,t,n){var i=n(1);e.exports=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var i=n(14),r=n(113);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,a){return i(n),r(a),t?e.call(n,a):n.__proto__=a,n}}():void 0)},function(e,t,n){"use strict";var i=n(76).IteratorPrototype,r=n(41),a=n(24),s=n(31),o=n(33),u=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=r(i,{next:a(1,n)}),s(e,l,!1,!0),o[l]=u,e}},function(e,t,n){"use strict";var i,r,a,s=n(34),o=n(18),u=n(9),l=n(6),c=n(27),h=l("iterator"),d=!1;[].keys&&("next"in(a=[].keys())?(r=s(s(a)))!==Object.prototype&&(i=r):d=!0),null==i&&(i={}),c||u(i,h)||o(i,h,(function(){return this})),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:d}},function(e,t,n){"use strict";var i=n(0),r=n(75),a=n(34),s=n(74),o=n(31),u=n(18),l=n(37),c=n(6),h=n(27),d=n(33),f=n(76),p=f.IteratorPrototype,m=f.BUGGY_SAFARI_ITERATORS,g=c("iterator"),v=function(){return this};e.exports=function(e,t,n,c,f,y,_){r(n,t,c);var b,T,S,w=function(e){if(e===f&&A)return A;if(!m&&e in C)return C[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},E=t+" Iterator",k=!1,C=e.prototype,x=C[g]||C["@@iterator"]||f&&C[f],A=!m&&x||w(f),I="Array"==t&&C.entries||x;if(I&&(b=a(I.call(new e)),p!==Object.prototype&&b.next&&(h||a(b)===p||(s?s(b,p):"function"!=typeof b[g]&&u(b,g,v)),o(b,E,!0,!0),h&&(d[E]=v))),"values"==f&&x&&"values"!==x.name&&(k=!0,A=function(){return x.call(this)}),h&&!_||C[g]===A||u(C,g,A),d[t]=A,f)if(T={values:w("values"),keys:y?A:w("keys"),entries:w("entries")},_)for(S in T)(m||k||!(S in C))&&l(C,S,T[S]);else i({target:t,proto:!0,forced:m||k},T);return T}},function(e,t,n){var i,r,a=n(8),s=n(136),o=a.process,u=o&&o.versions,l=u&&u.v8;l?r=(i=l.split("."))[0]+i[1]:s&&(!(i=s.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=s.match(/Chrome\/(\d+)/))&&(r=i[1]),e.exports=r&&+r},function(e,t,n){"use strict";var i=n(15),r=n(5),a=n(42),s=function(e,t,n,o,u,l,c,h){for(var d,f=u,p=0,m=!!c&&a(c,h,3);p<o;){if(p in n){if(d=m?m(n[p],p,t):n[p],l>0&&i(d))f=s(e,t,d,r(d.length),f,l-1)-1;else{if(f>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[f]=d}f++}p++}return f};e.exports=s},function(e,t,n){var i=n(23),r=n(2),a=n(25),s=n(5),o=function(e){return function(t,n,o,u){i(n);var l=r(t),c=a(l),h=s(l.length),d=e?h-1:0,f=e?-1:1;if(o<2)for(;;){if(d in c){u=c[d],d+=f;break}if(d+=f,e?d<0:h<=d)throw TypeError("Reduce of empty array with no initial value")}for(;e?d>=0:h>d;d+=f)d in c&&(u=n(u,c[d],d,l));return u}};e.exports={left:o(!1),right:o(!0)}},function(e,t,n){var i,r,a;function s(e){return(s="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)}a=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,i){var r,a,s,o=t||[0],u=(n=n||0)>>>3,l=-1===i?3:0;for(r=0;r<e.length;r+=1)a=(s=r+u)>>>2,o.length<=a&&o.push(0),o[a]|=e[r]<<8*(l+i*(s%4));return{value:o,binLen:8*e.length+n}}function i(e,i,r){switch(i){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,i){var r,a,s,o;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var u=t||[0],l=(n=n||0)>>>3,c=-1===i?3:0;for(r=0;r<e.length;r+=2){if(a=parseInt(e.substr(r,2),16),isNaN(a))throw new Error("String of HEX type contains invalid characters");for(s=(o=(r>>>1)+l)>>>2;u.length<=s;)u.push(0);u[s]|=a<<8*(c+i*(o%4))}return{value:u,binLen:4*e.length+n}}(e,t,n,r)};case"TEXT":return function(e,t,n){return function(e,t,n,i,r){var a,s,o,u,l,c,h,d,f=0,p=n||[0],m=(i=i||0)>>>3;if("UTF8"===t)for(h=-1===r?3:0,o=0;o<e.length;o+=1)for(s=[],128>(a=e.charCodeAt(o))?s.push(a):2048>a?(s.push(192|a>>>6),s.push(128|63&a)):55296>a||57344<=a?s.push(224|a>>>12,128|a>>>6&63,128|63&a):(o+=1,a=65536+((1023&a)<<10|1023&e.charCodeAt(o)),s.push(240|a>>>18,128|a>>>12&63,128|a>>>6&63,128|63&a)),u=0;u<s.length;u+=1){for(l=(c=f+m)>>>2;p.length<=l;)p.push(0);p[l]|=s[u]<<8*(h+r*(c%4)),f+=1}else for(h=-1===r?2:0,d="UTF16LE"===t&&1!==r||"UTF16LE"!==t&&1===r,o=0;o<e.length;o+=1){for(a=e.charCodeAt(o),!0===d&&(a=(u=255&a)<<8|a>>>8),l=(c=f+m)>>>2;p.length<=l;)p.push(0);p[l]|=a<<8*(h+r*(c%4)),f+=2}return{value:p,binLen:8*f+i}}(e,i,t,n,r)};case"B64":return function(e,n,i){return function(e,n,i,r){var a,s,o,u,l,c,h=0,d=n||[0],f=(i=i||0)>>>3,p=-1===r?3:0,m=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!==m&&m<e.length)throw new Error("Invalid '=' found in base-64 string");for(a=0;a<e.length;a+=4){for(u=e.substr(a,4),o=0,s=0;s<u.length;s+=1)o|=t.indexOf(u.charAt(s))<<18-6*s;for(s=0;s<u.length-1;s+=1){for(l=(c=h+f)>>>2;d.length<=l;)d.push(0);d[l]|=(o>>>16-8*s&255)<<8*(p+r*(c%4)),h+=1}}return{value:d,binLen:8*h+i}}(e,n,i,r)};case"BYTES":return function(e,t,n){return function(e,t,n,i){var r,a,s,o,u=t||[0],l=(n=n||0)>>>3,c=-1===i?3:0;for(a=0;a<e.length;a+=1)r=e.charCodeAt(a),s=(o=a+l)>>>2,u.length<=s&&u.push(0),u[s]|=r<<8*(c+i*(o%4));return{value:u,binLen:8*e.length+n}}(e,t,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,i){return function(e,t,i,r){return n(new Uint8Array(e),t,i,r)}(e,t,i,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,i){return n(e,t,i,r)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function r(e,n,i,r){switch(e){case"HEX":return function(e){return function(e,t,n,i){var r,a,s="",o=t/8,u=-1===n?3:0;for(r=0;r<o;r+=1)a=e[r>>>2]>>>8*(u+n*(r%4)),s+="0123456789abcdef".charAt(a>>>4&15)+"0123456789abcdef".charAt(15&a);return i.outputUpper?s.toUpperCase():s}(e,n,i,r)};case"B64":return function(e){return function(e,n,i,r){var a,s,o,u,l,c="",h=n/8,d=-1===i?3:0;for(a=0;a<h;a+=3)for(u=a+1<h?e[a+1>>>2]:0,l=a+2<h?e[a+2>>>2]:0,o=(e[a>>>2]>>>8*(d+i*(a%4))&255)<<16|(u>>>8*(d+i*((a+1)%4))&255)<<8|l>>>8*(d+i*((a+2)%4))&255,s=0;s<4;s+=1)c+=8*a+6*s<=n?t.charAt(o>>>6*(3-s)&63):r.b64Pad;return c}(e,n,i,r)};case"BYTES":return function(e){return function(e,t,n){var i,r,a="",s=t/8,o=-1===n?3:0;for(i=0;i<s;i+=1)r=e[i>>>2]>>>8*(o+n*(i%4))&255,a+=String.fromCharCode(r);return a}(e,n,i)};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 i,r=t/8,a=new ArrayBuffer(r),s=new Uint8Array(a),o=-1===n?3:0;for(i=0;i<r;i+=1)s[i]=e[i>>>2]>>>8*(o+n*(i%4))&255;return a}(e,n,i)};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 i,r=t/8,a=-1===n?3:0,s=new Uint8Array(r);for(i=0;i<r;i+=1)s[i]=e[i>>>2]>>>8*(a+n*(i%4))&255;return s}(e,n,i)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function a(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},i="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(i);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(i);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 s(e,t){return e<<t|e>>>32-t}function o(e,t,n){return e^t^n}function u(e,t,n){return e&t^e&n^t&n}function l(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function c(e,t,n,i,r){var a=(65535&e)+(65535&t)+(65535&n)+(65535&i)+(65535&r);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(i>>>16)+(r>>>16)+(a>>>16))<<16|65535&a}function h(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function d(e,t){var n,i,r,a,h,d,f,p,m=[];for(n=t[0],i=t[1],r=t[2],a=t[3],h=t[4],f=0;f<80;f+=1)m[f]=f<16?e[f]:s(m[f-3]^m[f-8]^m[f-14]^m[f-16],1),d=f<20?c(s(n,5),(p=i)&r^~p&a,h,1518500249,m[f]):f<40?c(s(n,5),o(i,r,a),h,1859775393,m[f]):f<60?c(s(n,5),u(i,r,a),h,2400959708,m[f]):c(s(n,5),o(i,r,a),h,3395469782,m[f]),h=a,a=r,r=s(i,30),i=n,n=d;return t[0]=l(n,t[0]),t[1]=l(i,t[1]),t[2]=l(r,t[2]),t[3]=l(a,t[3]),t[4]=l(h,t[4]),t}function f(e,t,n,i){for(var r,a=15+(t+65>>>9<<4),s=t+n;e.length<=a;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[a]=4294967295&s,e[a-1]=s/4294967296|0,r=0;r<e.length;r+=16)i=d(e.slice(r,r+16),i);return i}return function(t){function n(e,n,r){var a=this;if("SHA-1"!==e)throw new Error("Chosen SHA variant is not supported");var s=r||{};return(a=t.call(this,e,n,r)||this).t=!0,a.i=a.o,a.u=-1,a.s=i(a.h,a.v,a.u),a.A=d,a.p=function(e){return e.slice()},a.l=h,a.R=f,a.U=[1732584193,4023233417,2562383102,271733878,3285377520],a.T=512,a.m=160,a.F=!1,s.hmacKey&&a.B(function(e,t,n,r){var a="hmacKey must include a value and format";if(!t)throw new Error(a);if(void 0===t.value||!t.format)throw new Error(a);return i(t.format,t.encoding||"UTF8",n)(t.value)}(0,s.hmacKey,a.u)),a}return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}(n,t),n}(function(){function e(e,t,n){var i=n||{};if(this.h=t,this.v=i.encoding||"UTF8",this.numRounds=i.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,i=this.T>>>5,r=this.s(e,this.Y,this.I),a=r.binLen,s=r.value,o=a>>>5;for(t=0;t<o;t+=i)n+this.T<=a&&(this.U=this.A(s.slice(t,t+i),this.U),n+=this.T);this.H+=n,this.Y=s.slice(n>>>5),this.I=a%this.T,this.C=!0},e.prototype.getHash=function(e,t){var n,i,s=this.m,o=a(t);if(!0===this.F){if(-1===o.outputLen)throw new Error("Output length must be specified in options");s=o.outputLen}var u=r(e,s,this.u,o);if(!0===this.L&&this.i)return u(this.i(o));for(i=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),s),n=1;n<this.numRounds;n+=1)!0===this.F&&s%32!=0&&(i[i.length-1]&=16777215>>>24-s%32),i=this.R(i,s,0,this.l(this.g),s);return u(i)},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 r=i(t,(n||{}).encoding||"UTF8",this.u);this.B(r(e))},e.prototype.B=function(e){var t,n=this.T>>>3,i=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<=i;)e.value.push(0);for(t=0;t<=i;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=a(t);return r(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}())},"object"==s(t)&&void 0!==e?e.exports=a():void 0===(r="function"==typeof(i=a)?i.call(t,n,t,e):i)||(e.exports=r)},function(e,t,n){var i=n(83);n(123),n(124),n(125),e.exports=i},function(e,t,n){n(84),n(91),n(93),n(94),n(95),n(96),n(97),n(98),n(100),n(101),n(102),n(103),n(104),n(106),n(107),n(108),n(109),n(110),n(111),n(112),n(114),n(115),n(117),n(118),n(119),n(120),n(121),n(122);var i=n(40);e.exports=i.Object},function(e,t,n){"use strict";var i=n(0),r=n(8),a=n(29),s=n(27),o=n(3),u=n(53),l=n(64),c=n(1),h=n(9),d=n(15),f=n(4),p=n(14),m=n(2),g=n(11),v=n(20),y=n(24),_=n(41),b=n(22),T=n(49),S=n(66),w=n(52),E=n(17),k=n(7),C=n(36),x=n(18),A=n(37),I=n(48),O=n(38),P=n(28),L=n(39),D=n(6),R=n(67),M=n(90),N=n(31),U=n(26),j=n(16).forEach,B=O("hidden"),F=D("toPrimitive"),V=U.set,H=U.getterFor("Symbol"),W=Object.prototype,q=r.Symbol,z=a("JSON","stringify"),G=E.f,X=k.f,K=S.f,Y=C.f,$=I("symbols"),Q=I("op-symbols"),J=I("string-to-symbol-registry"),Z=I("symbol-to-string-registry"),ee=I("wks"),te=r.QObject,ne=!te||!te.prototype||!te.prototype.findChild,ie=o&&c((function(){return 7!=_(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=G(W,t);i&&delete W[t],X(e,t,n),i&&e!==W&&X(W,t,i)}:X,re=function(e,t){var n=$[e]=_(q.prototype);return V(n,{type:"Symbol",tag:e,description:t}),o||(n.description=t),n},ae=l?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof q},se=function(e,t,n){e===W&&se(Q,t,n),p(e);var i=v(t,!0);return p(n),h($,i)?(n.enumerable?(h(e,B)&&e[B][i]&&(e[B][i]=!1),n=_(n,{enumerable:y(0,!1)})):(h(e,B)||X(e,B,y(1,{})),e[B][i]=!0),ie(e,i,n)):X(e,i,n)},oe=function(e,t){p(e);var n=g(t),i=b(n).concat(he(n));return j(i,(function(t){o&&!ue.call(n,t)||se(e,t,n[t])})),e},ue=function(e){var t=v(e,!0),n=Y.call(this,t);return!(this===W&&h($,t)&&!h(Q,t))&&(!(n||!h(this,t)||!h($,t)||h(this,B)&&this[B][t])||n)},le=function(e,t){var n=g(e),i=v(t,!0);if(n!==W||!h($,i)||h(Q,i)){var r=G(n,i);return!r||!h($,i)||h(n,B)&&n[B][i]||(r.enumerable=!0),r}},ce=function(e){var t=K(g(e)),n=[];return j(t,(function(e){h($,e)||h(P,e)||n.push(e)})),n},he=function(e){var t=e===W,n=K(t?Q:g(e)),i=[];return j(n,(function(e){!h($,e)||t&&!h(W,e)||i.push($[e])})),i};u||(A((q=function(){if(this instanceof q)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=L(e),n=function(e){this===W&&n.call(Q,e),h(this,B)&&h(this[B],t)&&(this[B][t]=!1),ie(this,t,y(1,e))};return o&&ne&&ie(W,t,{configurable:!0,set:n}),re(t,e)}).prototype,"toString",(function(){return H(this).tag})),A(q,"withoutSetter",(function(e){return re(L(e),e)})),C.f=ue,k.f=se,E.f=le,T.f=S.f=ce,w.f=he,R.f=function(e){return re(D(e),e)},o&&(X(q.prototype,"description",{configurable:!0,get:function(){return H(this).description}}),s||A(W,"propertyIsEnumerable",ue,{unsafe:!0}))),i({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:q}),j(b(ee),(function(e){M(e)})),i({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=String(e);if(h(J,t))return J[t];var n=q(t);return J[t]=n,Z[n]=t,n},keyFor:function(e){if(!ae(e))throw TypeError(e+" is not a symbol");if(h(Z,e))return Z[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),i({target:"Object",stat:!0,forced:!u,sham:!o},{create:function(e,t){return void 0===t?_(e):oe(_(e),t)},defineProperty:se,defineProperties:oe,getOwnPropertyDescriptor:le}),i({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ce,getOwnPropertySymbols:he}),i({target:"Object",stat:!0,forced:c((function(){w.f(1)}))},{getOwnPropertySymbols:function(e){return w.f(m(e))}}),z&&i({target:"JSON",stat:!0,forced:!u||c((function(){var e=q();return"[null]"!=z([e])||"{}"!=z({a:e})||"{}"!=z(Object(e))}))},{stringify:function(e,t,n){for(var i,r=[e],a=1;arguments.length>a;)r.push(arguments[a++]);if(i=t,(f(t)||void 0!==e)&&!ae(e))return d(t)||(t=function(e,t){if("function"==typeof i&&(t=i.call(this,e,t)),!ae(t))return t}),r[1]=t,z.apply(null,r)}}),q.prototype[F]||x(q.prototype,F,q.prototype.valueOf),N(q,"Symbol"),P[B]=!0},function(e,t){function n(e){return(n="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 i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(i=window)}e.exports=i},function(e,t,n){var i=n(8),r=n(60),a=i.WeakMap;e.exports="function"==typeof a&&/native code/.test(r(a))},function(e,t,n){var i=n(9),r=n(62),a=n(17),s=n(7);e.exports=function(e,t){for(var n=r(t),o=s.f,u=a.f,l=0;l<n.length;l++){var c=n[l];i(e,c)||o(e,c,u(t,c))}}},function(e,t,n){var i=n(1),r=/#|\.prototype\./,a=function(e,t){var n=o[s(e)];return n==l||n!=u&&("function"==typeof t?i(t):!!t)},s=a.normalize=function(e){return String(e).replace(r,".").toLowerCase()},o=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},function(e,t,n){var i=n(29);e.exports=i("document","documentElement")},function(e,t,n){var i=n(40),r=n(9),a=n(67),s=n(7).f;e.exports=function(e){var t=i.Symbol||(i.Symbol={});r(t,e)||s(t,e,{value:a.f(e)})}},function(e,t,n){var i=n(0),r=n(92);i({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},function(e,t,n){"use strict";var i=n(3),r=n(1),a=n(22),s=n(52),o=n(36),u=n(2),l=n(25),c=Object.assign,h=Object.defineProperty;e.exports=!c||r((function(){if(i&&1!==c({b:1},c(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||"abcdefghijklmnopqrst"!=a(c({},t)).join("")}))?function(e,t){for(var n=u(e),r=arguments.length,c=1,h=s.f,d=o.f;r>c;)for(var f,p=l(arguments[c++]),m=h?a(p).concat(h(p)):a(p),g=m.length,v=0;g>v;)f=m[v++],i&&!d.call(p,f)||(n[f]=p[f]);return n}:c},function(e,t,n){n(0)({target:"Object",stat:!0,sham:!n(3)},{create:n(41)})},function(e,t,n){var i=n(0),r=n(3);i({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:n(7).f})},function(e,t,n){var i=n(0),r=n(3);i({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperties:n(65)})},function(e,t,n){var i=n(0),r=n(68).entries;i({target:"Object",stat:!0},{entries:function(e){return r(e)}})},function(e,t,n){var i=n(0),r=n(43),a=n(1),s=n(4),o=n(54).onFreeze,u=Object.freeze;i({target:"Object",stat:!0,forced:a((function(){u(1)})),sham:!r},{freeze:function(e){return u&&s(e)?u(o(e)):e}})},function(e,t,n){var i=n(0),r=n(99),a=n(19);i({target:"Object",stat:!0},{fromEntries:function(e){var t={};return r(e,(function(e,n){a(t,e,n)}),void 0,!0),t}})},function(e,t,n){var i=n(14),r=n(69),a=n(5),s=n(42),o=n(70),u=n(72),l=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,c,h){var d,f,p,m,g,v,y,_=s(t,n,c?2:1);if(h)d=e;else{if("function"!=typeof(f=o(e)))throw TypeError("Target is not iterable");if(r(f)){for(p=0,m=a(e.length);m>p;p++)if((g=c?_(i(y=e[p])[0],y[1]):_(e[p]))&&g instanceof l)return g;return new l(!1)}d=f.call(e)}for(v=d.next;!(y=v.call(d)).done;)if("object"==typeof(g=u(d,_,y.value,c))&&g&&g instanceof l)return g;return new l(!1)}).stop=function(e){return new l(!0,e)}},function(e,t,n){var i=n(0),r=n(1),a=n(11),s=n(17).f,o=n(3),u=r((function(){s(1)}));i({target:"Object",stat:!0,forced:!o||u,sham:!o},{getOwnPropertyDescriptor:function(e,t){return s(a(e),t)}})},function(e,t,n){var i=n(0),r=n(3),a=n(62),s=n(11),o=n(17),u=n(19);i({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(e){for(var t,n,i=s(e),r=o.f,l=a(i),c={},h=0;l.length>h;)void 0!==(n=r(i,t=l[h++]))&&u(c,t,n);return c}})},function(e,t,n){var i=n(0),r=n(1),a=n(66).f;i({target:"Object",stat:!0,forced:r((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:a})},function(e,t,n){var i=n(0),r=n(1),a=n(2),s=n(34),o=n(73);i({target:"Object",stat:!0,forced:r((function(){s(1)})),sham:!o},{getPrototypeOf:function(e){return s(a(e))}})},function(e,t,n){n(0)({target:"Object",stat:!0},{is:n(105)})},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){var i=n(0),r=n(1),a=n(4),s=Object.isExtensible;i({target:"Object",stat:!0,forced:r((function(){s(1)}))},{isExtensible:function(e){return!!a(e)&&(!s||s(e))}})},function(e,t,n){var i=n(0),r=n(1),a=n(4),s=Object.isFrozen;i({target:"Object",stat:!0,forced:r((function(){s(1)}))},{isFrozen:function(e){return!a(e)||!!s&&s(e)}})},function(e,t,n){var i=n(0),r=n(1),a=n(4),s=Object.isSealed;i({target:"Object",stat:!0,forced:r((function(){s(1)}))},{isSealed:function(e){return!a(e)||!!s&&s(e)}})},function(e,t,n){var i=n(0),r=n(2),a=n(22);i({target:"Object",stat:!0,forced:n(1)((function(){a(1)}))},{keys:function(e){return a(r(e))}})},function(e,t,n){var i=n(0),r=n(4),a=n(54).onFreeze,s=n(43),o=n(1),u=Object.preventExtensions;i({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!s},{preventExtensions:function(e){return u&&r(e)?u(a(e)):e}})},function(e,t,n){var i=n(0),r=n(4),a=n(54).onFreeze,s=n(43),o=n(1),u=Object.seal;i({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!s},{seal:function(e){return u&&r(e)?u(a(e)):e}})},function(e,t,n){n(0)({target:"Object",stat:!0},{setPrototypeOf:n(74)})},function(e,t,n){var i=n(4);e.exports=function(e){if(!i(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){var i=n(0),r=n(68).values;i({target:"Object",stat:!0},{values:function(e){return r(e)}})},function(e,t,n){var i=n(55),r=n(37),a=n(116);i||r(Object.prototype,"toString",a,{unsafe:!0})},function(e,t,n){"use strict";var i=n(55),r=n(71);e.exports=i?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,n){"use strict";var i=n(0),r=n(3),a=n(44),s=n(2),o=n(23),u=n(7);r&&i({target:"Object",proto:!0,forced:a},{__defineGetter__:function(e,t){u.f(s(this),e,{get:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var i=n(0),r=n(3),a=n(44),s=n(2),o=n(23),u=n(7);r&&i({target:"Object",proto:!0,forced:a},{__defineSetter__:function(e,t){u.f(s(this),e,{set:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var i=n(0),r=n(3),a=n(44),s=n(2),o=n(20),u=n(34),l=n(17).f;r&&i({target:"Object",proto:!0,forced:a},{__lookupGetter__:function(e){var t,n=s(this),i=o(e,!0);do{if(t=l(n,i))return t.get}while(n=u(n))}})},function(e,t,n){"use strict";var i=n(0),r=n(3),a=n(44),s=n(2),o=n(20),u=n(34),l=n(17).f;r&&i({target:"Object",proto:!0,forced:a},{__lookupSetter__:function(e){var t,n=s(this),i=o(e,!0);do{if(t=l(n,i))return t.set}while(n=u(n))}})},function(e,t,n){n(31)(Math,"Math",!0)},function(e,t,n){var i=n(8);n(31)(i.JSON,"JSON",!0)},function(e,t,n){"use strict";var i=n(0),r=n(56);i({target:"Object",stat:!0},{iterateEntries:function(e){return new r(e,"entries")}})},function(e,t,n){"use strict";var i=n(0),r=n(56);i({target:"Object",stat:!0},{iterateKeys:function(e){return new r(e,"keys")}})},function(e,t,n){"use strict";var i=n(0),r=n(56);i({target:"Object",stat:!0},{iterateValues:function(e){return new r(e,"values")}})},function(e,t,n){var i=n(127);n(167),n(168),n(169),e.exports=i},function(e,t,n){n(128),n(130),n(133),n(134),n(135),n(137),n(139),n(140),n(142),n(143),n(144),n(145),n(146),n(147),n(149),n(150),n(151),n(152),n(153),n(155),n(156),n(157),n(158),n(159),n(160),n(161),n(162),n(164),n(165),n(166);var i=n(40);e.exports=i.Array},function(e,t,n){"use strict";var i=n(129).charAt,r=n(26),a=n(77),s=r.set,o=r.getterFor("String Iterator");a(String,"String",(function(e){s(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=o(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=i(n,r),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){var i=n(21),r=n(46),a=function(e){return function(t,n){var a,s,o=String(r(t)),u=i(n),l=o.length;return u<0||u>=l?e?"":void 0:(a=o.charCodeAt(u))<55296||a>56319||u+1===l||(s=o.charCodeAt(u+1))<56320||s>57343?e?o.charAt(u):a:e?o.slice(u,u+2):s-56320+(a-55296<<10)+65536}};e.exports={codeAt:a(!1),charAt:a(!0)}},function(e,t,n){var i=n(0),r=n(131);i({target:"Array",stat:!0,forced:!n(132)((function(e){Array.from(e)}))},{from:r})},function(e,t,n){"use strict";var i=n(42),r=n(2),a=n(72),s=n(69),o=n(5),u=n(19),l=n(70);e.exports=function(e){var t,n,c,h,d,f,p=r(e),m="function"==typeof this?this:Array,g=arguments.length,v=g>1?arguments[1]:void 0,y=void 0!==v,_=l(p),b=0;if(y&&(v=i(v,g>2?arguments[2]:void 0,2)),null==_||m==Array&&s(_))for(n=new m(t=o(p.length));t>b;b++)f=y?v(p[b],b):p[b],u(n,b,f);else for(d=(h=_.call(p)).next,n=new m;!(c=d.call(h)).done;b++)f=y?a(h,v,[c.value,b],!0):c.value,u(n,b,f);return n.length=b,n}},function(e,t,n){var i=n(6)("iterator"),r=!1;try{var a=0,s={next:function(){return{done:!!a++}},return:function(){r=!0}};s[i]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var a={};a[i]=function(){return{next:function(){return{done:n=!0}}}},e(a)}catch(e){}return n}},function(e,t,n){n(0)({target:"Array",stat:!0},{isArray:n(15)})},function(e,t,n){"use strict";var i=n(0),r=n(1),a=n(19);i({target:"Array",stat:!0,forced:r((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)a(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var i=n(0),r=n(1),a=n(15),s=n(4),o=n(2),u=n(5),l=n(19),c=n(32),h=n(35),d=n(6),f=n(78),p=d("isConcatSpreadable"),m=f>=51||!r((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),g=h("concat"),v=function(e){if(!s(e))return!1;var t=e[p];return void 0!==t?!!t:a(e)};i({target:"Array",proto:!0,forced:!m||!g},{concat:function(e){var t,n,i,r,a,s=o(this),h=c(s,0),d=0;for(t=-1,i=arguments.length;t<i;t++)if(v(a=-1===t?s:arguments[t])){if(d+(r=u(a.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<r;n++,d++)n in a&&l(h,d,a[n])}else{if(d>=9007199254740991)throw TypeError("Maximum allowed index exceeded");l(h,d++,a)}return h.length=d,h}})},function(e,t,n){var i=n(29);e.exports=i("navigator","userAgent")||""},function(e,t,n){var i=n(0),r=n(138),a=n(12);i({target:"Array",proto:!0},{copyWithin:r}),a("copyWithin")},function(e,t,n){"use strict";var i=n(2),r=n(30),a=n(5),s=Math.min;e.exports=[].copyWithin||function(e,t){var n=i(this),o=a(n.length),u=r(e,o),l=r(t,o),c=arguments.length>2?arguments[2]:void 0,h=s((void 0===c?o:r(c,o))-l,o-u),d=1;for(l<u&&u<l+h&&(d=-1,l+=h-1,u+=h-1);h-- >0;)l in n?n[u]=n[l]:delete n[u],u+=d,l+=d;return n}},function(e,t,n){"use strict";var i=n(0),r=n(16).every,a=n(13),s=n(10),o=a("every"),u=s("every");i({target:"Array",proto:!0,forced:!o||!u},{every:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var i=n(0),r=n(141),a=n(12);i({target:"Array",proto:!0},{fill:r}),a("fill")},function(e,t,n){"use strict";var i=n(2),r=n(30),a=n(5);e.exports=function(e){for(var t=i(this),n=a(t.length),s=arguments.length,o=r(s>1?arguments[1]:void 0,n),u=s>2?arguments[2]:void 0,l=void 0===u?n:r(u,n);l>o;)t[o++]=e;return t}},function(e,t,n){"use strict";var i=n(0),r=n(16).filter,a=n(35),s=n(10),o=a("filter"),u=s("filter");i({target:"Array",proto:!0,forced:!o||!u},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var i=n(0),r=n(16).find,a=n(12),s=n(10),o=!0,u=s("find");"find"in[]&&Array(1).find((function(){o=!1})),i({target:"Array",proto:!0,forced:o||!u},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),a("find")},function(e,t,n){"use strict";var i=n(0),r=n(16).findIndex,a=n(12),s=n(10),o=!0,u=s("findIndex");"findIndex"in[]&&Array(1).findIndex((function(){o=!1})),i({target:"Array",proto:!0,forced:o||!u},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),a("findIndex")},function(e,t,n){"use strict";var i=n(0),r=n(79),a=n(2),s=n(5),o=n(21),u=n(32);i({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=a(this),n=s(t.length),i=u(t,0);return i.length=r(i,t,t,n,0,void 0===e?1:o(e)),i}})},function(e,t,n){"use strict";var i=n(0),r=n(79),a=n(2),s=n(5),o=n(23),u=n(32);i({target:"Array",proto:!0},{flatMap:function(e){var t,n=a(this),i=s(n.length);return o(e),(t=u(n,0)).length=r(t,n,n,i,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},function(e,t,n){"use strict";var i=n(0),r=n(148);i({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(e,t,n){"use strict";var i=n(16).forEach,r=n(13),a=n(10),s=r("forEach"),o=a("forEach");e.exports=s&&o?[].forEach:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}},function(e,t,n){"use strict";var i=n(0),r=n(50).includes,a=n(12);i({target:"Array",proto:!0,forced:!n(10)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},function(e,t,n){"use strict";var i=n(0),r=n(50).indexOf,a=n(13),s=n(10),o=[].indexOf,u=!!o&&1/[1].indexOf(1,-0)<0,l=a("indexOf"),c=s("indexOf",{ACCESSORS:!0,1:0});i({target:"Array",proto:!0,forced:u||!l||!c},{indexOf:function(e){return u?o.apply(this,arguments)||0:r(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var i=n(11),r=n(12),a=n(33),s=n(26),o=n(77),u=s.set,l=s.getterFor("Array Iterator");e.exports=o(Array,"Array",(function(e,t){u(this,{type:"Array Iterator",target:i(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var i=n(0),r=n(25),a=n(11),s=n(13),o=[].join,u=r!=Object,l=s("join",",");i({target:"Array",proto:!0,forced:u||!l},{join:function(e){return o.call(a(this),void 0===e?",":e)}})},function(e,t,n){var i=n(0),r=n(154);i({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},function(e,t,n){"use strict";var i=n(11),r=n(21),a=n(5),s=n(13),o=n(10),u=Math.min,l=[].lastIndexOf,c=!!l&&1/[1].lastIndexOf(1,-0)<0,h=s("lastIndexOf"),d=o("indexOf",{ACCESSORS:!0,1:0}),f=c||!h||!d;e.exports=f?function(e){if(c)return l.apply(this,arguments)||0;var t=i(this),n=a(t.length),s=n-1;for(arguments.length>1&&(s=u(s,r(arguments[1]))),s<0&&(s=n+s);s>=0;s--)if(s in t&&t[s]===e)return s||0;return-1}:l},function(e,t,n){"use strict";var i=n(0),r=n(16).map,a=n(35),s=n(10),o=a("map"),u=s("map");i({target:"Array",proto:!0,forced:!o||!u},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var i=n(0),r=n(80).left,a=n(13),s=n(10),o=a("reduce"),u=s("reduce",{1:0});i({target:"Array",proto:!0,forced:!o||!u},{reduce:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var i=n(0),r=n(80).right,a=n(13),s=n(10),o=a("reduceRight"),u=s("reduce",{1:0});i({target:"Array",proto:!0,forced:!o||!u},{reduceRight:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var i=n(0),r=n(15),a=[].reverse,s=[1,2];i({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return r(this)&&(this.length=this.length),a.call(this)}})},function(e,t,n){"use strict";var i=n(0),r=n(4),a=n(15),s=n(30),o=n(5),u=n(11),l=n(19),c=n(6),h=n(35),d=n(10),f=h("slice"),p=d("slice",{ACCESSORS:!0,0:0,1:2}),m=c("species"),g=[].slice,v=Math.max;i({target:"Array",proto:!0,forced:!f||!p},{slice:function(e,t){var n,i,c,h=u(this),d=o(h.length),f=s(e,d),p=s(void 0===t?d:t,d);if(a(h)&&("function"!=typeof(n=h.constructor)||n!==Array&&!a(n.prototype)?r(n)&&null===(n=n[m])&&(n=void 0):n=void 0,n===Array||void 0===n))return g.call(h,f,p);for(i=new(void 0===n?Array:n)(v(p-f,0)),c=0;f<p;f++,c++)f in h&&l(i,c,h[f]);return i.length=c,i}})},function(e,t,n){"use strict";var i=n(0),r=n(16).some,a=n(13),s=n(10),o=a("some"),u=s("some");i({target:"Array",proto:!0,forced:!o||!u},{some:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var i=n(0),r=n(23),a=n(2),s=n(1),o=n(13),u=[],l=u.sort,c=s((function(){u.sort(void 0)})),h=s((function(){u.sort(null)})),d=o("sort");i({target:"Array",proto:!0,forced:c||!h||!d},{sort:function(e){return void 0===e?l.call(a(this)):l.call(a(this),r(e))}})},function(e,t,n){n(163)("Array")},function(e,t,n){"use strict";var i=n(29),r=n(7),a=n(6),s=n(3),o=a("species");e.exports=function(e){var t=i(e),n=r.f;s&&t&&!t[o]&&n(t,o,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var i=n(0),r=n(30),a=n(21),s=n(5),o=n(2),u=n(32),l=n(19),c=n(35),h=n(10),d=c("splice"),f=h("splice",{ACCESSORS:!0,0:0,1:2}),p=Math.max,m=Math.min;i({target:"Array",proto:!0,forced:!d||!f},{splice:function(e,t){var n,i,c,h,d,f,g=o(this),v=s(g.length),y=r(e,v),_=arguments.length;if(0===_?n=i=0:1===_?(n=0,i=v-y):(n=_-2,i=m(p(a(t),0),v-y)),v+n-i>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(c=u(g,i),h=0;h<i;h++)(d=y+h)in g&&l(c,h,g[d]);if(c.length=i,n<i){for(h=y;h<v-i;h++)f=h+n,(d=h+i)in g?g[f]=g[d]:delete g[f];for(h=v;h>v-i+n;h--)delete g[h-1]}else if(n>i)for(h=v-i;h>y;h--)f=h+n-1,(d=h+i-1)in g?g[f]=g[d]:delete g[f];for(h=0;h<n;h++)g[h+y]=arguments[h+2];return g.length=v-i+n,c}})},function(e,t,n){n(12)("flat")},function(e,t,n){n(12)("flatMap")},function(e,t,n){var i=n(0),r=n(15),a=Object.isFrozen,s=function(e,t){if(!a||!r(e)||!a(e))return!1;for(var n,i=0,s=e.length;i<s;)if(!("string"==typeof(n=e[i++])||t&&void 0===n))return!1;return 0!==s};i({target:"Array",stat:!0},{isTemplateObject:function(e){if(!s(e,!0))return!1;var t=e.raw;return!(t.length!==e.length||!s(t,!1))}})},function(e,t,n){"use strict";var i=n(3),r=n(12),a=n(2),s=n(5),o=n(7).f;i&&!("lastItem"in[])&&(o(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=a(this),t=s(e.length);return 0==t?void 0:e[t-1]},set:function(e){var t=a(this),n=s(t.length);return t[0==n?0:n-1]=e}}),r("lastItem"))},function(e,t,n){"use strict";var i=n(3),r=n(12),a=n(2),s=n(5),o=n(7).f;i&&!("lastIndex"in[])&&(o(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=a(this),t=s(e.length);return 0==t?0:t-1}}),r("lastIndex"))},function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())}))}},function(e,t,n){"use strict";function i(e){return(i="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 r=new RegExp("%[a-f0-9]{2}","gi"),a=new RegExp("(%[a-f0-9]{2})+","gi");function s(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),i=e.slice(t);return Array.prototype.concat.call([],s(n),s(i))}function o(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r),n=1;n<t.length;n++)t=(e=s(t,n).join("")).match(r);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+i(e)+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=a.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var i=o(n[0]);i!==n[0]&&(t[n[0]]=i)}n=a.exec(e)}t["%C2"]="�";for(var r=Object.keys(t),s=0;s<r.length;s++){var u=r[s];e=e.replace(new RegExp(u,"g"),t[u])}return e}(e)}}},function(e,t,n){"use strict";e.exports=function(e,t){if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];var n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},function(e,t,n){"use strict";function i(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}n.r(t),n.d(t,"signUrl",(function(){return c})),n.d(t,"verifyUrl",(function(){return h})),n(82),n(126);var r=n(81),a=n.n(r),s=n(57);function o(e){return Object(s.parseUrl)(e,{decode:!1})}function u(e,t){return Object(s.stringifyUrl)({url:e,query:t},{encode:!1})}function l(e){var t,n,r=o(e),s=r.query,l={};for(var c in s)l[i(c)]=i(s[c]);return t=u(r.url,l),(n=new a.a("SHA-1","TEXT",{encoding:"UTF8"})).update(t),n.getHash("B64")}function c(e,t){t||(t={timestamp:!1});var n=o(e),i=n.query;return t.timestamp&&(i.exp=(new Date).getTime().toString()),i.sig=encodeURIComponent(l(u(n.url,i))),u(n.url,i)}function h(e,t){t||(t={expiryTime:3e5});var n=o(e),i=n.query,r=decodeURIComponent(i.sig);if(!r)return!1;if(i.exp){var a=+i.exp,s=(new Date).getTime();if(isNaN(a))return!1;if(s-a>t.expiryTime)return!1}return delete i.sig,r===l(u(n.url,i))}}])},53238:function(e,t){"use strict";var n=function(e){return e instanceof Uint8Array?e:new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0)};t.lx=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var r=t.reduce((function(e,t){return e+(t&&(t.byteLength||t.length)||0)}),0),a=new Uint8Array(r),s=0;return t.forEach((function(e){e=n(e),a.set(e,s),s+=e.byteLength})),a},t.qX=function(e,t){return void 0===t&&(t=!1),"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.Ki=n},68655:function(e,t,n){"use strict";var i,r=(i=n(51562))&&"object"==typeof i&&"default"in i?i.default:i,a={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^/},s=["video","audio","text"],o=["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},l=function(e){void 0===e&&(e="");var t=e.split(","),n={},i=[];return t.forEach((function(e){var t;e=e.trim(),s.forEach((function(i){var r=a[i].exec(e.toLowerCase());if(r&&!(r.length<=1)){t=i;var s=e.substring(0,r[1].length),o=e.replace(s,"");n[i]={type:s,details:o}}})),t||i.push(e)})),i.length&&(n.unknown=i),n},c=function(e){return void 0===e&&(e=""),a.audio.test(e.trim().toLowerCase())},h=function(e){if(e&&"string"==typeof e){var t=e.toLowerCase().split(",").map((function(e){return u(e.trim())})),n="video";1===t.length&&c(t[0])?n="audio":1===t.length&&(void 0===(r=t[0])&&(r=""),a.text.test(r.trim().toLowerCase()))&&(n="application");var i="mp4";return t.every((function(e){return a.mp4.test(e)}))?i="mp4":t.every((function(e){return a.webm.test(e)}))?i="webm":t.every((function(e){return a.ogg.test(e)}))&&(i="ogg"),n+"/"+i+';codecs="'+e+'"'}var r};t.lA="mp4a.40.2",t.xz="avc1.4d400d",t.p7=function(e){return void 0===e&&(e=""),r.MediaSource&&r.MediaSource.isTypeSupported&&r.MediaSource.isTypeSupported(h(e))||!1},t.Jg=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var i in n){var r=n[i];if(r.default&&r.playlists)return l(r.playlists[0].attributes.CODECS)}return null},t._5=h,t.KL=c,t.tf=function(e){return void 0===e&&(e=""),a.video.test(e.trim().toLowerCase())},t.Hi=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<o.length;t++)if(a["muxer"+o[t]].test(e))return!0;return!1}))},t.kS=l,t.ws=u},70124:function(e,t){"use strict";var n=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,n(e));try{return decodeURIComponent(escape(t))}catch(e){}return t},r=function e(t,r){return void 0===r&&(r=0),(t=n(t)).length-r<10||"ID3"!==i(t.subarray(r,r+3))?r:e(t,r+=function(e,t){void 0===t&&(t=0);var i=(e=n(e))[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?i+20:i+10}(t,r))},a={aac:function(e){var t=r(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=r(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)))}},s=Object.keys(a).filter((function(e){return"ts"!==e})).concat("ts");s.forEach((function(e){var t=a[e];a[e]=function(e){return t(n(e))}})),t.Xm=function(e){e=n(e);for(var t=0;t<s.length;t++){var i=s[t];if(a[i](e))return i}return""},t.cc=r,t.cz=function(e){e=n(e);for(var t=0;t<e.length;){var r=(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===r||r+t>e.length?t=e.length:t+=r}return!1}},5078:function(e,t,n){"use strict";var i,r=(i=n(51562))&&"object"==typeof i&&"default"in i?i.default:i;e.exports=function(e){for(var t,n=(t=e,r.atob?r.atob(t):Buffer.from(t,"base64").toString("binary")),i=new Uint8Array(n.length),a=0;a<n.length;a++)i[a]=n.charCodeAt(a);return i}},17990:function(e,t){"use strict";var n=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,i=/^application\/dash\+xml/i;t.t=function(e){return n.test(e)?"hls":i.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},31097:function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=i(n(31336)),a=i(n(51562));e.exports=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=r.buildAbsoluteURL(a.location&&a.location.href||"",e)),r.buildAbsoluteURL(e,t))}},71890:function(e){"use strict";var t=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,i=0;i<n;++i)t[i].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();e.exports=t},68942:function(e,t,n){"use strict";var i=n(51562),r=n(448),a=n(63848);function s(e,t,n){var i=e;return a(t)?(n=t,"string"==typeof e&&(i={uri:e})):i=r({},t,{uri:e}),i.callback=n,i}function o(e,t,n){return u(t=s(e,t,n))}function u(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,i,r){t||(t=!0,e.callback(n,i,r))};function i(){var e=void 0;if(e=l.response?l.response:l.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}(l),g)try{e=JSON.parse(e)}catch(e){}return e}function r(e){return clearTimeout(c),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,v)}function a(){if(!u){var t;clearTimeout(c),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var r=v,a=null;return 0!==t?(r={body:i(),statusCode:t,method:d,headers:{},url:h,rawRequest:l},l.getAllResponseHeaders&&(r.headers=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),i=e.slice(0,n).trim().toLowerCase(),r=e.slice(n+1).trim();void 0===t[i]?t[i]=r:Array.isArray(t[i])?t[i].push(r):t[i]=[t[i],r]})),t):t}(l.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),n(a,r,r.body)}}var s,u,l=e.xhr||null;l||(l=e.cors||e.useXDR?new o.XDomainRequest:new o.XMLHttpRequest);var c,h=l.url=e.uri||e.url,d=l.method=e.method||"GET",f=e.body||e.data,p=l.headers=e.headers||{},m=!!e.sync,g=!1,v={body:void 0,headers:{},statusCode:0,method:d,url:h,rawRequest:l};if("json"in e&&!1!==e.json&&(g=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),f=JSON.stringify(!0===e.json?f:e.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(a,0)},l.onload=a,l.onerror=r,l.onprogress=function(){},l.onabort=function(){u=!0},l.ontimeout=r,l.open(d,h,!m,e.username,e.password),m||(l.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(c=setTimeout((function(){if(!u){u=!0,l.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}}),e.timeout)),l.setRequestHeader)for(s in p)p.hasOwnProperty(s)&&l.setRequestHeader(s,p[s]);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&&(l.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(l),l.send(f||null),l}e.exports=o,e.exports.default=o,o.XMLHttpRequest=i.XMLHttpRequest||function(){},o.XDomainRequest="withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:i.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){o["delete"===e?"del":e]=function(t,n,i){return(n=s(t,n,i)).method=e.toUpperCase(),u(n)}}))},15206:function(e){var t=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=t},94605:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},29076:function(e,t,n){var i=n(62366);e.exports=function(e){if(!i(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},5822:function(e,t,n){var i=n(46802),r=n(22275),a=n(50430),s=i("unscopables"),o=Array.prototype;null==o[s]&&a(o,s,r(null)),e.exports=function(e){o[s][e]=!0}},25528:function(e,t,n){"use strict";var i=n(50189).charAt;e.exports=function(e,t,n){return t+(n?i(e,t).length:1)}},72814:function(e){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},4905:function(e,t,n){var i=n(62366);e.exports=function(e){if(!i(e))throw TypeError(String(e)+" is not an object");return e}},16607:function(e,t,n){"use strict";var i=n(72758).forEach,r=n(31853);e.exports=r("forEach")?function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}:[].forEach},5029:function(e,t,n){var i=n(40678),r=n(74479),a=n(6971),s=function(e){return function(t,n,s){var o,u=i(t),l=r(u.length),c=a(s,l);if(e&&n!=n){for(;l>c;)if((o=u[c++])!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},72758:function(e,t,n){var i=n(17755),r=n(62901),a=n(87615),s=n(74479),o=n(17021),u=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,c=4==e,h=6==e,d=5==e||h;return function(f,p,m,g){for(var v,y,_=a(f),b=r(_),T=i(p,m,3),S=s(b.length),w=0,E=g||o,k=t?E(f,S):n?E(f,0):void 0;S>w;w++)if((d||w in b)&&(y=T(v=b[w],w,_),e))if(t)k[w]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:u.call(k,v)}else if(c)return!1;return h?-1:l||c?c:k}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},95611:function(e,t,n){var i=n(25061),r=n(46802),a=n(24101),s=r("species");e.exports=function(e){return a>=51||!i((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},62040:function(e,t,n){var i=n(94605),r=n(87615),a=n(62901),s=n(74479),o=function(e){return function(t,n,o,u){i(n);var l=r(t),c=a(l),h=s(l.length),d=e?h-1:0,f=e?-1:1;if(o<2)for(;;){if(d in c){u=c[d],d+=f;break}if(d+=f,e?d<0:h<=d)throw TypeError("Reduce of empty array with no initial value")}for(;e?d>=0:h>d;d+=f)d in c&&(u=n(u,c[d],d,l));return u}};e.exports={left:o(!1),right:o(!0)}},17021:function(e,t,n){var i=n(62366),r=n(20119),a=n(46802)("species");e.exports=function(e,t){var n;return r(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!r(n.prototype)?i(n)&&null===(n=n[a])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},17755:function(e,t,n){var i=n(94605);e.exports=function(e,t,n){if(i(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,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},35304:function(e,t,n){var i=n(4905);e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&i(a.call(e)),t}}},13165:function(e,t,n){var i=n(46802)("iterator"),r=!1;try{var a=0,s={next:function(){return{done:!!a++}},return:function(){r=!0}};s[i]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var a={};a[i]=function(){return{next:function(){return{done:n=!0}}}},e(a)}catch(e){}return n}},75489:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},20486:function(e,t,n){var i=n(75489),r=n(46802)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),r))?n:a?i(t):"Object"==(s=i(t))&&"function"==typeof t.callee?"Arguments":s}},53769:function(e,t,n){"use strict";var i=n(86846),r=n(81738).getWeakData,a=n(4905),s=n(62366),o=n(72814),u=n(98971),l=n(72758),c=n(51900),h=n(50684),d=h.set,f=h.getterFor,p=l.find,m=l.findIndex,g=0,v=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},_=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=_(this,e);if(t)return t[1]},has:function(e){return!!_(this,e)},set:function(e,t){var n=_(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=m(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,l){var h=e((function(e,i){o(e,h,t),d(e,{type:t,id:g++,frozen:void 0}),null!=i&&u(i,e[l],e,n)})),p=f(t),m=function(e,t,n){var i=p(e),s=r(a(t),!0);return!0===s?v(i).set(t,n):s[i.id]=n,e};return i(h.prototype,{delete:function(e){var t=p(this);if(!s(e))return!1;var n=r(e);return!0===n?v(t).delete(e):n&&c(n,t.id)&&delete n[t.id]},has:function(e){var t=p(this);if(!s(e))return!1;var n=r(e);return!0===n?v(t).has(e):n&&c(n,t.id)}}),i(h.prototype,n?{get:function(e){var t=p(this);if(s(e)){var n=r(e);return!0===n?v(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return m(this,e,t)}}:{add:function(e){return m(this,e,!0)}}),h}}},66606:function(e,t,n){"use strict";var i=n(29638),r=n(45001),a=n(91092),s=n(96313),o=n(81738),u=n(98971),l=n(72814),c=n(62366),h=n(25061),d=n(13165),f=n(40606),p=n(3419);e.exports=function(e,t,n,m,g){var v=r[e],y=v&&v.prototype,_=v,b=m?"set":"add",T={},S=function(e){var t=y[e];s(y,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(a(e,"function"!=typeof v||!(g||y.forEach&&!h((function(){(new v).entries().next()})))))_=n.getConstructor(t,e,m,b),o.REQUIRED=!0;else if(a(e,!0)){var w=new _,E=w[b](g?{}:-0,1)!=w,k=h((function(){w.has(1)})),C=d((function(e){new v(e)})),x=!g&&h((function(){for(var e=new v,t=5;t--;)e[b](t,t);return!e.has(-0)}));C||((_=t((function(t,n){l(t,_,e);var i=p(new v,t,_);return null!=n&&u(n,i[b],i,m),i}))).prototype=y,y.constructor=_),(k||x)&&(S("delete"),S("has"),m&&S("get")),(x||E)&&S(b),g&&y.clear&&delete y.clear}return T[e]=_,i({global:!0,forced:_!=v},T),f(_,e),g||n.setStrong(_,e,m),_}},46810:function(e,t,n){var i=n(51900),r=n(62466),a=n(8117),s=n(56462);e.exports=function(e,t){for(var n=r(t),o=s.f,u=a.f,l=0;l<n.length;l++){var c=n[l];i(e,c)||o(e,c,u(t,c))}}},10149:function(e,t,n){var i=n(25061);e.exports=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},62141:function(e,t,n){"use strict";var i=n(61151).IteratorPrototype,r=n(22275),a=n(86034),s=n(40606),o=n(80501),u=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=r(i,{next:a(1,n)}),s(e,l,!1,!0),o[l]=u,e}},50430:function(e,t,n){var i=n(11502),r=n(56462),a=n(86034);e.exports=i?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},86034:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},30645:function(e,t,n){"use strict";var i=n(29638),r=n(62141),a=n(64320),s=n(22848),o=n(40606),u=n(50430),l=n(96313),c=n(46802),h=n(20013),d=n(80501),f=n(61151),p=f.IteratorPrototype,m=f.BUGGY_SAFARI_ITERATORS,g=c("iterator"),v="keys",y="values",_="entries",b=function(){return this};e.exports=function(e,t,n,c,f,T,S){r(n,t,c);var w,E,k,C=function(e){if(e===f&&P)return P;if(!m&&e in I)return I[e];switch(e){case v:case y:case _:return function(){return new n(this,e)}}return function(){return new n(this)}},x=t+" Iterator",A=!1,I=e.prototype,O=I[g]||I["@@iterator"]||f&&I[f],P=!m&&O||C(f),L="Array"==t&&I.entries||O;if(L&&(w=a(L.call(new e)),p!==Object.prototype&&w.next&&(h||a(w)===p||(s?s(w,p):"function"!=typeof w[g]&&u(w,g,b)),o(w,x,!0,!0),h&&(d[x]=b))),f==y&&O&&O.name!==y&&(A=!0,P=function(){return O.call(this)}),h&&!S||I[g]===P||u(I,g,P),d[t]=P,f)if(E={values:C(y),keys:T?P:C(v),entries:C(_)},S)for(k in E)(m||A||!(k in I))&&l(I,k,E[k]);else i({target:t,proto:!0,forced:m||A},E);return E}},11502:function(e,t,n){var i=n(25061);e.exports=!i((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},36009:function(e,t,n){var i=n(45001),r=n(62366),a=i.document,s=r(a)&&r(a.createElement);e.exports=function(e){return s?a.createElement(e):{}}},58514:function(e){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}},72089:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},29638:function(e,t,n){var i=n(45001),r=n(8117).f,a=n(50430),s=n(96313),o=n(88506),u=n(46810),l=n(91092);e.exports=function(e,t){var n,c,h,d,f,p=e.target,m=e.global,g=e.stat;if(n=m?i:g?i[p]||o(p,{}):(i[p]||{}).prototype)for(c in t){if(d=t[c],h=e.noTargetGet?(f=r(n,c))&&f.value:n[c],!l(m?c:p+(g?".":"#")+c,e.forced)&&void 0!==h){if(typeof d==typeof h)continue;u(d,h)}(e.sham||h&&h.sham)&&a(d,"sham",!0),s(n,c,d,e)}}},25061:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},95453:function(e,t,n){"use strict";var i=n(50430),r=n(96313),a=n(25061),s=n(46802),o=n(44847),u=s("species"),l=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),c=!a((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,h){var d=s(e),f=!a((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),p=f&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return t=!0,null},n[d](""),!t}));if(!f||!p||"replace"===e&&!l||"split"===e&&!c){var m=/./[d],g=n(d,""[e],(function(e,t,n,i,r){return t.exec===o?f&&!r?{done:!0,value:m.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}})),v=g[0],y=g[1];r(String.prototype,e,v),r(RegExp.prototype,d,2==t?function(e,t){return y.call(e,this,t)}:function(e){return y.call(e,this)}),h&&i(RegExp.prototype[d],"sham",!0)}}},98218:function(e,t,n){var i=n(25061);e.exports=!i((function(){return Object.isExtensible(Object.preventExtensions({}))}))},21501:function(e,t,n){var i=n(6809);e.exports=i("native-function-to-string",Function.toString)},3425:function(e,t,n){var i=n(53757),r=n(45001),a=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?a(i[e])||a(r[e]):i[e]&&i[e][t]||r[e]&&r[e][t]}},26354:function(e,t,n){var i=n(20486),r=n(80501),a=n(46802)("iterator");e.exports=function(e){if(null!=e)return e[a]||e["@@iterator"]||r[i(e)]}},45001:function(e,t,n){var i=function(e){return e&&e.Math==Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||Function("return this")()},51900:function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},92499:function(e){e.exports={}},12118:function(e,t,n){var i=n(3425);e.exports=i("document","documentElement")},17788:function(e,t,n){var i=n(11502),r=n(25061),a=n(36009);e.exports=!i&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},62901:function(e,t,n){var i=n(25061),r=n(75489),a="".split;e.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?a.call(e,""):Object(e)}:Object},3419:function(e,t,n){var i=n(62366),r=n(22848);e.exports=function(e,t,n){var a,s;return r&&"function"==typeof(a=t.constructor)&&a!==n&&i(s=a.prototype)&&s!==n.prototype&&r(e,s),e}},81738:function(e,t,n){var i=n(92499),r=n(62366),a=n(51900),s=n(56462).f,o=n(41050),u=n(98218),l=o("meta"),c=0,h=Object.isExtensible||function(){return!0},d=function(e){s(e,l,{value:{objectID:"O"+ ++c,weakData:{}}})},f=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,l)){if(!h(e))return"F";if(!t)return"E";d(e)}return e[l].objectID},getWeakData:function(e,t){if(!a(e,l)){if(!h(e))return!0;if(!t)return!1;d(e)}return e[l].weakData},onFreeze:function(e){return u&&f.REQUIRED&&h(e)&&!a(e,l)&&d(e),e}};i[l]=!0},50684:function(e,t,n){var i,r,a,s=n(77650),o=n(45001),u=n(62366),l=n(50430),c=n(51900),h=n(61695),d=n(92499),f=o.WeakMap;if(s){var p=new f,m=p.get,g=p.has,v=p.set;i=function(e,t){return v.call(p,e,t),t},r=function(e){return m.call(p,e)||{}},a=function(e){return g.call(p,e)}}else{var y=h("state");d[y]=!0,i=function(e,t){return l(e,y,t),t},r=function(e){return c(e,y)?e[y]:{}},a=function(e){return c(e,y)}}e.exports={set:i,get:r,has:a,enforce:function(e){return a(e)?r(e):i(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},55557:function(e,t,n){var i=n(46802),r=n(80501),a=i("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||s[a]===e)}},20119:function(e,t,n){var i=n(75489);e.exports=Array.isArray||function(e){return"Array"==i(e)}},91092:function(e,t,n){var i=n(25061),r=/#|\.prototype\./,a=function(e,t){var n=o[s(e)];return n==l||n!=u&&("function"==typeof t?i(t):!!t)},s=a.normalize=function(e){return String(e).replace(r,".").toLowerCase()},o=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},62366:function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},20013:function(e){e.exports=!1},98971:function(e,t,n){var i=n(4905),r=n(55557),a=n(74479),s=n(17755),o=n(26354),u=n(35304),l=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,c,h){var d,f,p,m,g,v,y,_=s(t,n,c?2:1);if(h)d=e;else{if("function"!=typeof(f=o(e)))throw TypeError("Target is not iterable");if(r(f)){for(p=0,m=a(e.length);m>p;p++)if((g=c?_(i(y=e[p])[0],y[1]):_(e[p]))&&g instanceof l)return g;return new l(!1)}d=f.call(e)}for(v=d.next;!(y=v.call(d)).done;)if("object"==typeof(g=u(d,_,y.value,c))&&g&&g instanceof l)return g;return new l(!1)}).stop=function(e){return new l(!0,e)}},61151:function(e,t,n){"use strict";var i,r,a,s=n(64320),o=n(50430),u=n(51900),l=n(46802),c=n(20013),h=l("iterator"),d=!1;[].keys&&("next"in(a=[].keys())?(r=s(s(a)))!==Object.prototype&&(i=r):d=!0),null==i&&(i={}),c||u(i,h)||o(i,h,(function(){return this})),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:d}},80501:function(e){e.exports={}},99262:function(e,t,n){var i=n(25061);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},77650:function(e,t,n){var i=n(45001),r=n(21501),a=i.WeakMap;e.exports="function"==typeof a&&/native code/.test(r.call(a))},71640:function(e,t,n){"use strict";var i=n(11502),r=n(25061),a=n(89749),s=n(72822),o=n(49265),u=n(87615),l=n(62901),c=Object.assign;e.exports=!c||r((function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||a(c({},t)).join("")!=i}))?function(e,t){for(var n=u(e),r=arguments.length,c=1,h=s.f,d=o.f;r>c;)for(var f,p=l(arguments[c++]),m=h?a(p).concat(h(p)):a(p),g=m.length,v=0;g>v;)f=m[v++],i&&!d.call(p,f)||(n[f]=p[f]);return n}:c},22275:function(e,t,n){var i=n(4905),r=n(56191),a=n(72089),s=n(92499),o=n(12118),u=n(36009),l=n(61695)("IE_PROTO"),c=function(){},h=function(){var e,t=u("iframe"),n=a.length;for(t.style.display="none",o.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),h=e.F;n--;)delete h.prototype[a[n]];return h()};e.exports=Object.create||function(e,t){var n;return null!==e?(c.prototype=i(e),n=new c,c.prototype=null,n[l]=e):n=h(),void 0===t?n:r(n,t)},s[l]=!0},56191:function(e,t,n){var i=n(11502),r=n(56462),a=n(4905),s=n(89749);e.exports=i?Object.defineProperties:function(e,t){a(e);for(var n,i=s(t),o=i.length,u=0;o>u;)r.f(e,n=i[u++],t[n]);return e}},56462:function(e,t,n){var i=n(11502),r=n(17788),a=n(4905),s=n(76973),o=Object.defineProperty;t.f=i?o:function(e,t,n){if(a(e),t=s(t,!0),a(n),r)try{return o(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}},8117:function(e,t,n){var i=n(11502),r=n(49265),a=n(86034),s=n(40678),o=n(76973),u=n(51900),l=n(17788),c=Object.getOwnPropertyDescriptor;t.f=i?c:function(e,t){if(e=s(e),t=o(t,!0),l)try{return c(e,t)}catch(e){}if(u(e,t))return a(!r.f.call(e,t),e[t])}},59219:function(e,t,n){var i=n(23855),r=n(72089).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},72822:function(e,t){t.f=Object.getOwnPropertySymbols},64320:function(e,t,n){var i=n(51900),r=n(87615),a=n(61695),s=n(10149),o=a("IE_PROTO"),u=Object.prototype;e.exports=s?Object.getPrototypeOf:function(e){return e=r(e),i(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},23855:function(e,t,n){var i=n(51900),r=n(40678),a=n(5029).indexOf,s=n(92499);e.exports=function(e,t){var n,o=r(e),u=0,l=[];for(n in o)!i(s,n)&&i(o,n)&&l.push(n);for(;t.length>u;)i(o,n=t[u++])&&(~a(l,n)||l.push(n));return l}},89749:function(e,t,n){var i=n(23855),r=n(72089);e.exports=Object.keys||function(e){return i(e,r)}},49265:function(e,t){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);t.f=r?function(e){var t=i(this,e);return!!t&&t.enumerable}:n},22848:function(e,t,n){var i=n(4905),r=n(29076);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,a){return i(n),r(a),t?e.call(n,a):n.__proto__=a,n}}():void 0)},45085:function(e,t,n){"use strict";var i=n(20486),r={};r[n(46802)("toStringTag")]="z",e.exports="[object z]"!==String(r)?function(){return"[object "+i(this)+"]"}:r.toString},62466:function(e,t,n){var i=n(3425),r=n(59219),a=n(72822),s=n(4905);e.exports=i("Reflect","ownKeys")||function(e){var t=r.f(s(e)),n=a.f;return n?t.concat(n(e)):t}},7206:function(e,t,n){var i=n(45001),r=n(9522).trim,a=n(49309),s=i.parseInt,o=/^[+-]?0[Xx]/,u=8!==s(a+"08")||22!==s(a+"0x16");e.exports=u?function(e,t){var n=r(String(e));return s(n,t>>>0||(o.test(n)?16:10))}:s},53757:function(e,t,n){e.exports=n(45001)},86846:function(e,t,n){var i=n(96313);e.exports=function(e,t,n){for(var r in t)i(e,r,t[r],n);return e}},96313:function(e,t,n){var i=n(45001),r=n(6809),a=n(50430),s=n(51900),o=n(88506),u=n(21501),l=n(50684),c=l.get,h=l.enforce,d=String(u).split("toString");r("inspectSource",(function(e){return u.call(e)})),(e.exports=function(e,t,n,r){var u=!!r&&!!r.unsafe,l=!!r&&!!r.enumerable,c=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||s(n,"name")||a(n,"name",t),h(n).source=d.join("string"==typeof t?t:"")),e!==i?(u?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=n:a(e,t,n)):l?e[t]=n:o(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||u.call(this)}))},41847:function(e,t,n){var i=n(75489),r=n(44847);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var a=n.call(e,t);if("object"!=typeof a)throw TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==i(e))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},44847:function(e,t,n){"use strict";var i,r,a=n(5268),s=RegExp.prototype.exec,o=String.prototype.replace,u=s,l=(i=/a/,r=/b*/g,s.call(i,"a"),s.call(r,"a"),0!==i.lastIndex||0!==r.lastIndex),c=void 0!==/()??/.exec("")[1];(l||c)&&(u=function(e){var t,n,i,r,u=this;return c&&(n=new RegExp("^"+u.source+"$(?!\\s)",a.call(u))),l&&(t=u.lastIndex),i=s.call(u,e),l&&i&&(u.lastIndex=u.global?i.index+i[0].length:t),c&&i&&i.length>1&&o.call(i[0],n,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)})),i}),e.exports=u},5268:function(e,t,n){"use strict";var i=n(4905);e.exports=function(){var e=i(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}},64475:function(e){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},88506:function(e,t,n){var i=n(45001),r=n(50430);e.exports=function(e,t){try{r(i,e,t)}catch(n){i[e]=t}return t}},40606:function(e,t,n){var i=n(56462).f,r=n(51900),a=n(46802)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,a)&&i(e,a,{configurable:!0,value:t})}},61695:function(e,t,n){var i=n(6809),r=n(41050),a=i("keys");e.exports=function(e){return a[e]||(a[e]=r(e))}},19982:function(e,t,n){var i=n(45001),r=n(88506),a="__core-js_shared__",s=i[a]||r(a,{});e.exports=s},6809:function(e,t,n){var i=n(20013),r=n(19982);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.4.0",mode:i?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},31853:function(e,t,n){"use strict";var i=n(25061);e.exports=function(e,t){var n=[][e];return!n||!i((function(){n.call(null,t||function(){throw 1},1)}))}},50189:function(e,t,n){var i=n(90321),r=n(64475),a=function(e){return function(t,n){var a,s,o=String(r(t)),u=i(n),l=o.length;return u<0||u>=l?e?"":void 0:(a=o.charCodeAt(u))<55296||a>56319||u+1===l||(s=o.charCodeAt(u+1))<56320||s>57343?e?o.charAt(u):a:e?o.slice(u,u+2):s-56320+(a-55296<<10)+65536}};e.exports={codeAt:a(!1),charAt:a(!0)}},9522:function(e,t,n){var i=n(64475),r="["+n(49309)+"]",a=RegExp("^"+r+r+"*"),s=RegExp(r+r+"*$"),o=function(e){return function(t){var n=String(i(t));return 1&e&&(n=n.replace(a,"")),2&e&&(n=n.replace(s,"")),n}};e.exports={start:o(1),end:o(2),trim:o(3)}},6971:function(e,t,n){var i=n(90321),r=Math.max,a=Math.min;e.exports=function(e,t){var n=i(e);return n<0?r(n+t,0):a(n,t)}},40678:function(e,t,n){var i=n(62901),r=n(64475);e.exports=function(e){return i(r(e))}},90321:function(e){var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},74479:function(e,t,n){var i=n(90321),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},87615:function(e,t,n){var i=n(64475);e.exports=function(e){return Object(i(e))}},76973:function(e,t,n){var i=n(62366);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},41050:function(e){var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},84583:function(e,t,n){var i=n(3425);e.exports=i("navigator","userAgent")||""},24101:function(e,t,n){var i,r,a=n(45001),s=n(84583),o=a.process,u=o&&o.versions,l=u&&u.v8;l?r=(i=l.split("."))[0]+i[1]:s&&(!(i=s.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=s.match(/Chrome\/(\d+)/))&&(r=i[1]),e.exports=r&&+r},46802:function(e,t,n){var i=n(45001),r=n(6809),a=n(41050),s=n(99262),o=i.Symbol,u=r("wks");e.exports=function(e){return u[e]||(u[e]=s&&o[e]||(s?o:a)("Symbol."+e))}},49309:function(e){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},15296:function(e,t,n){"use strict";var i=n(29638),r=n(72758).filter;i({target:"Array",proto:!0,forced:!n(95611)("filter")},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},94386:function(e,t,n){"use strict";var i=n(29638),r=n(16607);i({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},48868:function(e,t,n){"use strict";var i=n(40678),r=n(5822),a=n(80501),s=n(50684),o=n(30645),u="Array Iterator",l=s.set,c=s.getterFor(u);e.exports=o(Array,"Array",(function(e,t){l(this,{type:u,target:i(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},82937:function(e,t,n){"use strict";var i=n(29638),r=n(62040).left;i({target:"Array",proto:!0,forced:n(31853)("reduce")},{reduce:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},66403:function(e,t,n){var i=n(11502),r=n(56462).f,a=Function.prototype,s=a.toString,o=/^\s*function ([^ (]*)/,u="name";i&&!(u in a)&&r(a,u,{configurable:!0,get:function(){try{return s.call(this).match(o)[1]}catch(e){return""}}})},96609:function(e,t,n){var i=n(29638),r=n(71640);i({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},92274:function(e,t,n){var i=n(96313),r=n(45085),a=Object.prototype;r!==a.toString&&i(a,"toString",r,{unsafe:!0})},68268:function(e,t,n){var i=n(29638),r=n(7206);i({global:!0,forced:parseInt!=r},{parseInt:r})},42295:function(e,t,n){"use strict";var i=n(29638),r=n(44847);i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},81874:function(e,t,n){"use strict";var i=n(50189).charAt,r=n(50684),a=n(30645),s="String Iterator",o=r.set,u=r.getterFor(s);a(String,"String",(function(e){o(this,{type:s,string:String(e),index:0})}),(function(){var e,t=u(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=i(n,r),t.index+=e.length,{value:e,done:!1})}))},52963:function(e,t,n){"use strict";var i=n(95453),r=n(4905),a=n(74479),s=n(64475),o=n(25528),u=n(41847);i("match",1,(function(e,t,n){return[function(t){var n=s(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,n):new RegExp(t)[e](String(n))},function(e){var i=n(t,e,this);if(i.done)return i.value;var s=r(e),l=String(this);if(!s.global)return u(s,l);var c=s.unicode;s.lastIndex=0;for(var h,d=[],f=0;null!==(h=u(s,l));){var p=String(h[0]);d[f]=p,""===p&&(s.lastIndex=o(l,a(s.lastIndex),c)),f++}return 0===f?null:d}]}))},34994:function(e,t,n){"use strict";var i=n(95453),r=n(4905),a=n(87615),s=n(74479),o=n(90321),u=n(64475),l=n(25528),c=n(41847),h=Math.max,d=Math.min,f=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g;i("replace",2,(function(e,t,n){return[function(n,i){var r=u(this),a=null==n?void 0:n[e];return void 0!==a?a.call(n,r,i):t.call(String(r),n,i)},function(e,a){var u=n(t,e,this,a);if(u.done)return u.value;var f=r(e),p=String(this),m="function"==typeof a;m||(a=String(a));var g=f.global;if(g){var v=f.unicode;f.lastIndex=0}for(var y=[];;){var _=c(f,p);if(null===_)break;if(y.push(_),!g)break;""===String(_[0])&&(f.lastIndex=l(p,s(f.lastIndex),v))}for(var b,T="",S=0,w=0;w<y.length;w++){_=y[w];for(var E=String(_[0]),k=h(d(o(_.index),p.length),0),C=[],x=1;x<_.length;x++)C.push(void 0===(b=_[x])?b:String(b));var A=_.groups;if(m){var I=[E].concat(C,k,p);void 0!==A&&I.push(A);var O=String(a.apply(void 0,I))}else O=i(E,p,k,C,A,a);k>=S&&(T+=p.slice(S,k)+O,S=k+E.length)}return T+p.slice(S)}];function i(e,n,i,r,s,o){var u=i+e.length,l=r.length,c=m;return void 0!==s&&(s=a(s),c=p),t.call(o,c,(function(t,a){var o;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,i);case"'":return n.slice(u);case"<":o=s[a.slice(1,-1)];break;default:var c=+a;if(0===c)return t;if(c>l){var h=f(c/10);return 0===h?t:h<=l?void 0===r[h-1]?a.charAt(1):r[h-1]+a.charAt(1):t}o=r[c-1]}return void 0===o?"":o}))}}))},31341:function(e,t,n){"use strict";var i,r=n(45001),a=n(86846),s=n(81738),o=n(66606),u=n(53769),l=n(62366),c=n(50684).enforce,h=n(77650),d=!r.ActiveXObject&&"ActiveXObject"in r,f=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},m=e.exports=o("WeakMap",p,u,!0,!0);if(h&&d){i=u.getConstructor(p,"WeakMap",!0),s.REQUIRED=!0;var g=m.prototype,v=g.delete,y=g.has,_=g.get,b=g.set;a(g,{delete:function(e){if(l(e)&&!f(e)){var t=c(this);return t.frozen||(t.frozen=new i),v.call(this,e)||t.frozen.delete(e)}return v.call(this,e)},has:function(e){if(l(e)&&!f(e)){var t=c(this);return t.frozen||(t.frozen=new i),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(l(e)&&!f(e)){var t=c(this);return t.frozen||(t.frozen=new i),y.call(this,e)?_.call(this,e):t.frozen.get(e)}return _.call(this,e)},set:function(e,t){if(l(e)&&!f(e)){var n=c(this);n.frozen||(n.frozen=new i),y.call(this,e)?b.call(this,e,t):n.frozen.set(e,t)}else b.call(this,e,t);return this}})}},98457:function(e,t,n){var i=n(45001),r=n(58514),a=n(16607),s=n(50430);for(var o in r){var u=i[o],l=u&&u.prototype;if(l&&l.forEach!==a)try{s(l,"forEach",a)}catch(e){l.forEach=a}}},54861:function(e,t,n){var i=n(45001),r=n(58514),a=n(48868),s=n(50430),o=n(46802),u=o("iterator"),l=o("toStringTag"),c=a.values;for(var h in r){var d=i[h],f=d&&d.prototype;if(f){if(f[u]!==c)try{s(f,u,c)}catch(e){f[u]=c}if(f[l]||s(f,l,h),r[h])for(var p in a)if(f[p]!==a[p])try{s(f,p,a[p])}catch(e){f[p]=a[p]}}}},3384:function(e,t,n){var i,r=void 0!==n.g?n.g:"undefined"!=typeof window?window:{},a=n(58421);"undefined"!=typeof document?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"])||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=i},51562:function(e,t,n){var i;i="undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},e.exports=i},63848:function(e){e.exports=function(e){if(!e)return!1;var n=t.call(e);return"[object Function]"===n||"function"==typeof e&&"[object RegExp]"!==n||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},19389: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 s[e];var n,a=String(e);return(n=i[a.toLowerCase()])?n:(n=r[a.toLowerCase()])||(1===a.length?a.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 a;if(a=i[t.toLowerCase()])return a===n;if(a=r[t.toLowerCase()])return a===n}else if("number"==typeof t)return t===n;return!1}};var i=(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},r=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};for(a=97;a<123;a++)i[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)i[a-48]=a;for(a=1;a<13;a++)i["f"+a]=a+111;for(a=0;a<10;a++)i["numpad "+a]=a+96;var s=t.names=t.title={};for(a in i)s[i[a]]=a;for(var o in r)i[o]=r[o]},40001:function(e,t,n){var i=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),h=Object.prototype.toString,d=Math.max,f=Math.min,p=function(){return c.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==h.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||s.test(e)?o(e.slice(2),n?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var i,r,a,s,o,u,l=0,c=!1,h=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=i,a=r;return i=r=void 0,l=t,s=e.apply(a,n)}function _(e){return l=e,o=setTimeout(T,t),c?y(e):s}function b(e){var n=e-u;return void 0===u||n>=t||n<0||h&&e-l>=a}function T(){var e=p();if(b(e))return S(e);o=setTimeout(T,function(e){var n=t-(e-u);return h?f(n,a-(e-l)):n}(e))}function S(e){return o=void 0,v&&i?y(e):(i=r=void 0,s)}function w(){var e=p(),n=b(e);if(i=arguments,r=this,u=e,n){if(void 0===o)return _(u);if(h)return o=setTimeout(T,t),y(u)}return void 0===o&&(o=setTimeout(T,t)),s}return t=g(t)||0,m(n)&&(c=!!n.leading,a=(h="maxWait"in n)?d(g(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v),w.cancel=function(){void 0!==o&&clearTimeout(o),l=0,i=u=r=o=void 0},w.flush=function(){return void 0===o?s:S(p())},w}},98511:function(e,t,n){var i,r="__lodash_hash_undefined__",a=/^\[object .+?Constructor\]$/,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,o="object"==typeof self&&self&&self.Object===Object&&self,u=s||o||Function("return this")(),l=Array.prototype,c=Function.prototype,h=Object.prototype,d=u["__core-js_shared__"],f=(i=/[^.]+$/.exec(d&&d.keys&&d.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",p=c.toString,m=h.hasOwnProperty,g=h.toString,v=RegExp("^"+p.call(m).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=l.splice,_=C(u,"Map"),b=C(Object,"create");function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function S(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function E(e,t){for(var n,i,r=e.length;r--;)if((n=e[r][0])===(i=t)||n!=n&&i!=i)return r;return-1}function k(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 C(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!A(e)||f&&f in e)return!1;var t=function(e){var t=A(e)?g.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)?v:a;return t.test(function(e){if(null!=e){try{return p.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function x(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],a=n.cache;if(a.has(r))return a.get(r);var s=e.apply(this,i);return n.cache=a.set(r,s),s};return n.cache=new(x.Cache||w),n}function A(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}T.prototype.clear=function(){this.__data__=b?b(null):{}},T.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},T.prototype.get=function(e){var t=this.__data__;if(b){var n=t[e];return n===r?void 0:n}return m.call(t,e)?t[e]:void 0},T.prototype.has=function(e){var t=this.__data__;return b?void 0!==t[e]:m.call(t,e)},T.prototype.set=function(e,t){return this.__data__[e]=b&&void 0===t?r:t,this},S.prototype.clear=function(){this.__data__=[]},S.prototype.delete=function(e){var t=this.__data__,n=E(t,e);return!(n<0||(n==t.length-1?t.pop():y.call(t,n,1),0))},S.prototype.get=function(e){var t=this.__data__,n=E(t,e);return n<0?void 0:t[n][1]},S.prototype.has=function(e){return E(this.__data__,e)>-1},S.prototype.set=function(e,t){var n=this.__data__,i=E(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},w.prototype.clear=function(){this.__data__={hash:new T,map:new(_||S),string:new T}},w.prototype.delete=function(e){return k(this,e).delete(e)},w.prototype.get=function(e){return k(this,e).get(e)},w.prototype.has=function(e){return k(this,e).has(e)},w.prototype.set=function(e,t){return k(this,e).set(e,t),this},x.Cache=w,e.exports=x},50200:function(e,t,n){var i="Expected a function",r=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,h=l||c||Function("return this")(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return h.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=s.test(e);return n||o.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError(i);return g(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),function(e,t,n){var r,a,s,o,u,l,c=0,h=!1,d=!1,y=!0;if("function"!=typeof e)throw new TypeError(i);function _(t){var n=r,i=a;return r=a=void 0,c=t,o=e.apply(i,n)}function b(e){return c=e,u=setTimeout(S,t),h?_(e):o}function T(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=s}function S(){var e=m();if(T(e))return w(e);u=setTimeout(S,function(e){var n=t-(e-l);return d?p(n,s-(e-c)):n}(e))}function w(e){return u=void 0,y&&r?_(e):(r=a=void 0,o)}function E(){var e=m(),n=T(e);if(r=arguments,a=this,l=e,n){if(void 0===u)return b(l);if(d)return u=setTimeout(S,t),_(l)}return void 0===u&&(u=setTimeout(S,t)),o}return t=v(t)||0,g(n)&&(h=!!n.leading,s=(d="maxWait"in n)?f(v(n.maxWait)||0,t):s,y="trailing"in n?!!n.trailing:y),E.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=l=a=u=void 0},E.flush=function(){return void 0===u?o:w(m())},E}(e,t,{leading:r,maxWait:t,trailing:a})}},37407:function(e){"use strict";var t=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],n=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},i=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+=n(e,t),i(e,t))},r=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]};e.exports={isLikelyAacData:function(e){var t=i(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:n,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,i=e[t+4]<<3;return 6144&e[t+3]|i|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 n=0;n+5<e.length;){if(255===e[n]&&240==(246&e[n+1]))return t[(60&e[n+2])>>>2];n++}return null},parseAacTimestamp:function(e){var t,n,i;t=10,64&e[5]&&(t+=4,t+=r(e.subarray(10,14)));do{if((n=r(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){i=e.subarray(t+10,t+n+10);for(var a=0;a<i.byteLength;a++)if(0===i[a]){var s=unescape(function(e,t,n){var i,r="";for(i=0;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r}(i,0,a));if("com.apple.streaming.transportStreamTimestamp"===s){var o=i.subarray(a+1),u=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return(u*=4)+(3&o[7])}break}}t+=10,t+=n}while(t<e.byteLength);return null}}},35855:function(e,t,n){"use strict";var i=n(80807),r=function(e){var t=31&e[1];return(t<<=8)|e[2]},a=function(e){return!!(64&e[1])},s=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},o=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=r(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=a(e),n=4+s(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=a(e),i=4+s(e);if(n&&(i+=e[i]+1),1&e[i+5]){var r;r=3+((15&e[i+1])<<8|e[i+2])-4;for(var o=12+((15&e[i+10])<<8|e[i+11]);o<r;){var u=i+o;t[(31&e[u+1])<<8|e[u+2]]=e[u],o+=5+((15&e[u+3])<<8|e[u+4])}return t}},parsePayloadUnitStartIndicator:a,parsePesType:function(e,t){switch(t[r(e)]){case i.H264_STREAM_TYPE:return"video";case i.ADTS_STREAM_TYPE:return"audio";case i.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!a(e))return null;var t=4+s(e);if(t>=e.byteLength)return null;var n,i=null;return 192&(n=e[t+7])&&((i={}).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,i.pts*=4,i.pts+=(6&e[t+13])>>>1,i.dts=i.pts,64&n&&(i.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,i.dts*=4,i.dts+=(6&e[t+18])>>>1)),i},videoPacketContainsKeyFrame:function(e){for(var t=4+s(e),n=e.subarray(t),i=0,r=0,a=!1;r<n.byteLength-3;r++)if(1===n[r+2]){i=r+5;break}for(;i<n.byteLength;)switch(n[i]){case 0:if(0!==n[i-1]){i+=2;break}if(0!==n[i-2]){i++;break}r+3!==i-2&&"slice_layer_without_partitioning_rbsp_idr"===o(31&n[r+3])&&(a=!0);do{i++}while(1!==n[i]&&i<n.length);r=i-2,i+=3;break;case 1:if(0!==n[i-1]||0!==n[i-2]){i+=3;break}"slice_layer_without_partitioning_rbsp_idr"===o(31&n[r+3])&&(a=!0),r=i-2,i+=3;break;default:i+=3}return n=n.subarray(r),i-=r,r=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===o(31&n[r+3])&&(a=!0),a}}},80807:function(e){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},20046:function(e,t,n){"use strict";var i=n(64634),r="shared",a=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},s=function(e){var t,n;s.prototype.init.call(this),this.type_=e||r,this.push=function(e){this.type_!==r&&e.type!==this.type_||(void 0===n&&(n=e.dts),e.dts=a(e.dts,n),e.pts=a(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")}};s.prototype=new i,e.exports={TimestampRolloverStream:s,handleRollover:a}},36805:function(e,t,n){var i=n(32193).toUnsigned,r=n(98948),a=function(e,t){var n,s,o,u,l,c=[];if(!t.length)return null;for(n=0;n<e.byteLength;)s=i(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),o=r(e.subarray(n+4,n+8)),u=s>1?n+s:e.byteLength,o===t[0]&&(1===t.length?c.push(e.subarray(n+8,u)):(l=a(e.subarray(n+8,u),t.slice(1))).length&&(c=c.concat(l))),n=u;return c};e.exports=a},98948:function(e){e.exports=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),(t+=String.fromCharCode(e[2]))+String.fromCharCode(e[3])}},17185:function(e,t,n){"use strict";var i,r,a,s,o,u,l=n(32193).toUnsigned,c=n(32193).toHexString,h=n(36805),d=n(98948),f=n(93869),p=n(98211),m=n(17876);i=function(e){return h(e,["moov","trak"]).reduce((function(e,t){var n,i,r,a,s;return(n=h(t,["tkhd"])[0])?(i=n[0],a=l(n[r=0===i?12:20]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3]),(s=h(t,["mdia","mdhd"])[0])?(r=0===(i=s[0])?12:20,e[a]=l(s[r]<<24|s[r+1]<<16|s[r+2]<<8|s[r+3]),e):null):null}),{})},r=function(e,t){var n,i,r;return n=h(t,["moof","traf"]),i=[].concat.apply([],n.map((function(t){return h(t,["tfhd"]).map((function(n){var i,r,a;return i=l(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),r=e[i]||9e4,a=h(t,["tfdt"]).map((function(e){var t,n;return t=e[0],n=l(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=l(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n}))[0],(a="number"!=typeof a||isNaN(a)?1/0:a)/r}))}))),r=Math.min.apply(null,i),isFinite(r)?r:0},a=function(e,t){var n,i=h(t,["moof","traf"]),r=0,a=0;if(i&&i.length){var s=h(i[0],["tfhd"])[0],o=h(i[0],["trun"])[0],u=h(i[0],["tfdt"])[0];if(s&&(n=f(s).trackId),u&&(r=m(u).baseMediaDecodeTime),o){var l=p(o);l.samples&&l.samples.length&&(a=l.samples[0].compositionTimeOffset||0)}}return(r+a)/(e[n]||9e4)},s=function(e){var t=h(e,["moov","trak"]),n=[];return t.forEach((function(e){var t=h(e,["mdia","hdlr"]),i=h(e,["tkhd"]);t.forEach((function(e,t){var r,a,s=d(e.subarray(8,12)),o=i[t];"vide"===s&&(a=0===(r=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?r.getUint32(12):r.getUint32(20),n.push(a))}))})),n},u=function(e){var t=0===e[0]?12:20;return l(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},o=function(e){var t=h(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,i,r={},a=h(e,["tkhd"])[0];a&&(i=(t=new DataView(a.buffer,a.byteOffset,a.byteLength)).getUint8(0),r.id=0===i?t.getUint32(12):t.getUint32(20));var s=h(e,["mdia","hdlr"])[0];if(s){var o=d(s.subarray(8,12));r.type="vide"===o?"video":"soun"===o?"audio":o}var l=h(e,["mdia","minf","stbl","stsd"])[0];if(l){var f=l.subarray(8);r.codec=d(f.subarray(4,8));var p,m=h(f,[r.codec])[0];m&&(/^[a-z]vc[1-9]$/i.test(r.codec)?(p=m.subarray(78),"avcC"===d(p.subarray(4,8))&&p.length>11?(r.codec+=".",r.codec+=c(p[9]),r.codec+=c(p[10]),r.codec+=c(p[11])):r.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(r.codec)?(p=m.subarray(28),"esds"===d(p.subarray(4,8))&&p.length>20&&0!==p[19]?(r.codec+="."+c(p[19]),r.codec+="."+c(p[20]>>>2&63).replace(/^0/,"")):r.codec="mp4a.40.2"):r.codec=r.codec.toLowerCase())}var g=h(e,["mdia","mdhd"])[0];g&&(r.timescale=u(g)),n.push(r)})),n},e.exports={findBox:h,parseType:d,timescale:i,startTime:r,compositionStartTime:a,videoTrackIds:s,tracks:o,getTimescaleFromMediaHeader:u}},98639:function(e){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]}}},57258:function(e){var t=Math.pow(2,32);e.exports=function(e){var n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8)},r=12;0===i.version?(i.earliestPresentationTime=n.getUint32(r),i.firstOffset=n.getUint32(r+4),r+=8):(i.earliestPresentationTime=n.getUint32(r)*t+n.getUint32(r+4),i.firstOffset=n.getUint32(r+8)*t+n.getUint32(r+12),r+=16),r+=2;var a=n.getUint16(r);for(r+=2;a>0;r+=12,a--)i.references.push({referenceType:(128&e[r])>>>7,referencedSize:2147483647&n.getUint32(r),subsegmentDuration:n.getUint32(r+4),startsWithSap:!!(128&e[r+8]),sapType:(112&e[r+8])>>>4,sapDeltaTime:268435455&n.getUint32(r+8)});return i}},17876:function(e,t,n){var i=n(32193).toUnsigned;e.exports=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:i(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=i(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t}},93869:function(e){e.exports=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},r=1&i.flags[2],a=2&i.flags[2],s=8&i.flags[2],o=16&i.flags[2],u=32&i.flags[2],l=65536&i.flags[0],c=131072&i.flags[0];return t=8,r&&(t+=4,i.baseDataOffset=n.getUint32(12),t+=4),a&&(i.sampleDescriptionIndex=n.getUint32(t),t+=4),s&&(i.defaultSampleDuration=n.getUint32(t),t+=4),o&&(i.defaultSampleSize=n.getUint32(t),t+=4),u&&(i.defaultSampleFlags=n.getUint32(t)),l&&(i.durationIsEmpty=!0),!r&&c&&(i.baseDataOffsetIsMoof=!0),i}},98211:function(e,t,n){var i=n(98639);e.exports=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),a=1&n.flags[2],s=4&n.flags[2],o=1&n.flags[1],u=2&n.flags[1],l=4&n.flags[1],c=8&n.flags[1],h=r.getUint32(4),d=8;for(a&&(n.dataOffset=r.getInt32(d),d+=4),s&&h&&(t={flags:i(e.subarray(d,d+4))},d+=4,o&&(t.duration=r.getUint32(d),d+=4),u&&(t.size=r.getUint32(d),d+=4),c&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t),h--);h--;)t={},o&&(t.duration=r.getUint32(d),d+=4),u&&(t.size=r.getUint32(d),d+=4),l&&(t.flags=i(e.subarray(d,d+4)),d+=4),c&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t);return n}},56198:function(e,t,n){"use strict";var i=n(80807),r=n(20046).handleRollover,a={};a.ts=n(35855),a.aac=n(37407);var s=n(28195).ONE_SECOND_IN_TS,o=188,u=71,l=function(e,t,n){for(var i,r,s,l,c=0,h=o,d=!1;h<=e.byteLength;)if(e[c]!==u||e[h]!==u&&h!==e.byteLength)c++,h++;else{if(i=e.subarray(c,h),"pes"===a.ts.parseType(i,t.pid)&&(r=a.ts.parsePesType(i,t.table),s=a.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&s&&(l=a.ts.parsePesTime(i))&&(l.type="audio",n.audio.push(l),d=!0)),d)break;c+=o,h+=o}for(c=(h=e.byteLength)-o,d=!1;c>=0;)if(e[c]!==u||e[h]!==u&&h!==e.byteLength)c--,h--;else{if(i=e.subarray(c,h),"pes"===a.ts.parseType(i,t.pid)&&(r=a.ts.parsePesType(i,t.table),s=a.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&s&&(l=a.ts.parsePesTime(i))&&(l.type="audio",n.audio.push(l),d=!0)),d)break;c-=o,h-=o}},c=function(e,t,n){for(var i,r,s,l,c,h,d,f=0,p=o,m=!1,g={data:[],size:0};p<e.byteLength;)if(e[f]!==u||e[p]!==u)f++,p++;else{if(i=e.subarray(f,p),"pes"===a.ts.parseType(i,t.pid)&&(r=a.ts.parsePesType(i,t.table),s=a.ts.parsePayloadUnitStartIndicator(i),"video"===r&&(s&&!m&&(l=a.ts.parsePesTime(i))&&(l.type="video",n.video.push(l),m=!0),!n.firstKeyFrame))){if(s&&0!==g.size){for(c=new Uint8Array(g.size),h=0;g.data.length;)d=g.data.shift(),c.set(d,h),h+=d.byteLength;if(a.ts.videoPacketContainsKeyFrame(c)){var v=a.ts.parsePesTime(c);v?(n.firstKeyFrame=v,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.")}g.size=0}g.data.push(i),g.size+=i.byteLength}if(m&&n.firstKeyFrame)break;f+=o,p+=o}for(f=(p=e.byteLength)-o,m=!1;f>=0;)if(e[f]!==u||e[p]!==u)f--,p--;else{if(i=e.subarray(f,p),"pes"===a.ts.parseType(i,t.pid)&&(r=a.ts.parsePesType(i,t.table),s=a.ts.parsePayloadUnitStartIndicator(i),"video"===r&&s&&(l=a.ts.parsePesTime(i))&&(l.type="video",n.video.push(l),m=!0)),m)break;f-=o,p-=o}};e.exports={inspect:function(e,t){var n;return n=a.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,i=0,r=null,o=null,u=0,l=0;e.length-l>=3;){switch(a.aac.parseType(e,l)){case"timed-metadata":if(e.length-l<10){n=!0;break}if((u=a.aac.parseId3TagSize(e,l))>e.length){n=!0;break}null===o&&(t=e.subarray(l,l+u),o=a.aac.parseAacTimestamp(t)),l+=u;break;case"audio":if(e.length-l<7){n=!0;break}if((u=a.aac.parseAdtsSize(e,l))>e.length){n=!0;break}null===r&&(t=e.subarray(l,l+u),r=a.aac.parseSampleRate(t)),i++,l+=u;break;default:l++}if(n)return null}if(null===r||null===o)return null;var c=s/r;return{audio:[{type:"audio",dts:o,pts:o},{type:"audio",dts:o+1024*i*c,pts:o+1024*i*c}]}}(e):function(e){var t={pid:null,table:null},n={};for(var r in function(e,t){for(var n,i=0,r=o;r<e.byteLength;)if(e[i]!==u||e[r]!==u)i++,r++;else{switch(n=e.subarray(i,r),a.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=a.ts.parsePat(n));break;case"pmt":t.table||(t.table=a.ts.parsePmt(n))}if(t.pid&&t.table)return;i+=o,r+=o}}(e,t),t.table)if(t.table.hasOwnProperty(r))switch(t.table[r]){case i.H264_STREAM_TYPE:n.video=[],c(e,t,n),0===n.video.length&&delete n.video;break;case i.ADTS_STREAM_TYPE:n.audio=[],l(e,t,n),0===n.audio.length&&delete n.audio}return n}(e),n&&(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=r(e.dts,n),e.pts=r(e.pts,n),e.dtsTime=e.dts/s,e.ptsTime=e.pts/s}))}if(e.video&&e.video.length){var i=t;if(void 0===i&&(i=e.video[0].dts),e.video.forEach((function(e){e.dts=r(e.dts,i),e.pts=r(e.pts,i),e.dtsTime=e.dts/s,e.ptsTime=e.pts/s})),e.firstKeyFrame){var a=e.firstKeyFrame;a.dts=r(a.dts,i),a.pts=r(a.pts,i),a.dtsTime=a.dts/s,a.ptsTime=a.dts/s}}}(n,t),n):null},parseAudioPes_:l}},32193:function(e){e.exports={toUnsigned:function(e){return e>>>0},toHexString:function(e){return("00"+e.toString(16)).slice(-2)}}},28195:function(e){var t,n,i,r,a,s,o,u=9e4;t=function(e){return e*u},n=function(e,t){return e*t},i=function(e){return e/u},r=function(e,t){return e/t},a=function(e,n){return t(r(e,n))},s=function(e,t){return n(i(e),t)},o=function(e,t,n){return i(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:u,secondsToVideoTs:t,secondsToAudioTs:n,videoTsToSeconds:i,audioTsToSeconds:r,audioTsToVideoTs:a,videoTsToAudioTs:s,metadataTsToSeconds:o}},64634:function(e){"use strict";var t=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 i;return!!e[t]&&(i=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(i,1),i>-1)},this.trigger=function(t){var n,i,r,a;if(n=e[t])if(2===arguments.length)for(r=n.length,i=0;i<r;++i)n[i].call(this,arguments[1]);else{for(a=[],i=arguments.length,i=1;i<arguments.length;++i)a.push(arguments[i]);for(r=n.length,i=0;i<r;++i)n[i].apply(this,a)}},this.dispose=function(){e={}}}};t.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},t.prototype.push=function(e){this.trigger("data",e)},t.prototype.flush=function(e){this.trigger("done",e)},t.prototype.partialFlush=function(e){this.trigger("partialdone",e)},t.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},t.prototype.reset=function(e){this.trigger("reset",e)},e.exports=t},8004:function(e){e.exports=function(e,t){var n,i=null;try{n=JSON.parse(e,t)}catch(e){i=e}return[i,n]}},18204:function(e,t,n){"use strict";n.d(t,{Z:function(){return B}}),n(94386),n(98457);var i=n(15206),r=n.n(i),a=(n(15296),n(48868),n(96609),n(92274),n(68268),n(81874),n(31341),n(54861),n(50200)),s=n.n(a),o=n(40001),u=n.n(o),l=n(98511),c=n.n(l),h=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,i){return e[0]===t&&(n=i,!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),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(t,n){var i=e(this.__entries__,t);~i?this.__entries__[i][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,i=e(n,t);~i&&n.splice(i,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,i=this.__entries__;n<i.length;n++){var r=i[n];e.call(t,r[1],r[0])}},t}()}(),d="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,f=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),p="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(f):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},m=["top","right","bottom","left","width","height","size","weight"],g="undefined"!=typeof MutationObserver,v=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,i=!1,r=0;function a(){n&&(n=!1,e()),i&&o()}function s(){p(a)}function o(){var e=Date.now();if(n){if(e-r<2)return;i=!0}else n=!0,i=!1,setTimeout(s,20);r=e}return o}(this.refresh.bind(this))}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(){d&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),g?(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(){d&&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;m.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}(),y=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},_=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||f},b=k(0,0,0,0);function T(e){return parseFloat(e)||0}function S(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+T(e["border-"+n+"-width"])}),0)}var w="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof _(e).SVGGraphicsElement}:function(e){return e instanceof _(e).SVGElement&&"function"==typeof e.getBBox};function E(e){return d?w(e)?function(e){var t=e.getBBox();return k(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return b;var i=_(e).getComputedStyle(e),r=function(e){for(var t={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],a=e["padding-"+r];t[r]=T(a)}return t}(i),a=r.left+r.right,s=r.top+r.bottom,o=T(i.width),u=T(i.height);if("border-box"===i.boxSizing&&(Math.round(o+a)!==t&&(o-=S(i,"left","right")+a),Math.round(u+s)!==n&&(u-=S(i,"top","bottom")+s)),!function(e){return e===_(e).document.documentElement}(e)){var l=Math.round(o+a)-t,c=Math.round(u+s)-n;1!==Math.abs(l)&&(o-=l),1!==Math.abs(c)&&(u-=c)}return k(r.left,r.top,o,u)}(e):b}function k(e,t,n,i){return{x:e,y:t,width:n,height:i}}var C=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=k(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=E(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}(),x=function(e,t){var n,i,r,a,s,o,u,l=(i=(n=t).x,r=n.y,a=n.width,s=n.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(o.prototype),y(u,{x:i,y:r,width:a,height:s,top:r,right:i+a,bottom:s+r,left:i}),u);y(this,{target:e,contentRect:l})},A=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new h,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}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 _(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new C(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 _(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 x(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}(),I="undefined"!=typeof WeakMap?new WeakMap:new h,O=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=v.getInstance(),i=new A(t,n,this);I.set(this,i)};["observe","unobserve","disconnect"].forEach((function(e){O.prototype[e]=function(){var t;return(t=I.get(this))[e].apply(t,arguments)}}));var P=void 0!==f.ResizeObserver?f.ResizeObserver:O,L=(n(82937),n(66403),n(42295),n(52963),n(34994),null),D=null;function R(){if(null===L){if("undefined"==typeof document)return L=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),L=n}return L}r()&&window.addEventListener("resize",(function(){D!==window.devicePixelRatio&&(D=window.devicePixelRatio,L=null)}));var M=function(e){return Array.prototype.reduce.call(e,(function(e,t){var n=t.name.match(/data-simplebar-(.+)/);if(n){var i=n[1].replace(/\W+(.)/g,(function(e,t){return t.toUpperCase()}));switch(t.value){case"true":e[i]=!0;break;case"false":e[i]=!1;break;case void 0:e[i]=!0;break;default:e[i]=t.value}}return e}),{})};function N(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function U(e){return e&&e.ownerDocument?e.ownerDocument:document}var j=function(){function e(t,n){var i=this;this.onScroll=function(){var e=N(i.el);i.scrollXTicking||(e.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(e.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0)},this.scrollX=function(){i.axis.x.isOverflowing&&(i.showScrollbar("x"),i.positionScrollbar("x")),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&(i.showScrollbar("y"),i.positionScrollbar("y")),i.scrollYTicking=!1},this.onMouseEnter=function(){i.showScrollbar("x"),i.showScrollbar("y")},this.onMouseMove=function(e){i.mouseX=e.clientX,i.mouseY=e.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this.onWindowResize=function(){i.scrollbarWidth=i.getScrollbarWidth(),i.hideNativeScrollbar()},this.hideScrollbars=function(){i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.track.rect)||(i.axis.y.scrollbar.el.classList.remove(i.classNames.visible),i.axis.y.isVisible=!1),i.isWithinBounds(i.axis.x.track.rect)||(i.axis.x.scrollbar.el.classList.remove(i.classNames.visible),i.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(t=i.isWithinBounds(i.axis.x.track.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(n=i.isWithinBounds(i.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.x.scrollbar.rect)?i.onDragStart(e,"x"):i.onTrackClick(e,"x")),n&&(i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.scrollbar.rect)?i.onDragStart(e,"y"):i.onTrackClick(e,"y"))))},this.drag=function(t){var n=i.axis[i.draggedAxis].track,r=n.rect[i.axis[i.draggedAxis].sizeAttr],a=i.axis[i.draggedAxis].scrollbar,s=i.contentWrapperEl[i.axis[i.draggedAxis].scrollSizeAttr],o=parseInt(i.elStyles[i.axis[i.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var u=(("y"===i.draggedAxis?t.pageY:t.pageX)-n.rect[i.axis[i.draggedAxis].offsetAttr]-i.axis[i.draggedAxis].dragOffset)/(r-a.size)*(s-o);"x"===i.draggedAxis&&(u=i.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u-(r+a.size):u,u=i.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-u:u),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=u},this.onEndDrag=function(e){var t=U(i.el),n=N(i.el);e.preventDefault(),e.stopPropagation(),i.el.classList.remove(i.classNames.dragging),t.removeEventListener("mousemove",i.drag,!0),t.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=n.setTimeout((function(){t.removeEventListener("click",i.preventClick,!0),t.removeEventListener("dblclick",i.preventClick,!0),i.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=s()(this.recalculate.bind(this),64),this.onMouseMove=s()(this.onMouseMove.bind(this),64),this.hideScrollbars=u()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=u()(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=c()(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 i=n.firstElementChild;n.scrollLeft=0;var r=e.getOffset(n),a=e.getOffset(i);n.scrollLeft=999;var s=e.getOffset(i);return{isRtlScrollingInverted:r.left!==a.left&&a.left-s.left!=0,isRtlScrollbarInverted:r.left!==a.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=U(e),i=N(e);return{top:t.top+(i.pageYOffset||n.documentElement.scrollTop),left:t.left+(i.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),r()&&(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=N(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,i=t.ResizeObserver||P;this.resizeObserver=new i((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=N(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,i=this.contentEl.offsetWidth,r=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,s=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 o=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=n?i+"px":"auto",this.placeholderEl.style.height=o+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=u>i,this.axis.y.isOverflowing=o>l,this.axis.x.isOverflowing="hidden"!==a&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==s&&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 c=this.axis.x.isOverflowing?this.scrollbarWidth:0,h=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>r-h,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&o>l-c,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],i=this.axis[e].track.el[this.axis[e].offsetSizeAttr],r=i/n;return t=Math.max(~~(r*i),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],i=this.axis[t].track.el[this.axis[t].offsetSizeAttr],r=parseInt(this.elStyles[this.axis[t].sizeAttr],10),a=this.axis[t].scrollbar,s=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],o=(s="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-s:s)/(n-r),u=~~((i-a.size)*o);u="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u+(i-a.size):u,a.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=U(this.el),i=N(this.el),r=this.axis[t].scrollbar,a="y"===t?e.pageY:e.pageX;this.axis[t].dragOffset=a-r.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)):(i.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var i=N(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var r=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],a=parseInt(this.elStyles[this.axis[t].sizeAttr],10),s=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],o=("y"===t?this.mouseY-r:this.mouseX-r)<0?-1:1,u=-1===o?s-a:s+a;!function e(){var r,a;-1===o?s>u&&(s-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((r={})[n.axis[t].offsetAttr]=s,r)),i.requestAnimationFrame(e)):s<u&&(s+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((a={})[n.axis[t].offsetAttr]=s,a)),i.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:R()}catch(e){return R()}},t.removeListeners=function(){var e=this,t=N(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}();j.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},j.instances=new WeakMap,j.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")||j.instances.has(e)||new j(e,M(e.attributes))}))},j.removeObserver=function(){this.globalObserver.disconnect()},j.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(j.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))},j.handleMutations=function(e){e.forEach((function(e){Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?!j.instances.has(e)&&new j(e,M(e.attributes)):Array.prototype.forEach.call(e.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||j.instances.has(e)||new j(e,M(e.attributes))})))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&(e.hasAttribute('[data-simplebar="init"]')?j.instances.has(e)&&j.instances.get(e).unMount():Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar="init"]'),(function(e){j.instances.has(e)&&j.instances.get(e).unMount()})))}))}))},j.getOptions=M,r()&&j.initHtmlApi();var B=j},31336:function(e){var t,n,i,r,a;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,r=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var r=a.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=a.normalizePath(r.path),a.buildURLFromParts(r)}var s=a.parseURL(t);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return i.alwaysNormalize?(s.path=a.normalizePath(s.path),a.buildURLFromParts(s)):t;var o=a.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var u=n.exec(o.path);o.netLoc=u[1],o.path=u[2]}o.netLoc&&!o.path&&(o.path="/");var l={scheme:o.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(l.netLoc=o.netLoc,"/"!==s.path[0]))if(s.path){var c=o.path,h=c.substring(0,c.lastIndexOf("/")+1)+s.path;l.path=a.normalizePath(h)}else l.path=o.path,s.params||(l.params=o.params,s.query||(l.query=o.query));return null===l.path&&(l.path=i.alwaysNormalize?a.normalizePath(s.path):s.path),a.buildURLFromParts(l)},parseURL:function(e){var n=t.exec(e);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(i,"");e.length!==(e=e.replace(r,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=a},77733:function(e,t,n){"use strict";n.d(t,{Z:function(){return Tu}});var i=n(61355),r=n.n(i),a=n(76262),s=n.n(a);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},o.apply(this,arguments)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,l(e,t)}var h=n(8004),d=n.n(h),f=n(19389),p=n.n(f),m=n(68942),g=n.n(m),v=n(83983),y=n.n(v);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}}function b(e,t,n){return b=_()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&l(r,n.prototype),r},b.apply(null,arguments)}var T=n(31097),S=n.n(T),w=n(71890),E=n.n(w),k=n(5078),C=n.n(k),x=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return c(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}(E()),A=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),i={},r=n.length;r--;)""!==n[r]&&((t=/([^=]*)=(.*)/.exec(n[r]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),i[t[0]]=t[1]);return i},I=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}c(t,e);var n=t.prototype;return n.push=function(e){var t,n,i=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce((function(t,n){var i=n(e);return i===e?t:t.concat([i])}),[e]).forEach((function(e){for(var r=0;r<i.customParsers.length;r++)if(i.customParsers[r].call(i,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))i.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 i.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 i.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 i.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 i.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 i.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 i.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 i.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 i.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 i.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var a=A(t[1]);if(a.URI&&(n.uri=a.URI),a.BYTERANGE){var s=a.BYTERANGE.split("@"),o=s[0],u=s[1];n.byterange={},o&&(n.byterange.length=parseInt(o,10)),u&&(n.byterange.offset=parseInt(u,10))}}i.trigger("data",n)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=A(t[1]),n.attributes.RESOLUTION){var l=n.attributes.RESOLUTION.split("x"),c={};l[0]&&(c.width=parseInt(l[0],10)),l[1]&&(c.height=parseInt(l[1],10)),n.attributes.RESOLUTION=c}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))}i.trigger("data",n)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=A(t[1])),void i.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e))i.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))i.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 i.trigger("data",n);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=A(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 i.trigger("data",n);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return n={type:"tag",tagType:"start"},t[1]&&(n.attributes=A(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void i.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 i.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 i.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 i.trigger("data",n);i.trigger("data",{type:"tag",data:e.slice(4)})}}}else i.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,i=e.customType,r=e.dataParser,a=e.segment;"function"!=typeof r&&(r=function(e){return e}),this.customParsers.push((function(e){if(n.exec(e))return t.trigger("data",{type:"custom",data:r(e),customType:i,segment:a}),!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}(E()),O=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new x,t.parseStream=new I,t.lineStream.pipe(t.parseStream);var n,i,r=u(t),a=[],s={},l=function(){},c={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},h=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var d=0;return t.parseStream.on("data",(function(e){var t,u;({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&&(s.byterange=t,t.length=e.length,"offset"in e||(e.offset=d)),"offset"in e&&(s.byterange=t,t.offset=e.offset),d=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&&(s.duration=e.duration),0===e.duration&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=a},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:C()(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"}),i={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(i.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else i=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,h=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=a,this.manifest.mediaGroups=this.manifest.mediaGroups||c,e.attributes?(s.attributes||(s.attributes={}),o(s.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||c,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"]],(u={default:/yes/i.test(e.attributes.DEFAULT)}).default?u.autoselect=!0:u.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(u.language=e.attributes.LANGUAGE),e.attributes.URI&&(u.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(u.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(u.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(u.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=u}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){h+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),s.dateTimeString=e.dateTimeString,s.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(){s.cueOut=e.data},"cue-out-cont":function(){s.cueOutCont=e.data},"cue-in":function(){s.cueIn=e.data}}[e.tagType]||l).call(r)},uri:function(){s.uri=e.uri,a.push(s),this.manifest.targetDuration&&!("duration"in s)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),i&&(s.key=i),s.timeline=h,n&&(s.map=n),s={}},comment:function(){},custom:function(){e.segment?(s.custom=s.custom||{},s.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(r)})),t}c(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}(E()),P=n(17990),L=n(51562),D=n.n(L),R=n(27414),M=function(e){return!!e&&"object"==typeof e},N=function e(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.reduce((function(t,n){return"object"!=typeof n||Object.keys(n).forEach((function(i){Array.isArray(t[i])&&Array.isArray(n[i])?t[i]=t[i].concat(n[i]):M(t[i])&&M(n[i])?t[i]=e(t[i],n[i]):t[i]=n[i]})),t}),{})},U=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},j=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},B=function(e){var t=e.baseUrl,n=void 0===t?"":t,i=e.source,r=void 0===i?"":i,a=e.range,s=void 0===a?"":a,o=e.indexRange,u=void 0===o?"":o,l={uri:r,resolvedUri:S()(n||"",r)};if(s||u){var c=(s||u).split("-"),h=parseInt(c[0],10),d=parseInt(c[1],10);l.byterange={length:d-h+1,offset:h}}return l},F={static:function(e){var t=e.duration,n=e.timescale,i=void 0===n?1:n,r=e.sourceDuration;return{start:0,end:Math.ceil(r/(t/i))}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,i=e.availabilityStartTime,r=e.timescale,a=void 0===r?1:r,s=e.duration,o=e.start,u=void 0===o?0:o,l=e.minimumUpdatePeriod,c=void 0===l?0:l,h=e.timeShiftBufferDepth,d=void 0===h?1/0:h,f=(t+n)/1e3,p=i+u,m=f+c-p,g=Math.ceil(m*a/s),v=Math.floor((f-p-d)*a/s),y=Math.floor((f-p)*a/s);return{start:Math.max(0,v),end:Math.min(g,y)}}},V=function(e){var t=e.type,n=void 0===t?"static":t,i=e.duration,r=e.timescale,a=void 0===r?1:r,s=e.sourceDuration,o=F[n](e),u=function(e,t){for(var n=[],i=e;i<t;i++)n.push(i);return n}(o.start,o.end).map(function(e){return function(t,n){var i=e.duration,r=e.timescale,a=void 0===r?1:r,s=e.periodIndex,o=e.startNumber;return{number:(void 0===o?1:o)+t,duration:i/a,timeline:s,time:n*i}}}(e));if("static"===n){var l=u.length-1;u[l].duration=s-i/a*l}return u},H=function(e){var t=e.baseUrl,n=e.initialization,i=void 0===n?{}:n,r=e.sourceDuration,a=e.indexRange,s=void 0===a?"":a,o=e.duration;if(!t)throw new Error("NO_BASE_URL");var u=B({baseUrl:t,source:i.sourceURL,range:i.range}),l=B({baseUrl:t,source:t,indexRange:s});if(l.map=u,o){var c=V(e);c.length&&(l.duration=c[0].duration,l.timeline=c[0].timeline)}else r&&(l.duration=r,l.timeline=0);return l.number=0,[l]},W=function(e,t,n){for(var i=e.sidx.map?e.sidx.map:null,r=e.sidx.duration,a=e.timeline||0,s=e.sidx.byterange,o=s.offset+s.length,u=t.timescale,l=t.references.filter((function(e){return 1!==e.referenceType})),c=[],h=o+t.firstOffset,d=0;d<l.length;d++){var f=t.references[d],p=f.referencedSize,m=f.subsegmentDuration,g=H({baseUrl:n,timescale:u,timeline:a,periodIndex:a,duration:m,sourceDuration:r,indexRange:h+"-"+(h+p-1)})[0];i&&(g.map=i),c.push(g),h+=p}return e.segments=c,e},q=function(e){var t;return(t=e.reduce((function(e,t){var n,i=t.attributes.id+(t.attributes.lang||"");return e[i]?(t.segments[0]&&(t.segments[0].discontinuity=!0),(n=e[i].segments).push.apply(n,t.segments),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):e[i]=t,e}),{}),Object.keys(t).map((function(e){return t[e]}))).map((function(e){var t;return e.discontinuityStarts=(t=e.segments,"discontinuity",t.reduce((function(e,t,n){return t.discontinuity&&e.push(n),e}),[])),e}))},z=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e){var i=e[n];if(i.sidx){var r=i.sidx.uri+"-"+(void 0,o=(s=i.sidx.byterange).offset+s.length-1,s.offset+"-"+o),a=t[r]&&t[r].sidx;i.sidx&&a&&W(i,a,i.sidx.resolvedUri)}}var s,o;return e},G=function(e){var t,n=e.attributes,i=e.segments,r=e.sidx,a={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:i,mediaSequence:i.length?i[0].number:1};return n.contentProtection&&(a.contentProtection=n.contentProtection),r&&(a.sidx=r),a},X=function(e){var t,n=e.attributes,i=e.segments;void 0===i&&(i=[{uri:n.baseUrl,timeline:n.periodIndex,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var r=((t={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,t);return n.codecs&&(r.CODECS=n.codecs),{attributes:r,uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:n.baseUrl||"",targetDuration:n.duration,segments:i,mediaSequence:i.length?i[0].number:1}},K=function(e){var t,n=e.attributes,i=e.segments,r=e.sidx,a={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:i,mediaSequence:i.length?i[0].number:1};return n.contentProtection&&(a.contentProtection=n.contentProtection),r&&(a.sidx=r),a},Y=function(e,t,n){var i=e.NOW,r=e.clientOffset,a=e.availabilityStartTime,s=e.timescale,o=void 0===s?1:s,u=e.start,l=void 0===u?0:u,c=e.minimumUpdatePeriod,h=(i+r)/1e3+(void 0===c?0:c)-(a+l);return Math.ceil((h*o-t)/n)},$=function(e,t){for(var n=e.type,i=void 0===n?"static":n,r=e.minimumUpdatePeriod,a=void 0===r?0:r,s=e.media,o=void 0===s?"":s,u=e.sourceDuration,l=e.timescale,c=void 0===l?1:l,h=e.startNumber,d=void 0===h?1:h,f=e.periodIndex,p=[],m=-1,g=0;g<t.length;g++){var v=t[g],y=v.d,_=v.r||0,b=v.t||0;m<0&&(m=b),b&&b>m&&(m=b);var T=void 0;if(_<0){var S=g+1;T=S===t.length?"dynamic"===i&&a>0&&o.indexOf("$Number$")>0?Y(e,m,y):(u*c-m)/y:(t[S].t-m)/y}else T=_+1;for(var w=d+p.length+T,E=d+p.length;E<w;)p.push({number:E,duration:y/c,time:m,timeline:f}),m+=y,E++}return p},Q=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,J=function(e,t){return e.replace(Q,function(e){return function(t,n,i,r){if("$$"===t)return"$";if(void 0===e[n])return t;var a=""+e[n];return"RepresentationID"===n?a:(r=i?parseInt(r,10):1,a.length>=r?a:""+new Array(r-a.length+1).join("0")+a)}}(t))},Z=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},i=e.initialization,r=void 0===i?{sourceURL:"",range:""}:i,a=B({baseUrl:e.baseUrl,source:J(r.sourceURL,n),range:r.range}),s=function(e,t){return e.duration||t?e.duration?V(e):$(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]}(e,t);return s.map((function(t){n.Number=t.number,n.Time=t.time;var i=J(e.media||"",n);return{uri:i,timeline:t.timeline,duration:t.duration,resolvedUri:S()(e.baseUrl||"",i),map:a,number:t.number}}))},ee=function(e,t){var n=e.duration,i=e.segmentUrls,r=void 0===i?[]:i;if(!n&&!t||n&&t)throw new Error("SEGMENT_TIME_UNSPECIFIED");var a,s=r.map((function(t){return function(e,t){var n=e.baseUrl,i=e.initialization,r=void 0===i?{}:i,a=B({baseUrl:n,source:r.sourceURL,range:r.range}),s=B({baseUrl:n,source:t.media,range:t.mediaRange});return s.map=a,s}(e,t)}));return n&&(a=V(e)),t&&(a=$(e,t)),a.map((function(e,t){if(s[t]){var n=s[t];return n.timeline=e.timeline,n.duration=e.duration,n.number=e.number,n}})).filter((function(e){return e}))},te=function(e){var t,n,i=e.attributes,r=e.segmentInfo;r.template?(n=Z,t=N(i,r.template)):r.base?(n=H,t=N(i,r.base)):r.list&&(n=ee,t=N(i,r.list));var a={attributes:i};if(!n)return a;var s=n(t,r.timeline);if(t.duration){var o=t,u=o.duration,l=o.timescale,c=void 0===l?1:l;t.duration=u/c}else s.length?t.duration=s.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return a.attributes=t,a.segments=s,r.base&&t.indexRange&&(a.sidx=s[0],a.segments=[]),a},ne=function(e,t){return j(e.childNodes).filter((function(e){return e.tagName===t}))},ie=function(e){return e.textContent.trim()},re=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),i=n[0],r=n[1],a=n[2],s=n[3],o=n[4],u=n[5];return 31536e3*parseFloat(i||0)+2592e3*parseFloat(r||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(o||0)+parseFloat(u||0)},ae={mediaPresentationDuration:function(e){return re(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 re(e)},suggestedPresentationDelay:function(e){return re(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return re(e)},start:function(e){return re(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)?re(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}},se=function(e){return e&&e.attributes?j(e.attributes).reduce((function(e,t){var n=ae[t.name]||ae.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},oe={"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"},ue=function(e,t){return t.length?U(e.map((function(e){return t.map((function(t){return S()(e,ie(t))}))}))):e},le=function(e){var t=ne(e,"SegmentTemplate")[0],n=ne(e,"SegmentList")[0],i=n&&ne(n,"SegmentURL").map((function(e){return N({tag:"SegmentURL"},se(e))})),r=ne(e,"SegmentBase")[0],a=n||t,s=a&&ne(a,"SegmentTimeline")[0],o=n||r||t,u=o&&ne(o,"Initialization")[0],l=t&&se(t);l&&u?l.initialization=u&&se(u):l&&l.initialization&&(l.initialization={sourceURL:l.initialization});var c={template:l,timeline:s&&ne(s,"S").map((function(e){return se(e)})),list:n&&N(se(n),{segmentUrls:i,initialization:se(u)}),base:r&&N(se(r),{initialization:se(u)})};return Object.keys(c).forEach((function(e){c[e]||delete c[e]})),c},ce=function(e,t){return function(n,i){var r=ue(t,ne(n,"BaseURL")),a=se(n),s=parseInt(a.id,10),o=D().isNaN(s)?i:s,u=N(e,{periodIndex:o}),l=ne(n,"AdaptationSet"),c=le(n);return U(l.map(function(e,t,n){return function(i){var r=se(i),a=ue(t,ne(i,"BaseURL")),s=ne(i,"Role")[0],o={role:se(s)},u=N(e,r,o),l=ne(i,"ContentProtection").reduce((function(e,t){var n=se(t),i=oe[n.schemeIdUri];if(i){e[i]={attributes:n};var r=ne(t,"cenc:pssh")[0];if(r){var a=ie(r),s=a&&C()(a);e[i].pssh=s}}return e}),{});Object.keys(l).length&&(u=N(u,{contentProtection:l}));var c=le(i),h=ne(i,"Representation"),d=N(n,c);return U(h.map(function(e,t,n){return function(i){var r=ne(i,"BaseURL"),a=ue(t,r),s=N(e,se(i)),o=le(i);return a.map((function(e){return{segmentInfo:N(n,o),attributes:N(s,{baseUrl:e})}}))}}(u,a,d)))}}(u,r,c)))}},he=function(e){if(""===e)throw new Error("DASH_EMPTY_MANIFEST");var t,n,i=new R.a;try{n=(t=i.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error("DASH_INVALID_XML");return n},de=function(e,t){void 0===t&&(t={});var n=function(e,t){void 0===t&&(t={});var n=t,i=n.manifestUri,r=void 0===i?"":i,a=n.NOW,s=void 0===a?Date.now():a,o=n.clientOffset,u=void 0===o?0:o,l=ne(e,"Period");if(!l.length)throw new Error("INVALID_NUMBER_OF_PERIOD");var c=ne(e,"Location"),h=se(e),d=ue([r],ne(e,"BaseURL"));return h.sourceDuration=h.mediaPresentationDuration||0,h.NOW=s,h.clientOffset=u,c.length&&(h.locations=c.map(ie)),{locations:h.locations,representationInfo:U(l.map(ce(h,d)))}}(he(e),t);return function(e,t,n){var i;if(void 0===n&&(n={}),!e.length)return{};var r=e[0].attributes,a=r.sourceDuration,s=r.type,o=void 0===s?"static":s,u=r.suggestedPresentationDelay,l=r.minimumUpdatePeriod,c=q(e.filter((function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType}))).map(K),h=q(e.filter((function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType}))),d=e.filter((function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType})),f={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(i={AUDIO:{},VIDEO:{}},i["CLOSED-CAPTIONS"]={},i.SUBTITLES={},i),uri:"",duration:a,playlists:z(c,n)};return l>=0&&(f.minimumUpdatePeriod=1e3*l),t&&(f.locations=t),"dynamic"===o&&(f.suggestedPresentationDelay=u),h.length&&(f.mediaGroups.AUDIO.audio=function(e,t){var n;void 0===t&&(t={});var i=e.reduce((function(e,i){var r=i.attributes.role&&i.attributes.role.value||"",a=i.attributes.lang||"",s="main";if(a){var o=r?" ("+r+")":"";s=""+i.attributes.lang+o}return e[s]&&e[s].playlists[0].attributes.BANDWIDTH>i.attributes.bandwidth||(e[s]={language:a,autoselect:!0,default:"main"===r,playlists:z([G(i)],t),uri:""},void 0===n&&"main"===r&&((n=i).default=!0)),e}),{});return n||(i[Object.keys(i)[0]].default=!0),i}(h,n)),d.length&&(f.mediaGroups.SUBTITLES.subs=function(e,t){return void 0===t&&(t={}),e.reduce((function(e,n){var i=n.attributes.lang||"text";return e[i]||(e[i]={language:i,default:!1,autoselect:!1,playlists:z([X(n)],t),uri:""}),e}),{})}(d,n)),f}(n.representationInfo.map(te),n.locations,t.sidxMapping)},fe=W,pe=n(57258),me=n.n(pe),ge=n(70124),ve=n(53238),ye=n(56198),_e=n.n(ye),be=n(28195),Te=n(17185),Se=n.n(Te),we=n(68655),Ee="7.11.2",ke=[],Ce=function e(t){var n,i="info",a=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n("log",i,t)};return n=function(e,t){return function(n,i,a){var s=t.levels[i],o=new RegExp("^("+s+")$");if("log"!==n&&a.unshift(n.toUpperCase()+":"),a.unshift(e+":"),ke){ke.push([].concat(a));var u=ke.length-1e3;ke.splice(0,u>0?u:0)}if(r().console){var l=r().console[n];l||"debug"!==n||(l=r().console.info||r().console.log),l&&s&&o.test(n)&&l[Array.isArray(a)?"apply":"call"](r().console,a)}}}(t,a),a.createLogger=function(n){return e(t+": "+n)},a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:i},a.level=function(e){if("string"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');i=e}return i},(a.history=function(){return ke?[].concat(ke):[]}).filter=function(e){return(ke||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},a.history.clear=function(){ke&&(ke.length=0)},a.history.disable=function(){null!==ke&&(ke.length=0,ke=null)},a.history.enable=function(){null===ke&&(ke=[])},a.error=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n("error",i,t)},a.warn=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n("warn",i,t)},a.debug=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n("debug",i,t)},a}("VIDEOJS"),xe=Ce.createLogger,Ae=Object.prototype.toString,Ie=function(e){return Le(e)?Object.keys(e):[]};function Oe(e,t){Ie(e).forEach((function(n){return t(e[n],n)}))}function Pe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Object.assign?o.apply(void 0,[e].concat(n)):(n.forEach((function(t){t&&Oe(t,(function(t,n){e[n]=t}))})),e)}function Le(e){return!!e&&"object"==typeof e}function De(e){return Le(e)&&"[object Object]"===Ae.call(e)&&e.constructor===Object}function Re(e,t){if(!e||!t)return"";if("function"==typeof r().getComputedStyle){var n=r().getComputedStyle(e);return n?n.getPropertyValue(t)||n[t]:""}return""}function Me(e){return"string"==typeof e&&Boolean(e.trim())}function Ne(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Ue(){return s()===r().document}function je(e){return Le(e)&&1===e.nodeType}function Be(){try{return r().parent!==r().self}catch(e){return!0}}function Fe(e){return function(t,n){if(!Me(t))return s()[e](null);Me(n)&&(n=s().querySelector(n));var i=je(n)?n:s();return i[e]&&i[e](t)}}function Ve(e,t,n,i){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var r=s().createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Ce.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+"."),r.setAttribute(e,n)):"textContent"===e?He(r,n):r[e]===n&&"tabIndex"!==e||(r[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){r.setAttribute(e,n[e])})),i&&ot(r,i),r}function He(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function We(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function qe(e,t){return Ne(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function ze(e,t){return e.classList?e.classList.add(t):qe(e,t)||(e.className=(e.className+" "+t).trim()),e}function Ge(e,t){return e.classList?e.classList.remove(t):(Ne(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function Xe(e,t,n){var i=qe(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!i),n!==i)return n?ze(e,t):Ge(e,t),e}function Ke(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var i=t[n];null==i||!1===i?e.removeAttribute(n):e.setAttribute(n,!0===i?"":i)}))}function Ye(e){var t={};if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,i=n.length-1;i>=0;i--){var r=n[i].name,a=n[i].value;"boolean"!=typeof e[r]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+r+",")||(a=null!==a),t[r]=a}return t}function $e(e,t){return e.getAttribute(t)}function Qe(e,t,n){e.setAttribute(t,n)}function Je(e,t){e.removeAttribute(t)}function Ze(){s().body.focus(),s().onselectstart=function(){return!1}}function et(){s().onselectstart=function(){return!0}}function tt(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(Re(e,"height"))),n.width||(n.width=parseFloat(Re(e,"width"))),n}}function nt(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};var t=e.offsetWidth,n=e.offsetHeight,i=0,r=0;do{i+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent}while(e);return{left:i,top:r,width:t,height:n}}function it(e,t){var n={},i=nt(t.target),r=nt(e),a=r.width,s=r.height,o=t.offsetY-(r.top-i.top),u=t.offsetX-(r.left-i.left);return t.changedTouches&&(u=t.changedTouches[0].pageX-r.left,o=t.changedTouches[0].pageY+r.top),n.y=1-Math.max(0,Math.min(1,o/s)),n.x=Math.max(0,Math.min(1,u/a)),n}function rt(e){return Le(e)&&3===e.nodeType}function at(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function st(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),je(e)||rt(e)?e:"string"==typeof e&&/\S/.test(e)?s().createTextNode(e):void 0})).filter((function(e){return e}))}function ot(e,t){return st(t).forEach((function(t){return e.appendChild(t)})),e}function ut(e,t){return ot(at(e),t)}function lt(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 ct,ht=Fe("querySelector"),dt=Fe("querySelectorAll"),ft=Object.freeze({__proto__:null,isReal:Ue,isEl:je,isInFrame:Be,createEl:Ve,textContent:He,prependTo:We,hasClass:qe,addClass:ze,removeClass:Ge,toggleClass:Xe,setAttributes:Ke,getAttributes:Ye,getAttribute:$e,setAttribute:Qe,removeAttribute:Je,blockTextSelection:Ze,unblockTextSelection:et,getBoundingClientRect:tt,findPosition:nt,getPointerPosition:it,isTextNode:rt,emptyEl:at,normalizeContent:st,appendContent:ot,insertContent:ut,isSingleLeftClick:lt,$:ht,$$:dt}),pt=!1,mt=function(){if(Ue()&&!1!==ct.options.autoSetup){var e=Array.prototype.slice.call(s().getElementsByTagName("video")),t=Array.prototype.slice.call(s().getElementsByTagName("audio")),n=Array.prototype.slice.call(s().getElementsByTagName("video-js")),i=e.concat(t,n);if(i&&i.length>0)for(var r=0,a=i.length;r<a;r++){var o=i[r];if(!o||!o.getAttribute){gt(1);break}void 0===o.player&&null!==o.getAttribute("data-setup")&&ct(o)}else pt||gt(1)}};function gt(e,t){t&&(ct=t),r().setTimeout(mt,e)}function vt(){pt=!0,r().removeEventListener("load",vt)}Ue()&&("complete"===s().readyState?vt():r().addEventListener("load",vt));var yt,_t=function(e){var t=s().createElement("style");return t.className=e,t},bt=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},Tt=3;function St(){return Tt++}r().WeakMap||(yt=function(){function e(){this.vdata="vdata"+Math.floor(r().performance&&r().performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var n=e[this.vdata]||St();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];Ce("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 wt,Et=r().WeakMap?new WeakMap:new yt;function kt(e,t){if(Et.has(e)){var n=Et.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&&Et.delete(e)}}function Ct(e,t,n,i){n.forEach((function(n){e(t,n,i)}))}function xt(e){if(e.fixed_)return e;function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped){var i=e||r().event;for(var a in e={},i)"layerX"!==a&&"layerY"!==a&&"keyLocation"!==a&&"webkitMovementX"!==a&&"webkitMovementY"!==a&&("returnValue"===a&&i.preventDefault||(e[a]=i[a]));if(e.target||(e.target=e.srcElement||s()),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){i.preventDefault&&i.preventDefault(),e.returnValue=!1,i.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){i.stopPropagation&&i.stopPropagation(),e.cancelBubble=!0,i.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){i.stopImmediatePropagation&&i.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var o=s().documentElement,u=s().body;e.pageX=e.clientX+(o&&o.scrollLeft||u&&u.scrollLeft||0)-(o&&o.clientLeft||u&&u.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||u&&u.scrollTop||0)-(o&&o.clientTop||u&&u.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 At=["touchstart","touchmove"];function It(e,t,n){if(Array.isArray(t))return Ct(It,e,t,n);Et.has(e)||Et.set(e,{});var i=Et.get(e);if(i.handlers||(i.handlers={}),i.handlers[t]||(i.handlers[t]=[]),n.guid||(n.guid=St()),i.handlers[t].push(n),i.dispatcher||(i.disabled=!1,i.dispatcher=function(t,n){if(!i.disabled){t=xt(t);var r=i.handlers[t.type];if(r)for(var a=r.slice(0),s=0,o=a.length;s<o&&!t.isImmediatePropagationStopped();s++)try{a[s].call(e,t,n)}catch(e){Ce.error(e)}}}),1===i.handlers[t].length)if(e.addEventListener){var a=!1;(function(){if("boolean"!=typeof wt){wt=!1;try{var e=Object.defineProperty({},"passive",{get:function(){wt=!0}});r().addEventListener("test",null,e),r().removeEventListener("test",null,e)}catch(e){}}return wt})()&&At.indexOf(t)>-1&&(a={passive:!0}),e.addEventListener(t,i.dispatcher,a)}else e.attachEvent&&e.attachEvent("on"+t,i.dispatcher)}function Ot(e,t,n){if(Et.has(e)){var i=Et.get(e);if(i.handlers){if(Array.isArray(t))return Ct(Ot,e,t,n);var r=function(e,t){i.handlers[t]=[],kt(e,t)};if(void 0!==t){var a=i.handlers[t];if(a)if(n){if(n.guid)for(var s=0;s<a.length;s++)a[s].guid===n.guid&&a.splice(s--,1);kt(e,t)}else r(e,t)}else for(var o in i.handlers)Object.prototype.hasOwnProperty.call(i.handlers||{},o)&&r(e,o)}}}function Pt(e,t,n){var i=Et.has(e)?Et.get(e):{},r=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=xt(t),i.dispatcher&&i.dispatcher.call(e,t,n),r&&!t.isPropagationStopped()&&!0===t.bubbles)Pt.call(null,r,t,n);else if(!r&&!t.defaultPrevented&&t.target&&t.target[t.type]){Et.has(t.target)||Et.set(t.target,{});var a=Et.get(t.target);t.target[t.type]&&(a.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function Lt(e,t,n){if(Array.isArray(t))return Ct(Lt,e,t,n);var i=function i(){Ot(e,t,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||St(),It(e,t,i)}function Dt(e,t,n){var i=function i(){Ot(e,t,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||St(),It(e,t,i)}var Rt,Mt=Object.freeze({__proto__:null,fixEvent:xt,on:It,off:Ot,trigger:Pt,one:Lt,any:Dt}),Nt=30,Ut=function(e,t,n){t.guid||(t.guid=St());var i=t.bind(e);return i.guid=n?n+"_"+t.guid:t.guid,i},jt=function(e,t){var n=r().performance.now();return function(){var i=r().performance.now();i-n>=t&&(e.apply(void 0,arguments),n=i)}},Bt=function(){};Bt.prototype.allowedEvents_={},Bt.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},It(this,e,t),this.addEventListener=n},Bt.prototype.addEventListener=Bt.prototype.on,Bt.prototype.off=function(e,t){Ot(this,e,t)},Bt.prototype.removeEventListener=Bt.prototype.off,Bt.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Lt(this,e,t),this.addEventListener=n},Bt.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Dt(this,e,t),this.addEventListener=n},Bt.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=xt(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Pt(this,e)},Bt.prototype.dispatchEvent=Bt.prototype.trigger,Bt.prototype.queueTrigger=function(e){var t=this;Rt||(Rt=new Map);var n=e.type||e,i=Rt.get(this);i||(i=new Map,Rt.set(this,i));var a=i.get(n);i.delete(n),r().clearTimeout(a);var s=r().setTimeout((function(){0===i.size&&(i=null,Rt.delete(t)),t.trigger(e)}),0);i.set(n,s)};var Ft=function(e){return e instanceof Bt||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},Vt=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},Ht=function(e){if(!e.nodeName&&!Ft(e))throw new Error("Invalid target; must be a DOM node or evented object.")},Wt=function(e){if(!Vt(e))throw new Error("Invalid event type; must be a non-empty string or array.")},qt=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},zt=function(e,t){var n,i,r,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return a?(n=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],r=t[1]):(n=t[0],i=t[1],r=t[2]),Ht(n),Wt(i),qt(r),{isTargetingSelf:a,target:n,type:i,listener:r=Ut(e,r)}},Gt=function(e,t,n,i){Ht(e),e.nodeName?Mt[t](e,n,i):e[t](n,i)},Xt={on:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=zt(this,n),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(Gt(s,"on",o,u),!a){var l=function(){return e.off(s,o,u)};l.guid=u.guid;var c=function(){return e.off("dispose",l)};c.guid=u.guid,Gt(this,"on","dispose",l),Gt(s,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=zt(this,n),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(a)Gt(s,"one",o,u);else{var l=function t(){e.off(s,o,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];u.apply(null,i)};l.guid=u.guid,Gt(s,"one",o,l)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=zt(this,n),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(a)Gt(s,"any",o,u);else{var l=function t(){e.off(s,o,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];u.apply(null,i)};l.guid=u.guid,Gt(s,"any",o,l)}},off:function(e,t,n){if(!e||Vt(e))Ot(this.eventBusEl_,e,t);else{var i=e,r=t;Ht(i),Wt(r),qt(n),n=Ut(this,n),this.off("dispose",n),i.nodeName?(Ot(i,r,n),Ot(i,"dispose",n)):Ft(i)&&(i.off(r,n),i.off("dispose",n))}},trigger:function(e,t){return Pt(this.eventBusEl_,e,t)}};function Kt(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_=Ve("span",{className:"vjs-event-bus"});return Pe(e,Xt),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()})),e.on("dispose",(function(){e.off(),r().setTimeout((function(){e.eventBusEl_=null}),0)})),e}var Yt={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),Oe(e,(function(e,i){n.state[i]!==e&&((t=t||{})[i]={from:n.state[i],to:e}),n.state[i]=e})),t&&Ft(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function $t(e,t){return Pe(e,Yt),e.state=Pe({},e.state,t),"function"==typeof e.handleStateChanged&&Ft(e)&&e.on("statechanged",e.handleStateChanged),e}var Qt=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},Jt=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function Zt(){for(var e={},t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach((function(t){t&&Oe(t,(function(t,n){De(t)?(De(e[n])||(e[n]={}),e[n]=Zt(e[n],t)):e[n]=t}))})),e}var en=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}(),tn=r().Map?r().Map:en,nn=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}(),rn=r().Set?r().Set:nn,an=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_=Zt({},this.options_),t=this.options_=Zt(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var i=e&&e.id&&e.id()||"no_player";this.id_=i+"_component_"+St()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&(Kt(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),$t(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new rn,this.setIntervalIds_=new rn,this.rafIds_=new rn,this.namedRafs_=new tn,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_),Et.has(this.el_)&&Et.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_=Zt(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return Ve(e,t,n)},t.localize=function(e,t,n){void 0===n&&(n=e);var i=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),a=r&&r[i],s=i&&i.split("-")[0],o=r&&r[s],u=n;return a&&a[e]?u=a[e]:o&&o[e]&&(u=o[e]),t&&(u=u.replace(/\{(\d+)\}/g,(function(e,n){var i=t[n-1],r=i;return void 0===i&&(r=e),r}))),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 i=this,r=0;r<t.length;r++)if(!(i=i.getChild(t[r]))||!i.getChild)return;return i},t.addChild=function(t,n,i){var r,a;if(void 0===n&&(n={}),void 0===i&&(i=this.children_.length),"string"==typeof t){a=Jt(t);var s=n.componentClass||a;n.name=a;var o=e.getComponent(s);if(!o)throw new Error("Component "+s+" does not exist");if("function"!=typeof o)return null;r=new o(this.player_||this,n)}else r=t;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(i,0,r),r.parentComponent_=this,"function"==typeof r.id&&(this.childIndex_[r.id()]=r),(a=a||r.name&&Jt(r.name()))&&(this.childNameIndex_[a]=r,this.childNameIndex_[Qt(a)]=r),"function"==typeof r.el&&r.el()){var u=null;this.children_[i+1]&&(this.children_[i+1].el_?u=this.children_[i+1].el_:je(this.children_[i+1])&&(u=this.children_[i+1])),this.contentEl().insertBefore(r.el(),u)}return r},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_[Jt(e.name())]=null,this.childNameIndex_[Qt(e.name())]=null;var i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var i,r=this.options_,a=e.getComponent("Tech");(i=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!i.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var i,r;return"string"==typeof e?r=n[i=e]||t.options_[i]||{}:(i=e.name,r=e),{name:i,opts:r}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||Jt(t.name));return n&&!a.isTech(n)})).forEach((function(e){var n=e.name,i=e.opts;if(void 0!==r[n]&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=t.options_.playerOptions;var a=t.addChild(n,i);a&&(t[n]=a)}}))}},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 ht(e,t||this.contentEl())},t.$$=function(e,t){return dt(e,t||this.contentEl())},t.hasClass=function(e){return qe(this.el_,e)},t.addClass=function(e){ze(this.el_,e)},t.removeClass=function(e){Ge(this.el_,e)},t.toggleClass=function(e,t){Xe(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 $e(this.el_,e)},t.setAttribute=function(e,t){Qe(this.el_,e,t)},t.removeAttribute=function(e){Je(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 i=this.el_.style[e],r=i.indexOf("px");return-1!==r?parseInt(i.slice(0,r),10):parseInt(this.el_["offset"+Jt(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=Re(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+Jt(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(i){1===i.touches.length&&(n={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},t=r().performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(n){var i=t.touches[0].pageX-n.pageX,r=t.touches[0].pageY-n.pageY;Math.sqrt(i*i+r*r)>10&&(e=!1)}}));var i=function(){e=!1};this.on("touchleave",i),this.on("touchcancel",i),this.on("touchend",(function(i){n=null,!0===e&&r().performance.now()-t<200&&(i.preventDefault(),this.trigger("tap"))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=Ut(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,i=this;return e=Ut(this,e),this.clearTimersOnDispose_(),n=r().setTimeout((function(){i.setTimeoutIds_.has(n)&&i.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),r().clearTimeout(e)),e},t.setInterval=function(e,t){e=Ut(this,e),this.clearTimersOnDispose_();var n=r().setInterval(e,t);return this.setIntervalIds_.add(n),n},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),r().clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=Ut(this,e),t=r().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=Ut(this,t);var i=this.requestAnimationFrame((function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),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),r().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],i=t[1];e[n].forEach((function(t,n){return e[i](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 i=e.getComponent("Tech"),r=i&&i.isTech(n),a=e===n||e.prototype.isPrototypeOf(n.prototype);if(r||!a)throw new Error('Illegal component, "'+t+'"; '+(r?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");t=Jt(t),e.components_||(e.components_={});var s=e.getComponent("Player");if("Player"===t&&s&&s.players){var o=s.players,u=Object.keys(o);if(o&&u.length>0&&u.map((function(e){return o[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[Qt(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();an.prototype.supportsRaf_="function"==typeof r().requestAnimationFrame&&"function"==typeof r().cancelAnimationFrame,an.registerComponent("Component",an);var sn,on,un,ln=r().navigator&&r().navigator.userAgent||"",cn=/AppleWebKit\/([\d.]+)/i.exec(ln),hn=cn?parseFloat(cn.pop()):null,dn=/iPod/i.test(ln),fn=(sn=ln.match(/OS (\d+)_/i))&&sn[1]?sn[1]:null,pn=/Android/i.test(ln),mn=function(){var e=ln.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}(),gn=pn&&mn<5&&hn<537,vn=/Firefox/i.test(ln),yn=/Edg/i.test(ln),_n=!yn&&(/Chrome/i.test(ln)||/CriOS/i.test(ln)),bn=function(){var e=ln.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),Tn=(on=/MSIE\s(\d+)\.\d/.exec(ln),!(un=on&&parseFloat(on[1]))&&/Trident\/7.0/i.test(ln)&&/rv:11.0/.test(ln)&&(un=11),un),Sn=/Safari/i.test(ln)&&!_n&&!pn&&!yn,wn=/Windows/i.test(ln),En=Boolean(Ue()&&("ontouchstart"in r()||r().navigator.maxTouchPoints||r().DocumentTouch&&r().document instanceof r().DocumentTouch)),kn=/iPad/i.test(ln)||Sn&&En&&!/iPhone/i.test(ln),Cn=/iPhone/i.test(ln)&&!kn,xn=Cn||kn||dn,An=(Sn||xn)&&!_n,In=Object.freeze({__proto__:null,IS_IPOD:dn,IOS_VERSION:fn,IS_ANDROID:pn,ANDROID_VERSION:mn,IS_NATIVE_ANDROID:gn,IS_FIREFOX:vn,IS_EDGE:yn,IS_CHROME:_n,CHROME_VERSION:bn,IE_VERSION:Tn,IS_SAFARI:Sn,IS_WINDOWS:wn,TOUCH_ENABLED:En,IS_IPAD:kn,IS_IPHONE:Cn,IS_IOS:xn,IS_ANY_SAFARI:An});function On(e,t,n,i){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,i,n.length-1),n[i][t]}function Pn(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:On.bind(null,"start",0,e),end:On.bind(null,"end",1,e)}}function Ln(e,t){return Array.isArray(e)?Pn(e):void 0===e||void 0===t?Pn():Pn([[e,t]])}function Dn(e,t){var n,i,r=0;if(!t)return 0;e&&e.length||(e=Ln(0,0));for(var a=0;a<e.length;a++)n=e.start(a),(i=e.end(a))>t&&(i=t),r+=i-n;return r/t}for(var Rn,Mn={prefixed:!0},Nn=[["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"]],Un=Nn[0],jn=0;jn<Nn.length;jn++)if(Nn[jn][1]in s()){Rn=Nn[jn];break}if(Rn){for(var Bn=0;Bn<Rn.length;Bn++)Mn[Un[Bn]]=Rn[Bn];Mn.prefixed=Rn[0]!==Un[0]}function Fn(e){if(e instanceof Fn)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:Le(e)&&("number"==typeof e.code&&(this.code=e.code),Pe(this,e)),this.message||(this.message=Fn.defaultMessages[this.code]||"")}Fn.prototype.code=0,Fn.prototype.message="",Fn.prototype.status=null,Fn.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Fn.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 Vn=0;Vn<Fn.errorTypes.length;Vn++)Fn[Fn.errorTypes[Vn]]=Vn,Fn.prototype[Fn.errorTypes[Vn]]=Vn;function Hn(e){return null!=e&&"function"==typeof e.then}function Wn(e){Hn(e)&&e.then(null,(function(e){}))}var qn=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,i){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}}))})},zn=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=Ve("div",{className:"vjs-modal-dialog-content"},{role:"document"}),i.descEl_=Ve("p",{className:"vjs-modal-dialog-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),He(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}c(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 i=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=i,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,i=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),ut(t,e),this.trigger("modalfill"),i?n.insertBefore(t,i):n.appendChild(t);var r=this.getChild("closeButton");r&&n.appendChild(r.el_)},n.empty=function(){this.trigger("beforemodalempty"),at(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return void 0!==e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=s().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(),p().isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(p().isEventKey(e,"Tab")){for(var t,n=this.focusableEls_(),i=this.el_.querySelector(":focus"),r=0;r<n.length;r++)if(i===n[r]){t=r;break}s().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 r().HTMLAnchorElement||e instanceof r().HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof r().HTMLInputElement||e instanceof r().HTMLSelectElement||e instanceof r().HTMLTextAreaElement||e instanceof r().HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof r().HTMLIFrameElement||e instanceof r().HTMLObjectElement||e instanceof r().HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(an);zn.prototype.options_={pauseOnOpen:!0,temporary:!0},an.registerComponent("ModalDialog",zn);var Gn=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty(u(n),"length",{get:function(){return this.tracks_.length}});for(var i=0;i<t.length;i++)n.addTrack(t[i]);return n}c(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})},Ft(e)&&e.addEventListener("labelchange",e.labelchange_)},n.removeTrack=function(e){for(var t,n=0,i=this.length;n<i;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,i=this.length;n<i;n++){var r=this[n];if(r.id===e){t=r;break}}return t},t}(Bt);for(var Xn in Gn.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},Gn.prototype.allowedEvents_)Gn.prototype["on"+Xn]=null;var Kn=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)},Yn=function(e){function t(t){var n;void 0===t&&(t=[]);for(var i=t.length-1;i>=0;i--)if(t[i].enabled){Kn(t,t[i]);break}return(n=e.call(this,t)||this).changing_=!1,n}c(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&Kn(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,Kn(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}(Gn),$n=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)},Qn=function(e){function t(t){var n;void 0===t&&(t=[]);for(var i=t.length-1;i>=0;i--)if(t[i].selected){$n(t,t[i]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(u(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}c(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&$n(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,$n(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}(Gn),Jn=function(e){function t(){return e.apply(this,arguments)||this}c(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}(Gn),Zn=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,i=this.trackElements_.length;n<i;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}(),ei=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,i=e.length;this.cues_=e,this.length_=e.length;var r=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<i)for(n=t;n<i;n++)r.call(this,n)},t.getCueById=function(e){for(var t=null,n=0,i=this.length;n<i;n++){var r=this[n];if(r.id===e){t=r;break}}return t},e}(),ti={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},ni={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},ii={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},ri={disabled:"disabled",hidden:"hidden",showing:"showing"},ai=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var i={id:t.id||"vjs_track_"+St(),kind:t.kind||"",language:t.language||""},r=t.label||"",a=function(e){Object.defineProperty(u(n),e,{get:function(){return i[e]},set:function(){}})};for(var s in i)a(s);return Object.defineProperty(u(n),"label",{get:function(){return r},set:function(e){e!==r&&(r=e,this.trigger("labelchange"))}}),n}return c(t,e),t}(Bt),si=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=s().createElement("a");n.href=e;var i,a=""===n.host&&"file:"!==n.protocol;a&&((i=s().createElement("div")).innerHTML='<a href="'+e+'"></a>',n=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),s().body.appendChild(i));for(var o={},u=0;u<t.length;u++)o[t[u]]=n[t[u]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=r().location.protocol),a&&s().body.removeChild(i),o},oi=function(e){if(!e.match(/^https?:\/\//)){var t=s().createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},ui=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},li=function(e,t){void 0===t&&(t=r().location);var n=si(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},ci=Object.freeze({__proto__:null,parseUrl:si,getAbsoluteURL:oi,getFileExtension:ui,isCrossOrigin:li}),hi=function(e,t){var n=new(r().WebVTT.Parser)(r(),r().vttjs,r().WebVTT.StringDecoder()),i=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){i.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),i.length>0&&(r().console&&r().console.groupCollapsed&&r().console.groupCollapsed("Text Track parsing errors for "+t.src),i.forEach((function(e){return Ce.error(e)})),r().console&&r().console.groupEnd&&r().console.groupEnd()),n.flush()},di=function(e,t){var n={uri:e},i=li(e);i&&(n.cors=i);var a="use-credentials"===t.tech_.crossOrigin();a&&(n.withCredentials=a),g()(n,Ut(this,(function(e,n,i){if(e)return Ce.error(e,n);t.loaded_=!0,"function"!=typeof r().WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return hi(i,t);Ce.error("vttjs failed to load, stopping trying to process "+t.src)})):hi(i,t)})))},fi=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var i=Zt(t,{kind:ii[t.kind]||"subtitles",language:t.language||t.srclang||""}),r=ri[i.mode]||"disabled",a=i.default;"metadata"!==i.kind&&"chapters"!==i.kind||(r="hidden"),(n=e.call(this,i)||this).tech_=i.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var s=new ei(n.cues_),o=new ei(n.activeCues_),l=!1,c=Ut(u(n),(function(){this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1)}));return"disabled"!==r&&n.tech_.ready((function(){n.tech_.on("timeupdate",c)}),!0),Object.defineProperties(u(n),{default:{get:function(){return a},set:function(){}},mode:{get:function(){return r},set:function(e){var t=this;ri[e]&&(r=e,this.preload_||"disabled"===r||0!==this.cues.length||di(this.src,this),"disabled"!==r?this.tech_.ready((function(){t.tech_.on("timeupdate",c)}),!0):this.tech_.off("timeupdate",c),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?s:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var e=this.tech_.currentTime(),t=[],n=0,i=this.cues.length;n<i;n++){var r=this.cues[n];(r.startTime<=e&&r.endTime>=e||r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(l=!1,t.length!==this.activeCues_.length)l=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(l=!0);return this.activeCues_=t,o.setCues_(this.activeCues_),o},set:function(){}}}),i.src?(n.src=i.src,n.preload_||(n.loaded_=!0),(n.preload_||a||"subtitles"!==i.kind&&"captions"!==i.kind)&&di(n.src,u(n))):n.loaded_=!0,n}c(t,e);var n=t.prototype;return n.addCue=function(e){var t=e;if(r().vttjs&&!(e instanceof r().vttjs.VTTCue)){for(var n in t=new(r().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 i=this.tech_.textTracks(),a=0;a<i.length;a++)i[a]!==this&&i[a].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}(ai);fi.prototype.allowedEvents_={cuechange:"cuechange"};var pi=function(e){function t(t){var n;void 0===t&&(t={});var i=Zt(t,{kind:ni[t.kind]||""});n=e.call(this,i)||this;var r=!1;return Object.defineProperty(u(n),"enabled",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("enabledchange"))}}),i.enabled&&(n.enabled=i.enabled),n.loaded_=!0,n}return c(t,e),t}(ai),mi=function(e){function t(t){var n;void 0===t&&(t={});var i=Zt(t,{kind:ti[t.kind]||""});n=e.call(this,i)||this;var r=!1;return Object.defineProperty(u(n),"selected",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("selectedchange"))}}),i.selected&&(n.selected=i.selected),n}return c(t,e),t}(ai),gi=function(e){function t(t){var n,i;void 0===t&&(t={}),n=e.call(this)||this;var r=new fi(t);return n.kind=r.kind,n.src=r.src,n.srclang=r.language,n.label=r.label,n.default=r.default,Object.defineProperties(u(n),{readyState:{get:function(){return i}},track:{get:function(){return r}}}),i=0,r.addEventListener("loadeddata",(function(){i=2,n.trigger({type:"load",target:u(n)})})),n}return c(t,e),t}(Bt);gi.prototype.allowedEvents_={load:"load"},gi.NONE=0,gi.LOADING=1,gi.LOADED=2,gi.ERROR=3;var vi={audio:{ListClass:Yn,TrackClass:pi,capitalName:"Audio"},video:{ListClass:Qn,TrackClass:mi,capitalName:"Video"},text:{ListClass:Jn,TrackClass:fi,capitalName:"Text"}};Object.keys(vi).forEach((function(e){vi[e].getterName=e+"Tracks",vi[e].privateName=e+"Tracks_"}));var yi={remoteText:{ListClass:Jn,TrackClass:fi,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Zn,TrackClass:gi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},_i=o({},vi,yi);yi.names=Object.keys(yi),vi.names=Object.keys(vi),_i.names=[].concat(yi.names).concat(vi.names);var bi=function(e){function t(t,n){var i;return void 0===t&&(t={}),void 0===n&&(n=function(){}),t.reportTouchActivity=!1,(i=e.call(this,null,t,n)||this).hasStarted_=!1,i.on("playing",(function(){this.hasStarted_=!0})),i.on("loadstart",(function(){this.hasStarted_=!1})),_i.names.forEach((function(e){var n=_i[e];t&&t[n.getterName]&&(i[n.privateName]=t[n.getterName])})),i.featuresProgressEvents||i.manualProgressOn(),i.featuresTimeupdateEvents||i.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===t["native"+e+"Tracks"]&&(i["featuresNative"+e+"Tracks"]=!1)})),!1===t.nativeCaptions||!1===t.nativeTextTracks?i.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(i.featuresNativeTextTracks=!0),i.featuresNativeTextTracks||i.emulateTextTracks(),i.preloadTextTracks=!1!==t.preloadTextTracks,i.autoRemoteTextTracks_=new _i.text.ListClass,i.initTrackListeners(),t.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}c(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(Ut(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 Ln(0,0)},n.bufferedPercent=function(){return Dn(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(vi.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"]()||[],i=n.length;i--;){var r=n[i];"text"===e&&t.removeRemoteTextTrack(r),n.removeTrack(r)}}))},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 Fn(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?Ln(0,0):Ln()},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;vi.names.forEach((function(t){var n=vi[t],i=function(){e.trigger(t+"trackchange")},r=e[n.getterName]();r.addEventListener("removetrack",i),r.addEventListener("addtrack",i),e.on("dispose",(function(){r.removeEventListener("removetrack",i),r.removeEventListener("addtrack",i)}))}))},n.addWebVttScript_=function(){var e=this;if(!r().WebVTT)if(s().body.contains(this.el())){if(!this.options_["vtt.js"]&&De(y())&&Object.keys(y()).length>0)return void this.trigger("vttjsloaded");var t=s().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})),r().WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),i=function(e){return t.addTrack(e.track)},r=function(e){return t.removeTrack(e.track)};n.on("addtrack",i),n.on("removetrack",r),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},s=function(){a();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",a),"showing"===n.mode&&n.addEventListener("cuechange",a)}};s(),t.addEventListener("change",s),t.addEventListener("addtrack",s),t.addEventListener("removetrack",s),this.on("dispose",(function(){n.off("addtrack",i),n.off("removetrack",r),t.removeEventListener("change",s),t.removeEventListener("addtrack",s),t.removeEventListener("removetrack",s);for(var e=0;e<t.length;e++)t[e].removeEventListener("cuechange",a)}))},n.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,i,r){void 0===r&&(r={});var a=e.textTracks();r.kind=t,n&&(r.label=n),i&&(r.language=i),r.tech=e;var s=new _i.text.TrackClass(r);return a.addTrack(s),s}(this,e,t,n)},n.createRemoteTextTrack=function(e){var t=Zt(e,{tech:this});return new yi.remoteTextEl.TrackClass(t)},n.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var i=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(Ce.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_(i),this.remoteTextTracks().addTrack(i.track),!0!==t&&this.ready((function(){return n.autoRemoteTextTracks_.addTrack(i.track)})),i},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||r().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=Jt(e),t.techs_[e]=n,t.techs_[Qt(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=Jt(e),r()&&r().videojs&&r().videojs[e]?(Ce.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),r().videojs[e]):void 0)},t}(an);_i.names.forEach((function(e){var t=_i[e];bi.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),bi.prototype.featuresVolumeControl=!0,bi.prototype.featuresMuteControl=!0,bi.prototype.featuresFullscreenResize=!1,bi.prototype.featuresPlaybackRate=!1,bi.prototype.featuresProgressEvents=!1,bi.prototype.featuresSourceset=!1,bi.prototype.featuresTimeupdateEvents=!1,bi.prototype.featuresNativeTextTracks=!1,bi.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var i=e.sourceHandlers;i||(i=e.sourceHandlers=[]),void 0===n&&(n=i.length),i.splice(n,0,t)},e.canPlayType=function(t){for(var n,i=e.sourceHandlers||[],r=0;r<i.length;r++)if(n=i[r].canPlayType(t))return n;return""},e.selectSourceHandler=function(t,n){for(var i=e.sourceHandlers||[],r=0;r<i.length;r++)if(i[r].canHandleSource(t,n))return i[r];return null},e.canPlaySource=function(t,n){var i=e.selectSourceHandler(t,n);return i?i.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:Ce.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)}},an.registerComponent("Tech",bi),bi.registerTech("Tech",bi),bi.defaultTechOrder_=[];var Ti={},Si={},wi={};function Ei(e,t,n){e.setTimeout((function(){return Oi(t,Ti[t.type],n,e)}),1)}function ki(e,t,n,i){void 0===i&&(i=null);var r="call"+Jt(n),a=e.reduce(Ii(r),i),s=a===wi,o=s?null:t[n](a);return function(e,t,n,i){for(var r=e.length-1;r>=0;r--){var a=e[r];a[t]&&a[t](i,n)}}(e,n,o,s),o}var Ci={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},xi={setCurrentTime:1,setMuted:1,setVolume:1},Ai={play:1,pause:1};function Ii(e){return function(t,n){return t===wi?wi:n[e]?n[e](t):t}}function Oi(e,t,n,i,r,a){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===a&&(a=!1);var s=t,o=s[0],u=s.slice(1);if("string"==typeof o)Oi(e,Ti[o],n,i,r,a);else if(o){var l=function(e,t){var n=Si[e.id()],i=null;if(null==n)return i=t(e),Si[e.id()]=[[t,i]],i;for(var r=0;r<n.length;r++){var a=n[r],s=a[0],o=a[1];s===t&&(i=o)}return null===i&&(i=t(e),n.push([t,i])),i}(i,o);if(!l.setSource)return r.push(l),Oi(e,u,n,i,r,a);l.setSource(Pe({},e),(function(t,s){if(t)return Oi(e,u,n,i,r,a);r.push(l),Oi(s,e.type===s.type?u:Ti[s.type],n,i,r,a)}))}else u.length?Oi(e,u,n,i,r,a):a?n(e,r):Oi(e,Ti["*"],n,i,r,!0)}var Pi={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"},Li=function(e){void 0===e&&(e="");var t=ui(e);return Pi[t.toLowerCase()]||""},Di=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):Le(t)&&n.push(t)})),t=n}else t="string"==typeof t&&t.trim()?[Ri({src:t})]:Le(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[Ri(t)]:[];return t};function Ri(e){if(!e.type){var t=Li(e.src);t&&(e.type=t)}return e}var Mi=function(e){function t(t,n,i){var r,a=Zt({createEl:!1},n);if(r=e.call(this,t,a,i)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var s=0,o=n.playerOptions.techOrder;s<o.length;s++){var u=Jt(o[s]),l=bi.getTech(u);if(u||(l=an.getComponent(u)),l&&l.isSupported()){t.loadTech_(u);break}}return r}return c(t,e),t}(an);an.registerComponent("MediaLoader",Mi);var Ni=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).emitTapEvents(),i.enable(),i}c(t,e);var n=t.prototype;return n.createEl=function(t,n,i){void 0===t&&(t="div"),void 0===n&&(n={}),void 0===i&&(i={}),n=Pe({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&Ce.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),i=Pe({role:"button"},i),this.tabIndex_=n.tabIndex;var r=e.prototype.createEl.call(this,t,n,i);return this.createControlTextEl(r),r},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=Ve("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,He(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){p().isEventKey(t,"Space")||p().isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(an);an.registerComponent("ClickableComponent",Ni);var Ui=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update(),t.on("posterchange",Ut(u(i),i.update)),i}c(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 Ve("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)||(Tn||yn)&&t||this.player_.tech(!0).focus(),this.player_.paused()?Wn(this.player_.play()):this.player_.pause()}},t}(Ni);an.registerComponent("PosterImage",Ui);var ji={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 Bi(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 Fi(e,t,n){try{e.style[t]=n}catch(e){return}}var Vi=function(e){function t(t,n,i){var a;a=e.call(this,t,n,i)||this;var s=Ut(u(a),a.updateDisplay);return t.on("loadstart",Ut(u(a),a.toggleDisplay)),t.on("texttrackchange",s),t.on("loadedmetadata",Ut(u(a),a.preselectTrack)),t.ready(Ut(u(a),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",s),t.on("playerresize",s),r().addEventListener("orientationchange",s),t.on("dispose",(function(){return r().removeEventListener("orientationchange",s)}));for(var e=this.options_.playerOptions.tracks||[],n=0;n<e.length;n++)this.player_.addRemoteTextTrack(e[n],!0);this.preselectTrack()}}))),a}c(t,e);var n=t.prototype;return n.preselectTrack=function(){for(var e,t,n,i={captions:1,subtitles:1},r=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,s=0;s<r.length;s++){var o=r[s];a&&a.enabled&&a.language&&a.language===o.language&&o.kind in i?o.kind===a.kind?n=o:n||(n=o):a&&!a.enabled?(n=null,e=null,t=null):o.default&&("descriptions"!==o.kind||e?o.kind in i&&!t&&(t=o):e=o)}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 r().WebVTT&&r().WebVTT.processCues(r(),[],this.el_)},n.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var n=[],i=0;i<e.length;++i){var r=e[i];"showing"===r.mode&&n.push(r)}this.updateForTrack(n)}else{for(var a=null,s=null,o=e.length;o--;){var u=e[o];"showing"===u.mode&&("descriptions"===u.kind?a=u:s=u)}s?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):a&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(a))}},n.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,i=n.length;i--;){var a=n[i];if(a){var s=a.displayState;if(t.color&&(s.firstChild.style.color=t.color),t.textOpacity&&Fi(s.firstChild,"color",Bi(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(s.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Fi(s.firstChild,"backgroundColor",Bi(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Fi(s,"backgroundColor",Bi(t.windowColor,t.windowOpacity)):s.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===t.edgeStyle&&(s.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 o=r().parseFloat(s.style.fontSize);s.style.fontSize=o*t.fontPercent+"px",s.style.height="auto",s.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=ji[t.fontFamily])}}},n.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof r().WebVTT&&!e.every((function(e){return!e.activeCues}))){for(var t=[],n=0;n<e.length;++n)for(var i=e[n],a=0;a<i.activeCues.length;++a)t.push(i.activeCues[a]);r().WebVTT.processCues(r(),t,this.el_);for(var s=0;s<e.length;++s){for(var o=e[s],u=0;u<o.activeCues.length;++u){var l=o.activeCues[u].displayState;ze(l,"vjs-text-track-cue"),ze(l,"vjs-text-track-cue-"+(o.language?o.language:s))}this.player_.textTrackSettings&&this.updateDisplayState(o)}}},t}(an);an.registerComponent("TextTrackDisplay",Vi);var Hi=function(e){function t(){return e.apply(this,arguments)||this}return c(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),i=Ve("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[n])}),r=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(i),r},t}(an);an.registerComponent("LoadingSpinner",Hi);var Wi=function(e){function t(){return e.apply(this,arguments)||this}c(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={}),t=Pe({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=Pe({type:"button"},n);var i=an.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(i),i},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return Ce.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),an.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){p().isEventKey(t,"Space")||p().isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(Ni);an.registerComponent("Button",Wi);var qi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}c(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 Wn(t),void(!this.player_.tech(!0)||(Tn||yn)&&n||this.player_.tech(!0).focus())}var i=this.player_.getChild("controlBar"),r=i&&i.getChild("playToggle");if(r){var a=function(){return r.focus()};Hn(t)?t.then(a,(function(){})):this.setTimeout(a,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}(Wi);qi.prototype.controlText_="Play Video",an.registerComponent("BigPlayButton",qi);var zi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).controlText(n&&n.controlText||i.localize("Close")),i}c(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){p().isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Wi);an.registerComponent("CloseButton",zi);var Gi=function(e){function t(t,n){var i;return void 0===n&&(n={}),i=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,i.on(t,"play",i.handlePlay),i.on(t,"pause",i.handlePause),n.replay&&i.on(t,"ended",i.handleEnded),i}c(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}(Wi);Gi.prototype.controlText_="Play",an.registerComponent("PlayToggle",Gi);var Xi=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),i=Math.floor(e/60%60),r=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=i=n="-"),(r=r>0||s>0?r+":":"")+(i=((r||a>=10)&&i<10?"0"+i:i)+":")+(n<10?"0"+n:n)},Ki=Xi;function Yi(e,t){return void 0===t&&(t=e),Ki(e,t)}var $i=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,["timeupdate","ended"],i.updateContent),i.updateTextNode_(),i}c(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_=Ve("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=Yi(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,Ce.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_=s().createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},n.updateContent=function(e){},t}(an);$i.prototype.labelText_="Time",$i.prototype.controlText_="Time",an.registerComponent("TimeDisplay",$i);var Qi=function(e){function t(){return e.apply(this,arguments)||this}c(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}($i);Qi.prototype.labelText_="Current Time",Qi.prototype.controlText_="Current Time",an.registerComponent("CurrentTimeDisplay",Qi);var Ji=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"durationchange",i.updateContent),i.on(t,"loadstart",i.updateContent),i.on(t,"loadedmetadata",i.updateContent),i}c(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}($i);Ji.prototype.labelText_="Duration",Ji.prototype.controlText_="Duration",an.registerComponent("DurationDisplay",Ji);var Zi=function(e){function t(){return e.apply(this,arguments)||this}return c(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}(an);an.registerComponent("TimeDivider",Zi);var er=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"durationchange",i.updateContent),i}c(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(Ve("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}($i);er.prototype.labelText_="Remaining Time",er.prototype.controlText_="Remaining Time",an.registerComponent("RemainingTimeDisplay",er);var tr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).updateShowing(),i.on(i.player(),"durationchange",i.updateShowing),i}c(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_=Ve("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}(an);an.registerComponent("LiveDisplay",tr);var nr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).updateLiveEdgeStatus(),i.player_.liveTracker&&i.on(i.player_.liveTracker,"liveedgechange",i.updateLiveEdgeStatus),i}c(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_=Ve("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}(Wi);nr.prototype.controlText_="Seek to live, currently playing live",an.registerComponent("SeekToLive",nr);var ir=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},rr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}c(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,i){return void 0===n&&(n={}),void 0===i&&(i={}),n.className=n.className+" vjs-slider",n=Pe({tabIndex:0},n),i=Pe({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},i),e.prototype.createEl.call(this,t,n,i)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||_n||e.preventDefault(),Ze(),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;et(),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(ir(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=it(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){p().isEventKey(t,"Left")||p().isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):p().isEventKey(t,"Right")||p().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}(an);an.registerComponent("Slider",rr);var ar=function(e,t){return ir(e/t*100,0,100).toFixed(2)+"%"},sr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).partEls_=[],i.on(t,"progress",i.update),i}c(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=Ve("span",{className:"vjs-control-text"}),i=Ve("span",{textContent:this.localize("Loaded")}),r=s().createTextNode(": ");return this.percentageEl_=Ve("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(i),n.appendChild(r),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(),i=e&&e.isLive()?e.seekableEnd():t.player_.duration(),r=t.player_.bufferedEnd(),a=t.partEls_,s=ar(r,i);t.percent_!==s&&(t.el_.style.width=s,He(t.percentageEl_,s),t.percent_=s);for(var o=0;o<n.length;o++){var u=n.start(o),l=n.end(o),c=a[o];c||(c=t.el_.appendChild(Ve()),a[o]=c),c.dataset.start===u&&c.dataset.end===l||(c.dataset.start=u,c.dataset.end=l,c.style.left=ar(u,r),c.style.width=ar(l-u,r))}for(var h=a.length;h>n.length;h--)t.el_.removeChild(a[h-1]);a.length=n.length}))},t}(an);an.registerComponent("LoadProgressBar",sr);var or=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=jt(Ut(u(i),i.update),Nt),i}c(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 i=nt(this.el_),r=tt(this.player_.el()),a=e.width*t;if(r&&i){var s=e.left-r.left+a,o=e.width-a+(r.right-e.right),u=i.width/2;s<u?u+=u-s:o<u&&(u=o),u<0?u=0:u>i.width&&(u=i.width),u=Math.round(u),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(e){He(this.el_,e)},n.updateTime=function(e,t,n,i){var r=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var a,s=r.player_.duration();if(r.player_.liveTracker&&r.player_.liveTracker.isLive()){var o=r.player_.liveTracker.liveWindow(),u=o-t*o;a=(u<1?"":"-")+Yi(u,o)}else a=Yi(n,s);r.update(e,t,a),i&&i()}))},t}(an);an.registerComponent("TimeTooltip",or);var ur=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=jt(Ut(u(i),i.update),Nt),i}c(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 i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,i)}},t}(an);ur.prototype.options_={children:[]},xn||pn||ur.prototype.options_.children.push("timeTooltip"),an.registerComponent("PlayProgressBar",ur);var lr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=jt(Ut(u(i),i.update),Nt),i}c(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,i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,(function(){n.el_.style.left=e.width*t+"px"}))},t}(an);lr.prototype.options_={children:["timeTooltip"]},an.registerComponent("MouseTimeDisplay",lr);var cr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).setEventHandlers_(),i}c(t,e);var n=t.prototype;return n.setEventHandlers_=function(){this.update_=Ut(this,this.update),this.update=jt(this.update_,Nt),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 s()&&"visibilityState"in s()&&this.on(s(),"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){s().hidden?this.disableInterval_(e):(this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Nt))},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,i=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,r=n.player_.duration();t&&t.isLive()&&(r=n.player_.liveTracker.liveCurrentTime()),n.percent_!==i&&(n.el_.setAttribute("aria-valuenow",(100*i).toFixed(2)),n.percent_=i),n.currentTime_===e&&n.duration_===r||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[Yi(e,r),Yi(r,r)],"{1} of {2}")),n.currentTime_=e,n.duration_=r),n.bar&&n.bar.update(tt(n.el()),n.getProgress())})),i},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){lt(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(lt(e)){var t,n=this.calculateDistance(e),i=this.player_.liveTracker;if(i&&i.isLive()){if(n>=.99)return void i.seekToLiveEdge();var r=i.seekableStart(),a=i.liveCurrentTime();if((t=r+n*i.liveWindow())>=a&&(t=a),t<=r&&(t=r+.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?Wn(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(p().isEventKey(t,"Space")||p().isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(p().isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(0);else if(p().isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(p()(t))){t.preventDefault(),t.stopPropagation();var n=10*(p().codes[p()(t)]-p().codes[0])/100;this.player_.currentTime(this.player_.duration()*n)}else p().isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):p().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 s()&&"visibilityState"in s()&&this.off(s(),"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(rr);cr.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},xn||pn||cr.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),an.registerComponent("SeekBar",cr);var hr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).handleMouseMove=jt(Ut(u(i),i.handleMouseMove),Nt),i.throttledHandleMouseSeek=jt(Ut(u(i),i.handleMouseSeek),Nt),i.enable(),i}c(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"),i=t.getChild("mouseTimeDisplay");if(n||i){var r=t.el(),a=nt(r),s=it(r,e).x;s=ir(s,0,1),i&&i.update(a,s),n&&n.update(a,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}(an);hr.prototype.options_={children:["seekBar"]},an.registerComponent("ProgressControl",hr);var dr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],i.handlePictureInPictureChange),i.on(t,["disablepictureinpicturechanged","loadedmetadata"],i.handlePictureInPictureEnabledChange),i.disable(),i}c(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){s().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}(Wi);dr.prototype.controlText_="Picture-in-Picture",an.registerComponent("PictureInPictureToggle",dr);var fr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"fullscreenchange",i.handleFullscreenChange),!1===s()[t.fsApi_.fullscreenEnabled]&&i.disable(),i}c(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}(Wi);fr.prototype.controlText_="Fullscreen",an.registerComponent("FullscreenToggle",fr);var pr=function(e){function t(){return e.apply(this,arguments)||this}return c(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}(an);an.registerComponent("VolumeLevel",pr);var mr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on("slideractive",i.updateLastVolume_),i.on(t,"volumechange",i.updateARIAAttributes),t.ready((function(){return i.updateARIAAttributes()})),i}c(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){lt(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){lt(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}(rr);mr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},mr.prototype.playerEvent="volumechange",an.registerComponent("VolumeBar",mr);var gr=function(e){function t(t,n){var i;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||De(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),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")}))}(u(i=e.call(this,t,n)||this),t),i.throttledHandleMouseMove=jt(Ut(u(i),i.handleMouseMove),Nt),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],(function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")})),i.on(i.volumeBar,["blur","sliderinactive"],(function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")})),i}c(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}(an);gr.prototype.options_={children:["volumeBar"]},an.registerComponent("VolumeControl",gr);var vr=function(e){function t(t,n){var i;return 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")}))}(u(i=e.call(this,t,n)||this),t),i.on(t,["loadstart","volumechange"],i.update),i}c(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 i=n<.1?.1:n;this.player_.volume(i),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;xn&&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++)Ge(this.el_,"vjs-vol-"+n);ze(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}(Wi);vr.prototype.controlText_="Mute",an.registerComponent("MuteToggle",vr);var yr=function(e){function t(t,n){var i;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||De(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(i=e.call(this,t,n)||this).on(t,["loadstart"],i.volumePanelState_),i.on(i.muteToggle,"keyup",i.handleKeyPress),i.on(i.volumeControl,"keyup",i.handleVolumeControlKeyUp),i.on("keydown",i.handleKeyPress),i.on("mouseover",i.handleMouseOver),i.on("mouseout",i.handleMouseOut),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}c(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){p().isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),It(s(),"keyup",Ut(this,this.handleKeyPress))},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),Ot(s(),"keyup",Ut(this,this.handleKeyPress))},n.handleKeyPress=function(e){p().isEventKey(e,"Esc")&&this.handleMouseOut()},t}(an);yr.prototype.options_={children:["muteToggle","volumeControl"]},an.registerComponent("VolumePanel",yr);var _r=function(e){function t(t,n){var i;return i=e.call(this,t,n)||this,n&&(i.menuButton_=n.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyDown),i.boundHandleBlur_=Ut(u(i),i.handleBlur),i.boundHandleTapClick_=Ut(u(i),i.handleTapClick),i}c(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof an&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof an&&(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_=Ve(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_),It(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||s().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){p().isEventKey(e,"Left")||p().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(p().isEventKey(e,"Right")||p().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}(an);an.registerComponent("Menu",_r);var br=function(e){function t(t,n){var i;void 0===n&&(n={}),(i=e.call(this,t,n)||this).menuButton_=new Wi(t,n),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var r=Wi.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+r,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"keydown",i.handleKeyDown),i.on(i.menuButton_,"mouseenter",(function(){i.addClass("vjs-hover"),i.menu.show(),It(s(),"keyup",Ut(u(i),i.handleMenuKeyUp))})),i.on("mouseleave",i.handleMouseLeave),i.on("keydown",i.handleSubmenuKeyDown),i}c(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 _r(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=Ve("li",{className:"vjs-menu-title",innerHTML:Jt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var n=new an(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)e.addItem(this.items[i]);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+" "+Wi.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"),Ot(s(),"keyup",Ut(this,this.handleMenuKeyUp))},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(e){p().isEventKey(e,"Esc")||p().isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),p().isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(p().isEventKey(e,"Up")||p().isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(e){(p().isEventKey(e,"Esc")||p().isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},n.handleSubmenuKeyDown=function(e){(p().isEventKey(e,"Esc")||p().isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),p().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"),xn&&Be())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}(an);an.registerComponent("MenuButton",br);var Tr=function(e){function t(t,n){var i,r=n.tracks;if((i=e.call(this,t,n)||this).items.length<=1&&i.hide(),!r)return u(i);var a=Ut(u(i),i.update);return r.addEventListener("removetrack",a),r.addEventListener("addtrack",a),r.addEventListener("labelchange",a),i.player_.on("ready",a),i.player_.on("dispose",(function(){r.removeEventListener("removetrack",a),r.removeEventListener("addtrack",a),r.removeEventListener("labelchange",a)})),i}return c(t,e),t}(br);an.registerComponent("TrackButton",Tr);var Sr=["Tab","Esc","Up","Down","Right","Left"],wr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).selectable=n.selectable,i.isSelected_=n.selected||!1,i.multiSelectable=n.multiSelectable,i.selected(i.isSelected_),i.selectable?i.multiSelectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitemradio"):i.el_.setAttribute("role","menuitem"),i}c(t,e);var n=t.prototype;return n.createEl=function(t,n,i){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",Pe({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),i)},n.handleKeyDown=function(t){Sr.some((function(e){return p().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}(Ni);an.registerComponent("MenuItem",wr);var Er=function(e){function t(t,n){var i,a=n.track,o=t.textTracks();n.label=a.label||a.language||"Unknown",n.selected="showing"===a.mode,(i=e.call(this,t,n)||this).track=a,i.kinds=(n.kinds||[n.kind||i.track.kind]).filter(Boolean);var l,c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i.handleTracksChange.apply(u(i),t)},h=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i.handleSelectedLanguageChange.apply(u(i),t)};return t.on(["loadstart","texttrackchange"],c),o.addEventListener("change",c),o.addEventListener("selectedlanguagechange",h),i.on("dispose",(function(){t.off(["loadstart","texttrackchange"],c),o.removeEventListener("change",c),o.removeEventListener("selectedlanguagechange",h)})),void 0===o.onchange&&i.on(["tap","click"],(function(){if("object"!=typeof r().Event)try{l=new(r().Event)("change")}catch(e){}l||(l=s().createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(l)})),i.handleTracksChange(),i}c(t,e);var n=t.prototype;return n.handleClick=function(t){var n=this.track,i=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),i)for(var r=0;r<i.length;r++){var a=i[r];-1!==this.kinds.indexOf(a.kind)&&(a===n?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.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}(wr);an.registerComponent("TextTrackMenuItem",Er);var kr=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}c(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,i=0,r=t.length;i<r;i++){var a=t[i];if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,i=0,r=t.length;i<r;i++){var a=t[i];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Er);an.registerComponent("OffTextTrackMenuItem",kr);var Cr=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return c(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=Er),this.label_&&(n=this.label_+" off"),e.push(new kr(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var i=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r<i.length;r++){var a=i[r];if(this.kinds_.indexOf(a.kind)>-1){var s=new t(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+a.kind+"-menu-item"),e.push(s)}}return e},t}(Tr);an.registerComponent("TextTrackButton",Cr);var xr=function(e){function t(t,n){var i,r=n.track,a=n.cue,s=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=a.text,n.selected=a.startTime<=s&&s<a.endTime,(i=e.call(this,t,n)||this).track=r,i.cue=a,r.addEventListener("cuechange",Ut(u(i),i.update)),i}c(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}(wr);an.registerComponent("ChaptersTrackMenuItem",xr);var Ar=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}c(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(Jt(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,i=t.length;n<i;n++){var r=t[n],a=new xr(this.player_,{track:this.track_,cue:r});e.push(a)}return e},t}(Cr);Ar.prototype.kind_="chapters",Ar.prototype.controlText_="Chapters",an.registerComponent("ChaptersButton",Ar);var Ir=function(e){function t(t,n,i){var r;r=e.call(this,t,n,i)||this;var a=t.textTracks(),s=Ut(u(r),r.handleTracksChange);return a.addEventListener("change",s),r.on("dispose",(function(){a.removeEventListener("change",s)})),r}c(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,i=0,r=t.length;i<r;i++){var a=t[i];if(a.kind!==this.kind_&&"showing"===a.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}(Cr);Ir.prototype.kind_="descriptions",Ir.prototype.controlText_="Descriptions",an.registerComponent("DescriptionsButton",Ir);var Or=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}c(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}(Cr);Or.prototype.kind_="subtitles",Or.prototype.controlText_="Subtitles",an.registerComponent("SubtitlesButton",Or);var Pr=function(e){function t(t,n){var i;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(i=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),i.controlText(", opens "+n.kind+" settings dialog"),i}return c(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Er);an.registerComponent("CaptionSettingsMenuItem",Pr);var Lr=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}c(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 Pr(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Cr);Lr.prototype.kind_="captions",Lr.prototype.controlText_="Captions",an.registerComponent("CaptionsButton",Lr);var Dr=function(e){function t(){return e.apply(this,arguments)||this}return c(t,e),t.prototype.createEl=function(t,n,i){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(r+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),r+="</span>",e.prototype.createEl.call(this,t,Pe({innerHTML:r},n),i)},t}(Er);an.registerComponent("SubsCapsMenuItem",Dr);var Rr=function(e){function t(t,n){var i;return void 0===n&&(n={}),(i=e.call(this,t,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1&&(i.label_="captions"),i.menuButton_.controlText(Jt(i.label_)),i}c(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 Pr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t,Dr)},t}(Cr);Rr.prototype.kinds_=["captions","subtitles"],Rr.prototype.controlText_="Subtitles",an.registerComponent("SubsCapsButton",Rr);var Mr=function(e){function t(t,n){var i,r=n.track,a=t.audioTracks();n.label=r.label||r.language||"Unknown",n.selected=r.enabled,(i=e.call(this,t,n)||this).track=r,i.addClass("vjs-"+r.kind+"-menu-item");var s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i.handleTracksChange.apply(u(i),t)};return a.addEventListener("change",s),i.on("dispose",(function(){a.removeEventListener("change",s)})),i}c(t,e);var n=t.prototype;return n.createEl=function(t,n,i){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(r+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),r+="</span>",e.prototype.createEl.call(this,t,Pe({innerHTML:r},n),i)},n.handleClick=function(t){var n=this.player_.audioTracks();e.prototype.handleClick.call(this,t);for(var i=0;i<n.length;i++){var r=n[i];r.enabled=r===this.track}},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(wr);an.registerComponent("AudioTrackMenuItem",Mr);var Nr=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}c(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 i=t[n];e.push(new Mr(this.player_,{track:i,selectable:!0,multiSelectable:!1}))}return e},t}(Tr);Nr.prototype.controlText_="Audio Track",an.registerComponent("AudioTrackButton",Nr);var Ur=function(e){function t(t,n){var i,r=n.rate,a=parseFloat(r,10);return n.label=r,n.selected=1===a,n.selectable=!0,n.multiSelectable=!1,(i=e.call(this,t,n)||this).label=r,i.rate=a,i.on(t,"ratechange",i.update),i}c(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}(wr);Ur.prototype.contentElType="button",an.registerComponent("PlaybackRateMenuItem",Ur);var jr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).updateVisibility(),i.updateLabel(),i.on(t,"loadstart",i.updateVisibility),i.on(t,"ratechange",i.updateLabel),i}c(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=Ve("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 _r(this.player()),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addChild(new Ur(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(),i=n[0],r=0;r<n.length;r++)if(n[r]>t){i=n[r];break}this.player().playbackRate(i)},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}(br);jr.prototype.controlText_="Playback Rate",an.registerComponent("PlaybackRateMenuButton",jr);var Br=function(e){function t(){return e.apply(this,arguments)||this}c(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}(an);an.registerComponent("Spacer",Br);var Fr=function(e){function t(){return e.apply(this,arguments)||this}c(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}(Br);an.registerComponent("CustomControlSpacer",Fr);var Vr=function(e){function t(){return e.apply(this,arguments)||this}return c(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(an);Vr.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in s()&&Vr.prototype.options_.children.splice(Vr.prototype.options_.children.length-1,0,"pictureInPictureToggle"),an.registerComponent("ControlBar",Vr);var Hr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"error",i.open),i}c(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}(zn);Hr.prototype.options_=o({},zn.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),an.registerComponent("ErrorDisplay",Hr);var Wr="vjs-text-track-settings",qr=["#000","Black"],zr=["#00F","Blue"],Gr=["#0FF","Cyan"],Xr=["#0F0","Green"],Kr=["#F0F","Magenta"],Yr=["#F00","Red"],$r=["#FFF","White"],Qr=["#FF0","Yellow"],Jr=["1","Opaque"],Zr=["0.5","Semi-Transparent"],ea=["0","Transparent"],ta={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[qr,$r,Yr,Xr,zr,Qr,Kr,Gr]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Jr,Zr,ea]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[$r,qr,Yr,Xr,zr,Qr,Kr,Gr]},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:[Jr,Zr]},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:[ea,Zr,Jr]}};function na(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}ta.windowColor.options=ta.backgroundColor.options;var ia=function(e){function t(t,n){var i;return n.temporary=!1,(i=e.call(this,t,n)||this).updateDisplay=Ut(u(i),i.updateDisplay),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=Ve("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===n.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",(function(){i.saveSettings(),i.close()})),i.on(i.$(".vjs-default-button"),"click",(function(){i.setDefaults(),i.updateDisplay()})),Oe(ta,(function(e){i.on(i.$(e.selector),"change",i.updateDisplay)})),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}c(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 i=this;void 0===t&&(t=""),void 0===n&&(n="label");var r=ta[e],a=r.id.replace("%s",this.id_),s=[t,a].join(" ").trim();return["<"+n+' id="'+a+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(r.label),"</"+n+">",'<select aria-labelledby="'+s+'">'].concat(r.options.map((function(e){var t=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+s+" "+t+'">',i.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 Ve("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return Ve("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 Ve("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,i=this;return t=function(e,t,n){var r,a,s=(r=i.$(t.selector),a=t.parser,na(r.options[r.options.selectedIndex].value,a));return void 0!==s&&(e[n]=s),e},void 0===(n={})&&(n=0),Ie(e=ta).reduce((function(n,i){return t(n,e[i],i)}),n)},n.setValues=function(e){var t=this;Oe(ta,(function(n,i){!function(e,t,n){if(t)for(var i=0;i<e.options.length;i++)if(na(e.options[i].value,n)===t){e.selectedIndex=i;break}}(t.$(n.selector),e[i],n.parser)}))},n.setDefaults=function(){var e=this;Oe(ta,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},n.restoreSettings=function(){var e;try{e=JSON.parse(r().localStorage.getItem(Wr))}catch(e){Ce.warn(e)}e&&this.setValues(e)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?r().localStorage.setItem(Wr,JSON.stringify(e)):r().localStorage.removeItem(Wr)}catch(e){Ce.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}(zn);an.registerComponent("TextTrackSettings",ia);var ra=function(e){function t(t,n){var i,a=n.ResizeObserver||r().ResizeObserver;null===n.ResizeObserver&&(a=!1);var s=Zt({createEl:!a,reportTouchActivity:!1},n);return(i=e.call(this,t,s)||this).ResizeObserver=n.ResizeObserver||r().ResizeObserver,i.loadListener_=null,i.resizeObserver_=null,i.debouncedHandler_=function(e,t,n,i){var a;void 0===i&&(i=r());var s=function(){var t=this,n=arguments,r=function(){a=null,r=null,e.apply(t,n)};i.clearTimeout(a),a=i.setTimeout(r,100)};return s.cancel=function(){i.clearTimeout(a),a=null},s}((function(){i.resizeHandler()}),0,0,u(i)),a?(i.resizeObserver_=new i.ResizeObserver(i.debouncedHandler_),i.resizeObserver_.observe(t.el())):(i.loadListener_=function(){if(i.el_&&i.el_.contentWindow){var e=i.debouncedHandler_,t=i.unloadListener_=function(){Ot(this,"resize",e),Ot(this,"unload",t),t=null};It(i.el_.contentWindow,"unload",t),It(i.el_.contentWindow,"resize",e)}},i.one("load",i.loadListener_)),i}c(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}(an);an.registerComponent("ResizeManager",ra);var aa={trackingThreshold:30,liveTolerance:15},sa=function(e){function t(t,n){var i,r=Zt(aa,n,{createEl:!1});return(i=e.call(this,t,r)||this).reset_(),i.on(i.player_,"durationchange",i.handleDurationchange),Tn&&"hidden"in s()&&"visibilityState"in s()&&i.on(s(),"visibilitychange",i.handleVisibilityChange),i}c(t,e);var n=t.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(s().hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(r().performance.now().toFixed(4)),n=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+n;var i=this.liveCurrentTime(),a=this.player_.currentTime(),s=this.player_.paused()||this.seekedBehindLive_||Math.abs(i-a)>this.options_.liveTolerance;this.timeupdateSeen_&&i!==1/0||(s=!1),s!==this.behindLiveEdge_&&(this.behindLiveEdge_=s,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_,Nt),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(s(),"visibilitychange",this.handleVisibilityChange),this.stopTracking(),e.prototype.dispose.call(this)},t}(an);an.registerComponent("LiveTracker",sa);var oa,ua=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),i=[],r="";if(!n.length)return!1;for(var a=0;a<n.length;a++){var s=n[a].src;s&&-1===i.indexOf(s)&&i.push(s)}return!!i.length&&(1===i.length&&(r=i[0]),e.triggerSourceset(r),!0)},la=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=s().createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=s().createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",r().Element.prototype.appendChild.call(this,n),this.innerHTML}}),ca=function(e,t){for(var n={},i=0;i<e.length&&!((n=Object.getOwnPropertyDescriptor(e[i],t))&&n.set&&n.get);i++);return n.enumerable=!0,n.configurable=!0,n},ha=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},i=function(e){return ca([e.el(),r().HTMLMediaElement.prototype,r().Element.prototype,la],"innerHTML")}(e),a=function(n){return function(){for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];var s=n.apply(t,r);return ua(e),s}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=a(n[e]))})),Object.defineProperty(t,"innerHTML",Zt(i,{set:a(i.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach((function(e){t[e]=n[e]})),Object.defineProperty(t,"innerHTML",i)},e.one("sourceset",t.resetSourceWatch_)}},da=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?oi(r().Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return r().Element.prototype.setAttribute.call(this,"src",e),e}}),fa=function(e,t,n,i){void 0===i&&(i=!0);var r=function(n){return Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0})},a={configurable:!0,enumerable:!0,get:function(){var e=n();return r(e),e}};return i&&(a.set=r),Object.defineProperty(e,t,a)},pa=function(e){function t(t,n){var i;i=e.call(this,t,n)||this;var r=t.source,a=!1;if(r&&(i.el_.currentSrc!==r.src||t.tag&&3===t.tag.initNetworkState_)?i.setSource(r):i.handleLateInit_(i.el_),t.enableSourceset&&i.setupSourcesetHandling_(),i.isScrubbing_=!1,i.el_.hasChildNodes()){for(var s=i.el_.childNodes,o=s.length,u=[];o--;){var l=s[o];"track"===l.nodeName.toLowerCase()&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(l),i.remoteTextTracks().addTrack(l.track),i.textTracks().addTrack(l.track),a||i.el_.hasAttribute("crossorigin")||!li(l.src)||(a=!0)):u.push(l))}for(var c=0;c<u.length;c++)i.el_.removeChild(u[c])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&a&&Ce.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),i.restoreMetadataTracksInIOSNativePlayer_(),(En||Cn||gn)&&!0===t.nativeControlsForTouch&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}c(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(){!function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=function(e){return ca([e.el(),r().HTMLMediaElement.prototype,da],"src")}(e),i=t.setAttribute,a=t.load;Object.defineProperty(t,"src",Zt(n,{set:function(i){var r=n.set.call(t,i);return e.triggerSourceset(t.src),r}})),t.setAttribute=function(n,r){var a=i.call(t,n,r);return/src/i.test(n)&&e.triggerSourceset(t.src),a},t.load=function(){var n=a.call(t);return ua(e)||(e.triggerSourceset(""),ha(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):ua(e)||ha(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=a,t.setAttribute=i,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}}(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),n=function(){e=[];for(var n=0;n<t.length;n++){var i=t[n];"metadata"===i.kind&&e.push({track:i,storedMode:i.mode})}};n(),t.addEventListener("change",n),this.on("dispose",(function(){return t.removeEventListener("change",n)}));var i=function n(){for(var i=0;i<e.length;i++){var r=e[i];"disabled"===r.track.mode&&r.track.mode!==r.storedMode&&(r.track.mode=r.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",n),t.removeEventListener("change",i),t.addEventListener("change",i)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",i)}))},n.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var i=e.toLowerCase();this[i+"TracksListeners_"]&&Object.keys(this[i+"TracksListeners_"]).forEach((function(e){n.el()[i+"Tracks"].removeEventListener(e,n[i+"TracksListeners_"][e])})),this["featuresNative"+e+"Tracks"]=!t,this[i+"TracksListeners_"]=null,this.proxyNativeTracksForType_(i)}},n.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},n.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},n.proxyNativeTracksForType_=function(e){var t=this,n=vi[e],i=this.el()[n.getterName],r=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&i&&i.addEventListener){var a={change:function(n){var i={type:"change",target:r,currentTarget:r,srcElement:r};r.trigger(i),"text"===e&&t[yi.remoteText.getterName]().trigger(i)},addtrack:function(e){r.addTrack(e.track)},removetrack:function(e){r.removeTrack(e.track)}},s=function(){for(var e=[],t=0;t<r.length;t++){for(var n=!1,a=0;a<i.length;a++)if(i[a]===r[t]){n=!0;break}n||e.push(r[t])}for(;e.length;)r.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=a,Object.keys(a).forEach((function(e){var n=a[e];i.addEventListener(e,n),t.on("dispose",(function(t){return i.removeEventListener(e,n)}))})),this.on("loadstart",s),this.on("dispose",(function(e){return t.off("loadstart",s)}))}},n.proxyNativeTracks_=function(){var e=this;vi.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=s().createElement("video");var i=Zt({},this.options_.tag&&Ye(this.options_.tag));En&&!0===this.options_.nativeControlsForTouch||delete i.controls,Ke(e,Pe(i,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&Qe(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var r=["loop","muted","playsinline","autoplay"],a=0;a<r.length;a++){var o=r[a],u=this.options_[o];void 0!==u&&(u?Qe(e,o,o):Je(e,o),e[o]=u)}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 i=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",i),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",i),t||this.trigger("loadstart")}))}var r=["loadstart"];r.push("loadedmetadata"),e.readyState>=2&&r.push("loadeddata"),e.readyState>=3&&r.push("canplay"),e.readyState>=4&&r.push("canplaythrough"),this.ready((function(){r.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&&An?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){Ce(e,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;return this.el_.duration===1/0&&pn&&_n&&0===this.el_.currentTime?(this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN):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=r().navigator&&r().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)Wn(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,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,i):e.prototype.addTextTrack.call(this,t,n,i)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=s().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 i=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(i),i},n.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),i=n.length;i--;)t!==n[i]&&t!==n[i].track||this.el().removeChild(n[i])},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),r().performance&&"function"==typeof r().performance.now?e.creationTime=r().performance.now():r().performance&&r().performance.timing&&"number"==typeof r().performance.timing.navigationStart&&(e.creationTime=r().Date.now()-r().performance.timing.navigationStart),e},t}(bi);fa(pa,"TEST_VID",(function(){if(Ue()){var e=s().createElement("video"),t=s().createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),pa.isSupported=function(){try{pa.TEST_VID.volume=.5}catch(e){return!1}return!(!pa.TEST_VID||!pa.TEST_VID.canPlayType)},pa.canPlayType=function(e){return pa.TEST_VID.canPlayType(e)},pa.canPlaySource=function(e,t){return pa.canPlayType(e.type)},pa.canControlVolume=function(){try{var e=pa.TEST_VID.volume;return pa.TEST_VID.volume=e/2+.1,e!==pa.TEST_VID.volume}catch(e){return!1}},pa.canMuteVolume=function(){try{var e=pa.TEST_VID.muted;return pa.TEST_VID.muted=!e,pa.TEST_VID.muted?Qe(pa.TEST_VID,"muted","muted"):Je(pa.TEST_VID,"muted"),e!==pa.TEST_VID.muted}catch(e){return!1}},pa.canControlPlaybackRate=function(){if(pn&&_n&&bn<58)return!1;try{var e=pa.TEST_VID.playbackRate;return pa.TEST_VID.playbackRate=e/2+.1,e!==pa.TEST_VID.playbackRate}catch(e){return!1}},pa.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(s().createElement("video"),"src",{get:e,set:e}),Object.defineProperty(s().createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(s().createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(s().createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},pa.supportsNativeTextTracks=function(){return An||xn&&_n},pa.supportsNativeVideoTracks=function(){return!(!pa.TEST_VID||!pa.TEST_VID.videoTracks)},pa.supportsNativeAudioTracks=function(){return!(!pa.TEST_VID||!pa.TEST_VID.audioTracks)},pa.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];fa(pa.prototype,t,(function(){return pa[n]()}),!0)})),pa.prototype.movingMediaElementInDOM=!xn,pa.prototype.featuresFullscreenResize=!0,pa.prototype.featuresProgressEvents=!0,pa.prototype.featuresTimeupdateEvents=!0,pa.patchCanPlayType=function(){mn>=4&&!vn&&!_n&&(oa=pa.TEST_VID&&pa.TEST_VID.constructor.prototype.canPlayType,pa.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":oa.call(this,e)})},pa.unpatchCanPlayType=function(){var e=pa.TEST_VID.constructor.prototype.canPlayType;return oa&&(pa.TEST_VID.constructor.prototype.canPlayType=oa),e},pa.patchCanPlayType(),pa.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){}}()}},pa.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){pa.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){pa.prototype["set"+Jt(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){pa.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){pa.prototype["set"+Jt(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){pa.prototype[e]=function(){return this.el_[e]()}})),bi.withSourceHandlers(pa),pa.nativeSourceHandler={},pa.nativeSourceHandler.canPlayType=function(e){try{return pa.TEST_VID.canPlayType(e)}catch(e){return""}},pa.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return pa.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=ui(e.src);return pa.nativeSourceHandler.canPlayType("video/"+n)}return""},pa.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},pa.nativeSourceHandler.dispose=function(){},pa.registerSourceHandler(pa.nativeSourceHandler),bi.registerTech("Html5",pa);var ma=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ga={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},va=["tiny","xsmall","small","medium","large","xlarge","huge"],ya={};va.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;ya[e]="vjs-layout-"+t}));var _a={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},ba=function(e){function t(n,i,r){var a;if(n.id=n.id||i.id||"vjs_video_"+St(),(i=Pe(t.getTagSettings(n),i)).initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,!i.language)if("function"==typeof n.closest){var o=n.closest("[lang]");o&&o.getAttribute&&(i.language=o.getAttribute("lang"))}else for(var l=n;l&&1===l.nodeType;){if(Ye(l).hasOwnProperty("lang")){i.language=l.getAttribute("lang");break}l=l.parentNode}if((a=e.call(this,null,i,r)||this).boundDocumentFullscreenChange_=Ut(u(a),a.documentFullscreenChange_),a.boundFullWindowOnEscKey_=Ut(u(a),a.fullWindowOnEscKey),a.isFullscreen_=!1,a.log=xe(a.id_),a.fsApi_=Mn,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,a.debugEnabled_=!1,!a.options_||!a.options_.techOrder||!a.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(a.tag=n,a.tagAttributes=n&&Ye(n),a.language(a.options_.language),i.languages){var c={};Object.getOwnPropertyNames(i.languages).forEach((function(e){c[e.toLowerCase()]=i.languages[e]})),a.languages_=c}else a.languages_=t.prototype.options_.languages;a.resetCache_(),a.poster_=i.poster||"",a.controls_=!!i.controls,n.controls=!1,n.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],n.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),i.plugins&&Object.keys(i.plugins).forEach((function(e){if("function"!=typeof a[e])throw new Error('plugin "'+e+'" does not exist')})),a.scrubbing_=!1,a.el_=a.createEl(),Kt(u(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&(It(s(),a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.updateStyleEl_);var h=Zt(a.options_);i.plugins&&Object.keys(i.plugins).forEach((function(e){a[e](i.plugins[e])})),i.debug&&a.debug(!0),a.options_.playerOptions=h,a.middleware_=[],a.initChildren(),a.isAudio("audio"===n.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),En&&a.addClass("vjs-touch-enabled"),xn||a.addClass("vjs-workinghover"),t.players[a.id_]=u(a);var d=Ee.split(".")[0];return a.addClass("vjs-v"+d),a.userActive(!0),a.reportUserActivity(),a.one("play",a.listenForUserActivity_),a.on("stageclick",a.handleStageClick_),a.on("keydown",a.handleKeyDown),a.on("languagechange",a.handleLanguagechange),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a}c(t,e);var n=t.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),Ot(s(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Ot(s(),"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),Si[this.id()]=null,_i.names.forEach((function(e){var t=_i[e],i=n[t.getterName]();i&&i.off&&i.off()})),e.prototype.dispose.call(this)},n.createEl=function(){var t,n=this.tag,i=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),a="video-js"===this.tag.tagName.toLowerCase();i?t=this.el_=n.parentNode:a||(t=this.el_=e.prototype.createEl.call(this,"div"));var o=Ye(n);if(a){for(t=this.el_=n,n=this.tag=s().createElement("video");t.children.length;)n.appendChild(t.firstChild);qe(t,"video-js")||ze(t,"video-js"),t.appendChild(n),i=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{n[e]=t[e]}catch(e){}}))}if(n.setAttribute("tabindex","-1"),o.tabindex="-1",(Tn||_n&&wn)&&(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){a&&"class"===e||t.setAttribute(e,o[e]),a&&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!==r().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=_t("vjs-styles-dimensions");var u=ht(".vjs-styles-defaults"),l=ht("head");l.insertBefore(this.styleEl_,u?u.nextSibling:l.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 c=n.getElementsByTagName("a"),h=0;h<c.length;h++){var d=c.item(h);ze(d,"vjs-hidden"),d.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!i&&n.parentNode.insertBefore(t,n),We(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):Ce.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 i=parseFloat(t);isNaN(i)?Ce.error('Improper value "'+t+'" supplied for for '+e):(this[n]=i,this.updateStyleEl_())},n.fluid=function(e){var t,n,i=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,Ft(this)&&this.off(["playerreset","resize"],this.updateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){i.on(["playerreset","resize"],i.updateStyleEl_)},Ft(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!==r().VIDEOJS_NO_DYNAMIC_STYLE){var e,t,n,i=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),a=i[1]/i[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/a:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*a,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),bt(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*a+"%;\n }\n ")}else{var s="number"==typeof this.width_?this.width_:this.options_.width,o="number"==typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(s>=0&&(u.width=s),o>=0&&(u.height=o))}},n.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var i=Jt(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==i&&this.tag&&(bi.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;var a={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_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};_i.names.forEach((function(e){var t=_i[e];a[t.getterName]=n[t.privateName]})),Pe(a,this.options_[i]),Pe(a,this.options_[r]),Pe(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);var s,o,u=bi.getTech(e);if(!u)throw new Error("No Tech named '"+i+"' exists! '"+i+"' should be registered using videojs.registerTech()'");this.tech_=new u(a),this.tech_.ready(Ut(this,this.handleTechReady_),!0),s=this.textTracksJson_||[],o=this.tech_,s.forEach((function(e){var t=o.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return t.addCue(e)}))})),o.textTracks(),ma.forEach((function(e){n.on(n.tech_,e,n["handleTech"+Jt(e)+"_"])})),Object.keys(ga).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+ga[e]+"_"].bind(n),event:t}):n["handleTech"+ga[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"===i&&this.tag||We(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e,t,n,i=this;_i.names.forEach((function(e){var t=_i[e];i[t.privateName]=i[t.getterName]()})),this.textTracksJson_=(e=this.tech_,t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track})),Array.prototype.map.call(t,(function(e){var t=qn(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(qn))),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&&Ce.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,i=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var i=t.play();if(Hn(i))return i.catch(n)};if("any"===e&&!0!==this.muted()?Hn(n=this.play())&&(n=n.catch(i)):n="muted"===e&&!0!==this.muted()?i():this.play(),Hn(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 i=e.$$("source"),r=0;r<i.length;r++){var a=i[r];if(a.type&&a.src&&a.src===t)return a.type}return Li(t)}(this,t)),this.cache_.source=Zt({},e,{src:t,type:n});for(var i=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),r=[],a=this.$$("source"),s=[],o=0;o<a.length;o++){var u=Ye(a[o]);r.push(u),u.src&&u.src===t&&s.push(u.src)}s.length&&!i.length?this.cache_.sources=r:i.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)},i=this.currentSource().src,r=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==i)&&(n=function(){}),n(r),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&&(Ce.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){lt(e)&&this.controls_&&(this.paused()?Wn(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(),i=s()[this.fsApi_.fullscreenElement]===n;!i&&n.matches?i=n.matches(":"+this.fsApi_.fullscreen):!i&&n.msMatchesSelector&&(i=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(i)}},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 xi)return function(e,t,n,i){return t[n](e.reduce(Ii(n),i))}(this.middleware_,this.tech_,e,t);if(e in Ai)return ki(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw Ce(e),e}}),!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in Ci)return function(e,t,n){return e.reduceRight(Ii(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Ai)return ki(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw Ce("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw Ce("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw Ce(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||r().Promise;return t?new t((function(t){e.play_(t)})):this.play_()},n.play_=function(e){var t=this;void 0===e&&(e=Wn),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||!An&&!xn||this.load());var i=this.techGet_("play");null===i?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(i)},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")||Ln(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=Ln(0,0)),e},n.bufferedPercent=function(){return Dn(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||r().Promise;if(t){var n=this;return new t((function(t,i){function r(){n.off("fullscreenerror",s),n.off("fullscreenchange",a)}function a(){r(),t()}function s(e,t){r(),i(t)}n.one("fullscreenchange",a),n.one("fullscreenerror",s);var o=n.requestFullscreenHelper_(e);if(o)return o.then(r,r),o}))}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 i=this.el_[this.fsApi_.requestFullscreen](t);return i&&i.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),i}this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var e=this.options_.Promise||r().Promise;if(e){var t=this;return new e((function(e,n){function i(){t.off("fullscreenerror",a),t.off("fullscreenchange",r)}function r(){i(),e()}function a(e,t){i(),n(t)}t.one("fullscreenchange",r),t.one("fullscreenerror",a);var s=t.exitFullscreenHelper_();if(s)return s.then(i,i),s}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=s()[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=s().documentElement.style.overflow,It(s(),"keydown",this.boundFullWindowOnEscKey_),s().documentElement.style.overflow="hidden",ze(s().body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){p().isEventKey(e,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,Ot(s(),"keydown",this.boundFullWindowOnEscKey_),s().documentElement.style.overflow=this.docOrigOverflow,Ge(s().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 s()&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in s())return s().exitPictureInPicture()},n.handleKeyDown=function(e){var t,n,i=this.options_.userActions;i&&i.hotkeys&&(t=this.el_.ownerDocument.activeElement,n=t.tagName.toLowerCase(),t.isContentEditable||("input"===n?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(t.type):-1!==["textarea"].indexOf(n))||("function"==typeof i.hotkeys?i.hotkeys.call(this,e):this.handleHotkeys(e)))},n.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,i=void 0===n?function(e){return p().isEventKey(e,"f")}:n,r=t.muteKey,a=void 0===r?function(e){return p().isEventKey(e,"m")}:r,o=t.playPauseKey,u=void 0===o?function(e){return p().isEventKey(e,"k")||p().isEventKey(e,"Space")}:o;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();var l=an.getComponent("FullscreenToggle");!1!==s()[this.fsApi_.fullscreenEnabled]&&l.prototype.handleClick.call(this,e)}else a.call(this,e)?(e.preventDefault(),e.stopPropagation(),an.getComponent("MuteToggle").prototype.handleClick.call(this,e)):u.call(this,e)&&(e.preventDefault(),e.stopPropagation(),an.getComponent("PlayToggle").prototype.handleClick.call(this,e))},n.canPlayType=function(e){for(var t,n=0,i=this.options_.techOrder;n<i.length;n++){var r=i[n],a=bi.getTech(r);if(a||(a=an.getComponent(r)),a){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else Ce.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(e){var t,n=this,i=this.options_.techOrder.map((function(e){return[e,bi.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(Ce.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),r=function(e,t,n){var i;return e.some((function(e){return t.some((function(t){if(i=n(e,t))return!0}))})),i},a=function(e,t){var i=e[0];if(e[1].canPlaySource(t,n.options_[i.toLowerCase()]))return{source:t,tech:i}};return(this.options_.sourceOrder?r(e,i,(t=a,function(e,n){return t(n,e)})):r(i,e,a))||!1},n.src=function(e){var t=this;if(void 0===e)return this.cache_.src||"";var n=Di(e);n.length?(this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),Ei(this,n[0],(function(e,i){var r,a;if(t.middleware_=i,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());r=i,a=t.tech_,r.forEach((function(e){return e.setTech&&e.setTech(a)}))}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},n.src_=function(e){var t,n,i=this,r=this.selectSource([e]);return!r||(t=r.tech,n=this.techName_,Jt(t)!==Jt(n)?(this.changingSrc_=!0,this.loadTech_(r.tech,r.source),this.tech_.ready((function(){i.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||r().Promise;this.paused()||!t?this.doReset_():Wn(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_(),Ft(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 Fn(e),this.addClass("vjs-error"),Ce.error("(CODE:"+this.error_.code+" "+Fn.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,i=Ut(this,this.reportUserActivity),r=function(t){i(),this.clearInterval(e)};this.on("mousedown",(function(){i(),this.clearInterval(e),e=this.setInterval(i,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,i())})),this.on("mouseup",r),this.on("mouseleave",r);var a,s=this.getChild("controlBar");!s||xn||pn||(s.on("mouseenter",(function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0})),s.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",i),this.on("keyup",i),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var e=this.options_.inactivityTimeout;e<=0||(a=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(),Ft(this)&&this.trigger("languagechange"))},n.languages=function(){return Zt(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=Zt(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var i=t[n];(i=Zt(i)).player=void 0,e.tracks[n]=i}return e},n.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var i=new zn(this,t);return this.addChild(i),i.on("dispose",(function(){n.removeChild(i)})),i.open(),i},n.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<va.length;n++){var i=va[n];if(t<=this.breakpoints_[i]){if(e===i)return;e&&this.removeClass(ya[e]),this.addClass(ya[i]),this.breakpoint_=i;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_=Pe({},_a,e),this.updateCurrentBreakpoint_()),Pe(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 ya[this.breakpoint_]||""},n.loadMedia=function(e,t){var n=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=Zt(e);var i=this.cache_.media,r=i.artwork,a=i.poster,s=i.src,o=i.textTracks;!r&&a&&(this.cache_.media.artwork=[{src:a,type:Li(a)}]),s&&this.src(s),a&&this.poster(a),Array.isArray(o)&&o.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:Li(t.poster)}]),t}return Zt(this.cache_.media)},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=Ye(e),i=n["data-setup"];if(qe(e,"vjs-fill")&&(n.fill=!0),qe(e,"vjs-fluid")&&(n.fluid=!0),null!==i){var r=d()(i||"{}"),a=r[0],s=r[1];a&&Ce.error(a),Pe(n,s)}if(Pe(t,n),e.hasChildNodes())for(var o=e.childNodes,u=0,l=o.length;u<l;u++){var c=o[u],h=c.nodeName.toLowerCase();"source"===h?t.sources.push(Ye(c)):"track"===h&&t.tracks.push(Ye(c))}return t},n.flexNotSupported_=function(){var e=s().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}(an);_i.names.forEach((function(e){var t=_i[e];ba.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),ba.prototype.crossorigin=ba.prototype.crossOrigin,ba.players={};var Ta=r().navigator;ba.prototype.options_={techOrder:bi.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Ta&&(Ta.languages&&Ta.languages[0]||Ta.userLanguage||Ta.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){ba.prototype[e]=function(){return this.techGet_(e)}})),ma.forEach((function(e){ba.prototype["handleTech"+Jt(e)+"_"]=function(){return this.trigger(e)}})),an.registerComponent("Player",ba);var Sa="plugin",wa={},Ea=function(e){return wa.hasOwnProperty(e)},ka=function(e){return Ea(e)?wa[e]:void 0},Ca=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},xa=function(e,t,n){var i=(n?"before":"")+"pluginsetup";e.trigger(i,t),e.trigger(i+":"+t.name,t)},Aa=function(e,t){return t.prototype.name=e,function(){xa(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var a=b(t,[this].concat(i));return this[e]=function(){return a},xa(this,a.getEventHash()),a}},Ia=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)),Kt(this),delete this.trigger,$t(this,this.constructor.defaultState),Ca(t,this.name),this.dispose=Ut(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={}),Pt(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]=Aa(e,wa[e])},e.isBasic=function(t){var n="string"==typeof t?ka(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(Ea(t))Ce.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(ba.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 wa[t]=n,t!==Sa&&(e.isBasic(n)?ba.prototype[t]=function(e,t){var n=function(){xa(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return Ca(this,e),xa(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):ba.prototype[t]=Aa(t,n)),n},e.deregisterPlugin=function(e){if(e===Sa)throw new Error("Cannot de-register base plugin.");Ea(e)&&(delete wa[e],delete ba.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(wa)),e.forEach((function(e){var n=ka(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=ka(e);return t&&t.VERSION||""},e}();Ia.getPlugin=ka,Ia.BASE_PLUGIN_NAME=Sa,Ia.registerPlugin(Sa,Ia),ba.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},ba.prototype.hasPlugin=function(e){return!!Ea(e)};var Oa=function(e){return 0===e.indexOf("#")?e.slice(1):e};function Pa(e,t,n){var i=Pa.getPlayer(e);if(i)return t&&Ce.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&i.ready(n),i;var r="string"==typeof e?ht("#"+Oa(e)):e;if(!je(r))throw new TypeError("The element or ID supplied is not valid. (videojs)");r.ownerDocument.defaultView&&r.ownerDocument.body.contains(r)||Ce.warn("The element supplied is not included in the DOM"),t=t||{},Pa.hooks("beforesetup").forEach((function(e){var n=e(r,Zt(t));Le(n)&&!Array.isArray(n)?t=Zt(t,n):Ce.error("please return an object in beforesetup hooks")}));var a=an.getComponent("Player");return i=new a(r,t,n),Pa.hooks("setup").forEach((function(e){return e(i)})),i}if(Pa.hooks_={},Pa.hooks=function(e,t){return Pa.hooks_[e]=Pa.hooks_[e]||[],t&&(Pa.hooks_[e]=Pa.hooks_[e].concat(t)),Pa.hooks_[e]},Pa.hook=function(e,t){Pa.hooks(e,t)},Pa.hookOnce=function(e,t){Pa.hooks(e,[].concat(t).map((function(t){return function n(){return Pa.removeHook(e,n),t.apply(void 0,arguments)}})))},Pa.removeHook=function(e,t){var n=Pa.hooks(e).indexOf(t);return!(n<=-1||(Pa.hooks_[e]=Pa.hooks_[e].slice(),Pa.hooks_[e].splice(n,1),0))},!0!==r().VIDEOJS_NO_DYNAMIC_STYLE&&Ue()){var La=ht(".vjs-styles-defaults");if(!La){La=_t("vjs-styles-defaults");var Da=ht("head");Da&&Da.insertBefore(La,Da.firstChild),bt(La,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}gt(1,Pa),Pa.VERSION=Ee,Pa.options=ba.prototype.options_,Pa.getPlayers=function(){return ba.players},Pa.getPlayer=function(e){var t,n=ba.players;if("string"==typeof e){var i=Oa(e),r=n[i];if(r)return r;t=ht("#"+i)}else t=e;if(je(t)){var a=t,s=a.player,o=a.playerId;if(s||n[o])return s||n[o]}},Pa.getAllPlayers=function(){return Object.keys(ba.players).map((function(e){return ba.players[e]})).filter(Boolean)},Pa.players=ba.players,Pa.getComponent=an.getComponent,Pa.registerComponent=function(e,t){bi.isTech(t)&&Ce.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),an.registerComponent.call(an,e,t)},Pa.getTech=bi.getTech,Pa.registerTech=bi.registerTech,Pa.use=function(e,t){Ti[e]=Ti[e]||[],Ti[e].push(t)},Object.defineProperty(Pa,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Pa.middleware,"TERMINATOR",{value:wi,writeable:!1,enumerable:!0}),Pa.browser=In,Pa.TOUCH_ENABLED=En,Pa.extend=function(e,t){void 0===t&&(t={});var n=function(){e.apply(this,arguments)},i={};for(var r in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),i=t):"function"==typeof t&&(n=t),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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(n,e),e&&(n.super_=e),i)i.hasOwnProperty(r)&&(n.prototype[r]=i[r]);return n},Pa.mergeOptions=Zt,Pa.bind=Ut,Pa.registerPlugin=Ia.registerPlugin,Pa.deregisterPlugin=Ia.deregisterPlugin,Pa.plugin=function(e,t){return Ce.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Ia.registerPlugin(e,t)},Pa.getPlugins=Ia.getPlugins,Pa.getPlugin=Ia.getPlugin,Pa.getPluginVersion=Ia.getPluginVersion,Pa.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),Pa.options.languages=Zt(Pa.options.languages,((n={})[e]=t,n)),Pa.options.languages[e]},Pa.log=Ce,Pa.createLogger=xe,Pa.createTimeRange=Pa.createTimeRanges=Ln,Pa.formatTime=Yi,Pa.setFormatTime=function(e){Ki=e},Pa.resetFormatTime=function(){Ki=Xi},Pa.parseUrl=si,Pa.isCrossOrigin=li,Pa.EventTarget=Bt,Pa.on=It,Pa.one=Lt,Pa.off=Ot,Pa.trigger=Pt,Pa.xhr=g(),Pa.TextTrack=fi,Pa.AudioTrack=pi,Pa.VideoTrack=mi,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){Pa[e]=function(){return Ce.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),ft[e].apply(null,arguments)}})),Pa.computedStyle=Re,Pa.dom=ft,Pa.url=ci,Pa.defineLazyProperty=fa;var Ra,Ma=S(),Na=function(e,t,n){return e&&n&&n.responseURL&&t!==n.responseURL?n.responseURL:t},Ua=Pa.log,ja=function(e,t){return e+"-"+t},Ba=function(e){var t=e.manifestString,n=e.customTagParsers,i=void 0===n?[]:n,r=e.customTagMappers,a=void 0===r?[]:r,s=new O;return i.forEach((function(e){return s.addParser(e)})),a.forEach((function(e){return s.addTagMapper(e)})),s.push(t),s.end(),s.manifest},Fa=function(e,t){["AUDIO","SUBTITLES"].forEach((function(n){for(var i in e.mediaGroups[n])for(var r in e.mediaGroups[n][i]){var a=e.mediaGroups[n][i][r];t(a,n,i,r)}}))},Va=function(e){var t=e.playlist,n=e.uri,i=e.id;t.id=i,n&&(t.uri=n),t.attributes=t.attributes||{}},Ha=function(e,t){e.uri=t;for(var n=0;n<e.playlists.length;n++)if(!e.playlists[n].uri){var i="placeholder-uri-"+n;e.playlists[n].uri=i}Fa(e,(function(t,n,i,r){if(t.playlists&&t.playlists.length&&!t.playlists[0].uri){var a="placeholder-uri-"+n+"-"+i+"-"+r,s=ja(0,a);t.playlists[0].uri=a,t.playlists[0].id=s,e.playlists[s]=t.playlists[0],e.playlists[a]=t.playlists[0]}})),function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];Va({playlist:n,id:ja(t,n.uri)}),n.resolvedUri=Ma(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||Ua.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){Fa(e,(function(t){t.uri&&(t.resolvedUri=Ma(e.uri,t.uri))}))}(e)},Wa=Pa.mergeOptions,qa=Pa.EventTarget,za=function(e,t){e.resolvedUri||(e.resolvedUri=Ma(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Ma(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Ma(t,e.map.uri))},Ga=function(e,t){var n=Wa(e,{}),i=n.playlists[t.id];if(!i)return null;if(i.segments&&t.segments&&i.segments.length===t.segments.length&&i.endList===t.endList&&i.mediaSequence===t.mediaSequence)return null;var r=Wa(i,t);i.segments&&(r.segments=function(e,t,n){var i=t.slice();n=n||0;for(var r=Math.min(e.length,t.length+n),a=n;a<r;a++)i[a-n]=Wa(e[a],i[a-n]);return i}(i.segments,t.segments,t.mediaSequence-i.mediaSequence)),r.segments.forEach((function(e){za(e,r.resolvedUri)}));for(var a=0;a<n.playlists.length;a++)n.playlists[a].id===t.id&&(n.playlists[a]=r);return n.playlists[t.id]=r,n.playlists[t.uri]=r,n},Xa=function(e,t){var n=e.segments[e.segments.length-1];return t&&n&&n.duration?1e3*n.duration:500*(e.targetDuration||10)},Ka=function(e){function t(t,n,i){var r;if(void 0===i&&(i={}),r=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");var a=i,s=a.withCredentials,o=void 0!==s&&s,u=a.handleManifestRedirects,l=void 0!==u&&u;r.src=t,r.vhs_=n,r.withCredentials=o,r.handleManifestRedirects=l;var c=n.options_;return r.customTagParsers=c&&c.customTagParsers||[],r.customTagMappers=c&&c.customTagMappers||[],r.state="HAVE_NOTHING",r.on("mediaupdatetimeout",(function(){"HAVE_METADATA"===r.state&&(r.state="HAVE_CURRENT_METADATA",r.request=r.vhs_.xhr({uri:Ma(r.master.uri,r.media().uri),withCredentials:r.withCredentials},(function(e,t){if(r.request)return e?r.playlistRequestError(r.request,r.media(),"HAVE_METADATA"):void r.haveMetadata({playlistString:r.request.responseText,url:r.media().uri,id:r.media().id})})))})),r}c(t,e);var n=t.prototype;return n.playlistRequestError=function(e,t,n){var i=t.uri,r=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[r],status:e.status,message:"HLS playlist request error at URL: "+i+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},n.haveMetadata=function(e){var t=this,n=e.playlistString,i=e.playlistObject,a=e.url,s=e.id;this.request=null,this.state="HAVE_METADATA";var o=i||Ba({manifestString:n,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers});o.lastRequest=Date.now(),Va({playlist:o,uri:a,id:s});var u=Ga(this.master,o);this.targetDuration=o.targetDuration,u?(this.master=u,this.media_=this.master.playlists[s]):this.trigger("playlistunchanged"),this.media().endList||(r().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=r().setTimeout((function(){t.trigger("mediaupdatetimeout")}),Xa(this.media(),!!u))),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),r().clearTimeout(this.mediaUpdateTimeout),r().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(r().clearTimeout(this.finalRenditionTimeout),t){var i=e.targetDuration/2*1e3||5e3;this.finalRenditionTimeout=r().setTimeout(this.media.bind(this,e,!1),i)}else{var a=this.state,s=!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(s&&(this.trigger("mediachanging"),"HAVE_MASTER"===a?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(s){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,i){if(n.request){if(e.lastRequest=Date.now(),e.resolvedUri=Na(n.handleManifestRedirects,e.resolvedUri,i),t)return n.playlistRequestError(n.request,e,a);n.haveMetadata({playlistString:i.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===a?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}},n.pause=function(){this.stopRequest(),r().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;r().clearTimeout(this.mediaUpdateTimeout);var n=this.media();if(e){var i=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=r().setTimeout((function(){return t.load()}),i)}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=r().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=Na(e.handleManifestRedirects,e.src,n);var i=Ba({manifestString:n.responseText,customTagParsers:e.customTagParsers,customTagMappers:e.customTagMappers});e.setupInitialPlaylist(i)}}))},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,Ha(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments&&e.segments.forEach((function(t){za(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||r().location.href;this.master=function(e,t){var n=ja(0,t),i={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:r().location.href,resolvedUri:r().location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return i.playlists[n]=i.playlists[0],i.playlists[t]=i.playlists[0],i}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(qa),Ya=1/30,$a=.1,Qa=function(e,t){var n,i=[];if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&i.push([e.start(n),e.end(n)]);return Pa.createTimeRanges(i)},Ja=function(e,t){return Qa(e,(function(e,n){return e-$a<=t&&n+$a>=t}))},Za=function(e,t){return Qa(e,(function(e){return e-Ya>=t}))},es=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(", ")},ts=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},ns=Pa.createTimeRange,is=function(e,t,n){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var i=function(e,t){var n=0,i=t-e.mediaSequence,r=e.segments[i];if(r){if(void 0!==r.start)return{result:r.start,precise:!0};if(void 0!==r.end)return{result:r.end-r.duration,precise:!0}}for(;i--;){if(void 0!==(r=e.segments[i]).end)return{result:n+r.end,precise:!0};if(n+=r.duration,void 0!==r.start)return{result:n+r.start,precise:!0}}return{result:n,precise:!1}}(e,t);if(i.precise)return i.result;var r=function(e,t){for(var n,i=0,r=t-e.mediaSequence;r<e.segments.length;r++){if(void 0!==(n=e.segments[r]).start)return{result:n.start-i,precise:!0};if(i+=n.duration,void 0!==n.end)return{result:n.end-i,precise:!0}}return{result:-1,precise:!1}}(e,t);return r.precise?r.result:i.result+n},rs=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 r()[1/0]}return is(e,t,n)},as=function(e,t,n){var i=0;if(t>n){var r=[n,t];t=r[0],n=r[1]}if(t<0){for(var a=t;a<Math.min(0,n);a++)i+=e.targetDuration;t=0}for(var s=t;s<n;s++)i+=e.segments[s].duration;return i},ss=function(e,t){if(!e.segments.length)return 0;var n=e.segments.length,i=e.segments[n-1].duration||e.targetDuration,r="number"==typeof t?t:i+2*e.targetDuration;if(0===r)return n;for(var a=0;n--&&!((a+=e.segments[n].duration)>=r););return Math.max(0,n)},os=function(e,t,n,i){if(!e||!e.segments)return null;if(e.endList)return rs(e);if(null===t)return null;t=t||0;var r=n?ss(e,i):e.segments.length;return is(e,e.mediaSequence+r,t)},us=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},ls=function(e){return e.excludeUntil&&e.excludeUntil===1/0},cs=function(e){var t=us(e);return!e.disabled&&!t},hs=function(e,t){return t.attributes&&t.attributes[e]},ds=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!!cs(e)&&(e.attributes.BANDWIDTH||0)<n})).length},fs={duration:rs,seekable:function(e,t,n){var i=t||0,r=os(e,t,!0,n);return null===r?ns():ns(i,r)},safeLiveIndex:ss,getMediaInfoForTime:function(e,t,n,i){var r,a=e.segments.length,s=t-i;if(s<0){if(n>0)for(r=n-1;r>=0;r--)if((s+=e.segments[r].duration+Ya)>0)return{mediaIndex:r,startTime:i-as(e,n,r)};return{mediaIndex:0,startTime:t}}if(n<0){for(r=n;r<0;r++)if((s-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};n=0}for(r=n;r<a;r++)if((s-=e.segments[r].duration+Ya)<0)return{mediaIndex:r,startTime:i+as(e,n,r)};return{mediaIndex:a-1,startTime:t}},isEnabled:cs,isDisabled:function(e){return e.disabled},isBlacklisted:us,isIncompatible:ls,playlistEnd:os,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:hs,estimateSegmentRequestTime:function(e,t,n,i){return void 0===i&&(i=0),hs("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*i)/t:NaN},isLowestEnabledRendition:ds},ps=Pa.xhr,ms=Pa.mergeOptions,gs=function(e,t,n,i){var r="arraybuffer"===e.responseType?e.response:e.responseText;!t&&r&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=r.byteLength||r.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&&(r||e.responseText)))),i(t,e)},vs=function(){return function e(t,n){t=ms({timeout:45e3},t);var i=e.beforeRequest||Pa.Vhs.xhr.beforeRequest;if(i&&"function"==typeof i){var r=i(t);r&&(t=r)}var a=ps(t,(function(e,t){return gs(a,e,t,n)})),s=a.abort;return a.abort=function(){return a.aborted=!0,s.apply(a,arguments)},a.uri=t.uri,a.requestTime=Date.now(),a}},ys=function(e){var t,n,i={};return e.byterange&&(i.Range=(n=(t=e.byterange).offset+t.length-1,"bytes="+t.offset+"-"+n)),i},_s=function(e,t){return e.start(t)+"-"+e.end(t)},bs=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},Ts=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Ss=function(e){var t={};return Object.keys(e).forEach((function(n){var i=e[n];ArrayBuffer.isView(i)?t[n]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:t[n]=i})),t},ws=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Es=function(e){return e.resolvedUri},ks=function(e){for(var t=Array.prototype.slice.call(e),n=16,i="",r=0;r<t.length/n;r++)i+=t.slice(r*n,r*n+n).map(bs).join("")+" "+t.slice(r*n,r*n+n).map(Ts).join("")+"\n";return i},Cs=Object.freeze({__proto__:null,createTransferableMessage:Ss,initSegmentId:ws,segmentKeyId:Es,hexDump:ks,tagDump:function(e){var t=e.bytes;return ks(t)},textRanges:function(e){var t,n="";for(t=0;t<e.length;t++)n+=_s(e,t)+" ";return n}}),xs=function e(t){var n=t.programTime,i=t.playlist,r=t.retryCount,a=void 0===r?2:r,s=t.seekTo,o=t.pauseAfterSeek,u=void 0===o||o,l=t.tech,c=t.callback;if(!c)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!i||!s)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!i.endList&&!l.hasStarted_)return c({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}(i))return c({message:"programDateTime tags must be provided in the manifest "+i.resolvedUri});var h=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 i=t.segments[0];if(n<i.dateTimeObject)return null;for(var r=0;r<t.segments.length-1&&(i=t.segments[r],!(n<t.segments[r+1].dateTimeObject));r++);var a,s=t.segments[t.segments.length-1],o=s.dateTimeObject,u=s.videoTimingInfo?(a=s.videoTimingInfo).transmuxedPresentationEnd-a.transmuxedPresentationStart-a.transmuxerPrependedSeconds:s.duration+.25*s.duration;return n>new Date(o.getTime()+1e3*u)?null:(n>o&&(i=s),{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:fs.duration(t,t.mediaSequence+t.segments.indexOf(i)),type:i.videoTimingInfo?"accurate":"estimate"})}(n,i);if(!h)return c({message:n+" was not found in the stream"});var d=h.segment,f=function(e,t){var n,i;try{n=new Date(e),i=new Date(t)}catch(e){}var r=n.getTime();return(i.getTime()-r)/1e3}(d.dateTimeObject,n);if("estimate"===h.type)return 0===a?c({message:n+" is not buffered yet. Try again"}):(s(h.estimatedStart+f),void l.one("seeked",(function(){e({programTime:n,playlist:i,retryCount:a-1,seekTo:s,pauseAfterSeek:u,tech:l,callback:c})})));var p=d.start+f;l.one("seeked",(function(){return c(null,l.currentTime())})),u&&l.pause(),s(p)},As=function(e,t){if(4===e.readyState)return t()},Is=Pa.EventTarget,Os=Pa.mergeOptions,Ps=function(e){var t=e.byterange.offset+e.byterange.length-1;return e.uri+"-"+e.byterange.offset+"-"+t},Ls=function(e,t){var n,i,r={};for(var a in e){var s=e[a].sidx;if(s){var o=Ps(s);if(!t[o])break;n=t[o].sidxInfo,i=s,(Boolean(!n.map&&!i.map)||Boolean(n.map&&i.map&&n.map.byterange.offset===i.map.byterange.offset&&n.map.byterange.length===i.map.byterange.length))&&n.uri===i.uri&&n.byterange.offset===i.byterange.offset&&n.byterange.length===i.byterange.length&&(r[o]=t[o])}}return r},Ds=function(e){function t(t,n,i,r){var a;void 0===i&&(i={}),(a=e.call(this)||this).masterPlaylistLoader_=r||u(a),r||(a.isMaster_=!0);var s=i,o=s.withCredentials,l=void 0!==o&&o,c=s.handleManifestRedirects,h=void 0!==c&&c;if(a.vhs_=n,a.withCredentials=l,a.handleManifestRedirects=h,!t)throw new Error("A non-empty playlist URL or object is required");return a.on("minimumUpdatePeriod",(function(){a.refreshXml_()})),a.on("mediaupdatetimeout",(function(){a.refreshMedia_(a.media().id)})),a.state="HAVE_NOTHING",a.loadedPlaylists_={},a.isMaster_?(a.masterPlaylistLoader_.srcUrl=t,a.masterPlaylistLoader_.sidxMapping_={}):a.childPlaylist_=t,a}c(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 i=this,a=e.sidx&&Ps(e.sidx);if(e.sidx&&a&&!this.masterPlaylistLoader_.sidxMapping_[a]){var s=Na(this.handleManifestRedirects,e.sidx.resolvedUri),o=this.masterPlaylistLoader_.sidxMapping_;o[a]={sidxInfo:e.sidx};var u=function(r,s){if(!i.requestErrored_(r,s,t)){var u=me()((0,ve.Ki)(s.response).subarray(8));return o[a].sidx=u,fe(e,u,e.sidx.resolvedUri),n(!0)}};this.request=function(e,t,n){var i,r=[],a=!1,s=function(e,t,i,r){return t.abort(),a=!0,n(e,t,i,r)},o=function(e,t){if(!a){if(e)return s(e,t,"",r);var n=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=(0,ve.lx)(r,(0,ve.qX)(n,!0)),i=i||(0,ge.cc)(r),r.length<10||i&&r.length<i+2)return As(t,(function(){return s(e,t,"",r)}));var o=(0,ge.Xm)(r);return"ts"===o&&r.length<188||!o&&r.length<376?As(t,(function(){return s(e,t,"",r)})):s(null,t,o,r)}},u={uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){return t.total,t.loaded,gs(e,null,{statusCode:e.status},o)}))}},l=t(u,(function(e,t){return gs(l,e,t,o)}));return l}(s,this.vhs_.xhr,(function(t,n,r,a){if(t)return u(t,n);if(!r||"mp4"!==r)return u({status:n.status,message:"Unsupported "+(r||"unknown")+" container type for sidx segment at URL: "+s,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},n);var o=e.sidx.byterange,l=o.offset,c=o.length;if(a.length>=c+l)return u(t,{response:a.subarray(l,l+c),status:n.status,uri:n.uri});i.request=i.vhs_.xhr({uri:s,responseType:"arraybuffer",headers:ys({byterange:e.sidx.byterange})},u)}))}else this.mediaRequest_=r().setTimeout((function(){return n(!1)}),0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},r().clearTimeout(this.minimumUpdatePeriodTimeout_),r().clearTimeout(this.mediaRequest_),r().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 i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),this.trigger("mediachange")));i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,(function(i){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(),r().clearTimeout(this.mediaUpdateTimeout),r().clearTimeout(this.minimumUpdatePeriodTimeout_),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(e){var t=this;r().clearTimeout(this.mediaUpdateTimeout),r().clearTimeout(this.minimumUpdatePeriodTimeout_);var n=this.media();if(e){var i=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=r().setTimeout((function(){return t.load()}),i)}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_=r().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,i){if(!t.requestErrored_(n,i)){var r=i.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?t.masterLoaded_=Date.parse(i.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=Na(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,i),r?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(i,r)}))):e(i,r)}"HAVE_NOTHING"===t.state&&(t.started=!1)}))},n.syncClientServerClock_=function(e){var t,n=this,i=(t=this.masterPlaylistLoader_.masterXml_,function(e){var t=ne(e,"UTCTiming")[0];if(!t)return null;var n=se(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;default:throw new Error("UNSUPPORTED_UTC_TIMING_SCHEME")}return n}(he(t)));return null===i?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===i.method?(this.masterPlaylistLoader_.clientOffset_=i.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Ma(this.masterPlaylistLoader_.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials},(function(t,r){if(n.request){if(t)return n.masterPlaylistLoader_.clientOffset_=n.masterLoaded_-Date.now(),e();var a;a="HEAD"===i.method?r.responseHeaders&&r.responseHeaders.date?Date.parse(r.responseHeaders.date):n.masterLoaded_:Date.parse(r.responseText),n.masterPlaylistLoader_.clientOffset_=a-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,i=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_},n=de(e.masterXml,{manifestUri:t=e.srcUrl,clientOffset:e.clientOffset,sidxMapping:e.sidxMapping}),Ha(n,t),n),r=this.masterPlaylistLoader_.master;r&&(i=function(e,t,n){for(var i=!0,r=Os(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),a=0;a<t.playlists.length;a++){var s=t.playlists[a];if(s.sidx){var o=Ps(s.sidx);n&&n[o]&&fe(s,n[o].sidx,s.sidx.resolvedUri)}var u=Ga(r,s);u&&(r=u,i=!1)}return Fa(t,(function(e,t,n,a){if(e.playlists&&e.playlists.length){var s=e.playlists[0].id,o=Ga(r,e.playlists[0]);o&&((r=o).mediaGroups[t][n][a].playlists[0]=r.playlists[s],i=!1)}})),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(i=!1),i?null:r}(r,i,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=i||r;var a=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return a&&a!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=a),(!r||i&&r.minimumUpdatePeriod!==i.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(i)},n.updateMinimumUpdatePeriodTimeout_=function(){var e=this;r().clearTimeout(this.minimumUpdatePeriodTimeout_);var t=function t(n){e.minimumUpdatePeriodTimeout_=r().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 i,r,a;n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(i=e.masterPlaylistLoader_.master,r=e.masterPlaylistLoader_.sidxMapping_,a=Ls(i.playlists,r),Fa(i,(function(e,t,n,i){if(e.playlists&&e.playlists.length){var s=e.playlists;a=Os(a,Ls(s,r))}})),a),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,i=!this.media_||this.media_!==n[e];i?this.media_=n[e]:this.trigger("playlistunchanged"),this.media().endList||(this.mediaUpdateTimeout=r().setTimeout((function(){t.trigger("mediaupdatetimeout")}),Xa(this.media(),Boolean(i)))),this.trigger("loadedplaylist")},t}(Is),Rs={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},Ms=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},Ns=[],Us=function(e){var t=e.transmuxer,n=e.bytes,i=e.audioAppendStart,r=e.gopsToAlignWith,a=e.isPartial,s=e.remux,o=e.onData,u=e.onTrackInfo,l=e.onAudioTimingInfo,c=e.onVideoTimingInfo,h=e.onVideoSegmentTimingInfo,d=e.onAudioSegmentTimingInfo,f=e.onId3,p=e.onCaptions,m=e.onDone,g={isPartial:a,buffer:[]};if(t.onmessage=function(e){Ra&&("data"===e.data.action&&function(e,t,n){var i=e.data.segment,r=i.type,a=i.initSegment,s=i.captions,o=i.captionStreams,u=i.metadata,l=i.videoFrameDtsTime,c=i.videoFramePtsTime;t.buffer.push({captions:s,captionStreams:o,metadata:u});var h=e.data.segment.boxes||{data:e.data.segment.data},d={type:r,data:new Uint8Array(h.data,h.data.byteOffset,h.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};void 0!==l&&(d.videoFrameDtsTime=l),void 0!==c&&(d.videoFramePtsTime=c),n(d)}(e,g,o),"trackinfo"===e.data.action&&u(e.data.trackInfo),"gopInfo"===e.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(e,g),"audioTimingInfo"===e.data.action&&l(e.data.audioTimingInfo),"videoTimingInfo"===e.data.action&&c(e.data.videoTimingInfo),"videoSegmentTimingInfo"===e.data.action&&h(e.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===e.data.action&&d(e.data.audioSegmentTimingInfo),"id3Frame"===e.data.action&&f([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:g,callback:m}),js()))},i&&t.postMessage({action:"setAudioAppendStart",appendStart:i}),Array.isArray(r)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),void 0!==s&&t.postMessage({action:"setRemux",remux:s}),n.byteLength){var v=n instanceof ArrayBuffer?n:n.buffer,y=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:v,byteOffset:y,byteLength:n.byteLength},[v])}t.postMessage({action:a?"partialFlush":"flush"})},js=function(){Ra=null,Ns.length&&("function"==typeof(Ra=Ns.shift())?Ra():Us(Ra))},Bs=function(e,t){e.postMessage({action:t}),js()},Fs=function(e,t){if(!Ra)return Ra=e,void Bs(t,e);Ns.push(Bs.bind(null,t,e))},Vs=function(e){Fs("reset",e)},Hs=-101,Ws=-102,qs=function(e){e.forEach((function(e){e.abort()}))},zs=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Hs,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Ws,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:2,xhr:t}:null},Gs=function(e){var t=e.segment,n=e.bytes,i=e.isPartial,r=e.trackInfoFn,a=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,u=e.id3Fn,l=e.captionsFn,c=e.dataFn,h=e.doneFn,d=t.map&&t.map.tracks||{},f=Boolean(d.audio&&d.video),p=a.bind(null,t,"audio","start"),m=a.bind(null,t,"audio","end"),g=a.bind(null,t,"video","start"),v=a.bind(null,t,"video","end");if(!i&&!t.lastReachedChar){var y=function(e,t){var n=_e().inspect(e,t*be.ONE_SECOND_IN_TS);if(!n)return null;var i={hasVideo:n.video&&2===n.video.length||!1,hasAudio:n.audio&&2===n.audio.length||!1};return i.hasVideo&&(i.videoStart=n.video[0].ptsTime),i.hasAudio&&(i.audioStart=n.audio[0].ptsTime),i}(n,t.baseStartTime);y&&(r(t,{hasAudio:y.hasAudio,hasVideo:y.hasVideo,isMuxed:f}),r=null,y.hasAudio&&!f&&p(y.audioStart),y.hasVideo&&g(y.videoStart),p=null,g=null)}!function(e){if(!Ra)return Ra=e,void Us(e);Ns.push(e)}({bytes:n,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,isPartial:i,remux:f,onData:function(e){e.type="combined"===e.type?"video":e.type,c(t,e)},onTrackInfo:function(e){r&&(f&&(e.isMuxed=!0),r(t,e))},onAudioTimingInfo:function(e){p&&void 0!==e.start&&(p(e.start),p=null),m&&void 0!==e.end&&m(e.end)},onVideoTimingInfo:function(e){g&&void 0!==e.start&&(g(e.start),g=null),v&&void 0!==e.end&&v(e.end)},onVideoSegmentTimingInfo:function(e){s(e)},onAudioSegmentTimingInfo:function(e){o(e)},onId3:function(e,n){u(t,e,n)},onCaptions:function(e){l(t,[e])},onDone:function(e){h&&!i&&(e.type="combined"===e.type?"video":e.type,h(null,t,e))}})},Xs=function(e){var t=e.segment,n=e.bytes,i=e.isPartial,r=e.trackInfoFn,a=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,u=e.id3Fn,l=e.captionsFn,c=e.dataFn,h=e.doneFn,d=new Uint8Array(n);if((0,ge.cz)(d)){t.isFmp4=!0;var f=t.map.tracks,p={isFmp4:!0,hasVideo:!!f.video,hasAudio:!!f.audio};f.audio&&f.audio.codec&&"enca"!==f.audio.codec&&(p.audioCodec=f.audio.codec),f.video&&f.video.codec&&"encv"!==f.video.codec&&(p.videoCodec=f.video.codec),f.video&&f.audio&&(p.isMuxed=!0),r(t,p);var m=Se().startTime(t.map.timescales,d);p.hasAudio&&!p.isMuxed&&a(t,"audio","start",m),p.hasVideo&&a(t,"video","start",m);var g=function(e){c(t,{data:n,type:p.hasAudio&&!p.isMuxed?"audio":"video"}),e&&e.length&&l(t,e),h(null,t,{})};if(!f.video||!n.byteLength||!t.transmuxer)return void g();var v=n instanceof ArrayBuffer?n:n.buffer,y=n instanceof ArrayBuffer?0:n.byteOffset;return t.transmuxer.addEventListener("message",(function e(i){if("mp4Captions"===i.data.action){t.transmuxer.removeEventListener("message",e);var r=i.data.data;t.bytes=n=new Uint8Array(r,r.byteOffset||0,r.byteLength),g(i.data.captions)}})),void t.transmuxer.postMessage({action:"pushMp4Captions",timescales:t.map.timescales,trackIds:[f.video.id],data:v,byteOffset:y,byteLength:n.byteLength},[v])}if(t.transmuxer){if(void 0===t.container&&(t.container=(0,ge.Xm)(d)),"ts"!==t.container&&"aac"!==t.container)return r(t,{hasAudio:!1,hasVideo:!1}),void h(null,t,{});Gs({segment:t,bytes:n,isPartial:i,trackInfoFn:r,timingInfoFn:a,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,dataFn:c,doneFn:h})}else h(null,t,{})},Ks=function(e){var t=e.xhr,n=e.xhrOptions,i=e.decryptionWorker,r=e.segment,a=e.abortFn,s=e.progressFn,o=e.trackInfoFn,u=e.timingInfoFn,l=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,h=e.id3Fn,d=e.captionsFn,f=e.dataFn,p=e.doneFn,m=e.handlePartialData,g=[],v=function(e){var t=e.activeXhrs,n=e.decryptionWorker,i=e.trackInfoFn,r=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,l=e.dataFn,c=e.doneFn,h=0,d=!1;return function(e,f){if(!d){if(e)return d=!0,qs(t),c(e,f);if((h+=1)===t.length){if(f.endOfAllRequests=Date.now(),f.encryptedBytes)return function(e){var t,n=e.decryptionWorker,i=e.segment,r=e.trackInfoFn,a=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,u=e.id3Fn,l=e.captionsFn,c=e.dataFn,h=e.doneFn;n.addEventListener("message",(function e(t){if(t.data.source===i.requestId){n.removeEventListener("message",e);var d=t.data.decrypted;i.bytes=new Uint8Array(d.bytes,d.byteOffset,d.byteLength),Xs({segment:i,bytes:i.bytes,isPartial:!1,trackInfoFn:r,timingInfoFn:a,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,dataFn:c,doneFn:h})}})),t=i.key.bytes.slice?i.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(i.key.bytes)),n.postMessage(Ss({source:i.requestId,encrypted:i.encryptedBytes,key:t,iv:i.key.iv}),[i.encryptedBytes.buffer,t.buffer])}({decryptionWorker:n,segment:f,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,dataFn:l,doneFn:c});Xs({segment:f,bytes:f.bytes,isPartial:!1,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,dataFn:l,doneFn:c})}}}}({activeXhrs:g,decryptionWorker:i,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:h,captionsFn:d,dataFn:f,doneFn:p});if(r.key&&!r.key.bytes){var y=Pa.mergeOptions(n,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),_=function(e,t){return function(n,i){var r=i.response,a=zs(n,i);if(a)return t(a,e);if(16!==r.byteLength)return t({status:i.status,message:"Invalid HLS key at URL: "+i.uri,code:2,xhr:i},e);var s=new DataView(r);return e.key.bytes=new Uint32Array([s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)]),t(null,e)}}(r,v),b=t(y,_);g.push(b)}if(r.map&&!r.map.bytes){var T=Pa.mergeOptions(n,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:ys(r.map)}),S=function(e){var t=e.segment,n=e.finishProcessingFn;return function(e,i){var r=i.response,a=zs(e,i);if(a)return n(a,t);if(0===r.byteLength)return n({status:i.status,message:"Empty HLS segment content at URL: "+i.uri,code:2,xhr:i},t);t.map.bytes=new Uint8Array(i.response);var s=(0,ge.Xm)(t.map.bytes);return"mp4"!==s?n({status:i.status,message:"Found unsupported "+(s||"unknown")+" container for initialization segment at URL: "+i.uri,code:2,internal:!0,xhr:i},t):(Se().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:r,finishProcessingFn:v}),w=t(T,S);g.push(w)}var E=Pa.mergeOptions(n,{uri:r.resolvedUri,responseType:"arraybuffer",headers:ys(r)});m&&(E.responseType="text",E.beforeSend=function(e){e.overrideMimeType("text/plain; charset=x-user-defined")});var k=function(e){var t=e.segment,n=e.finishProcessingFn,i=e.responseType;return function(e,r){var a=r.response,s=zs(e,r);if(s)return n(s,t);var o="arraybuffer"!==i&&r.responseText?Ms(r.responseText.substring(t.lastReachedChar||0)):r.response;return 0===a.byteLength?n({status:r.status,message:"Empty HLS segment content at URL: "+r.uri,code:2,xhr:r},t):(t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(r),t.key?t.encryptedBytes=new Uint8Array(o):t.bytes=new Uint8Array(o),n(null,t))}}({segment:r,finishProcessingFn:v,responseType:E.responseType}),C=t(E,k);C.addEventListener("progress",function(e){var t=e.segment,n=e.progressFn,i=e.trackInfoFn,r=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,l=e.dataFn,c=e.handlePartialData;return function(e){var h=e.target;if(!h.aborted){if(c&&!t.key&&h.responseText&&h.responseText.length>=8){var d=Ms(h.responseText.substring(t.lastReachedChar||0));!t.lastReachedChar&&(0,ge.cz)(new Uint8Array(d))||(t.lastReachedChar=h.responseText.length,Xs({segment:t,bytes:d,isPartial:!0,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,dataFn:l}))}return t.stats=Pa.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)}}}({segment:r,progressFn:s,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:h,captionsFn:d,dataFn:f,handlePartialData:m})),g.push(C);var x={};return g.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:x,abortFn:a}))})),function(){return qs(g)}},Ys="undefined"!=typeof window?window:{},$s="undefined"==typeof Symbol?"__target":Symbol(),Qs=Ys.BlobBuilder||Ys.WebKitBlobBuilder||Ys.MozBlobBuilder||Ys.MSBlobBuilder,Js=Ys.URL||Ys.webkitURL||Js&&Js.msURL,Zs=Ys.Worker;function eo(e,t){return function(n){var i=this;if(!t)return new Zs(e);if(Zs&&!n){var r=ro(t.toString().replace(/^function.+?{/,"").slice(0,-1));return this[$s]=new Zs(r),function(e,t){if(e&&t){var n=e.terminate;e.objURL=t,e.terminate=function(){e.objURL&&Js.revokeObjectURL(e.objURL),n.call(e)}}}(this[$s],r),this[$s]}var a={postMessage:function(e){i.onmessage&&setTimeout((function(){i.onmessage({data:e,target:a})}))}};t.call(a),this.postMessage=function(e){setTimeout((function(){a.onmessage({data:e,target:i})}))},this.isThisThread=!0}}if(Zs){var to,no=ro("self.onmessage = function () {}"),io=new Uint8Array(1);try{(to=new Zs(no)).postMessage(io,[io.buffer])}catch(e){Zs=null}finally{Js.revokeObjectURL(no),to&&to.terminate()}}function ro(e){try{return Js.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(n){var t=new Qs;return t.append(e),Js.createObjectURL(t.getBlob(type))}}var ao=new eo("./transmuxer-worker.worker.js",(function(e,t){var n=this;!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 i;return!!e[t]&&(i=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(i,1),i>-1)},this.trigger=function(t){var n,i,r,a;if(n=e[t])if(2===arguments.length)for(r=n.length,i=0;i<r;++i)n[i].call(this,arguments[1]);else{for(a=[],i=arguments.length,i=1;i<arguments.length;++i)a.push(arguments[i]);for(r=n.length,i=0;i<r;++i)n[i].apply(this,a)}},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,i,r,a,s,o,u,l,c,h,d,f,p,m,g,v,y,_,b,T,S,w,E,k,C,x,A,I,O,P,L,D,R,M,N,U,j,B,F,V,H=e,W=Math.pow(2,32)-1;!function(){var e;if(w={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 w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);E=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),C=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),x=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]),A=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]),I={video:x,audio:A},L=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),P=new Uint8Array([0,0,0,0,0,0,0,0]),D=new Uint8Array([0,0,0,0,0,0,0,0]),R=D,M=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),N=D,O=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),t=function(e){var t,n,i=[],r=0;for(t=1;t<arguments.length;t++)i.push(arguments[t]);for(t=i.length;t--;)r+=i[t].byteLength;for(n=new Uint8Array(r+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,r=8;t<i.length;t++)n.set(i[t],r),r+=i[t].byteLength;return n},i=function(){return t(w.dinf,t(w.dref,L))},r=function(e){return t(w.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]))},g=function(e){return t(w.hdlr,I[e])},m=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(w.mdhd,n)},p=function(e){return t(w.mdia,m(e),g(e.type),o(e))},s=function(e){return t(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return t(w.minf,"video"===e.type?t(w.vmhd,O):t(w.smhd,P),i(),y(e))},u=function(e,n){for(var i=[],r=n.length;r--;)i[r]=b(n[r]);return t.apply(null,[w.moof,s(e)].concat(i))},l=function(e){for(var n=e.length,i=[];n--;)i[n]=d(e[n]);return t.apply(null,[w.moov,h(4294967295)].concat(i).concat(c(e)))},c=function(e){for(var n=e.length,i=[];n--;)i[n]=T(e[n]);return t.apply(null,[w.mvex].concat(i))},h=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(w.mvhd,n)},v=function(e){var n,i,r=e.samples||[],a=new Uint8Array(4+r.length);for(i=0;i<r.length;i++)n=r[i].flags,a[i+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t(w.sdtp,a)},y=function(e){return t(w.stbl,_(e),t(w.stts,N),t(w.stsc,R),t(w.stsz,M),t(w.stco,D))},_=function(e){return t(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?U(e):j(e))},U=function(e){var n,i,r=e.sps||[],a=e.pps||[],s=[],o=[];for(n=0;n<r.length;n++)s.push((65280&r[n].byteLength)>>>8),s.push(255&r[n].byteLength),s=s.concat(Array.prototype.slice.call(r[n]));for(n=0;n<a.length;n++)o.push((65280&a[n].byteLength)>>>8),o.push(255&a[n].byteLength),o=o.concat(Array.prototype.slice.call(a[n]));if(i=[w.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(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([r.length],s,[a.length],o))),t(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var u=e.sarRatio[0],l=e.sarRatio[1];i.push(t(w.pasp,new Uint8Array([(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u,(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l])))}return t.apply(null,i)},j=function(e){return t(w.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]),r(e))},f=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(w.tkhd,n)},b=function(e){var n,i,r,a,s,o;return n=t(w.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])),s=Math.floor(e.baseMediaDecodeTime/(W+1)),o=Math.floor(e.baseMediaDecodeTime%(W+1)),i=t(w.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),"audio"===e.type?(r=S(e,92),t(w.traf,n,i,r)):(a=v(e),r=S(e,a.length+92),t(w.traf,n,i,r,a))},d=function(e){return e.duration=e.duration||4294967295,t(w.trak,f(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(w.trex,n)},V=function(e,t){var n=0,i=0,r=0,a=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(i=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,n|i|r|a,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 i,r,a,s,o,u;for(n+=20+16*(s=e.samples||[]).length,a=V(s,n),(r=new Uint8Array(a.length+16*s.length)).set(a),i=a.length,u=0;u<s.length;u++)o=s[u],r[i++]=(4278190080&o.duration)>>>24,r[i++]=(16711680&o.duration)>>>16,r[i++]=(65280&o.duration)>>>8,r[i++]=255&o.duration,r[i++]=(4278190080&o.size)>>>24,r[i++]=(16711680&o.size)>>>16,r[i++]=(65280&o.size)>>>8,r[i++]=255&o.size,r[i++]=o.flags.isLeading<<2|o.flags.dependsOn,r[i++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,r[i++]=61440&o.flags.degradationPriority,r[i++]=15&o.flags.degradationPriority,r[i++]=(4278190080&o.compositionTimeOffset)>>>24,r[i++]=(16711680&o.compositionTimeOffset)>>>16,r[i++]=(65280&o.compositionTimeOffset)>>>8,r[i++]=255&o.compositionTimeOffset;return t(w.trun,r)},B=function(e,n){var i,r,a,s,o,u;for(n+=20+8*(s=e.samples||[]).length,a=V(s,n),(i=new Uint8Array(a.length+8*s.length)).set(a),r=a.length,u=0;u<s.length;u++)o=s[u],i[r++]=(4278190080&o.duration)>>>24,i[r++]=(16711680&o.duration)>>>16,i[r++]=(65280&o.duration)>>>8,i[r++]=255&o.duration,i[r++]=(4278190080&o.size)>>>24,i[r++]=(16711680&o.size)>>>16,i[r++]=(65280&o.size)>>>8,i[r++]=255&o.size;return t(w.trun,i)},S=function(e,t){return"audio"===e.type?B(e,t):F(e,t)},a=function(){return t(w.ftyp,E,k,E,C)};var q,z,G,X,K,Y,$,Q,J=function(e){return t(w.mdat,e)},Z=u,ee=function(e){var t,n=a(),i=l(e);return(t=new Uint8Array(n.byteLength+i.byteLength)).set(n),t.set(i,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,i=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,i.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(i.length&&(i.duration=n.dts-i.dts,r.byteLength+=i.byteLength,r.nalCount+=i.length,r.duration+=i.duration,r.push(i)),(i=[n]).byteLength=n.data.byteLength,i.pts=n.pts,i.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(i.keyFrame=!0),i.duration=n.dts-i.dts,i.byteLength+=n.data.byteLength,i.push(n));return r.length&&(!i.duration||i.duration<=0)&&(i.duration=r[r.length-1].duration),r.byteLength+=i.byteLength,r.nalCount+=i.length,r.duration+=i.duration,r.push(i),r},ie=function(e){var t,n,i=[],r=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(i.length&&(r.push(i),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration),(i=[n]).nalCount=n.length,i.byteLength=n.byteLength,i.pts=n.pts,i.dts=n.dts,i.duration=n.duration):(i.duration+=n.duration,i.nalCount+=n.length,i.byteLength+=n.byteLength,i.push(n));return r.length&&i.duration<=0&&(i.duration=r[r.length-1].duration),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration,r.push(i),r},re=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},ae=function(e,t){var n,i=[];return n=te(e,t||0),i.push(n),i},se=function(e){var t,n,i=0,r=e.byteLength,a=e.length,s=new Uint8Array(r+4*a),o=new DataView(s.buffer);for(t=0;t<e.length;t++)n=e[t],o.setUint32(i,n.data.byteLength),i+=4,s.set(n.data,i),i+=n.data.byteLength;return s},oe=[33,16,5,32,164,27],ue=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],le=function(e){for(var t=[];e--;)t.push(0);return t},ce=9e4;Y=function(e,t){return z(K(e,t))},$=function(e,t){return G(X(e),t)},Q=function(e,t,n){return X(n?e:e-t)};var he=ce,de=z=function(e){return e*ce},fe=(G=function(e,t){return e*t},X=function(e){return e/ce}),pe=(K=function(e,t){return e/t},Y),me=$,ge=Q,ve=function(e,t,n,i){var r,a,s,o,u,l=0,c=0,h=0;if(t.length&&(r=pe(e.baseMediaDecodeTime,e.samplerate),a=Math.ceil(he/(e.samplerate/1024)),n&&i&&(l=r-Math.max(n,i),h=(c=Math.floor(l/a))*a),!(c<1||h>45e3))){for((s=function(){if(!q){var e={96e3:[oe,[227,64],le(154),[56]],88200:[oe,[231],le(170),[56]],64e3:[oe,[248,192],le(240),[56]],48e3:[oe,[255,192],le(268),[55,148,128],le(54),[112]],44100:[oe,[255,192],le(268),[55,163,128],le(84),[112]],32e3:[oe,[255,192],le(268),[55,234],le(226),[112]],24e3:[oe,[255,192],le(268),[55,255,128],le(268),[111,112],le(126),[224]],16e3:[oe,[255,192],le(268),[55,255,128],le(268),[111,255],le(269),[223,108],le(195),[1,192]],12e3:[ue,le(268),[3,127,248],le(268),[6,255,240],le(268),[13,255,224],le(268),[27,253,128],le(259),[56]],11025:[ue,le(268),[3,127,248],le(268),[6,255,240],le(268),[13,255,224],le(268),[27,255,192],le(268),[55,175,128],le(108),[112]],8e3:[ue,le(268),[3,121,16],le(47),[7]]};t=e,q=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 q}()[e.samplerate])||(s=t[0].data),o=0;o<c;o++)u=t[0],t.splice(0,0,{data:s,dts:u.dts-a,pts:u.pts-a});return e.baseMediaDecodeTime-=Math.floor(me(h,e.samplerate)),h}},ye=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)})))},_e=function(e){var t,n,i=[];for(t=0;t<e.length;t++)n=e[t],i.push({size:n.data.byteLength,duration:1024});return i},be=function(e){var t,n,i=0,r=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],r.set(n.data,i),i+=n.data.byteLength;return r},Te=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},Se=function(e,t){var n,i=e.minSegmentDts;return t||(i-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=i,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/9e4,n=Math.floor(n)),n},we=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))},Ee=function e(){e.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new Re(0,0),new Re(0,1),new Re(1,0),new Re(1,1)],this.cc708Stream_=new Ie,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"))};(Ee.prototype=new H).push=function(e){var t,n,i;if("sei_rbsp"===e.nalUnitType&&(t=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},i=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)i+=255,t++;for(i+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!n.payload&&4===i){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){n.payloadType=i,n.payloadSize=r,n.payload=e.subarray(t,t+r);break}n.payload=void 0}t+=r,i=0,r=0}return n}(e.escapedRBSP)).payload&&4===t.payloadType&&(n=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)}(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));i=function(e,t){var n,i,r,a,s=[];if(!(64&t[0]))return s;for(i=31&t[0],n=0;n<i;n++)a={type:3&t[2+(r=3*n)],pts:e},4&t[r+2]&&(a.ccData=t[r+3]<<8|t[r+4],s.push(a));return s}(e.pts,n),this.captionPackets_=this.captionPackets_.concat(i),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Ee.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},Ee.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)},Ee.prototype.flush=function(){return this.flushStream("flush")},Ee.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Ee.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},Ee.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)},Ee.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},Ee.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},Ee.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},Ee.prototype.dispatchCea708Packet=function(e){this.cc708Stream_.push(e)};var ke={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},Ce=function(e){return 32<=e&&e<=127||160<=e&&e<=255},xe=function(e){this.windowNum=e,this.reset()};xe.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},xe.prototype.getText=function(){return this.rows.join("\n")},xe.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},xe.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--},xe.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},xe.prototype.addText=function(e){this.rows[this.rowIdx]+=e},xe.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Ae=function(e){this.serviceNum=e,this.text="",this.currentWindow=new xe(-1),this.windows=[]};Ae.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new xe(n),"function"==typeof t&&(this.windows[n].beforeRowOverflow=t)},Ae.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]};var Ie=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))}};Ie.prototype=new H,Ie.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Ie.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,i=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(i)},Ie.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,i=null,r=0,a=t[r++];for(e.seq=a>>6,e.sizeCode=63&a;r<t.length;r++)i=31&(a=t[r++]),7==(n=a>>5)&&i>0&&(n=a=t[r++]),this.pushServiceBlock(n,r,i),i>0&&(r+=i-1)},Ie.prototype.pushServiceBlock=function(e,t,n){var i,r=t,a=this.current708Packet.data,s=this.services[e];for(s||(s=this.initService(e,r));r<t+n&&r<a.length;r++)i=a[r],Ce(i)?r=this.handleText(r,s):16===i?r=this.extendedCommands(r,s):128<=i&&i<=135?r=this.setCurrentWindow(r,s):152<=i&&i<=159?r=this.defineWindow(r,s):136===i?r=this.clearWindows(r,s):140===i?r=this.deleteWindows(r,s):137===i?r=this.displayWindows(r,s):138===i?r=this.hideWindows(r,s):139===i?r=this.toggleWindows(r,s):151===i?r=this.setWindowAttributes(r,s):144===i?r=this.setPenAttributes(r,s):145===i?r=this.setPenColor(r,s):146===i?r=this.setPenLocation(r,s):143===i?s=this.reset(r,s):8===i?s.currentWindow.backspace():12===i?s.currentWindow.clearText():13===i?s.currentWindow.pendingNewLine=!0:14===i?s.currentWindow.clearText():141===i&&r++},Ie.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return Ce(n)&&(e=this.handleText(e,t,!0)),e},Ie.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Ie.prototype.initService=function(e,t){var n=this;return this.services[e]=new Ae(e),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Ie.prototype.handleText=function(e,t,n){var i,r,a=this.current708Packet.data[e],s=(r=ke[i=(n?4096:0)|a]||i,4096&i&&i===r?"":String.fromCharCode(r)),o=t.currentWindow;return o.pendingNewLine&&!o.isEmpty()&&o.newLine(this.getPts(e)),o.pendingNewLine=!1,o.addText(s),e},Ie.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},Ie.prototype.defineWindow=function(e,t){var n=this.current708Packet.data,i=n[e],r=7&i;t.setCurrentWindow(r);var a=t.currentWindow;return i=n[++e],a.visible=(32&i)>>5,a.rowLock=(16&i)>>4,a.columnLock=(8&i)>>3,a.priority=7&i,i=n[++e],a.relativePositioning=(128&i)>>7,a.anchorVertical=127&i,i=n[++e],a.anchorHorizontal=i,i=n[++e],a.anchorPoint=(240&i)>>4,a.rowCount=15&i,i=n[++e],a.columnCount=63&i,i=n[++e],a.windowStyle=(56&i)>>3,a.penStyle=7&i,a.virtualRowCount=a.rowCount+1,e},Ie.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.winAttr;return i=n[++e],r.fillOpacity=(192&i)>>6,r.fillRed=(48&i)>>4,r.fillGreen=(12&i)>>2,r.fillBlue=3&i,i=n[++e],r.borderType=(192&i)>>6,r.borderRed=(48&i)>>4,r.borderGreen=(12&i)>>2,r.borderBlue=3&i,i=n[++e],r.borderType+=(128&i)>>5,r.wordWrap=(64&i)>>6,r.printDirection=(48&i)>>4,r.scrollDirection=(12&i)>>2,r.justify=3&i,i=n[++e],r.effectSpeed=(240&i)>>4,r.effectDirection=(12&i)>>2,r.displayEffect=3&i,e},Ie.prototype.flushDisplayed=function(e,t){for(var n=[],i=0;i<8;i++)t.windows[i].visible&&!t.windows[i].isEmpty()&&n.push(t.windows[i].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},Ie.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)},Ie.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible=1);return e},Ie.prototype.hideWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible=0);return e},Ie.prototype.toggleWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible^=1);return e},Ie.prototype.clearWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&t.windows[r].clearText();return e},Ie.prototype.deleteWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&t.windows[r].reset();return e},Ie.prototype.setPenAttributes=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penAttr;return i=n[++e],r.textTag=(240&i)>>4,r.offset=(12&i)>>2,r.penSize=3&i,i=n[++e],r.italics=(128&i)>>7,r.underline=(64&i)>>6,r.edgeType=(56&i)>>3,r.fontStyle=7&i,e},Ie.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penColor;return i=n[++e],r.fgOpacity=(192&i)>>6,r.fgRed=(48&i)>>4,r.fgGreen=(12&i)>>2,r.fgBlue=3&i,i=n[++e],r.bgOpacity=(192&i)>>6,r.bgRed=(48&i)>>4,r.bgGreen=(12&i)>>2,r.bgBlue=3&i,i=n[++e],r.edgeRed=(48&i)>>4,r.edgeGreen=(12&i)>>2,r.edgeBlue=3&i,e},Ie.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,i=n[++e],r.row=15&i,i=n[++e],r.column=63&i,e},Ie.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var Oe={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},Pe=function(e){return null===e?"":(e=Oe[e]||e,String.fromCharCode(e))},Le=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],De=function(){for(var e=[],t=15;t--;)e.push("");return e},Re=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,i,r,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),i=t>>>8,r=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_=De();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=De();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=De()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(i,r))a=Pe((i=(3&i)<<8)|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(i,r))"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),a=Pe((i=(3&i)<<8)|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(i,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&r)&&this.addFormatting(e.pts,["i"]),1==(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(i,r))this.column_+=3&r;else if(this.isPAC(i,r)){var s=Le.indexOf(7968&t);"rollUp"===this.mode_&&(s-this.rollUpRows_+1<0&&(s=this.rollUpRows_-1),this.setRollUp(e.pts,s)),s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(i)&&(0===r&&(r=null),a=Pe(i),a+=Pe(r),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};Re.prototype=new H,Re.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_})},Re.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=De(),this.nonDisplayed_=De(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Re.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_},Re.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Re.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Re.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Re.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Re.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Re.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Re.prototype.isNormalChar=function(e){return e>=32&&e<=127},Re.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=De(),this.displayed_=De()),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},Re.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)},Re.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)}},Re.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},Re.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},Re.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_]=""},Re.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var Me={CaptionStream:Ee,Cea608Stream:Re,Cea708Stream:Ie},Ne={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ue="shared",je=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Be=function e(t){var n,i;e.prototype.init.call(this),this.type_=t||Ue,this.push=function(e){this.type_!==Ue&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=je(e.dts,i),e.pts=je(e.pts,i),n=e.dts,this.trigger("data",e))},this.flush=function(){i=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Be.prototype=new H;var Fe,Ve=Be,He=function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r},We=function(e,t,n){return decodeURIComponent(He(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=We(e.data,1,t),e.value=We(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=We(e.data,1,t),e.url=We(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(He(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};Fe=function(e){var t,n={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},i=0,r=[],a=0;if(Fe.prototype.init.call(this),this.dispatchType=Ne.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,s,o,u,l;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(a=0,r.length=0),0===r.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(r.push(e),a+=e.data.byteLength,1===r.length&&(i=qe(e.data.subarray(6,10)),i+=10),!(a<i)){for(t={data:new Uint8Array(i),frames:[],pts:r[0].pts,dts:r[0].dts},l=0;l<i;)t.data.set(r[0].data.subarray(0,i-l),l),l+=r[0].data.byteLength,a-=r[0].data.byteLength,r.shift();s=10,64&t.data[5]&&(s+=4,s+=qe(t.data.subarray(10,14)),i-=qe(t.data.subarray(16,20)));do{if((o=qe(t.data.subarray(s+4,s+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((u={id:String.fromCharCode(t.data[s],t.data[s+1],t.data[s+2],t.data[s+3]),data:t.data.subarray(s+10,s+o+10)}).key=u.id,ze[u.id]&&(ze[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){var c=u.data,h=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;h*=4,h+=3&c[7],u.timeStamp=h,void 0===t.pts&&void 0===t.dts&&(t.pts=u.timeStamp,t.dts=u.timeStamp),this.trigger("timestamp",u)}t.frames.push(u),s+=10,s+=o}while(s<i);this.trigger("data",t)}}},Fe.prototype=new H;var Ge,Xe,Ke,Ye=Fe,$e=Ve,Qe=188;(Ge=function(){var e=new Uint8Array(Qe),t=0;Ge.prototype.init.call(this),this.push=function(n){var i,r=0,a=Qe;for(t?((i=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),i.set(n,t),t=0):i=n;a<i.byteLength;)71!==i[r]||71!==i[a]?(r++,a++):(this.trigger("data",i.subarray(r,a)),r+=Qe,a+=Qe);r<i.byteLength&&(e.set(i.subarray(r),0),t=i.byteLength-r)},this.flush=function(){t===Qe&&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,Xe=function(){var e,t,n,i;Xe.prototype.init.call(this),i=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,i){var r=0;i.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===i.type?t(e.subarray(r),i):n(e.subarray(r),i)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],i.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=i.pmtPid},n=function(e,t){var n,r;if(1&e[5]){for(i.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,r=12+((15&e[10])<<8|e[11]);r<n;){var a=e[r],s=(31&e[r+1])<<8|e[r+2];a===Ne.H264_STREAM_TYPE&&null===i.programMapTable.video?i.programMapTable.video=s:a===Ne.ADTS_STREAM_TYPE&&null===i.programMapTable.audio?i.programMapTable.audio=s:a===Ne.METADATA_STREAM_TYPE&&(i.programMapTable["timed-metadata"][s]=a),r+=5+((15&e[r+3])<<8|e[r+4])}t.programMapTable=i.programMapTable}},this.push=function(t){var n={},i=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(i+=t[i]+1),0===n.pid)n.type="pat",e(t.subarray(i),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(i),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,n]):this.processPes_(t,i,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=Ne.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=Ne.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}},Xe.prototype=new H,Xe.STREAM_TYPES={h264:27,adts:15},Ke=function(){var e,t=this,n={data:[],size:0},i={data:[],size:0},r={data:[],size:0},a=function(e,n,i){var r,a,s=new Uint8Array(e.size),o={type:n},u=0,l=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,u=0;u<e.data.length;u++)a=e.data[u],s.set(a.data,l),l+=a.data.byteLength;var c,h,d;c=s,(h=o).packetLength=6+(c[4]<<8|c[5]),h.dataAlignmentIndicator=0!=(4&c[6]),192&(d=c[7])&&(h.pts=(14&c[9])<<27|(255&c[10])<<20|(254&c[11])<<12|(255&c[12])<<5|(254&c[13])>>>3,h.pts*=4,h.pts+=(6&c[13])>>>1,h.dts=h.pts,64&d&&(h.dts=(14&c[14])<<27|(255&c[15])<<20|(254&c[16])<<12|(255&c[17])<<5|(254&c[18])>>>3,h.dts*=4,h.dts+=(6&c[18])>>>1)),h.data=c.subarray(9+c[8]),r="video"===n||o.packetLength<=e.size,(i||r)&&(e.size=0,e.data.length=0),r&&t.trigger("data",o)}};Ke.prototype.init.call(this),this.push=function(s){({pat:function(){},pes:function(){var e,t;switch(s.streamType){case Ne.H264_STREAM_TYPE:e=n,t="video";break;case Ne.ADTS_STREAM_TYPE:e=i,t="audio";break;case Ne.METADATA_STREAM_TYPE:e=r,t="timed-metadata";break;default:return}s.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(s),e.size+=s.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(e=s.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)}})[s.type]()},this.reset=function(){n.size=0,n.data.length=0,i.size=0,i.data.length=0,this.trigger("reset")},this.flushStreams_=function(){a(n,"video"),a(i,"audio"),a(r,"timed-metadata")},this.flush=function(){this.flushStreams_(),this.trigger("done")}},Ke.prototype=new H;var Je={PAT_PID:0,MP2T_PACKET_LENGTH:Qe,TransportPacketStream:Ge,TransportParseStream:Xe,ElementaryStream:Ke,TimestampRolloverStream:$e,CaptionStream:Me.CaptionStream,Cea608Stream:Me.Cea608Stream,Cea708Stream:Me.Cea708Stream,MetadataStream:Ye};for(var Ze in Ne)Ne.hasOwnProperty(Ze)&&(Je[Ze]=Ne[Ze]);var et,tt=Je,nt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];et=function(e){var t,n=0;et.prototype.init.call(this),this.push=function(i){var r,a,s,o,u,l,c=0;if(e||(n=0),"audio"===i.type)for(t?(o=t,(t=new Uint8Array(o.byteLength+i.data.byteLength)).set(o),t.set(i.data,o.byteLength)):t=i.data;c+5<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(a=2*(1&~t[c+1]),r=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=9e4*(u=1024*(1+(3&t[c+6])))/nt[(60&t[c+2])>>>2],s=c+r,t.byteLength<s)return;if(this.trigger("data",{pts:i.pts+n*l,dts:i.dts+n*l,sampleCount:u,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:nt[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+a,s)}),n++,t.byteLength===s)return void(t=void 0);t=t.subarray(s)}else c++},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")}},et.prototype=new H;var it,rt,at,st=et,ot=function(e){var t=e.byteLength,n=0,i=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+i},this.loadWord=function(){var r=e.byteLength-t,a=new Uint8Array(4),s=Math.min(4,t);if(0===s)throw new Error("no bytes available");a.set(e.subarray(r,r+s)),n=new DataView(a.buffer).getUint32(0),i=8*s,t-=s},this.skipBits=function(e){var r;i>e?(n<<=e,i-=e):(e-=i,e-=8*(r=Math.floor(e/8)),t-=r,this.loadWord(),n<<=e,i-=e)},this.readBits=function(e){var r=Math.min(i,e),a=n>>>32-r;return(i-=r)>0?n<<=r:t>0&&this.loadWord(),(r=e-r)>0?a<<r|this.readBits(r):a},this.skipLeadingZeros=function(){var e;for(e=0;e<i;++e)if(0!=(n&2147483648>>>e))return n<<=e,i-=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()};rt=function(){var e,t,n=0;rt.prototype.init.call(this),this.push=function(i){var r;t?((r=new Uint8Array(t.byteLength+i.data.byteLength)).set(t),r.set(i.data,t.byteLength),t=r):t=i.data;for(var a=t.byteLength;n<a-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<a;)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<a);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")}},rt.prototype=new H,at={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},it=function(){var e,t,n,i,r,a,s,o=new rt;it.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,i=e.dts,o.push(e))},o.on("data",(function(s){var o={trackId:t,pts:n,dts:i,data:s};switch(31&s[0]){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=r(s.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=r(s.subarray(1)),o.config=a(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},s=function(e,t){var n,i=8,r=8;for(n=0;n<e;n++)0!==r&&(r=(i+t.readExpGolomb()+256)%256),i=0===r?i:r},r=function(e){for(var t,n,i=e.byteLength,r=[],a=1;a<i-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),n[a]=e[s];return n},a=function(e){var t,n,i,r,a,o,u,l,c,h,d,f,p,m=0,g=0,v=0,y=0,_=1;if(n=(t=new ot(e)).readUnsignedByte(),r=t.readUnsignedByte(),i=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),at[n]&&(3===(a=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(d=3!==a?8:12,p=0;p<d;p++)t.readBoolean()&&s(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),p=0;p<u;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(h=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:f=[1,1];break;case 2:f=[12,11];break;case 3:f=[10,11];break;case 4:f=[16,11];break;case 5:f=[40,33];break;case 6:f=[24,11];break;case 7:f=[20,11];break;case 8:f=[32,11];break;case 9:f=[80,33];break;case 10:f=[18,11];break;case 11:f=[15,11];break;case 12:f=[64,33];break;case 13:f=[160,99];break;case 14:f=[4,3];break;case 15:f=[3,2];break;case 16:f=[2,1];break;case 255:f=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}f&&(_=f[0]/f[1])}return{profileIdc:n,levelIdc:i,profileCompatibility:r,width:Math.ceil((16*(l+1)-2*m-2*g)*_),height:(2-h)*(c+1)*16-2*v-2*y,sarRatio:f}}},it.prototype=new H;var ut,lt={H264Stream:it,NalByteStream:rt},ct=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},ht=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+=ct(t,n))},dt=function(e){var t=ht(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},ft=ct,pt=function(e,t){var n=(224&e[t+5])>>5,i=e[t+4]<<3;return 6144&e[t+3]|i|n};(ut=function(){var e=new Uint8Array,t=0;ut.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var i,r,a,s,o=0,u=0;for(e.length?(s=e.length,(e=new Uint8Array(n.byteLength+s)).set(e.subarray(0,s)),e.set(n,s)):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+(o=pt(e,u))>e.length)break;a={type:"audio",data:e.subarray(u,u+o),pts:t,dts:t},this.trigger("data",a),u+=o}else{if(e.length-u<10)break;if(u+(o=ft(e,u))>e.length)break;r={type:"timed-metadata",data:e.subarray(u,u+o)},this.trigger("data",r),u+=o}i=e.length-u,e=i>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 mt,gt,vt,yt,_t=ut,bt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Tt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],St=lt.H264Stream,wt=dt,Et=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},kt=function(e,t,n,i,r,a){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(i-t),pts:e+(r-n)},prependedContentDuration:a,baseMediaDecodeTime:e}};gt=function(e,t){var n=[],i=0,r=0,a=0,s=1/0;t=t||{},gt.prototype.init.call(this),this.push=function(t){we(e,t),e&&bt.forEach((function(n){e[n]=t[n]})),n.push(t)},this.setEarliestDts=function(e){r=e},this.setVideoBaseMediaDecodeTime=function(e){s=e},this.setAudioAppendStart=function(e){a=e},this.flush=function(){var o,u,l,c,h,d,f;0!==n.length?(o=ye(n,e,r),e.baseMediaDecodeTime=Se(e,t.keepOriginalTimestamps),f=ve(e,o,a,s),e.samples=_e(o),l=J(be(o)),n=[],u=Z(i,[e]),c=new Uint8Array(u.byteLength+l.byteLength),i++,c.set(u),c.set(l,u.byteLength),Te(e),h=Math.ceil(9216e4/e.samplerate),o.length&&(d=o.length*h,this.trigger("segmentTimingInfo",kt(pe(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+d,o[0].pts+d,f||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+d})),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){Te(e),n=[],this.trigger("reset")}},gt.prototype=new H,mt=function(e,t){var n,i,r=0,a=[],s=[];t=t||{},mt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){we(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],Tt.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.data,e.pps=[t.data]),a.push(t)},this.flush=function(){for(var n,i,o,u,l,c,h,d,f=0;a.length&&"access_unit_delimiter_rbsp"!==a[0].nalUnitType;)a.shift();if(0===a.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=ne(a),(o=ie(n))[0][0].keyFrame||((i=this.getGopForFusion_(a[0],e))?(f=i.duration,o.unshift(i),o.byteLength+=i.byteLength,o.nalCount+=i.nalCount,o.pts=i.pts,o.dts=i.dts,o.duration+=i.duration):o=re(o)),s.length){var p;if(!(p=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Te(e),o=p}we(e,o),e.samples=function(e,t){var n,i,r,a,s,o=t||0,u=[];for(n=0;n<e.length;n++)for(a=e[n],i=0;i<a.length;i++)s=a[i],o+=(r=te(s,o)).size,u.push(r);return u}(o),l=J(function(e){var t,n,i,r,a,s,o=0,u=e.byteLength,l=e.nalCount,c=new Uint8Array(u+4*l),h=new DataView(c.buffer);for(t=0;t<e.length;t++)for(r=e[t],n=0;n<r.length;n++)for(a=r[n],i=0;i<a.length;i++)s=a[i],h.setUint32(o,s.data.byteLength),o+=4,c.set(s.data,o),o+=s.data.byteLength;return c}(o)),e.baseMediaDecodeTime=Se(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),h=o[0],d=o[o.length-1],this.trigger("segmentTimingInfo",kt(e.baseMediaDecodeTime,h.dts,h.pts,d.dts+d.duration,d.pts+d.duration,f)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=Z(r,[e]),c=new Uint8Array(u.byteLength+l.byteLength),r++,c.set(u),c.set(l,u.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),a=[],this.gopCache_.length=0,s.length=0,this.trigger("reset")},this.resetStream_=function(){Te(e),n=void 0,i=void 0},this.getGopForFusion_=function(t){var n,i,r,a,s,o=1/0;for(s=0;s<this.gopCache_.length;s++)r=(a=this.gopCache_[s]).gop,e.pps&&Et(e.pps[0],a.pps[0])&&e.sps&&Et(e.sps[0],a.sps[0])&&(r.dts<e.timelineStartInfo.dts||(n=t.dts-r.dts-r.duration)>=-1e4&&n<=45e3&&(!i||o>n)&&(i=a,o=n));return i?i.gop:null},this.alignGopsAtStart_=function(e){var t,n,i,r,a,o,u,l;for(a=e.byteLength,o=e.nalCount,u=e.duration,t=n=0;t<s.length&&n<e.length&&(i=s[t],r=e[n],i.pts!==r.pts);)r.pts>i.pts?t++:(n++,a-=r.byteLength,o-=r.nalCount,u-=r.duration);return 0===n?e:n===e.length?null:((l=e.slice(n)).byteLength=a,l.duration=u,l.nalCount=o,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){var t,n,i,r,a,o,u;for(t=s.length-1,n=e.length-1,a=null,o=!1;t>=0&&n>=0;){if(i=s[t],r=e[n],i.pts===r.pts){o=!0;break}i.pts>r.pts?t--:(t===s.length-1&&(a=n),n--)}if(!o&&null===a)return null;if(0===(u=o?n:a))return e;var l=e.slice(u),c=l.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 l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){s=e}},mt.prototype=new H,yt=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,yt.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))))}},yt.prototype=new H,yt.prototype.flush=function(e){var t,n,i,r,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=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?(o=this.videoTrack.timelineStartInfo.pts,Tt.forEach((function(e){s.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,bt.forEach((function(e){s.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,i=ee(this.pendingTracks),s.initSegment=new Uint8Array(i.byteLength),s.initSegment.set(i),s.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)s.data.set(this.pendingBoxes[r],a),a+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(t=this.pendingCaptions[r]).startTime=ge(t.startPts,o,this.keepOriginalTimestamps),t.endTime=ge(t.endPts,o,this.keepOriginalTimestamps),s.captionStreams[t.stream]=!0,s.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)(n=this.pendingMetadata[r]).cueTime=ge(n.pts,o,this.keepOriginalTimestamps),s.metadata.push(n);for(s.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",s),r=0;r<s.captions.length;r++)t=s.captions[r],this.trigger("caption",t);for(r=0;r<s.metadata.length;r++)n=s.metadata[r],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},yt.prototype.setRemux=function(e){this.remuxTracks=e},vt=function(e){var t,n,i=this,r=!0;vt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="aac",r.metadataStream=new tt.MetadataStream,r.aacStream=new _t,r.audioTimestampRolloverStream=new tt.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=new tt.TimestampRolloverStream("timed-metadata"),r.adtsStream=new st,r.coalesceStream=new yt(e,r.metadataStream),r.headOfPipeline=r.aacStream,r.aacStream.pipe(r.audioTimestampRolloverStream).pipe(r.adtsStream),r.aacStream.pipe(r.timedMetadataTimestampRolloverStream).pipe(r.metadataStream).pipe(r.coalesceStream),r.metadataStream.on("timestamp",(function(e){r.aacStream.setTimestamp(e.timeStamp)})),r.aacStream.on("data",(function(a){"timed-metadata"!==a.type&&"audio"!==a.type||r.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:i.baseMediaDecodeTime},codec:"adts",type:"audio"},r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new gt(n,e),r.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream),i.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=new tt.MetadataStream,r.packetStream=new tt.TransportPacketStream,r.parseStream=new tt.TransportParseStream,r.elementaryStream=new tt.ElementaryStream,r.timestampRolloverStream=new tt.TimestampRolloverStream,r.adtsStream=new st,r.h264Stream=new St,r.captionStream=new tt.CaptionStream,r.coalesceStream=new yt(e,r.metadataStream),r.headOfPipeline=r.packetStream,r.packetStream.pipe(r.parseStream).pipe(r.elementaryStream).pipe(r.timestampRolloverStream),r.timestampRolloverStream.pipe(r.h264Stream),r.timestampRolloverStream.pipe(r.adtsStream),r.timestampRolloverStream.pipe(r.metadataStream).pipe(r.coalesceStream),r.h264Stream.pipe(r.captionStream).pipe(r.coalesceStream),r.elementaryStream.on("data",(function(a){var s;if("metadata"===a.type){for(s=a.tracks.length;s--;)t||"video"!==a.tracks[s].type?n||"audio"!==a.tracks[s].type||((n=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime):(t=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime;t&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=new mt(t,e),r.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,r.audioSegmentStream.setEarliestDts(t.dts-i.baseMediaDecodeTime))})),r.videoSegmentStream.on("processedGopsInfo",i.trigger.bind(i,"gopInfo")),r.videoSegmentStream.on("segmentTimingInfo",i.trigger.bind(i,"videoSegmentTimingInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),r.videoSegmentStream.on("timingInfo",i.trigger.bind(i,"videoTimingInfo")),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),n&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new gt(n,e),r.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo")),r.audioSegmentStream.on("segmentTimingInfo",i.trigger.bind(i,"audioSegmentTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream)),i.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("id3Frame",(function(e){e.dispatchType=r.metadataStream.dispatchType,i.trigger("id3Frame",e)})),r.coalesceStream.on("caption",this.trigger.bind(this,"caption")),r.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(i){var r=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=i),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,Te(n),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Te(t),r.captionStream.reset()),r.timestampRolloverStream&&r.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(r){var t=wt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),r=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){r=!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()}},vt.prototype=new H;var Ct={Transmuxer:vt,VideoSegmentStream:mt,AudioSegmentStream:gt,AUDIO_PROPERTIES:bt,VIDEO_PROPERTIES:Tt,generateSegmentTimingInfo:kt},xt={Adts:st,h264:lt},At=function e(t,n){var i=[],r=0,a=0,s=0,o=1/0,u=null,l=null;n=n||{},e.prototype.init.call(this),this.push=function(e){we(t,e),t&&bt.forEach((function(n){t[n]=e[n]})),i.push(e)},this.setEarliestDts=function(e){a=e},this.setVideoBaseMediaDecodeTime=function(e){o=e},this.setAudioAppendStart=function(e){s=e},this.processFrames_=function(){var e,c,h,d,f;0!==i.length&&0!==(e=ye(i,t,a)).length&&(t.baseMediaDecodeTime=Se(t,n.keepOriginalTimestamps),ve(t,e,s,o),t.samples=_e(e),h=J(be(e)),i=[],c=Z(r,[t]),r++,t.initSegment=ee([t]),(d=new Uint8Array(c.byteLength+h.byteLength)).set(c),d.set(h,c.byteLength),Te(t),null===u&&(l=u=e[0].pts),l+=e.length*(9216e4/t.samplerate),f={start:u},this.trigger("timingInfo",f),this.trigger("data",{track:t,boxes:d}))},this.flush=function(){this.processFrames_(),this.trigger("timingInfo",{start:u,end:l}),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(){Te(t),u=null,l=null},this.reset=function(){this.resetTiming_(),i=[],this.trigger("reset")}};At.prototype=new H;var It=At,Ot=function e(t,n){var i,r,a,s=0,o=[],u=[],l=null,c=null,h=!0;n=n||{},e.prototype.init.call(this),this.push=function(e){we(t,e),void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),"seq_parameter_set_rbsp"!==e.nalUnitType||i||(i=e.config,t.sps=[e.data],Tt.forEach((function(e){t[e]=i[e]}),this)),"pic_parameter_set_rbsp"!==e.nalUnitType||r||(r=e.data,t.pps=[e.data]),o.push(e)},this.processNals_=function(e){var i;for(o=u.concat(o);o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift();if(0!==o.length){var r=ne(o);if(r.length)if(u=r[r.length-1],e&&(r.pop(),r.duration-=u.duration,r.nalCount-=u.length,r.byteLength-=u.byteLength),r.length){if(this.trigger("timelineStartInfo",t.timelineStartInfo),h){if(!(a=ie(r))[0][0].keyFrame){if(!(a=re(a))[0][0].keyFrame)return o=[].concat.apply([],r).concat(u),void(u=[]);(r=[].concat.apply([],a)).duration=a.duration}h=!1}for(null===l&&(l=r[0].pts,c=l),c+=r.duration,this.trigger("timingInfo",{start:l,end:c}),i=0;i<r.length;i++){var d=r[i];t.samples=ae(d);var f=J(se(d));Te(t),we(t,d),t.baseMediaDecodeTime=Se(t,n.keepOriginalTimestamps);var p=Z(s,[t]);s++,t.initSegment=ee([t]);var m=new Uint8Array(p.byteLength+f.byteLength);m.set(p),m.set(f,p.byteLength),this.trigger("data",{track:t,boxes:m,sequence:s,videoFrameDts:d.dts,videoFramePts:d.pts})}o=[]}else o=[]}},this.resetTimingAndConfig_=function(){i=void 0,r=void 0,l=null,c=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=[],o=[],h=!0,this.trigger("reset")}};Ot.prototype=new H;var Pt=Ot,Lt=dt,Dt=function(e){return e.prototype=new H,e.prototype.init.call(e),e},Rt=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=fe(n.pts),t.trigger("id3Frame",n)})),e.on("caption",(function(e){t.trigger("caption",e)}))},Mt=function e(t){var n=null,i=!0;t=t||{},e.prototype.init.call(this),t.baseMediaDecodeTime=t.baseMediaDecodeTime||0,this.push=function(e){if(i){var r=Lt(e);!r||n&&"aac"===n.type?r||n&&"ts"===n.type||(n=function(e){var t={type:"ts",tracks:{audio:null,video:null},packet:new tt.TransportPacketStream,parse:new tt.TransportParseStream,elementary:new tt.ElementaryStream,timestampRollover:new tt.TimestampRolloverStream,adts:new xt.Adts,h264:new xt.h264.H264Stream,captionStream:new tt.CaptionStream,metadataStream:new tt.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 i=0;i<n.tracks.length;i++)t.tracks[n.tracks[i].type]||(t.tracks[n.tracks[i].type]=n.tracks[i],t.tracks[n.tracks[i].type].timelineStartInfo.baseMediaDecodeTime=e.baseMediaDecodeTime);t.tracks.video&&!t.videoSegmentStream&&(t.videoSegmentStream=new Pt(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 It(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 i;i=t.tracks.video&&t.tracks.video.timelineStartInfo.pts||0,n.startTime=ge(n.startPts,i,e.keepOriginalTimestamps),n.endTime=ge(n.endPts,i,e.keepOriginalTimestamps),t.trigger("caption",n)})),(t=Dt(t)).metadataStream.on("data",t.trigger.bind(t,"id3Frame")),t}(t),Rt(n,this)):(n=function(e){var t={type:"aac",tracks:{audio:null},metadataStream:new tt.MetadataStream,aacStream:new _t,audioRollover:new tt.TimestampRolloverStream("audio"),timedMetadataRollover:new tt.TimestampRolloverStream("timed-metadata"),adtsStream:new st(!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 It(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=Dt(t)).metadataStream.on("data",t.trigger.bind(t,"id3Frame")),t}(t),Rt(n,this)),i=!1}n.headOfPipeline.push(e)},this.flush=function(){n&&(i=!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,Te(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,Te(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){}};Mt.prototype=new H;var Nt=Mt,Ut=function(e){return e>>>0},jt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),(t+=String.fromCharCode(e[2]))+String.fromCharCode(e[3])},Bt=Ut,Ft=function e(t,n){var i,r,a,s,o,u=[];if(!n.length)return null;for(i=0;i<t.byteLength;)r=Bt(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3]),a=jt(t.subarray(i+4,i+8)),s=r>1?i+r:t.byteLength,a===n[0]&&(1===n.length?u.push(t.subarray(i+8,s)):(o=e(t.subarray(i+8,s),n.slice(1))).length&&(u=u.concat(o))),i=s;return u},Vt=Ut,Ht=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]}},Wt=function(e){for(var t,n,i=e.byteLength,r=[],a=1;a<i-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),n[a]=e[s];return n},qt=Me.CaptionStream,zt=function(e,t){for(var n=e,i=0;i<t.length;i++){var r=t[i];if(n<r.size)return r;n-=r.size}return null},Gt=function(e,t){var n=Ft(e,["moof","traf"]),i=Ft(e,["mdat"]),r={},a=[];return i.forEach((function(e,t){var i=n[t];a.push({mdat:e,traf:i})})),a.forEach((function(e){var n,i,a=e.mdat,s=e.traf,o=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},r=1&i.flags[2],a=2&i.flags[2],s=8&i.flags[2],o=16&i.flags[2],u=32&i.flags[2],l=65536&i.flags[0],c=131072&i.flags[0];return t=8,r&&(t+=4,i.baseDataOffset=n.getUint32(12),t+=4),a&&(i.sampleDescriptionIndex=n.getUint32(t),t+=4),s&&(i.defaultSampleDuration=n.getUint32(t),t+=4),o&&(i.defaultSampleSize=n.getUint32(t),t+=4),u&&(i.defaultSampleFlags=n.getUint32(t)),l&&(i.durationIsEmpty=!0),!r&&c&&(i.baseDataOffsetIsMoof=!0),i}(Ft(s,["tfhd"])[0]),u=o.trackId,l=Ft(s,["tfdt"]),c=l.length>0?function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:Vt(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=Vt(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t}(l[0]).baseMediaDecodeTime:0,h=Ft(s,["trun"]);t===u&&h.length>0&&(n=function(e,t,n){var i=t,r=n.defaultSampleDuration||0,a=n.defaultSampleSize||0,s=n.trackId,o=[];return e.forEach((function(e){var t=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),r=1&n.flags[2],a=4&n.flags[2],s=1&n.flags[1],o=2&n.flags[1],u=4&n.flags[1],l=8&n.flags[1],c=i.getUint32(4),h=8;for(r&&(n.dataOffset=i.getInt32(h),h+=4),a&&c&&(t={flags:Ht(e.subarray(h,h+4))},h+=4,s&&(t.duration=i.getUint32(h),h+=4),o&&(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),c--);c--;)t={},s&&(t.duration=i.getUint32(h),h+=4),o&&(t.size=i.getUint32(h),h+=4),u&&(t.flags=Ht(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}(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=a),e.trackId=s,e.dts=i,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=i+e.compositionTimeOffset,i+=e.duration})),o=o.concat(t)})),o}(h,c,o),i=function(e,t,n){var i,r,a,s,o=new DataView(e.buffer,e.byteOffset,e.byteLength),u=[];for(r=0;r+4<e.length;r+=a)if(a=o.getUint32(r),r+=4,!(a<=0))switch(31&e[r]){case 6:var l=e.subarray(r+1,r+1+a),c=zt(r,t);if(i={nalUnitType:"sei_rbsp",size:a,data:l,escapedRBSP:Wt(l),trackId:n},c)i.pts=c.pts,i.dts=c.dts,s=c;else{if(!s){console.log("We've encountered a nal unit without data. See mux.js#233.");break}i.pts=s.pts,i.dts=s.dts}u.push(i)}return u}(a,n,u),r[u]||(r[u]=[]),r[u]=r[u].concat(i))})),r},Xt=function(){var e,t,n,i,r,a,s=!1;this.isInitialized=function(){return s},this.init=function(t){e=new qt,s=!0,a=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/i,e.endTime=e.endPts/i,r.captions.push(e),r.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]&&i===t[n])},this.parse=function(e,a,s){var o;if(!this.isInitialized())return null;if(!a||!s)return null;if(this.isNewInit(a,s))n=a[0],i=s[n];else if(null===n||!i)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,a,s)}return o=function(e,t,n){return null===t?null:{seiNals:Gt(e,t)[t],timescale:n}}(e,n,i),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),r):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;a?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){r.captions=[],r.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,i=null,r?this.clearParsedCaptions():r={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()},Kt=function(e){return"AudioSegmentStream"===e?"audio":"VideoSegmentStream"===e?"video":""},Yt=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 Nt(this.options):new Ct.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},i={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&&(i.videoFrameDtsTime=fe(t.data.videoFrameDts)),void 0!==t.data.videoFramePts&&(i.videoFramePtsTime=fe(t.data.videoFramePts)),e.postMessage({action:"data",segment:i},[i.boxes.data,i.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:Kt(t)})})),t.on("partialdone",(function(t){e.postMessage({action:"partialdone",type:Kt(t)})})),t.on("endedsegment",(function(t){e.postMessage({action:"endedSegment",type:Kt(t)})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){if(null!==t.start){var n={start:fe(t.start)};t.end&&(n.end=fe(t.end)),e.postMessage({action:"audioTimingInfo",audioTimingInfo:n})}else e.postMessage({action:"audioTimingInfo",audioTimingInfo:t})})),t.on("videoTimingInfo",(function(t){var n={start:fe(t.start)};t.end&&(n.end=fe(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 i=t.data;t.data=i.buffer,e.postMessage({action:"data",segment:t,byteOffset:i.byteOffset,byteLength:i.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:fe(t.start.dts),presentation:fe(t.start.pts)},end:{decode:fe(t.end.dts),presentation:fe(t.end.pts)},baseMediaDecodeTime:fe(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=fe(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){var n={start:{decode:fe(t.start.dts),presentation:fe(t.start.pts)},end:{decode:fe(t.end.dts),presentation:fe(t.end.pts)},baseMediaDecodeTime:fe(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=fe(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:fe(t.start),end:fe(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:fe(t.start),end:fe(t.end)}})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new Xt,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(de(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(de(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 Yt(e,t.data.options):(this.messageHandlers||(this.messageHandlers=new Yt(e)),t.data&&t.data.action&&"init"!==t.data.action&&this.messageHandlers[t.data.action]&&this.messageHandlers[t.data.action](t.data))}}(n)}()})),so=function(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},oo=function(e,t){var n=t.attributes||{},i=function(e){var t=e.attributes||{};if(t.CODECS)return(0,we.kS)(t.CODECS)}(t)||{};if(so(e,t)&&!i.audio&&!function(e,t){if(!so(e,t))return!0;var n=t.attributes||{},i=e.mediaGroups.AUDIO[n.AUDIO];for(var r in i)if(!i[r].uri&&!i[r].playlists)return!0;return!1}(e,t)){var r=(0,we.Jg)(e,n.AUDIO);r&&(i.audio=r.audio)}var a={};return i.video&&(a.video=(0,we.ws)(""+i.video.type+i.video.details)),i.audio&&(a.audio=(0,we.ws)(""+i.audio.type+i.audio.details)),i.text&&(a.text=i.text.type),i.unknown&&(a.unknown=i.unknown),a},uo=function(e){return Pa.log.debug?Pa.log.debug.bind(Pa,"VHS:",e+" >"):function(){}},lo=uo("PlaylistSelector"),co=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||""})}},ho=function(e,t){if(!e)return"";var n=r().getComputedStyle(e);return n?n[t]:""},fo=function(e,t){var n=e.slice();e.sort((function(e,i){var r=t(e,i);return 0===r?n.indexOf(e)-n.indexOf(i):r}))},po=function(e,t){var n,i;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||r().Number.MAX_VALUE,t.attributes.BANDWIDTH&&(i=t.attributes.BANDWIDTH),n-(i||r().Number.MAX_VALUE)},mo=function(e,t,n,i,a){if(e){var s={bandwidth:t,width:n,height:i,limitRenditionByPlayerDimensions:a},o=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||r().Number.MAX_VALUE,width:t,height:n,playlist:e}}));fo(o,(function(e,t){return e.bandwidth-t.bandwidth}));var u=(o=o.filter((function(e){return!fs.isIncompatible(e.playlist)}))).filter((function(e){return fs.isEnabled(e.playlist)}));u.length||(u=o.filter((function(e){return!fs.isDisabled(e.playlist)})));var l=u.filter((function(e){return e.bandwidth*Rs.BANDWIDTH_VARIANCE<t})),c=l[l.length-1],h=l.filter((function(e){return e.bandwidth===c.bandwidth}))[0];if(!1===a){var d=h||u[0]||o[0];if(d&&d.playlist){var f="sortedPlaylistReps";return h&&(f="bandwidthBestRep"),u[0]&&(f="enabledPlaylistReps"),lo("choosing "+co(d)+" using "+f+" with options",s),d.playlist}return lo("could not choose a playlist with options",s),null}var p=l.filter((function(e){return e.width&&e.height}));fo(p,(function(e,t){return e.width-t.width}));var m=p.filter((function(e){return e.width===n&&e.height===i}));c=m[m.length-1];var g,v,y,_=m.filter((function(e){return e.bandwidth===c.bandwidth}))[0];_||(v=(g=p.filter((function(e){return e.width>n||e.height>i}))).filter((function(e){return e.width===g[0].width&&e.height===g[0].height})),c=v[v.length-1],y=v.filter((function(e){return e.bandwidth===c.bandwidth}))[0]);var b=y||_||h||u[0]||o[0];if(b&&b.playlist){var T="sortedPlaylistReps";return y?T="resolutionPlusOneRep":_?T="resolutionBestRep":h?T="bandwidthBestRep":u[0]&&(T="enabledPlaylistReps"),lo("choosing "+co(b)+" using "+T+" with options",s),b.playlist}return lo("could not choose a playlist with options",s),null}},go=function(){var e=this.useDevicePixelRatio&&r().devicePixelRatio||1;return mo(this.playlists.master,this.systemBandwidth,parseInt(ho(this.tech_.el(),"width"),10)*e,parseInt(ho(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions)},vo=function(e,t,n){var i,r;if(n&&n.cues)for(i=n.cues.length;i--;)(r=n.cues[i]).startTime>=e&&r.endTime<=t&&n.removeCue(r)},yo=function(e){return"number"==typeof e&&isFinite(e)},_o=1/60,bo=function(e){return e+"TimingInfo"},To=function(e){var t=e.segmentTimeline,n=e.currentTimeline,i=e.startOfSegment,r=e.buffered;return e.overrideCheck||t!==n?t<n?i:r.length?r.end(r.length-1):i:null},So=function(e){var t=e.timelineChangeController,n=e.currentTimeline,i=e.segmentTimeline,r=e.loaderType,a=e.audioDisabled;if(n===i)return!1;if("audio"===r){var s=t.lastTimelineChange({type:"main"});return!s||s.to!==i}if("main"===r&&a){var o=t.pendingTimelineChange({type:"audio"});return!o||o.to!==i}return!1},wo=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+Ya},Eo=function(e){function t(t,n){var i;if(i=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 i.bandwidth=t.bandwidth,i.throughput={rate:0,count:0},i.roundTrip=NaN,i.resetStats_(),i.mediaIndex=null,i.hasPlayed_=t.hasPlayed,i.currentTime_=t.currentTime,i.seekable_=t.seekable,i.seeking_=t.seeking,i.duration_=t.duration,i.mediaSource_=t.mediaSource,i.vhs_=t.vhs,i.loaderType_=t.loaderType,i.currentMediaInfo_=void 0,i.startingMediaInfo_=void 0,i.segmentMetadataTrack_=t.segmentMetadataTrack,i.goalBufferLength_=t.goalBufferLength,i.sourceType_=t.sourceType,i.sourceUpdater_=t.sourceUpdater,i.inbandTextTracks_=t.inbandTextTracks,i.state_="INIT",i.handlePartialData_=t.handlePartialData,i.timelineChangeController_=t.timelineChangeController,i.shouldSaveSegmentTimingInfo_=!0,i.checkBufferTimeout_=null,i.error_=void 0,i.currentTimeline_=-1,i.pendingSegment_=null,i.xhrOptions_=null,i.pendingSegments_=[],i.audioDisabled_=!1,i.isPendingTimestampOffset_=!1,i.gopBuffer_=[],i.timeMapping_=0,i.safeAppend_=Pa.browser.IE_VERSION>=11,i.appendInitSegment_={audio:!0,video:!0},i.playlistOfLastInitSegment_={audio:null,video:null},i.callQueue_=[],i.loadQueue_=[],i.metadataQueue_={id3:[],caption:[]},i.activeInitSegmentId_=null,i.initSegments_={},i.cacheEncryptionKeys_=t.cacheEncryptionKeys,i.keyCache_={},i.decrypter_=t.decrypter,i.syncController_=t.syncController,i.syncPoint_={segmentIndex:0,time:0},i.transmuxer_=i.createTransmuxer_(),i.triggerSyncInfoUpdate_=function(){return i.trigger("syncinfoupdate")},i.syncController_.on("syncinfoupdate",i.triggerSyncInfoUpdate_),i.mediaSource_.addEventListener("sourceopen",(function(){i.isEndOfStream_()||(i.ended_=!1)})),i.fetchAtBuffer_=!1,i.logger_=uo("SegmentLoader["+i.loaderType_+"]"),Object.defineProperty(u(i),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),i.sourceUpdater_.on("ready",(function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()})),"main"===i.loaderType_&&i.timelineChangeController_.on("pendingtimelinechange",(function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()})),"audio"===i.loaderType_&&i.timelineChangeController_.on("timelinechange",(function(){i.hasEnoughInfoToLoad_()&&i.processLoadQueue_(),i.hasEnoughInfoToAppend_()&&i.processCallQueue_()})),i}c(t,e);var n=t.prototype;return n.createTransmuxer_=function(){var e=new ao;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(),Ra=null,Ns.length=0),this.resetStats_(),this.checkBufferTimeout_&&r().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_&&Vs(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){if(!this.sourceUpdater_||!this.startingMediaInfo_)return Pa.createTimeRanges();if("main"===this.loaderType_){var e=this.startingMediaInfo_,t=e.hasAudio,n=e.hasVideo,i=e.isMuxed;if(n&&t&&!this.audioDisabled_&&!i)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=ws(e),i=this.initSegments_[n];return t&&!i&&e.bytes&&(this.initSegments_[n]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),i||e},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Es(e),i=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!i&&e.bytes&&(this.keyCache_[n]=i={resolvedUri:e.resolvedUri,bytes:e.bytes});var r={resolvedUri:(i||e).resolvedUri};return i&&(r.bytes=i.bytes),r},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_,i=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0});var r=null;if(n&&(n.id?r=n.id:n.uri&&(r=n.uri)),this.logger_("playlist update ["+r+" => "+(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 a=e.mediaSequence-n.mediaSequence;this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex&&(this.mediaIndex-=a),i&&(i.mediaIndex-=a,i.mediaIndex>=0&&(i.segment=e.segments[i.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(n,e)}},n.pause=function(){this.checkBufferTimeout_&&(r().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_&&Vs(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 i=1,r=function(){0==--i&&n()};for(var a in this.audioDisabled_||(i++,this.sourceUpdater_.removeAudio(e,t,r)),"main"===this.loaderType_&&this.currentMediaInfo_&&this.currentMediaInfo_.hasVideo&&(this.gopBuffer_=function(e,t,n,i){for(var r=Math.ceil((t-i)*be.ONE_SECOND_IN_TS),a=Math.ceil((n-i)*be.ONE_SECOND_IN_TS),s=e.slice(),o=e.length;o--&&!(e[o].pts<=a););if(-1===o)return s;for(var u=o+1;u--&&!(e[u].pts<=r););return u=Math.max(u,0),s.splice(u,o-u+1),s}(this.gopBuffer_,e,t,this.timeMapping_),i++,this.sourceUpdater_.removeVideo(e,t,r)),this.inbandTextTracks_)vo(e,t,this.inbandTextTracks_[a]);vo(e,t,this.segmentMetadataTrack_),r()}},n.monitorBuffer_=function(){this.checkBufferTimeout_&&r().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=r().setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&r().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=r().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=To({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,i,r,a){var s=0;e.length&&(s=e.end(e.length-1));var o=Math.max(0,s-r);if(!t.segments.length)return null;if(o>=this.goalBufferLength_())return null;if(!i&&o>=1)return null;var u,l=null,c=!1;if(null===a)l=this.getSyncSegmentCandidate_(t),c=!0;else if(null!==n){var h=t.segments[n];u=h&&h.end?h.end:s,l=n+1}else if(this.fetchAtBuffer_){var d=fs.getMediaInfoForTime(t,s,a.segmentIndex,a.time);l=d.mediaIndex,u=d.startTime}else{var f=fs.getMediaInfoForTime(t,r,a.segmentIndex,a.time);l=f.mediaIndex,u=f.startTime}var p=this.generateSegmentInfo_(t,l,u,c);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:l,startOfSegment:u,isSyncRequest:c}),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,i){if(t<0||t>=e.segments.length)return null;var r,a,s=e.segments[t],o=this.sourceUpdater_.audioBuffered(),u=this.sourceUpdater_.videoBuffered();return o.length&&(r=o.end(o.length-1)-this.sourceUpdater_.audioTimestampOffset()),u.length&&(a=function(e,t,n){if(null==t||!e.length)return[];var i,r=Math.ceil((t-n+3)*be.ONE_SECOND_IN_TS);for(i=0;i<e.length&&!(e[i].pts>r);i++);return e.slice(i)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),{requestId:"segment-loader-"+Math.random(),uri:s.resolvedUri,mediaIndex:t,isSyncRequest:i,startOfSegment:n,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:s.timeline,duration:s.duration,segment:s,byteLength:0,transmuxer:this.transmuxer_,audioAppendStart:r,gopsToAlignWith:a}},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,i=this.pendingSegment_.duration,r=fs.estimateSegmentRequestTime(i,n,this.playlist_,e.bytesReceived),a=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(!(r<=a)){var s=function(e){var t=e.currentTime,n=e.bandwidth,i=e.duration,r=e.segmentDuration,a=e.timeUntilRebuffer,s=e.currentTimeline,o=e.syncController,u=e.master.playlists.filter((function(e){return!fs.isIncompatible(e)})),l=u.filter(fs.isEnabled);l.length||(l=u.filter((function(e){return!fs.isDisabled(e)})));var c=l.filter(fs.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var u=o.getSyncPoint(e,i,s,t)?1:2;return{playlist:e,rebufferingImpact:fs.estimateSegmentRequestTime(r,n,e)*u-a}})),h=c.filter((function(e){return e.rebufferingImpact<=0}));return fo(h,(function(e,t){return po(t.playlist,e.playlist)})),h.length?h[0]:(fo(c,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),c[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:i,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(s){var o=r-a-s.rebufferingImpact,u=.5;a<=Ya&&(u=1),!s.playlist||s.playlist.uri===this.playlist_.uri||o<u||(this.bandwidth=s.playlist.attributes.BANDWIDTH*Rs.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(),i=Object.keys(t).sort();if(n.length!==i.length)return!1;for(var r=0;r<n.length;r++){var a=n[r];if(a!==i[r])return!1;if(e[a]!==t[a])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,i){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var r=this.pendingSegment_,a=bo(t);r[a]=r[a]||{},r[a][n]=i,this.logger_("timinginfo: "+t+" - "+n+" - "+i),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 i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),a={};t.forEach((function(e){a[e.stream]=a[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=a[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(a).forEach((function(e){var t=a[e],s=t.startTime,o=t.endTime,u=t.captions,l=n.inbandTextTracks_;n.logger_("adding cues from "+s+" -> "+o+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var i=t.textTracks().getTrackById(n);e[n]=i||t.addRemoteTextTrack({kind:"captions",id:n,label:n},!1).track}}(l,n.vhs_.tech_,e),vo(s,o,l[e]),function(e){var t=e.inbandTextTracks,n=e.captionArray,i=e.timestampOffset;if(n){var a=r().WebKitDataCue||r().VTTCue;n.forEach((function(e){var n=e.stream;t[n].addCue(new a(e.startTime+i,e.endTime+i,e.text))}))}}({captionArray:u,inbandTextTracks:l,timestampOffset:i})})),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 i=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_),function(e){var t=e.inbandTextTracks,n=e.metadataArray,i=e.timestampOffset,a=e.videoDuration;if(n){var s=r().WebKitDataCue||r().VTTCue,o=t.metadataTrack_;if(o&&(n.forEach((function(e){var t=e.cueTime+i;!("number"!=typeof t||r().isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var n=new s(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Pa.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Pa.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Pa.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),o.addCue(n)}))})),o.cues&&o.cues.length)){for(var u=o.cues,l=[],c=0;c<u.length;c++)u[c]&&l.push(u[c]);var h=l.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),d=Object.keys(h).sort((function(e,t){return Number(e)-Number(t)}));d.forEach((function(e,t){var n=h[e],i=Number(d[t+1])||a;n.forEach((function(e){e.endTime=i}))}))}}}({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:i,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_&&So({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,i=t.hasVideo,r=t.isMuxed;if(i&&!e.videoTimingInfo)return!1;if(n&&!this.audioDisabled_&&!r&&!e.audioTimingInfo)return!1}return!So({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[bo(t.type)].start;else{var i,r="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo;r&&(i=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:r,firstVideoFrameTimeForData:i,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,i=e.map,r=e.playlist;if(i){var a=ws(i);if(this.activeInitSegmentId_===a)return null;n=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=a}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=r,this.appendInitSegment_[t]=!!i,this.activeInitSegmentId_=null,n):null},n.appendToSourceBuffer_=function(e){var t=this,n=e.segmentInfo,i=e.type,r=e.initSegment,a=e.data,s=[a],o=a.byteLength;r&&(s.unshift(r),o+=r.byteLength);var u,l,c,h=(c=0,(u={bytes:o,segments:s}).bytes&&(l=new Uint8Array(u.bytes),u.segments.forEach((function(e){l.set(e,c),c+=e.byteLength}))),l);this.sourceUpdater_.appendBuffer({segmentInfo:n,type:i,bytes:h},(function(e){e&&(t.error(i+" append of "+h.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 i=this.pendingSegment_.segment,r=e+"TimingInfo";i[r]||(i[r]={}),i[r].transmuxerPrependedSeconds=n.prependedContentDuration||0,i[r].transmuxedPresentationStart=n.start.presentation,i[r].transmuxedDecodeStart=n.start.decode,i[r].transmuxedPresentationEnd=n.end.presentation,i[r].transmuxedDecodeEnd=n.end.decode,i[r].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(e,t){var n=t.type,i=t.data;if(i&&i.byteLength&&("audio"!==n||!this.audioDisabled_)){var r=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:r,data:i})}},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=To({segmentTimeline:e.timeline,currentTimeline:t.currentTimeline_,startOfSegment:e.startOfSegment,buffered:n,overrideCheck:!0})),delete e.audioAppendStart;var i=t.sourceUpdater_.audioBuffered();i.length&&(e.audioAppendStart=i.end(i.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=Ks({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 i=t-Rs.BACK_BUFFER_LENGTH;e.length&&(i=Math.max(i,e.start(0)));var r=t-n;return Math.min(r,i)}(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},i=e.playlist.segments[e.mediaIndex-1];if(i&&i.timeline===t.timeline&&(i.videoTimingInfo?n.baseStartTime=i.videoTimingInfo.transmuxedDecodeEnd:i.audioTimingInfo&&(n.baseStartTime=i.audioTimingInfo.transmuxedDecodeEnd)),t.key){var r=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);n.key=this.segmentKey(t.key),n.key.iv=r}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<_o?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record 0.016666666666666666"):(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===Ws)return;return this.pause(),e.code===Hs?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,t.stats),i.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var i=t[0].pts,r=0;r<e.length&&!(e[r].pts>=i);r++);return e.slice(0,r).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING";var r=this.isEndOfStream_(i.mediaIndex,i.playlist),a=null!==this.mediaIndex,s=i.timeline!==this.currentTimeline_&&i.timeline>0;!i.isFmp4&&(r||a&&s)&&(o=this.transmuxer_,Fs("endTimeline",o)),this.trigger("appending"),this.waitForAppendsToComplete_(i)}var o},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,i=e.mediaIndex,r=e.firstVideoFrameTimeForData,a=e.currentVideoTimestampOffset,s=e.useVideoTimingInfo,o=e.videoTimingInfo,u=e.audioTimingInfo;if(void 0!==t)return t;if(!s)return u.start;var l=n.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===r+a?o.start:r},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,i=t.hasVideo,r=t.isMuxed,a="main"===this.loaderType_&&i,s=!this.audioDisabled_&&n&&!r;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);a&&e.waitingOnAppends++,s&&e.waitingOnAppends++,a&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),s&&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,i=t.end,r=e.playlist,a=r.mediaSequence,s=r.id,o=r.segments,u=void 0===o?[]:o,l=e.mediaIndex,c=e.timeline;return["appending ["+l+"] of ["+a+", "+(a+u.length)+"] from playlist ["+s+"]","["+n+" => "+i+"] in timeline ["+c+"]"].join(" ")}(e));var t=function(e,t){if("hls"!==t)return null;var n,i,r,a,s=(n=e.audioTimingInfo,i=e.videoTimingInfo,r=n&&"number"==typeof n.start&&"number"==typeof n.end?n.end-n.start:0,a=i&&"number"==typeof i.start&&"number"==typeof i.end?i.end-i.start:0,Math.max(r,a));if(!s)return null;var o=e.playlist.targetDuration,u=wo({segmentDuration:s,maxDuration:2*o}),l=wo({segmentDuration:s,maxDuration:o}),c="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+s+" when the reported duration is "+e.duration+" and the target duration is "+o+". 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||l?{severity:u?"warn":"info",message:c}:null}(e,this.sourceType_);if(t&&("warn"===t.severity?Pa.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;n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration?this.resetEverything():(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<_o)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record 0.016666666666666666");else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,i=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(i-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,i=t.end;if(yo(n)&&yo(i)){vo(n,i,this.segmentMetadataTrack_);var a=r().WebKitDataCue||r().VTTCue,s={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:i},o=new a(n,i,JSON.stringify(s));o.value=s,this.segmentMetadataTrack_.addCue(o)}}},t}(Pa.EventTarget);function ko(){}var Co,xo=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},Ao=["video","audio"],Io=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},Oo=function e(t,n){if(0!==n.queue.length){var i=0,r=n.queue[i];if("mediaSource"!==r.type){if("mediaSource"!==t&&n.ready()&&"closed"!==n.mediaSource.readyState&&!Io(t,n)){if(r.type!==t){if(i=function(e,t){for(var n=0;n<t.length;n++){var i=t[n];if("mediaSource"===i.type)return null;if(i.type===e)return n}return null}(t,n.queue),null===i)return;r=n.queue[i]}n.queue.splice(i,1),r.action(t,n),r.doneFn?n.queuePending[t]=r:e(t,n)}}else n.updating()||"closed"===n.mediaSource.readyState||(n.queue.shift(),r.action(n),r.doneFn&&r.doneFn(),e("audio",n),e("video",n))}},Po=function(e,t){var n=t[e+"Buffer"],i=xo(e);n&&(n.removeEventListener("updateend",t["on"+i+"UpdateEnd_"]),n.removeEventListener("error",t["on"+i+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},Lo=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},Do=function(e,t){return function(n,i){var r=i[n+"Buffer"];Lo(i.mediaSource,r)&&(i.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+n+"Buffer"),r.appendBuffer(e))}},Ro=function(e,t){return function(n,i){var r=i[n+"Buffer"];Lo(i.mediaSource,r)&&(i.logger_("Removing "+e+" to "+t+" from "+n+"Buffer"),r.remove(e,t))}},Mo=function(e){return function(t,n){var i=n[t+"Buffer"];Lo(n.mediaSource,i)&&(n.logger_("Setting "+t+"timestampOffset to "+e),i.timestampOffset=e)}},No=function(e){return function(t,n){e()}},Uo=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(e){Pa.log.warn("Failed to call media source endOfStream",e)}}}},jo=function(e,t){return function(n){var i=xo(e),r=(0,we._5)(t);n.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var a=n.mediaSource.addSourceBuffer(r);a.addEventListener("updateend",n["on"+i+"UpdateEnd_"]),a.addEventListener("error",n["on"+i+"Error_"]),n.codecs[e]=t,n[e+"Buffer"]=a}},Bo=function(e){return function(t){var n=t[e+"Buffer"];if(Po(e,t),Lo(t.mediaSource,n)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(n)}catch(t){Pa.log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},Fo=function(e){return function(t,n){var i=n[t+"Buffer"],r=(0,we._5)(e);Lo(n.mediaSource,i)&&n.codecs[t]!==e&&(n.logger_("changing "+t+"Buffer codec from "+n.codecs[t]+" to "+e),i.changeType(r),n.codecs[t]=e)}},Vo=function(e){var t=e.type,n=e.sourceUpdater,i=e.action,r=e.doneFn,a=e.name;n.queue.push({type:t,action:i,doneFn:r,name:a}),Oo(t,n)},Ho=function(e,t){return function(n){if(t.queuePending[e]){var i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[e+"Error_"])}Oo(e,t)}},Wo=function(e){function t(t){var n;return(n=e.call(this)||this).mediaSource=t,n.sourceopenListener_=function(){return Oo("mediaSource",u(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=uo("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null},n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=Ho("video",u(n)),n.onAudioUpdateEnd_=Ho("audio",u(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}c(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){Vo({type:"mediaSource",sourceUpdater:this,action:jo(e,t),name:"addSourceBuffer"})},n.abort=function(e){Vo({type:e,sourceUpdater:this,action:function(e,t){if("open"===t.mediaSource.readyState){var n=t[e+"Buffer"];if(Lo(t.mediaSource,n)){t.logger_("calling abort on "+e+"Buffer");try{n.abort()}catch(t){Pa.log.warn("Failed to abort on "+e+"Buffer",t)}}}},name:"abort"})},n.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?Vo({type:"mediaSource",sourceUpdater:this,action:Bo(e),name:"removeSourceBuffer"}):Pa.log.error("removeSourceBuffer is not supported!")},n.canRemoveSourceBuffer=function(){return!Pa.browser.IE_VERSION&&!Pa.browser.IS_FIREFOX&&r().MediaSource&&r().MediaSource.prototype&&"function"==typeof r().MediaSource.prototype.removeSourceBuffer},t.canChangeType=function(){return r().SourceBuffer&&r().SourceBuffer.prototype&&"function"==typeof r().SourceBuffer.prototype.changeType},n.canChangeType=function(){return this.constructor.canChangeType()},n.changeType=function(e,t){this.canChangeType()?Vo({type:e,sourceUpdater:this,action:Fo(t),name:"changeType"}):Pa.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 i=e[n];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(n,i);t.canChangeType()&&t.changeType(n,i)}))},n.appendBuffer=function(e,t){var n=this,i=e.segmentInfo,r=e.type,a=e.bytes;if(this.processedAppend_=!0,"audio"===r&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+a.length+" until video append");if(Vo({type:r,sourceUpdater:this,action:Do(a,i||{mediaIndex:-1}),doneFn:t,name:"appendBuffer"}),"video"===r){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var s=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+s.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,s.forEach((function(e){n.appendBuffer.apply(n,e)}))}},n.audioBuffered=function(){return Lo(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Pa.createTimeRange()},n.videoBuffered=function(){return Lo(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Pa.createTimeRange()},n.buffered=function(){var e=Lo(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Lo(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var n=null,i=null,r=0,a=[],s=[];if(!(e&&e.length&&t&&t.length))return Pa.createTimeRange();for(var o=e.length;o--;)a.push({time:e.start(o),type:"start"}),a.push({time:e.end(o),type:"end"});for(o=t.length;o--;)a.push({time:t.start(o),type:"start"}),a.push({time:t.end(o),type:"end"});for(a.sort((function(e,t){return e.time-t.time})),o=0;o<a.length;o++)"start"===a[o].type?2==++r&&(n=a[o].time):"end"===a[o].type&&1==--r&&(i=a[o].time),null!==n&&null!==i&&(s.push([n,i]),n=null,i=null);return Pa.createTimeRanges(s)}(this.audioBuffered(),this.videoBuffered())},n.setDuration=function(e,t){var n;void 0===t&&(t=ko),Vo({type:"mediaSource",sourceUpdater:this,action:(n=e,function(e){e.logger_("Setting mediaSource duration to "+n);try{e.mediaSource.duration=n}catch(e){Pa.log.warn("Failed to set media source duration",e)}}),name:"duration",doneFn:t})},n.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=ko),"string"!=typeof e&&(e=void 0),Vo({type:"mediaSource",sourceUpdater:this,action:Uo(e),name:"endOfStream",doneFn:t})},n.removeAudio=function(e,t,n){void 0===n&&(n=ko),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?Vo({type:"audio",sourceUpdater:this,action:Ro(e,t),doneFn:n,name:"remove"}):n()},n.removeVideo=function(e,t,n){void 0===n&&(n=ko),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?Vo({type:"video",sourceUpdater:this,action:Ro(e,t),doneFn:n,name:"remove"}):n()},n.updating=function(){return!(!Io("audio",this)&&!Io("video",this))},n.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Vo({type:"audio",sourceUpdater:this,action:Mo(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},n.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(Vo({type:"video",sourceUpdater:this,action:Mo(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},n.audioQueueCallback=function(e){this.audioBuffer&&Vo({type:"audio",sourceUpdater:this,action:No(e),name:"callback"})},n.videoQueueCallback=function(e){this.videoBuffer&&Vo({type:"video",sourceUpdater:this,action:No(e),name:"callback"})},n.dispose=function(){var e=this;this.trigger("dispose"),Ao.forEach((function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"]((function(){return Po(t,e)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},t}(Pa.EventTarget),qo=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},zo=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),Go=function(e){function t(t,n){var i;return void 0===n&&(n={}),(i=e.call(this,t,n)||this).handlePartialData_=!1,i.mediaSource_=null,i.subtitlesTrack_=null,i.loaderType_="subtitle",i.featuresNativeTextTracks_=t.featuresNativeTextTracks,i.shouldSaveSegmentTimingInfo_=!1,i}c(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return null},n.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return Pa.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Pa.createTimeRanges([[t,n]])},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=ws(e),i=this.initSegments_[n];if(t&&!i&&e.bytes){var r=zo.byteLength+e.bytes.byteLength,a=new Uint8Array(r);a.set(e.bytes),a.set(zo,e.bytes.byteLength),this.initSegments_[n]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return i||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){vo(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 i=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Hs&&this.handleTimeout_(),e.code===Ws?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var a=this.pendingSegment_;this.saveBandwidthRelatedStats_(a.duration,t.stats),this.state="APPENDING",this.trigger("appending");var s=a.segment;if(s.map&&(s.map.bytes=t.map.bytes),a.bytes=t.bytes,"function"!=typeof r().WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var o,u=function(){i.subtitlesTrack_.tech_.off("vttjsloaded",o),i.stopForError({message:"Error loading vtt.js"})};return o=function(){i.subtitlesTrack_.tech_.off("vttjserror",u),i.segmentRequestFinished_(e,t,n)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",o),void this.subtitlesTrack_.tech_.one("vttjserror",u)}s.requested=!0;try{this.parseVTTCues_(a)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(a,this.syncController_.timelines[a.timeline],this.playlist_),a.cues.length?a.timingInfo={start:a.cues[0].startTime,end:a.cues[a.cues.length-1].endTime}:a.timingInfo={start:a.startOfSegment,end:a.startOfSegment+a.duration},a.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");a.byteLength=a.bytes.byteLength,this.mediaSecondsLoaded+=s.duration,a.cues.forEach((function(e){i.subtitlesTrack_.addCue(i.featuresNativeTextTracks_?new(r().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 i=[],r=0,a=0;a<t.length;a++)t[n].startTime===t[a].startTime&&t[n].endTime===t[a].endTime&&t[n].text===t[a].text&&++r>1&&i.push(t[a]);i.length&&i.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 r().TextDecoder?t=new(r().TextDecoder)("utf8"):(t=r().WebVTT.StringDecoder(),n=!0);var i=new(r().WebVTT.Parser)(r(),r().vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},i.oncue=e.cues.push.bind(e.cues),i.ontimestampmap=function(t){e.timestampmap=t},i.onparsingerror=function(e){Pa.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var a=e.segment.map.bytes;n&&(a=qo(a)),i.parse(a)}var s=e.bytes;n&&(s=qo(s)),i.parse(s),i.flush()},n.updateTimeMapping_=function(e,t,n){var i=e.segment;if(t)if(e.cues.length){var r=e.timestampmap,a=r.MPEGTS/be.ONE_SECOND_IN_TS-r.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=a,e.endTime+=a})),!n.syncInfo){var s=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(s,o-i.duration)}}}else i.empty=!0},t}(Eo),Xo=function(e,t){for(var n=e.cues,i=0;i<n.length;i++){var r=n[i];if(t>=r.adStartTime&&t<=r.adEndTime)return r}return null},Ko=[{name:"VOD",run:function(e,t,n,i,r){return n!==1/0?{time:0,segmentIndex:0}:null}},{name:"ProgramDateTime",run:function(e,t,n,i,r){if(!e.datetimeToDisplayTime)return null;var a=t.segments||[],s=null,o=null;r=r||0;for(var u=0;u<a.length;u++){var l=a[u];if(l.dateTimeObject){var c=l.dateTimeObject.getTime()/1e3+e.datetimeToDisplayTime,h=Math.abs(r-c);if(null!==o&&(0===h||o<h))break;o=h,s={time:c,segmentIndex:u}}}return s}},{name:"Segment",run:function(e,t,n,i,r){var a=t.segments||[],s=null,o=null;r=r||0;for(var u=0;u<a.length;u++){var l=a[u];if(l.timeline===i&&void 0!==l.start){var c=Math.abs(r-l.start);if(null!==o&&o<c)break;(!s||null===o||o>=c)&&(o=c,s={time:l.start,segmentIndex:u})}}return s}},{name:"Discontinuity",run:function(e,t,n,i,r){var a=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var s=null,o=0;o<t.discontinuityStarts.length;o++){var u=t.discontinuityStarts[o],l=t.discontinuitySequence+o+1,c=e.discontinuities[l];if(c){var h=Math.abs(r-c.time);if(null!==s&&s<h)break;(!a||null===s||s>=h)&&(s=h,a={time:c.time,segmentIndex:u})}}return a}},{name:"Playlist",run:function(e,t,n,i,r){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],Yo=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.datetimeToDisplayTime=null,n.logger_=uo("SyncController"),n}c(t,e);var n=t.prototype;return n.getSyncPoint=function(e,t,n,i){var r=this.runStrategies_(e,t,n,i);return r.length?this.selectSyncPoint_(r,{key:"time",value:i}):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 i=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+as(e,i.segmentIndex,0))},n.runStrategies_=function(e,t,n,i){for(var r=[],a=0;a<Ko.length;a++){var s=Ko[a],o=s.run(this,e,t,n,i);o&&(o.strategy=s.name,r.push({strategy:s.name,syncPoint:o}))}return r},n.selectSyncPoint_=function(e,t){for(var n=e[0].syncPoint,i=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy,a=1;a<e.length;a++){var s=Math.abs(e[a].syncPoint[t.key]-t.value);s<i&&(i=s,n=e[a].syncPoint,r=e[a].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+r+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+"]"),n},n.saveExpiredSegmentInfo=function(e,t){for(var n=t.mediaSequence-e.mediaSequence-1;n>=0;n--){var i=e.segments[n];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:i.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 i=e.segment,r=this.timelines[e.timeline];if(null!==e.timestampOffset)r={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=r,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+r.time+"] [mapping: "+r.mapping+"]")),i.start=e.startOfSegment,i.end=t.end+r.mapping;else{if(!r)return!1;i.start=t.start+r.mapping,i.end=t.end+r.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 i=0;i<t.discontinuityStarts.length;i++){var r=t.discontinuityStarts[i],a=t.discontinuitySequence+i+1,s=r-e.mediaIndex,o=Math.abs(s);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>o){var u;u=s<0?n.start-as(t,e.mediaIndex,r):n.end+as(t,e.mediaIndex+1,r),this.discontinuities[a]={time:u,accuracy:o}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(Pa.EventTarget),$o=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}c(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,i=e.to;return"number"==typeof n&&"number"==typeof i&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},n.lastTimelineChange=function(e){var t=e.type,n=e.from,i=e.to;return"number"==typeof n&&"number"==typeof i&&(this.lastTimelineChanges_[t]={type:t,from:n,to:i},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(Pa.EventTarget),Qo=new eo("./decrypter-worker.worker.js",(function(e,t){var n=this;!function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var t=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,i=0;i<n;++i)t[i].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),i=t,r=null,a=function(){function e(e){var t,n,i;r||(r=function(){var e,t,n,i,r,a,s,o,u=[[[],[],[],[],[]],[[],[],[],[],[]]],l=u[0],c=u[1],h=l[4],d=c[4],f=[],p=[];for(e=0;e<256;e++)p[(f[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!h[t];t^=i||1,n=p[n]||1)for(a=(a=n^n<<1^n<<2^n<<3^n<<4)>>8^255&a^99,h[t]=a,d[a]=t,o=16843009*f[r=f[i=f[t]]]^65537*r^257*i^16843008*t,s=257*f[a]^16843008*a,e=0;e<4;e++)l[e][t]=s=s<<24^s>>>8,c[e][a]=o=o<<24^o>>>8;for(e=0;e<5;e++)l[e]=l[e].slice(0),c[e]=c[e].slice(0);return u}()),this._tables=[[r[0][0].slice(),r[0][1].slice(),r[0][2].slice(),r[0][3].slice(),r[0][4].slice()],[r[1][0].slice(),r[1][1].slice(),r[1][2].slice(),r[1][3].slice(),r[1][4].slice()]];var a=this._tables[0][4],s=this._tables[1],o=e.length,u=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");var l=e.slice(0),c=[];for(this._key=[l,c],t=o;t<4*o+28;t++)i=l[t-1],(t%o==0||8===o&&t%o==4)&&(i=a[i>>>24]<<24^a[i>>16&255]<<16^a[i>>8&255]<<8^a[255&i],t%o==0&&(i=i<<8^i>>>24^u<<24,u=u<<1^283*(u>>7))),l[t]=l[t-o]^i;for(n=0;t;n++,t--)i=l[3&n?t:t-4],c[n]=t<=4||n<4?i:s[0][a[i>>>24]]^s[1][a[i>>16&255]]^s[2][a[i>>8&255]]^s[3][a[255&i]]}return e.prototype.decrypt=function(e,t,n,i,r,a){var s,o,u,l,c=this._key[1],h=e^c[0],d=i^c[1],f=n^c[2],p=t^c[3],m=c.length/4-2,g=4,v=this._tables[1],y=v[0],_=v[1],b=v[2],T=v[3],S=v[4];for(l=0;l<m;l++)s=y[h>>>24]^_[d>>16&255]^b[f>>8&255]^T[255&p]^c[g],o=y[d>>>24]^_[f>>16&255]^b[p>>8&255]^T[255&h]^c[g+1],u=y[f>>>24]^_[p>>16&255]^b[h>>8&255]^T[255&d]^c[g+2],p=y[p>>>24]^_[h>>16&255]^b[d>>8&255]^T[255&f]^c[g+3],g+=4,h=s,d=o,f=u;for(l=0;l<4;l++)r[(3&-l)+a]=S[h>>>24]<<24^S[d>>16&255]<<16^S[f>>8&255]<<8^S[255&p]^c[g++],s=h,h=d,d=f,f=p,p=s},e}(),s=function(e){function t(){var t;return(t=e.call(this,i)||this).jobs=[],t.delay=1,t.timeout_=null,t}var n,r;r=e,(n=t).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var a=t.prototype;return a.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},a.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(i),o=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},u=function(){function t(e,n,i,r){var a=t.STEP,u=new Int32Array(e.buffer),l=new Uint8Array(e.byteLength),c=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(u.subarray(c,c+a),n,i,l)),c=a;c<u.length;c+=a)i=new Uint32Array([o(u[c-4]),o(u[c-3]),o(u[c-2]),o(u[c-1])]),this.asyncStream_.push(this.decryptChunk_(u.subarray(c,c+a),n,i,l));this.asyncStream_.push((function(){var e;r(null,(e=l).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return t.prototype.decryptChunk_=function(e,t,n,i){return function(){var r=function(e,t,n){var i,r,s,u,l,c,h,d,f,p=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),m=new a(Array.prototype.slice.call(t)),g=new Uint8Array(e.byteLength),v=new Int32Array(g.buffer);for(i=n[0],r=n[1],s=n[2],u=n[3],f=0;f<p.length;f+=4)l=o(p[f]),c=o(p[f+1]),h=o(p[f+2]),d=o(p[f+3]),m.decrypt(l,c,h,d,v,f),v[f]=o(v[f]^i),v[f+1]=o(v[f+1]^r),v[f+2]=o(v[f+2]^s),v[f+3]=o(v[f+3]^u),i=l,r=c,s=h,u=d;return g}(e,t,n);i.set(r,e.byteOffset)}},n=t,r=[{key:"STEP",get:function(){return 32e3}}],(i=null)&&e(n.prototype,i),r&&e(n,r),t;var n,i,r}();new function(e){e.onmessage=function(t){var n=t.data,i=new Uint8Array(n.encrypted.bytes,n.encrypted.byteOffset,n.encrypted.byteLength),r=new Uint32Array(n.key.bytes,n.key.byteOffset,n.key.byteLength/4),a=new Uint32Array(n.iv.bytes,n.iv.byteOffset,n.iv.byteLength/4);new u(i,r,a,(function(t,i){var r,a;e.postMessage((r={source:n.source,decrypted:i},a={},Object.keys(r).forEach((function(e){var t=r[e];ArrayBuffer.isView(t)?a[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:a[e]=t})),a),[i.buffer])}))}}(n)}()})),Jo=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Zo=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},eu=function(e,t){t.activePlaylistLoader=e,e.load()},tu={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],i=t.mediaTypes[e],r=t.blacklistCurrentPlaylist;Zo(n,i);var a=i.activeTrack(),s=i.activeGroup(),o=(s.filter((function(e){return e.default}))[0]||s[0]).id,u=i.tracks[o];if(a!==u){for(var l in Pa.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),i.tracks)i.tracks[l].enabled=i.tracks[l]===u;i.onTrackChanged()}else r({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],i=t.mediaTypes[e];Pa.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Zo(n,i);var r=i.activeTrack();r&&(r.mode="disabled"),i.onTrackChanged()}}},nu={AUDIO:function(e,t,n){if(t){var i=n.tech,r=n.requestOptions,a=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,r),(!i.paused()||e.endList&&"none"!==i.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),r),i.paused()||a.load()})),t.on("error",tu[e](e,n))}},SUBTITLES:function(e,t,n){var i=n.tech,r=n.requestOptions,a=n.segmentLoaders[e],s=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,r),a.track(s.activeTrack()),(!i.paused()||e.endList&&"none"!==i.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),r),i.paused()||a.load()})),t.on("error",tu[e](e,n))}},iu={AUDIO:function(e,t){var n=t.vhs,i=t.sourceType,r=t.segmentLoaders[e],a=t.requestOptions,s=t.master,o=s.mediaGroups,u=s.playlists,l=t.mediaTypes[e],c=l.groups,h=l.tracks,d=t.masterPlaylistLoader;o[e]&&0!==Object.keys(o[e]).length||(o[e]={main:{default:{default:!0}}});var f=function(r){c[r]||(c[r]=[]);var s=u.filter((function(t){return t.attributes[e]===r})),l=function(u){var l=o[e][r][u];!s.filter((function(e){return e.resolvedUri!==l.resolvedUri})).length&&s.length&&delete l.resolvedUri;var f;if(f="vhs-json"===i&&l.playlists?new Ka(l.playlists[0],n,a):l.resolvedUri?new Ka(l.resolvedUri,n,a):l.playlists&&"dash"===i?new Ds(l.playlists[0],n,a,d):null,l=Pa.mergeOptions({id:u,playlistLoader:f},l),nu[e](e,l.playlistLoader,t),c[r].push(l),void 0===h[u]){var p=new Pa.AudioTrack({id:u,kind:Jo(l),enabled:!1,language:l.language,default:l.default,label:u});h[u]=p}};for(var f in o[e][r])l(f)};for(var p in o[e])f(p);r.on("error",tu[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,i=t.vhs,r=t.sourceType,a=t.segmentLoaders[e],s=t.requestOptions,o=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,h=t.masterPlaylistLoader;for(var d in o[e])for(var f in l[d]||(l[d]=[]),o[e][d])if(!o[e][d][f].forced){var p=o[e][d][f],m=void 0;if("hls"===r)m=new Ka(p.resolvedUri,i,s);else if("dash"===r){if(!p.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;m=new Ds(p.playlists[0],i,s,h)}else"vhs-json"===r&&(m=new Ka(p.playlists?p.playlists[0]:p.resolvedUri,i,s));if(p=Pa.mergeOptions({id:f,playlistLoader:m},p),nu[e](e,p.playlistLoader,t),l[d].push(p),void 0===c[f]){var g=n.addRemoteTextTrack({id:f,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:f},!1).track;c[f]=g}}a.on("error",tu[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,i=t.master.mediaGroups,r=t.mediaTypes[e],a=r.groups,s=r.tracks;for(var o in i[e])for(var u in a[o]||(a[o]=[]),i[e][o]){var l=i[e][o][u];if(l.instreamId.match(/CC\d/)&&(a[o].push(Pa.mergeOptions({id:u},l)),void 0===s[u])){var c=n.addRemoteTextTrack({id:l.instreamId,kind:"captions",default:l.default&&l.autoselect,language:l.language,label:u},!1).track;s[u]=c}}}},ru={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var i in n)if(n[i].enabled)return n[i];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var i in n)if("showing"===n[i].mode||"hidden"===n[i].mode)return n[i];return null}}},au=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],su=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},ou=function(e){function t(t){var n;n=e.call(this)||this;var i,a=t.src,s=t.handleManifestRedirects,o=t.withCredentials,l=t.tech,c=t.bandwidth,h=t.externVhs,d=t.useCueTags,f=t.blacklistDuration,p=t.enableLowInitialPlaylist,m=t.sourceType,g=t.cacheEncryptionKeys,v=t.handlePartialData,y=t.experimentalBufferBasedABR;if(!a)throw new Error("A non-empty playlist URL or JSON manifest string is required");Co=h,n.experimentalBufferBasedABR=Boolean(y),n.withCredentials=o,n.tech_=l,n.vhs_=l.vhs,n.sourceType_=m,n.useCueTags_=d,n.blacklistDuration=f,n.enableLowInitialPlaylist=p,n.useCueTags_&&(n.cueTagsTrack_=n.tech_.addTextTrack("metadata","ad-cues"),n.cueTagsTrack_.inBandMetadataTrackDispatchType=""),n.requestOptions_={withCredentials:o,handleManifestRedirects:s,timeout:null},n.on("error",n.pauseLoading),n.mediaTypes_=(i={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(e){i[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:ko,activeTrack:ko,onGroupChanged:ko,onTrackChanged:ko}})),i),n.mediaSource=new(r().MediaSource),n.handleDurationChange_=n.handleDurationChange_.bind(u(n)),n.handleSourceOpen_=n.handleSourceOpen_.bind(u(n)),n.handleSourceEnded_=n.handleSourceEnded_.bind(u(n)),n.mediaSource.addEventListener("durationchange",n.handleDurationChange_),n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_),n.mediaSource.addEventListener("sourceended",n.handleSourceEnded_),n.seekable_=Pa.createTimeRanges(),n.hasPlayed_=!1,n.syncController_=new Yo(t),n.segmentMetadataTrack_=l.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new Qo,n.sourceUpdater_=new Wo(n.mediaSource),n.inbandTextTracks_={},n.timelineChangeController_=new $o;var _={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:g,handlePartialData:v,sourceUpdater:n.sourceUpdater_,timelineChangeController:n.timelineChangeController_};return n.masterPlaylistLoader_="dash"===n.sourceType_?new Ds(a,n.vhs_,n.requestOptions_):new Ka(a,n.vhs_,n.requestOptions_),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new Eo(Pa.mergeOptions(_,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),t),n.audioSegmentLoader_=new Eo(Pa.mergeOptions(_,{loaderType:"audio"}),t),n.subtitleSegmentLoader_=new Go(Pa.mergeOptions(_,{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_()}))),au.forEach((function(e){n[e+"_"]=su.bind(u(n),e)})),n.logger_=uo("MPC"),n.triggeredFmp4Usage=!1,n.masterPlaylistLoader_.load(),n}c(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_=r().setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(r().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;ds(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()),function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){iu[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,i=e.tech,r=e.vhs;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var i=t.masterPlaylistLoader,r=t.mediaTypes[e].groups,a=i.media();if(!a)return null;var s=null;return a.attributes[e]&&(s=r[a.attributes[e]]),s=s||r.main,void 0===n?s:null===n?null:s.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=ru[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,i=n[e],r=n.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.activeGroup(s),u=a.activePlaylistLoader;Zo(i,a),o&&(o.playlistLoader?(i.resyncLoader(),eu(o.playlistLoader,a)):u&&r.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,i=n[e],r=n.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.activeGroup(s),u=a.activePlaylistLoader;if(Zo(i,a),o){if("AUDIO"===e){if(!o.playlistLoader)return r.setAudio(!0),void r.resetEverything();i.setAudio(!0),r.setAudio(!1)}u!==o.playlistLoader?(i.track&&i.track(s),i.resetEverything(),eu(o.playlistLoader,a)):eu(o.playlistLoader,a)}}}(n,e)}));var a=t.AUDIO.activeGroup();if(a){var s=(a.filter((function(e){return e.default}))[0]||a[0]).id;t.AUDIO.tracks[s].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 o=function(){t.AUDIO.onTrackChanged(),i.trigger({type:"usage",name:"vhs-audio-change"}),i.trigger({type:"usage",name:"hls-audio-change"})};for(var u in i.audioTracks().addEventListener("change",o),i.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",(function(){i.audioTracks().removeEventListener("change",o),i.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),i.clearTracks("audio"),t.AUDIO.tracks)i.audioTracks().addTrack(t.AUDIO.tracks[u])}({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;ds(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||{},i=!0,r=Object.keys(n.AUDIO);for(var a in n.AUDIO)for(var s in n.AUDIO[a])n.AUDIO[a][s].uri||(i=!1);i&&(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"})),Co.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),r.length&&Object.keys(n.AUDIO[r[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,i=e.forwardBuffer,r=e.bufferLowWaterLine,a=e.bufferHighWaterLine,s=e.duration,o=e.experimentalBufferBasedABR,u=e.log;if(!n)return Pa.log.warn("We received no playlist to switch to. Please check your stream."),!1;var l="allowing switch "+(t&&t.id||"null")+" -> "+n.id;if(!t||!t.endList)return u(l+" as current playlist "+(t?"is live":"is not set")),!0;if(n.id===t.id)return!1;var c=o?Rs.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Rs.MAX_BUFFER_LOW_WATER_LINE;if(s<c)return u(l+" as duration < max low water line ("+s+" < "+c+")"),!0;var h=n.attributes.BANDWIDTH,d=t.attributes.BANDWIDTH;if(h<d&&(!o||i<a)){var f=l+" as next bandwidth < current bandwidth ("+h+" < "+d+")";return o&&(f+=" and forwardBuffer < bufferHighWaterLine ("+i+" < "+a+")"),u(f),!0}if((!o||h>d)&&i>=r){var p=l+" as forwardBuffer >= bufferLowWaterLine ("+i+" >= "+r+")";return o&&(p+=" and next bandwidth > current bandwidth ("+h+" > "+d+")"),u(p),!0}return u("not "+l+" 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(){Pa.browser.IE_VERSION||Pa.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(Pa.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=Co.Playlist.playlistEnd(e,t),i=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return n-i<=$a;var a=r.end(r.length-1);return a-i<=$a&&n-a<=$a},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 i=this.masterPlaylistLoader_.master.playlists,r=i.filter(cs),a=1===r.length&&r[0]===n;if(1===i.length&&t!==1/0)return Pa.log.warn("Problem encountered with playlist "+n.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(a);if(a){var s=!1;i.forEach((function(e){if(e!==n){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(s=!0,delete e.excludeUntil)}})),s&&(Pa.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 o=this.selectPlaylist();if(!o)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var u=e.internal?this.logger_:Pa.log.warn,l=e.message?" "+e.message:"";u((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+l+" Switching to playlist "+o.id+"."),o.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),o.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var c=o.targetDuration/2*1e3||5e3,h="number"==typeof o.lastRequest&&Date.now()-o.lastRequest<=c;return this.masterPlaylistLoader_.media(o,a||h)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n=this,i=[],r="all"===e;(r||"main"===e)&&i.push(this.masterPlaylistLoader_);var a=[];(r||"audio"===e)&&a.push("AUDIO"),(r||"subtitle"===e)&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach((function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),["main","audio","subtitle"].forEach((function(t){var r=n[t+"SegmentLoader_"];!r||e!==t&&"all"!==e||i.push(r)})),i.forEach((function(e){return t.forEach((function(t){"function"==typeof e[t]&&e[t]()}))}))},n.setCurrentTime=function(e){var t=Ja(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:Co.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 i=this.masterPlaylistLoader_.master.suggestedPresentationDelay,r=Co.Playlist.seekable(t,n,i);if(0!==r.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=Co.Playlist.seekable(t,n,i)).length)return}var a,s;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),s=this.seekable_.start(0)),e?e.start(0)>r.end(0)||r.start(0)>e.end(0)?this.seekable_=r:this.seekable_=Pa.createTimeRanges([[e.start(0)>r.start(0)?e.start(0):r.start(0),e.end(0)<r.end(0)?e.end(0):r.end(0)]]):this.seekable_=r,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===a&&this.seekable_.start(0)===s||(this.logger_("seekable updated ["+es(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(),i=Co.Playlist.duration(this.masterPlaylistLoader_.media());n.length>0&&(i=Math.max(i,n.end(n.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}},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 i in n)n[i].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=oo(this.master(),this.media()),i={},r=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(i.video=n.video||t.main.videoCodec||we.xz),t.main.isMuxed&&(i.video+=","+(n.audio||t.main.audioCodec||we.lA)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||r)&&(i.audio=n.audio||t.main.audioCodec||t.audio.audioCodec||we.lA,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),i.audio||i.video){var a,s={};if(["video","audio"].forEach((function(e){if(i.hasOwnProperty(e)&&(r=t[e].isFmp4,o=i[e],!(r?(0,we.p7)(o):(0,we.Hi)(o)))){var n=t[e].isFmp4?"browser":"muxer";s[n]=s[n]||[],s[n].push(i[e]),"audio"===e&&(a=n)}var r,o})),r&&a&&this.media().attributes.AUDIO){var o=this.media().attributes.AUDIO;this.master().playlists.forEach((function(t){(t.attributes&&t.attributes.AUDIO)===o&&t!==e.media()&&(t.excludeUntil=1/0)})),this.logger_("excluding audio group "+o+" as "+a+' does not support codec(s): "'+i.audio+'"')}if(!Object.keys(s).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var u=[];if(["video","audio"].forEach((function(t){var n=((0,we.kS)(e.sourceUpdater_.codecs[t]||"")[t]||{}).type,r=((0,we.kS)(i[t]||"")[t]||{}).type;n&&r&&n.toLowerCase()!==r.toLowerCase()&&u.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+i[t]+'"')})),u.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+u.join(", ")+".",blacklistDuration:1/0,internal:!0})}return i}var l=Object.keys(s).reduce((function(e,t){return e&&(e+=", "),e+(t+' does not support codec(s): "')+s[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:l,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(i){var r=t[i];if(-1===n.indexOf(r.id)){n.push(r.id);var a=oo(e.master,r),s=[];!a.audio||(0,we.Hi)(a.audio)||(0,we.p7)(a.audio)||(r.excludeUntil=1/0,s.push("audio codec "+a.audio)),!a.video||(0,we.Hi)(a.video)||(0,we.p7)(a.video)||(r.excludeUntil=1/0,s.push("video codec "+a.video)),a.text&&"stpp.ttml.im1t"===a.text&&(r.excludeUntil=1/0,s.push("text codec "+a.text)),s.length&&e.logger_("excluding "+r.id+" as codecs "+s.join(", ")+" are unsupported")}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=(0,we.kS)(e),i=Object.keys(n).length;this.master().playlists.forEach((function(e){if(e.excludeUntil!==1/0){var r={},a=2,s=[],o=oo(t.masterPlaylistLoader_.master,e);if(o.audio||o.video){var u=[o.video,o.audio].filter(Boolean).join(",");r=(0,we.kS)(u),a=Object.keys(r).length}a!==i&&(s.push('codec count "'+a+'" !== "'+i+'"'),e.excludeUntil=1/0),t.sourceUpdater_.canChangeType()||(r.video&&n.video&&r.video.type.toLowerCase()!==n.video.type.toLowerCase()&&(s.push('video codec "'+r.video.type+'" !== "'+n.video.type+'"'),e.excludeUntil=1/0),r.audio&&n.audio&&r.audio.type.toLowerCase()!==n.audio.type.toLowerCase()&&(e.excludeUntil=1/0,s.push('audio codec "'+r.audio.type+'" !== "'+n.audio.type+'"'))),s.length&&t.logger_("blacklisting "+e.id+": "+s.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 i,a=n,s=0;s<e.segments.length;s++){var o=e.segments[s];if(i||(i=Xo(t,a+o.duration/2)),i){if("cueIn"in o){i.endTime=a,i.adEndTime=a,a+=o.duration,i=null;continue}if(a<i.endTime){a+=o.duration;continue}i.endTime+=o.duration}else if("cueOut"in o&&((i=new(r().VTTCue)(a,a+o.duration,o.cueOut)).adStartTime=a,i.adEndTime=a+parseFloat(o.cueOut),t.addCue(i)),"cueOutCont"in o){var u=o.cueOutCont.split("/").map(parseFloat),l=u[0],c=u[1];(i=new(r().VTTCue)(a,a+o.duration,"")).adStartTime=a-l,i.adEndTime=i.adStartTime+c,t.addCue(i)}a+=o.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var e=this.tech_.currentTime(),t=Rs.GOAL_BUFFER_LENGTH,n=Rs.GOAL_BUFFER_LENGTH_RATE,i=Math.max(t,Rs.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,i)},n.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=Rs.BUFFER_LOW_WATER_LINE,n=Rs.BUFFER_LOW_WATER_LINE_RATE,i=Math.max(t,Rs.MAX_BUFFER_LOW_WATER_LINE),r=Math.max(t,Rs.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?r:i)},n.bufferHighWaterLine=function(){return Rs.BUFFER_HIGH_WATER_LINE},t}(Pa.EventTarget),uu=function(e,t,n){var i,r,a,s=e.masterPlaylistController_,o=s[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(s);if(t.attributes.RESOLUTION){var u=t.attributes.RESOLUTION;this.width=u.width,this.height=u.height}this.bandwidth=t.attributes.BANDWIDTH,this.codecs=oo(s.master(),t),this.playlist=t,this.id=n,this.enabled=(i=e.playlists,r=t.id,a=o,function(e){var t=i.master.playlists[r],n=ls(t),s=cs(t);return void 0===e?s:(e?delete t.disabled:t.disabled=!0,e===s||n||(a(),e?i.trigger("renditionenabled"):i.trigger("renditiondisabled")),e)})},lu=["seeking","seeked","pause","playing","error"],cu=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_=uo("PlaybackWatcher"),this.logger_("initialize");var n=function(){return t.monitorCurrentTime_()},i=function(){return t.techWaiting_()},a=function(){return t.cancelTimer_()},s=function(){return t.fixesBadSeeks_()},o=this.masterPlaylistController_,u=["main","subtitle","audio"],l={};u.forEach((function(e){l[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},o[e+"SegmentLoader_"].on("appendsdone",l[e].updateend),o[e+"SegmentLoader_"].on("playlistupdate",l[e].reset),t.tech_.on(["seeked","seeking"],l[e].reset)})),this.tech_.on("seekablechanged",s),this.tech_.on("waiting",i),this.tech_.on(lu,a),this.tech_.on("canplay",n),this.dispose=function(){t.logger_("dispose"),t.tech_.off("seekablechanged",s),t.tech_.off("waiting",i),t.tech_.off(lu,a),t.tech_.off("canplay",n),u.forEach((function(e){o[e+"SegmentLoader_"].off("appendsdone",l[e].updateend),o[e+"SegmentLoader_"].off("playlistupdate",l[e].reset),t.tech_.off(["seeked","seeking"],l[e].reset)})),t.checkCurrentTimeTimeout_&&r().clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&r().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=r().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_"],i=n.buffered_(),r=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_"],i);this[e+"Buffered_"]=i,r?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:ts(i)}),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+$a>=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();if(this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1)),this.beforeSeekableWindow_(t,n)){var i=t.start(0);e=i+(i===t.end(0)?0:$a)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+es(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;var r=this.tech_.buffered();return!!function(e){var t=e.buffered,n=e.targetDuration,i=e.currentTime;return!(!t.length||t.end(0)-t.start(0)<2*n||i>t.start(0)||!(t.start(0)-i<n))}({buffered:r,targetDuration:this.media().targetDuration,currentTime:n})&&(e=r.start(0)+$a,this.logger_("Buffered region starts ("+r.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=Ja(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 i=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,r=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.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 a=Za(r,t);if(a.length>0){var s=a.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+s+", seeking to "+a.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*s,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,i){if(void 0===i&&(i=!1),!e.length)return!1;var r=e.end(e.length-1)+$a;return!n.endList&&i&&(r=e.end(e.length-1)+3*n.targetDuration),t>r},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,i=e.currentTime;if(t){var r;if(t.length&&n.length){var a=Ja(t,i-3),s=Ja(t,i),o=Ja(n,i);o.length&&!s.length&&a.length&&(r={start:a.end(0),end:o.end(0)})}else Za(t,i).length||(r=this.gapFromVideoUnderflow_(t,i));return!!r&&(this.logger_("Encountered a gap in video from "+r.start+" to "+r.end+". Seeking to current time "+i),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),i=Za(t,n);this.cancelTimer_(),0!==i.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",i.start(0)),this.tech_.setCurrentTime(i.start(0)+Ya),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 Pa.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var i=e.end(n-1),r=e.start(n);t.push([i,r])}return Pa.createTimeRanges(t)}(e),i=0;i<n.length;i++){var r=n.start(i),a=n.end(i);if(t-r<4&&t-r>2)return{start:r,end:a}}return null},e}(),hu={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},du=function e(t,n){var i=0,r=0,a=Pa.mergeOptions(hu,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var s=function(){r&&t.currentTime(r)},o=function(e){null!=e&&(r=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",s),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()-i<1e3*a.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):a.getSource&&"function"==typeof a.getSource?(i=Date.now(),a.getSource.call(t,o)):void Pa.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},l=function e(){t.off("loadedmetadata",s),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=function(n){l(),e(t,n)}},fu=function(e){du(this,e)},pu="2.4.2",mu={PlaylistLoader:Ka,Playlist:fs,utils:Cs,STANDARD_PLAYLIST_SELECTOR:go,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(fs.isEnabled);return fo(t,(function(e,t){return po(e,t)})),t.filter((function(t){return!!oo(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:go,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&&r().devicePixelRatio||1;return t<0&&(t=this.systemBandwidth),t=e*this.systemBandwidth+(1-e)*t,mo(this.playlists.master,t,parseInt(ho(this.tech_.el(),"width"),10)*n,parseInt(ho(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions)}},comparePlaylistBandwidth:po,comparePlaylistResolution:function(e,t){var n,i;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||r().Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(i=t.attributes.RESOLUTION.width),n===(i=i||r().Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-i},xhr:vs()};Object.keys(Rs).forEach((function(e){Object.defineProperty(mu,e,{get:function(){return Pa.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),Rs[e]},set:function(t){Pa.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?Pa.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):Rs[e]=t}})}));var gu="videojs-vhs",vu=function(e,t){for(var n=t.media(),i=-1,r=0;r<e.length;r++)if(e[r].id===n.id){i=r;break}e.selectedIndex_=i,e.trigger({selectedIndex:i,type:"change"})};mu.canPlaySource=function(){return Pa.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var yu=function(){if(!r().localStorage)return null;var e=r().localStorage.getItem(gu);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};mu.supportsNativeHls=function(){if(!s()||!s().createElement)return!1;var e=s().createElement("video");return!!Pa.getTech("Html5").isSupported()&&["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))}))}(),mu.supportsNativeDash=!!(s()&&s().createElement&&Pa.getTech("Html5").isSupported())&&/maybe|probably/i.test(s().createElement("video").canPlayType("application/dash+xml")),mu.supportsTypeNatively=function(e){return"hls"===e?mu.supportsNativeHls:"dash"===e&&mu.supportsNativeDash},mu.isSupported=function(){return Pa.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var _u=function(e){function t(t,n,i){var r;if(r=e.call(this,n,Pa.mergeOptions(i.hls,i.vhs))||this,i.hls&&Object.keys(i.hls).length&&Pa.log.warn("Using hls options is deprecated. Use vhs instead."),r.logger_=uo("VhsHandler"),n.options_&&n.options_.playerId){var a=Pa(n.options_.playerId);a.hasOwnProperty("hls")||Object.defineProperty(a,"hls",{get:function(){return Pa.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"hls-player-access"}),u(r)},configurable:!0}),a.hasOwnProperty("vhs")||Object.defineProperty(a,"vhs",{get:function(){return Pa.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"vhs-player-access"}),u(r)},configurable:!0}),a.hasOwnProperty("dash")||Object.defineProperty(a,"dash",{get:function(){return Pa.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),u(r)},configurable:!0}),r.player_=a}if(r.tech_=n,r.source_=t,r.stats={},r.ignoreNextSeekingEvent_=!1,r.setOptions_(),r.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(r.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return r.on(s(),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=s().fullscreenElement||s().webkitFullscreenElement||s().mozFullScreenElement||s().msFullscreenElement;t&&t.contains(r.tech_.el())&&r.masterPlaylistController_.smoothQualityChange_()})),r.on(r.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),r.on(r.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),r.on(r.tech_,"play",r.play),r}c(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=yu();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=Rs.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Rs.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 i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(i.substring(i.indexOf(",")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=mu,this.options_.sourceType=(0,P.t)(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.masterPlaylistController_=new ou(this.options_);var a=Pa.mergeOptions({liveRangeSafeTimeDelta:$a},this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new cu(a),this.masterPlaylistController_.on("error",(function(){var e=Pa.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 s=this.options_.experimentalBufferBasedABR?mu.movingAverageBandwidthSelector(.55):mu.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.masterPlaylistController_.selectInitialPlaylist=mu.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(){Pa.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 ts(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 ts(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(!r().localStorage)return!1;var t=yu();t=t?Pa.mergeOptions(t,e):e;try{r().localStorage.setItem(gu,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!ls(e)})).map((function(t,n){return new uu(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_=r().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.setupEme_=function(){var e,t,n,i=this,r=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,a=(e={player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:r&&r.media()},t=e.player,!(!(n=function(e,t,n){if(!e)return e;var i={video:t&&t.attributes&&t.attributes.CODECS,audio:n&&n.attributes&&n.attributes.CODECS};!i.audio&&i.video&&i.video.split(",").length>1&&i.video.split(",").forEach((function(e){e=e.trim(),(0,we.KL)(e)?i.audio=e:(0,we.tf)(e)&&(i.video=e)}));var r=i.video?'video/mp4;codecs="'+i.video+'"':null,a=i.audio?'audio/mp4;codecs="'+i.audio+'"':null,s={};for(var o in e)s[o]={audioContentType:a,videoContentType:r},t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(s[o].pssh=t.contentProtection[o].pssh),"string"==typeof e[o]&&(s[o].url=e[o]);return Pa.mergeOptions(e,s)}(e.sourceKeySystems,e.media,e.audioMedia))||(t.currentSource().keySystems=n,n&&!t.eme&&(Pa.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1))));11!==Pa.browser.IE_VERSION&&a?(this.logger_("waiting for EME key session creation"),function(e){var t=e.player,n=e.sourceKeySystems,i=e.audioMedia,r=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var a,s,o=(a=i?r.concat([i]):r,s=Object.keys(n),a.reduce((function(e,t){if(!t.contentProtection)return e;var n=s.reduce((function(e,n){var i=t.contentProtection[n];return i&&i.pssh&&(e[n]={pssh:i.pssh}),e}),{});return Object.keys(n).length&&e.push(n),e}),[])),u=[],l=[];return o.forEach((function(e){l.push(new Promise((function(e,n){t.tech_.one("keysessioncreated",e)}))),u.push(new Promise((function(n,i){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?i(e):n()}))})))})),Promise.race([Promise.all(u),Promise.race(l)])}({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:r&&r.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){i.logger_("created EME key session"),i.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(e){i.logger_("error while creating EME key session",e),i.player_.error({message:"Failed to initialize media keys for EME",code:3})}))):this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=Pa.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)})),vu(t,n.playlists)})),this.playlists.on("mediachange",(function(){vu(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":pu,"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 Wo.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_&&r().URL.revokeObjectURL&&(r().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),e.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return function(e){var t=e.playlist,n=e.time,i=void 0===n?void 0:n,r=e.callback;if(!r)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===i)return r({message:"getProgramTime: playlist and time must be provided"});var a=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var n,i=0,r=0;r<t.segments.length&&!(e<=(i=(n=t.segments[r]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:i+n.duration));r++);var a=t.segments[t.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>i){if(e>i+.25*a.duration)return null;n=a}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:i-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(i,t);if(!a)return r({message:"valid programTime was not found"});if("estimate"===a.type)return r({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var s={mediaSeconds:i},o=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,i=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*i)}(i,a.segment);return o&&(s.programDateTime=o.toISOString()),r(null,s)}({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,i){return void 0===n&&(n=!0),void 0===i&&(i=2),xs({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:i,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(Pa.getComponent("Component")),bu={name:"videojs-http-streaming",VERSION:pu,canHandleSource:function(e,t){void 0===t&&(t={});var n=Pa.mergeOptions(Pa.options,t);return bu.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var i=Pa.mergeOptions(Pa.options,n);return t.vhs=new _u(e,t,i),Pa.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return Pa.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=vs(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){void 0===t&&(t={});var n=Pa.mergeOptions(Pa.options,t).vhs.overrideNative,i=void 0===n?!Pa.browser.IS_ANY_SAFARI:n,r=(0,P.t)(e);return!r||mu.supportsTypeNatively(r)&&!i?"":"maybe"}};(0,we.p7)("avc1.4d400d,mp4a.40.2")&&Pa.getTech("Html5").registerSourceHandler(bu,0),Pa.VhsHandler=_u,Object.defineProperty(Pa,"HlsHandler",{get:function(){return Pa.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),_u},configurable:!0}),Pa.VhsSourceHandler=bu,Object.defineProperty(Pa,"HlsSourceHandler",{get:function(){return Pa.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),bu},configurable:!0}),Pa.Vhs=mu,Object.defineProperty(Pa,"Hls",{get:function(){return Pa.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),mu},configurable:!0}),Pa.use||(Pa.registerComponent("Hls",mu),Pa.registerComponent("Vhs",mu)),Pa.options.vhs=Pa.options.vhs||{},Pa.options.hls=Pa.options.hls||{},Pa.registerPlugin?Pa.registerPlugin("reloadSourceOnError",fu):Pa.plugin("reloadSourceOnError",fu);var Tu=Pa},76262:function(e,t,n){var i,r=void 0!==n.g?n.g:"undefined"!=typeof window?window:{},a=n(73254);"undefined"!=typeof document?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"])||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=i},61355:function(e,t,n){var i;i="undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},e.exports=i},52002:function(e,t,n){"use strict";var i=n(77733),r=n(3384),a=n.n(r);function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var o=function e(t){var n=this;if(i.Z.browser.IS_IE8)for(var r in n=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},u=function(e){var t,n;function r(){var t,n=s(s(t=e.call(this)||this));if(i.Z.browser.IS_IE8)for(var o in n=a().createElement("custom"),r.prototype)"constructor"!==o&&(n[o]=r.prototype[o]);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||s(t)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var u=r.prototype;return u.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var n=this.levels_.length;return t=new o(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},u.removeQualityLevel=function(e){for(var t=null,n=0,i=this.length;n<i;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},u.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var i=this[t];if(i.id===e)return i}return null},u.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},r}(i.Z.EventTarget);for(var l in u.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},u.prototype.allowedEvents_)u.prototype["on"+l]=null;var c="2.0.9",h=function(e){return t=this,i.Z.mergeOptions({},e),n=t.qualityLevels,r=new u,t.on("dispose",(function e(){r.dispose(),t.qualityLevels=n,t.off("dispose",e)})),t.qualityLevels=function(){return r},t.qualityLevels.VERSION=c,r;var t,n,r};(i.Z.registerPlugin||i.Z.plugin)("qualityLevels",h),h.VERSION=c},83983:function(e,t,n){var i=n(51562),r=e.exports={WebVTT:n(77735),VTTCue:n(65997),VTTRegion:n(17193)};i.vttjs=r,i.WebVTT=r.WebVTT;var a=r.VTTCue,s=r.VTTRegion,o=i.VTTCue,u=i.VTTRegion;r.shim=function(){i.VTTCue=a,i.VTTRegion=s},r.restore=function(){i.VTTCue=o,i.VTTRegion=u},i.VTTCue||r.shim()},77735:function(e,t,n){var i=n(3384),r=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 a(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function s(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+(0|i)/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 o(){this.values=r(null)}function u(e,t,n,i){var r=i?e.split(i):[e];for(var a in r)if("string"==typeof r[a]){var s=r[a].split(n);2===s.length&&t(s[0].trim(),s[1].trim())}}function l(e,t,n){var i=e;function r(){var t=s(e);if(null===t)throw new a(a.Errors.BadTimeStamp,"Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=r(),l(),"--\x3e"!==e.substr(0,3))throw new a(a.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),l(),t.endTime=r(),l(),function(e,t){var i=new o;u(e,(function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),s=a[0];i.integer(e,s),i.percent(e,s)&&i.set("snapToLines",!1),i.alt(e,s,["auto"]),2===a.length&&i.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),i.percent(e,a[0]),2===a.length&&i.alt("positionAlign",a[1],["start","center","end"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");try{t.line=i.get("line","auto")}catch(e){}t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100);try{t.align=i.get("align","center")}catch(e){t.align=i.get("align","middle")}try{t.position=i.get("position","auto")}catch(e){t.position=i.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=i.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}a.prototype=r(Error.prototype),a.prototype.constructor=a,a.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.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 i=0;i<n.length;++i)if(t===n[i]){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 c=i.createElement&&i.createElement("textarea"),h={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},d={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)"},f={v:"title",lang:"lang"},p={rt:"ruby"};function m(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 i(e,t){return!p[t.localName]||p[t.localName]===e.localName}function r(t,n){var i=h[t];if(!i)return null;var r=e.document.createElement(i),a=f[t];return a&&n&&(r[a]=n.trim()),r}for(var a,o,u=e.document.createElement("div"),l=u,m=[];null!==(a=n());)if("<"!==a[0])l.appendChild(e.document.createTextNode((o=a,c.innerHTML=o,o=c.textContent,c.textContent="",o)));else{if("/"===a[1]){m.length&&m[m.length-1]===a.substr(2).replace(">","")&&(m.pop(),l=l.parentNode);continue}var g,v=s(a.substr(1,a.length-2));if(v){g=e.document.createProcessingInstruction("timestamp",v),l.appendChild(g);continue}var y=a.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(!(g=r(y[1],y[3])))continue;if(!i(l,g))continue;if(y[2]){var _=y[2].split(".");_.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(d.hasOwnProperty(n)){var i=t?"background-color":"color",r=d[n];g.style[i]=r}})),g.className=_.join(" ")}m.push(y[1]),l.appendChild(g),l=g}return u}var g=[[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 v(e){for(var t=0;t<g.length;t++){var n=g[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function y(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function i(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function r(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?r(e):t.childNodes?(i(e,t),r(e)):void 0}for(i(t,e);n=r(t);)for(var a=0;a<n.length;a++)if(v(n.charCodeAt(a)))return"rtl";return"ltr"}function _(){}function b(e,t,n){_.call(this),this.cue=t,this.cueDiv=m(e,t.text);var i={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(i,this.cueDiv),this.div=e.document.createElement("div"),i={direction:y(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(i),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case"start":r=t.position;break;case"center":r=t.position-t.size/2;break;case"end":r=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),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,i,r;if(e.div){n=e.div.offsetHeight,i=e.div.offsetWidth,r=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||n,this.bottom=e.bottom||r+(e.height||n),this.width=e.width||i,this.lineHeight=void 0!==t?t:e.lineHeight}function S(e,t,n,i){var r=new T(t),a=t.cue,s=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,i=0,r=0;r<n.length&&n[r]!==t;r++)"showing"===n[r].mode&&i++;return-1*++i}(a),o=[];if(a.snapToLines){var u;switch(a.vertical){case"":o=["+y","-y"],u="height";break;case"rl":o=["+x","-x"],u="width";break;case"lr":o=["-x","+x"],u="width"}var l=r.lineHeight,c=l*Math.round(s),h=n[u]+l,d=o[0];Math.abs(c)>h&&(c=c<0?-1:1,c*=Math.ceil(h/l)*l),s<0&&(c+=""===a.vertical?n.height:n.width,o=o.reverse()),r.move(d,c)}else{var f=r.lineHeight/n.height*100;switch(a.lineAlign){case"center":s-=f/2;break;case"end":s-=f}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(s,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(s,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(s,"%")})}o=["+y","-x","+x","-y"],r=new T(t)}var p=function(e,t){for(var r,a=new T(e),s=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(n,t[o])||e.within(n)&&e.overlapsAny(i);)e.move(t[o]);if(e.within(n))return e;var u=e.intersectPercentage(n);s>u&&(r=new T(e),s=u),e=new T(a)}return r||a}(r,o);t.move(p.toCSSCompatValues(n))}function w(){}_.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},_.prototype.formatStyle=function(e,t){return 0===e?0:e+t},b.prototype=r(_.prototype),b.prototype.constructor=b,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,i=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||i,height:e.height||t,bottom:e.bottom||i+(e.height||t),width:e.width||n}},w.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},w.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null},w.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var i=e.document.createElement("div");if(i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin="1.5%",n.appendChild(i),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var r=[],a=T.getSimpleBoxPosition(i),s={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var n,o,u=0;u<t.length;u++)o=t[u],n=new b(e,o,s),i.appendChild(n.div),S(0,n,a,r),o.displayState=n.div,r.push(T.getSimpleBoxPosition(n))}()}else for(var o=0;o<t.length;o++)i.appendChild(t[o].displayState)},w.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=[]},w.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof a))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t,n=this;function i(){for(var e=n.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var i=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,n.buffer=e.substr(t),i}e&&(n.buffer+=n.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===n.state){if(!/\r\n|\n/.test(n.buffer))return this;var c=(r=i()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new a(a.Errors.BadSignature);n.state="HEADER"}for(var h=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;switch(h?h=!1:r=i(),n.state){case"HEADER":/:/.test(r)?(t=r).match(/X-TIMESTAMP-MAP/)?u(t,(function(e,t){"X-TIMESTAMP-MAP"===e&&function(e){var t=new o;u(e,(function(e,n){switch(e){case"MPEGT":t.integer(e+"S",n);break;case"LOCA":t.set(e+"L",s(n))}}),/[^\d]:/,/,/),n.ontimestampmap&&n.ontimestampmap({MPEGTS:t.get("MPEGTS"),LOCAL:t.get("LOCAL")})}(t)}),/=/):u(t,(function(e,t){"Region"===e&&function(e){var t=new o;if(u(e,(function(e,n){switch(e){case"id":t.set(e,n);break;case"width":t.percent(e,n);break;case"lines":t.integer(e,n);break;case"regionanchor":case"viewportanchor":var i=n.split(",");if(2!==i.length)break;var r=new o;if(r.percent("x",i[0]),r.percent("y",i[1]),!r.has("x")||!r.has("y"))break;t.set(e+"X",r.get("x")),t.set(e+"Y",r.get("y"));break;case"scroll":t.alt(e,n,["up"])}}),/=/,/\s/),t.has("id")){var i=new(n.vttjs.VTTRegion||n.window.VTTRegion);i.width=t.get("width",100),i.lines=t.get("lines",3),i.regionAnchorX=t.get("regionanchorX",0),i.regionAnchorY=t.get("regionanchorY",100),i.viewportAnchorX=t.get("viewportanchorX",0),i.viewportAnchorY=t.get("viewportanchorY",100),i.scroll=t.get("scroll",""),n.onregion&&n.onregion(i),n.regionList.push({id:t.get("id"),region:i})}}(t)}),/:/):r||(n.state="ID");continue;case"NOTE":r||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){n.state="NOTE";break}if(!r)continue;n.cue=new(n.vttjs.VTTCue||n.window.VTTCue)(0,0,"");try{n.cue.align="center"}catch(e){n.cue.align="middle"}if(n.state="CUE",-1===r.indexOf("--\x3e")){n.cue.id=r;continue}case"CUE":try{l(r,n.cue,n.regionList)}catch(e){n.reportOrThrowError(e),n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":var d=-1!==r.indexOf("--\x3e");if(!r||d&&(h=!0)){n.oncue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}n.cue.text&&(n.cue.text+="\n"),n.cue.text+=r.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":r||(n.state="ID");continue}}}catch(e){n.reportOrThrowError(e),"CUETEXT"===n.state&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state="INITIAL"===n.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new a(a.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=w},65997:function(e){var t={"":1,lr:1,rl:1},n={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&&!!n[e.toLowerCase()]&&e.toLowerCase()}function r(e,n,r){this.hasBeenReset=!1;var a="",s=!1,o=e,u=n,l=r,c=null,h="",d=!0,f="auto",p="start",m="auto",g="auto",v=100,y="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return a},set:function(e){a=""+e}},pauseOnExit:{enumerable:!0,get:function(){return s},set:function(e){s=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=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 l},set:function(e){l=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return c},set:function(e){c=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return h},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===n)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");h=n,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return f},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");f=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 m},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return g},set:function(e){var t=i(e);t?(g=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return y},set:function(e){var t=i(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");y=t,this.hasBeenReset=!0}}}),this.displayState=void 0}r.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=r},17193:function(e){var t={"":!0,up:!0};function n(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,i=3,r=0,a=100,s=0,o=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!n(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");i=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!n(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!n(e))throw new Error("RegionAnchorY must be between 0 and 100.");r=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!n(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(e){if(!n(e))throw new Error("ViewportAnchorX must be between 0 and 100.");s=e}},scroll:{enumerable:!0,get:function(){return u},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);!1===n?console.warn("Scroll: an invalid or illegal string was specified."):u=n}}})}},27414:function(e,t,n){function i(e){this.options=e||{locator:{}}}function r(){this.cdata=!1}function a(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function s(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function o(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)}i.prototype.parseFromString=function(e,t){var n=this.options,i=new l,a=n.domBuilder||new r,o=n.errorHandler,u=n.locator,c=n.xmlns||{},h={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&a.setDocumentLocator(u),i.errorHandler=function(e,t,n){if(!e){if(t instanceof r)return t;e=t}var i={},a=e instanceof Function;function o(t){var r=e[t];!r&&a&&(r=2==e.length?function(n){e(t,n)}:e),i[t]=r&&function(e){r("[xmldom "+t+"]\t"+e+s(n))}||function(){}}return n=n||{},o("warning"),o("error"),o("fatalError"),i}(o,a,u),i.domBuilder=n.domBuilder||a,/\/x?html?$/.test(t)&&(h.nbsp=" ",h.copy="©",c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",e?i.parse(e,c,h):i.errorHandler.error("invalid doc source"),a.doc},r.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,i){var r=this.doc,s=r.createElementNS(e,n||t),o=i.length;u(this,s),this.currentElement=s,this.locator&&a(this.locator,s);for(var l=0;l<o;l++){e=i.getURI(l);var c=i.getValue(l),h=(n=i.getQName(l),r.createAttributeNS(e,n));this.locator&&a(i.getLocator(l),h),h.value=h.nodeValue=c,s.setAttributeNode(h)}},endElement:function(e,t,n){var i=this.currentElement;i.tagName,this.currentElement=i.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&a(this.locator,n),u(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=o.apply(this,arguments)){if(this.cdata)var i=this.doc.createCDATASection(e);else i=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(e)&&this.doc.appendChild(i),this.locator&&a(this.locator,i)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=o.apply(this,arguments);var i=this.doc.createComment(e);this.locator&&a(this.locator,i),u(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var i=this.doc.implementation;if(i&&i.createDocumentType){var r=i.createDocumentType(e,t,n);this.locator&&a(this.locator,r),u(this,r)}},warning:function(e){console.warn("[xmldom warning]\t"+e,s(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,s(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,s(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){r.prototype[e]=function(){return null}}));var l=n(73096).G,c=n(1855).DOMImplementation;n(1855),t.a=i},1855:function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function i(e,t){var i=e.prototype;if(Object.create){var r=Object.create(t.prototype);i.__proto__=r}if(!(i instanceof t)){function a(){}a.prototype=t.prototype,n(i,a=new a),e.prototype=i=a}i.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),i.constructor=e)}var r={},a=r.ELEMENT_NODE=1,s=r.ATTRIBUTE_NODE=2,o=r.TEXT_NODE=3,u=r.CDATA_SECTION_NODE=4,l=r.ENTITY_REFERENCE_NODE=5,c=r.ENTITY_NODE=6,h=r.PROCESSING_INSTRUCTION_NODE=7,d=r.COMMENT_NODE=8,f=r.DOCUMENT_NODE=9,p=r.DOCUMENT_TYPE_NODE=10,m=r.DOCUMENT_FRAGMENT_NODE=11,g=r.NOTATION_NODE=12,v={},y={},_=(v.INDEX_SIZE_ERR=(y[1]="Index size error",1),v.DOMSTRING_SIZE_ERR=(y[2]="DOMString size error",2),v.HIERARCHY_REQUEST_ERR=(y[3]="Hierarchy request error",3)),b=(v.WRONG_DOCUMENT_ERR=(y[4]="Wrong document",4),v.INVALID_CHARACTER_ERR=(y[5]="Invalid character",5),v.NO_DATA_ALLOWED_ERR=(y[6]="No data allowed",6),v.NO_MODIFICATION_ALLOWED_ERR=(y[7]="No modification allowed",7),v.NOT_FOUND_ERR=(y[8]="Not found",8)),T=(v.NOT_SUPPORTED_ERR=(y[9]="Not supported",9),v.INUSE_ATTRIBUTE_ERR=(y[10]="Attribute in use",10));function S(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,y[e]),this.message=y[e],Error.captureStackTrace&&Error.captureStackTrace(this,S);return n.code=e,t&&(this.message=this.message+": "+t),n}function w(){}function E(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 i=e._refresh(e._node);ne(e,"length",i.length),n(i,e),e._inc=t}}function C(){}function x(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function A(e,t,n,i){if(i?t[x(t,i)]=n:t[t.length++]=n,e){n.ownerElement=e;var r=e.ownerDocument;r&&(i&&M(r,e,i),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(r,e,n))}}function I(e,t,n){var i=x(t,n);if(!(i>=0))throw S(b,new Error(e.tagName+"@"+n));for(var r=t.length-1;i<r;)t[i]=t[++i];if(t.length=r,e){var a=e.ownerDocument;a&&(M(a,e,n),n.ownerElement=null)}}function O(e){if(this._features={},e)for(var t in e)this._features=e[t]}function P(){}function L(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function D(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(D(e,t))return!0}while(e=e.nextSibling)}function R(){}function M(e,t,n,i){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function N(e,t,n){if(e&&e._inc){e._inc++;var i=t.childNodes;if(n)i[i.length++]=n;else{for(var r=t.firstChild,a=0;r;)i[a++]=r,r=r.nextSibling;i.length=a}}}function U(e,t){var n=t.previousSibling,i=t.nextSibling;return n?n.nextSibling=i:e.firstChild=i,i?i.previousSibling=n:e.lastChild=n,N(e.ownerDocument,e),t}function j(e,t,n){var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===m){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var s=n?n.previousSibling:e.lastChild;r.previousSibling=s,a.nextSibling=n,s?s.nextSibling=r:e.firstChild=r,null==n?e.lastChild=a:n.previousSibling=a;do{r.parentNode=e}while(r!==a&&(r=r.nextSibling));return N(e.ownerDocument||e,e),t.nodeType==m&&(t.firstChild=t.lastChild=null),t}function B(){this._nsMap={}}function F(){}function V(){}function H(){}function W(){}function q(){}function z(){}function G(){}function X(){}function K(){}function Y(){}function $(){}function Q(e,t){var n=[],i=9==this.nodeType?this.documentElement:this,r=i.prefix,a=i.namespaceURI;if(a&&null==r&&null==(r=i.lookupPrefix(a)))var s=[{namespace:a,prefix:null}];return Z(this,n,e,t,s),n.join("")}function J(e,t,n){var i=e.prefix||"",r=e.namespaceURI;if(!i&&!r)return!1;if("xml"===i&&"http://www.w3.org/XML/1998/namespace"===r||"http://www.w3.org/2000/xmlns/"==r)return!1;for(var a=n.length;a--;){var s=n[a];if(s.prefix==i)return s.namespace!=r}return!0}function Z(e,t,n,i,r){if(i){if(!(e=i(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case a:r||(r=[]),r.length;var c=e.attributes,g=c.length,v=e.firstChild,y=e.tagName;n="http://www.w3.org/1999/xhtml"===e.namespaceURI||n,t.push("<",y);for(var _=0;_<g;_++)"xmlns"==(b=c.item(_)).prefix?r.push({prefix:b.localName,namespace:b.value}):"xmlns"==b.nodeName&&r.push({prefix:"",namespace:b.value});for(_=0;_<g;_++){var b;if(J(b=c.item(_),0,r)){var T=b.prefix||"",S=b.namespaceURI,w=T?" xmlns:"+T:" xmlns";t.push(w,'="',S,'"'),r.push({prefix:T,namespace:S})}Z(b,t,n,i,r)}if(J(e,0,r)&&(T=e.prefix||"",S=e.namespaceURI,w=T?" xmlns:"+T:" xmlns",t.push(w,'="',S,'"'),r.push({prefix:T,namespace:S})),v||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(y)){if(t.push(">"),n&&/^script$/i.test(y))for(;v;)v.data?t.push(v.data):Z(v,t,n,i,r),v=v.nextSibling;else for(;v;)Z(v,t,n,i,r),v=v.nextSibling;t.push("</",y,">")}else t.push("/>");return;case f:case m:for(v=e.firstChild;v;)Z(v,t,n,i,r),v=v.nextSibling;return;case s:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,L),'"');case o:return t.push(e.data.replace(/[<&]/g,L));case u:return t.push("<![CDATA[",e.data,"]]>");case d:return t.push("\x3c!--",e.data,"--\x3e");case p:var E=e.publicId,k=e.systemId;if(t.push("<!DOCTYPE ",e.name),E)t.push(' PUBLIC "',E),k&&"."!=k&&t.push('" "',k),t.push('">');else if(k&&"."!=k)t.push(' SYSTEM "',k,'">');else{var C=e.internalSubset;C&&t.push(" [",C,"]"),t.push(">")}return;case h:return t.push("<?",e.target," ",e.data,"?>");case l:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ee(e,t,n){var i;switch(t.nodeType){case a:(i=t.cloneNode(!1)).ownerDocument=e;case m:break;case s:n=!0}if(i||(i=t.cloneNode(!1)),i.ownerDocument=e,i.parentNode=null,n)for(var r=t.firstChild;r;)i.appendChild(ee(e,r,n)),r=r.nextSibling;return i}function te(e,t,n){var i=new t.constructor;for(var r in t){var o=t[r];"object"!=typeof o&&o!=i[r]&&(i[r]=o)}switch(t.childNodes&&(i.childNodes=new w),i.ownerDocument=e,i.nodeType){case a:var u=t.attributes,l=i.attributes=new C,c=u.length;l._ownerElement=i;for(var h=0;h<c;h++)i.setAttributeNode(te(e,u.item(h),!0));break;case s:n=!0}if(n)for(var d=t.firstChild;d;)i.appendChild(te(e,d,n)),d=d.nextSibling;return i}function ne(e,t,n){e[t]=n}v.INVALID_STATE_ERR=(y[11]="Invalid state",11),v.SYNTAX_ERR=(y[12]="Syntax error",12),v.INVALID_MODIFICATION_ERR=(y[13]="Invalid modification",13),v.NAMESPACE_ERR=(y[14]="Invalid namespace",14),v.INVALID_ACCESS_ERR=(y[15]="Invalid access",15),S.prototype=Error.prototype,n(v,S),w.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],i=0;i<this.length;i++)Z(this[i],n,e,t);return n.join("")}},E.prototype.item=function(e){return k(this),this[e]},i(E,w),C.prototype={length:0,item:w.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 S(T);var n=this.getNamedItem(e.nodeName);return A(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new S(T);return t=this.getNamedItemNS(e.namespaceURI,e.localName),A(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return I(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return I(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var i=this[n];if(i.localName==t&&i.namespaceURI==e)return i}return null}},O.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var i=new R;if(i.implementation=this,i.childNodes=new w,i.doctype=n,n&&i.appendChild(n),t){var r=i.createElementNS(e,t);i.appendChild(r)}return i},createDocumentType:function(e,t,n){var i=new z;return i.name=e,i.nodeName=e,i.publicId=t,i.systemId=n,i}},P.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 j(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return U(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return te(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==o&&e.nodeType==o?(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 i in n)if(n[i]==e)return i;t=t.nodeType==s?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==s?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(r,P),n(r,P.prototype),R.prototype={nodeName:"#document",nodeType:f,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==m){for(var n=e.firstChild;n;){var i=n.nextSibling;this.insertBefore(n,t),n=i}return e}return null==this.documentElement&&e.nodeType==a&&(this.documentElement=e),j(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),U(this,e)},importNode:function(e,t){return ee(this,e,t)},getElementById:function(e){var t=null;return D(this.documentElement,(function(n){if(n.nodeType==a&&n.getAttribute("id")==e)return t=n,!0})),t},createElement:function(e){var t=new B;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new w,(t.attributes=new C)._ownerElement=t,t},createDocumentFragment:function(){var e=new Y;return e.ownerDocument=this,e.childNodes=new w,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 q;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 K;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new B,i=t.split(":"),r=n.attributes=new C;return n.childNodes=new w,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,r._ownerElement=n,n},createAttributeNS:function(e,t){var n=new F,i=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,n}},i(R,P),B.prototype={nodeType:a,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===m?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var i=e.lastChild;n.removeChild(t),i=e.lastChild}return i=e.lastChild,t.parentNode=e,t.previousSibling=i,t.nextSibling=null,i?i.nextSibling=t:e.firstChild=t,e.lastChild=t,N(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 i=this.ownerDocument.createAttributeNS(e,t);i.value=i.nodeValue=""+n,this.setAttributeNode(i)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new E(this,(function(t){var n=[];return D(t,(function(i){i===t||i.nodeType!=a||"*"!==e&&i.tagName!=e||n.push(i)})),n}))},getElementsByTagNameNS:function(e,t){return new E(this,(function(n){var i=[];return D(n,(function(r){r===n||r.nodeType!==a||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||i.push(r)})),i}))}},R.prototype.getElementsByTagName=B.prototype.getElementsByTagName,R.prototype.getElementsByTagNameNS=B.prototype.getElementsByTagNameNS,i(B,P),F.prototype.nodeType=s,i(F,P),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(y[_])},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}},i(V,P),H.prototype={nodeName:"#text",nodeType:o,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 i=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},i(H,V),W.prototype={nodeName:"#comment",nodeType:d},i(W,V),q.prototype={nodeName:"#cdata-section",nodeType:u},i(q,V),z.prototype.nodeType=p,i(z,P),G.prototype.nodeType=g,i(G,P),X.prototype.nodeType=c,i(X,P),K.prototype.nodeType=l,i(K,P),Y.prototype.nodeName="#document-fragment",Y.prototype.nodeType=m,i(Y,P),$.prototype.nodeType=h,i($,P),P.prototype.toString=Q;try{if(Object.defineProperty){function ie(e){switch(e.nodeType){case a:case m:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(ie(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(E.prototype,"length",{get:function(){return k(this),this.$$length}}),Object.defineProperty(P.prototype,"textContent",{get:function(){return ie(this)},set:function(e){switch(this.nodeType){case a:case m: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}}}),ne=function(e,t,n){e["$$"+t]=n}}}catch(re){}t.DOMImplementation=O},73096: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]/,i=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),r=new RegExp("^"+n.source+i.source+"*(?::"+n.source+i.source+"*)?$");function a(){}function s(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function o(e,t,n,i,r,a){for(var s,o=++t,u=0;;){var l=e.charAt(o);switch(l){case"=":if(1===u)s=e.slice(t,o),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&&(a.warning('attribute value must after "="'),s=e.slice(t,o)),t=o+1,!((o=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");c=e.slice(t,o).replace(/&#?\w+;/g,r),n.add(s,c,t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');c=e.slice(t,o).replace(/&#?\w+;/g,r),n.add(s,c,t),a.warning('attribute "'+s+'" missed start quot('+l+")!!"),t=o+1,u=5}break;case"/":switch(u){case 0:n.setTagName(e.slice(t,o));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 a.error("unexpected end of input"),0==u&&n.setTagName(e.slice(t,o)),o;case">":switch(u){case 0:n.setTagName(e.slice(t,o));case 5:case 6:case 7:break;case 4:case 1:"/"===(c=e.slice(t,o)).slice(-1)&&(n.closed=!0,c=c.slice(0,-1));case 2:2===u&&(c=s),4==u?(a.warning('attribute "'+c+'" missed quot(")!!'),n.add(s,c.replace(/&#?\w+;/g,r),t)):("http://www.w3.org/1999/xhtml"===i[""]&&c.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),n.add(c,c,t));break;case 3:throw new Error("attribute value missed!!")}return o;case"€":l=" ";default:if(l<=" ")switch(u){case 0:n.setTagName(e.slice(t,o)),u=6;break;case 1:s=e.slice(t,o),u=2;break;case 4:var c=e.slice(t,o).replace(/&#?\w+;/g,r);a.warning('attribute "'+c+'" missed quot(")!!'),n.add(s,c,t);case 5:u=6}else switch(u){case 2:n.tagName,"http://www.w3.org/1999/xhtml"===i[""]&&s.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),n.add(s,s,t),t=o,u=1;break;case 5:a.warning('attribute space is required"'+s+'"!!');case 6:u=1,t=o;break;case 3:u=4,t=o;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}o++}}function u(e,t,n){for(var i=e.tagName,r=null,a=e.length;a--;){var s=e[a],o=s.qName,u=s.value;if((f=o.indexOf(":"))>0)var l=s.prefix=o.slice(0,f),c=o.slice(f+1),d="xmlns"===l&&c;else c=o,l=null,d="xmlns"===o&&"";s.localName=c,!1!==d&&(null==r&&(r={},h(n,n={})),n[d]=r[d]=u,s.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(d,u))}for(a=e.length;a--;)(l=(s=e[a]).prefix)&&("xml"===l&&(s.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==l&&(s.uri=n[l||""]));var f;(f=i.indexOf(":"))>0?(l=e.prefix=i.slice(0,f),c=e.localName=i.slice(f+1)):(l=null,c=e.localName=i);var p=e.uri=n[l||""];if(t.startElement(p,c,i,e),!e.closed)return e.currentNSMap=n,e.localNSMap=r,!0;if(t.endElement(p,c,i),r)for(l in r)t.endPrefixMapping(l)}function l(e,t,n,i,r){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("</"+n+">",t),s=e.substring(t+1,a);if(/[&<]/.test(s))return/^script$/i.test(n)?(r.characters(s,0,s.length),a):(s=s.replace(/&#?\w+;/g,i),r.characters(s,0,s.length),a)}return t+1}function c(e,t,n,i){var r=i[n];return null==r&&((r=e.lastIndexOf("</"+n+">"))<t&&(r=e.lastIndexOf("</"+n)),i[n]=r),r<t}function h(e,t){for(var n in e)t[n]=e[n]}function d(e,t,n,i){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(r=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,r-t-4),r+3):(i.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var r=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,r-t-9),n.endCDATA(),r+3}var a=function(e,t){var n,i=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(r.lastIndex=t,r.exec(e);n=r.exec(e);)if(i.push(n),n[1])return i}(e,t),s=a.length;if(s>1&&/!doctype/i.test(a[0][0])){var o=a[1][0],u=s>3&&/^public$/i.test(a[2][0])&&a[3][0],l=s>4&&a[4][0],c=a[s-1];return n.startDTD(o,u&&u.replace(/^(['"])(.*?)\1$/,"$2"),l&&l.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),c.index+c[0].length}return-1}function f(e,t,n){var i=e.indexOf("?>",t);if(i){var r=e.substring(t,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return r?(r[0].length,n.processingInstruction(r[1],r[2]),i+2):-1}return-1}function p(e){}function m(e,t){return e.__proto__=t,e}a.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),h(t,t={}),function(e,t,n,i,r){function a(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"))):(r.error("entity not found:"+e),e)}function h(t){if(t>S){var n=e.substring(S,t).replace(/&#?\w+;/g,a);_&&m(S),i.characters(n,0,t-S),S=t}}function m(t,n){for(;t>=v&&(n=y.exec(e));)g=n.index,v=g+n[0].length,_.lineNumber++;_.columnNumber=t-g+1}for(var g=0,v=0,y=/.*(?:\r\n?|\n)|.*$/g,_=i.locator,b=[{currentNSMap:t}],T={},S=0;;){try{var w=e.indexOf("<",S);if(w<0){if(!e.substr(S).match(/^\s*$/)){var E=i.doc,k=E.createTextNode(e.substr(S));E.appendChild(k),i.currentElement=k}return}switch(w>S&&h(w),e.charAt(w+1)){case"/":var C=e.indexOf(">",w+3),x=e.substring(w+2,C),A=b.pop();C<0?(x=e.substring(w+2).replace(/[\s<].*/,""),r.error("end tag name: "+x+" is not complete:"+A.tagName),C=w+1+x.length):x.match(/\s</)&&(x=x.replace(/[\s<].*/,""),r.error("end tag name: "+x+" maybe not complete"),C=w+1+x.length);var I=A.localNSMap,O=A.tagName==x;if(O||A.tagName&&A.tagName.toLowerCase()==x.toLowerCase()){if(i.endElement(A.uri,A.localName,x),I)for(var P in I)i.endPrefixMapping(P);O||r.fatalError("end tag name: "+x+" is not match the current start tagName:"+A.tagName)}else b.push(A);C++;break;case"?":_&&m(w),C=f(e,w,i);break;case"!":_&&m(w),C=d(e,w,i,r);break;default:_&&m(w);var L=new p,D=b[b.length-1].currentNSMap,R=(C=o(e,w,L,D,a,r),L.length);if(!L.closed&&c(e,C,L.tagName,T)&&(L.closed=!0,n.nbsp||r.warning("unclosed xml attribute")),_&&R){for(var M=s(_,{}),N=0;N<R;N++){var U=L[N];m(U.offset),U.locator=s(_,{})}i.locator=M,u(L,i,D)&&b.push(L),i.locator=_}else u(L,i,D)&&b.push(L);"http://www.w3.org/1999/xhtml"!==L.uri||L.closed?C++:C=l(e,C,L.tagName,a,i)}}catch(e){r.error("element parse error: "+e),C=-1}C>S?S=C:h(Math.max(w,S)+1)}}(e,t,n,i,this.errorHandler),i.endDocument()}},p.prototype={setTagName:function(e){if(!r.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!r.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}},m({},m.prototype)instanceof m||(m=function(e,t){function n(){}for(t in n.prototype=t,n=new n,e)n[t]=e[t];return n}),t.G=a},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}}]);