@clickview/player 0.0.0-dev.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 (190) hide show
  1. package/.eslintrc.json +3 -0
  2. package/.storybook/main.js +21 -0
  3. package/.storybook/preview-head.html +3 -0
  4. package/.storybook/stories/Base.stories.tsx +115 -0
  5. package/.storybook/stories/Clips.stories.tsx +64 -0
  6. package/.storybook/stories/Interactives.stories.tsx +65 -0
  7. package/.storybook/stories/Subtitles.stories.tsx +22 -0
  8. package/.storybook/stories/assets/chapters.vtt +19 -0
  9. package/.storybook/stories/assets/en.vtt +8 -0
  10. package/.storybook/stories/assets/es.vtt +8 -0
  11. package/.storybook/stories/assets/fr.vtt +8 -0
  12. package/.storybook/stories/assets/interactive.json +451 -0
  13. package/.storybook/stories/assets/sample_1280x720.mp4.jpg +0 -0
  14. package/.storybook/stories/assets/sample_1280x720.mp4.vtx +0 -0
  15. package/.storybook/stories/assets/thumbnails.vtt +62 -0
  16. package/.storybook/stories/assets/vertical.mp4 +0 -0
  17. package/.storybook/stories/utils/Wrap.tsx +18 -0
  18. package/.storybook/stories/utils/mock-playerapi.ts +181 -0
  19. package/.storybook/stories/utils/mock-setup.ts +23 -0
  20. package/README.md +1 -0
  21. package/dist/bundle.js +1 -0
  22. package/dist/font.scss +59 -0
  23. package/dist/libs/analytics/src/clients/CollectionApiClient.d.ts +48 -0
  24. package/dist/libs/analytics/src/constants/CountryRegionMapping.d.ts +7 -0
  25. package/dist/libs/analytics/src/constants/Regions.d.ts +6 -0
  26. package/dist/libs/analytics/src/enums/CountryCode.d.ts +5 -0
  27. package/dist/libs/analytics/src/enums/RegionName.d.ts +5 -0
  28. package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +316 -0
  29. package/dist/libs/analytics/src/interfaces/Config.d.ts +3 -0
  30. package/dist/libs/analytics/src/interfaces/Folder.d.ts +3 -0
  31. package/dist/libs/analytics/src/interfaces/HashObject.d.ts +3 -0
  32. package/dist/libs/analytics/src/interfaces/Owner.d.ts +3 -0
  33. package/dist/libs/analytics/src/interfaces/Playlist.d.ts +3 -0
  34. package/dist/libs/analytics/src/interfaces/Rating.d.ts +4 -0
  35. package/dist/libs/analytics/src/interfaces/Region.d.ts +5 -0
  36. package/dist/libs/analytics/src/interfaces/RegionalUrl.d.ts +5 -0
  37. package/dist/libs/analytics/src/interfaces/Resource.d.ts +5 -0
  38. package/dist/libs/analytics/src/interfaces/Series.d.ts +3 -0
  39. package/dist/libs/analytics/src/interfaces/Subtitle.d.ts +4 -0
  40. package/dist/libs/analytics/src/interfaces/User.d.ts +17 -0
  41. package/dist/libs/analytics/src/interfaces/VersionData.d.ts +4 -0
  42. package/dist/libs/analytics/src/interfaces/Video.d.ts +16 -0
  43. package/dist/libs/analytics/src/interfaces/index.d.ts +15 -0
  44. package/dist/libs/analytics/src/interfaces/primitives/BaseObject.d.ts +7 -0
  45. package/dist/libs/analytics/src/models/AnalyticsEvent.d.ts +49 -0
  46. package/dist/libs/analytics/src/models/CollectionEvent.d.ts +61 -0
  47. package/dist/libs/analytics/src/utils/CollectionApiClientHelper.d.ts +6 -0
  48. package/dist/libs/analytics/src/utils/DataFormatHelper.d.ts +14 -0
  49. package/dist/libs/analytics/src/utils/EventWhitelistHelper.d.ts +19 -0
  50. package/dist/libs/analytics/src/utils/TypeHelper.d.ts +4 -0
  51. package/dist/libs/analytics/src/utils/UploadDataFormatHelper.d.ts +10 -0
  52. package/dist/libs/analytics/src/utils/UrlHelper.d.ts +3 -0
  53. package/dist/libs/analytics/src/utils/UserAgentHelper.d.ts +10 -0
  54. package/dist/libs/analytics/src/utils/VideoDataFormatHelper.d.ts +42 -0
  55. package/dist/libs/common/src/backbone/constants/CommonChannels.d.ts +5 -0
  56. package/dist/libs/common/src/backbone/core/AppLink.d.ts +37 -0
  57. package/dist/libs/common/src/backbone/core/BaseAppRouter.d.ts +99 -0
  58. package/dist/libs/common/src/backbone/core/BaseApplication.d.ts +76 -0
  59. package/dist/libs/common/src/backbone/core/BaseBehavior.d.ts +6 -0
  60. package/dist/libs/common/src/backbone/core/BaseCollection.d.ts +7 -0
  61. package/dist/libs/common/src/backbone/core/BaseCollectionView.d.ts +16 -0
  62. package/dist/libs/common/src/backbone/core/BaseError.d.ts +18 -0
  63. package/dist/libs/common/src/backbone/core/BaseLayoutView.d.ts +11 -0
  64. package/dist/libs/common/src/backbone/core/BaseModel.d.ts +27 -0
  65. package/dist/libs/common/src/backbone/core/BaseNestedModel.d.ts +21 -0
  66. package/dist/libs/common/src/backbone/core/BaseService.d.ts +10 -0
  67. package/dist/libs/common/src/backbone/core/BaseView.d.ts +131 -0
  68. package/dist/libs/common/src/backbone/core/EventNames.d.ts +16 -0
  69. package/dist/libs/common/src/backbone/core/LayoutService.d.ts +31 -0
  70. package/dist/libs/common/src/backbone/core/ListenToRadio.d.ts +3 -0
  71. package/dist/libs/common/src/backbone/core/LocationUtils.d.ts +23 -0
  72. package/dist/libs/common/src/backbone/core/Middleware.d.ts +10 -0
  73. package/dist/libs/common/src/backbone/core/Shell.d.ts +79 -0
  74. package/dist/libs/common/src/backbone/core/Types.d.ts +12 -0
  75. package/dist/libs/common/src/backbone/core/index.d.ts +18 -0
  76. package/dist/libs/common/src/backbone/errors/DevError.d.ts +4 -0
  77. package/dist/libs/common/src/backbone/index.d.ts +2 -0
  78. package/dist/libs/common/src/backbone/interfaces/StickitBinding.d.ts +38 -0
  79. package/dist/libs/common/src/backbone/services/EnvironmentVariables.d.ts +13 -0
  80. package/dist/libs/common/src/react/interfaces/HashObject.d.ts +3 -0
  81. package/dist/libs/shared/src/interfaces/models/primitives/BaseObject.d.ts +7 -0
  82. package/dist/player-app.css +71 -0
  83. package/dist/player-app.js +52 -0
  84. package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-item.d.ts +79 -0
  85. package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-items.d.ts +55 -0
  86. package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-load-progress.d.ts +55 -0
  87. package/dist/projects/player/src/components/chapter-bar-items/chapter-bar-play-progress.d.ts +55 -0
  88. package/dist/projects/player/src/components/chapter-seek-bar/chapter-seek-bar.d.ts +1 -0
  89. package/dist/projects/player/src/components/chapters-button/chapter-menu-item.d.ts +60 -0
  90. package/dist/projects/player/src/components/chapters-button/chapters-button.d.ts +1 -0
  91. package/dist/projects/player/src/components/cog-button/cog-button.d.ts +38 -0
  92. package/dist/projects/player/src/components/collapserator/collapserator.d.ts +4 -0
  93. package/dist/projects/player/src/components/mouse-time-display/mouse-time-display.d.ts +3 -0
  94. package/dist/projects/player/src/components/playback-rate-button/playback-rate-button.d.ts +1 -0
  95. package/dist/projects/player/src/components/progress-control/progress-control.d.ts +1 -0
  96. package/dist/projects/player/src/components/quality-selector/quality-button.d.ts +1 -0
  97. package/dist/projects/player/src/components/quality-selector/quality-menu-item.d.ts +17 -0
  98. package/dist/projects/player/src/components/subs-caps-button/subs-caps-button.d.ts +1 -0
  99. package/dist/projects/player/src/components/thumbnail-display/thumbnail-display.d.ts +66 -0
  100. package/dist/projects/player/src/components/time-tooltip/time-tooltip.d.ts +15 -0
  101. package/dist/projects/player/src/components/time-wrapper/time-wrapper.d.ts +1 -0
  102. package/dist/projects/player/src/index.d.ts +12 -0
  103. package/dist/projects/player/src/interfaces/CollapsibleComponent.d.ts +10 -0
  104. package/dist/projects/player/src/interfaces/models/ApiError.d.ts +4 -0
  105. package/dist/projects/player/src/interfaces/models/PlaybackObject.d.ts +32 -0
  106. package/dist/projects/player/src/players/base-player.d.ts +64 -0
  107. package/dist/projects/player/src/players/create-clip-player.d.ts +16 -0
  108. package/dist/projects/player/src/players/interactive-player.d.ts +11 -0
  109. package/dist/projects/player/src/players/player.d.ts +15 -0
  110. package/dist/projects/player/src/plugins/clip-plugin/clip-plugin.d.ts +50 -0
  111. package/dist/projects/player/src/plugins/create-clip-plugin/components/clip-timepoint-selector/clip-timepoint-selector-handle.d.ts +54 -0
  112. package/dist/projects/player/src/plugins/create-clip-plugin/components/clip-timepoint-selector/clip-timepoint-selector.d.ts +89 -0
  113. package/dist/projects/player/src/plugins/create-clip-plugin/components/create-clip-seek-bar/create-clip-seek-bar.d.ts +14 -0
  114. package/dist/projects/player/src/plugins/create-clip-plugin/create-clip-plugin.d.ts +14 -0
  115. package/dist/projects/player/src/plugins/example-plugin/components/example-button/example-button.d.ts +1 -0
  116. package/dist/projects/player/src/plugins/example-plugin/components/example-react-button/example-react-button.d.ts +1 -0
  117. package/dist/projects/player/src/plugins/example-plugin/example-plugin.d.ts +2 -0
  118. package/dist/projects/player/src/plugins/fullscreen-on-rotate-plugin/fullscreen-on-rotate-plugin.d.ts +1 -0
  119. package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-components.d.ts +4 -0
  120. package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-short-answer.ts/create-short-answer.d.ts +10 -0
  121. package/dist/projects/player/src/plugins/interactive-plugin/components/create-components/create-type-selector/create-type-selector.d.ts +8 -0
  122. package/dist/projects/player/src/plugins/interactive-plugin/components/feedback/feedback.d.ts +7 -0
  123. package/dist/projects/player/src/plugins/interactive-plugin/components/incomplete-alert/incomplete-alert.d.ts +2 -0
  124. package/dist/projects/player/src/plugins/interactive-plugin/components/interactive/interactive-component.d.ts +1 -0
  125. package/dist/projects/player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-item.d.ts +21 -0
  126. package/dist/projects/player/src/plugins/interactive-plugin/components/seek-bar/interactive-bar-items.d.ts +66 -0
  127. package/dist/projects/player/src/plugins/interactive-plugin/components/timepoint/timepoint-component.d.ts +21 -0
  128. package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/annotation/annotation-interaction.d.ts +3 -0
  129. package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/image/image-interaction.d.ts +4 -0
  130. package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/missing-word/missing-word-interaction.d.ts +9 -0
  131. package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/multiple-choice/multiple-choice-interaction.d.ts +10 -0
  132. package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/short-answer/short-answer-interaction.d.ts +9 -0
  133. package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/view-components.d.ts +4 -0
  134. package/dist/projects/player/src/plugins/interactive-plugin/components/view-components/view-interaction-heading/view-interaction-heading.d.ts +8 -0
  135. package/dist/projects/player/src/plugins/interactive-plugin/interactive-plugin.d.ts +1 -0
  136. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/InteractionComponent.d.ts +3 -0
  137. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/InteractionProps.d.ts +8 -0
  138. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/InteractiveMode.d.ts +4 -0
  139. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/SubmissionFunction.d.ts +2 -0
  140. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/ValidationFunction.d.ts +2 -0
  141. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/index.d.ts +6 -0
  142. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/models/ActionableItem.d.ts +6 -0
  143. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/models/Interaction.d.ts +14 -0
  144. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/models/InteractionType.d.ts +7 -0
  145. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/models/InteractionTypeId.d.ts +8 -0
  146. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/models/Interactive.d.ts +7 -0
  147. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/models/Timepoint.d.ts +9 -0
  148. package/dist/projects/player/src/plugins/interactive-plugin/interfaces/models/index.d.ts +6 -0
  149. package/dist/projects/player/src/plugins/interactive-plugin/utils/getInteractionComponents.d.ts +2 -0
  150. package/dist/projects/player/src/plugins/interactive-plugin/utils/getInteractionStateId.d.ts +2 -0
  151. package/dist/projects/player/src/plugins/interactive-plugin/utils/getSubmissionFunction.d.ts +2 -0
  152. package/dist/projects/player/src/plugins/interactive-plugin/utils/getTimepointStateId.d.ts +2 -0
  153. package/dist/projects/player/src/plugins/interactive-plugin/utils/getValidationFunction.d.ts +2 -0
  154. package/dist/projects/player/src/plugins/interactive-plugin/utils/useInteractiveTrack.d.ts +17 -0
  155. package/dist/projects/player/src/plugins/open-externally-plugin/components/open-externally-button.d.ts +1 -0
  156. package/dist/projects/player/src/plugins/open-externally-plugin/interfaces/ExternalLinkOptions.d.ts +3 -0
  157. package/dist/projects/player/src/plugins/open-externally-plugin/open-externally-plugin.d.ts +1 -0
  158. package/dist/projects/player/src/plugins/persist-volume-plugin/persist-volume-plugin.d.ts +1 -0
  159. package/dist/projects/player/src/plugins/persist-volume-plugin/persist-volume-plugin.test.d.ts +1 -0
  160. package/dist/projects/player/src/plugins/progress-reporter-plugin/progress-reporter-plugin.d.ts +9 -0
  161. package/dist/projects/player/src/plugins/progressive-files-plugin/ProgressiveFilesPluginOptions.d.ts +4 -0
  162. package/dist/projects/player/src/plugins/progressive-files-plugin/ProgressiveRepresentation.d.ts +10 -0
  163. package/dist/projects/player/src/plugins/progressive-files-plugin/interfaces/Source.d.ts +6 -0
  164. package/dist/projects/player/src/plugins/progressive-files-plugin/progressive-files-plugin.d.ts +38 -0
  165. package/dist/projects/player/src/plugins/touch-controls-plugin/components/touch-controls/touch-controls.d.ts +59 -0
  166. package/dist/projects/player/src/plugins/touch-controls-plugin/touch-controls-plugin.d.ts +1 -0
  167. package/dist/projects/player/src/react/CreateClipPlayer.d.ts +3 -0
  168. package/dist/projects/player/src/react/EmbeddedPlayer.d.ts +7 -0
  169. package/dist/projects/player/src/react/InteractivePlayer.d.ts +9 -0
  170. package/dist/projects/player/src/react/Player.d.ts +8 -0
  171. package/dist/projects/player/src/react/react-component.d.ts +56 -0
  172. package/dist/projects/player/src/services/analytics-service.d.ts +15 -0
  173. package/dist/projects/player/src/utils/ajax-helper.d.ts +6 -0
  174. package/dist/projects/player/src/utils/fn.d.ts +14 -0
  175. package/dist/projects/player/src/utils/formatTime.d.ts +5 -0
  176. package/dist/projects/player/src/utils/hotkeys.d.ts +5 -0
  177. package/dist/projects/player/src/utils/scrollbar-helper.d.ts +6 -0
  178. package/dist/projects/player/src/utils/track-helper.d.ts +7 -0
  179. package/dist/projects/player/test/players/test-player.d.ts +17 -0
  180. package/dist/projects/player/test/setupTests.d.ts +0 -0
  181. package/dist/projects/player/test/utils/test-helpers.d.ts +8 -0
  182. package/jest.config.js +13 -0
  183. package/package.json +58 -0
  184. package/test/players/test-player.ts +31 -0
  185. package/test/setupTests.ts +8 -0
  186. package/test/utils/test-helpers.ts +22 -0
  187. package/tooling/externals.js +56 -0
  188. package/tooling/font-webpack.config.js +44 -0
  189. package/typings/libs/videojs-contrib-quality-levels.d.ts +29 -0
  190. package/typings/utils/imports.d.ts +12 -0
@@ -0,0 +1,52 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@clickview/player"]=t():e["@clickview/player"]=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},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=332)}([function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(25))},function(e,t,n){"use strict";e.exports=n(268)},function(e,t,n){(function(t){var r,i=void 0!==t?t:"undefined"!=typeof window?window:{},o=n(269);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),e.exports=r}).call(this,n(25))},function(e,t,n){var r=n(8),i=n(30).f,o=n(18),a=n(26),s=n(82),u=n(163),l=n(87);e.exports=function(e,t){var n,c,f,h,d,p=e.target,m=e.global,y=e.stat;if(n=m?r:y?r[p]||s(p,{}):(r[p]||{}).prototype)for(c in t){if(h=t[c],f=e.noTargetGet?(d=i(n,c))&&d.value:n[c],!l(m?c:p+(y?".":"#")+c,e.forced)&&void 0!==f){if(typeof h==typeof f)continue;u(h,f)}(e.sham||f&&f.sham)&&o(h,"sham",!0),a(n,c,h,e)}}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return a[e];var n,o=String(e);return(n=r[o.toLowerCase()])?n:(n=i[o.toLowerCase()])||(1===o.length?o.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var o;if(o=r[t.toLowerCase()])return o===n;if(o=i[t.toLowerCase()])return o===n}else if("number"==typeof t)return t===n;return!1}};var r=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};
2
+ /*!
3
+ * Programatically add the following
4
+ */
5
+ for(o=97;o<123;o++)r[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)r[o-48]=o;for(o=1;o<13;o++)r["f"+o]=o+111;for(o=0;o<10;o++)r["numpad "+o]=o+96;var a=t.names=t.title={};for(o in r)a[r[o]]=o;for(var s in i)r[s]=i[s]},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(25))},function(e,t,n){var r=n(33),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(8),i=n(48),o=n(62),a=n(119),s=r.Symbol,u=i("wks");e.exports=function(e){return u[e]||(u[e]=a&&s[e]||(a?s:o)("Symbol."+e))}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(7);e.exports=!r((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(15);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(11);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(12),i=n(113),o=n(14),a=n(40),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(47),i=n(15);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(12),i=n(16),o=n(39);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(15),i=/"/g;e.exports=function(e,t,n,o){var a=String(r(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(o).replace(i,"&quot;")+'"'),s+">"+a+"</"+t+">"}},function(e,t,n){var r=n(7);e.exports=function(e){return r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r,i,o,a=n(115),s=n(8),u=n(11),l=n(18),c=n(21),f=n(61),h=n(49),d=s.WeakMap;if(a){var p=new d,m=p.get,y=p.has,g=p.set;r=function(e,t){return g.call(p,e,t),t},i=function(e){return m.call(p,e)||{}},o=function(e){return y.call(p,e)}}else{var v=f("state");h[v]=!0,r=function(e,t){return l(e,v,t),t},i=function(e){return c(e,v)?e[v]:{}},o=function(e){return c(e,v)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(10),i=n(50),o=n(18),a=r("unscopables"),s=Array.prototype;null==s[a]&&o(s,a,i(null)),e.exports=function(e){s[a][e]=!0}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(8),i=n(48),o=n(18),a=n(21),s=n(82),u=n(114),l=n(23),c=l.get,f=l.enforce,h=String(u).split("toString");i("inspectSource",(function(e){return u.call(e)})),(e.exports=function(e,t,n,i){var u=!!i&&!!i.unsafe,l=!!i&&!!i.enumerable,c=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||o(n,"name",t),f(n).source=h.join("string"==typeof t?t:"")),e!==r?(u?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=n:o(e,t,n)):l?e[t]=n:s(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||u.call(this)}))},function(e,t){e.exports=!1},function(e,t,n){var r=n(52),i=n(47),o=n(13),a=n(9),s=n(53),u=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,c=4==e,f=6==e,h=5==e||f;return function(d,p,m,y){for(var g,v,b=o(d),_=i(b),T=r(p,m,3),w=a(_.length),S=0,E=y||s,k=t?E(d,w):n?E(d,0):void 0;w>S;S++)if((h||S in _)&&(v=T(g=_[S],S,b),e))if(t)k[S]=v;else if(v)switch(e){case 3:return!0;case 5:return g;case 6:return S;case 2:u.call(k,g)}else if(c)return!1;return f?-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){"use strict";var r=n(7);e.exports=function(e,t){var n=[][e];return!n||!r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){var r=n(12),i=n(60),o=n(39),a=n(17),s=n(40),u=n(21),l=n(113),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=a(e),t=s(t,!0),l)try{return c(e,t)}catch(e){}if(u(e,t))return o(!i.f.call(e,t),e[t])}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(117),i=n(8),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(31);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(16).f,i=n(21),o=n(10)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(40),i=n(16),o=n(39);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},function(e,t,n){var r=n(14),i=n(127),o=n(9),a=n(52),s=n(128),u=n(126),l=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,c,f){var h,d,p,m,y,g,v,b=a(t,n,c?2:1);if(f)h=e;else{if("function"!=typeof(d=s(e)))throw TypeError("Target is not iterable");if(i(d)){for(p=0,m=o(e.length);m>p;p++)if((y=c?b(r(v=e[p])[0],v[1]):b(e[p]))&&y instanceof l)return y;return new l(!1)}h=d.call(e)}for(g=h.next;!(v=g.call(h)).done;)if("object"==typeof(y=u(h,b,v.value,c))&&y&&y instanceof l)return y;return new l(!1)}).stop=function(e){return new l(!0,e)}},function(e,t){var n=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=n},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 r=n(11);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(33),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},function(e,t,n){var r=n(21),i=n(13),o=n(61),a=n(131),s=o("IE_PROTO"),u=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},function(e,t,n){var r=n(49),i=n(11),o=n(21),a=n(16).f,s=n(62),u=n(67),l=s("meta"),c=0,f=Object.isExtensible||function(){return!0},h=function(e){a(e,l,{value:{objectID:"O"+ ++c,weakData:{}}})},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,l)){if(!f(e))return"F";if(!t)return"E";h(e)}return e[l].objectID},getWeakData:function(e,t){if(!o(e,l)){if(!f(e))return!0;if(!t)return!1;h(e)}return e[l].weakData},onFreeze:function(e){return u&&d.REQUIRED&&f(e)&&!o(e,l)&&h(e),e}};r[l]=!0},function(e,t,n){"use strict";var r,i,o,a,s,u=n(109).toUnsigned,l=n(109).toHexString,c=n(76);r=function(e){return c.findBox(e,["moov","trak"]).reduce((function(e,t){var n,r,i,o,a;return(n=c.findBox(t,["tkhd"])[0])?(r=n[0],o=u(n[i=0===r?12:20]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3]),(a=c.findBox(t,["mdia","mdhd"])[0])?(i=0===(r=a[0])?12:20,e[o]=u(a[i]<<24|a[i+1]<<16|a[i+2]<<8|a[i+3]),e):null):null}),{})},i=function(e,t){var n,r,i;return n=c.findBox(t,["moof","traf"]),r=[].concat.apply([],n.map((function(t){return c.findBox(t,["tfhd"]).map((function(n){var r,i;return r=u(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=e[r]||9e4,(c.findBox(t,["tfdt"]).map((function(e){var t,n;return t=e[0],n=u(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=u(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n}))[0]||1/0)/i}))}))),i=Math.min.apply(null,r),isFinite(i)?i:0},o=function(e,t){var n,r=c.findBox(t,["moof","traf"]),i=0,o=0;if(r&&r.length)for(var a=c.parseTraf(r[0]),s=0;s<a.boxes.length;s++)"tfhd"===a.boxes[s].type?n=a.boxes[s].trackId:"tfdt"===a.boxes[s].type?i=a.boxes[s].baseMediaDecodeTime:"trun"===a.boxes[s].type&&a.boxes[s].samples.length&&(o=a.boxes[s].samples[0].compositionTimeOffset||0);return(i+o)/(e[n]||9e4)},a=function(e){var t=c.findBox(e,["moov","trak"]),n=[];return t.forEach((function(e){var t=c.findBox(e,["mdia","hdlr"]),r=c.findBox(e,["tkhd"]);t.forEach((function(e,t){var i,o,a=c.parseType(e.subarray(8,12)),s=r[t];"vide"===a&&(o=0===(i=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),n.push(o))}))})),n},s=function(e){var t=c.findBox(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,r,i={},o=c.findBox(e,["tkhd"])[0];o&&(r=(t=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0),i.id=0===r?t.getUint32(12):t.getUint32(20));var a=c.findBox(e,["mdia","hdlr"])[0];if(a){var s=c.parseType(a.subarray(8,12));i.type="vide"===s?"video":"soun"===s?"audio":s}var f=c.findBox(e,["mdia","minf","stbl","stsd"])[0];if(f){var h=f.subarray(8);i.codec=c.parseType(h.subarray(4,8));var d,p=c.findBox(h,[i.codec])[0];p&&(/^[a-z]vc[1-9]$/i.test(i.codec)?(d=p.subarray(78),"avcC"===c.parseType(d.subarray(4,8))&&d.length>11?(i.codec+=".",i.codec+=l(d[9]),i.codec+=l(d[10]),i.codec+=l(d[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)&&(d=p.subarray(28),"esds"===c.parseType(d.subarray(4,8))&&d.length>20&&0!==d[19]?(i.codec+="."+l(d[19]),i.codec+="."+l(d[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"))}var m=c.findBox(e,["mdia","mdhd"])[0];if(m&&o){var y=0===r?12:20;i.timescale=u(m[y]<<24|m[y+1]<<16|m[y+2]<<8|m[y+3])}n.push(i)})),n},e.exports={findBox:c.findBox,parseType:c.parseType,timescale:r,startTime:i,compositionStartTime:o,videoTrackIds:a,tracks:s}},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,l=s||u||Function("return this")(),c=Object.prototype.toString,f=Math.max,h=Math.min,d=function(){return l.Date.now()};function p(e,t,n){var r,i,o,a,s,u,l=0,c=!1,p=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,o=i;return r=i=void 0,l=t,a=e.apply(o,n)}function b(e){return l=e,s=setTimeout(T,t),c?v(e):a}function _(e){var n=e-u;return void 0===u||n>=t||n<0||p&&e-l>=o}function T(){var e=d();if(_(e))return w(e);s=setTimeout(T,function(e){var n=t-(e-u);return p?h(n,o-(e-l)):n}(e))}function w(e){return s=void 0,g&&r?v(e):(r=i=void 0,a)}function S(){var e=d(),n=_(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return b(u);if(p)return s=setTimeout(T,t),v(u)}return void 0===s&&(s=setTimeout(T,t)),a}return t=y(t)||0,m(n)&&(c=!!n.leading,o=(p="maxWait"in n)?f(y(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g),S.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},S.flush=function(){return void 0===s?a:w(d())},S}function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.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(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return m(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),p(e,t,{leading:r,maxWait:t,trailing:i})}}).call(this,n(25))},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,l=s||u||Function("return this")(),c=Object.prototype.toString,f=Math.max,h=Math.min,d=function(){return l.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,u,l=0,c=!1,y=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,o=i;return r=i=void 0,l=t,a=e.apply(o,n)}function b(e){return l=e,s=setTimeout(T,t),c?v(e):a}function _(e){var n=e-u;return void 0===u||n>=t||n<0||y&&e-l>=o}function T(){var e=d();if(_(e))return w(e);s=setTimeout(T,function(e){var n=t-(e-u);return y?h(n,o-(e-l)):n}(e))}function w(e){return s=void 0,g&&r?v(e):(r=i=void 0,a)}function S(){var e=d(),n=_(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return b(u);if(y)return s=setTimeout(T,t),v(u)}return void 0===s&&(s=setTimeout(T,t)),a}return t=m(t)||0,p(n)&&(c=!!n.leading,o=(y="maxWait"in n)?f(m(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g),S.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},S.flush=function(){return void 0===s?a:w(d())},S}}).call(this,n(25))},function(e,t,n){var r=n(7),i=n(31),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},function(e,t,n){var r=n(27),i=n(162);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.4.0",mode:r?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports={}},function(e,t,n){var r=n(14),i=n(120),o=n(85),a=n(49),s=n(121),u=n(81),l=n(61)("IE_PROTO"),c=function(){},f=function(){var e,t=u("iframe"),n=o.length;for(t.style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),f=e.F;n--;)delete f.prototype[o[n]];return f()};e.exports=Object.create||function(e,t){var n;return null!==e?(c.prototype=r(e),n=new c,c.prototype=null,n[l]=e):n=f(),void 0===t?n:i(n,t)},a[l]=!0},function(e,t,n){var r=n(118),i=n(85);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(22);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(11),i=n(34),o=n(10)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){var r=n(7),i=n(10),o=n(88),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(22),i=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(33),i=n(15),o=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),l=s.length;return u<0||u>=l?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===l||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){e.exports=n(319)()},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(48),i=n(62),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r=n(32);e.exports=r("navigator","userAgent")||""},function(e,t,n){"use strict";var r=n(17),i=n(24),o=n(55),a=n(23),s=n(129),u=a.set,l=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){u(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(e,t,n){var r=n(14),i=n(180);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},function(e,t,n){"use strict";var r=n(27),i=n(8),o=n(7);e.exports=r||!o((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete i[e]}))},function(e,t,n){var r=n(7);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){var r=n(14),i=n(22),o=n(10)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t,n){"use strict";var r,i,o=n(100),a=RegExp.prototype.exec,s=String.prototype.replace,u=a,l=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),c=void 0!==/()??/.exec("")[1];(l||c)&&(u=function(e){var t,n,r,i,u=this;return c&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),l&&(t=u.lastIndex),r=a.call(u,e),l&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),c&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=u},function(e,t,n){var r=n(11),i=n(31),o=n(10)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){"use strict";var r=n(18),i=n(26),o=n(7),a=n(10),s=n(70),u=a("species"),l=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),c=!o((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var h=a(e),d=!o((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),p=d&&!o((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!d||!p||"replace"===e&&!l||"split"===e&&!c){var m=/./[h],y=n(h,""[e],(function(e,t,n,r,i){return t.exec===s?d&&!i?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),g=y[0],v=y[1];i(String.prototype,e,g),i(RegExp.prototype,h,2==t?function(e,t){return v.call(e,this,t)}:function(e){return v.call(e,this)}),f&&r(RegExp.prototype[h],"sham",!0)}}},function(e,t,n){"use strict";var r=n(57).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(31),i=n(70);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){var r=n(15),i="["+n(106)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},function(e,t,n){"use strict";var r,i,o=n(109).toUnsigned,a=function(e){return new Date(1e3*e-20828448e5)},s=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]}},u=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},l=function(e,t){var n,r,i,a,s,c=[];if(!t.length)return null;for(n=0;n<e.byteLength;)r=o(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),i=u(e.subarray(n+4,n+8)),a=r>1?n+r:e.byteLength,i===t[0]&&(1===t.length?c.push(e.subarray(n+8,a)):(s=l(e.subarray(n+8,a),t.slice(1))).length&&(c=c.concat(s))),n=a;return c},c=function(e){var t,n,r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=[];for(t=0;t+4<e.length;t+=n)if(n=r.getUint32(t),t+=4,n<=0)i.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&e[t]){case 1:i.push("slice_layer_without_partitioning_rbsp");break;case 5:i.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:i.push("sei_rbsp");break;case 7:i.push("seq_parameter_set_rbsp");break;case 8:i.push("pic_parameter_set_rbsp");break;case 9:i.push("access_unit_delimiter_rbsp");break;default:i.push("UNKNOWN NAL - "+e[t]&31)}return i},f={avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:r(e.subarray(78,e.byteLength))}},avcC:function(e){var t,n,r,i,o=new DataView(e.buffer,e.byteOffset,e.byteLength),a={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},s=31&e[5];for(r=6,i=0;i<s;i++)n=o.getUint16(r),r+=2,a.sps.push(new Uint8Array(e.subarray(r,r+n))),r+=n;for(t=e[r],r++,i=0;i<t;i++)n=o.getUint16(r),r+=2,a.pps.push(new Uint8Array(e.subarray(r,r+n))),r+=n;return a},btrt:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{bufferSizeDB:t.getUint32(0),maxBitrate:t.getUint32(4),avgBitrate:t.getUint32(8)}},esds:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),esId:e[6]<<8|e[7],streamPriority:31&e[8],decoderConfig:{objectProfileIndication:e[11],streamType:e[12]>>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={majorBrand:u(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},r=8;r<e.byteLength;)n.compatibleBrands.push(u(e.subarray(r,r+4))),r+=4;return n},dinf:function(e){return{boxes:r(e)}},dref:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),dataReferences:r(e.subarray(8))}},hdlr:function(e){var t={version:new DataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0),flags:new Uint8Array(e.subarray(1,4)),handlerType:u(e.subarray(8,12)),name:""},n=8;for(n=24;n<e.byteLength;n++){if(0===e[n]){n++;break}t.name+=String.fromCharCode(e[n])}return t.name=decodeURIComponent(escape(t.name)),t},mdat:function(e){return{byteLength:e.byteLength,nals:c(e)}},mdhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=4,i={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===i.version?(r+=4,i.creationTime=a(n.getUint32(r)),r+=8,i.modificationTime=a(n.getUint32(r)),r+=4,i.timescale=n.getUint32(r),r+=8,i.duration=n.getUint32(r)):(i.creationTime=a(n.getUint32(r)),r+=4,i.modificationTime=a(n.getUint32(r)),r+=4,i.timescale=n.getUint32(r),r+=4,i.duration=n.getUint32(r)),r+=4,t=n.getUint16(r),i.language+=String.fromCharCode(96+(t>>10)),i.language+=String.fromCharCode(96+((992&t)>>5)),i.language+=String.fromCharCode(96+(31&t)),i},mdia:function(e){return{boxes:r(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:r(e)}},mp4a:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return e.byteLength>28&&(n.streamDescriptor=r(e.subarray(28))[0]),n},moof:function(e){return{boxes:r(e)}},moov:function(e){return{boxes:r(e)}},mvex:function(e){return{boxes:r(e)}},mvhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,r={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===r.version?(n+=4,r.creationTime=a(t.getUint32(n)),n+=8,r.modificationTime=a(t.getUint32(n)),n+=4,r.timescale=t.getUint32(n),n+=8,r.duration=t.getUint32(n)):(r.creationTime=a(t.getUint32(n)),n+=4,r.modificationTime=a(t.getUint32(n)),n+=4,r.timescale=t.getUint32(n),n+=4,r.duration=t.getUint32(n)),n+=4,r.rate=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,r.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,n+=8,r.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,n+=24,r.nextTrackId=t.getUint32(n),r},pdin:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)n.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});return n},sidx:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8),earliestPresentationTime:n.getUint32(12),firstOffset:n.getUint32(16)},i=n.getUint16(22);for(t=24;i;t+=12,i--)r.references.push({referenceType:(128&e[t])>>>7,referencedSize:2147483647&n.getUint32(t),subsegmentDuration:n.getUint32(t+4),startsWithSap:!!(128&e[t+8]),sapType:(112&e[t+8])>>>4,sapDeltaTime:268435455&n.getUint32(t+8)});return r},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:r(e)}},stco:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},i=n.getUint32(4);for(t=8;i;t+=4,i--)r.chunkOffsets.push(n.getUint32(t));return r},stsc:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=n.getUint32(4),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;r;t+=12,r--)i.sampleToChunks.push({firstChunk:n.getUint32(t),samplesPerChunk:n.getUint32(t+4),sampleDescriptionIndex:n.getUint32(t+8)});return i},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:r(e.subarray(8))}},stsz:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:n.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)r.entries.push(n.getUint32(t));return r},stts:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),timeToSamples:[]},i=n.getUint32(4);for(t=8;i;t+=8,i--)r.timeToSamples.push({sampleCount:n.getUint32(t),sampleDelta:n.getUint32(t+4)});return r},styp:function(e){return f.ftyp(e)},tfdt:function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:o(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=o(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t},tfhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],l=65536&r.flags[0],c=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),o&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(r.defaultSampleDuration=n.getUint32(t),t+=4),s&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),l&&(r.durationIsEmpty=!0),!i&&c&&(r.baseDataOffsetIsMoof=!0),r},tkhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,r={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===r.version?(n+=4,r.creationTime=a(t.getUint32(n)),n+=8,r.modificationTime=a(t.getUint32(n)),n+=4,r.trackId=t.getUint32(n),n+=4,n+=8,r.duration=t.getUint32(n)):(r.creationTime=a(t.getUint32(n)),n+=4,r.modificationTime=a(t.getUint32(n)),n+=4,r.trackId=t.getUint32(n),n+=4,n+=4,r.duration=t.getUint32(n)),n+=4,n+=8,r.layer=t.getUint16(n),n+=2,r.alternateGroup=t.getUint16(n),n+=2,r.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,r.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,r.width=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,r.height=t.getUint16(n)+t.getUint16(n+2)/16,r},traf:function(e){return{boxes:r(e)}},trak:function(e){return{boxes:r(e)}},trex:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4),defaultSampleDescriptionIndex:t.getUint32(8),defaultSampleDuration:t.getUint32(12),defaultSampleSize:t.getUint32(16),sampleDependsOn:3&e[20],sampleIsDependedOn:(192&e[21])>>6,sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>1,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=1&n.flags[2],o=4&n.flags[2],a=1&n.flags[1],u=2&n.flags[1],l=4&n.flags[1],c=8&n.flags[1],f=r.getUint32(4),h=8;for(i&&(n.dataOffset=r.getInt32(h),h+=4),o&&f&&(t={flags:s(e.subarray(h,h+4))},h+=4,a&&(t.duration=r.getUint32(h),h+=4),u&&(t.size=r.getUint32(h),h+=4),c&&(t.compositionTimeOffset=r.getUint32(h),h+=4),n.samples.push(t),f--);f--;)t={},a&&(t.duration=r.getUint32(h),h+=4),u&&(t.size=r.getUint32(h),h+=4),l&&(t.flags=s(e.subarray(h,h+4)),h+=4),c&&(t.compositionTimeOffset=r.getUint32(h),h+=4),n.samples.push(t);return n},"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}};r=function(e){for(var t,n,r,i,o,a=0,s=[],l=new ArrayBuffer(e.length),c=new Uint8Array(l),h=0;h<e.length;++h)c[h]=e[h];for(t=new DataView(l);a<e.byteLength;)n=t.getUint32(a),r=u(e.subarray(a+4,a+8)),i=n>1?a+n:e.byteLength,(o=(f[r]||function(e){return{data:e}})(e.subarray(a+8,i))).size=n,o.type=r,s.push(o),a=i;return s},i=function(e,t){var n;return t=t||0,n=new Array(2*t+1).join(" "),e.map((function(e,r){return n+e.type+"\n"+Object.keys(e).filter((function(e){return"type"!==e&&"boxes"!==e})).map((function(t){var r=n+" "+t+": ",i=e[t];if(i instanceof Uint8Array||i instanceof Uint32Array){var o=Array.prototype.slice.call(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)).map((function(e){return" "+("00"+e.toString(16)).slice(-2)})).join("").match(/.{1,24}/g);return o?1===o.length?r+"<"+o.join("").slice(1)+">":r+"<\n"+o.map((function(e){return n+" "+e})).join("\n")+"\n"+n+" >":r+"<>"}return r+JSON.stringify(i,null,2).split("\n").map((function(e,t){return 0===t?e:n+" "+e})).join("\n")})).join("\n")+(e.boxes?"\n"+i(e.boxes,t+1):"")})).join("\n")},e.exports={inspect:r,textify:i,parseType:u,findBox:l,parseTraf:f.traf,parseTfdt:f.tfdt,parseHdlr:f.hdlr,parseTfhd:f.tfhd,parseTrun:f.trun,parseSidx:f.sidx}},function(e,t,n){var r,i,o,a,s;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,i=/^([^\/?#]*)(.*)$/,o=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var o=s.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return n.alwaysNormalize?(o.path=s.normalizePath(o.path),s.buildURLFromParts(o)):t;var a=s.parseURL(e);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var u=i.exec(a.path);a.netLoc=u[1],a.path=u[2]}a.netLoc&&!a.path&&(a.path="/");var l={scheme:a.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(l.netLoc=a.netLoc,"/"!==o.path[0]))if(o.path){var c=a.path,f=c.substring(0,c.lastIndexOf("/")+1)+o.path;l.path=s.normalizePath(f)}else l.path=a.path,o.params||(l.params=a.params,o.query||(l.query=a.query));return null===l.path&&(l.path=n.alwaysNormalize?s.normalizePath(o.path):o.path),s.buildURLFromParts(l)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(o,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},function(e,t,n){(function(t){var n=/^\[object .+?Constructor\]$/,r="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();var a,s=Array.prototype,u=Function.prototype,l=Object.prototype,c=o["__core-js_shared__"],f=(a=/[^.]+$/.exec(c&&c.keys&&c.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"",h=u.toString,d=l.hasOwnProperty,p=l.toString,m=RegExp("^"+h.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=s.splice,g=k(o,"Map"),v=k(Object,"create");function b(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function S(e){return!(!x(e)||(t=e,f&&f in t))&&(function(e){var t=x(e)?p.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?m:n).test(function(e){if(null!=e){try{return h.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function E(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function k(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return S(n)?n:void 0}function C(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(C.Cache||T),n}function x(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}b.prototype.clear=function(){this.__data__=v?v(null):{}},b.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},b.prototype.get=function(e){var t=this.__data__;if(v){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return d.call(t,e)?t[e]:void 0},b.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:d.call(t,e)},b.prototype.set=function(e,t){return this.__data__[e]=v&&void 0===t?"__lodash_hash_undefined__":t,this},_.prototype.clear=function(){this.__data__=[]},_.prototype.delete=function(e){var t=this.__data__,n=w(t,e);return!(n<0)&&(n==t.length-1?t.pop():y.call(t,n,1),!0)},_.prototype.get=function(e){var t=this.__data__,n=w(t,e);return n<0?void 0:t[n][1]},_.prototype.has=function(e){return w(this.__data__,e)>-1},_.prototype.set=function(e,t){var n=this.__data__,r=w(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new b,map:new(g||_),string:new b}},T.prototype.delete=function(e){return E(this,e).delete(e)},T.prototype.get=function(e){return E(this,e).get(e)},T.prototype.has=function(e){return E(this,e).has(e)},T.prototype.set=function(e,t){return E(this,e).set(e,t),this},C.Cache=T,e.exports=C}).call(this,n(25))},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,u=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&u()}function s(){o(a)}function u(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=e}return u}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),l=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},f=g(0,0,0,0);function h(e){return parseFloat(e)||0}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+h(e["border-"+n+"-width"])}),0)}function p(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var r=c(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=h(r.width),u=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=d(r,"left","right")+o),Math.round(u+a)!==n&&(u-=d(r,"top","bottom")+a)),!function(e){return e===c(e).document.documentElement}(e)){var l=Math.round(s+o)-t,p=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(p)&&(u-=p)}return g(i.left,i.top,s,u)}var m="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"==typeof e.getBBox};function y(e){return r?m(e)?function(e){var t=e.getBBox();return g(0,0,t.width,t.height)}(e):p(e):f}function g(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=g(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=y(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),b=function(e,t){var n,r,i,o,a,s,u,c=(r=(n=t).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),l(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);l(this,{target:e,contentRect:c})},_=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new b(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),T="undefined"!=typeof WeakMap?new WeakMap:new n,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new _(t,n,this);T.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){w.prototype[e]=function(){var t;return(t=T.get(this))[e].apply(t,arguments)}}));var S=void 0!==i.ResizeObserver?i.ResizeObserver:w;t.a=S}).call(this,n(25))},function(e,t,n){"use strict";
6
+ /*! @name @videojs/vhs-utils @version 1.3.0 @license MIT */function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=r(n(77)),o=r(n(0));e.exports=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=i.buildAbsoluteURL(o.location&&o.location.href||"",e)),i.buildAbsoluteURL(e,t))}},function(e,t,n){var r=n(8),i=n(11),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){var r=n(8),i=n(18);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(118),i=n(85).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(17),i=n(9),o=n(41),a=function(e){return function(t,n,a){var s,u=r(t),l=i(u.length),c=o(a,l);if(e&&n!=n){for(;l>c;)if((s=u[c++])!=s)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:a(!0),indexOf:a(!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 r=n(7),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==l||n!=u&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",l=o.POLYFILL="P";e.exports=o},function(e,t,n){var r,i,o=n(8),a=n(63),s=o.process,u=s&&s.versions,l=u&&u.v8;l?i=(r=l.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},function(e,t,n){"use strict";var r=n(3),i=n(28).filter;r({target:"Array",proto:!0,forced:!n(54)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(3),i=n(125);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},function(e,t,n){var r=n(31),i=n(10)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(10)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(130).IteratorPrototype,i=n(50),o=n(39),a=n(35),s=n(55),u=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,l,!1,!0),s[l]=u,e}},function(e,t,n){"use strict";var r=n(3),i=n(132).left;r({target:"Array",proto:!0,forced:n(29)("reduce")},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(3),i=n(197);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,n){var r=n(26),i=n(220),o=Object.prototype;i!==o.toString&&r(o,"toString",i,{unsafe:!0})},function(e,t,n){var r=n(26);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){"use strict";var r=n(3),i=n(70);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,n){"use strict";var r=n(14);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(71);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(10)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,n){"use strict";var r=n(57).charAt,i=n(23),o=n(129),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(72),i=n(14),o=n(9),a=n(15),s=n(73),u=n(74);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=i(e),l=String(this);if(!a.global)return u(a,l);var c=a.unicode;a.lastIndex=0;for(var f,h=[],d=0;null!==(f=u(a,l));){var p=String(f[0]);h[d]=p,""===p&&(a.lastIndex=s(l,o(a.lastIndex),c)),d++}return 0===d?null:h}]}))},function(e,t,n){"use strict";var r=n(72),i=n(14),o=n(13),a=n(9),s=n(33),u=n(15),l=n(73),c=n(74),f=Math.max,h=Math.min,d=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n){return[function(n,r){var i=u(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,o){var u=n(t,e,this,o);if(u.done)return u.value;var d=i(e),p=String(this),m="function"==typeof o;m||(o=String(o));var y=d.global;if(y){var g=d.unicode;d.lastIndex=0}for(var v=[];;){var b=c(d,p);if(null===b)break;if(v.push(b),!y)break;""===String(b[0])&&(d.lastIndex=l(p,a(d.lastIndex),g))}for(var _,T="",w=0,S=0;S<v.length;S++){b=v[S];for(var E=String(b[0]),k=f(h(s(b.index),p.length),0),C=[],x=1;x<b.length;x++)C.push(void 0===(_=b[x])?_:String(_));var O=b.groups;if(m){var P=[E].concat(C,k,p);void 0!==O&&P.push(O);var A=String(o.apply(void 0,P))}else A=r(E,p,k,C,O,o);k>=w&&(T+=p.slice(w,k)+A,w=k+E.length)}return T+p.slice(w)}];function r(e,n,r,i,a,s){var u=r+e.length,l=i.length,c=m;return void 0!==a&&(a=o(a),c=p),t.call(s,c,(function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":s=a[o.slice(1,-1)];break;default:var c=+o;if(0===c)return t;if(c>l){var f=d(c/10);return 0===f?t:f<=l?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):t}s=i[c-1]}return void 0===s?"":s}))}}))},function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(e,t,n){var r=n(7),i=n(106);e.exports=function(e){return r((function(){return!!i[e]()||"​…᠎"!="​…᠎"[e]()||i[e].name!==e}))}},function(e,t,n){var r=n(8),i=n(142),o=n(64),a=n(18),s=n(10),u=s("iterator"),l=s("toStringTag"),c=o.values;for(var f in i){var h=r[f],d=h&&h.prototype;if(d){if(d[u]!==c)try{a(d,u,c)}catch(e){d[u]=c}if(d[l]||a(d,l,f),i[f])for(var p in o)if(d[p]!==o[p])try{a(d,p,o[p])}catch(e){d[p]=o[p]}}}},function(e,t){e.exports={toUnsigned:function(e){return e>>>0},toHexString:function(e){return("00"+e.toString(16)).slice(-2)}}},function(e,t,n){"use strict";var r=n(273),i=n(58),o=n(274);function a(e,t,n){var r=e;return o(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=i({},t,{uri:e}),r.callback=n,r}function s(e,t,n){return u(t=a(e,t,n))}function u(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=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),y)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(c),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,g)}function o(){if(!u){var t;clearTimeout(c),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var i=g,o=null;return 0!==t?(i={body:r(),statusCode:t,method:h,headers:{},url:f,rawRequest:l},l.getAllResponseHeaders&&(i.headers=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t}(l.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),n(o,i,i.body)}}var a,u,l=e.xhr||null;l||(l=e.cors||e.useXDR?new s.XDomainRequest:new s.XMLHttpRequest);var c,f=l.url=e.uri||e.url,h=l.method=e.method||"GET",d=e.body||e.data,p=l.headers=e.headers||{},m=!!e.sync,y=!1,g={body:void 0,headers:{},statusCode:0,method:h,url:f,rawRequest:l};if("json"in e&&!1!==e.json&&(y=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),d=JSON.stringify(!0===e.json?d:e.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(o,0)},l.onload=o,l.onerror=i,l.onprogress=function(){},l.onabort=function(){u=!0},l.ontimeout=i,l.open(h,f,!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",i(e)}}),e.timeout)),l.setRequestHeader)for(a in p)p.hasOwnProperty(a)&&l.setRequestHeader(a,p[a]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(l.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(l),l.send(d||null),l}e.exports=s,e.exports.default=s,s.XMLHttpRequest=r.XMLHttpRequest||function(){},s.XDomainRequest="withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){s["delete"===e?"del":e]=function(t,n,r){return(n=a(t,n,r)).method=e.toUpperCase(),u(n)}}))},function(e,t,n){var r=n(0),i=e.exports={WebVTT:n(275),VTTCue:n(276),VTTRegion:n(277)};r.vttjs=i,r.WebVTT=i.WebVTT;var o=i.VTTCue,a=i.VTTRegion,s=r.VTTCue,u=r.VTTRegion;i.shim=function(){r.VTTCue=o,r.VTTRegion=a},i.restore=function(){r.VTTCue=s,r.VTTRegion=u},r.VTTCue||i.shim()},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(314)},function(e,t,n){var r=n(12),i=n(7),o=n(81);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(48);e.exports=r("native-function-to-string",Function.toString)},function(e,t,n){var r=n(8),i=n(114),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i.call(o))},function(e,t,n){var r=n(32),i=n(83),o=n(86),a=n(14);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){e.exports=n(8)},function(e,t,n){var r=n(21),i=n(17),o=n(84).indexOf,a=n(49);e.exports=function(e,t){var n,s=i(e),u=0,l=[];for(n in s)!r(a,n)&&r(s,n)&&l.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(l,n)||l.push(n));return l}},function(e,t,n){var r=n(7);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t,n){var r=n(12),i=n(16),o=n(14),a=n(51);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,u=0;s>u;)i.f(e,n=r[u++],t[n]);return e}},function(e,t,n){var r=n(32);e.exports=r("document","documentElement")},function(e,t,n){var r=n(17),i=n(83).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t,n){t.f=n(10)},function(e,t,n){"use strict";var r=n(34),i=n(9),o=n(52),a=function(e,t,n,s,u,l,c,f){for(var h,d=u,p=0,m=!!c&&o(c,f,3);p<s;){if(p in n){if(h=m?m(n[p],p,t):n[p],l>0&&r(h))d=a(e,t,h,i(h.length),d,l-1)-1;else{if(d>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[d]=h}d++}p++}return d};e.exports=a},function(e,t,n){"use strict";var r=n(28).forEach,i=n(29);e.exports=i("forEach")?function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}:[].forEach},function(e,t,n){var r=n(14);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(10),i=n(55),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t,n){var r=n(91),i=n(55),o=n(10)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){"use strict";var r=n(3),i=n(93),o=n(42),a=n(65),s=n(35),u=n(18),l=n(26),c=n(10),f=n(27),h=n(55),d=n(130),p=d.IteratorPrototype,m=d.BUGGY_SAFARI_ITERATORS,y=c("iterator"),g=function(){return this};e.exports=function(e,t,n,c,d,v,b){i(n,t,c);var _,T,w,S=function(e){if(e===d&&O)return O;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[y]||C["@@iterator"]||d&&C[d],O=!m&&x||S(d),P="Array"==t&&C.entries||x;if(P&&(_=o(P.call(new e)),p!==Object.prototype&&_.next&&(f||o(_)===p||(a?a(_,p):"function"!=typeof _[y]&&u(_,y,g)),s(_,E,!0,!0),f&&(h[E]=g))),"values"==d&&x&&"values"!==x.name&&(k=!0,O=function(){return x.call(this)}),f&&!b||C[y]===O||u(C,y,O),h[t]=O,d)if(T={values:S("values"),keys:v?O:S("keys"),entries:S("entries")},b)for(w in T)(m||k||!(w in C))&&l(C,w,T[w]);else r({target:t,proto:!0,forced:m||k},T);return T}},function(e,t,n){"use strict";var r,i,o,a=n(42),s=n(18),u=n(21),l=n(10),c=n(27),f=l("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),c||u(r,f)||s(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(e,t,n){var r=n(7);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var r=n(22),i=n(13),o=n(47),a=n(9),s=function(e){return function(t,n,s,u){r(n);var l=i(t),c=o(l),f=a(l.length),h=e?f-1:0,d=e?-1:1;if(s<2)for(;;){if(h in c){u=c[h],h+=d;break}if(h+=d,e?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;e?h>=0:f>h;h+=d)h in c&&(u=n(u,c[h],h,l));return u}};e.exports={left:s(!1),right:s(!0)}},function(e,t,n){"use strict";var r=n(32),i=n(16),o=n(10),a=n(12),s=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(12),i=n(51),o=n(17),a=n(60).f,s=function(e){return function(t){for(var n,s=o(t),u=i(s),l=u.length,c=0,f=[];l>c;)n=u[c++],r&&!a.call(s,n)||f.push(e?[n,s[n]]:s[n]);return f}};e.exports={entries:s(!0),values:s(!1)}},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 r=n(8);e.exports=r.Promise},function(e,t,n){var r,i,o,a=n(8),s=n(7),u=n(31),l=n(52),c=n(121),f=n(81),h=n(63),d=a.location,p=a.setImmediate,m=a.clearImmediate,y=a.process,g=a.MessageChannel,v=a.Dispatch,b=0,_={},T=function(e){if(_.hasOwnProperty(e)){var t=_[e];delete _[e],t()}},w=function(e){return function(){T(e)}},S=function(e){T(e.data)},E=function(e){a.postMessage(e+"",d.protocol+"//"+d.host)};p&&m||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return _[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(b),b},m=function(e){delete _[e]},"process"==u(y)?r=function(e){y.nextTick(w(e))}:v&&v.now?r=function(e){v.now(w(e))}:g&&!/(iphone|ipod|ipad).*applewebkit/i.test(h)?(o=(i=new g).port2,i.port1.onmessage=S,r=l(o.postMessage,o,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||s(E)?r="onreadystatechange"in f("script")?function(e){c.appendChild(f("script")).onreadystatechange=function(){c.removeChild(this),T(e)}}:function(e){setTimeout(w(e),0)}:(r=E,a.addEventListener("message",S,!1))),e.exports={set:p,clear:m}},function(e,t,n){var r=n(14),i=n(11),o=n(56);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){var r=n(9),i=n(140),o=n(15),a=Math.ceil,s=function(e){return function(t,n,s){var u,l,c=String(o(t)),f=c.length,h=void 0===s?" ":String(s),d=r(n);return d<=f||""==h?c:(u=d-f,(l=i.call(h,a(u/h.length))).length>u&&(l=l.slice(0,u)),e?c+l:l+c)}};e.exports={start:s(!1),end:s(!0)}},function(e,t,n){"use strict";var r=n(33),i=n(15);e.exports="".repeat||function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){var r=n(63);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){"use strict";
7
+ /*
8
+ object-assign
9
+ (c) Sindre Sorhus
10
+ @license MIT
11
+ */var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){s=r(n);for(var f=0;f<s.length;f++)o.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){var r=e.prototype;if(Object.create){var i=Object.create(t.prototype);r.__proto__=i}if(!(r instanceof t)){function o(){}o.prototype=t.prototype,n(r,o=new o),e.prototype=r=o}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var i={},o=i.ELEMENT_NODE=1,a=i.ATTRIBUTE_NODE=2,s=i.TEXT_NODE=3,u=i.CDATA_SECTION_NODE=4,l=i.ENTITY_REFERENCE_NODE=5,c=i.ENTITY_NODE=6,f=i.PROCESSING_INSTRUCTION_NODE=7,h=i.COMMENT_NODE=8,d=i.DOCUMENT_NODE=9,p=i.DOCUMENT_TYPE_NODE=10,m=i.DOCUMENT_FRAGMENT_NODE=11,y=i.NOTATION_NODE=12,g={},v={},b=(g.INDEX_SIZE_ERR=(v[1]="Index size error",1),g.DOMSTRING_SIZE_ERR=(v[2]="DOMString size error",2),g.HIERARCHY_REQUEST_ERR=(v[3]="Hierarchy request error",3)),_=(g.WRONG_DOCUMENT_ERR=(v[4]="Wrong document",4),g.INVALID_CHARACTER_ERR=(v[5]="Invalid character",5),g.NO_DATA_ALLOWED_ERR=(v[6]="No data allowed",6),g.NO_MODIFICATION_ALLOWED_ERR=(v[7]="No modification allowed",7),g.NOT_FOUND_ERR=(v[8]="Not found",8)),T=(g.NOT_SUPPORTED_ERR=(v[9]="Not supported",9),g.INUSE_ATTRIBUTE_ERR=(v[10]="Attribute in use",10));g.INVALID_STATE_ERR=(v[11]="Invalid state",11),g.SYNTAX_ERR=(v[12]="Syntax error",12),g.INVALID_MODIFICATION_ERR=(v[13]="Invalid modification",13),g.NAMESPACE_ERR=(v[14]="Invalid namespace",14),g.INVALID_ACCESS_ERR=(v[15]="Invalid access",15);function w(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,v[e]),this.message=v[e],Error.captureStackTrace&&Error.captureStackTrace(this,w);return n.code=e,t&&(this.message=this.message+": "+t),n}function S(){}function 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 r=e._refresh(e._node);te(e,"length",r.length),n(r,e),e._inc=t}}function C(){}function x(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function O(e,t,n,r){if(r?t[x(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&N(i,e,r),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function P(e,t,n){var r=x(t,n);if(!(r>=0))throw w(_,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var o=e.ownerDocument;o&&(N(o,e,n),n.ownerElement=null)}}function A(e){if(this._features={},e)for(var t in e)this._features=e[t]}function R(){}function L(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function I(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(I(e,t))return!0}while(e=e.nextSibling)}function D(){}function N(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function j(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function M(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,j(e.ownerDocument,e),t}function U(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===m){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do{i.parentNode=e}while(i!==o&&(i=i.nextSibling));return j(e.ownerDocument||e,e),t.nodeType==m&&(t.firstChild=t.lastChild=null),t}function B(){this._nsMap={}}function F(){}function z(){}function V(){}function W(){}function H(){}function q(){}function G(){}function Y(){}function X(){}function K(){}function $(){}function Q(){}function J(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i&&null==(i=r.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return ee(this,n,e,t,a),n.join("")}function Z(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var a=n[o];if(a.prefix==r)return a.namespace!=i}return!0}function ee(e,t,n,r,i){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case o:i||(i=[]);i.length;var c=e.attributes,y=c.length,g=e.firstChild,v=e.tagName;n="http://www.w3.org/1999/xhtml"===e.namespaceURI||n,t.push("<",v);for(var b=0;b<y;b++){"xmlns"==(_=c.item(b)).prefix?i.push({prefix:_.localName,namespace:_.value}):"xmlns"==_.nodeName&&i.push({prefix:"",namespace:_.value})}for(b=0;b<y;b++){var _;if(Z(_=c.item(b),0,i)){var T=_.prefix||"",w=_.namespaceURI,S=T?" xmlns:"+T:" xmlns";t.push(S,'="',w,'"'),i.push({prefix:T,namespace:w})}ee(_,t,n,r,i)}if(Z(e,0,i)){T=e.prefix||"",w=e.namespaceURI,S=T?" xmlns:"+T:" xmlns";t.push(S,'="',w,'"'),i.push({prefix:T,namespace:w})}if(g||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(v)){if(t.push(">"),n&&/^script$/i.test(v))for(;g;)g.data?t.push(g.data):ee(g,t,n,r,i),g=g.nextSibling;else for(;g;)ee(g,t,n,r,i),g=g.nextSibling;t.push("</",v,">")}else t.push("/>");return;case d:case m:for(g=e.firstChild;g;)ee(g,t,n,r,i),g=g.nextSibling;return;case a:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,L),'"');case s:return t.push(e.data.replace(/[<&]/g,L));case u:return t.push("<![CDATA[",e.data,"]]>");case h:return t.push("\x3c!--",e.data,"--\x3e");case p:var 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 f:return t.push("<?",e.target," ",e.data,"?>");case l:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function te(e,t,n){e[t]=n}w.prototype=Error.prototype,n(g,w),S.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ee(this[r],n,e,t);return n.join("")}},E.prototype.item=function(e){return k(this),this[e]},r(E,S),C.prototype={length:0,item:S.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new w(T);var n=this.getNamedItem(e.nodeName);return O(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new w(T);return t=this.getNamedItemNS(e.namespaceURI,e.localName),O(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return P(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return P(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},A.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new D;if(r.implementation=this,r.childNodes=new S,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new q;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},R.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 U(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return M(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,n,r){var i=new n.constructor;for(var s in n){var u=n[s];"object"!=typeof u&&u!=i[s]&&(i[s]=u)}n.childNodes&&(i.childNodes=new S);switch(i.ownerDocument=t,i.nodeType){case o:var l=n.attributes,c=i.attributes=new C,f=l.length;c._ownerElement=i;for(var h=0;h<f;h++)i.setAttributeNode(e(t,l.item(h),!0));break;case a:r=!0}if(r)for(var d=n.firstChild;d;)i.appendChild(e(t,d,r)),d=d.nextSibling;return i}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==s&&e.nodeType==s?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(i,R),n(i,R.prototype),D.prototype={nodeName:"#document",nodeType:d,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==m){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==o&&(this.documentElement=e),U(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),M(this,e)},importNode:function(e,t){return function e(t,n,r){var i;switch(n.nodeType){case o:(i=n.cloneNode(!1)).ownerDocument=t;case m:break;case a:r=!0}i||(i=n.cloneNode(!1));if(i.ownerDocument=t,i.parentNode=null,r)for(var s=n.firstChild;s;)i.appendChild(e(t,s,r)),s=s.nextSibling;return i}(this,e,t)},getElementById:function(e){var t=null;return I(this.documentElement,(function(n){if(n.nodeType==o&&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 S,(t.attributes=new C)._ownerElement=t,t},createDocumentFragment:function(){var e=new K;return e.ownerDocument=this,e.childNodes=new S,e},createTextNode:function(e){var t=new V;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 H;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new $;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new F;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new X;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new B,r=t.split(":"),i=n.attributes=new C;return n.childNodes=new S,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new F,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(D,R),B.prototype={nodeType:o,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===m?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);r=e.lastChild}return r=e.lastChild,t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,j(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new E(this,(function(t){var n=[];return I(t,(function(r){r===t||r.nodeType!=o||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new E(this,(function(n){var r=[];return I(n,(function(i){i===n||i.nodeType!==o||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},D.prototype.getElementsByTagName=B.prototype.getElementsByTagName,D.prototype.getElementsByTagNameNS=B.prototype.getElementsByTagNameNS,r(B,R),F.prototype.nodeType=a,r(F,R),z.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(v[b])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(z,R),V.prototype={nodeName:"#text",nodeType:s,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(V,z),W.prototype={nodeName:"#comment",nodeType:h},r(W,z),H.prototype={nodeName:"#cdata-section",nodeType:u},r(H,z),q.prototype.nodeType=p,r(q,R),G.prototype.nodeType=y,r(G,R),Y.prototype.nodeType=c,r(Y,R),X.prototype.nodeType=l,r(X,R),K.prototype.nodeName="#document-fragment",K.prototype.nodeType=m,r(K,R),$.prototype.nodeType=f,r($,R),Q.prototype.serializeToString=function(e,t,n){return J.call(e,t,n)},R.prototype.toString=J;try{if(Object.defineProperty){Object.defineProperty(E.prototype,"length",{get:function(){return k(this),this.$$length}}),Object.defineProperty(R.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case o:case m:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case o:case 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}}}),te=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.DOMImplementation=A,t.XMLSerializer=Q},function(e,t,n){"use strict";e.exports={parseSei:function(e){for(var t=0,n={payloadType:-1,payloadSize:0},r=0,i=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)i+=255,t++;if(i+=e[t++],!n.payload&&4===r){n.payloadType=r,n.payloadSize=i,n.payload=e.subarray(t,t+i);break}t+=i,r=0,i=0}return n},parseUserData: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)},parseCaptionPackets:function(e,t){var n,r,i,o,a=[];if(!(64&t[0]))return a;for(r=31&t[0],n=0;n<r;n++)o={type:3&t[(i=3*n)+2],pts:e},4&t[i+2]&&(o.ccData=t[i+3]<<8|t[i+4],a.push(o));return a},discardEmulationPreventionBytes:function(e){for(var t,n,r=e.byteLength,i=[],o=1;o<r-2;)0===e[o]&&0===e[o+1]&&3===e[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var a=0;for(o=0;o<t;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=e[a];return n},USER_DATA_REGISTERED_ITU_T_T35:4}},function(e,t,n){"use strict";var r=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,o;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){e={}}}};r.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},r.prototype.push=function(e){this.trigger("data",e)},r.prototype.flush=function(e){this.trigger("done",e)},r.prototype.partialFlush=function(e){this.trigger("partialdone",e)},r.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},r.prototype.reset=function(e){this.trigger("reset",e)},e.exports=r},function(e,t,n){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},function(e,t,n){var r=n(3),i=n(300);r({global:!0,forced:parseInt!=i},{parseInt:i})},function(e,t,n){"use strict";var r,i=n(8),o=n(97),a=n(43),s=n(301),u=n(303),l=n(11),c=n(23).enforce,f=n(115),h=!i.ActiveXObject&&"ActiveXObject"in i,d=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},m=e.exports=s("WeakMap",p,u,!0,!0);if(f&&h){r=u.getConstructor(p,"WeakMap",!0),a.REQUIRED=!0;var y=m.prototype,g=y.delete,v=y.has,b=y.get,_=y.set;o(y,{delete:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),g.call(this,e)||t.frozen.delete(e)}return g.call(this,e)},has:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),v.call(this,e)||t.frozen.has(e)}return v.call(this,e)},get:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),v.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(l(e)&&!d(e)){var n=c(this);n.frozen||(n.frozen=new r),v.call(this,e)?_.call(this,e,t):n.frozen.set(e,t)}else _.call(this,e,t);return this}})}},function(e,t,n){var r=n(12),i=n(16).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/;r&&!("name"in o)&&i(o,"name",{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},function(e,t){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},function(e,t,n){var r=n(144),i=n(278);function o(t,n,a){return i()?e.exports=o=Reflect.construct:e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},o.apply(null,arguments)}e.exports=o},function(e,t,n){var r=n(144);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){"use strict";(function(t){var r,i=(r=n(0))&&"object"==typeof r&&"default"in r?r.default:r;e.exports=function(e){for(var n,r=(n=e,i.atob?i.atob(n):t.from(n,"base64").toString("binary")),o=new Uint8Array(r.length),a=0;a<r.length;a++)o[a]=r.charCodeAt(a);return o}}).call(this,n(279).Buffer)},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function s(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function u(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new l,o=n.domBuilder||new i,s=n.errorHandler,u=n.locator,c=n.xmlns||{},f={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},o=e instanceof Function;function s(t){var i=e[t];!i&&o&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+a(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),r}(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(f.nbsp=" ",f.copy="©",c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,c,f):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;u(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var l=0;l<s;l++){e=r.getURI(l);var c=r.getValue(l),f=(n=r.getQName(l),i.createAttributeNS(e,n));this.locator&&o(r.getLocator(l),f),f.value=f.nodeValue=c,a.setAttributeNode(f)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&o(this.locator,n),u(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=s.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=s.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&o(this.locator,r),u(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&o(this.locator,i),u(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,a(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,a(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,a(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){i.prototype[e]=function(){return null}}));var l=n(283).XMLReader,c=t.DOMImplementation=n(145).DOMImplementation;t.XMLSerializer=n(145).XMLSerializer,t.DOMParser=r},function(e,t,n){"use strict";var r=n(146).discardEmulationPreventionBytes,i=n(284).CaptionStream,o=n(44),a=n(76),s=function(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(n<i.size)return i;n-=i.size}return null},u=function(e,t){var n=o.findBox(e,["moof","traf"]),i=o.findBox(e,["mdat"]),u={},l=[];return i.forEach((function(e,t){var r=n[t];l.push({mdat:e,traf:r})})),l.forEach((function(e){var n,i=e.mdat,l=e.traf,c=o.findBox(l,["tfhd"]),f=a.parseTfhd(c[0]),h=f.trackId,d=o.findBox(l,["tfdt"]),p=d.length>0?a.parseTfdt(d[0]).baseMediaDecodeTime:0,m=o.findBox(l,["trun"]);t===h&&m.length>0&&(n=function(e,t,n){var i,o,a,u,l=new DataView(e.buffer,e.byteOffset,e.byteLength),c=[];for(o=0;o+4<e.length;o+=a)if(a=l.getUint32(o),o+=4,!(a<=0))switch(31&e[o]){case 6:var f=e.subarray(o+1,o+1+a),h=s(o,t);i={nalUnitType:"sei_rbsp",size:a,data:f,escapedRBSP:r(f),trackId:n},h?(i.pts=h.pts,i.dts=h.dts,u=h):(i.pts=u.pts,i.dts=u.dts),c.push(i)}return c}(i,function(e,t,n){var r=t,i=n.defaultSampleDuration||0,o=n.defaultSampleSize||0,s=n.trackId,u=[];return e.forEach((function(e){var t=a.parseTrun(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=i),void 0===e.size&&(e.size=o),e.trackId=s,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=r+e.compositionTimeOffset,r+=e.duration})),u=u.concat(t)})),u}(m,p,f),h),u[h]||(u[h]=[]),u[h]=u[h].concat(n))})),u};e.exports=function(){var e,t,n,r,o,a,s=!1;this.isInitialized=function(){return s},this.init=function(t){e=new i,s=!0,a=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,o.captions.push(e),o.captionStreams[e.stream]=!0}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(n!==e[0]||r!==t[n])},this.parse=function(e,i,a){var s;if(!this.isInitialized())return null;if(!i||!a)return null;if(this.isNewInit(i,a))n=i[0],r=a[n];else if(null===n||!r)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,i,a)}return null!==(s=function(e,t,n){return null===t?null:{seiNals:u(e,t)[t],timescale:n}}(e,n,r))&&s.seiNals?(this.pushNals(s.seiNals),this.flushStream(),o):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(){o.captions=[],o.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,r=null,o?this.clearParsedCaptions():o={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()}},function(e,t,n){"use strict";var r=n(148),i=n(285).handleRollover,o={};o.ts=n(286),o.aac=n(287);var a=n(288).ONE_SECOND_IN_TS,s=function(e,t,n){for(var r,i,a,s,u=0,l=188,c=!1;l<=e.byteLength;)if(71!==e[u]||71!==e[l]&&l!==e.byteLength)u++,l++;else{switch(r=e.subarray(u,l),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),c=!0)}if(c)break;u+=188,l+=188}for(u=(l=e.byteLength)-188,c=!1;u>=0;)if(71!==e[u]||71!==e[l]&&l!==e.byteLength)u--,l--;else{switch(r=e.subarray(u,l),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),c=!0)}if(c)break;u-=188,l-=188}},u=function(e,t,n){for(var r,i,a,s,u,l,c,f=0,h=188,d=!1,p={data:[],size:0};h<e.byteLength;)if(71!==e[f]||71!==e[h])f++,h++;else{switch(r=e.subarray(f,h),o.ts.parseType(r,t.pid)){case"pes":if(i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!d&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),d=!0),!n.firstKeyFrame)){if(a&&0!==p.size){for(u=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),u.set(c,l),l+=c.byteLength;if(o.ts.videoPacketContainsKeyFrame(u)){var m=o.ts.parsePesTime(u);m?(n.firstKeyFrame=m,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}p.size=0}p.data.push(r),p.size+=r.byteLength}}if(d&&n.firstKeyFrame)break;f+=188,h+=188}for(f=(h=e.byteLength)-188,d=!1;f>=0;)if(71!==e[f]||71!==e[h])f--,h--;else{switch(r=e.subarray(f,h),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),d=!0)}if(d)break;f-=188,h-=188}},l=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,r=0,i=188;i<e.byteLength;)if(71!==e[r]||71!==e[i])r++,i++;else{switch(n=e.subarray(r,i),o.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=o.ts.parsePat(n));break;case"pmt":t.table||(t.table=o.ts.parsePmt(n))}if(t.pid&&t.table)return;r+=188,i+=188}}(e,t),t.table){if(t.table.hasOwnProperty(i))switch(t.table[i]){case r.H264_STREAM_TYPE:n.video=[],u(e,t,n),0===n.video.length&&delete n.video;break;case r.ADTS_STREAM_TYPE:n.audio=[],s(e,t,n),0===n.audio.length&&delete n.audio}}return n};e.exports={inspect:function(e,t){var n;return(n=o.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,s=null,u=0,l=0;e.length-l>=3;){switch(o.aac.parseType(e,l)){case"timed-metadata":if(e.length-l<10){n=!0;break}if((u=o.aac.parseId3TagSize(e,l))>e.length){n=!0;break}null===s&&(t=e.subarray(l,l+u),s=o.aac.parseAacTimestamp(t)),l+=u;break;case"audio":if(e.length-l<7){n=!0;break}if((u=o.aac.parseAdtsSize(e,l))>e.length){n=!0;break}null===i&&(t=e.subarray(l,l+u),i=o.aac.parseSampleRate(t)),r++,l+=u;break;default:l++}if(n)return null}if(null===i||null===s)return null;var c=a/i;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*r*c,pts:s+1024*r*c}]}}(e):l(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;void 0===n&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=i(e.dts,n),e.pts=i(e.pts,n),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a}))}if(e.video&&e.video.length){var r=t;if(void 0===r&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=i(e.dts,r),e.pts=i(e.pts,r),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a})),e.firstKeyFrame){var o=e.firstKeyFrame;o.dts=i(o.dts,r),o.pts=i(o.pts,r),o.dtsTime=o.dts/a,o.ptsTime=o.dts/a}}}(n,t),n):null},parseAudioPes_:s}},function(e,t,n){e.exports=function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(e,t,n,r){var i,o,a,s=t||[0],u=(n=n||0)>>>3,l=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(a=i+u)>>>2,s.length<=o&&s.push(0),s[o]|=e[i]<<8*(l+r*(a%4));return{value:s,binLen:8*e.length+n}}function r(e,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,a,s;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var u=t||[0],l=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(a=(s=(i>>>1)+l)>>>2;u.length<=a;)u.push(0);u[a]|=o<<8*(c+r*(s%4))}return{value:u,binLen:4*e.length+n}}(e,t,n,i)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,a,s,u,l,c,f,h,d=0,p=n||[0],m=(r=r||0)>>>3;if("UTF8"===t)for(f=-1===i?3:0,s=0;s<e.length;s+=1)for(a=[],128>(o=e.charCodeAt(s))?a.push(o):2048>o?(a.push(192|o>>>6),a.push(128|63&o)):55296>o||57344<=o?a.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(s)),a.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),u=0;u<a.length;u+=1){for(l=(c=d+m)>>>2;p.length<=l;)p.push(0);p[l]|=a[u]<<8*(f+i*(c%4)),d+=1}else for(f=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,s=0;s<e.length;s+=1){for(o=e.charCodeAt(s),!0===h&&(o=(u=255&o)<<8|o>>>8),l=(c=d+m)>>>2;p.length<=l;)p.push(0);p[l]|=o<<8*(f+i*(c%4)),d+=2}return{value:p,binLen:8*d+r}}(e,r,t,n,i)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,a,s,u,l,c,f=0,h=n||[0],d=(r=r||0)>>>3,p=-1===i?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(o=0;o<e.length;o+=4){for(u=e.substr(o,4),s=0,a=0;a<u.length;a+=1)s|=t.indexOf(u.charAt(a))<<18-6*a;for(a=0;a<u.length-1;a+=1){for(l=(c=f+d)>>>2;h.length<=l;)h.push(0);h[l]|=(s>>>16-8*a&255)<<8*(p+i*(c%4)),f+=1}}return{value:h,binLen:8*f+r}}(e,n,r,i)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,a,s,u=t||[0],l=(n=n||0)>>>3,c=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),a=(s=o+l)>>>2,u.length<=a&&u.push(0),u[a]|=i<<8*(c+r*(s%4));return{value:u,binLen:8*e.length+n}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,r,i){return n(new Uint8Array(e),t,r,i)}(e,t,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return n(e,t,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(e,n,r,i){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,a="",s=t/8,u=-1===n?3:0;for(i=0;i<s;i+=1)o=e[i>>>2]>>>8*(u+n*(i%4)),a+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?a.toUpperCase():a}(e,n,r,i)};case"B64":return function(e){return function(e,n,r,i){var o,a,s,u,l,c="",f=n/8,h=-1===r?3:0;for(o=0;o<f;o+=3)for(u=o+1<f?e[o+1>>>2]:0,l=o+2<f?e[o+2>>>2]:0,s=(e[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(u>>>8*(h+r*((o+1)%4))&255)<<8|l>>>8*(h+r*((o+2)%4))&255,a=0;a<4;a+=1)c+=8*o+6*a<=n?t.charAt(s>>>6*(3-a)&63):i.b64Pad;return c}(e,n,r,i)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",a=t/8,s=-1===n?3:0;for(r=0;r<a;r+=1)i=e[r>>>2]>>>8*(s+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),a=new Uint8Array(o),s=-1===n?3:0;for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(s+n*(r%4))&255;return o}(e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,a=new Uint8Array(i);for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return a}(e,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function o(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function a(e,t){return e<<t|e>>>32-t}function s(e,t,n){return e^t^n}function u(e,t,n){return e&t^e&n^t&n}function 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,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function f(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function h(e,t){var n,r,i,o,f,h,d,p,m=[];for(n=t[0],r=t[1],i=t[2],o=t[3],f=t[4],d=0;d<80;d+=1)m[d]=d<16?e[d]:a(m[d-3]^m[d-8]^m[d-14]^m[d-16],1),h=d<20?c(a(n,5),(p=r)&i^~p&o,f,1518500249,m[d]):d<40?c(a(n,5),s(r,i,o),f,1859775393,m[d]):d<60?c(a(n,5),u(r,i,o),f,2400959708,m[d]):c(a(n,5),s(r,i,o),f,3395469782,m[d]),f=o,o=i,i=a(r,30),r=n,n=h;return t[0]=l(n,t[0]),t[1]=l(r,t[1]),t[2]=l(i,t[2]),t[3]=l(o,t[3]),t[4]=l(f,t[4]),t}function d(e,t,n,r){for(var i,o=15+(t+65>>>9<<4),a=t+n;e.length<=o;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[o]=4294967295&a,e[o-1]=a/4294967296|0,i=0;i<e.length;i+=16)r=h(e.slice(i,i+16),r);return r}return function(t){function n(e,n,i){var o=this;if("SHA-1"!==e)throw new Error("Chosen SHA variant is not supported");var a=i||{};return(o=t.call(this,e,n,i)||this).t=!0,o.i=o.o,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=h,o.p=function(e){return e.slice()},o.l=f,o.R=d,o.U=[1732584193,4023233417,2562383102,271733878,3285377520],o.T=512,o.m=160,o.F=!1,a.hmacKey&&o.B(function(e,t,n,i){var o="hmacKey must include a value and format";if(!t)throw new Error(o);if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}(0,a.hmacKey,o.u)),o}return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.h=t,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=e,this.Y=[],this.I=0,this.C=!1,this.H=0,this.L=!1,this.N=[],this.S=[]}return e.prototype.update=function(e){var t,n=0,r=this.T>>>5,i=this.s(e,this.Y,this.I),o=i.binLen,a=i.value,s=o>>>5;for(t=0;t<s;t+=r)n+this.T<=o&&(this.U=this.A(a.slice(t,t+r),this.U),n+=this.T);this.H+=n,this.Y=a.slice(n>>>5),this.I=o%this.T,this.C=!0},e.prototype.getHash=function(e,t){var n,r,a=this.m,s=o(t);if(!0===this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");a=s.outputLen}var u=i(e,a,this.u,s);if(!0===this.L&&this.i)return u(this.i(s));for(r=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),a),n=1;n<this.numRounds;n+=1)!0===this.F&&a%32!=0&&(r[r.length-1]&=16777215>>>24-a%32),r=this.R(r,a,0,this.l(this.g),a);return u(r)},e.prototype.setHMACKey=function(e,t,n){if(!0!==this.t)throw new Error("Variant does not support HMAC");if(!0===this.C)throw new Error("Cannot set MAC key after calling update");var i=r(t,(n||{}).encoding||"UTF8",this.u);this.B(i(e))},e.prototype.B=function(e){var t,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(!0===this.L)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.R(e.value,e.binLen,0,this.l(this.g),this.m));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.N[t]=909522486^e.value[t],this.S[t]=1549556828^e.value[t];this.U=this.A(this.N,this.U),this.H=this.T,this.L=!0},e.prototype.getHMAC=function(e,t){var n=o(t);return i(e,this.m,this.u,n)(this.o())},e.prototype.o=function(){var e;if(!1===this.L)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),this.m);return e=this.A(this.S,this.l(this.g)),this.R(t,this.m,this.T,e,this.m)},e}())}()},function(e){e.exports=JSON.parse('{"a":"1.0.18-dev.0"}')},function(e,t,n){"use strict";var r=n(3),i=n(8),o=n(32),a=n(27),s=n(12),u=n(119),l=n(7),c=n(21),f=n(34),h=n(11),d=n(14),p=n(13),m=n(17),y=n(40),g=n(39),v=n(50),b=n(51),_=n(83),T=n(122),w=n(86),S=n(30),E=n(16),k=n(60),C=n(18),x=n(26),O=n(48),P=n(61),A=n(49),R=n(62),L=n(10),I=n(123),D=n(164),N=n(35),j=n(23),M=n(28).forEach,U=P("hidden"),B=L("toPrimitive"),F=j.set,z=j.getterFor("Symbol"),V=Object.prototype,W=i.Symbol,H=o("JSON","stringify"),q=S.f,G=E.f,Y=T.f,X=k.f,K=O("symbols"),$=O("op-symbols"),Q=O("string-to-symbol-registry"),J=O("symbol-to-string-registry"),Z=O("wks"),ee=i.QObject,te=!ee||!ee.prototype||!ee.prototype.findChild,ne=s&&l((function(){return 7!=v(G({},"a",{get:function(){return G(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=q(V,t);r&&delete V[t],G(e,t,n),r&&e!==V&&G(V,t,r)}:G,re=function(e,t){var n=K[e]=v(W.prototype);return F(n,{type:"Symbol",tag:e,description:t}),s||(n.description=t),n},ie=u&&"symbol"==typeof W.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof W},oe=function(e,t,n){e===V&&oe($,t,n),d(e);var r=y(t,!0);return d(n),c(K,r)?(n.enumerable?(c(e,U)&&e[U][r]&&(e[U][r]=!1),n=v(n,{enumerable:g(0,!1)})):(c(e,U)||G(e,U,g(1,{})),e[U][r]=!0),ne(e,r,n)):G(e,r,n)},ae=function(e,t){d(e);var n=m(t),r=b(n).concat(ce(n));return M(r,(function(t){s&&!se.call(n,t)||oe(e,t,n[t])})),e},se=function(e){var t=y(e,!0),n=X.call(this,t);return!(this===V&&c(K,t)&&!c($,t))&&(!(n||!c(this,t)||!c(K,t)||c(this,U)&&this[U][t])||n)},ue=function(e,t){var n=m(e),r=y(t,!0);if(n!==V||!c(K,r)||c($,r)){var i=q(n,r);return!i||!c(K,r)||c(n,U)&&n[U][r]||(i.enumerable=!0),i}},le=function(e){var t=Y(m(e)),n=[];return M(t,(function(e){c(K,e)||c(A,e)||n.push(e)})),n},ce=function(e){var t=e===V,n=Y(t?$:m(e)),r=[];return M(n,(function(e){!c(K,e)||t&&!c(V,e)||r.push(K[e])})),r};(u||(x((W=function(){if(this instanceof W)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=R(e),n=function(e){this===V&&n.call($,e),c(this,U)&&c(this[U],t)&&(this[U][t]=!1),ne(this,t,g(1,e))};return s&&te&&ne(V,t,{configurable:!0,set:n}),re(t,e)}).prototype,"toString",(function(){return z(this).tag})),k.f=se,E.f=oe,S.f=ue,_.f=T.f=le,w.f=ce,s&&(G(W.prototype,"description",{configurable:!0,get:function(){return z(this).description}}),a||x(V,"propertyIsEnumerable",se,{unsafe:!0})),I.f=function(e){return re(L(e),e)}),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:W}),M(b(Z),(function(e){D(e)})),r({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=String(e);if(c(Q,t))return Q[t];var n=W(t);return Q[t]=n,J[n]=t,n},keyFor:function(e){if(!ie(e))throw TypeError(e+" is not a symbol");if(c(J,e))return J[e]},useSetter:function(){te=!0},useSimple:function(){te=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!s},{create:function(e,t){return void 0===t?v(e):ae(v(e),t)},defineProperty:oe,defineProperties:ae,getOwnPropertyDescriptor:ue}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:le,getOwnPropertySymbols:ce}),r({target:"Object",stat:!0,forced:l((function(){w.f(1)}))},{getOwnPropertySymbols:function(e){return w.f(p(e))}}),H)&&r({target:"JSON",stat:!0,forced:!u||l((function(){var e=W();return"[null]"!=H([e])||"{}"!=H({a:e})||"{}"!=H(Object(e))}))},{stringify:function(e,t,n){for(var r,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=t,(h(t)||void 0!==e)&&!ie(e))return f(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ie(t))return t}),i[1]=t,H.apply(null,i)}});W.prototype[B]||C(W.prototype,B,W.prototype.valueOf),N(W,"Symbol"),A[U]=!0},function(e,t,n){var r=n(8),i=n(82),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r=n(21),i=n(116),o=n(30),a=n(16);e.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,l=0;l<n.length;l++){var c=n[l];r(e,c)||s(e,c,u(t,c))}}},function(e,t,n){var r=n(117),i=n(21),o=n(123),a=n(16).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},function(e,t,n){"use strict";var r=n(3),i=n(7),o=n(34),a=n(11),s=n(13),u=n(9),l=n(36),c=n(53),f=n(54),h=n(10),d=n(88),p=h("isConcatSpreadable"),m=d>=51||!i((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),y=f("concat"),g=function(e){if(!a(e))return!1;var t=e[p];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!m||!y},{concat:function(e){var t,n,r,i,o,a=s(this),f=c(a,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(g(o=-1===t?a:arguments[t])){if(h+(i=u(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,h++)n in o&&l(f,h,o[n])}else{if(h>=9007199254740991)throw TypeError("Maximum allowed index exceeded");l(f,h++,o)}return f.length=h,f}})},function(e,t,n){var r=n(3),i=n(167),o=n(24);r({target:"Array",proto:!0},{copyWithin:i}),o("copyWithin")},function(e,t,n){"use strict";var r=n(13),i=n(41),o=n(9),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),s=o(n.length),u=i(e,s),l=i(t,s),c=arguments.length>2?arguments[2]:void 0,f=a((void 0===c?s:i(c,s))-l,s-u),h=1;for(l<u&&u<l+f&&(h=-1,l+=f-1,u+=f-1);f-- >0;)l in n?n[u]=n[l]:delete n[u],u+=h,l+=h;return n}},function(e,t,n){"use strict";var r=n(3),i=n(28).every;r({target:"Array",proto:!0,forced:n(29)("every")},{every:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(3),i=n(170),o=n(24);r({target:"Array",proto:!0},{fill:i}),o("fill")},function(e,t,n){"use strict";var r=n(13),i=n(41),o=n(9);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,l=void 0===u?n:i(u,n);l>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(3),i=n(28).find,o=n(24),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("find")},function(e,t,n){"use strict";var r=n(3),i=n(28).findIndex,o=n(24),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("findIndex")},function(e,t,n){"use strict";var r=n(3),i=n(124),o=n(13),a=n(9),s=n(33),u=n(53);r({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=o(this),n=a(t.length),r=u(t,0);return r.length=i(r,t,t,n,0,void 0===e?1:s(e)),r}})},function(e,t,n){"use strict";var r=n(3),i=n(124),o=n(13),a=n(9),s=n(22),u=n(53);r({target:"Array",proto:!0},{flatMap:function(e){var t,n=o(this),r=a(n.length);return s(e),(t=u(n,0)).length=i(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},function(e,t,n){var r=n(3),i=n(176);r({target:"Array",stat:!0,forced:!n(92)((function(e){Array.from(e)}))},{from:i})},function(e,t,n){"use strict";var r=n(52),i=n(13),o=n(126),a=n(127),s=n(9),u=n(36),l=n(128);e.exports=function(e){var t,n,c,f,h,d=i(e),p="function"==typeof this?this:Array,m=arguments.length,y=m>1?arguments[1]:void 0,g=void 0!==y,v=0,b=l(d);if(g&&(y=r(y,m>2?arguments[2]:void 0,2)),null==b||p==Array&&a(b))for(n=new p(t=s(d.length));t>v;v++)u(n,v,g?y(d[v],v):d[v]);else for(h=(f=b.call(d)).next,n=new p;!(c=h.call(f)).done;v++)u(n,v,g?o(f,y,[c.value,v],!0):c.value);return n.length=v,n}},function(e,t,n){"use strict";var r=n(3),i=n(84).includes,o=n(24);r({target:"Array",proto:!0},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},function(e,t,n){"use strict";var r=n(3),i=n(84).indexOf,o=n(29),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,u=o("indexOf");r({target:"Array",proto:!0,forced:s||u},{indexOf:function(e){return s?a.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){n(3)({target:"Array",stat:!0},{isArray:n(34)})},function(e,t,n){var r=n(11);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(3),i=n(47),o=n(17),a=n(29),s=[].join,u=i!=Object,l=a("join",",");r({target:"Array",proto:!0,forced:u||l},{join:function(e){return s.call(o(this),void 0===e?",":e)}})},function(e,t,n){var r=n(3),i=n(183);r({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},function(e,t,n){"use strict";var r=n(17),i=n(33),o=n(9),a=n(29),s=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,c=a("lastIndexOf");e.exports=l||c?function(e){if(l)return u.apply(this,arguments)||0;var t=r(this),n=o(t.length),a=n-1;for(arguments.length>1&&(a=s(a,i(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:u},function(e,t,n){"use strict";var r=n(3),i=n(28).map;r({target:"Array",proto:!0,forced:!n(54)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(3),i=n(7),o=n(36);r({target:"Array",stat:!0,forced:i((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;)o(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(3),i=n(132).right;r({target:"Array",proto:!0,forced:n(29)("reduceRight")},{reduceRight:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(3),i=n(34),o=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),o.call(this)}})},function(e,t,n){"use strict";var r=n(3),i=n(11),o=n(34),a=n(41),s=n(9),u=n(17),l=n(36),c=n(54),f=n(10)("species"),h=[].slice,d=Math.max;r({target:"Array",proto:!0,forced:!c("slice")},{slice:function(e,t){var n,r,c,p=u(this),m=s(p.length),y=a(e,m),g=a(void 0===t?m:t,m);if(o(p)&&("function"!=typeof(n=p.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[f])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(p,y,g);for(r=new(void 0===n?Array:n)(d(g-y,0)),c=0;y<g;y++,c++)y in p&&l(r,c,p[y]);return r.length=c,r}})},function(e,t,n){"use strict";var r=n(3),i=n(28).some;r({target:"Array",proto:!0,forced:n(29)("some")},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(3),i=n(22),o=n(13),a=n(7),s=n(29),u=[].sort,l=[1,2,3],c=a((function(){l.sort(void 0)})),f=a((function(){l.sort(null)})),h=s("sort");r({target:"Array",proto:!0,forced:c||!f||h},{sort:function(e){return void 0===e?u.call(o(this)):u.call(o(this),i(e))}})},function(e,t,n){n(133)("Array")},function(e,t,n){"use strict";var r=n(3),i=n(41),o=n(33),a=n(9),s=n(13),u=n(53),l=n(36),c=n(54),f=Math.max,h=Math.min;r({target:"Array",proto:!0,forced:!c("splice")},{splice:function(e,t){var n,r,c,d,p,m,y=s(this),g=a(y.length),v=i(e,g),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=g-v):(n=b-2,r=h(f(o(t),0),g-v)),g+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(c=u(y,r),d=0;d<r;d++)(p=v+d)in y&&l(c,d,y[p]);if(c.length=r,n<r){for(d=v;d<g-r;d++)m=d+n,(p=d+r)in y?y[m]=y[p]:delete y[m];for(d=g;d>g-r+n;d--)delete y[d-1]}else if(n>r)for(d=g-r;d>v;d--)m=d+n-1,(p=d+r-1)in y?y[m]=y[p]:delete y[m];for(d=0;d<n;d++)y[d+v]=arguments[d+2];return y.length=g-r+n,c}})},function(e,t,n){n(24)("flat")},function(e,t,n){n(24)("flatMap")},function(e,t,n){var r=n(8);n(35)(r.JSON,"JSON",!0)},function(e,t,n){n(35)(Math,"Math",!0)},function(e,t,n){"use strict";var r=n(12),i=n(7),o=n(51),a=n(86),s=n(60),u=n(13),l=n(47),c=Object.assign;e.exports=!c||i((function(){var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||"abcdefghijklmnopqrst"!=o(c({},t)).join("")}))?function(e,t){for(var n=u(e),i=arguments.length,c=1,f=a.f,h=s.f;i>c;)for(var d,p=l(arguments[c++]),m=f?o(p).concat(f(p)):o(p),y=m.length,g=0;y>g;)d=m[g++],r&&!h.call(p,d)||(n[d]=p[d]);return n}:c},function(e,t,n){n(3)({target:"Object",stat:!0,sham:!n(12)},{create:n(50)})},function(e,t,n){"use strict";var r=n(3),i=n(12),o=n(66),a=n(13),s=n(22),u=n(16);i&&r({target:"Object",proto:!0,forced:o},{__defineGetter__:function(e,t){u.f(a(this),e,{get:s(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(3),i=n(12);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:n(120)})},function(e,t,n){var r=n(3),i=n(12);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n(16).f})},function(e,t,n){"use strict";var r=n(3),i=n(12),o=n(66),a=n(13),s=n(22),u=n(16);i&&r({target:"Object",proto:!0,forced:o},{__defineSetter__:function(e,t){u.f(a(this),e,{set:s(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(3),i=n(134).entries;r({target:"Object",stat:!0},{entries:function(e){return i(e)}})},function(e,t,n){var r=n(3),i=n(67),o=n(7),a=n(11),s=n(43).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!i},{freeze:function(e){return u&&a(e)?u(s(e)):e}})},function(e,t,n){var r=n(3),i=n(37),o=n(36);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return i(e,(function(e,n){o(t,e,n)}),void 0,!0),t}})},function(e,t,n){var r=n(3),i=n(7),o=n(17),a=n(30).f,s=n(12),u=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||u,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},function(e,t,n){var r=n(3),i=n(12),o=n(116),a=n(17),s=n(30),u=n(36);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),i=s.f,l=o(r),c={},f=0;l.length>f;)void 0!==(n=i(r,t=l[f++]))&&u(c,t,n);return c}})},function(e,t,n){var r=n(3),i=n(7),o=n(122).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},function(e,t,n){var r=n(3),i=n(7),o=n(13),a=n(42),s=n(131);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(e){return a(o(e))}})},function(e,t,n){n(3)({target:"Object",stat:!0},{is:n(135)})},function(e,t,n){var r=n(3),i=n(7),o=n(11),a=Object.isExtensible;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isExtensible:function(e){return!!o(e)&&(!a||a(e))}})},function(e,t,n){var r=n(3),i=n(7),o=n(11),a=Object.isFrozen;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isFrozen:function(e){return!o(e)||!!a&&a(e)}})},function(e,t,n){var r=n(3),i=n(7),o=n(11),a=Object.isSealed;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isSealed:function(e){return!o(e)||!!a&&a(e)}})},function(e,t,n){var r=n(3),i=n(13),o=n(51);r({target:"Object",stat:!0,forced:n(7)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},function(e,t,n){"use strict";var r=n(3),i=n(12),o=n(66),a=n(13),s=n(40),u=n(42),l=n(30).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupGetter__:function(e){var t,n=a(this),r=s(e,!0);do{if(t=l(n,r))return t.get}while(n=u(n))}})},function(e,t,n){"use strict";var r=n(3),i=n(12),o=n(66),a=n(13),s=n(40),u=n(42),l=n(30).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupSetter__:function(e){var t,n=a(this),r=s(e,!0);do{if(t=l(n,r))return t.set}while(n=u(n))}})},function(e,t,n){var r=n(3),i=n(11),o=n(43).onFreeze,a=n(67),s=n(7),u=Object.preventExtensions;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{preventExtensions:function(e){return u&&i(e)?u(o(e)):e}})},function(e,t,n){var r=n(3),i=n(11),o=n(43).onFreeze,a=n(67),s=n(7),u=Object.seal;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{seal:function(e){return u&&i(e)?u(o(e)):e}})},function(e,t,n){n(3)({target:"Object",stat:!0},{setPrototypeOf:n(65)})},function(e,t,n){"use strict";var r=n(91),i={};i[n(10)("toStringTag")]="z",e.exports="[object z]"!==String(i)?function(){return"[object "+r(this)+"]"}:i.toString},function(e,t,n){var r=n(3),i=n(134).values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},function(e,t,n){"use strict";var r,i,o,a,s=n(3),u=n(27),l=n(8),c=n(32),f=n(136),h=n(26),d=n(97),p=n(35),m=n(133),y=n(11),g=n(22),v=n(98),b=n(31),_=n(37),T=n(92),w=n(68),S=n(137).set,E=n(223),k=n(138),C=n(224),x=n(56),O=n(69),P=n(23),A=n(87),R=n(10),L=n(88),I=R("species"),D="Promise",N=P.get,j=P.set,M=P.getterFor(D),U=f,B=l.TypeError,F=l.document,z=l.process,V=c("fetch"),W=x.f,H=W,q="process"==b(z),G=!!(F&&F.createEvent&&l.dispatchEvent),Y=A(D,(function(){if(66===L)return!0;if(!q&&"function"!=typeof PromiseRejectionEvent)return!0;if(u&&!U.prototype.finally)return!0;if(L>=51&&/native code/.test(U))return!1;var e=U.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[I]=t,!(e.then((function(){}))instanceof t)})),X=Y||!T((function(e){U.all(e).catch((function(){}))})),K=function(e){var t;return!(!y(e)||"function"!=typeof(t=e.then))&&t},$=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;E((function(){for(var i=t.value,o=1==t.state,a=0;r.length>a;){var s,u,l,c=r[a++],f=o?c.ok:c.fail,h=c.resolve,d=c.reject,p=c.domain;try{f?(o||(2===t.rejection&&ee(e,t),t.rejection=1),!0===f?s=i:(p&&p.enter(),s=f(i),p&&(p.exit(),l=!0)),s===c.promise?d(B("Promise-chain cycle")):(u=K(s))?u.call(s,h,d):h(s)):d(i)}catch(e){p&&!l&&p.exit(),d(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&J(e,t)}))}},Q=function(e,t,n){var r,i;G?((r=F.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),l.dispatchEvent(r)):r={promise:t,reason:n},(i=l["on"+e])?i(r):"unhandledrejection"===e&&C("Unhandled promise rejection",n)},J=function(e,t){S.call(l,(function(){var n,r=t.value;if(Z(t)&&(n=O((function(){q?z.emit("unhandledRejection",r,e):Q("unhandledrejection",e,r)})),t.rejection=q||Z(t)?2:1,n.error))throw n.value}))},Z=function(e){return 1!==e.rejection&&!e.parent},ee=function(e,t){S.call(l,(function(){q?z.emit("rejectionHandled",e):Q("rejectionhandled",e,t.value)}))},te=function(e,t,n,r){return function(i){e(t,n,i,r)}},ne=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,$(e,t,!0))},re=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw B("Promise can't be resolved itself");var i=K(n);i?E((function(){var r={done:!1};try{i.call(n,te(re,e,r,t),te(ne,e,r,t))}catch(n){ne(e,r,n,t)}})):(t.value=n,t.state=1,$(e,t,!1))}catch(n){ne(e,{done:!1},n,t)}}};Y&&(U=function(e){v(this,U,D),g(e),r.call(this);var t=N(this);try{e(te(re,this,t),te(ne,this,t))}catch(e){ne(this,t,e)}},(r=function(e){j(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(U.prototype,{then:function(e,t){var n=M(this),r=W(w(this,U));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=q?z.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&$(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=N(e);this.promise=e,this.resolve=te(re,e,t),this.reject=te(ne,e,t)},x.f=W=function(e){return e===U||e===o?new i(e):H(e)},u||"function"!=typeof f||(a=f.prototype.then,h(f.prototype,"then",(function(e,t){var n=this;return new U((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof V&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return k(U,V.apply(l,arguments))}}))),s({global:!0,wrap:!0,forced:Y},{Promise:U}),p(U,D,!1,!0),m(D),o=c(D),s({target:D,stat:!0,forced:Y},{reject:function(e){var t=W(this);return t.reject.call(void 0,e),t.promise}}),s({target:D,stat:!0,forced:u||Y},{resolve:function(e){return k(u&&this===o?U:this,e)}}),s({target:D,stat:!0,forced:X},{all:function(e){var t=this,n=W(t),r=n.resolve,i=n.reject,o=O((function(){var n=g(t.resolve),o=[],a=0,s=1;_(e,(function(e){var u=a++,l=!1;o.push(void 0),s++,n.call(t,e).then((function(e){l||(l=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=W(t),r=n.reject,i=O((function(){var i=g(t.resolve);_(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},function(e,t,n){var r,i,o,a,s,u,l,c,f=n(8),h=n(30).f,d=n(31),p=n(137).set,m=n(63),y=f.MutationObserver||f.WebKitMutationObserver,g=f.process,v=f.Promise,b="process"==d(g),_=h(f,"queueMicrotask"),T=_&&_.value;T||(r=function(){var e,t;for(b&&(e=g.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},b?a=function(){g.nextTick(r)}:y&&!/(iphone|ipod|ipad).*applewebkit/i.test(m)?(s=!0,u=document.createTextNode(""),new y(r).observe(u,{characterData:!0}),a=function(){u.data=s=!s}):v&&v.resolve?(l=v.resolve(void 0),c=l.then,a=function(){c.call(l,r)}):a=function(){p.call(f,r)}),e.exports=T||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},function(e,t,n){var r=n(8);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";var r=n(3),i=n(27),o=n(136),a=n(32),s=n(68),u=n(138),l=n(26);r({target:"Promise",proto:!0,real:!0},{finally:function(e){var t=s(this,a("Promise")),n="function"==typeof e;return this.then(n?function(n){return u(t,e()).then((function(){return n}))}:e,n?function(n){return u(t,e()).then((function(){throw n}))}:e)}}),i||"function"!=typeof o||o.prototype.finally||l(o.prototype,"finally",a("Promise").prototype.finally)},function(e,t,n){"use strict";var r=n(3),i=n(57).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(3),i=n(9),o=n(101),a=n(15),s=n(102),u="".endsWith,l=Math.min;r({target:"String",proto:!0,forced:!s("endsWith")},{endsWith:function(e){var t=String(a(this));o(e);var n=arguments.length>1?arguments[1]:void 0,r=i(t.length),s=void 0===n?r:l(i(n),r),c=String(e);return u?u.call(t,c,s):t.slice(s-c.length,s)===c}})},function(e,t,n){var r=n(3),i=n(41),o=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var r=n(3),i=n(101),o=n(15);r({target:"String",proto:!0,forced:!n(102)("includes")},{includes:function(e){return!!~String(o(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(3),i=n(139).end;r({target:"String",proto:!0,forced:n(141)},{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(3),i=n(139).start;r({target:"String",proto:!0,forced:n(141)},{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(3),i=n(17),o=n(9);r({target:"String",stat:!0},{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(e,t,n){n(3)({target:"String",proto:!0},{repeat:n(140)})},function(e,t,n){"use strict";var r=n(72),i=n(14),o=n(15),a=n(135),s=n(74);r("search",1,(function(e,t,n){return[function(t){var n=o(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=i(e),u=String(this),l=o.lastIndex;a(l,0)||(o.lastIndex=0);var c=s(o,u);return a(o.lastIndex,l)||(o.lastIndex=l),null===c?-1:c.index}]}))},function(e,t,n){"use strict";var r=n(72),i=n(71),o=n(14),a=n(15),s=n(68),u=n(73),l=n(9),c=n(74),f=n(70),h=n(7),d=[].push,p=Math.min,m=!h((function(){return!RegExp(4294967295,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!i(e))return t.call(r,e,o);for(var s,u,l,c=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,m=new RegExp(e.source,h+"g");(s=f.call(m,r))&&!((u=m.lastIndex)>p&&(c.push(r.slice(p,s.index)),s.length>1&&s.index<r.length&&d.apply(c,s.slice(1)),l=s[0].length,p=u,c.length>=o));)m.lastIndex===s.index&&m.lastIndex++;return p===r.length?!l&&m.test("")||c.push(""):c.push(r.slice(p)),c.length>o?c.slice(0,o):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=a(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,i,n):r.call(String(i),t,n)},function(e,i){var a=n(r,e,this,i,r!==t);if(a.done)return a.value;var f=o(e),h=String(this),d=s(f,RegExp),y=f.unicode,g=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(m?"y":"g"),v=new d(m?f:"^(?:"+f.source+")",g),b=void 0===i?4294967295:i>>>0;if(0===b)return[];if(0===h.length)return null===c(v,h)?[h]:[];for(var _=0,T=0,w=[];T<h.length;){v.lastIndex=m?T:0;var S,E=c(v,m?h:h.slice(T));if(null===E||(S=p(l(v.lastIndex+(m?0:T)),h.length))===_)T=u(h,T,y);else{if(w.push(h.slice(_,T)),w.length===b)return w;for(var k=1;k<=E.length-1;k++)if(w.push(E[k]),w.length===b)return w;T=_=S}}return w.push(h.slice(_)),w}]}),!m)},function(e,t,n){"use strict";var r=n(3),i=n(9),o=n(101),a=n(15),s=n(102),u="".startsWith,l=Math.min;r({target:"String",proto:!0,forced:!s("startsWith")},{startsWith:function(e){var t=String(a(this));o(e);var n=i(l(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return u?u.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";var r=n(3),i=n(75).trim;r({target:"String",proto:!0,forced:n(107)("trim")},{trim:function(){return i(this)}})},function(e,t,n){"use strict";var r=n(3),i=n(75).end,o=n(107)("trimEnd"),a=o?function(){return i(this)}:"".trimEnd;r({target:"String",proto:!0,forced:o},{trimEnd:a,trimRight:a})},function(e,t,n){"use strict";var r=n(3),i=n(75).start,o=n(107)("trimStart"),a=o?function(){return i(this)}:"".trimStart;r({target:"String",proto:!0,forced:o},{trimStart:a,trimLeft:a})},function(e,t,n){"use strict";var r=n(3),i=n(19);r({target:"String",proto:!0,forced:n(20)("anchor")},{anchor:function(e){return i(this,"a","name",e)}})},function(e,t,n){"use strict";var r=n(3),i=n(19);r({target:"String",proto:!0,forced:n(20)("big")},{big:function(){return i(this,"big","","")}})},function(e,t,n){"use strict";var r=n(3),i=n(19);r({target:"String",proto:!0,forced:n(20)("blink")},{blink:function(){return i(this,"blink","","")}})},function(e,t,n){"use strict";var r=n(3),i=n(19);r({target:"String",proto:!0,forced:n(20)("bold")},{bold:function(){return i(this,"b","","")}})},function(e,t,n){"use strict";var r=n(3),i=n(19);r({target:"String",proto:!0,forced:n(20)("fixed")},{fixed:function(){return i(this,"tt","","")}})},function(e,t,n){"use strict";var r=n(3),i=n(19);r({target:"String",proto:!0,forced:n(20)("fontcolor")},{fontcolor:function(e){return i(this,"font","color",e)}})},function(e,t,n){"use strict";var r=n(3),i=n(19);r({target:"String",proto:!0,forced:n(20)("fontsize")},{fontsize:function(e){return i(this,"font","size",e)}})},function(e,t,n){"use strict";var r=n(3),i=n(19);r({target:"String",proto:!0,forced:n(20)("italics")},{italics:function(){return i(this,"i","","")}})},function(e,t,n){"use strict";var r=n(3),i=n(19);r({target:"String",proto:!0,forced:n(20)("link")},{link:function(e){return i(this,"a","href",e)}})},function(e,t,n){"use strict";var r=n(3),i=n(19);r({target:"String",proto:!0,forced:n(20)("small")},{small:function(){return i(this,"small","","")}})},function(e,t,n){"use strict";var r=n(3),i=n(19);r({target:"String",proto:!0,forced:n(20)("strike")},{strike:function(){return i(this,"strike","","")}})},function(e,t,n){"use strict";var r=n(3),i=n(19);r({target:"String",proto:!0,forced:n(20)("sub")},{sub:function(){return i(this,"sub","","")}})},function(e,t,n){"use strict";var r=n(3),i=n(19);r({target:"String",proto:!0,forced:n(20)("sup")},{sup:function(){return i(this,"sup","","")}})},function(e,t,n){"use strict";var r=n(3),i=n(12),o=n(42),a=n(65),s=n(50),u=n(16),l=n(39),c=n(37),f=n(18),h=n(14),d=n(23),p=d.set,m=d.getterFor("AggregateError"),y=function(e,t){var n=this;if(!(n instanceof y))return new y(e,t);a&&(n=a(new Error(t),o(n)));var r=[];return c(e,r.push,r),i?p(n,{errors:r,type:"AggregateError"}):n.errors=r,void 0!==t&&f(n,"message",String(t)),n};y.prototype=s(Error.prototype,{constructor:l(5,y),message:l(5,""),name:l(5,"AggregateError"),toString:l(5,(function(){var e=h(this).name;e=void 0===e?"AggregateError":String(e);var t=this.message;return e+": "+(t=void 0===t?"":String(t))}))}),i&&u.f(y.prototype,"errors",{get:function(){return m(this).errors},configurable:!0}),r({global:!0},{AggregateError:y})},function(e,t,n){"use strict";var r=n(12),i=n(24),o=n(13),a=n(9),s=n(16).f;r&&!("lastIndex"in[])&&(s(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=o(this),t=a(e.length);return 0==t?0:t-1}}),i("lastIndex"))},function(e,t,n){"use strict";var r=n(12),i=n(24),o=n(13),a=n(9),s=n(16).f;r&&!("lastItem"in[])&&(s(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=o(this),t=a(e.length);return 0==t?void 0:e[t-1]},set:function(e){var t=o(this),n=a(t.length);return t[0==n?0:n-1]=e}}),i("lastItem"))},function(e,t,n){n(257)},function(e,t,n){"use strict";var r=n(3),i=n(22),o=n(56),a=n(69),s=n(37);r({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=o.f(t),r=n.resolve,u=n.reject,l=a((function(){var n=i(t.resolve),o=[],a=0,u=1;s(e,(function(e){var i=a++,s=!1;o.push(void 0),u++,n.call(t,e).then((function(e){s||(s=!0,o[i]={status:"fulfilled",value:e},--u||r(o))}),(function(e){s||(s=!0,o[i]={status:"rejected",reason:e},--u||r(o))}))})),--u||r(o)}));return l.error&&u(l.value),n.promise}})},function(e,t,n){"use strict";var r=n(3),i=n(22),o=n(32),a=n(56),s=n(69),u=n(37);r({target:"Promise",stat:!0},{any:function(e){var t=this,n=a.f(t),r=n.resolve,l=n.reject,c=s((function(){var n=i(t.resolve),a=[],s=0,c=1,f=!1;u(e,(function(e){var i=s++,u=!1;a.push(void 0),c++,n.call(t,e).then((function(e){u||f||(f=!0,r(e))}),(function(e){u||f||(u=!0,a[i]=e,--c||l(new(o("AggregateError"))(a,"No one promise resolved")))}))})),--c||l(new(o("AggregateError"))(a,"No one promise resolved"))}));return c.error&&l(c.value),n.promise}})},function(e,t,n){"use strict";var r=n(3),i=n(56),o=n(69);r({target:"Promise",stat:!0},{try:function(e){var t=i.f(this),n=o(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}})},function(e,t,n){"use strict";var r=n(3),i=n(57).charAt;r({target:"String",proto:!0},{at:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(3),i=n(93),o=n(15),a=n(23),s=n(57),u=s.codeAt,l=s.charAt,c=a.set,f=a.getterFor("String Iterator"),h=i((function(e){c(this,{type:"String Iterator",string:e,index:0})}),"String",(function(){var e,t=f(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=l(n,r),t.index+=e.length,{value:{codePoint:u(e,0),position:r},done:!1})}));r({target:"String",proto:!0},{codePoints:function(){return new h(String(o(this)))}})},function(e,t,n){n(263)},function(e,t,n){"use strict";var r=n(3),i=n(93),o=n(15),a=n(9),s=n(22),u=n(14),l=n(91),c=n(71),f=n(100),h=n(18),d=n(7),p=n(10),m=n(68),y=n(73),g=n(23),v=n(27),b=p("matchAll"),_=g.set,T=g.getterFor("RegExp String Iterator"),w=RegExp.prototype,S=w.exec,E="".matchAll,k=!!E&&!d((function(){"a".matchAll(/./)})),C=i((function(e,t,n,r){_(this,{type:"RegExp String Iterator",regexp:e,string:t,global:n,unicode:r,done:!1})}),"RegExp String",(function(){var e=T(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,n=e.string,r=function(e,t){var n,r=e.exec;if("function"==typeof r){if("object"!=typeof(n=r.call(e,t)))throw TypeError("Incorrect exec result");return n}return S.call(e,t)}(t,n);return null===r?{value:void 0,done:e.done=!0}:e.global?(""==String(r[0])&&(t.lastIndex=y(n,a(t.lastIndex),e.unicode)),{value:r,done:!1}):(e.done=!0,{value:r,done:!1})})),x=function(e){var t,n,r,i,o,s,l=u(this),c=String(e);return t=m(l,RegExp),void 0===(n=l.flags)&&l instanceof RegExp&&!("flags"in w)&&(n=f.call(l)),r=void 0===n?"":String(n),i=new t(t===RegExp?l.source:l,r),o=!!~r.indexOf("g"),s=!!~r.indexOf("u"),i.lastIndex=a(l.lastIndex),new C(i,c,o,s)};r({target:"String",proto:!0,forced:k},{matchAll:function(e){var t,n,r,i=o(this);if(null!=e){if(c(e)&&!~String(o("flags"in w?e.flags:f.call(e))).indexOf("g"))throw TypeError("`.matchAll` does not allow non-global regexes");if(k)return E.apply(i,arguments);if(void 0===(n=e[b])&&v&&"RegExp"==l(e)&&(n=x),null!=n)return s(n).call(e,i)}else if(k)return E.apply(i,arguments);return t=String(i),r=new RegExp(e,"g"),v?x.call(r,t):r[b](t)}}),v||b in w||h(w,b,x)},function(e,t,n){"use strict";var r=n(3),i=n(15),o=n(71),a=n(100),s=n(10),u=n(27),l=s("replace"),c=RegExp.prototype;r({target:"String",proto:!0},{replaceAll:function e(t,n){var r,s,f,h,d,p,m,y=i(this);if(null!=t){if((r=o(t))&&!~String(i("flags"in c?t.flags:a.call(t))).indexOf("g"))throw TypeError("`.replaceAll` does not allow non-global regexes");if(void 0!==(s=t[l]))return s.call(t,y,n);if(u&&r)return String(y).replace(t,n)}if(f=String(y),""===(h=String(t)))return e.call(f,/(?:)/g,n);if(d=f.split(h),"function"!=typeof n)return d.join(String(n));for(p=d[0],m=1;m<d.length;m++)p+=String(n(h,m-1,f)),p+=d[m];return p}})},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var c={};function f(){}function h(){}function d(){}var p={};p[i]=function(){return this};var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&n.call(y,i)&&(p=y);var g=d.prototype=f.prototype=Object.create(p);function v(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=g.constructor=d,d.constructor=h,h.displayName=s(d,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,s(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},v(b.prototype),b.prototype[o]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v(g),s(g,a,"Generator"),g[i]=function(){return this},g.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=E,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";
12
+ /** @license React v16.11.0
13
+ * react.production.min.js
14
+ *
15
+ * Copyright (c) Facebook, Inc. and its affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */var r=n(143),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.forward_ref"):60112,d=i?Symbol.for("react.suspense"):60113;i&&Symbol.for("react.suspense_list");var p=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116;i&&Symbol.for("react.fundamental"),i&&Symbol.for("react.responder"),i&&Symbol.for("react.scope");var y="function"==typeof Symbol&&Symbol.iterator;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function _(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||v}function T(){}function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||v}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(g(85));this.updater.enqueueSetState(this,e,t,"setState")},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},T.prototype=_.prototype;var S=w.prototype=new T;S.constructor=w,r(S,_.prototype),S.isPureReactComponent=!0;var E={current:null},k={current:null},C=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)C.call(t,r)&&!x.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:k.current}}function P(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var A=/\/+/g,R=[];function L(e,t,n,r){if(R.length){var i=R.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function I(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>R.length&&R.push(e)}function D(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case a:u=!0}}if(u)return r(i,t,""===n?"."+N(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var l=0;l<t.length;l++){var c=n+N(s=t[l],l);u+=e(s,c,r,i)}else if(null===t||"object"!=typeof t?c=null:c="function"==typeof(c=y&&t[y]||t["@@iterator"])?c:null,"function"==typeof c)for(t=c.call(t),l=0;!(s=t.next()).done;)u+=e(s=s.value,c=n+N(s,l++),r,i);else if("object"===s)throw r=""+t,Error(g(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return u}(e,"",t,n)}function N(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function j(e,t){e.func.call(e.context,t,e.count++)}function M(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?U(e,r,n,(function(e){return e})):null!=e&&(P(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(A,"$&/")+"/")+n)),r.push(e))}function U(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(A,"$&/")+"/"),D(e,M,t=L(t,o,r,i)),I(t)}function B(){var e=E.current;if(null===e)throw Error(g(321));return e}var F={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return U(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;D(e,j,t=L(null,null,t,n)),I(t)},count:function(e){return D(e,(function(){return null}),null)},toArray:function(e){var t=[];return U(e,t,null,(function(e){return e})),t},only:function(e){if(!P(e))throw Error(g(143));return e}},createRef:function(){return{current:null}},Component:_,PureComponent:w,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:h,render:e}},lazy:function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:p,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return B().useCallback(e,t)},useContext:function(e,t){return B().useContext(e,t)},useEffect:function(e,t){return B().useEffect(e,t)},useImperativeHandle:function(e,t,n){return B().useImperativeHandle(e,t,n)},useDebugValue:function(){},useLayoutEffect:function(e,t){return B().useLayoutEffect(e,t)},useMemo:function(e,t){return B().useMemo(e,t)},useReducer:function(e,t,n){return B().useReducer(e,t,n)},useRef:function(e){return B().useRef(e)},useState:function(e){return B().useState(e)},Fragment:s,Profiler:l,StrictMode:u,Suspense:d,createElement:O,cloneElement:function(e,t,n){if(null==e)throw Error(g(267,e));var i=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=k.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)C.call(t,c)&&!x.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){l=Array(c);for(var f=0;f<c;f++)l[f]=arguments[f+2];i.children=l}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:u}},createFactory:function(e){var t=O.bind(null,e);return t.type=e,t},isValidElement:P,version:"16.11.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:E,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:k,IsSomeRendererActing:{current:!1},assign:r}},z={default:F},V=z&&F||z;e.exports=V.default||V},function(e,t){},function(e,t,n){var r=n(271),i=n(6);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(25))},function(e,t){e.exports=function(e){if(!e)return!1;var t=n.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString},function(e,t,n){var r=n(2),i=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function o(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function s(){this.values=i(null)}function u(e,t,n,r){var i=r?e.split(r):[e];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);if(2===a.length)t(a[0],a[1])}}function l(e,t,n){var r=e;function i(){var t=a(e);if(null===t)throw new o(o.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=i(),l(),"--\x3e"!==e.substr(0,3))throw new o(o.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),l(),t.endTime=i(),l(),function(e,t){var r=new s;u(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var o=t.split(","),a=o[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","center","end"]);break;case"position":o=t.split(","),r.percent(e,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");try{t.line=r.get("line","auto")}catch(e){}t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(e){t.position=r.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}o.prototype=i(Error.prototype),o.prototype.constructor=o,o.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},s.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var c=r.createElement("textarea"),f={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},d={v:"title",lang:"lang"},p={rt:"ruby"};function 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 r(e,t){return!p[t.localName]||p[t.localName]===e.localName}function i(t,n){var r=f[t];if(!r)return null;var i=e.document.createElement(r),o=d[t];return o&&n&&(i[o]=n.trim()),i}for(var o,s,u=e.document.createElement("div"),l=u,m=[];null!==(o=n());)if("<"!==o[0])l.appendChild(e.document.createTextNode((s=o,c.innerHTML=s,s=c.textContent,c.textContent="",s)));else{if("/"===o[1]){m.length&&m[m.length-1]===o.substr(2).replace(">","")&&(m.pop(),l=l.parentNode);continue}var y,g=a(o.substr(1,o.length-2));if(g){y=e.document.createProcessingInstruction("timestamp",g),l.appendChild(y);continue}var v=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!v)continue;if(!(y=i(v[1],v[3])))continue;if(!r(l,y))continue;if(v[2]){var b=v[2].split(".");b.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(h.hasOwnProperty(n)){var r=t?"background-color":"color",i=h[n];y.style[r]=i}})),y.className=b.join(" ")}m.push(v[1]),l.appendChild(y),l=y}return u}var y=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function g(e){for(var t=0;t<y.length;t++){var n=y[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function v(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var o=n.match(/^.*(\n|\r)/);return o?(e.length=0,o[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var o=0;o<n.length;o++)if(g(n.charCodeAt(o)))return"rtl";return"ltr"}function b(){}function _(e,t,n){b.call(this),this.cue=t,this.cueDiv=m(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:v(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(t.positionAlign){case"start":i=t.position;break;case"center":i=t.position-t.size/2;break;case"end":i=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function T(e){var t,n,r,i;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var o=(o=e.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();e=e.div.getBoundingClientRect(),t=o?Math.max(o[0]&&o[0].height||0,e.height/o.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function w(e,t,n,r){var i=new T(t),o=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}(o),s=[];if(o.snapToLines){var u;switch(o.vertical){case"":s=["+y","-y"],u="height";break;case"rl":s=["+x","-x"],u="width";break;case"lr":s=["-x","+x"],u="width"}var l=i.lineHeight,c=l*Math.round(a),f=n[u]+l,h=s[0];Math.abs(c)>f&&(c=c<0?-1:1,c*=Math.ceil(f/l)*l),a<0&&(c+=""===o.vertical?n.height:n.width,s=s.reverse()),i.move(h,c)}else{var d=i.lineHeight/n.height*100;switch(o.lineAlign){case"center":a-=d/2;break;case"end":a-=d}switch(o.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],i=new T(t)}var p=function(e,t){for(var i,o=new T(e),a=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var u=e.intersectPercentage(n);a>u&&(i=new T(e),a=u),e=new T(o)}return i||o}(i,s);t.move(p.toCSSCompatValues(n))}function S(){}b.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},b.prototype.formatStyle=function(e,t){return 0===e?0:e+t},_.prototype=i(b.prototype),_.prototype.constructor=_,T.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},T.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},T.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},T.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},T.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},T.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},S.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},S.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null};S.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],o=T.getSimpleBoxPosition(r),a={font:Math.round(.05*o.height*100)/100+"px sans-serif"};!function(){for(var n,s,u=0;u<t.length;u++)s=t[u],n=new _(e,s,a),r.appendChild(n.div),w(0,n,o,i),s.displayState=n.div,i.push(T.getSimpleBoxPosition(n))}()}else for(var s=0;s<t.length;s++)r.appendChild(t[s].displayState)},S.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},S.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof o))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}function r(e){e.match(/X-TIMESTAMP-MAP/)?u(e,(function(e,n){switch(e){case"X-TIMESTAMP-MAP":!function(e){var n=new s;u(e,(function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",a(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}}),/=/):u(e,(function(e,n){switch(e){case"Region":!function(e){var n=new s;if(u(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var i=new s;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;n.set(e+"X",i.get("x")),n.set(e+"Y",i.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var r=new(t.vttjs.VTTRegion||t.window.VTTRegion);r.width=n.get("width",100),r.lines=n.get("lines",3),r.regionAnchorX=n.get("regionanchorX",0),r.regionAnchorY=n.get("regionanchorY",100),r.viewportAnchorX=n.get("viewportanchorX",0),r.viewportAnchorY=n.get("viewportanchorY",100),r.scroll=n.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:n.get("id"),region:r})}}(n)}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var c=(i=n()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new o(o.Errors.BadSignature);t.state="HEADER"}for(var f=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(f?f=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(e){t.cue.align="middle"}if(t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":try{l(i,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var h=-1!==i.indexOf("--\x3e");if(!i||h&&(f=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":i||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new o(o.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}},e.exports=S},function(e,t){var n={"":1,lr:1,rl:1},r={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function i(e){return"string"==typeof e&&(!!r[e.toLowerCase()]&&e.toLowerCase())}function o(e,t,r){this.hasBeenReset=!1;var o="",a=!1,s=e,u=t,l=r,c=null,f="",h=!0,d="auto",p="start",m="auto",y="auto",g=100,v="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return o},set:function(e){o=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a},set:function(e){a=!!e}},startTime:{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");s=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return 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 f},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");f=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return d},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");d=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return p},set:function(e){var t=i(e);t?(p=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return 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 y},set:function(e){var t=i(e);t?(y=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return v},set:function(e){var t=i(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");v=t,this.hasBeenReset=!0}}}),this.displayState=void 0}o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=o},function(e,t){var n={"":!0,up:!0};function r(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,i=0,o=100,a=0,s=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");o=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return u},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):u=t}}})}},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){"use strict";(function(e){
20
+ /*!
21
+ * The buffer module from node.js, for the browser.
22
+ *
23
+ * @author Feross Aboukhadijeh <http://feross.org>
24
+ * @license MIT
25
+ */
26
+ var r=n(280),i=n(281),o=n(282);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|d(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(c(t),e=s(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|d(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;o<s;o++)if(l(e,o)===l(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(l(e,o+h)!==l(t,h)){f=!1;break}if(f)return o}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function _(e,t,n,r){return V(F(t,e.length-n),e,n,r)}function T(e,t,n,r){return V(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return T(e,t,n,r)}function S(e,t,n,r){return V(z(t),e,n,r)}function E(e,t,n,r){return V(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,u,l=e[i],c=null,f=l>239?4:l>223?3:l>191?2:1;if(i+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return l(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?C(this,0,e):m.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),l=this.slice(r,i),c=e.slice(t,n),f=0;f<s;++f)if(l[f]!==c[f]){o=l[f],a=c[f];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return T(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=B(e[o]);return i}function A(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function R(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function I(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function N(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,o){return o||N(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function M(e,t,n,r,o){return o||N(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return M(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return M(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=u.isBuffer(e)?e:F(new u(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(25))},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=l(e),a=r[0],s=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),c=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[c++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(c(e,a,a+16383>s?s:a+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=l}return(d?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;e[n+d]=255&a,d+=p,a/=256,l-=8);e[n+d-p]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){var n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+n.source+r.source+"*(?::"+n.source+r.source+"*)?$");function o(){}function a(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function s(e,t,n,r,i,o){for(var a,s=++t,u=0;;){var l=e.charAt(s);switch(l){case"=":if(1===u)a=e.slice(t,s),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(o.warning('attribute value must after "="'),a=e.slice(t,s)),t=s+1,!((s=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");c=e.slice(t,s).replace(/&#?\w+;/g,i),n.add(a,c,t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');c=e.slice(t,s).replace(/&#?\w+;/g,i),n.add(a,c,t),o.warning('attribute "'+a+'" missed start quot('+l+")!!"),t=s+1,u=5}break;case"/":switch(u){case 0:n.setTagName(e.slice(t,s));case 5:case 6:case 7:u=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==u&&n.setTagName(e.slice(t,s)),s;case">":switch(u){case 0:n.setTagName(e.slice(t,s));case 5:case 6:case 7:break;case 4:case 1:"/"===(c=e.slice(t,s)).slice(-1)&&(n.closed=!0,c=c.slice(0,-1));case 2:2===u&&(c=a),4==u?(o.warning('attribute "'+c+'" missed quot(")!!'),n.add(a,c.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&c.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),n.add(c,c,t));break;case 3:throw new Error("attribute value missed!!")}return s;case"€":l=" ";default:if(l<=" ")switch(u){case 0:n.setTagName(e.slice(t,s)),u=6;break;case 1:a=e.slice(t,s),u=2;break;case 4:var c=e.slice(t,s).replace(/&#?\w+;/g,i);o.warning('attribute "'+c+'" missed quot(")!!'),n.add(a,c,t);case 5:u=6}else switch(u){case 2:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&a.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),n.add(a,a,t),t=s,u=1;break;case 5:o.warning('attribute space is required"'+a+'"!!');case 6:u=1,t=s;break;case 3:u=4,t=s;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}s++}}function u(e,t,n){for(var r=e.tagName,i=null,o=e.length;o--;){var a=e[o],s=a.qName,u=a.value;if((d=s.indexOf(":"))>0)var l=a.prefix=s.slice(0,d),c=s.slice(d+1),h="xmlns"===l&&c;else c=s,l=null,h="xmlns"===s&&"";a.localName=c,!1!==h&&(null==i&&(i={},f(n,n={})),n[h]=i[h]=u,a.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,u))}for(o=e.length;o--;){(l=(a=e[o]).prefix)&&("xml"===l&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==l&&(a.uri=n[l||""]))}var d;(d=r.indexOf(":"))>0?(l=e.prefix=r.slice(0,d),c=e.localName=r.slice(d+1)):(l=null,c=e.localName=r);var p=e.uri=n[l||""];if(t.startElement(p,c,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(p,c,r),i)for(l in i)t.endPrefixMapping(l)}function l(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("</"+n+">",t),a=e.substring(t+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}return t+1}function c(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf("</"+n+">"))<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function f(e,t){for(var n in e)t[n]=e[n]}function h(e,t,n,r){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(i=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var o=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=t,i.exec(e);for(;n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],u=a>3&&/^public$/i.test(o[2][0])&&o[3][0],l=a>4&&o[4][0],c=o[a-1];return n.startDTD(s,u&&u.replace(/^(['"])(.*?)\1$/,"$2"),l&&l.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),c.index+c[0].length}}return-1}function d(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function p(e){}function m(e,t){return e.__proto__=t,e}o.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),f(t,t={}),function(e,t,n,r,i){function o(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function f(t){if(t>w){var n=e.substring(w,t).replace(/&#?\w+;/g,o);b&&m(w),r.characters(n,0,t-w),w=t}}function m(t,n){for(;t>=g&&(n=v.exec(e));)y=n.index,g=y+n[0].length,b.lineNumber++;b.columnNumber=t-y+1}var y=0,g=0,v=/.*(?:\r\n?|\n)|.*$/g,b=r.locator,_=[{currentNSMap:t}],T={},w=0;for(;;){try{var S=e.indexOf("<",w);if(S<0){if(!e.substr(w).match(/^\s*$/)){var E=r.doc,k=E.createTextNode(e.substr(w));E.appendChild(k),r.currentElement=k}return}switch(S>w&&f(S),e.charAt(S+1)){case"/":var C=e.indexOf(">",S+3),x=e.substring(S+2,C),O=_.pop();C<0?(x=e.substring(S+2).replace(/[\s<].*/,""),i.error("end tag name: "+x+" is not complete:"+O.tagName),C=S+1+x.length):x.match(/\s</)&&(x=x.replace(/[\s<].*/,""),i.error("end tag name: "+x+" maybe not complete"),C=S+1+x.length);var P=O.localNSMap,A=O.tagName==x;if(A||O.tagName&&O.tagName.toLowerCase()==x.toLowerCase()){if(r.endElement(O.uri,O.localName,x),P)for(var R in P)r.endPrefixMapping(R);A||i.fatalError("end tag name: "+x+" is not match the current start tagName:"+O.tagName)}else _.push(O);C++;break;case"?":b&&m(S),C=d(e,S,r);break;case"!":b&&m(S),C=h(e,S,r,i);break;default:b&&m(S);var L=new p,I=_[_.length-1].currentNSMap,D=(C=s(e,S,L,I,o,i),L.length);if(!L.closed&&c(e,C,L.tagName,T)&&(L.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),b&&D){for(var N=a(b,{}),j=0;j<D;j++){var M=L[j];m(M.offset),M.locator=a(b,{})}r.locator=N,u(L,r,I)&&_.push(L),r.locator=b}else u(L,r,I)&&_.push(L);"http://www.w3.org/1999/xhtml"!==L.uri||L.closed?C++:C=l(e,C,L.tagName,o,r)}}catch(e){i.error("element parse error: "+e),C=-1}C>w?w=C:f(Math.max(S,w)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},p.prototype={setTagName:function(e){if(!i.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!i.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},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.XMLReader=o},function(e,t,n){"use strict";var r=n(147),i=n(146),o=function(){o.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new c(0,0),new c(0,1),new c(1,0),new c(1,1)],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)};o.prototype=new r,o.prototype.push=function(e){var t,n,r;if("sei_rbsp"===e.nalUnitType&&(t=i.parseSei(e.escapedRBSP)).payloadType===i.USER_DATA_REGISTERED_ITU_T_T35&&(n=i.parseUserData(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=i.parseCaptionPackets(e.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},o.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},o.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),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},o.prototype.flush=function(){return this.flushStream("flush")},o.prototype.partialFlush=function(){return this.flushStream("partialFlush")},o.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},o.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)},o.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},o.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},o.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)};var a={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},s=function(e){return null===e?"":(e=a[e]||e,String.fromCharCode(e))},u=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],l=function(){for(var e=[],t=15;t--;)e.push("");return e},c=function(e,t){c.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,r,i,o;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=l();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=l();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=l()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,i))o=s((r=(3&r)<<8)|i),this[this.mode_](e.pts,o),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),o=s((r=(3&r)<<8)|i),this[this.mode_](e.pts,o),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var a=u.indexOf(7968&t);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),o=s(r),o+=s(i),this[this.mode_](e.pts,o),this.column_+=o.length)}else this.lastControlCode_=null}};c.prototype=new r,c.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_})},c.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=l(),this.nonDisplayed_=l(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},c.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_},c.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},c.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},c.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},c.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},c.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},c.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},c.prototype.isNormalChar=function(e){return e>=32&&e<=127},c.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=l(),this.displayed_=l()),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},c.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)},c.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)}},c.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},c.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},c.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_]=""},c.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},e.exports={CaptionStream:o,Cea608Stream:c}},function(e,t,n){"use strict";var r=n(147),i=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},o=function(e){var t,n;o.prototype.init.call(this),this.type_=e||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===n&&(n=e.dts),e.dts=i(e.dts,n),e.pts=i(e.pts,n),t=e.dts,this.trigger("data",e))},this.flush=function(){n=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};o.prototype=new r,e.exports={TimestampRolloverStream:o,handleRollover:i}},function(e,t,n){"use strict";var r=n(148),i=function(e){var t=31&e[1];return t<<=8,t|=e[2]},o=function(e){return!!(64&e[1])},a=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},s=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}};e.exports={parseType:function(e,t){var n=i(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=o(e),n=4+a(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=o(e),r=4+a(e);if(n&&(r+=e[r]+1),1&e[r+5]){var i;i=3+((15&e[r+1])<<8|e[r+2])-4;for(var s=12+((15&e[r+10])<<8|e[r+11]);s<i;){var u=r+s;t[(31&e[u+1])<<8|e[u+2]]=e[u],s+=5+((15&e[u+3])<<8|e[u+4])}return t}},parsePayloadUnitStartIndicator:o,parsePesType:function(e,t){switch(t[i(e)]){case r.H264_STREAM_TYPE:return"video";case r.ADTS_STREAM_TYPE:return"audio";case r.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!o(e))return null;var t=4+a(e);if(t>=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+a(e),n=e.subarray(t),r=0,i=0,o=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),o}}},function(e,t,n){"use strict";var r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]};e.exports={isLikelyAacData:function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},parseId3TagSize:function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?n+20:n+10},parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return r[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=i(e.subarray(10,14)));do{if((n=i(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var o=0;o<r.byteLength;o++)if(0===r[o]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(r,0,o))){var a=r.subarray(o+1),s=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return s*=4,s+=3&a[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}}},function(e,t){var n,r,i,o,a,s,u;n=function(e){return 9e4*e},r=function(e,t){return e*t},i=function(e){return e/9e4},o=function(e,t){return e/t},a=function(e,t){return n(o(e,t))},s=function(e,t){return r(i(e),t)},u=function(e,t,n){return i(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:n,secondsToAudioTs:r,videoTsToSeconds:i,audioTsToSeconds:o,audioTsToVideoTs:a,videoTsToAudioTs:s,metadataTsToSeconds:u}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r=n(8),i=n(142),o=n(125),a=n(18);for(var s in i){var u=r[s],l=u&&u.prototype;if(l&&l.forEach!==o)try{a(l,"forEach",o)}catch(e){l.forEach=o}}},function(e,t,n){var r=n(8),i=n(75).trim,o=n(106),a=r.parseInt,s=/^[+-]?0[Xx]/,u=8!==a(o+"08")||22!==a(o+"0x16");e.exports=u?function(e,t){var n=i(String(e));return a(n,t>>>0||(s.test(n)?16:10))}:a},function(e,t,n){"use strict";var r=n(3),i=n(8),o=n(87),a=n(26),s=n(43),u=n(37),l=n(98),c=n(11),f=n(7),h=n(92),d=n(35),p=n(302);e.exports=function(e,t,n,m,y){var g=i[e],v=g&&g.prototype,b=g,_=m?"set":"add",T={},w=function(e){var t=v[e];a(v,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(y&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return y&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!c(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(o(e,"function"!=typeof g||!(y||v.forEach&&!f((function(){(new g).entries().next()})))))b=n.getConstructor(t,e,m,_),s.REQUIRED=!0;else if(o(e,!0)){var S=new b,E=S[_](y?{}:-0,1)!=S,k=f((function(){S.has(1)})),C=h((function(e){new g(e)})),x=!y&&f((function(){for(var e=new g,t=5;t--;)e[_](t,t);return!e.has(-0)}));C||((b=t((function(t,n){l(t,b,e);var r=p(new g,t,b);return null!=n&&u(n,r[_],r,m),r}))).prototype=v,v.constructor=b),(k||x)&&(w("delete"),w("has"),m&&w("get")),(x||E)&&w(_),y&&v.clear&&delete v.clear}return T[e]=b,r({global:!0,forced:b!=g},T),d(b,e),y||n.setStrong(b,e,m),b}},function(e,t,n){var r=n(11),i=n(65);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},function(e,t,n){"use strict";var r=n(97),i=n(43).getWeakData,o=n(14),a=n(11),s=n(98),u=n(37),l=n(28),c=n(21),f=n(23),h=f.set,d=f.getterFor,p=l.find,m=l.findIndex,y=0,g=function(e){return e.frozen||(e.frozen=new v)},v=function(){this.entries=[]},b=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};v.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=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 f=e((function(e,r){s(e,f,t),h(e,{type:t,id:y++,frozen:void 0}),null!=r&&u(r,e[l],e,n)})),p=d(t),m=function(e,t,n){var r=p(e),a=i(o(t),!0);return!0===a?g(r).set(t,n):a[r.id]=n,e};return r(f.prototype,{delete:function(e){var t=p(this);if(!a(e))return!1;var n=i(e);return!0===n?g(t).delete(e):n&&c(n,t.id)&&delete n[t.id]},has:function(e){var t=p(this);if(!a(e))return!1;var n=i(e);return!0===n?g(t).has(e):n&&c(n,t.id)}}),r(f.prototype,n?{get:function(e){var t=p(this);if(a(e)){var n=i(e);return!0===n?g(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return m(this,e,t)}}:{add:function(e){return m(this,e,!0)}}),f}}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";
27
+ /** @license React v16.11.0
28
+ * react-dom.production.min.js
29
+ *
30
+ * Copyright (c) Facebook, Inc. and its affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var r=n(1),i=n(143),o=n(315);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=null,u={};function l(){if(s)for(var e in u){var t=u[e],n=s.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!f[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in f[n]=t,n=t.eventTypes){var i=void 0,o=n[r],l=t,d=r;if(h.hasOwnProperty(d))throw Error(a(99,d));h[d]=o;var p=o.phasedRegistrationNames;if(p){for(i in p)p.hasOwnProperty(i)&&c(p[i],l,d);i=!0}else o.registrationName?(c(o.registrationName,l,d),i=!0):i=!1;if(!i)throw Error(a(98,r,e))}}}}function c(e,t,n){if(d[e])throw Error(a(100,e));d[e]=t,p[e]=t.eventTypes[n].dependencies}var f=[],h={},d={},p={};function m(e,t,n,r,i,o,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var y=!1,g=null,v=!1,b=null,_={onError:function(e){y=!0,g=e}};function T(e,t,n,r,i,o,a,s,u){y=!1,g=null,m.apply(_,arguments)}var w=null,S=null,E=null;function k(e,t,n){var r=e.type||"unknown-event";e.currentTarget=E(n),function(e,t,n,r,i,o,s,u,l){if(T.apply(this,arguments),y){if(!y)throw Error(a(198));var c=g;y=!1,g=null,v||(v=!0,b=c)}}(r,t,void 0,e),e.currentTarget=null}function C(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function x(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var O=null;function P(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)k(e,t[r],n[r]);else t&&k(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function A(e){if(null!==e&&(O=C(O,e)),e=O,O=null,e){if(x(e,P),O)throw Error(a(95));if(v)throw e=b,v=!1,b=null,e}}var R={injectEventPluginOrder:function(e){if(s)throw Error(a(101));s=Array.prototype.slice.call(e),l()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!u.hasOwnProperty(t)||u[t]!==r){if(u[t])throw Error(a(102,t));u[t]=r,n=!0}}n&&l()}};function L(e,t){var n=e.stateNode;if(!n)return null;var r=w(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var I=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;I.hasOwnProperty("ReactCurrentDispatcher")||(I.ReactCurrentDispatcher={current:null}),I.hasOwnProperty("ReactCurrentBatchConfig")||(I.ReactCurrentBatchConfig={suspense:null});var D=/^(.*)[\\\/]/,N="function"==typeof Symbol&&Symbol.for,j=N?Symbol.for("react.element"):60103,M=N?Symbol.for("react.portal"):60106,U=N?Symbol.for("react.fragment"):60107,B=N?Symbol.for("react.strict_mode"):60108,F=N?Symbol.for("react.profiler"):60114,z=N?Symbol.for("react.provider"):60109,V=N?Symbol.for("react.context"):60110,W=N?Symbol.for("react.concurrent_mode"):60111,H=N?Symbol.for("react.forward_ref"):60112,q=N?Symbol.for("react.suspense"):60113,G=N?Symbol.for("react.suspense_list"):60120,Y=N?Symbol.for("react.memo"):60115,X=N?Symbol.for("react.lazy"):60116;N&&Symbol.for("react.fundamental"),N&&Symbol.for("react.responder"),N&&Symbol.for("react.scope");var K="function"==typeof Symbol&&Symbol.iterator;function $(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=K&&e[K]||e["@@iterator"])?e:null}function Q(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case U:return"Fragment";case M:return"Portal";case F:return"Profiler";case B:return"StrictMode";case q:return"Suspense";case G:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case V:return"Context.Consumer";case z:return"Context.Provider";case H:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case Y:return Q(e.type);case X:if(e=1===e._status?e._result:null)return Q(e)}return null}function J(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,o=Q(e.type);n=null,r&&(n=Q(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(D,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}var Z=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),ee=null,te=null,ne=null;function re(e){if(e=S(e)){if("function"!=typeof ee)throw Error(a(280));var t=w(e.stateNode);ee(e.stateNode,e.type,t)}}function ie(e){te?ne?ne.push(e):ne=[e]:te=e}function oe(){if(te){var e=te,t=ne;if(ne=te=null,re(e),t)for(e=0;e<t.length;e++)re(t[e])}}function ae(e,t){return e(t)}function se(e,t,n,r){return e(t,n,r)}function ue(){}var le=ae,ce=!1,fe=!1;function he(){null===te&&null===ne||(ue(),oe())}new Map;var de=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pe=Object.prototype.hasOwnProperty,me={},ye={};function ge(e,t,n,r,i,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o}var ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){ve[e]=new ge(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];ve[t]=new ge(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){ve[e]=new ge(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){ve[e]=new ge(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){ve[e]=new ge(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){ve[e]=new ge(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){ve[e]=new ge(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){ve[e]=new ge(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){ve[e]=new ge(e,5,!1,e.toLowerCase(),null,!1)}));var be=/[\-:]([a-z])/g;function _e(e){return e[1].toUpperCase()}function Te(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function we(e,t,n,r){var i=ve.hasOwnProperty(t)?ve[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!pe.call(ye,e)||!pe.call(me,e)&&(de.test(e)?ye[e]=!0:(me[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function Se(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Ee(e){e._valueTracker||(e._valueTracker=function(e){var t=Se(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ke(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Se(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ce(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function xe(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Te(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Oe(e,t){null!=(t=t.checked)&&we(e,"checked",t,!1)}function Pe(e,t){Oe(e,t);var n=Te(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Re(e,t.type,n):t.hasOwnProperty("defaultValue")&&Re(e,t.type,Te(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ae(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Re(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Le(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Ie(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Te(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function De(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ne(e,t){var n=t.value;if(null==n){if(n=t.defaultValue,null!=(t=t.children)){if(null!=n)throw Error(a(92));if(Array.isArray(t)){if(!(1>=t.length))throw Error(a(93));t=t[0]}n=t}null==n&&(n="")}e._wrapperState={initialValue:Te(n)}}function je(e,t){var n=Te(t.value),r=Te(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Me(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(be,_e);ve[t]=new ge(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(be,_e);ve[t]=new ge(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(be,_e);ve[t]=new ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){ve[e]=new ge(e,1,!1,e.toLowerCase(),null,!1)})),ve.xlinkHref=new ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){ve[e]=new ge(e,1,!1,e.toLowerCase(),null,!0)}));var Ue="http://www.w3.org/1999/xhtml",Be="http://www.w3.org/2000/svg";function Fe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ze(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Fe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Ve,We=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==Be||"innerHTML"in e)e.innerHTML=t;else{for((Ve=Ve||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ve.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function He(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function qe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ge={animationend:qe("Animation","AnimationEnd"),animationiteration:qe("Animation","AnimationIteration"),animationstart:qe("Animation","AnimationStart"),transitionend:qe("Transition","TransitionEnd")},Ye={},Xe={};function Ke(e){if(Ye[e])return Ye[e];if(!Ge[e])return e;var t,n=Ge[e];for(t in n)if(n.hasOwnProperty(t)&&t in Xe)return Ye[e]=n[t];return e}Z&&(Xe=document.createElement("div").style,"AnimationEvent"in window||(delete Ge.animationend.animation,delete Ge.animationiteration.animation,delete Ge.animationstart.animation),"TransitionEvent"in window||delete Ge.transitionend.transition);var $e=Ke("animationend"),Qe=Ke("animationiteration"),Je=Ke("animationstart"),Ze=Ke("transitionend"),et="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" ");function tt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function nt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function rt(e){if(tt(e)!==e)throw Error(a(188))}function it(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=tt(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return rt(i),e;if(o===r)return rt(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}var ot,at,st,ut=!1,lt=[],ct=null,ft=null,ht=null,dt=new Map,pt=new Map,mt=[],yt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),gt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function vt(e,t,n,r){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:r}}function bt(e,t){switch(e){case"focus":case"blur":ct=null;break;case"dragenter":case"dragleave":ft=null;break;case"mouseover":case"mouseout":ht=null;break;case"pointerover":case"pointerout":dt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pt.delete(t.pointerId)}}function _t(e,t,n,r,i){return null===e||e.nativeEvent!==i?(e=vt(t,n,r,i),null!==t&&(null!==(t=lr(t))&&at(t)),e):(e.eventSystemFlags|=r,e)}function Tt(e){var t=ur(e.target);if(null!==t){var n=tt(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=nt(n)))return e.blockedOn=t,void o.unstable_runWithPriority(e.priority,(function(){st(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function wt(e){if(null!==e.blockedOn)return!1;var t=Rn(e.topLevelType,e.eventSystemFlags,e.nativeEvent);if(null!==t){var n=lr(t);return null!==n&&at(n),e.blockedOn=t,!1}return!0}function St(e,t,n){wt(e)&&n.delete(t)}function Et(){for(ut=!1;0<lt.length;){var e=lt[0];if(null!==e.blockedOn){null!==(e=lr(e.blockedOn))&&ot(e);break}var t=Rn(e.topLevelType,e.eventSystemFlags,e.nativeEvent);null!==t?e.blockedOn=t:lt.shift()}null!==ct&&wt(ct)&&(ct=null),null!==ft&&wt(ft)&&(ft=null),null!==ht&&wt(ht)&&(ht=null),dt.forEach(St),pt.forEach(St)}function kt(e,t){e.blockedOn===t&&(e.blockedOn=null,ut||(ut=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Et)))}function Ct(e){function t(t){return kt(t,e)}if(0<lt.length){kt(lt[0],e);for(var n=1;n<lt.length;n++){var r=lt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==ct&&kt(ct,e),null!==ft&&kt(ft,e),null!==ht&&kt(ht,e),dt.forEach(t),pt.forEach(t),n=0;n<mt.length;n++)(r=mt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<mt.length&&null===(n=mt[0]).blockedOn;)Tt(n),null===n.blockedOn&&mt.shift()}function xt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function Ot(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Pt(e,t,n){(t=L(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=C(n._dispatchListeners,t),n._dispatchInstances=C(n._dispatchInstances,e))}function At(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Ot(t);for(t=n.length;0<t--;)Pt(n[t],"captured",e);for(t=0;t<n.length;t++)Pt(n[t],"bubbled",e)}}function Rt(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=L(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=C(n._dispatchListeners,t),n._dispatchInstances=C(n._dispatchInstances,e))}function Lt(e){e&&e.dispatchConfig.registrationName&&Rt(e._targetInst,null,e)}function It(e){x(e,At)}function Dt(){return!0}function Nt(){return!1}function jt(e,t,n,r){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Dt:Nt,this.isPropagationStopped=Nt,this}function Mt(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function Ut(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Bt(e){e.eventPool=[],e.getPooled=Mt,e.release=Ut}i(jt.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Dt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Dt)},persist:function(){this.isPersistent=Dt},isPersistent:Nt,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Nt,this._dispatchInstances=this._dispatchListeners=null}}),jt.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},jt.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,Bt(n),n},Bt(jt);var Ft=jt.extend({animationName:null,elapsedTime:null,pseudoElement:null}),zt=jt.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Vt=jt.extend({view:null,detail:null}),Wt=Vt.extend({relatedTarget:null});function Ht(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var qt={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Gt={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Yt={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xt(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Yt[e])&&!!t[e]}function Kt(){return Xt}for(var $t=Vt.extend({key:function(e){if(e.key){var t=qt[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Ht(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Gt[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Kt,charCode:function(e){return"keypress"===e.type?Ht(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Ht(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Qt=0,Jt=0,Zt=!1,en=!1,tn=Vt.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Kt,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Qt;return Qt=e.screenX,Zt?"mousemove"===e.type?e.screenX-t:0:(Zt=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Jt;return Jt=e.screenY,en?"mousemove"===e.type?e.screenY-t:0:(en=!0,0)}}),nn=tn.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),rn=tn.extend({dataTransfer:null}),on=Vt.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Kt}),an=jt.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),sn=tn.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),un=[["blur","blur",0],["cancel","cancel",0],["click","click",0],["close","close",0],["contextmenu","contextMenu",0],["copy","copy",0],["cut","cut",0],["auxclick","auxClick",0],["dblclick","doubleClick",0],["dragend","dragEnd",0],["dragstart","dragStart",0],["drop","drop",0],["focus","focus",0],["input","input",0],["invalid","invalid",0],["keydown","keyDown",0],["keypress","keyPress",0],["keyup","keyUp",0],["mousedown","mouseDown",0],["mouseup","mouseUp",0],["paste","paste",0],["pause","pause",0],["play","play",0],["pointercancel","pointerCancel",0],["pointerdown","pointerDown",0],["pointerup","pointerUp",0],["ratechange","rateChange",0],["reset","reset",0],["seeked","seeked",0],["submit","submit",0],["touchcancel","touchCancel",0],["touchend","touchEnd",0],["touchstart","touchStart",0],["volumechange","volumeChange",0],["drag","drag",1],["dragenter","dragEnter",1],["dragexit","dragExit",1],["dragleave","dragLeave",1],["dragover","dragOver",1],["mousemove","mouseMove",1],["mouseout","mouseOut",1],["mouseover","mouseOver",1],["pointermove","pointerMove",1],["pointerout","pointerOut",1],["pointerover","pointerOver",1],["scroll","scroll",1],["toggle","toggle",1],["touchmove","touchMove",1],["wheel","wheel",1],["abort","abort",2],[$e,"animationEnd",2],[Qe,"animationIteration",2],[Je,"animationStart",2],["canplay","canPlay",2],["canplaythrough","canPlayThrough",2],["durationchange","durationChange",2],["emptied","emptied",2],["encrypted","encrypted",2],["ended","ended",2],["error","error",2],["gotpointercapture","gotPointerCapture",2],["load","load",2],["loadeddata","loadedData",2],["loadedmetadata","loadedMetadata",2],["loadstart","loadStart",2],["lostpointercapture","lostPointerCapture",2],["playing","playing",2],["progress","progress",2],["seeking","seeking",2],["stalled","stalled",2],["suspend","suspend",2],["timeupdate","timeUpdate",2],[Ze,"transitionEnd",2],["waiting","waiting",2]],ln={},cn={},fn=0;fn<un.length;fn++){var hn=un[fn],dn=hn[0],pn=hn[1],mn=hn[2],yn="on"+(pn[0].toUpperCase()+pn.slice(1)),gn={phasedRegistrationNames:{bubbled:yn,captured:yn+"Capture"},dependencies:[dn],eventPriority:mn};ln[pn]=gn,cn[dn]=gn}var vn={eventTypes:ln,getEventPriority:function(e){return void 0!==(e=cn[e])?e.eventPriority:2},extractEvents:function(e,t,n,r){var i=cn[e];if(!i)return null;switch(e){case"keypress":if(0===Ht(n))return null;case"keydown":case"keyup":e=$t;break;case"blur":case"focus":e=Wt;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=tn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=rn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=on;break;case $e:case Qe:case Je:e=Ft;break;case Ze:e=an;break;case"scroll":e=Vt;break;case"wheel":e=sn;break;case"copy":case"cut":case"paste":e=zt;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=nn;break;default:e=jt}return It(t=e.getPooled(i,t,n,r)),t}},bn=o.unstable_UserBlockingPriority,_n=o.unstable_runWithPriority,Tn=vn.getEventPriority,wn=[];function Sn(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=ur(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var i=xt(e.nativeEvent);r=e.topLevelType;for(var o=e.nativeEvent,a=e.eventSystemFlags,s=null,u=0;u<f.length;u++){var l=f[u];l&&(l=l.extractEvents(r,t,o,i,a))&&(s=C(s,l))}A(s)}}var En=!0;function kn(e,t){Cn(t,e,!1)}function Cn(e,t,n){switch(Tn(t)){case 0:var r=xn.bind(null,t,1);break;case 1:r=On.bind(null,t,1);break;default:r=An.bind(null,t,1)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function xn(e,t,n){ce||ue();var r=An,i=ce;ce=!0;try{se(r,e,t,n)}finally{(ce=i)||he()}}function On(e,t,n){_n(bn,An.bind(null,e,t,n))}function Pn(e,t,n,r){if(wn.length){var i=wn.pop();i.topLevelType=e,i.eventSystemFlags=t,i.nativeEvent=n,i.targetInst=r,e=i}else e={topLevelType:e,eventSystemFlags:t,nativeEvent:n,targetInst:r,ancestors:[]};try{if(t=Sn,n=e,fe)t(n,void 0);else{fe=!0;try{le(t,n,void 0)}finally{fe=!1,he()}}}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,wn.length<10&&wn.push(e)}}function An(e,t,n){if(En)if(0<lt.length&&-1<yt.indexOf(e))e=vt(null,e,t,n),lt.push(e);else{var r=Rn(e,t,n);null===r?bt(e,n):-1<yt.indexOf(e)?(e=vt(r,e,t,n),lt.push(e)):function(e,t,n,r){switch(t){case"focus":return ct=_t(ct,e,t,n,r),!0;case"dragenter":return ft=_t(ft,e,t,n,r),!0;case"mouseover":return ht=_t(ht,e,t,n,r),!0;case"pointerover":var i=r.pointerId;return dt.set(i,_t(dt.get(i)||null,e,t,n,r)),!0;case"gotpointercapture":return i=r.pointerId,pt.set(i,_t(pt.get(i)||null,e,t,n,r)),!0}return!1}(r,e,t,n)||(bt(e,n),Pn(e,t,n,null))}}function Rn(e,t,n){var r=xt(n);if(null!==(r=ur(r))){var i=tt(r);if(null===i)r=null;else{var o=i.tag;if(13===o){if(null!==(r=nt(i)))return r;r=null}else if(3===o){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return Pn(e,t,n,r),null}function Ln(e){if(!Z)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var In=new("function"==typeof WeakMap?WeakMap:Map);function Dn(e){var t=In.get(e);return void 0===t&&(t=new Set,In.set(e,t)),t}function Nn(e,t,n){if(!n.has(e)){switch(e){case"scroll":Cn(t,"scroll",!0);break;case"focus":case"blur":Cn(t,"focus",!0),Cn(t,"blur",!0),n.add("blur"),n.add("focus");break;case"cancel":case"close":Ln(e)&&Cn(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===et.indexOf(e)&&kn(e,t)}n.add(e)}}var jn={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Mn=["Webkit","ms","Moz","O"];function Un(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||jn.hasOwnProperty(e)&&jn[e]?(""+t).trim():t+"px"}function Bn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=Un(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(jn).forEach((function(e){Mn.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),jn[t]=jn[e]}))}));var Fn=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function zn(e,t){if(t){if(Fn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function Vn(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Wn(e,t){var n=Dn(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=p[t];for(var r=0;r<t.length;r++)Nn(t[r],e,n)}function Hn(){}function qn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Gn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yn(e,t){var n,r=Gn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Gn(r)}}function Xn(){for(var e=window,t=qn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=qn((e=t.contentWindow).document)}return t}function Kn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var $n=null,Qn=null;function Jn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Zn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var er="function"==typeof setTimeout?setTimeout:void 0,tr="function"==typeof clearTimeout?clearTimeout:void 0;function nr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function rr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ir=Math.random().toString(36).slice(2),or="__reactInternalInstance$"+ir,ar="__reactEventHandlers$"+ir,sr="__reactContainere$"+ir;function ur(e){var t=e[or];if(t)return t;for(var n=e.parentNode;n;){if(t=n[sr]||n[or]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=rr(e);null!==e;){if(n=e[or])return n;e=rr(e)}return t}n=(e=n).parentNode}return null}function lr(e){return!(e=e[or]||e[sr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function cr(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function fr(e){return e[ar]||null}var hr=null,dr=null,pr=null;function mr(){if(pr)return pr;var e,t,n=dr,r=n.length,i="value"in hr?hr.value:hr.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return pr=i.slice(e,1<t?1-t:void 0)}var yr=jt.extend({data:null}),gr=jt.extend({data:null}),vr=[9,13,27,32],br=Z&&"CompositionEvent"in window,_r=null;Z&&"documentMode"in document&&(_r=document.documentMode);var Tr=Z&&"TextEvent"in window&&!_r,wr=Z&&(!br||_r&&8<_r&&11>=_r),Sr=String.fromCharCode(32),Er={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},kr=!1;function Cr(e,t){switch(e){case"keyup":return-1!==vr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function xr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Or=!1;var Pr={eventTypes:Er,extractEvents:function(e,t,n,r){var i;if(br)e:{switch(e){case"compositionstart":var o=Er.compositionStart;break e;case"compositionend":o=Er.compositionEnd;break e;case"compositionupdate":o=Er.compositionUpdate;break e}o=void 0}else Or?Cr(e,n)&&(o=Er.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=Er.compositionStart);return o?(wr&&"ko"!==n.locale&&(Or||o!==Er.compositionStart?o===Er.compositionEnd&&Or&&(i=mr()):(dr="value"in(hr=r)?hr.value:hr.textContent,Or=!0)),o=yr.getPooled(o,t,n,r),i?o.data=i:null!==(i=xr(n))&&(o.data=i),It(o),i=o):i=null,(e=Tr?function(e,t){switch(e){case"compositionend":return xr(t);case"keypress":return 32!==t.which?null:(kr=!0,Sr);case"textInput":return(e=t.data)===Sr&&kr?null:e;default:return null}}(e,n):function(e,t){if(Or)return"compositionend"===e||!br&&Cr(e,t)?(e=mr(),pr=dr=hr=null,Or=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return wr&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=gr.getPooled(Er.beforeInput,t,n,r)).data=e,It(t)):t=null,null===i?t:null===t?i:[i,t]}},Ar={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Ar[e.type]:"textarea"===t}var Lr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Ir(e,t,n){return(e=jt.getPooled(Lr.change,e,t,n)).type="change",ie(n),It(e),e}var Dr=null,Nr=null;function jr(e){A(e)}function Mr(e){if(ke(cr(e)))return e}function Ur(e,t){if("change"===e)return t}var Br=!1;function Fr(){Dr&&(Dr.detachEvent("onpropertychange",zr),Nr=Dr=null)}function zr(e){if("value"===e.propertyName&&Mr(Nr))if(e=Ir(Nr,e,xt(e)),ce)A(e);else{ce=!0;try{ae(jr,e)}finally{ce=!1,he()}}}function Vr(e,t,n){"focus"===e?(Fr(),Nr=n,(Dr=t).attachEvent("onpropertychange",zr)):"blur"===e&&Fr()}function Wr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Mr(Nr)}function Hr(e,t){if("click"===e)return Mr(t)}function qr(e,t){if("input"===e||"change"===e)return Mr(t)}Z&&(Br=Ln("input")&&(!document.documentMode||9<document.documentMode));var Gr,Yr={eventTypes:Lr,_isInputEventSupported:Br,extractEvents:function(e,t,n,r){var i=t?cr(t):window,o=i.nodeName&&i.nodeName.toLowerCase();if("select"===o||"input"===o&&"file"===i.type)var a=Ur;else if(Rr(i))if(Br)a=qr;else{a=Wr;var s=Vr}else(o=i.nodeName)&&"input"===o.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(a=Hr);if(a&&(a=a(e,t)))return Ir(a,n,r);s&&s(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&Re(i,"number",i.value)}},Xr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Kr={eventTypes:Xr,extractEvents:function(e,t,n,r,i){var o="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(o&&0==(32&i)&&(n.relatedTarget||n.fromElement)||!a&&!o)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?ur(t):null)&&(t!==(o=tt(t))||5!==t.tag&&6!==t.tag)&&(t=null)):a=null,a===t)return null;if("mouseout"===e||"mouseover"===e)var s=tn,u=Xr.mouseLeave,l=Xr.mouseEnter,c="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=nn,u=Xr.pointerLeave,l=Xr.pointerEnter,c="pointer");if(e=null==a?i:cr(a),i=null==t?i:cr(t),(u=s.getPooled(u,a,n,r)).type=c+"leave",u.target=e,u.relatedTarget=i,(r=s.getPooled(l,t,n,r)).type=c+"enter",r.target=i,r.relatedTarget=e,c=t,(s=a)&&c)e:{for(e=c,a=0,t=l=s;t;t=Ot(t))a++;for(t=0,i=e;i;i=Ot(i))t++;for(;0<a-t;)l=Ot(l),a--;for(;0<t-a;)e=Ot(e),t--;for(;a--;){if(l===e||l===e.alternate)break e;l=Ot(l),e=Ot(e)}l=null}else l=null;for(e=l,l=[];s&&s!==e&&(null===(a=s.alternate)||a!==e);)l.push(s),s=Ot(s);for(s=[];c&&c!==e&&(null===(a=c.alternate)||a!==e);)s.push(c),c=Ot(c);for(c=0;c<l.length;c++)Rt(l[c],"bubbled",u);for(c=s.length;0<c--;)Rt(s[c],"captured",r);return n===Gr?(Gr=null,[u]):(Gr=n,[u,r])}};var $r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Qr=Object.prototype.hasOwnProperty;function Jr(e,t){if($r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Qr.call(t,n[r])||!$r(e[n[r]],t[n[r]]))return!1;return!0}var Zr=Z&&"documentMode"in document&&11>=document.documentMode,ei={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},ti=null,ni=null,ri=null,ii=!1;function oi(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return ii||null==ti||ti!==qn(n)?null:("selectionStart"in(n=ti)&&Kn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},ri&&Jr(ri,n)?null:(ri=n,(e=jt.getPooled(ei.select,ni,e,t)).type="select",e.target=ti,It(e),e))}var ai={eventTypes:ei,extractEvents:function(e,t,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){e:{o=Dn(o),i=p.onSelect;for(var a=0;a<i.length;a++)if(!o.has(i[a])){o=!1;break e}o=!0}i=!o}if(i)return null;switch(o=t?cr(t):window,e){case"focus":(Rr(o)||"true"===o.contentEditable)&&(ti=o,ni=t,ri=null);break;case"blur":ri=ni=ti=null;break;case"mousedown":ii=!0;break;case"contextmenu":case"mouseup":case"dragend":return ii=!1,oi(n,r);case"selectionchange":if(Zr)break;case"keydown":case"keyup":return oi(n,r)}return null}};R.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w=fr,S=lr,E=cr,R.injectEventPluginsByName({SimpleEventPlugin:vn,EnterLeaveEventPlugin:Kr,ChangeEventPlugin:Yr,SelectEventPlugin:ai,BeforeInputEventPlugin:Pr}),new Set;var si=[],ui=-1;function li(e){0>ui||(e.current=si[ui],si[ui]=null,ui--)}function ci(e,t){ui++,si[ui]=e.current,e.current=t}var fi={},hi={current:fi},di={current:!1},pi=fi;function mi(e,t){var n=e.type.contextTypes;if(!n)return fi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function yi(e){return null!=(e=e.childContextTypes)}function gi(e){li(di),li(hi)}function vi(e){li(di),li(hi)}function bi(e,t,n){if(hi.current!==fi)throw Error(a(168));ci(hi,t),ci(di,n)}function _i(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,Q(t)||"Unknown",o));return i({},n,{},r)}function Ti(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||fi,pi=hi.current,ci(hi,t),ci(di,di.current),!0}function wi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(t=_i(e,t,pi),r.__reactInternalMemoizedMergedChildContext=t,li(di),li(hi),ci(hi,t)):li(di),ci(di,n)}var Si=o.unstable_runWithPriority,Ei=o.unstable_scheduleCallback,ki=o.unstable_cancelCallback,Ci=o.unstable_shouldYield,xi=o.unstable_requestPaint,Oi=o.unstable_now,Pi=o.unstable_getCurrentPriorityLevel,Ai=o.unstable_ImmediatePriority,Ri=o.unstable_UserBlockingPriority,Li=o.unstable_NormalPriority,Ii=o.unstable_LowPriority,Di=o.unstable_IdlePriority,Ni={},ji=void 0!==xi?xi:function(){},Mi=null,Ui=null,Bi=!1,Fi=Oi(),zi=1e4>Fi?Oi:function(){return Oi()-Fi};function Vi(){switch(Pi()){case Ai:return 99;case Ri:return 98;case Li:return 97;case Ii:return 96;case Di:return 95;default:throw Error(a(332))}}function Wi(e){switch(e){case 99:return Ai;case 98:return Ri;case 97:return Li;case 96:return Ii;case 95:return Di;default:throw Error(a(332))}}function Hi(e,t){return e=Wi(e),Si(e,t)}function qi(e,t,n){return e=Wi(e),Ei(e,t,n)}function Gi(e){return null===Mi?(Mi=[e],Ui=Ei(Ai,Xi)):Mi.push(e),Ni}function Yi(){if(null!==Ui){var e=Ui;Ui=null,ki(e)}Xi()}function Xi(){if(!Bi&&null!==Mi){Bi=!0;var e=0;try{var t=Mi;Hi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Mi=null}catch(t){throw null!==Mi&&(Mi=Mi.slice(e+1)),Ei(Ai,Yi),t}finally{Bi=!1}}}var Ki=3;function $i(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Qi(e,t){if(e&&e.defaultProps)for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Ji={current:null},Zi=null,eo=null,to=null;function no(){to=eo=Zi=null}function ro(e,t){var n=e.type._context;ci(Ji,n._currentValue),n._currentValue=t}function io(e){var t=Ji.current;li(Ji),e.type._context._currentValue=t}function oo(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function ao(e,t){Zi=e,to=eo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(za=!0),e.firstContext=null)}function so(e,t){if(to!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(to=e,t=1073741823),t={context:e,observedBits:t,next:null},null===eo){if(null===Zi)throw Error(a(308));eo=t,Zi.dependencies={expirationTime:0,firstContext:t,responders:null}}else eo=eo.next=t;return e._currentValue}var uo=!1;function lo(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function co(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function fo(e,t){return{expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function ho(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function po(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,i=null;null===r&&(r=e.updateQueue=lo(e.memoizedState))}else r=e.updateQueue,i=n.updateQueue,null===r?null===i?(r=e.updateQueue=lo(e.memoizedState),i=n.updateQueue=lo(n.memoizedState)):r=e.updateQueue=co(i):null===i&&(i=n.updateQueue=co(r));null===i||r===i?ho(r,t):null===r.lastUpdate||null===i.lastUpdate?(ho(r,t),ho(i,t)):(ho(r,t),i.lastUpdate=t)}function mo(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=lo(e.memoizedState):yo(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function yo(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=co(t)),t}function go(e,t,n,r,o,a){switch(n.tag){case 1:return"function"==typeof(e=n.payload)?e.call(a,r,o):e;case 3:e.effectTag=-4097&e.effectTag|64;case 0:if(null==(o="function"==typeof(e=n.payload)?e.call(a,r,o):e))break;return i({},r,o);case 2:uo=!0}return r}function vo(e,t,n,r,i){uo=!1;for(var o=(t=yo(e,t)).baseState,a=null,s=0,u=t.firstUpdate,l=o;null!==u;){var c=u.expirationTime;c<i?(null===a&&(a=u,o=l),s<c&&(s=c)):(fu(c,u.suspenseConfig),l=go(e,0,u,l,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=u:(t.lastEffect.nextEffect=u,t.lastEffect=u))),u=u.next}for(c=null,u=t.firstCapturedUpdate;null!==u;){var f=u.expirationTime;f<i?(null===c&&(c=u,null===a&&(o=l)),s<f&&(s=f)):(l=go(e,0,u,l,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=u:(t.lastCapturedEffect.nextEffect=u,t.lastCapturedEffect=u))),u=u.next}null===a&&(t.lastUpdate=null),null===c?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===c&&(o=l),t.baseState=o,t.firstUpdate=a,t.firstCapturedUpdate=c,hu(s),e.expirationTime=s,e.memoizedState=l}function bo(e,t,n){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),_o(t.firstEffect,n),t.firstEffect=t.lastEffect=null,_o(t.firstCapturedEffect,n),t.firstCapturedEffect=t.lastCapturedEffect=null}function _o(e,t){for(;null!==e;){var n=e.callback;if(null!==n){e.callback=null;var r=t;if("function"!=typeof n)throw Error(a(191,n));n.call(r)}e=e.nextEffect}}var To=I.ReactCurrentBatchConfig,wo=(new r.Component).refs;function So(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:i({},t,n),e.memoizedState=n,null!==(r=e.updateQueue)&&0===e.expirationTime&&(r.baseState=n)}var Eo={isMounted:function(e){return!!(e=e._reactInternalFiber)&&tt(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Js(),i=To.suspense;(i=fo(r=Zs(r,e,i),i)).payload=t,null!=n&&(i.callback=n),po(e,i),eu(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Js(),i=To.suspense;(i=fo(r=Zs(r,e,i),i)).tag=1,i.payload=t,null!=n&&(i.callback=n),po(e,i),eu(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Js(),r=To.suspense;(r=fo(n=Zs(n,e,r),r)).tag=2,null!=t&&(r.callback=t),po(e,r),eu(e,n)}};function ko(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!Jr(n,r)||!Jr(i,o))}function Co(e,t,n){var r=!1,i=fi,o=t.contextType;return"object"==typeof o&&null!==o?o=so(o):(i=yi(t)?pi:hi.current,o=(r=null!=(r=t.contextTypes))?mi(e,i):fi),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Eo,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function xo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Eo.enqueueReplaceState(t,t.state,null)}function Oo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=wo;var o=t.contextType;"object"==typeof o&&null!==o?i.context=so(o):(o=yi(t)?pi:hi.current,i.context=mi(e,o)),null!==(o=e.updateQueue)&&(vo(e,o,n,i,r),i.state=e.memoizedState),"function"==typeof(o=t.getDerivedStateFromProps)&&(So(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Eo.enqueueReplaceState(i,i.state,null),null!==(o=e.updateQueue)&&(vo(e,o,n,i,r),i.state=e.memoizedState)),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var Po=Array.isArray;function Ao(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===wo&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Ro(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function Lo(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,n){return(e=Lu(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Nu(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=Ao(e,t,n),r.return=e,r):((r=Iu(n.type,n.key,n.props,null,e.mode,r)).ref=Ao(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=ju(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,o){return null===t||7!==t.tag?((t=Du(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Nu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case j:return(n=Iu(t.type,t.key,t.props,null,e.mode,n)).ref=Ao(e,null,t),n.return=e,n;case M:return(t=ju(t,e.mode,n)).return=e,t}if(Po(t)||$(t))return(t=Du(t,e.mode,n,null)).return=e,t;Ro(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case j:return n.key===i?n.type===U?f(e,t,n.props.children,r,i):l(e,t,n,r):null;case M:return n.key===i?c(e,t,n,r):null}if(Po(n)||$(n))return null!==i?null:f(e,t,n,r,null);Ro(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case j:return e=e.get(null===r.key?n:r.key)||null,r.type===U?f(t,e,r.props.children,i,r.key):l(t,e,r,i);case M:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(Po(r)||$(r))return f(t,e=e.get(n)||null,r,i,null);Ro(t,r)}return null}function m(i,a,s,u){for(var l=null,c=null,f=a,m=a=0,y=null;null!==f&&m<s.length;m++){f.index>m?(y=f,f=null):y=f.sibling;var g=d(i,f,s[m],u);if(null===g){null===f&&(f=y);break}e&&f&&null===g.alternate&&t(i,f),a=o(g,a,m),null===c?l=g:c.sibling=g,c=g,f=y}if(m===s.length)return n(i,f),l;if(null===f){for(;m<s.length;m++)null!==(f=h(i,s[m],u))&&(a=o(f,a,m),null===c?l=f:c.sibling=f,c=f);return l}for(f=r(i,f);m<s.length;m++)null!==(y=p(f,i,m,s[m],u))&&(e&&null!==y.alternate&&f.delete(null===y.key?m:y.key),a=o(y,a,m),null===c?l=y:c.sibling=y,c=y);return e&&f.forEach((function(e){return t(i,e)})),l}function y(i,s,u,l){var c=$(u);if("function"!=typeof c)throw Error(a(150));if(null==(u=c.call(u)))throw Error(a(151));for(var f=c=null,m=s,y=s=0,g=null,v=u.next();null!==m&&!v.done;y++,v=u.next()){m.index>y?(g=m,m=null):g=m.sibling;var b=d(i,m,v.value,l);if(null===b){null===m&&(m=g);break}e&&m&&null===b.alternate&&t(i,m),s=o(b,s,y),null===f?c=b:f.sibling=b,f=b,m=g}if(v.done)return n(i,m),c;if(null===m){for(;!v.done;y++,v=u.next())null!==(v=h(i,v.value,l))&&(s=o(v,s,y),null===f?c=v:f.sibling=v,f=v);return c}for(m=r(i,m);!v.done;y++,v=u.next())null!==(v=p(m,i,y,v.value,l))&&(e&&null!==v.alternate&&m.delete(null===v.key?y:v.key),s=o(v,s,y),null===f?c=v:f.sibling=v,f=v);return e&&m.forEach((function(e){return t(i,e)})),c}return function(e,r,o,u){var l="object"==typeof o&&null!==o&&o.type===U&&null===o.key;l&&(o=o.props.children);var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case j:e:{for(c=o.key,l=r;null!==l;){if(l.key===c){if(7===l.tag?o.type===U:l.elementType===o.type){n(e,l.sibling),(r=i(l,o.type===U?o.props.children:o.props)).ref=Ao(e,l,o),r.return=e,e=r;break e}n(e,l);break}t(e,l),l=l.sibling}o.type===U?((r=Du(o.props.children,e.mode,u,o.key)).return=e,e=r):((u=Iu(o.type,o.key,o.props,null,e.mode,u)).ref=Ao(e,r,o),u.return=e,e=u)}return s(e);case M:e:{for(l=o.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=ju(o,e.mode,u)).return=e,e=r}return s(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Nu(o,e.mode,u)).return=e,e=r),s(e);if(Po(o))return m(e,r,o,u);if($(o))return y(e,r,o,u);if(c&&Ro(e,o),void 0===o&&!l)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Io=Lo(!0),Do=Lo(!1),No={},jo={current:No},Mo={current:No},Uo={current:No};function Bo(e){if(e===No)throw Error(a(174));return e}function Fo(e,t){ci(Uo,t),ci(Mo,e),ci(jo,No);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ze(null,"");break;default:t=ze(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}li(jo),ci(jo,t)}function zo(e){li(jo),li(Mo),li(Uo)}function Vo(e){Bo(Uo.current);var t=Bo(jo.current),n=ze(t,e.type);t!==n&&(ci(Mo,e),ci(jo,n))}function Wo(e){Mo.current===e&&(li(jo),li(Mo))}var Ho={current:0};function qo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Go(e,t){return{responder:e,props:t}}var Yo=I.ReactCurrentDispatcher,Xo=I.ReactCurrentBatchConfig,Ko=0,$o=null,Qo=null,Jo=null,Zo=null,ea=null,ta=null,na=0,ra=null,ia=0,oa=!1,aa=null,sa=0;function ua(){throw Error(a(321))}function la(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!$r(e[n],t[n]))return!1;return!0}function ca(e,t,n,r,i,o){if(Ko=o,$o=t,Jo=null!==e?e.memoizedState:null,Yo.current=null===Jo?Pa:Aa,t=n(r,i),oa){do{oa=!1,sa+=1,Jo=null!==e?e.memoizedState:null,ta=Zo,ra=ea=Qo=null,Yo.current=Aa,t=n(r,i)}while(oa);aa=null,sa=0}if(Yo.current=Oa,(e=$o).memoizedState=Zo,e.expirationTime=na,e.updateQueue=ra,e.effectTag|=ia,e=null!==Qo&&null!==Qo.next,Ko=0,ta=ea=Zo=Jo=Qo=$o=null,na=0,ra=null,ia=0,e)throw Error(a(300));return t}function fa(){Yo.current=Oa,Ko=0,ta=ea=Zo=Jo=Qo=$o=null,na=0,ra=null,ia=0,oa=!1,aa=null,sa=0}function ha(){var e={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};return null===ea?Zo=ea=e:ea=ea.next=e,ea}function da(){if(null!==ta)ta=(ea=ta).next,Jo=null!==(Qo=Jo)?Qo.next:null;else{if(null===Jo)throw Error(a(310));var e={memoizedState:(Qo=Jo).memoizedState,baseState:Qo.baseState,queue:Qo.queue,baseUpdate:Qo.baseUpdate,next:null};ea=null===ea?Zo=e:ea.next=e,Jo=Qo.next}return ea}function pa(e,t){return"function"==typeof t?t(e):t}function ma(e){var t=da(),n=t.queue;if(null===n)throw Error(a(311));if(n.lastRenderedReducer=e,0<sa){var r=n.dispatch;if(null!==aa){var i=aa.get(n);if(void 0!==i){aa.delete(n);var o=t.memoizedState;do{o=e(o,i.action),i=i.next}while(null!==i);return $r(o,t.memoizedState)||(za=!0),t.memoizedState=o,t.baseUpdate===n.last&&(t.baseState=o),n.lastRenderedState=o,[o,r]}}return[t.memoizedState,r]}r=n.last;var s=t.baseUpdate;if(o=t.baseState,null!==s?(null!==r&&(r.next=null),r=s.next):r=null!==r?r.next:null,null!==r){var u=i=null,l=r,c=!1;do{var f=l.expirationTime;f<Ko?(c||(c=!0,u=s,i=o),f>na&&hu(na=f)):(fu(f,l.suspenseConfig),o=l.eagerReducer===e?l.eagerState:e(o,l.action)),s=l,l=l.next}while(null!==l&&l!==r);c||(u=s,i=o),$r(o,t.memoizedState)||(za=!0),t.memoizedState=o,t.baseUpdate=u,t.baseState=i,n.lastRenderedState=o}return[t.memoizedState,n.dispatch]}function ya(e){var t=ha();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,lastRenderedReducer:pa,lastRenderedState:e}).dispatch=xa.bind(null,$o,e),[t.memoizedState,e]}function ga(e){return ma(pa)}function va(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===ra?(ra={lastEffect:null}).lastEffect=e.next=e:null===(t=ra.lastEffect)?ra.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,ra.lastEffect=e),e}function ba(e,t,n,r){var i=ha();ia|=e,i.memoizedState=va(t,n,void 0,void 0===r?null:r)}function _a(e,t,n,r){var i=da();r=void 0===r?null:r;var o=void 0;if(null!==Qo){var a=Qo.memoizedState;if(o=a.destroy,null!==r&&la(r,a.deps))return void va(0,n,o,r)}ia|=e,i.memoizedState=va(t,n,o,r)}function Ta(e,t){return ba(516,192,e,t)}function wa(e,t){return _a(516,192,e,t)}function Sa(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ea(){}function ka(e,t){return ha().memoizedState=[e,void 0===t?null:t],e}function Ca(e,t){var n=da();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&la(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xa(e,t,n){if(!(25>sa))throw Error(a(301));var r=e.alternate;if(e===$o||null!==r&&r===$o)if(oa=!0,e={expirationTime:Ko,suspenseConfig:null,action:n,eagerReducer:null,eagerState:null,next:null},null===aa&&(aa=new Map),void 0===(n=aa.get(t)))aa.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{var i=Js(),o=To.suspense;o={expirationTime:i=Zs(i,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var s=t.last;if(null===s)o.next=o;else{var u=s.next;null!==u&&(o.next=u),s.next=o}if(t.last=o,0===e.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=t.lastRenderedReducer))try{var l=t.lastRenderedState,c=r(l,n);if(o.eagerReducer=r,o.eagerState=c,$r(c,l))return}catch(e){}eu(e,i)}}var Oa={readContext:so,useCallback:ua,useContext:ua,useEffect:ua,useImperativeHandle:ua,useLayoutEffect:ua,useMemo:ua,useReducer:ua,useRef:ua,useState:ua,useDebugValue:ua,useResponder:ua,useDeferredValue:ua,useTransition:ua},Pa={readContext:so,useCallback:ka,useContext:so,useEffect:Ta,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ba(4,36,Sa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ba(4,36,e,t)},useMemo:function(e,t){var n=ha();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ha();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=xa.bind(null,$o,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ha().memoizedState=e},useState:ya,useDebugValue:Ea,useResponder:Go,useDeferredValue:function(e,t){var n=ya(e),r=n[0],i=n[1];return Ta((function(){o.unstable_next((function(){var n=Xo.suspense;Xo.suspense=void 0===t?null:t;try{i(e)}finally{Xo.suspense=n}}))}),[e,t]),r},useTransition:function(e){var t=ya(!1),n=t[0],r=t[1];return[ka((function(t){r(!0),o.unstable_next((function(){var n=Xo.suspense;Xo.suspense=void 0===e?null:e;try{r(!1),t()}finally{Xo.suspense=n}}))}),[e,n]),n]}},Aa={readContext:so,useCallback:Ca,useContext:so,useEffect:wa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,_a(4,36,Sa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _a(4,36,e,t)},useMemo:function(e,t){var n=da();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&la(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:ma,useRef:function(){return da().memoizedState},useState:ga,useDebugValue:Ea,useResponder:Go,useDeferredValue:function(e,t){var n=ga(),r=n[0],i=n[1];return wa((function(){o.unstable_next((function(){var n=Xo.suspense;Xo.suspense=void 0===t?null:t;try{i(e)}finally{Xo.suspense=n}}))}),[e,t]),r},useTransition:function(e){var t=ga(),n=t[0],r=t[1];return[Ca((function(t){r(!0),o.unstable_next((function(){var n=Xo.suspense;Xo.suspense=void 0===e?null:e;try{r(!1),t()}finally{Xo.suspense=n}}))}),[e,n]),n]}},Ra=null,La=null,Ia=!1;function Da(e,t){var n=Au(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Na(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function ja(e){if(Ia){var t=La;if(t){var n=t;if(!Na(e,t)){if(!(t=nr(n.nextSibling))||!Na(e,t))return e.effectTag=-1025&e.effectTag|2,Ia=!1,void(Ra=e);Da(Ra,n)}Ra=e,La=nr(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Ia=!1,Ra=e}}function Ma(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ra=e}function Ua(e){if(e!==Ra)return!1;if(!Ia)return Ma(e),Ia=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Zn(t,e.memoizedProps))for(t=La;t;)Da(e,t),t=nr(t.nextSibling);if(Ma(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){La=nr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}La=null}}else La=Ra?nr(e.stateNode.nextSibling):null;return!0}function Ba(){La=Ra=null,Ia=!1}var Fa=I.ReactCurrentOwner,za=!1;function Va(e,t,n,r){t.child=null===e?Do(t,null,n,r):Io(t,e.child,n,r)}function Wa(e,t,n,r,i){n=n.render;var o=t.ref;return ao(t,i),r=ca(e,t,n,r,o,i),null===e||za?(t.effectTag|=1,Va(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),os(e,t,i))}function Ha(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||Ru(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Iu(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,qa(e,t,a,r,i,o))}return a=e.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:Jr)(i,r)&&e.ref===t.ref)?os(e,t,o):(t.effectTag|=1,(e=Lu(a,r)).ref=t.ref,e.return=t,t.child=e)}function qa(e,t,n,r,i,o){return null!==e&&Jr(e.memoizedProps,r)&&e.ref===t.ref&&(za=!1,i<o)?os(e,t,o):Ya(e,t,n,r,o)}function Ga(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ya(e,t,n,r,i){var o=yi(n)?pi:hi.current;return o=mi(t,o),ao(t,i),n=ca(e,t,n,r,o,i),null===e||za?(t.effectTag|=1,Va(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),os(e,t,i))}function Xa(e,t,n,r,i){if(yi(n)){var o=!0;Ti(t)}else o=!1;if(ao(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),Co(t,n,r),Oo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,l=n.contextType;"object"==typeof l&&null!==l?l=so(l):l=mi(t,l=yi(n)?pi:hi.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==l)&&xo(t,a,r,l),uo=!1;var h=t.memoizedState;u=a.state=h;var d=t.updateQueue;null!==d&&(vo(t,d,r,a,i),u=t.memoizedState),s!==r||h!==u||di.current||uo?("function"==typeof c&&(So(t,n,c,r),u=t.memoizedState),(s=uo||ko(t,n,s,r,h,u,l))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,s=t.memoizedProps,a.props=t.type===t.elementType?s:Qi(t.type,s),u=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=so(l):l=mi(t,l=yi(n)?pi:hi.current),(f="function"==typeof(c=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==l)&&xo(t,a,r,l),uo=!1,u=t.memoizedState,h=a.state=u,null!==(d=t.updateQueue)&&(vo(t,d,r,a,i),h=t.memoizedState),s!==r||u!==h||di.current||uo?("function"==typeof c&&(So(t,n,c,r),h=t.memoizedState),(c=uo||ko(t,n,s,r,u,h,l))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),r=!1);return Ka(e,t,n,r,o,i)}function Ka(e,t,n,r,i,o){Ga(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return i&&wi(t,n,!1),os(e,t,o);r=t.stateNode,Fa.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Io(t,e.child,null,o),t.child=Io(t,null,s,o)):Va(e,t,s,o),t.memoizedState=r.state,i&&wi(t,n,!0),t.child}function $a(e){var t=e.stateNode;t.pendingContext?bi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&bi(0,t.context,!1),Fo(e,t.containerInfo)}var Qa,Ja,Za,es={dehydrated:null,retryTime:0};function ts(e,t,n){var r,i=t.mode,o=t.pendingProps,a=Ho.current,s=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(a|=1),ci(Ho,1&a),null===e){if(void 0!==o.fallback&&ja(t),s){if(s=o.fallback,(o=Du(null,i,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Du(s,i,n,null)).return=t,o.sibling=n,t.memoizedState=es,t.child=o,n}return i=o.children,t.memoizedState=null,t.child=Do(t,null,i,n)}if(null!==e.memoizedState){if(i=(e=e.child).sibling,s){if(o=o.fallback,(n=Lu(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(i=Lu(i,o,i.expirationTime)).return=t,n.sibling=i,n.childExpirationTime=0,t.memoizedState=es,t.child=n,i}return n=Io(t,e.child,o.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=o.fallback,(o=Du(null,i,0,null)).return=t,o.child=e,null!==e&&(e.return=o),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Du(s,i,n,null)).return=t,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,t.memoizedState=es,t.child=o,n}return t.memoizedState=null,t.child=Io(t,e,o.children,n)}function ns(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),oo(e.return,t)}function rs(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=i,a.lastEffect=o)}function is(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Va(e,t,r.children,n),0!=(2&(r=Ho.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ci(Ho,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===qo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rs(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===qo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rs(t,!0,n,null,o,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function os(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&hu(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Lu(e=t.child,e.pendingProps,e.expirationTime),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Lu(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function as(e){e.effectTag|=4}function ss(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function us(e){switch(e.tag){case 1:yi(e.type)&&gi();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(zo(),vi(),0!=(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return Wo(e),null;case 13:return li(Ho),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return li(Ho),null;case 4:return zo(),null;case 10:return io(e),null;default:return null}}function ls(e,t){return{value:e,source:t,stack:J(t)}}Qa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ja=function(e,t,n,r,o){var a=e.memoizedProps;if(a!==r){var s,u,l=t.stateNode;switch(Bo(jo.current),e=null,n){case"input":a=Ce(l,a),r=Ce(l,r),e=[];break;case"option":a=Le(l,a),r=Le(l,r),e=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),e=[];break;case"textarea":a=De(l,a),r=De(l,r),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(l.onclick=Hn)}for(s in zn(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(u in l=a[s])l.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(d.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in r){var c=r[s];if(l=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&c!==l&&(null!=c||null!=l))if("style"===s)if(l){for(u in l)!l.hasOwnProperty(u)||c&&c.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in c)c.hasOwnProperty(u)&&l[u]!==c[u]&&(n||(n={}),n[u]=c[u])}else n||(e||(e=[]),e.push(s,n)),n=c;else"dangerouslySetInnerHTML"===s?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(e=e||[]).push(s,""+c)):"children"===s?l===c||"string"!=typeof c&&"number"!=typeof c||(e=e||[]).push(s,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(d.hasOwnProperty(s)?(null!=c&&Wn(o,s),e||l===c||(e=[])):(e=e||[]).push(s,c))}n&&(e=e||[]).push("style",n),o=e,(t.updateQueue=o)&&as(t)}},Za=function(e,t,n,r){n!==r&&as(t)};var cs="function"==typeof WeakSet?WeakSet:Set;function fs(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=J(n)),null!==n&&Q(n.type),t=t.value,null!==e&&1===e.tag&&Q(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function hs(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Eu(e,t)}else t.current=null}function ds(e,t){switch(t.tag){case 0:case 11:case 15:ps(2,0,t);break;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Qi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}break;case 3:case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}function ps(e,t,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var r=n=n.next;do{if(0!=(r.tag&e)){var i=r.destroy;r.destroy=void 0,void 0!==i&&i()}0!=(r.tag&t)&&(i=r.create,r.destroy=i()),r=r.next}while(r!==n)}}function ms(e,t,n){switch("function"==typeof Ou&&Ou(t),t.tag){case 0:case 11:case 14:case 15:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Hi(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var i=t;try{n()}catch(e){Eu(i,e)}}e=e.next}while(e!==r)}))}break;case 1:hs(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Eu(e,t)}}(t,n);break;case 5:hs(t);break;case 4:bs(e,t,n)}}function ys(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,null!==t&&ys(t)}function gs(e){return 5===e.tag||3===e.tag||4===e.tag}function vs(e){e:{for(var t=e.return;null!==t;){if(gs(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(He(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||gs(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){var o=5===i.tag||6===i.tag;if(o){var s=o?i.stateNode:i.stateNode.instance;if(n)if(r){var u=s;s=n,8===(o=t).nodeType?o.parentNode.insertBefore(u,s):o.insertBefore(u,s)}else t.insertBefore(s,n);else r?(8===(u=t).nodeType?(o=u.parentNode).insertBefore(s,u):(o=u).appendChild(s),null!=(u=u._reactRootContainer)||null!==o.onclick||(o.onclick=Hn)):t.appendChild(s)}else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function bs(e,t,n){for(var r,i,o=t,s=!1;;){if(!s){s=o.return;e:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}s=s.return}s=!0}if(5===o.tag||6===o.tag){e:for(var u=e,l=o,c=n,f=l;;)if(ms(u,f,c),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===l)break;for(;null===f.sibling;){if(null===f.return||f.return===l)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}i?(u=r,l=o.stateNode,8===u.nodeType?u.parentNode.removeChild(l):u.removeChild(l)):r.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(ms(e,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function _s(e,t){switch(t.tag){case 0:case 11:case 14:case 15:ps(4,8,t);break;case 1:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[ar]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Oe(n,r),Vn(e,i),t=Vn(e,r),i=0;i<o.length;i+=2){var s=o[i],u=o[i+1];"style"===s?Bn(n,u):"dangerouslySetInnerHTML"===s?We(n,u):"children"===s?He(n,u):we(n,s,u,t)}switch(e){case"input":Pe(n,r);break;case"textarea":je(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?Ie(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?Ie(n,!!r.multiple,r.defaultValue,!0):Ie(n,!!r.multiple,r.multiple?[]:"",!1))}}}break;case 6:if(null===t.stateNode)throw Error(a(162));t.stateNode.nodeValue=t.memoizedProps;break;case 3:(t=t.stateNode).hydrate&&(t.hydrate=!1,Ct(t.containerInfo));break;case 12:break;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Fs=zi()),null!==n)e:for(e=n;;){if(5===e.tag)o=e.stateNode,r?"function"==typeof(o=o.style).setProperty?o.setProperty("display","none","important"):o.display="none":(o=e.stateNode,i=null!=(i=e.memoizedProps.style)&&i.hasOwnProperty("display")?i.display:null,o.style.display=Un("display",i));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(o=e.child.sibling).return=e,e=o;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break e;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}Ts(t);break;case 19:Ts(t);break;case 17:case 20:case 21:break;default:throw Error(a(163))}}function Ts(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new cs),t.forEach((function(t){var r=Cu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var ws="function"==typeof WeakMap?WeakMap:Map;function Ss(e,t,n){(n=fo(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vs||(Vs=!0,Ws=r),fs(e,t)},n}function Es(e,t,n){(n=fo(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return fs(e,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Hs?Hs=new Set([this]):Hs.add(this),fs(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var ks,Cs=Math.ceil,xs=I.ReactCurrentDispatcher,Os=I.ReactCurrentOwner,Ps=0,As=null,Rs=null,Ls=0,Is=0,Ds=null,Ns=1073741823,js=1073741823,Ms=null,Us=0,Bs=!1,Fs=0,zs=null,Vs=!1,Ws=null,Hs=null,qs=!1,Gs=null,Ys=90,Xs=null,Ks=0,$s=null,Qs=0;function Js(){return 0!=(48&Ps)?1073741821-(zi()/10|0):0!==Qs?Qs:Qs=1073741821-(zi()/10|0)}function Zs(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Vi();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&Ps))return Ls;if(null!==n)e=$i(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=$i(e,150,100);break;case 97:case 96:e=$i(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==As&&e===Ls&&--e,e}function eu(e,t){if(50<Ks)throw Ks=0,$s=null,Error(a(185));if(null!==(e=tu(e,t))){var n=Vi();1073741823===t?0!=(8&Ps)&&0==(48&Ps)?ou(e):(ru(e),0===Ps&&Yi()):ru(e),0==(4&Ps)||98!==n&&99!==n||(null===Xs?Xs=new Map([[e,t]]):(void 0===(n=Xs.get(e))||n>t)&&Xs.set(e,t))}}function tu(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,i=null;if(null===r&&3===e.tag)i=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return null!==i&&(As===i&&(hu(t),4===Is&&Bu(i,Ls)),Fu(i,t)),i}function nu(e){var t=e.lastExpiredTime;return 0!==t?t:Uu(e,t=e.firstPendingTime)?(t=e.lastPingedTime)>(e=e.nextKnownPendingLevel)?t:e:t}function ru(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Gi(ou.bind(null,e));else{var t=nu(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Js();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var i=e.callbackPriority;if(e.callbackExpirationTime===t&&i>=r)return;n!==Ni&&ki(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Gi(ou.bind(null,e)):qi(r,iu.bind(null,e),{timeout:10*(1073741821-t)-zi()}),e.callbackNode=t}}}function iu(e,t){if(Qs=0,t)return zu(e,t=Js()),ru(e),null;var n=nu(e);if(0!==n){if(t=e.callbackNode,0!=(48&Ps))throw Error(a(327));if(Tu(),e===As&&n===Ls||uu(e,n),null!==Rs){var r=Ps;Ps|=16;for(var i=cu();;)try{pu();break}catch(t){lu(e,t)}if(no(),Ps=r,xs.current=i,1===Is)throw t=Ds,uu(e,n),Bu(e,n),ru(e),t;if(null===Rs)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Is,As=null,r){case 0:case 1:throw Error(a(345));case 2:zu(e,2<n?2:n);break;case 3:if(Bu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=gu(i)),1073741823===Ns&&10<(i=Fs+500-zi())){if(Bs){var o=e.lastPingedTime;if(0===o||o>=n){e.lastPingedTime=n,uu(e,n);break}}if(0!==(o=nu(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=er(vu.bind(null,e),i);break}vu(e);break;case 4:if(Bu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=gu(i)),Bs&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,uu(e,n);break}if(0!==(i=nu(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==js?r=10*(1073741821-js)-zi():1073741823===Ns?r=0:(r=10*(1073741821-Ns)-5e3,0>(r=(i=zi())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cs(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=er(vu.bind(null,e),r);break}vu(e);break;case 5:if(1073741823!==Ns&&null!==Ms){o=Ns;var s=Ms;if(0>=(r=0|s.busyMinDurationMs)?r=0:(i=0|s.busyDelayMs,r=(o=zi()-(10*(1073741821-o)-(0|s.timeoutMs||5e3)))<=i?0:i+r-o),10<r){Bu(e,n),e.timeoutHandle=er(vu.bind(null,e),r);break}}vu(e);break;default:throw Error(a(329))}if(ru(e),e.callbackNode===t)return iu.bind(null,e)}}return null}function ou(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,e.finishedExpirationTime===t)vu(e);else{if(0!=(48&Ps))throw Error(a(327));if(Tu(),e===As&&t===Ls||uu(e,t),null!==Rs){var n=Ps;Ps|=16;for(var r=cu();;)try{du();break}catch(t){lu(e,t)}if(no(),Ps=n,xs.current=r,1===Is)throw n=Ds,uu(e,t),Bu(e,t),ru(e),n;if(null!==Rs)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,As=null,vu(e),ru(e)}}return null}function au(e,t){var n=Ps;Ps|=1;try{return e(t)}finally{0===(Ps=n)&&Yi()}}function su(e,t){var n=Ps;Ps&=-2,Ps|=8;try{return e(t)}finally{0===(Ps=n)&&Yi()}}function uu(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,tr(n)),null!==Rs)for(n=Rs.return;null!==n;){var r=n;switch(r.tag){case 1:var i=r.type.childContextTypes;null!=i&&gi();break;case 3:zo(),vi();break;case 5:Wo(r);break;case 4:zo();break;case 13:case 19:li(Ho);break;case 10:io(r)}n=n.return}As=e,Rs=Lu(e.current,null),Ls=t,Is=0,Ds=null,js=Ns=1073741823,Ms=null,Us=0,Bs=!1}function lu(e,t){for(;;){try{if(no(),fa(),null===Rs||null===Rs.return)return Is=1,Ds=t,null;e:{var n=e,r=Rs.return,i=Rs,o=t;if(t=Ls,i.effectTag|=2048,i.firstEffect=i.lastEffect=null,null!==o&&"object"==typeof o&&"function"==typeof o.then){var a=o,s=0!=(1&Ho.current),u=r;do{var l;if(l=13===u.tag){var c=u.memoizedState;if(null!==c)l=null!==c.dehydrated;else{var f=u.memoizedProps;l=void 0!==f.fallback&&(!0!==f.unstable_avoidThisFallback||!s)}}if(l){var h=u.updateQueue;if(null===h){var d=new Set;d.add(a),u.updateQueue=d}else h.add(a);if(0==(2&u.mode)){if(u.effectTag|=64,i.effectTag&=-2981,1===i.tag)if(null===i.alternate)i.tag=17;else{var p=fo(1073741823,null);p.tag=2,po(i,p)}i.expirationTime=1073741823;break e}o=void 0,i=t;var m=n.pingCache;if(null===m?(m=n.pingCache=new ws,o=new Set,m.set(a,o)):void 0===(o=m.get(a))&&(o=new Set,m.set(a,o)),!o.has(i)){o.add(i);var y=ku.bind(null,n,a,i);a.then(y,y)}u.effectTag|=4096,u.expirationTime=t;break e}u=u.return}while(null!==u);o=Error((Q(i.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+J(i))}5!==Is&&(Is=2),o=ls(o,i),u=r;do{switch(u.tag){case 3:a=o,u.effectTag|=4096,u.expirationTime=t,mo(u,Ss(u,a,t));break e;case 1:a=o;var g=u.type,v=u.stateNode;if(0==(64&u.effectTag)&&("function"==typeof g.getDerivedStateFromError||null!==v&&"function"==typeof v.componentDidCatch&&(null===Hs||!Hs.has(v)))){u.effectTag|=4096,u.expirationTime=t,mo(u,Es(u,a,t));break e}}u=u.return}while(null!==u)}Rs=yu(Rs)}catch(e){t=e;continue}break}}function cu(){var e=xs.current;return xs.current=Oa,null===e?Oa:e}function fu(e,t){e<Ns&&2<e&&(Ns=e),null!==t&&e<js&&2<e&&(js=e,Ms=t)}function hu(e){e>Us&&(Us=e)}function du(){for(;null!==Rs;)Rs=mu(Rs)}function pu(){for(;null!==Rs&&!Ci();)Rs=mu(Rs)}function mu(e){var t=ks(e.alternate,e,Ls);return e.memoizedProps=e.pendingProps,null===t&&(t=yu(e)),Os.current=null,t}function yu(e){Rs=e;do{var t=Rs.alternate;if(e=Rs.return,0==(2048&Rs.effectTag)){e:{var n=t,r=Ls,o=(t=Rs).pendingProps;switch(t.tag){case 2:case 16:break;case 15:case 0:break;case 1:yi(t.type)&&gi();break;case 3:zo(),vi(),(o=t.stateNode).pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(null===n||null===n.child)&&Ua(t)&&as(t);break;case 5:Wo(t),r=Bo(Uo.current);var s=t.type;if(null!==n&&null!=t.stateNode)Ja(n,t,s,o,r),n.ref!==t.ref&&(t.effectTag|=128);else if(o){var u=Bo(jo.current);if(Ua(t)){var l=(o=t).stateNode;n=o.type;var c=o.memoizedProps,f=r;switch(l[or]=o,l[ar]=c,s=void 0,r=l,n){case"iframe":case"object":case"embed":kn("load",r);break;case"video":case"audio":for(l=0;l<et.length;l++)kn(et[l],r);break;case"source":kn("error",r);break;case"img":case"image":case"link":kn("error",r),kn("load",r);break;case"form":kn("reset",r),kn("submit",r);break;case"details":kn("toggle",r);break;case"input":xe(r,c),kn("invalid",r),Wn(f,"onChange");break;case"select":r._wrapperState={wasMultiple:!!c.multiple},kn("invalid",r),Wn(f,"onChange");break;case"textarea":Ne(r,c),kn("invalid",r),Wn(f,"onChange")}for(s in zn(n,c),l=null,c)c.hasOwnProperty(s)&&(u=c[s],"children"===s?"string"==typeof u?r.textContent!==u&&(l=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(l=["children",""+u]):d.hasOwnProperty(s)&&null!=u&&Wn(f,s));switch(n){case"input":Ee(r),Ae(r,c,!0);break;case"textarea":Ee(r),Me(r);break;case"select":case"option":break;default:"function"==typeof c.onClick&&(r.onclick=Hn)}s=l,o.updateQueue=s,(o=null!==s)&&as(t)}else{n=t,f=s,c=o,l=9===r.nodeType?r:r.ownerDocument,u===Ue&&(u=Fe(f)),u===Ue?"script"===f?((c=l.createElement("div")).innerHTML="<script><\/script>",l=c.removeChild(c.firstChild)):"string"==typeof c.is?l=l.createElement(f,{is:c.is}):(l=l.createElement(f),"select"===f&&(f=l,c.multiple?f.multiple=!0:c.size&&(f.size=c.size))):l=l.createElementNS(u,f),(c=l)[or]=n,c[ar]=o,Qa(c,t),t.stateNode=c;var h=r,p=Vn(f=s,n=o);switch(f){case"iframe":case"object":case"embed":kn("load",c),r=n;break;case"video":case"audio":for(r=0;r<et.length;r++)kn(et[r],c);r=n;break;case"source":kn("error",c),r=n;break;case"img":case"image":case"link":kn("error",c),kn("load",c),r=n;break;case"form":kn("reset",c),kn("submit",c),r=n;break;case"details":kn("toggle",c),r=n;break;case"input":xe(c,n),r=Ce(c,n),kn("invalid",c),Wn(h,"onChange");break;case"option":r=Le(c,n);break;case"select":c._wrapperState={wasMultiple:!!n.multiple},r=i({},n,{value:void 0}),kn("invalid",c),Wn(h,"onChange");break;case"textarea":Ne(c,n),r=De(c,n),kn("invalid",c),Wn(h,"onChange");break;default:r=n}zn(f,r),l=void 0,u=f;var m=c,y=r;for(l in y)if(y.hasOwnProperty(l)){var g=y[l];"style"===l?Bn(m,g):"dangerouslySetInnerHTML"===l?null!=(g=g?g.__html:void 0)&&We(m,g):"children"===l?"string"==typeof g?("textarea"!==u||""!==g)&&He(m,g):"number"==typeof g&&He(m,""+g):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(d.hasOwnProperty(l)?null!=g&&Wn(h,l):null!=g&&we(m,l,g,p))}switch(f){case"input":Ee(c),Ae(c,n,!1);break;case"textarea":Ee(c),Me(c);break;case"option":null!=n.value&&c.setAttribute("value",""+Te(n.value));break;case"select":(r=c).multiple=!!n.multiple,null!=(c=n.value)?Ie(r,!!n.multiple,c,!1):null!=n.defaultValue&&Ie(r,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof r.onClick&&(c.onclick=Hn)}(o=Jn(s,o))&&as(t)}null!==t.ref&&(t.effectTag|=128)}else if(null===t.stateNode)throw Error(a(166));break;case 6:if(n&&null!=t.stateNode)Za(0,t,n.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(a(166));r=Bo(Uo.current),Bo(jo.current),Ua(t)?(s=(o=t).stateNode,r=o.memoizedProps,s[or]=o,(o=s.nodeValue!==r)&&as(t)):(s=t,(o=(9===r.nodeType?r:r.ownerDocument).createTextNode(o))[or]=s,t.stateNode=o)}break;case 11:break;case 13:if(li(Ho),o=t.memoizedState,0!=(64&t.effectTag)){t.expirationTime=r;break e}o=null!==o,s=!1,null===n?void 0!==t.memoizedProps.fallback&&Ua(t):(s=null!==(r=n.memoizedState),o||null===r||null!==(r=n.child.sibling)&&(null!==(c=t.firstEffect)?(t.firstEffect=r,r.nextEffect=c):(t.firstEffect=t.lastEffect=r,r.nextEffect=null),r.effectTag=8)),o&&!s&&0!=(2&t.mode)&&(null===n&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Ho.current)?0===Is&&(Is=3):(0!==Is&&3!==Is||(Is=4),0!==Us&&null!==As&&(Bu(As,Ls),Fu(As,Us)))),(o||s)&&(t.effectTag|=4);break;case 7:case 8:case 12:break;case 4:zo();break;case 10:io(t);break;case 9:case 14:break;case 17:yi(t.type)&&gi();break;case 19:if(li(Ho),null===(o=t.memoizedState))break;if(s=0!=(64&t.effectTag),null===(c=o.rendering)){if(s)ss(o,!1);else if(0!==Is||null!==n&&0!=(64&n.effectTag))for(n=t.child;null!==n;){if(null!==(c=qo(n))){for(t.effectTag|=64,ss(o,!1),null!==(s=c.updateQueue)&&(t.updateQueue=s,t.effectTag|=4),null===o.lastEffect&&(t.firstEffect=null),t.lastEffect=o.lastEffect,o=r,s=t.child;null!==s;)n=o,(r=s).effectTag&=2,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null,null===(c=r.alternate)?(r.childExpirationTime=0,r.expirationTime=n,r.child=null,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null):(r.childExpirationTime=c.childExpirationTime,r.expirationTime=c.expirationTime,r.child=c.child,r.memoizedProps=c.memoizedProps,r.memoizedState=c.memoizedState,r.updateQueue=c.updateQueue,n=c.dependencies,r.dependencies=null===n?null:{expirationTime:n.expirationTime,firstContext:n.firstContext,responders:n.responders}),s=s.sibling;ci(Ho,1&Ho.current|2),t=t.child;break e}n=n.sibling}}else{if(!s)if(null!==(n=qo(c))){if(t.effectTag|=64,s=!0,null!==(r=n.updateQueue)&&(t.updateQueue=r,t.effectTag|=4),ss(o,!0),null===o.tail&&"hidden"===o.tailMode){null!==(t=t.lastEffect=o.lastEffect)&&(t.nextEffect=null);break}}else zi()>o.tailExpiration&&1<r&&(t.effectTag|=64,s=!0,ss(o,!1),t.expirationTime=t.childExpirationTime=r-1);o.isBackwards?(c.sibling=t.child,t.child=c):(null!==(r=o.last)?r.sibling=c:t.child=c,o.last=c)}if(null!==o.tail){0===o.tailExpiration&&(o.tailExpiration=zi()+500),r=o.tail,o.rendering=r,o.tail=r.sibling,o.lastEffect=t.lastEffect,r.sibling=null,o=Ho.current,ci(Ho,o=s?1&o|2:1&o),t=r;break e}break;case 20:case 21:break;default:throw Error(a(156,t.tag))}t=null}if(o=Rs,1===Ls||1!==o.childExpirationTime){for(s=0,r=o.child;null!==r;)(n=r.expirationTime)>s&&(s=n),(c=r.childExpirationTime)>s&&(s=c),r=r.sibling;o.childExpirationTime=s}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Rs.firstEffect),null!==Rs.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Rs.firstEffect),e.lastEffect=Rs.lastEffect),1<Rs.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Rs:e.firstEffect=Rs,e.lastEffect=Rs))}else{if(null!==(t=us(Rs)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Rs.sibling))return t;Rs=e}while(null!==Rs);return 0===Is&&(Is=5),null}function gu(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function vu(e){var t=Vi();return Hi(99,bu.bind(null,e,t)),null}function bu(e,t){if(Tu(),0!=(48&Ps))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=gu(n);if(e.firstPendingTime=i,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===As&&(Rs=As=null,Ls=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=Ps;Ps|=32,Os.current=null,$n=En;var s=Xn();if(Kn(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{var l=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(l&&0!==l.rangeCount){u=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{u.nodeType,f.nodeType}catch(e){u=null;break e}var h=0,d=-1,p=-1,m=0,y=0,g=s,v=null;t:for(;;){for(var b;g!==u||0!==c&&3!==g.nodeType||(d=h+c),g!==f||0!==l&&3!==g.nodeType||(p=h+l),3===g.nodeType&&(h+=g.nodeValue.length),null!==(b=g.firstChild);)v=g,g=b;for(;;){if(g===s)break t;if(v===u&&++m===c&&(d=h),v===f&&++y===l&&(p=h),null!==(b=g.nextSibling))break;v=(g=v).parentNode}g=b}u=-1===d||-1===p?null:{start:d,end:p}}else u=null}u=u||{start:0,end:0}}else u=null;Qn={focusedElem:s,selectionRange:u},En=!1,zs=i;do{try{_u()}catch(e){if(null===zs)throw Error(a(330));Eu(zs,e),zs=zs.nextEffect}}while(null!==zs);zs=i;do{try{for(s=e,u=t;null!==zs;){var _=zs.effectTag;if(16&_&&He(zs.stateNode,""),128&_){var T=zs.alternate;if(null!==T){var w=T.ref;null!==w&&("function"==typeof w?w(null):w.current=null)}}switch(1038&_){case 2:vs(zs),zs.effectTag&=-3;break;case 6:vs(zs),zs.effectTag&=-3,_s(zs.alternate,zs);break;case 1024:zs.effectTag&=-1025;break;case 1028:zs.effectTag&=-1025,_s(zs.alternate,zs);break;case 4:_s(zs.alternate,zs);break;case 8:bs(s,c=zs,u),ys(c)}zs=zs.nextEffect}}catch(e){if(null===zs)throw Error(a(330));Eu(zs,e),zs=zs.nextEffect}}while(null!==zs);if(w=Qn,T=Xn(),_=w.focusedElem,u=w.selectionRange,T!==_&&_&&_.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(_.ownerDocument.documentElement,_)){null!==u&&Kn(_)&&(T=u.start,void 0===(w=u.end)&&(w=T),"selectionStart"in _?(_.selectionStart=T,_.selectionEnd=Math.min(w,_.value.length)):(w=(T=_.ownerDocument||document)&&T.defaultView||window).getSelection&&(w=w.getSelection(),c=_.textContent.length,s=Math.min(u.start,c),u=void 0===u.end?s:Math.min(u.end,c),!w.extend&&s>u&&(c=u,u=s,s=c),c=Yn(_,s),f=Yn(_,u),c&&f&&(1!==w.rangeCount||w.anchorNode!==c.node||w.anchorOffset!==c.offset||w.focusNode!==f.node||w.focusOffset!==f.offset)&&((T=T.createRange()).setStart(c.node,c.offset),w.removeAllRanges(),s>u?(w.addRange(T),w.extend(f.node,f.offset)):(T.setEnd(f.node,f.offset),w.addRange(T))))),T=[];for(w=_;w=w.parentNode;)1===w.nodeType&&T.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"==typeof _.focus&&_.focus(),_=0;_<T.length;_++)(w=T[_]).element.scrollLeft=w.left,w.element.scrollTop=w.top}Qn=null,En=!!$n,$n=null,e.current=n,zs=i;do{try{for(_=r;null!==zs;){var S=zs.effectTag;if(36&S){var E=zs.alternate;switch(w=_,(T=zs).tag){case 0:case 11:case 15:ps(16,32,T);break;case 1:var k=T.stateNode;if(4&T.effectTag)if(null===E)k.componentDidMount();else{var C=T.elementType===T.type?E.memoizedProps:Qi(T.type,E.memoizedProps);k.componentDidUpdate(C,E.memoizedState,k.__reactInternalSnapshotBeforeUpdate)}var x=T.updateQueue;null!==x&&bo(0,x,k);break;case 3:var O=T.updateQueue;if(null!==O){if(s=null,null!==T.child)switch(T.child.tag){case 5:s=T.child.stateNode;break;case 1:s=T.child.stateNode}bo(0,O,s)}break;case 5:var P=T.stateNode;null===E&&4&T.effectTag&&Jn(T.type,T.memoizedProps)&&P.focus();break;case 6:case 4:case 12:break;case 13:if(null===T.memoizedState){var A=T.alternate;if(null!==A){var R=A.memoizedState;if(null!==R){var L=R.dehydrated;null!==L&&Ct(L)}}}break;case 19:case 17:case 20:case 21:break;default:throw Error(a(163))}}if(128&S){T=void 0;var I=zs.ref;if(null!==I){var D=zs.stateNode;switch(zs.tag){case 5:T=D;break;default:T=D}"function"==typeof I?I(T):I.current=T}}zs=zs.nextEffect}}catch(e){if(null===zs)throw Error(a(330));Eu(zs,e),zs=zs.nextEffect}}while(null!==zs);zs=null,ji(),Ps=o}else e.current=n;if(qs)qs=!1,Gs=e,Ys=t;else for(zs=i;null!==zs;)t=zs.nextEffect,zs.nextEffect=null,zs=t;if(0===(t=e.firstPendingTime)&&(Hs=null),1073741823===t?e===$s?Ks++:(Ks=0,$s=e):Ks=0,"function"==typeof xu&&xu(n.stateNode,r),ru(e),Vs)throw Vs=!1,e=Ws,Ws=null,e;return 0!=(8&Ps)||Yi(),null}function _u(){for(;null!==zs;){var e=zs.effectTag;0!=(256&e)&&ds(zs.alternate,zs),0==(512&e)||qs||(qs=!0,qi(97,(function(){return Tu(),null}))),zs=zs.nextEffect}}function Tu(){if(90!==Ys){var e=97<Ys?97:Ys;return Ys=90,Hi(e,wu)}}function wu(){if(null===Gs)return!1;var e=Gs;if(Gs=null,0!=(48&Ps))throw Error(a(331));var t=Ps;for(Ps|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:ps(128,0,n),ps(0,64,n)}}catch(t){if(null===e)throw Error(a(330));Eu(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Ps=t,Yi(),!0}function Su(e,t,n){po(e,t=Ss(e,t=ls(n,t),1073741823)),null!==(e=tu(e,1073741823))&&ru(e)}function Eu(e,t){if(3===e.tag)Su(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Su(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Hs||!Hs.has(r))){po(n,e=Es(n,e=ls(t,e),1073741823)),null!==(n=tu(n,1073741823))&&ru(n);break}}n=n.return}}function ku(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),As===e&&Ls===n?4===Is||3===Is&&1073741823===Ns&&zi()-Fs<500?uu(e,Ls):Bs=!0:Uu(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,e.finishedExpirationTime===n&&(e.finishedExpirationTime=0,e.finishedWork=null),ru(e)))}function Cu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=Zs(t=Js(),e,null)),null!==(e=tu(e,t))&&ru(e)}ks=function(e,t,n){var r=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||di.current)za=!0;else{if(r<n){switch(za=!1,t.tag){case 3:$a(t),Ba();break;case 5:if(Vo(t),4&t.mode&&1!==n&&i.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:yi(t.type)&&Ti(t);break;case 4:Fo(t,t.stateNode.containerInfo);break;case 10:ro(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?ts(e,t,n):(ci(Ho,1&Ho.current),null!==(t=os(e,t,n))?t.sibling:null);ci(Ho,1&Ho.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return is(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),ci(Ho,Ho.current),!r)return null}return os(e,t,n)}za=!1}}else za=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=mi(t,hi.current),ao(t,n),i=ca(null,t,r,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,fa(),yi(r)){var o=!0;Ti(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null;var s=r.getDerivedStateFromProps;"function"==typeof s&&So(t,r,s,e),i.updater=Eo,t.stateNode=i,i._reactInternalFiber=t,Oo(t,r,e,n),t=Ka(null,t,r,!0,o,n)}else t.tag=0,Va(null,t,i,n),t=t.child;return t;case 16:if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,o=t.tag=function(e){if("function"==typeof e)return Ru(e)?1:0;if(null!=e){if((e=e.$$typeof)===H)return 11;if(e===Y)return 14}return 2}(i),e=Qi(i,e),o){case 0:t=Ya(null,t,i,e,n);break;case 1:t=Xa(null,t,i,e,n);break;case 11:t=Wa(null,t,i,e,n);break;case 14:t=Ha(null,t,i,Qi(i.type,e),r,n);break;default:throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ya(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Xa(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 3:if($a(t),null===(r=t.updateQueue))throw Error(a(282));if(i=null!==(i=t.memoizedState)?i.element:null,vo(t,r,t.pendingProps,null,n),(r=t.memoizedState.element)===i)Ba(),t=os(e,t,n);else{if((i=t.stateNode.hydrate)&&(La=nr(t.stateNode.containerInfo.firstChild),Ra=t,i=Ia=!0),i)for(n=Do(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Va(e,t,r,n),Ba();t=t.child}return t;case 5:return Vo(t),null===e&&ja(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,Zn(r,i)?s=null:null!==o&&Zn(r,o)&&(t.effectTag|=16),Ga(e,t),4&t.mode&&1!==n&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Va(e,t,s,n),t=t.child),t;case 6:return null===e&&ja(t),null;case 13:return ts(e,t,n);case 4:return Fo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Io(t,null,r,n):Va(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Wa(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 7:return Va(e,t,t.pendingProps,n),t.child;case 8:case 12:return Va(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,ro(t,o=i.value),null!==s){var u=s.value;if(0===(o=$r(u,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(s.children===i.children&&!di.current){t=os(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var l=u.dependencies;if(null!==l){s=u.child;for(var c=l.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&o)){1===u.tag&&((c=fo(n,null)).tag=2,po(u,c)),u.expirationTime<n&&(u.expirationTime=n),null!==(c=u.alternate)&&c.expirationTime<n&&(c.expirationTime=n),oo(u.return,n),l.expirationTime<n&&(l.expirationTime=n);break}c=c.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}}Va(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,ao(t,n),r=r(i=so(i,o.unstable_observedBits)),t.effectTag|=1,Va(e,t,r,n),t.child;case 14:return o=Qi(i=t.type,t.pendingProps),Ha(e,t,i,o=Qi(i.type,o),r,n);case 15:return qa(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Qi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,yi(r)?(e=!0,Ti(t)):e=!1,ao(t,n),Co(t,r,i),Oo(t,r,i,n),Ka(null,t,r,!0,e,n);case 19:return is(e,t,n)}throw Error(a(156,t.tag))};var xu=null,Ou=null;function Pu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Au(e,t,n,r){return new Pu(e,t,n,r)}function Ru(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Lu(e,t){var n=e.alternate;return null===n?((n=Au(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Iu(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)Ru(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case U:return Du(n.children,i,o,t);case W:s=8,i|=7;break;case B:s=8,i|=1;break;case F:return(e=Au(12,n,t,8|i)).elementType=F,e.type=F,e.expirationTime=o,e;case q:return(e=Au(13,n,t,i)).type=q,e.elementType=q,e.expirationTime=o,e;case G:return(e=Au(19,n,t,i)).elementType=G,e.expirationTime=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case z:s=10;break e;case V:s=9;break e;case H:s=11;break e;case Y:s=14;break e;case X:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Au(s,n,t,i)).elementType=e,t.type=r,t.expirationTime=o,t}function Du(e,t,n,r){return(e=Au(7,e,r,t)).expirationTime=n,e}function Nu(e,t,n){return(e=Au(6,e,null,t)).expirationTime=n,e}function ju(e,t,n){return(t=Au(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Mu(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Uu(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Bu(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Fu(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function zu(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Vu(e,t,n,r){var i=t.current,o=Js(),s=To.suspense;o=Zs(o,i,s);e:if(n){t:{if(tt(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(yi(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var l=n.type;if(yi(l)){n=_i(n,l,u);break e}}n=u}else n=fi;return null===t.context?t.context=n:t.pendingContext=n,(t=fo(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),po(i,t),eu(i,o),o}function Wu(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Hu(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function qu(e,t){Hu(e,t),(e=e.alternate)&&Hu(e,t)}function Gu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:M,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Yu(e,t,n){var r=new Mu(e,t,n=null!=n&&!0===n.hydrate),i=Au(3,null,null,2===t?7:1===t?3:0);r.current=i,i.stateNode=r,e[sr]=r.current,n&&0!==t&&function(e){var t=Dn(e);yt.forEach((function(n){Nn(n,e,t)})),gt.forEach((function(n){Nn(n,e,t)}))}(9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Xu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Ku(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"==typeof i){var s=i;i=function(){var e=Wu(a);s.call(e)}}Vu(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Yu(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"==typeof i){var u=i;i=function(){var e=Wu(a);u.call(e)}}su((function(){Vu(t,a,e,i)}))}return Wu(a)}function $u(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xu(t))throw Error(a(200));return Gu(e,t,null,n)}ot=function(e){if(13===e.tag){var t=$i(Js(),150,100);eu(e,t),qu(e,t)}},at=function(e){if(13===e.tag){Js();var t=Ki++;eu(e,t),qu(e,t)}},st=function(e){if(13===e.tag){var t=Js();eu(e,t=Zs(t,e,null)),qu(e,t)}},ee=function(e,t,n){switch(t){case"input":if(Pe(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=fr(r);if(!i)throw Error(a(90));ke(r),Pe(r,i)}}}break;case"textarea":je(e,n);break;case"select":null!=(t=n.value)&&Ie(e,!!n.multiple,t,!1)}},Yu.prototype.render=function(e,t){Vu(e,this._internalRoot,null,void 0===t?null:t)},Yu.prototype.unmount=function(e){Vu(null,this._internalRoot,null,void 0===e?null:e)},ae=au,se=function(e,t,n,r){var i=Ps;Ps|=4;try{return Hi(98,e.bind(null,t,n,r))}finally{0===(Ps=i)&&Yi()}},ue=function(){0==(49&Ps)&&(function(){if(null!==Xs){var e=Xs;Xs=null,e.forEach((function(e,t){zu(t,e),ru(t)})),Yi()}}(),Tu())},le=function(e,t){var n=Ps;Ps|=2;try{return e(t)}finally{0===(Ps=n)&&Yi()}};var Qu,Ju,Zu={createPortal:$u,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=it(t))?null:e.stateNode},hydrate:function(e,t,n){if(!Xu(t))throw Error(a(200));return Ku(null,e,t,!0,n)},render:function(e,t,n){if(!Xu(t))throw Error(a(200));return Ku(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){if(!Xu(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Ku(e,t,n,!1,r)},unmountComponentAtNode:function(e){if(!Xu(e))throw Error(a(40));return!!e._reactRootContainer&&(su((function(){Ku(null,null,e,!1,(function(){e._reactRootContainer=null}))})),!0)},unstable_createPortal:function(){return $u.apply(void 0,arguments)},unstable_batchedUpdates:au,flushSync:function(e,t){if(0!=(48&Ps))throw Error(a(187));var n=Ps;Ps|=1;try{return Hi(99,e.bind(null,t))}finally{Ps=n,Yi()}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[lr,cr,fr,R.injectEventPluginsByName,h,It,function(e){x(e,Lt)},ie,oe,An,A,Tu,{current:!1}]}};Ju=(Qu={findFiberByHostInstance:ur,bundleType:0,version:"16.11.0",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);xu=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},Ou=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(i({},Qu,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=it(e))?null:e.stateNode},findFiberByHostInstance:function(e){return Ju?Ju(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}));var el={default:Zu},tl=el&&Zu||el;e.exports=tl.default||tl},function(e,t,n){"use strict";e.exports=n(316)},function(e,t,n){"use strict";
35
+ /** @license React v0.17.0
36
+ * scheduler.production.min.js
37
+ *
38
+ * Copyright (c) Facebook, Inc. and its affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var r,i,o,a,s;if(Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,l=null,c=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(c,0),e}},f=Date.now();t.unstable_now=function(){return Date.now()-f},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(c,0))},i=function(e,t){l=setTimeout(e,t)},o=function(){clearTimeout(l)},a=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var h=window.performance,d=window.Date,p=window.setTimeout,m=window.clearTimeout,y=window.requestAnimationFrame,g=window.cancelAnimationFrame;if("undefined"!=typeof console&&("function"!=typeof y&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),"object"==typeof h&&"function"==typeof h.now)t.unstable_now=function(){return h.now()};else{var v=d.now();t.unstable_now=function(){return d.now()-v}}var b=!1,_=null,T=-1,w=5,S=0;a=function(){return t.unstable_now()>=S},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<e?Math.floor(1e3/e):33.33};var E=new MessageChannel,k=E.port2;E.port1.onmessage=function(){if(null!==_){var e=t.unstable_now();S=e+w;try{_(!0,e)?k.postMessage(null):(b=!1,_=null)}catch(e){throw k.postMessage(null),e}}else b=!1},r=function(e){_=e,b||(b=!0,k.postMessage(null))},i=function(e,n){T=p((function(){e(t.unstable_now())}),n)},o=function(){m(T),T=-1}}function C(e,t){var n=e.length;e.push(t);e:for(;;){var r=Math.floor((n-1)/2),i=e[r];if(!(void 0!==i&&0<P(i,t)))break e;e[r]=t,e[n]=i,n=r}}function x(e){return void 0===(e=e[0])?null:e}function O(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,u=e[s];if(void 0!==a&&0>P(a,n))void 0!==u&&0>P(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==u&&0>P(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function P(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var A=[],R=[],L=1,I=null,D=3,N=!1,j=!1,M=!1;function U(e){for(var t=x(R);null!==t;){if(null===t.callback)O(R);else{if(!(t.startTime<=e))break;O(R),t.sortIndex=t.expirationTime,C(A,t)}t=x(R)}}function B(e){if(M=!1,U(e),!j)if(null!==x(A))j=!0,r(F);else{var t=x(R);null!==t&&i(B,t.startTime-e)}}function F(e,n){j=!1,M&&(M=!1,o()),N=!0;var r=D;try{for(U(n),I=x(A);null!==I&&(!(I.expirationTime>n)||e&&!a());){var s=I.callback;if(null!==s){I.callback=null,D=I.priorityLevel;var u=s(I.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?I.callback=u:I===x(A)&&O(A),U(n)}else O(A);I=x(A)}if(null!==I)var l=!0;else{var c=x(R);null!==c&&i(B,c.startTime-n),l=!1}return l}finally{I=null,D=r,N=!1}}function z(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var V=s;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=D;D=e;try{return t()}finally{D=n}},t.unstable_next=function(e){switch(D){case 1:case 2:case 3:var t=3;break;default:t=D}var n=D;D=t;try{return e()}finally{D=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0<u?s+u:s,a="number"==typeof a.timeout?a.timeout:z(e)}else a=z(e),u=s;return e={id:L++,callback:n,priorityLevel:e,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>s?(e.sortIndex=u,C(R,e),null===x(A)&&e===x(R)&&(M?o():M=!0,i(B,u-s))):(e.sortIndex=a,C(A,e),j||N||(j=!0,r(F))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=D;return function(){var n=D;D=t;try{return e.apply(this,arguments)}finally{D=n}}},t.unstable_getCurrentPriorityLevel=function(){return D},t.unstable_shouldYield=function(){var e=t.unstable_now();U(e);var n=x(A);return n!==I&&null!==I&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<I.expirationTime||a()},t.unstable_requestPaint=V,t.unstable_continueExecution=function(){j||N||(j=!0,r(F))},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return x(A)},t.unstable_Profiling=null},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=n(320);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(161),n(165),n(166),n(168),n(169),n(89),n(171),n(172),n(173),n(174),n(90),n(175),n(177),n(178),n(179),n(64),n(181),n(182),n(184),n(185),n(94),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(95),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(96),n(221),n(222),n(225),n(99),n(226),n(227),n(228),n(229),n(103),n(104),n(230),n(231),n(232),n(233),n(105),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(258),n(259),n(260),n(261),n(262),n(264),n(108),n(265),n(266),n(267);var r=n(1),i=n.n(r),o=n(0),a=n.n(o),s=n(2),u=n.n(s),l=n(58),c=n.n(l),f=n(6),h=n.n(f),d=(n(270),n(272),n(4)),p=n.n(d),m=n(152),y=n.n(m),g=n(5),v=n.n(g),b=n(110),_=n.n(b),T=n(111),w=n.n(T),S=n(153),E=n.n(S),k=n(154),C=n.n(k),x=n(77),O=n.n(x);
43
+ /*! @name m3u8-parser @version 4.4.0 @license Apache-2.0 */
44
+ function P(){return(P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function A(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var R=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t,n,r,i=this.listeners[e];if(i)if(2===arguments.length)for(n=i.length,t=0;t<n;++t)i[t].call(this,arguments[1]);else for(r=Array.prototype.slice.call(arguments,1),n=i.length,t=0;t<n;++t)i[t].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),L=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return A(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}(R),I=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},i=n.length;i--;)""!==n[i]&&((t=/([^=]*)=(.*)/.exec(n[i]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),r[t[0]]=t[1]);return r},D=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}A(t,e);var n=t.prototype;return n.push=function(e){var t,n,r=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce((function(t,n){var r=n(e);return r===e?t:t.concat([r])}),[e]).forEach((function(e){for(var i=0;i<r.customParsers.length;i++)if(r.customParsers[i].call(r,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))r.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void r.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"totalduration"},t[1]&&(n.duration=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void r.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"byterange"},t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),void r.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var o=I(t[1]);if(o.URI&&(n.uri=o.URI),o.BYTERANGE){var a=o.BYTERANGE.split("@"),s=a[0],u=a[1];n.byterange={},s&&(n.byterange.length=parseInt(s,10)),u&&(n.byterange.offset=parseInt(u,10))}}r.trigger("data",n)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=I(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))}r.trigger("data",n)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=I(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e))r.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))r.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=I(t[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void r.trigger("data",n);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return n={type:"tag",tagType:"start"},t[1]&&(n.attributes=I(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);r.trigger("data",{type:"tag",data:e.slice(4)})}}}else r.trigger("data",{type:"comment",text:e.slice(1)})})):this.trigger("data",{type:"uri",uri:e}))},n.addParser=function(e){var t=this,n=e.expression,r=e.customType,i=e.dataParser,o=e.segment;"function"!=typeof i&&(i=function(e){return e}),this.customParsers.push((function(e){if(n.exec(e))return t.trigger("data",{type:"custom",data:i(e),customType:r,segment:o}),!0}))},n.addTagMapper=function(e){var t=e.expression,n=e.map;this.tagMappers.push((function(e){return t.test(e)?n(e):e}))},t}(R);function N(e){for(var t=a.a.atob(e||""),n=new Uint8Array(t.length),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}var j=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new L,t.parseStream=new D,t.lineStream.pipe(t.parseStream);var n,r,i=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t),o=[],a={},s=function(){},u={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},l=0;return t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},t.parseStream.on("data",(function(e){var t,c;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(a.byterange=t,t.length=e.length,"offset"in e||(this.trigger("info",{message:"defaulting offset to zero"}),e.offset=0)),"offset"in e&&(a.byterange=t,t.offset=e.offset)},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(a.duration=e.duration),0===e.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=o},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?void(this.manifest.contentProtection={"com.widevine.alpha":{attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:N(e.attributes.URI.split(",")[1])}}):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(r.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,l=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){n={},e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange)},"stream-inf":function(){this.manifest.playlists=o,this.manifest.mediaGroups=this.manifest.mediaGroups||u,e.attributes?(a.attributes||(a.attributes={}),P(a.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||u,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var n=this.manifest.mediaGroups[e.attributes.TYPE];n[e.attributes["GROUP-ID"]]=n[e.attributes["GROUP-ID"]]||{},t=n[e.attributes["GROUP-ID"]],(c={default:/yes/i.test(e.attributes.DEFAULT)}).default?c.autoselect=!0:c.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(c.language=e.attributes.LANGUAGE),e.attributes.URI&&(c.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(c.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(c.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(c.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=c}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){l+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(o.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),a.dateTimeString=e.dateTimeString,a.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):this.manifest.targetDuration=e.duration},totalduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration}):this.manifest.totalDuration=e.duration},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=e.data},"cue-out-cont":function(){a.cueOutCont=e.data},"cue-in":function(){a.cueIn=e.data}}[e.tagType]||s).call(i)},uri:function(){a.uri=e.uri,o.push(a),this.manifest.targetDuration&&!("duration"in a)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),r&&(a.key=r),a.timeline=l,n&&(a.map=n),a={}},comment:function(){},custom:function(){e.segment?(a.custom=a.custom||{},a.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(i)})),t}A(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}(R),M=n(80),U=n.n(M),B=n(155),F=n.n(B),z=n(156),V=function(e){return!!e&&"object"==typeof e},W=function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(t,n){return Object.keys(n).forEach((function(r){Array.isArray(t[r])&&Array.isArray(n[r])?t[r]=t[r].concat(n[r]):V(t[r])&&V(n[r])?t[r]=e(t[r],n[r]):t[r]=n[r]})),t}),{})},H=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},q=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},G="INVALID_NUMBER_OF_PERIOD",Y="DASH_EMPTY_MANIFEST",X="DASH_INVALID_XML",K="NO_BASE_URL",$="SEGMENT_TIME_UNSPECIFIED",Q="UNSUPPORTED_UTC_TIMING_SCHEME",J=function(e){var t=e.baseUrl,n=void 0===t?"":t,r=e.source,i=void 0===r?"":r,o=e.range,a=void 0===o?"":o,s=e.indexRange,u=void 0===s?"":s,l={uri:i,resolvedUri:U()(n||"",i)};if(a||u){var c=(a||u).split("-"),f=parseInt(c[0],10),h=parseInt(c[1],10);l.byterange={length:h-f+1,offset:f}}return l},Z={static:function(e){var t=e.duration,n=e.timescale,r=void 0===n?1:n,i=e.sourceDuration;return{start:0,end:Math.ceil(i/(t/r))}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,r=e.availabilityStartTime,i=e.timescale,o=void 0===i?1:i,a=e.duration,s=e.start,u=void 0===s?0:s,l=e.minimumUpdatePeriod,c=void 0===l?0:l,f=e.timeShiftBufferDepth,h=void 0===f?1/0:f,d=(t+n)/1e3,p=r+u,m=d+c-p,y=Math.ceil(m*o/a),g=Math.floor((d-p-h)*o/a),v=Math.floor((d-p)*o/a);return{start:Math.max(0,g),end:Math.min(y,v)}}},ee=function(e){var t=e.type,n=void 0===t?"static":t,r=e.duration,i=e.timescale,o=void 0===i?1:i,a=e.sourceDuration,s=Z[n](e),u=function(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n}(s.start,s.end).map(function(e){return function(t,n){var r=e.duration,i=e.timescale,o=void 0===i?1:i,a=e.periodIndex,s=e.startNumber;return{number:(void 0===s?1:s)+t,duration:r/o,timeline:a,time:n*r}}}(e));if("static"===n){var l=u.length-1;u[l].duration=a-r/o*l}return u},te=function(e){var t=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,i=e.sourceDuration,o=e.timescale,a=void 0===o?1:o,s=e.indexRange,u=void 0===s?"":s,l=e.duration;if(!t)throw new Error(K);var c=J({baseUrl:t,source:r.sourceURL,range:r.range}),f=J({baseUrl:t,source:t,indexRange:u});if(f.map=c,l){var h=ee(e);h.length&&(f.duration=h[0].duration,f.timeline=h[0].timeline)}else i&&(f.duration=i/a,f.timeline=0);return f.number=0,[f]},ne=function(e,t,n){for(var r=e.sidx.map?e.sidx.map:null,i=e.sidx.duration,o=e.timeline||0,a=e.sidx.byterange,s=a.offset+a.length,u=t.timescale,l=t.references.filter((function(e){return 1!==e.referenceType})),c=[],f=s+t.firstOffset,h=0;h<l.length;h++){var d=t.references[h],p=d.referencedSize,m=d.subsegmentDuration,y=te({baseUrl:n,timescale:u,timeline:o,periodIndex:o,duration:m,sourceDuration:i,indexRange:f+"-"+(f+p-1)})[0];r&&(y.map=r),c.push(y),f+=p}return e.segments=c,e},re=function(e){var t;return(t=e.reduce((function(e,t){var n,r=t.attributes.id+(t.attributes.lang||"");return e[r]?(t.segments[0]&&(t.segments[0].discontinuity=!0),(n=e[r].segments).push.apply(n,t.segments),t.attributes.contentProtection&&(e[r].attributes.contentProtection=t.attributes.contentProtection)):e[r]=t,e}),{}),Object.keys(t).map((function(e){return t[e]}))).map((function(e){var t,n;return e.discontinuityStarts=(t=e.segments,n="discontinuity",t.reduce((function(e,t,r){return t[n]&&e.push(r),e}),[])),e}))},ie=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e){var r=e[n];if(r.sidx){var i=r.sidx.uri+"-"+(a=r.sidx.byterange,s=void 0,s=a.offset+a.length-1,a.offset+"-"+s),o=t[i]&&t[i].sidx;r.sidx&&o&&ne(r,o,r.sidx.resolvedUri)}}var a,s;return e},oe=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,o={attributes:(t={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},ae=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,o={attributes:(t={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},se=function(e,t){var n;if(void 0===t&&(t={}),!e.length)return{};var r=e[0].attributes,i=r.sourceDuration,o=r.type,a=void 0===o?"static":o,s=r.suggestedPresentationDelay,u=r.minimumUpdatePeriod,l=void 0===u?0:u,c=re(e.filter((function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video"===t.contentType}))).map(ae),f=re(e.filter((function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio"===t.contentType}))),h=e.filter((function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType})),d={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(n={AUDIO:{},VIDEO:{}},n["CLOSED-CAPTIONS"]={},n.SUBTITLES={},n),uri:"",duration:i,playlists:ie(c,t),minimumUpdatePeriod:1e3*l};return"dynamic"===a&&(d.suggestedPresentationDelay=s),f.length&&(d.mediaGroups.AUDIO.audio=function(e,t){var n;void 0===t&&(t={});var r=e.reduce((function(e,r){var i=r.attributes.role&&r.attributes.role.value||"",o=r.attributes.lang||"",a="main";if(o){var s=i?" ("+i+")":"";a=""+r.attributes.lang+s}return e[a]&&e[a].playlists[0].attributes.BANDWIDTH>r.attributes.bandwidth||(e[a]={language:o,autoselect:!0,default:"main"===i,playlists:ie([oe(r)],t),uri:""},void 0===n&&"main"===i&&((n=r).default=!0)),e}),{});n||(r[Object.keys(r)[0]].default=!0);return r}(f,t)),h.length&&(d.mediaGroups.SUBTITLES.subs=function(e,t){return void 0===t&&(t={}),e.reduce((function(e,n){var r,i,o,a,s=n.attributes.lang||"text";return e[s]||(e[s]={language:s,default:!1,autoselect:!1,playlists:ie([(r=n,o=r.attributes,a=r.segments,void 0===a&&(a=[{uri:o.baseUrl,timeline:o.periodIndex,resolvedUri:o.baseUrl||"",duration:o.sourceDuration,number:0}],o.duration=o.sourceDuration),{attributes:(i={NAME:o.id,BANDWIDTH:o.bandwidth},i["PROGRAM-ID"]=1,i),uri:"",endList:"static"===(o.type||"static"),timeline:o.periodIndex,resolvedUri:o.baseUrl||"",targetDuration:o.duration,segments:a,mediaSequence:a.length?a[0].number:1})],t),uri:""}),e}),{})}(h,t)),d},ue=function(e,t,n){var r=e.NOW,i=e.clientOffset,o=e.availabilityStartTime,a=e.timescale,s=void 0===a?1:a,u=e.start,l=void 0===u?0:u,c=e.minimumUpdatePeriod,f=(r+i)/1e3+(void 0===c?0:c)-(o+l);return Math.ceil((f*s-t)/n)},le=function(e,t){for(var n=e.type,r=void 0===n?"static":n,i=e.minimumUpdatePeriod,o=void 0===i?0:i,a=e.media,s=void 0===a?"":a,u=e.sourceDuration,l=e.timescale,c=void 0===l?1:l,f=e.startNumber,h=void 0===f?1:f,d=e.periodIndex,p=[],m=-1,y=0;y<t.length;y++){var g=t[y],v=g.d,b=g.r||0,_=g.t||0;m<0&&(m=_),_&&_>m&&(m=_);var T=void 0;if(b<0){var w=y+1;T=w===t.length?"dynamic"===r&&o>0&&s.indexOf("$Number$")>0?ue(e,m,v):(u*c-m)/v:(t[w].t-m)/v}else T=b+1;for(var S=h+p.length+T,E=h+p.length;E<S;)p.push({number:E,duration:v/c,time:m,timeline:d}),m+=v,E++}return p},ce=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,fe=function(e,t){return e.replace(ce,function(e){return function(t,n,r,i){if("$$"===t)return"$";if(void 0===e[n])return t;var o=""+e[n];return"RepresentationID"===n?o:(i=r?parseInt(i,10):1,o.length>=i?o:""+new Array(i-o.length+1).join("0")+o)}}(t))},he=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},r=e.initialization,i=void 0===r?{sourceURL:"",range:""}:r,o=J({baseUrl:e.baseUrl,source:fe(i.sourceURL,n),range:i.range});return function(e,t){return e.duration||t?e.duration?ee(e):le(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]}(e,t).map((function(t){n.Number=t.number,n.Time=t.time;var r=fe(e.media||"",n);return{uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:U()(e.baseUrl||"",r),map:o,number:t.number}}))},de=function(e,t){var n=e.duration,r=e.segmentUrls,i=void 0===r?[]:r;if(!n&&!t||n&&t)throw new Error($);var o,a=i.map((function(t){return function(e,t){var n=e.baseUrl,r=e.initialization,i=void 0===r?{}:r,o=J({baseUrl:n,source:i.sourceURL,range:i.range}),a=J({baseUrl:n,source:t.media,range:t.mediaRange});return a.map=o,a}(e,t)}));return n&&(o=ee(e)),t&&(o=le(e,t)),o.map((function(e,t){if(a[t]){var n=a[t];return n.timeline=e.timeline,n.duration=e.duration,n.number=e.number,n}})).filter((function(e){return e}))},pe=function(e){var t,n,r=e.attributes,i=e.segmentInfo;i.template?(n=he,t=W(r,i.template)):i.base?(n=te,t=W(r,i.base)):i.list&&(n=de,t=W(r,i.list));var o={attributes:r};if(!n)return o;var a=n(t,i.timeline);if(t.duration){var s=t,u=s.duration,l=s.timescale,c=void 0===l?1:l;t.duration=u/c}else a.length?t.duration=a.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return o.attributes=t,o.segments=a,i.base&&t.indexRange&&(o.sidx=a[0],o.segments=[]),o},me=function(e,t){return q(e.childNodes).filter((function(e){return e.tagName===t}))},ye=function(e){return e.textContent.trim()},ge=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var n=t.slice(1),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(i||0)+86400*parseFloat(o||0)+3600*parseFloat(a||0)+60*parseFloat(s||0)+parseFloat(u||0)},ve={mediaPresentationDuration:function(e){return ge(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 ge(e)},suggestedPresentationDelay:function(e){return ge(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return ge(e)},start:function(e){return ge(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)?ge(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}},be=function(e){return e&&e.attributes?q(e.attributes).reduce((function(e,t){var n=ve[t.name]||ve.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},_e={"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"},Te=function(e,t){return t.length?H(e.map((function(e){return t.map((function(t){return U()(e,ye(t))}))}))):e},we=function(e){var t=me(e,"SegmentTemplate")[0],n=me(e,"SegmentList")[0],r=n&&me(n,"SegmentURL").map((function(e){return W({tag:"SegmentURL"},be(e))})),i=me(e,"SegmentBase")[0],o=n||t,a=o&&me(o,"SegmentTimeline")[0],s=n||i||t,u=s&&me(s,"Initialization")[0],l=t&&be(t);l&&u?l.initialization=u&&be(u):l&&l.initialization&&(l.initialization={sourceURL:l.initialization});var c={template:l,timeline:a&&me(a,"S").map((function(e){return be(e)})),list:n&&W(be(n),{segmentUrls:r,initialization:be(u)}),base:i&&W(be(i),{initialization:be(u)})};return Object.keys(c).forEach((function(e){c[e]||delete c[e]})),c},Se=function(e,t,n){return function(r){var i=be(r),o=Te(t,me(r,"BaseURL")),a=me(r,"Role")[0],s={role:be(a)},u=W(e,i,s),l=me(r,"ContentProtection").reduce((function(e,t){var n=be(t),r=_e[n.schemeIdUri];if(r){e[r]={attributes:n};var i=me(t,"cenc:pssh")[0];if(i){var o=ye(i),a=o&&F()(o);e[r].pssh=a}}return e}),{});Object.keys(l).length&&(u=W(u,{contentProtection:l}));var c=we(r),f=me(r,"Representation"),h=W(n,c);return H(f.map(function(e,t,n){return function(r){var i=me(r,"BaseURL"),o=Te(t,i),a=W(e,be(r)),s=we(r);return o.map((function(e){return{segmentInfo:W(n,s),attributes:W(a,{baseUrl:e})}}))}}(u,o,h)))}},Ee=function(e,t){void 0===t&&(t={});var n=t,r=n.manifestUri,i=void 0===r?"":r,o=n.NOW,s=void 0===o?Date.now():o,u=n.clientOffset,l=void 0===u?0:u,c=me(e,"Period");if(!c.length)throw new Error(G);var f=be(e),h=Te([i],me(e,"BaseURL"));return f.sourceDuration=f.mediaPresentationDuration||0,f.NOW=s,f.clientOffset=l,H(c.map(function(e,t){return function(n,r){var i=Te(t,me(n,"BaseURL")),o=be(n),s=parseInt(o.id,10),u=a.a.isNaN(s)?r:s,l=W(e,{periodIndex:u}),c=me(n,"AdaptationSet"),f=we(n);return H(c.map(Se(l,i,f)))}}(f,h)))},ke=function(e){if(""===e)throw new Error(Y);var t=(new z.DOMParser).parseFromString(e,"application/xml"),n=t&&"MPD"===t.documentElement.tagName?t.documentElement:null;if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(X);return n},Ce=function(e,t){return void 0===t&&(t={}),se(Ee(ke(e),t).map(pe),t.sidxMapping)},xe=function(e){return function(e){var t=me(e,"UTCTiming")[0];if(!t)return null;var n=be(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(Q)}return n}(ke(e))},Oe=n(76),Pe=n.n(Oe),Ae=n(44),Re=n.n(Ae),Le=n(157),Ie=n.n(Le),De=n(158),Ne=n.n(De);var je=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Me=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Ue=null,Be=function(){function e(t){je(this,e),Ue||(Ue=function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],n=e[1],r=t[4],i=n[4],o=void 0,a=void 0,s=void 0,u=[],l=[],c=void 0,f=void 0,h=void 0,d=void 0,p=void 0;for(o=0;o<256;o++)l[(u[o]=o<<1^283*(o>>7))^o]=o;for(a=s=0;!r[a];a^=c||1,s=l[s]||1)for(h=(h=s^s<<1^s<<2^s<<3^s<<4)>>8^255&h^99,r[a]=h,i[h]=a,p=16843009*u[f=u[c=u[a]]]^65537*f^257*c^16843008*a,d=257*u[h]^16843008*h,o=0;o<4;o++)t[o][a]=d=d<<24^d>>>8,n[o][h]=p=p<<24^p>>>8;for(o=0;o<5;o++)t[o]=t[o].slice(0),n[o]=n[o].slice(0);return e}()),this._tables=[[Ue[0][0].slice(),Ue[0][1].slice(),Ue[0][2].slice(),Ue[0][3].slice(),Ue[0][4].slice()],[Ue[1][0].slice(),Ue[1][1].slice(),Ue[1][2].slice(),Ue[1][3].slice(),Ue[1][4].slice()]];var n=void 0,r=void 0,i=void 0,o=void 0,a=void 0,s=this._tables[0][4],u=this._tables[1],l=t.length,c=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");for(o=t.slice(0),a=[],this._key=[o,a],n=l;n<4*l+28;n++)i=o[n-1],(n%l==0||8===l&&n%l==4)&&(i=s[i>>>24]<<24^s[i>>16&255]<<16^s[i>>8&255]<<8^s[255&i],n%l==0&&(i=i<<8^i>>>24^c<<24,c=c<<1^283*(c>>7))),o[n]=o[n-l]^i;for(r=0;n;r++,n--)i=o[3&r?n:n-4],a[r]=n<=4||r<4?i:u[0][s[i>>>24]]^u[1][s[i>>16&255]]^u[2][s[i>>8&255]]^u[3][s[255&i]]}return e.prototype.decrypt=function(e,t,n,r,i,o){var a=this._key[1],s=e^a[0],u=r^a[1],l=n^a[2],c=t^a[3],f=void 0,h=void 0,d=void 0,p=a.length/4-2,m=void 0,y=4,g=this._tables[1],v=g[0],b=g[1],_=g[2],T=g[3],w=g[4];for(m=0;m<p;m++)f=v[s>>>24]^b[u>>16&255]^_[l>>8&255]^T[255&c]^a[y],h=v[u>>>24]^b[l>>16&255]^_[c>>8&255]^T[255&s]^a[y+1],d=v[l>>>24]^b[c>>16&255]^_[s>>8&255]^T[255&u]^a[y+2],c=v[c>>>24]^b[s>>16&255]^_[u>>8&255]^T[255&l]^a[y+3],y+=4,s=f,u=h,l=d;for(m=0;m<4;m++)i[(3&-m)+o]=w[s>>>24]<<24^w[u>>16&255]<<16^w[l>>8&255]<<8^w[255&c]^a[y++],f=s,s=u,u=l,l=c,c=f},e}(),Fe=function(){function e(){je(this,e),this.listeners={}}return e.prototype.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},e.prototype.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e].splice(n,1),n>-1},e.prototype.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),o=t.length,a=0;a<o;++a)t[a].apply(this,i)},e.prototype.dispose=function(){this.listeners={}},e.prototype.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),ze=function(e){function t(){je(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,Fe));return n.jobs=[],n.delay=1,n.timeout_=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},t.prototype.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(Fe),Ve=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},We=function(e,t,n){var r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),i=new Be(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),a=new Int32Array(o.buffer),s=void 0,u=void 0,l=void 0,c=void 0,f=void 0,h=void 0,d=void 0,p=void 0,m=void 0;for(s=n[0],u=n[1],l=n[2],c=n[3],m=0;m<r.length;m+=4)f=Ve(r[m]),h=Ve(r[m+1]),d=Ve(r[m+2]),p=Ve(r[m+3]),i.decrypt(f,h,d,p,a,m),a[m]=Ve(a[m]^s),a[m+1]=Ve(a[m+1]^u),a[m+2]=Ve(a[m+2]^l),a[m+3]=Ve(a[m+3]^c),s=f,u=h,l=d,c=p;return o},He=function(){function e(t,n,r,i){je(this,e);var o=e.STEP,a=new Int32Array(t.buffer),s=new Uint8Array(t.byteLength),u=0;for(this.asyncStream_=new ze,this.asyncStream_.push(this.decryptChunk_(a.subarray(u,u+o),n,r,s)),u=o;u<a.length;u+=o)r=new Uint32Array([Ve(a[u-4]),Ve(a[u-3]),Ve(a[u-2]),Ve(a[u-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(u,u+o),n,r,s));this.asyncStream_.push((function(){var e;i(null,(e=s).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return e.prototype.decryptChunk_=function(e,t,n,r){return function(){var i=We(e,t,n);r.set(i,e.byteOffset)}},Me(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}(),qe=[];var Ge=function e(t){var n,r="info",i=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n("log",r,t)};return n=function(e,t){return function(n,r,i){var o=t.levels[r],s=new RegExp("^("+o+")$");if("log"!==n&&i.unshift(n.toUpperCase()+":"),i.unshift(e+":"),qe){qe.push([].concat(i));var u=qe.length-1e3;qe.splice(0,u>0?u:0)}if(a.a.console){var l=a.a.console[n];l||"debug"!==n||(l=a.a.console.info||a.a.console.log),l&&o&&s.test(n)&&l[Array.isArray(i)?"apply":"call"](a.a.console,i)}}}(t,i),i.createLogger=function(n){return e(t+": "+n)},i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},i.level=function(e){if("string"==typeof e){if(!i.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},(i.history=function(){return qe?[].concat(qe):[]}).filter=function(e){return(qe||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},i.history.clear=function(){qe&&(qe.length=0)},i.history.disable=function(){null!==qe&&(qe.length=0,qe=null)},i.history.enable=function(){null===qe&&(qe=[])},i.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("error",r,t)},i.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("warn",r,t)},i.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("debug",r,t)},i}("VIDEOJS"),Ye=Ge.createLogger,Xe=Object.prototype.toString,Ke=function(e){return Je(e)?Object.keys(e):[]};function $e(e,t){Ke(e).forEach((function(n){return t(e[n],n)}))}function Qe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.assign?c.a.apply(void 0,[e].concat(n)):(n.forEach((function(t){t&&$e(t,(function(t,n){e[n]=t}))})),e)}function Je(e){return!!e&&"object"==typeof e}function Ze(e){return Je(e)&&"[object Object]"===Xe.call(e)&&e.constructor===Object}function et(e,t){if(!e||!t)return"";if("function"==typeof a.a.getComputedStyle){var n=a.a.getComputedStyle(e);return n?n.getPropertyValue(t)||n[t]:""}return""}function tt(e){return"string"==typeof e&&Boolean(e.trim())}function nt(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function rt(){return u.a===a.a.document}function it(e){return Je(e)&&1===e.nodeType}function ot(){try{return a.a.parent!==a.a.self}catch(e){return!0}}function at(e){return function(t,n){if(!tt(t))return u.a[e](null);tt(n)&&(n=u.a.querySelector(n));var r=it(n)?n:u.a;return r[e]&&r[e](t)}}function st(e,t,n,r){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var i=u.a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Ge.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+n+"."),i.setAttribute(e,n)):"textContent"===e?ut(i,n):i[e]!==n&&(i[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){i.setAttribute(e,n[e])})),r&&xt(i,r),i}function ut(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function lt(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function ct(e,t){return nt(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function ft(e,t){return e.classList?e.classList.add(t):ct(e,t)||(e.className=(e.className+" "+t).trim()),e}function ht(e,t){return e.classList?e.classList.remove(t):(nt(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function dt(e,t,n){var r=ct(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n!==r)return n?ft(e,t):ht(e,t),e}function pt(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];null==r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)}))}function mt(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var r=e.attributes,i=r.length-1;i>=0;i--){var o=r[i].name,a=r[i].value;"boolean"!=typeof e[o]&&-1===n.indexOf(","+o+",")||(a=null!==a),t[o]=a}return t}function yt(e,t){return e.getAttribute(t)}function gt(e,t,n){e.setAttribute(t,n)}function vt(e,t){e.removeAttribute(t)}function bt(){u.a.body.focus(),u.a.onselectstart=function(){return!1}}function _t(){u.a.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(et(e,"height"))),n.width||(n.width=parseFloat(et(e,"width"))),n}}function wt(e){var t;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var n=u.a.documentElement,r=u.a.body,i=n.clientLeft||r.clientLeft||0,o=a.a.pageXOffset||r.scrollLeft,s=t.left+o-i,l=n.clientTop||r.clientTop||0,c=a.a.pageYOffset||r.scrollTop,f=t.top+c-l;return{left:Math.round(s),top:Math.round(f)}}function St(e,t){var n={},r=wt(e),i=e.offsetWidth,o=e.offsetHeight,a=r.top,s=r.left,u=t.pageY,l=t.pageX;return t.changedTouches&&(l=t.changedTouches[0].pageX,u=t.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(a-u+o)/o)),n.x=Math.max(0,Math.min(1,(l-s)/i)),n}function Et(e){return Je(e)&&3===e.nodeType}function kt(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Ct(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),it(e)||Et(e)?e:"string"==typeof e&&/\S/.test(e)?u.a.createTextNode(e):void 0})).filter((function(e){return e}))}function xt(e,t){return Ct(t).forEach((function(t){return e.appendChild(t)})),e}function Ot(e,t){return xt(kt(e),t)}function Pt(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 At,Rt=at("querySelector"),Lt=at("querySelectorAll"),It=Object.freeze({__proto__:null,isReal:rt,isEl:it,isInFrame:ot,createEl:st,textContent:ut,prependTo:lt,hasClass:ct,addClass:ft,removeClass:ht,toggleClass:dt,setAttributes:pt,getAttributes:mt,getAttribute:yt,setAttribute:gt,removeAttribute:vt,blockTextSelection:bt,unblockTextSelection:_t,getBoundingClientRect:Tt,findPosition:wt,getPointerPosition:St,isTextNode:Et,emptyEl:kt,normalizeContent:Ct,appendContent:xt,insertContent:Ot,isSingleLeftClick:Pt,$:Rt,$$:Lt}),Dt=!1,Nt=function(){if(rt()&&!1!==At.options.autoSetup){var e=Array.prototype.slice.call(u.a.getElementsByTagName("video")),t=Array.prototype.slice.call(u.a.getElementsByTagName("audio")),n=Array.prototype.slice.call(u.a.getElementsByTagName("video-js")),r=e.concat(t,n);if(r&&r.length>0)for(var i=0,o=r.length;i<o;i++){var a=r[i];if(!a||!a.getAttribute){jt(1);break}void 0===a.player&&null!==a.getAttribute("data-setup")&&At(a)}else Dt||jt(1)}};function jt(e,t){t&&(At=t),a.a.setTimeout(Nt,e)}function Mt(){Dt=!0,a.a.removeEventListener("load",Mt)}rt()&&("complete"===u.a.readyState?Mt():a.a.addEventListener("load",Mt));var Ut,Bt=function(e){var t=u.a.createElement("style");return t.className=e,t},Ft=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},zt=3;function Vt(){return zt++}a.a.WeakMap||(Ut=function(){function e(){this.vdata="vdata"+Math.floor(a.a.performance&&a.a.performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var n=e[this.vdata]||Vt();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];Ge("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,Ht=a.a.WeakMap?new WeakMap:new Ut;function qt(e,t){if(Ht.has(e)){var n=Ht.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&&Ht.delete(e)}}function Gt(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function Yt(e){if(e.fixed_)return e;function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped){var r=e||a.a.event;for(var i in e={},r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(e[i]=r[i]));if(e.target||(e.target=e.srcElement||u.a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var o=u.a.documentElement,s=u.a.body;e.pageX=e.clientX+(o&&o.scrollLeft||s&&s.scrollLeft||0)-(o&&o.clientLeft||s&&s.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||s&&s.scrollTop||0)-(o&&o.clientTop||s&&s.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 Xt=["touchstart","touchmove"];function Kt(e,t,n){if(Array.isArray(t))return Gt(Kt,e,t,n);Ht.has(e)||Ht.set(e,{});var r=Ht.get(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=Vt()),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=Yt(t);var i=r.handlers[t.type];if(i)for(var o=i.slice(0),a=0,s=o.length;a<s&&!t.isImmediatePropagationStopped();a++)try{o[a].call(e,t,n)}catch(e){Ge.error(e)}}}),1===r.handlers[t].length)if(e.addEventListener){var i=!1;(function(){if("boolean"!=typeof Wt){Wt=!1;try{var e=Object.defineProperty({},"passive",{get:function(){Wt=!0}});a.a.addEventListener("test",null,e),a.a.removeEventListener("test",null,e)}catch(e){}}return Wt})()&&Xt.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function $t(e,t,n){if(Ht.has(e)){var r=Ht.get(e);if(r.handlers){if(Array.isArray(t))return Gt($t,e,t,n);var i=function(e,t){r.handlers[t]=[],qt(e,t)};if(void 0!==t){var o=r.handlers[t];if(o)if(n){if(n.guid)for(var a=0;a<o.length;a++)o[a].guid===n.guid&&o.splice(a--,1);qt(e,t)}else i(e,t)}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(e,s)}}}function Qt(e,t,n){var r=Ht.has(e)?Ht.get(e):{},i=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Yt(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)Qt.call(null,i,t,n);else if(!i&&!t.defaultPrevented&&t.target&&t.target[t.type]){Ht.has(t.target)||Ht.set(t.target,{});var o=Ht.get(t.target);t.target[t.type]&&(o.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),o.disabled=!1)}return!t.defaultPrevented}function Jt(e,t,n){if(Array.isArray(t))return Gt(Jt,e,t,n);var r=function r(){$t(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Vt(),Kt(e,t,r)}function Zt(e,t,n){var r=function r(){$t(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Vt(),Kt(e,t,r)}var en,tn=Object.freeze({__proto__:null,fixEvent:Yt,on:Kt,off:$t,trigger:Qt,one:Jt,any:Zt}),nn=function(e,t,n){t.guid||(t.guid=Vt());var r=t.bind(e);return r.guid=n?n+"_"+t.guid:t.guid,r},rn=function(e,t){var n=a.a.performance.now();return function(){var r=a.a.performance.now();r-n>=t&&(e.apply(void 0,arguments),n=r)}},on=function(){};on.prototype.allowedEvents_={},on.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Kt(this,e,t),this.addEventListener=n},on.prototype.addEventListener=on.prototype.on,on.prototype.off=function(e,t){$t(this,e,t)},on.prototype.removeEventListener=on.prototype.off,on.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Jt(this,e,t),this.addEventListener=n},on.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Zt(this,e,t),this.addEventListener=n},on.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=Yt(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Qt(this,e)},on.prototype.dispatchEvent=on.prototype.trigger,on.prototype.queueTrigger=function(e){var t=this;en||(en=new Map);var n=e.type||e,r=en.get(this);r||(r=new Map,en.set(this,r));var i=r.get(n);r.delete(n),a.a.clearTimeout(i);var o=a.a.setTimeout((function(){0===r.size&&(r=null,en.delete(t)),t.trigger(e)}),0);r.set(n,o)};var an=function(e){return e instanceof on||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},sn=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},un=function(e){if(!e.nodeName&&!an(e))throw new Error("Invalid target; must be a DOM node or evented object.")},ln=function(e){if(!sn(e))throw new Error("Invalid event type; must be a non-empty string or array.")},cn=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},fn=function(e,t){var n,r,i,o=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return o?(n=e.eventBusEl_,t.length>=3&&t.shift(),r=t[0],i=t[1]):(n=t[0],r=t[1],i=t[2]),un(n),ln(r),cn(i),{isTargetingSelf:o,target:n,type:r,listener:i=nn(e,i)}},hn=function(e,t,n,r){un(e),e.nodeName?tn[t](e,n,r):e[t](n,r)},dn={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=fn(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(hn(a,"on",s,u),!o){var l=function(){return e.off(a,s,u)};l.guid=u.guid;var c=function(){return e.off("dispose",l)};c.guid=u.guid,hn(this,"on","dispose",l),hn(a,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=fn(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)hn(a,"one",s,u);else{var l=function t(){e.off(a,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};l.guid=u.guid,hn(a,"one",s,l)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=fn(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)hn(a,"any",s,u);else{var l=function t(){e.off(a,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};l.guid=u.guid,hn(a,"any",s,l)}},off:function(e,t,n){if(!e||sn(e))$t(this.eventBusEl_,e,t);else{var r=e,i=t;un(r),ln(i),cn(n),n=nn(this,n),this.off("dispose",n),r.nodeName?($t(r,i,n),$t(r,"dispose",n)):an(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){return Qt(this.eventBusEl_,e,t)}};function pn(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_=st("span",{className:"vjs-event-bus"});return Qe(e,dn),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()})),e.on("dispose",(function(){e.off(),a.a.setTimeout((function(){e.eventBusEl_=null}),0)})),e}var mn={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),$e(e,(function(e,r){n.state[r]!==e&&((t=t||{})[r]={from:n.state[r],to:e}),n.state[r]=e})),t&&an(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function yn(e,t){return Qe(e,mn),e.state=Qe({},e.state,t),"function"==typeof e.handleStateChanged&&an(e)&&e.on("statechanged",e.handleStateChanged),e}var gn=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},vn=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function bn(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&$e(t,(function(t,n){Ze(t)?(Ze(e[n])||(e[n]={}),e[n]=bn(e[n],t)):e[n]=t}))})),e}var _n=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_=bn({},this.options_),t=this.options_=bn(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var r=e&&e.id&&e.id()||"no_player";this.id_=r+"_component_"+Vt()}var i;this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&pn(this,{eventBusKey:this.el_?"el_":null}),yn(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},a.a.Set||(i=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}()),this.setTimeoutIds_=a.a.Set?new Set:new i,this.setIntervalIds_=a.a.Set?new Set:new i,this.rafIds_=a.a.Set?new Set:new i,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.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_),Ht.has(this.el_)&&Ht.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_=bn(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return st(e,t,n)},t.localize=function(e,t,n){void 0===n&&(n=e);var r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],a=r&&r.split("-")[0],s=i&&i[a],u=n;return o&&o[e]?u=o[e]:s&&s[e]&&(u=s[e]),t&&(u=u.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],i=r;return void 0===r&&(i=e),i}))),u},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(e){return this.childIndex_[e]},t.getChild=function(e){if(e)return this.childNameIndex_[e]},t.getDescendant=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reduce((function(e,t){return e.concat(t)}),[]);for(var r=this,i=0;i<t.length;i++)if(!(r=r.getChild(t[i]))||!r.getChild)return;return r},t.addChild=function(t,n,r){var i,o;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"==typeof t){o=vn(t);var a=n.componentClass||o;n.name=o;var s=e.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,n)}else i=t;if(i.parentComponent_&&i.parentComponent_.removeChild(i),this.children_.splice(r,0,i),i.parentComponent_=this,"function"==typeof i.id&&(this.childIndex_[i.id()]=i),(o=o||i.name&&vn(i.name()))&&(this.childNameIndex_[o]=i,this.childNameIndex_[gn(o)]=i),"function"==typeof i.el&&i.el()){var u=null;this.children_[r+1]&&(this.children_[r+1].el_?u=this.children_[r+1].el_:it(this.children_[r+1])&&(u=this.children_[r+1])),this.contentEl().insertBefore(i.el(),u)}return i},t.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[vn(e.name())]=null,this.childNameIndex_[gn(e.name())]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var r,i=this.options_,o=e.getComponent("Tech");(r=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!r.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var r,i;return"string"==typeof e?i=n[r=e]||t.options_[r]||{}:(r=e.name,i=e),{name:r,opts:i}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||vn(t.name));return n&&!o.isTech(n)})).forEach((function(e){var n=e.name,r=e.opts;if(void 0!==i[n]&&(r=i[n]),!1!==r){!0===r&&(r={}),r.playerOptions=t.options_.playerOptions;var o=t.addChild(n,r);o&&(t[n]=o)}}))}},t.buildCSSClass=function(){return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},t.$=function(e,t){return Rt(e,t||this.contentEl())},t.$$=function(e,t){return Lt(e,t||this.contentEl())},t.hasClass=function(e){return ct(this.el_,e)},t.addClass=function(e){ft(this.el_,e)},t.removeClass=function(e){ht(this.el_,e)},t.toggleClass=function(e,t){dt(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 yt(this.el_,e)},t.setAttribute=function(e,t){gt(this.el_,e,t)},t.removeAttribute=function(e){vt(this.el_,e)},t.width=function(e,t){return this.dimension("width",e,t)},t.height=function(e,t){return this.dimension("height",e,t)},t.dimensions=function(e,t){this.width(e,!0),this.height(t)},t.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+vn(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=et(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+vn(e);t=this.el_[n]}return t},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e){this.handleKeyDown(e)},t.emitTapEvents=function(){var e,t=0,n=null;this.on("touchstart",(function(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=a.a.performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(n){var r=t.touches[0].pageX-n.pageX,i=t.touches[0].pageY-n.pageY;Math.sqrt(r*r+i*i)>10&&(e=!1)}}));var r=function(){e=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){(n=null,!0===e)&&(a.a.performance.now()-t<200&&(r.preventDefault(),this.trigger("tap")))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=nn(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.setTimeout=function(e,t){var n,r=this;return e=nn(this,e),this.clearTimersOnDispose_(),n=a.a.setTimeout((function(){r.setTimeoutIds_.has(n)&&r.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),a.a.clearTimeout(e)),e},t.setInterval=function(e,t){e=nn(this,e),this.clearTimersOnDispose_();var n=a.a.setInterval(e,t);return this.setIntervalIds_.add(n),n},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),a.a.clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=nn(this,e),t=a.a.requestAnimationFrame((function(){n.rafIds_.has(t)&&n.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},t.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),a.a.cancelAnimationFrame(e)),e):this.clearTimeout(e)},t.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var n=t[0],r=t[1];e[n].forEach(e[r],e)})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var r,i=e.getComponent("Tech"),o=i&&i.isTech(n),a=e===n||e.prototype.isPrototypeOf(n.prototype);if(o||!a)throw r=o?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+r+".");t=vn(t),e.components_||(e.components_={});var s=e.getComponent("Player");if("Player"===t&&s&&s.players){var u=s.players,l=Object.keys(u);if(u&&l.length>0&&l.map((function(e){return u[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[gn(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();_n.prototype.supportsRaf_="function"==typeof a.a.requestAnimationFrame&&"function"==typeof a.a.cancelAnimationFrame,_n.registerComponent("Component",_n);var Tn,wn=a.a.navigator&&a.a.navigator.userAgent||"",Sn=/AppleWebKit\/([\d.]+)/i.exec(wn),En=Sn?parseFloat(Sn.pop()):null,kn=/iPod/i.test(wn),Cn=(Tn=wn.match(/OS (\d+)_/i))&&Tn[1]?Tn[1]:null,xn=/Android/i.test(wn),On=function(){var e=wn.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}(),Pn=xn&&On<5&&En<537,An=/Firefox/i.test(wn),Rn=/Edg/i.test(wn),Ln=!Rn&&(/Chrome/i.test(wn)||/CriOS/i.test(wn)),In=function(){var e=wn.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),Dn=function(){var e=/MSIE\s(\d+)\.\d/.exec(wn),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(wn)&&/rv:11.0/.test(wn)&&(t=11),t}(),Nn=/Safari/i.test(wn)&&!Ln&&!xn&&!Rn,jn=/Windows/i.test(wn),Mn=rt()&&("ontouchstart"in a.a||a.a.navigator.maxTouchPoints||a.a.DocumentTouch&&a.a.document instanceof a.a.DocumentTouch),Un=/iPad/i.test(wn)||Nn&&Mn&&!/iPhone/i.test(wn),Bn=/iPhone/i.test(wn)&&!Un,Fn=Bn||Un||kn,zn=(Nn||Fn)&&!Ln,Vn=Object.freeze({__proto__:null,IS_IPOD:kn,IOS_VERSION:Cn,IS_ANDROID:xn,ANDROID_VERSION:On,IS_NATIVE_ANDROID:Pn,IS_FIREFOX:An,IS_EDGE:Rn,IS_CHROME:Ln,CHROME_VERSION:In,IE_VERSION:Dn,IS_SAFARI:Nn,IS_WINDOWS:jn,TOUCH_ENABLED:Mn,IS_IPAD:Un,IS_IPHONE:Bn,IS_IOS:Fn,IS_ANY_SAFARI:zn});function Wn(e,t,n,r){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,r,n.length-1),n[r][t]}function Hn(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:Wn.bind(null,"start",0,e),end:Wn.bind(null,"end",1,e)}}function qn(e,t){return Array.isArray(e)?Hn(e):void 0===e||void 0===t?Hn():Hn([[e,t]])}function Gn(e,t){var n,r,i=0;if(!t)return 0;e&&e.length||(e=qn(0,0));for(var o=0;o<e.length;o++)n=e.start(o),(r=e.end(o))>t&&(r=t),i+=r-n;return i/t}for(var Yn,Xn={prefixed:!0},Kn=[["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"]],$n=Kn[0],Qn=0;Qn<Kn.length;Qn++)if(Kn[Qn][1]in u.a){Yn=Kn[Qn];break}if(Yn){for(var Jn=0;Jn<Yn.length;Jn++)Xn[$n[Jn]]=Yn[Jn];Xn.prefixed=Yn[0]!==$n[0]}function Zn(e){if(e instanceof Zn)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:Je(e)&&("number"==typeof e.code&&(this.code=e.code),Qe(this,e)),this.message||(this.message=Zn.defaultMessages[this.code]||"")}Zn.prototype.code=0,Zn.prototype.message="",Zn.prototype.status=null,Zn.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Zn.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var er=0;er<Zn.errorTypes.length;er++)Zn[Zn.errorTypes[er]]=er,Zn.prototype[Zn.errorTypes[er]]=er;function tr(e){return null!=e&&"function"==typeof e.then}function nr(e){tr(e)&&e.then(null,(function(e){}))}var rr=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,r){return e[n]&&(t[n]=e[n]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},ir=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track}));return Array.prototype.map.call(t,(function(e){var t=rr(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(rr))},or=function(e,t){return e.forEach((function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return n.addCue(e)}))})),t.textTracks()},ar=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=st("div",{className:"vjs-modal-dialog-content"},{role:"document"}),r.descEl_=st("p",{className:"vjs-modal-dialog-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),ut(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}p()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},n.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+e.prototype.buildCSSClass.call(this)},n.label=function(){return this.localize(this.options_.label||"Modal Window")},n.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},n.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},n.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},n.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},n.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close)}!t&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},n.fill=function(){this.fillWith(this.content())},n.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),Ot(t,e),this.trigger("modalfill"),r?n.insertBefore(t,r):n.appendChild(t);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},n.empty=function(){this.trigger("beforemodalempty"),kt(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return void 0!==e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=u.a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},n.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},n.handleKeyDown=function(e){if(e.stopPropagation(),v.a.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(v.a.isEventKey(e,"Tab")){for(var t,n=this.focusableEls_(),r=this.el_.querySelector(":focus"),i=0;i<n.length;i++)if(r===n[i]){t=i;break}u.a.activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(n[n.length-1].focus(),e.preventDefault()):e.shiftKey||t!==n.length-1||(n[0].focus(),e.preventDefault())}},n.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof a.a.HTMLAnchorElement||e instanceof a.a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof a.a.HTMLInputElement||e instanceof a.a.HTMLSelectElement||e instanceof a.a.HTMLTextAreaElement||e instanceof a.a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof a.a.HTMLIFrameElement||e instanceof a.a.HTMLObjectElement||e instanceof a.a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(_n);ar.prototype.options_={pauseOnOpen:!0,temporary:!0},_n.registerComponent("ModalDialog",ar);var sr=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty(h()(n),"length",{get:function(){return this.tracks_.length}});for(var r=0;r<t.length;r++)n.addTrack(t[r]);return n}p()(t,e);var n=t.prototype;return n.addTrack=function(e){var t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this}))},n.removeTrack=function(e){for(var t,n=0,r=this.length;n<r;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},n.getTrackById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},t}(on);for(var ur in sr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},sr.prototype.allowedEvents_)sr.prototype["on"+ur]=null;var lr=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},cr=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].enabled){lr(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,n}p()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&lr(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,lr(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}(sr),fr=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)},hr=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].selected){fr(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(h()(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}p()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&fr(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,fr(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}(sr),dr=function(e){function t(){return e.apply(this,arguments)||this}p()(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}(sr),pr=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},t.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),mr=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(e){var t=this.length||0,n=0,r=e.length;this.cues_=e,this.length_=e.length;var i=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<r)for(n=t;n<r;n++)i.call(this,n)},t.getCueById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},e}(),yr={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},gr={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},vr={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},br={disabled:"disabled",hidden:"hidden",showing:"showing"},_r=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var r={id:t.id||"vjs_track_"+Vt(),kind:t.kind||"",label:t.label||"",language:t.language||""},i=function(e){Object.defineProperty(h()(n),e,{get:function(){return r[e]},set:function(){}})};for(var o in r)i(o);return n}return p()(t,e),t}(on),Tr=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=u.a.createElement("a");n.href=e;var r,i=""===n.host&&"file:"!==n.protocol;i&&((r=u.a.createElement("div")).innerHTML='<a href="'+e+'"></a>',n=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),u.a.body.appendChild(r));for(var o={},s=0;s<t.length;s++)o[t[s]]=n[t[s]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=a.a.location.protocol),i&&u.a.body.removeChild(r),o},wr=function(e){if(!e.match(/^https?:\/\//)){var t=u.a.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},Sr=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},Er=function(e,t){void 0===t&&(t=a.a.location);var n=Tr(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},kr=Object.freeze({__proto__:null,parseUrl:Tr,getAbsoluteURL:wr,getFileExtension:Sr,isCrossOrigin:Er}),Cr=function(e,t){var n=new a.a.WebVTT.Parser(a.a,a.a.vttjs,a.a.WebVTT.StringDecoder()),r=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),r.length>0&&(a.a.console&&a.a.console.groupCollapsed&&a.a.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return Ge.error(e)})),a.a.console&&a.a.console.groupEnd&&a.a.console.groupEnd()),n.flush()},xr=function(e,t){var n={uri:e},r=Er(e);r&&(n.cors=r),_()(n,nn(this,(function(e,n,r){if(e)return Ge.error(e,n);t.loaded_=!0,"function"!=typeof a.a.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return Cr(r,t);Ge.error("vttjs failed to load, stopping trying to process "+t.src)})):Cr(r,t)})))},Or=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var r=bn(t,{kind:vr[t.kind]||"subtitles",language:t.language||t.srclang||""}),i=br[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(i="hidden"),(n=e.call(this,r)||this).tech_=r.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var a=new mr(n.cues_),s=new mr(n.activeCues_),u=!1,l=nn(h()(n),(function(){this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1)}));return"disabled"!==i&&n.tech_.ready((function(){n.tech_.on("timeupdate",l)}),!0),Object.defineProperties(h()(n),{default:{get:function(){return o},set:function(){}},mode:{get:function(){return i},set:function(e){var t=this;br[e]&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||xr(this.src,this),"disabled"!==i?this.tech_.ready((function(){t.tech_.on("timeupdate",l)}),!0):this.tech_.off("timeupdate",l),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];(i.startTime<=e&&i.endTime>=e||i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e)&&t.push(i)}if(u=!1,t.length!==this.activeCues_.length)u=!0;else for(var o=0;o<t.length;o++)-1===this.activeCues_.indexOf(t[o])&&(u=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set:function(){}}}),r.src?(n.src=r.src,n.preload_||(n.loaded_=!0),(n.preload_||o||"subtitles"!==r.kind&&"captions"!==r.kind)&&xr(n.src,h()(n))):n.loaded_=!0,n}p()(t,e);var n=t.prototype;return n.addCue=function(e){var t=e;if(a.a.vttjs&&!(e instanceof a.a.vttjs.VTTCue)){for(var n in t=new a.a.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},n.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(_r);Or.prototype.allowedEvents_={cuechange:"cuechange"};var Pr=function(e){function t(t){var n;void 0===t&&(t={});var r=bn(t,{kind:gr[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(h()(n),"enabled",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),r.enabled&&(n.enabled=r.enabled),n.loaded_=!0,n}return p()(t,e),t}(_r),Ar=function(e){function t(t){var n;void 0===t&&(t={});var r=bn(t,{kind:yr[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(h()(n),"selected",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),r.selected&&(n.selected=r.selected),n}return p()(t,e),t}(_r),Rr=function(e){function t(t){var n,r;void 0===t&&(t={}),n=e.call(this)||this;var i=new Or(t);return n.kind=i.kind,n.src=i.src,n.srclang=i.language,n.label=i.label,n.default=i.default,Object.defineProperties(h()(n),{readyState:{get:function(){return r}},track:{get:function(){return i}}}),r=0,i.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:h()(n)})})),n}return p()(t,e),t}(on);Rr.prototype.allowedEvents_={load:"load"},Rr.NONE=0,Rr.LOADING=1,Rr.LOADED=2,Rr.ERROR=3;var Lr={audio:{ListClass:cr,TrackClass:Pr,capitalName:"Audio"},video:{ListClass:hr,TrackClass:Ar,capitalName:"Video"},text:{ListClass:dr,TrackClass:Or,capitalName:"Text"}};Object.keys(Lr).forEach((function(e){Lr[e].getterName=e+"Tracks",Lr[e].privateName=e+"Tracks_"}));var Ir={remoteText:{ListClass:dr,TrackClass:Or,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:pr,TrackClass:Rr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Dr=c()({},Lr,Ir);Ir.names=Object.keys(Ir),Lr.names=Object.keys(Lr),Dr.names=[].concat(Ir.names).concat(Lr.names);var Nr=function(e){function t(t,n){var r;return void 0===t&&(t={}),void 0===n&&(n=function(){}),t.reportTouchActivity=!1,(r=e.call(this,null,t,n)||this).hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),Dr.names.forEach((function(e){var n=Dr[e];t&&t[n.getterName]&&(r[n.privateName]=t[n.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===t["native"+e+"Tracks"]&&(r["featuresNative"+e+"Tracks"]=!1)})),!1===t.nativeCaptions||!1===t.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.preloadTextTracks=!1!==t.preloadTextTracks,r.autoRemoteTextTracks_=new Dr.text.ListClass,r.initTrackListeners(),t.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}p()(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(nn(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 qn(0,0)},n.bufferedPercent=function(){return Gn(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(Lr.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},n.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===e&&t.removeRemoteTextTrack(i),n.removeTrack(i)}}))},n.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.error=function(e){return void 0!==e&&(this.error_=new Zn(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?qn(0,0):qn()},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTrackListeners=function(){var e=this;Lr.names.forEach((function(t){var n=Lr[t],r=function(){e.trigger(t+"trackchange")},i=e[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),e.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},n.addWebVttScript_=function(){var e=this;if(!a.a.WebVTT)if(u.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&Ze(w.a)&&Object.keys(w.a).length>0)return void this.trigger("vttjsloaded");var t=u.a.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),a.a.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return e.trigger("texttrackchange")},a=function(){o();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",o),"showing"===n.mode&&n.addEventListener("cuechange",o)}};a(),t.addEventListener("change",a),t.addEventListener("addtrack",a),t.addEventListener("removetrack",a),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",a),t.removeEventListener("addtrack",a),t.removeEventListener("removetrack",a);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",o)}}))},n.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,r,i){void 0===i&&(i={});var o=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var a=new Dr.text.TrackClass(i);return o.addTrack(a),a}(this,e,t,n)},n.createRemoteTextTrack=function(e){var t=bn(e,{tech:this});return new Ir.remoteTextEl.TrackClass(t)},n.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var r=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(Ge.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==t&&this.ready((function(){return n.autoRemoteTextTracks_.addTrack(r.track)})),r},n.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},n.getVideoPlaybackQuality=function(){return{}},n.requestPictureInPicture=function(){var e=this.options_.Promise||a.a.Promise;if(e)return e.reject()},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=vn(e),t.techs_[e]=n,t.techs_[gn(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=vn(e),a.a&&a.a.videojs&&a.a.videojs[e]?(Ge.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),a.a.videojs[e]):void 0)},t}(_n);Dr.names.forEach((function(e){var t=Dr[e];Nr.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Nr.prototype.featuresVolumeControl=!0,Nr.prototype.featuresMuteControl=!0,Nr.prototype.featuresFullscreenResize=!1,Nr.prototype.featuresPlaybackRate=!1,Nr.prototype.featuresProgressEvents=!1,Nr.prototype.featuresSourceset=!1,Nr.prototype.featuresTimeupdateEvents=!1,Nr.prototype.featuresNativeTextTracks=!1,Nr.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n,r=e.sourceHandlers||[],i=0;i<r.length;i++)if(n=r[i].canPlayType(t))return n;return""},e.selectSourceHandler=function(t,n){for(var r=e.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(t,n))return r[i];return null},e.canPlaySource=function(t,n){var r=e.selectSourceHandler(t,n);return r?r.canHandleSource(t,n):""};["seekable","seeking","duration"].forEach((function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:Ge.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)}},_n.registerComponent("Tech",Nr),Nr.registerTech("Tech",Nr),Nr.defaultTechOrder_=[];var jr={},Mr={},Ur={};function Br(e,t,n){e.setTimeout((function(){return function e(t,n,r,i,o,a){void 0===t&&(t={});void 0===n&&(n=[]);void 0===o&&(o=[]);void 0===a&&(a=!1);var s=n,u=s[0],l=s.slice(1);if("string"==typeof u)e(t,jr[u],r,i,o,a);else if(u){var c=function(e,t){var n=Mr[e.id()],r=null;if(null==n)return r=t(e),Mr[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var o=n[i],a=o[0],s=o[1];a===t&&(r=s)}null===r&&(r=t(e),n.push([t,r]));return r}(i,u);if(!c.setSource)return o.push(c),e(t,l,r,i,o,a);c.setSource(Qe({},t),(function(n,s){if(n)return e(t,l,r,i,o,a);o.push(c),e(s,t.type===s.type?l:jr[s.type],r,i,o,a)}))}else l.length?e(t,l,r,i,o,a):a?r(t,o):e(t,jr["*"],r,i,o,!0)}(t,jr[t.type],n,e)}),1)}function Fr(e,t,n,r){void 0===r&&(r=null);var i="call"+vn(n),o=e.reduce(Hr(i),r),a=o===Ur,s=a?null:t[n](o);return function(e,t,n,r){for(var i=e.length-1;i>=0;i--){var o=e[i];o[t]&&o[t](r,n)}}(e,n,s,a),s}var zr={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},Vr={setCurrentTime:1,setMuted:1,setVolume:1},Wr={play:1,pause:1};function Hr(e){return function(t,n){return t===Ur?Ur:n[e]?n[e](t):t}}var qr={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",oga:"audio/ogg",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Gr=function(e){void 0===e&&(e="");var t=Sr(e);return qr[t.toLowerCase()]||""};function Yr(e){if(!e.type){var t=Gr(e.src);t&&(e.type=t)}return e}var Xr=function(e){function t(t,n,r){var i,o=bn({createEl:!1},n);if(i=e.call(this,t,o,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var a=0,s=n.playerOptions.techOrder;a<s.length;a++){var u=vn(s[a]),l=Nr.getTech(u);if(u||(l=_n.getComponent(u)),l&&l.isSupported()){t.loadTech_(u);break}}return i}return p()(t,e),t}(_n);_n.registerComponent("MediaLoader",Xr);var Kr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).emitTapEvents(),r.enable(),r}p()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){void 0===t&&(t="div"),void 0===n&&(n={}),void 0===r&&(r={}),n=Qe({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&Ge.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=Qe({role:"button"},r),this.tabIndex_=n.tabIndex;var i=e.prototype.createEl.call(this,t,n,r);return this.createControlTextEl(i),i},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=st("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,ut(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.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},n.handleKeyDown=function(t){v.a.isEventKey(t,"Space")||v.a.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(_n);_n.registerComponent("ClickableComponent",Kr);var $r=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update(),t.on("posterchange",nn(h()(r),r.update)),r}p()(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 st("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)||(Dn||Rn)&&t||this.player_.tech(!0).focus(),this.player_.paused()?nr(this.player_.play()):this.player_.pause()}},t}(Kr);_n.registerComponent("PosterImage",$r);var Qr={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 Jr(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function Zr(e,t,n){try{e.style[t]=n}catch(e){return}}var ei=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=nn(h()(i),i.updateDisplay);return t.on("loadstart",nn(h()(i),i.toggleDisplay)),t.on("texttrackchange",o),t.on("loadedmetadata",nn(h()(i),i.preselectTrack)),t.ready(nn(h()(i),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",o),t.on("playerresize",o),a.a.addEventListener("orientationchange",o),t.on("dispose",(function(){return a.a.removeEventListener("orientationchange",o)}));for(var e=this.options_.playerOptions.tracks||[],n=0;n<e.length;n++)this.player_.addRemoteTextTrack(e[n],!0);this.preselectTrack()}}))),i}p()(t,e);var n=t.prototype;return n.preselectTrack=function(){for(var e,t,n,r={captions:1,subtitles:1},i=this.player_.textTracks(),o=this.player_.cache_.selectedLanguage,a=0;a<i.length;a++){var s=i[a];o&&o.enabled&&o.language&&o.language===s.language&&s.kind in r?s.kind===o.kind?n=s:n||(n=s):o&&!o.enabled?(n=null,e=null,t=null):s.default&&("descriptions"!==s.kind||e?s.kind in r&&!t&&(t=s):e=s)}n?n.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},n.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"==typeof a.a.WebVTT&&a.a.WebVTT.processCues(a.a,[],this.el_)},n.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var n=[],r=0;r<e.length;++r){var i=e[r];"showing"===i.mode&&n.push(i)}this.updateForTrack(n)}else{for(var o=null,a=null,s=e.length;s--;){var u=e[s];"showing"===u.mode&&("descriptions"===u.kind?o=u:a=u)}a?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(a)):o&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(o))}},n.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;r--;){var i=n[r];if(i){var o=i.displayState;if(t.color&&(o.firstChild.style.color=t.color),t.textOpacity&&Zr(o.firstChild,"color",Jr(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(o.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Zr(o.firstChild,"backgroundColor",Jr(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Zr(o,"backgroundColor",Jr(t.windowColor,t.windowOpacity)):o.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?o.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===t.edgeStyle&&(o.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),t.fontPercent&&1!==t.fontPercent){var s=a.a.parseFloat(o.style.fontSize);o.style.fontSize=s*t.fontPercent+"px",o.style.height="auto",o.style.top="auto",o.style.bottom="2px"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=Qr[t.fontFamily])}}},n.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof a.a.WebVTT&&!e.every((function(e){return!e.activeCues}))){for(var t=[],n=0;n<e.length;++n)for(var r=e[n],i=0;i<r.activeCues.length;++i)t.push(r.activeCues[i]);a.a.WebVTT.processCues(a.a,t,this.el_);for(var o=0;o<e.length;++o){for(var s=e[o],u=0;u<s.activeCues.length;++u){var l=s.activeCues[u].displayState;ft(l,"vjs-text-track-cue"),ft(l,"vjs-text-track-cue-"+(s.language?s.language:o))}this.player_.textTrackSettings&&this.updateDisplayState(s)}}},t}(_n);_n.registerComponent("TextTrackDisplay",ei);var ti=function(e){function t(){return e.apply(this,arguments)||this}return p()(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),r=st("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[n])}),i=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i},t}(_n);_n.registerComponent("LoadingSpinner",ti);var ni=function(e){function t(){return e.apply(this,arguments)||this}p()(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={}),t=Qe({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=Qe({type:"button"},n);var r=_n.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(r),r},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return Ge.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),_n.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){v.a.isEventKey(t,"Space")||v.a.isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(Kr);_n.registerComponent("Button",ni);var ri=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).mouseused_=!1,r.on("mousedown",r.handleMouseDown),r}p()(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 nr(t),void(!this.player_.tech(!0)||(Dn||Rn)&&n||this.player_.tech(!0).focus())}var r=this.player_.getChild("controlBar"),i=r&&r.getChild("playToggle");if(i){var o=function(){return i.focus()};tr(t)?t.then(o,(function(){})):this.setTimeout(o,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(ni);ri.prototype.controlText_="Play Video",_n.registerComponent("BigPlayButton",ri);var ii=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}p()(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){v.a.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(ni);_n.registerComponent("CloseButton",ii);var oi=function(e){function t(t,n){var r;return void 0===n&&(n={}),r=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,r.on(t,"play",r.handlePlay),r.on(t,"pause",r.handlePause),n.replay&&r.on(t,"ended",r.handleEnded),r}p()(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}(ni);oi.prototype.controlText_="Play",_n.registerComponent("PlayToggle",oi);var ai=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},si=ai;function ui(e,t){return void 0===t&&(t=e),si(e,t)}var li=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["timeupdate","ended"],r.updateContent),r.updateTextNode_(),r}p()(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_=st("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=ui(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestAnimationFrame((function(){if(t.contentEl_){var e=t.textNode_;t.textNode_=u.a.createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},n.updateContent=function(e){},t}(_n);li.prototype.labelText_="Time",li.prototype.controlText_="Time",_n.registerComponent("TimeDisplay",li);var ci=function(e){function t(){return e.apply(this,arguments)||this}p()(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}(li);ci.prototype.labelText_="Current Time",ci.prototype.controlText_="Current Time",_n.registerComponent("CurrentTimeDisplay",ci);var fi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",r.updateContent),r.on(t,"loadstart",r.updateContent),r.on(t,"loadedmetadata",r.updateContent),r}p()(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}(li);fi.prototype.labelText_="Duration",fi.prototype.controlText_="Duration",_n.registerComponent("DurationDisplay",fi);var hi=function(e){function t(){return e.apply(this,arguments)||this}return p()(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}(_n);_n.registerComponent("TimeDivider",hi);var di=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",r.updateContent),r}p()(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(st("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}(li);di.prototype.labelText_="Remaining Time",di.prototype.controlText_="Remaining Time",_n.registerComponent("RemainingTimeDisplay",di);var pi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateShowing(),r.on(r.player(),"durationchange",r.updateShowing),r}p()(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_=st("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}(_n);_n.registerComponent("LiveDisplay",pi);var mi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatus),r}p()(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_=st("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}(ni);mi.prototype.controlText_="Seek to live, currently playing live",_n.registerComponent("SeekToLive",mi);var yi=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},gi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}p()(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("keydown",this.handleKeyDown),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},n.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("keydown",this.handleKeyDown),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},n.createEl=function(t,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),n.className=n.className+" vjs-slider",n=Qe({tabIndex:0},n),r=Qe({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Ln||e.preventDefault(),bt(),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;_t(),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.requestAnimationFrame((function(){var n=e.vertical()?"height":"width";e.bar.el().style[n]=(100*t).toFixed(2)+"%"}))),t}},n.getProgress=function(){return Number(yi(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=St(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){v.a.isEventKey(t,"Left")||v.a.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):v.a.isEventKey(t,"Right")||v.a.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){e.stopPropagation(),e.preventDefault()},n.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(_n);_n.registerComponent("Slider",gi);var vi=function(e,t){return yi(e/t*100,0,100).toFixed(2)+"%"},bi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).partEls_=[],r.on(t,"progress",r.update),r}p()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=st("span",{className:"vjs-control-text"}),r=st("span",{textContent:this.localize("Loaded")}),i=u.a.createTextNode(": ");return this.percentageEl_=st("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(r),n.appendChild(i),n.appendChild(this.percentageEl_),t},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this;this.requestAnimationFrame((function(){var e=t.player_.liveTracker,n=t.player_.buffered(),r=e&&e.isLive()?e.seekableEnd():t.player_.duration(),i=t.player_.bufferedEnd(),o=t.partEls_,a=vi(i,r);t.percent_!==a&&(t.el_.style.width=a,ut(t.percentageEl_,a),t.percent_=a);for(var s=0;s<n.length;s++){var u=n.start(s),l=n.end(s),c=o[s];c||(c=t.el_.appendChild(st()),o[s]=c),c.dataset.start===u&&c.dataset.end===l||(c.dataset.start=u,c.dataset.end=l,c.style.left=vi(u,i),c.style.width=vi(l-u,i))}for(var f=o.length;f>n.length;f--)t.el_.removeChild(o[f-1]);o.length=n.length}))},t}(_n);_n.registerComponent("LoadProgressBar",bi);var _i=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=rn(nn(h()(r),r.update),30),r}p()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var r=Tt(this.el_),i=Tt(this.player_.el()),o=e.width*t;if(i&&r){var a=e.left-i.left+o,s=e.width-o+(i.right-e.right),u=r.width/2;a<u?u+=u-a:s<u&&(u=s),u<0?u=0:u>r.width&&(u=r.width),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(e){ut(this.el_,e)},n.updateTime=function(e,t,n,r){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var o,a=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var s=i.player_.liveTracker.liveWindow(),u=s-t*s;o=(u<1?"":"-")+ui(u,s)}else o=ui(n,a);i.update(e,t,o),r&&r()}))},t}(_n);_n.registerComponent("TimeTooltip",_i);var Ti=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=rn(nn(h()(r),r.update),30),r}p()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,r)}},t}(_n);Ti.prototype.options_={children:[]},Fn||xn||Ti.prototype.options_.children.push("timeTooltip"),_n.registerComponent("PlayProgressBar",Ti);var wi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=rn(nn(h()(r),r.update),30),r}p()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,r=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,r,(function(){n.el_.style.left=e.width*t+"px"}))},t}(_n);wi.prototype.options_={children:["timeTooltip"]},_n.registerComponent("MouseTimeDisplay",wi);var Si=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).setEventHandlers_(),r}p()(t,e);var n=t.prototype;return n.setEventHandlers_=function(){this.update_=nn(this,this.update),this.update=rn(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in u.a&&"visibilityState"in u.a&&this.on(u.a,"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){u.a.hidden?this.disableInterval_(e):(this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},n.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.update=function(t){var n=this,r=e.prototype.update.call(this);return this.requestAnimationFrame((function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,i=n.player_.duration();t&&t.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[ui(e,i),ui(i,i)],"{1} of {2}")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(Tt(n.el()),n.getProgress())})),r},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},n.handleMouseDown=function(t){Pt(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(Pt(e)){var t,n=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(n>=.99)return void r.seekToLiveEdge();var i=r.seekableStart(),o=r.liveCurrentTime();if((t=i+n*r.liveWindow())>=o&&(t=o),t<=i&&(t=i+.1),t===1/0)return}else(t=n*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)}},n.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},n.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},n.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?nr(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(v.a.isEventKey(t,"Space")||v.a.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(v.a.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(0);else if(v.a.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(v()(t))){t.preventDefault(),t.stopPropagation();var n=10*(v.a.codes[v()(t)]-v.a.codes[0])/100;this.player_.currentTime(this.player_.duration()*n)}else v.a.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):v.a.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},n.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableInterval_),this.off(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in u.a&&"visibilityState"in u.a&&this.off(u.a,"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(gi);Si.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Fn||xn||Si.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),_n.registerComponent("SeekBar",Si);var Ei=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseMove=rn(nn(h()(r),r.handleMouseMove),30),r.throttledHandleMouseSeek=rn(nn(h()(r),r.handleMouseSeek),30),r.enable(),r}p()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("playProgressBar"),r=t.getChild("mouseTimeDisplay");if(n||r){var i=t.el(),o=Tt(i),a=St(i,e).x;a=yi(0,1,a),r&&r.update(o,a),n&&n.update(o,t.getProgress())}}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.disable=function(){this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},n.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(_n);Ei.prototype.options_={children:["seekBar"]},_n.registerComponent("ProgressControl",Ei);var ki=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],r.handlePictureInPictureChange),u.a.pictureInPictureEnabled||r.disable(),r}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture")},n.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(ni);ki.prototype.controlText_="Picture-in-Picture",_n.registerComponent("PictureInPictureToggle",ki);var Ci=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"fullscreenchange",r.handleFullscreenChange),!1===u.a[t.fsApi_.fullscreenEnabled]&&r.disable(),r}p()(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}(ni);Ci.prototype.controlText_="Fullscreen",_n.registerComponent("FullscreenToggle",Ci);var xi=function(e){function t(){return e.apply(this,arguments)||this}return p()(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}(_n);_n.registerComponent("VolumeLevel",xi);var Oi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on("slideractive",r.updateLastVolume_),r.on(t,"volumechange",r.updateARIAAttributes),t.ready((function(){return r.updateARIAAttributes()})),r}p()(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){Pt(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){Pt(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}(gi);Oi.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Oi.prototype.playerEvent="volumechange",_n.registerComponent("VolumeBar",Oi);var Pi=function(e){function t(t,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||Ze(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(h()(r),t),r.throttledHandleMouseMove=rn(nn(h()(r),r.handleMouseMove),30),r.on("mousedown",r.handleMouseDown),r.on("touchstart",r.handleMouseDown),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}p()(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}(_n);Pi.prototype.options_={children:["volumeBar"]},_n.registerComponent("VolumeControl",Pi);var Ai=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(h()(r),t),r.on(t,["loadstart","volumechange"],r.update),r}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;Fn&&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++)ht(this.el_,"vjs-vol-"+n);ft(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}(ni);Ai.prototype.controlText_="Mute",_n.registerComponent("MuteToggle",Ai);var Ri=function(e){function t(t,n){var r;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||Ze(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=e.call(this,t,n)||this).on(t,["loadstart"],r.volumePanelState_),r.on(r.muteToggle,"keyup",r.handleKeyPress),r.on(r.volumeControl,"keyup",r.handleVolumeControlKeyUp),r.on("keydown",r.handleKeyPress),r.on("mouseover",r.handleMouseOver),r.on("mouseout",r.handleMouseOut),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}p()(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){v.a.isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),Kt(u.a,"keyup",nn(this,this.handleKeyPress))},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),$t(u.a,"keyup",nn(this,this.handleKeyPress))},n.handleKeyPress=function(e){v.a.isEventKey(e,"Esc")&&this.handleMouseOut()},t}(_n);Ri.prototype.options_={children:["muteToggle","volumeControl"]},_n.registerComponent("VolumePanel",Ri);var Li=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",r.handleKeyDown),r.boundHandleBlur_=nn(h()(r),r.handleBlur),r.boundHandleTapClick_=nn(h()(r),r.handleTapClick),r}p()(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof _n&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof _n&&(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_=st(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_),Kt(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||u.a.activeElement;if(!this.children().some((function(e){return e.el()===t}))){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},n.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var n=t.filter((function(t){return t.el()===e.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(e){v.a.isEventKey(e,"Left")||v.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(v.a.isEventKey(e,"Right")||v.a.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},n.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},n.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},n.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className)&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(_n);_n.registerComponent("Menu",Li);var Ii=function(e){function t(t,n){var r;void 0===n&&(n={}),(r=e.call(this,t,n)||this).menuButton_=new ni(t,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var i=ni.prototype.buildCSSClass();return r.menuButton_.el_.className=r.buildCSSClass()+" "+i,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0,r.on(r.menuButton_,"tap",r.handleClick),r.on(r.menuButton_,"click",r.handleClick),r.on(r.menuButton_,"keydown",r.handleKeyDown),r.on(r.menuButton_,"mouseenter",(function(){r.addClass("vjs-hover"),r.menu.show(),Kt(u.a,"keyup",nn(h()(r),r.handleMenuKeyUp))})),r.on("mouseleave",r.handleMouseLeave),r.on("keydown",r.handleSubmenuKeyDown),r}p()(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 Li(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=st("li",{className:"vjs-menu-title",innerHTML:vn(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var n=new _n(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r<this.items.length;r++)e.addItem(this.items[r]);return e},n.createItems=function(){},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},n.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+ni.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"),$t(u.a,"keyup",nn(this,this.handleMenuKeyUp))},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(e){v.a.isEventKey(e,"Esc")||v.a.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),v.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(v.a.isEventKey(e,"Up")||v.a.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(e){(v.a.isEventKey(e,"Esc")||v.a.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},n.handleSubmenuKeyDown=function(e){(v.a.isEventKey(e,"Esc")||v.a.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),v.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},n.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Fn&&ot())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}(_n);_n.registerComponent("MenuButton",Ii);var Di=function(e){function t(t,n){var r,i=n.tracks;if((r=e.call(this,t,n)||this).items.length<=1&&r.hide(),!i)return h()(r);var o=nn(h()(r),r.update);return i.addEventListener("removetrack",o),i.addEventListener("addtrack",o),r.player_.on("ready",o),r.player_.on("dispose",(function(){i.removeEventListener("removetrack",o),i.removeEventListener("addtrack",o)})),r}return p()(t,e),t}(Ii);_n.registerComponent("TrackButton",Di);var Ni=["Tab","Esc","Up","Down","Right","Left"],ji=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}p()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",Qe({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),r)},n.handleKeyDown=function(t){Ni.some((function(e){return v.a.isEventKey(t,e)}))||e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){this.selected(!0)},n.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(Kr);_n.registerComponent("MenuItem",ji);var Mi=function(e){function t(t,n){var r,i=n.track,o=t.textTracks();n.label=i.label||i.language||"Unknown",n.selected="showing"===i.mode,(r=e.call(this,t,n)||this).track=i,r.kinds=(n.kinds||[n.kind||r.track.kind]).filter(Boolean);var s,l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(h()(r),t)},c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleSelectedLanguageChange.apply(h()(r),t)};(t.on(["loadstart","texttrackchange"],l),o.addEventListener("change",l),o.addEventListener("selectedlanguagechange",c),r.on("dispose",(function(){t.off(["loadstart","texttrackchange"],l),o.removeEventListener("change",l),o.removeEventListener("selectedlanguagechange",c)})),void 0===o.onchange)&&r.on(["tap","click"],(function(){if("object"!=typeof a.a.Event)try{s=new a.a.Event("change")}catch(e){}s||(s=u.a.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(s)}));return r.handleTracksChange(),r}p()(t,e);var n=t.prototype;return n.handleClick=function(t){var n=this.track,r=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),r)for(var i=0;i<r.length;i++){var o=r[i];-1!==this.kinds.indexOf(o.kind)&&(o===n?"showing"!==o.mode&&(o.mode="showing"):"disabled"!==o.mode&&(o.mode="disabled"))}},n.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},n.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},n.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(ji);_n.registerComponent("TextTrackMenuItem",Mi);var Ui=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}p()(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var o=t[r];if(this.options_.kinds.indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var o=t[r];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Mi);_n.registerComponent("OffTextTrackMenuItem",Ui);var Bi=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return p()(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=Mi),this.label_&&(n=this.label_+" off"),e.push(new Ui(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new t(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+o.kind+"-menu-item"),e.push(a)}}return e},t}(Di);_n.registerComponent("TextTrackButton",Bi);var Fi=function(e){function t(t,n){var r,i=n.track,o=n.cue,a=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=o.text,n.selected=o.startTime<=a&&a<o.endTime,(r=e.call(this,t,n)||this).track=i,r.cue=o,i.addEventListener("cuechange",nn(h()(r),r.update)),r}p()(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}(ji);_n.registerComponent("ChaptersTrackMenuItem",Fi);var zi=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}p()(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(vn(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},n.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new Fi(this.player_,{track:this.track_,cue:i});e.push(o)}return e},t}(Bi);zi.prototype.kind_="chapters",zi.prototype.controlText_="Chapters",_n.registerComponent("ChaptersButton",zi);var Vi=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=t.textTracks(),a=nn(h()(i),i.handleTracksChange);return o.addEventListener("change",a),i.on("dispose",(function(){o.removeEventListener("change",a)})),i}p()(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,r=0,i=t.length;r<i;r++){var o=t[r];if(o.kind!==this.kind_&&"showing"===o.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Bi);Vi.prototype.kind_="descriptions",Vi.prototype.controlText_="Descriptions",_n.registerComponent("DescriptionsButton",Vi);var Wi=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Bi);Wi.prototype.kind_="subtitles",Wi.prototype.controlText_="Subtitles",_n.registerComponent("SubtitlesButton",Wi);var Hi=function(e){function t(t,n){var r;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(r=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return p()(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Mi);_n.registerComponent("CaptionSettingsMenuItem",Hi);var qi=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}p()(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 Hi(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Bi);qi.prototype.kind_="captions",qi.prototype.controlText_="Captions",_n.registerComponent("CaptionsButton",qi);var Gi=function(e){function t(){return e.apply(this,arguments)||this}return p()(t,e),t.prototype.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),i+="</span>",e.prototype.createEl.call(this,t,Qe({innerHTML:i},n),r)},t}(Mi);_n.registerComponent("SubsCapsMenuItem",Gi);var Yi=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(vn(r.label_)),r}p()(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 Hi(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,Gi)},t}(Bi);Yi.prototype.kinds_=["captions","subtitles"],Yi.prototype.controlText_="Subtitles",_n.registerComponent("SubsCapsButton",Yi);var Xi=function(e){function t(t,n){var r,i=n.track,o=t.audioTracks();n.label=i.label||i.language||"Unknown",n.selected=i.enabled,(r=e.call(this,t,n)||this).track=i,r.addClass("vjs-"+i.kind+"-menu-item");var a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(h()(r),t)};return o.addEventListener("change",a),r.on("dispose",(function(){o.removeEventListener("change",a)})),r}p()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),i+="</span>",e.prototype.createEl.call(this,t,Qe({innerHTML:i},n),r)},n.handleClick=function(t){var n=this.player_.audioTracks();e.prototype.handleClick.call(this,t);for(var r=0;r<n.length;r++){var i=n[r];i.enabled=i===this.track}},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(ji);_n.registerComponent("AudioTrackMenuItem",Xi);var Ki=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}p()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var r=t[n];e.push(new Xi(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},t}(Di);Ki.prototype.controlText_="Audio Track",_n.registerComponent("AudioTrackButton",Ki);var $i=function(e){function t(t,n){var r,i=n.rate,o=parseFloat(i,10);return n.label=i,n.selected=1===o,n.selectable=!0,n.multiSelectable=!1,(r=e.call(this,t,n)||this).label=i,r.rate=o,r.on(t,"ratechange",r.update),r}p()(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}(ji);$i.prototype.contentElType="button",_n.registerComponent("PlaybackRateMenuItem",$i);var Qi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateVisibility(),r.updateLabel(),r.on(t,"loadstart",r.updateVisibility),r.on(t,"ratechange",r.updateLabel),r}p()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=st("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 Li(this.player()),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addChild(new $i(this.player(),{rate:t[n]+"x"}));return e},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>t){r=n[i];break}this.player().playbackRate(r)},n.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(Ii);Qi.prototype.controlText_="Playback Rate",_n.registerComponent("PlaybackRateMenuButton",Qi);var Ji=function(e){function t(){return e.apply(this,arguments)||this}p()(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}(_n);_n.registerComponent("Spacer",Ji);var Zi=function(e){function t(){return e.apply(this,arguments)||this}p()(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}(Ji);_n.registerComponent("CustomControlSpacer",Zi);var eo=function(e){function t(){return e.apply(this,arguments)||this}return p()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(_n);eo.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in u.a&&eo.prototype.options_.children.splice(eo.prototype.options_.children.length-1,0,"pictureInPictureToggle"),_n.registerComponent("ControlBar",eo);var to=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"error",r.open),r}p()(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}(ar);to.prototype.options_=c()({},ar.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),_n.registerComponent("ErrorDisplay",to);var no=["#000","Black"],ro=["#00F","Blue"],io=["#0FF","Cyan"],oo=["#0F0","Green"],ao=["#F0F","Magenta"],so=["#F00","Red"],uo=["#FFF","White"],lo=["#FF0","Yellow"],co=["1","Opaque"],fo=["0.5","Semi-Transparent"],ho=["0","Transparent"],po={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[no,uo,so,oo,ro,lo,ao,io]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[co,fo,ho]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[uo,no,so,oo,ro,lo,ao,io]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[co,fo]},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:[ho,fo,co]}};function mo(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}po.windowColor.options=po.backgroundColor.options;var yo=function(e){function t(t,n){var r;return n.temporary=!1,(r=e.call(this,t,n)||this).updateDisplay=nn(h()(r),r.updateDisplay),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=st("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),$e(po,(function(e){r.on(r.$(e.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}p()(t,e);var n=t.prototype;return n.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},n.createElSelect_=function(e,t,n){var r=this;void 0===t&&(t=""),void 0===n&&(n="label");var i=po[e],o=i.id.replace("%s",this.id_),a=[t,o].join(" ").trim();return["<"+n+' id="'+o+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"</"+n+">",'<select aria-labelledby="'+a+'">'].concat(i.options.map((function(e){var t=o+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+a+" "+t+'">',r.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},n.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},n.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},n.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},n.createElColors_=function(){return st("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return st("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 st("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},n.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.label=function(){return this.localize("Caption Settings Dialog")},n.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var e,t,n,r=this;return t=function(e,t,n){var i,o,a=(i=r.$(t.selector),o=t.parser,mo(i.options[i.options.selectedIndex].value,o));return void 0!==a&&(e[n]=a),e},void 0===(n={})&&(n=0),Ke(e=po).reduce((function(n,r){return t(n,e[r],r)}),n)},n.setValues=function(e){var t=this;$e(po,(function(n,r){!function(e,t,n){if(t)for(var r=0;r<e.options.length;r++)if(mo(e.options[r].value,n)===t){e.selectedIndex=r;break}}(t.$(n.selector),e[r],n.parser)}))},n.setDefaults=function(){var e=this;$e(po,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},n.restoreSettings=function(){var e;try{e=JSON.parse(a.a.localStorage.getItem("vjs-text-track-settings"))}catch(e){Ge.warn(e)}e&&this.setValues(e)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?a.a.localStorage.setItem("vjs-text-track-settings",JSON.stringify(e)):a.a.localStorage.removeItem("vjs-text-track-settings")}catch(e){Ge.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}(ar);_n.registerComponent("TextTrackSettings",yo);var go=function(e){function t(t,n){var r,i=n.ResizeObserver||a.a.ResizeObserver;null===n.ResizeObserver&&(i=!1);var o=bn({createEl:!i,reportTouchActivity:!1},n);return(r=e.call(this,t,o)||this).ResizeObserver=n.ResizeObserver||a.a.ResizeObserver,r.loadListener_=null,r.resizeObserver_=null,r.debouncedHandler_=function(e,t,n,r){var i;void 0===r&&(r=a.a);var o=function(){var o=this,a=arguments,s=function(){i=null,s=null,n||e.apply(o,a)};!i&&n&&e.apply(o,a),r.clearTimeout(i),i=r.setTimeout(s,t)};return o.cancel=function(){r.clearTimeout(i),i=null},o}((function(){r.resizeHandler()}),100,!1,h()(r)),i?(r.resizeObserver_=new r.ResizeObserver(r.debouncedHandler_),r.resizeObserver_.observe(t.el())):(r.loadListener_=function(){if(r.el_&&r.el_.contentWindow){var e=r.debouncedHandler_,t=r.unloadListener_=function(){$t(this,"resize",e),$t(this,"unload",t),t=null};Kt(r.el_.contentWindow,"unload",t),Kt(r.el_.contentWindow,"resize",e)}},r.one("load",r.loadListener_)),r}p()(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}(_n);_n.registerComponent("ResizeManager",go);var vo={trackingThreshold:30,liveTolerance:15},bo=function(e){function t(t,n){var r,i=bn(vo,n,{createEl:!1});return(r=e.call(this,t,i)||this).reset_(),r.on(r.player_,"durationchange",r.handleDurationchange),Dn&&"hidden"in u.a&&"visibilityState"in u.a&&r.on(u.a,"visibilitychange",r.handleVisibilityChange),r}p()(t,e);var n=t.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(u.a.hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(a.a.performance.now().toFixed(4)),n=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+n;var r=this.liveCurrentTime(),i=this.player_.currentTime(),o=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-i)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(o=!1),o!==this.behindLiveEdge_&&(this.behindLiveEdge_=o,this.trigger("liveedgechange"))}},n.handleDurationchange=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},n.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLive_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLive_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked):(this.one(this.player_,"play",this.handlePlay),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate)))},n.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked)},n.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=!this.skipNextSeeked_&&e>2,this.skipNextSeeked_=!1,this.trackLive_()},n.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)},n.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.skipNextSeeked_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLive_),this.off(this.player_,"seeked",this.handleSeeked),this.off(this.player_,"play",this.handlePlay),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate),this.off(this.player_,"timeupdate",this.seekToLiveEdge)},n.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},n.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?1/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(u.a,"visibilitychange",this.handleVisibilityChange),this.stopTracking(),e.prototype.dispose.call(this)},t}(_n);_n.registerComponent("LiveTracker",bo);var _o,To=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),r=[],i="";if(!n.length)return!1;for(var o=0;o<n.length;o++){var a=n[o].src;a&&-1===r.indexOf(a)&&r.push(a)}return!!r.length&&(1===r.length&&(i=r[0]),e.triggerSourceset(i),!0)},wo=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=u.a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=u.a.createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",a.a.Element.prototype.appendChild.call(this,n),this.innerHTML}}),So=function(e,t){for(var n={},r=0;r<e.length&&!((n=Object.getOwnPropertyDescriptor(e[r],t))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},Eo=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},r=function(e){return So([e.el(),a.a.HTMLMediaElement.prototype,a.a.Element.prototype,wo],"innerHTML")}(e),i=function(n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=n.apply(t,i);return To(e),a}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=i(n[e]))})),Object.defineProperty(t,"innerHTML",bn(r,{set:i(r.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach((function(e){t[e]=n[e]})),Object.defineProperty(t,"innerHTML",r)},e.one("sourceset",t.resetSourceWatch_)}},ko=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?wr(a.a.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return a.a.Element.prototype.setAttribute.call(this,"src",e),e}}),Co=function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=function(e){return So([e.el(),a.a.HTMLMediaElement.prototype,ko],"src")}(e),r=t.setAttribute,i=t.load;Object.defineProperty(t,"src",bn(n,{set:function(r){var i=n.set.call(t,r);return e.triggerSourceset(t.src),i}})),t.setAttribute=function(n,i){var o=r.call(t,n,i);return/src/i.test(n)&&e.triggerSourceset(t.src),o},t.load=function(){var n=i.call(t);return To(e)||(e.triggerSourceset(""),Eo(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):To(e)||Eo(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=i,t.setAttribute=r,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}},xo=function(e,t,n,r){void 0===r&&(r=!0);var i=function(n){return Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0})},o={configurable:!0,enumerable:!0,get:function(){var e=n();return i(e),e}};return r&&(o.set=i),Object.defineProperty(e,t,o)},Oo=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i=t.source,o=!1;if(i&&(r.el_.currentSrc!==i.src||t.tag&&3===t.tag.initNetworkState_)?r.setSource(i):r.handleLateInit_(r.el_),t.enableSourceset&&r.setupSourcesetHandling_(),r.el_.hasChildNodes()){for(var a=r.el_.childNodes,s=a.length,u=[];s--;){var l=a[s];"track"===l.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(l),r.remoteTextTracks().addTrack(l.track),r.textTracks().addTrack(l.track),o||r.el_.hasAttribute("crossorigin")||!Er(l.src)||(o=!0)):u.push(l))}for(var c=0;c<u.length;c++)r.el_.removeChild(u[c])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&o&&Ge.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),r.restoreMetadataTracksInIOSNativePlayer_(),(Mn||Bn||Pn)&&!0===t.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}p()(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(){Co(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),n=function(){e=[];for(var n=0;n<t.length;n++){var r=t[n];"metadata"===r.kind&&e.push({track:r,storedMode:r.mode})}};n(),t.addEventListener("change",n),this.on("dispose",(function(){return t.removeEventListener("change",n)}));var r=function n(){for(var r=0;r<e.length;r++){var i=e[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",n),t.removeEventListener("change",r),t.addEventListener("change",r)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",r)}))},n.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var r=e.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach((function(e){n.el()[r+"Tracks"].removeEventListener(e,n[r+"TracksListeners_"][e])})),this["featuresNative"+e+"Tracks"]=!t,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},n.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},n.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},n.proxyNativeTracksForType_=function(e){var t=this,n=Lr[e],r=this.el()[n.getterName],i=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var o={change:function(n){var r={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(r),"text"===e&&t[Ir.remoteText.getterName]().trigger(r)},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},a=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,o=0;o<r.length;o++)if(r[o]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=o,Object.keys(o).forEach((function(e){var n=o[e];r.addEventListener(e,n),t.on("dispose",(function(t){return r.removeEventListener(e,n)}))})),this.on("loadstart",a),this.on("dispose",(function(e){return t.off("loadstart",a)}))}},n.proxyNativeTracks_=function(){var e=this;Lr.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=u.a.createElement("video");var r=bn({},this.options_.tag&&mt(this.options_.tag));Mn&&!0===this.options_.nativeControlsForTouch||delete r.controls,pt(e,Qe(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&gt(e,"preload",this.options_.preload);for(var i=["loop","muted","playsinline","autoplay"],o=0;o<i.length;o++){var a=i[o],s=this.options_[a];void 0!==s&&(s?gt(e,a,a):vt(e,a),e[a]=s)}return e},n.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")}))}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(e){this.trigger(e)}),this)}))}},n.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(e){Ge(e,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;if(this.el_.duration===1/0&&xn&&Ln&&0===this.el_.currentTime){return this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN}return this.el_.duration||NaN},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},n.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=a.a.navigator&&a.a.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},n.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)nr(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},n.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},n.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},n.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},n.reset=function(){t.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(e){this.el_.controls=!!e},n.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=u.a.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},n.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},n.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),a.a.performance&&"function"==typeof a.a.performance.now?e.creationTime=a.a.performance.now():a.a.performance&&a.a.performance.timing&&"number"==typeof a.a.performance.timing.navigationStart&&(e.creationTime=a.a.Date.now()-a.a.performance.timing.navigationStart),e},t}(Nr);xo(Oo,"TEST_VID",(function(){if(rt()){var e=u.a.createElement("video"),t=u.a.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),Oo.isSupported=function(){try{Oo.TEST_VID.volume=.5}catch(e){return!1}return!(!Oo.TEST_VID||!Oo.TEST_VID.canPlayType)},Oo.canPlayType=function(e){return Oo.TEST_VID.canPlayType(e)},Oo.canPlaySource=function(e,t){return Oo.canPlayType(e.type)},Oo.canControlVolume=function(){try{var e=Oo.TEST_VID.volume;return Oo.TEST_VID.volume=e/2+.1,e!==Oo.TEST_VID.volume}catch(e){return!1}},Oo.canMuteVolume=function(){try{var e=Oo.TEST_VID.muted;return Oo.TEST_VID.muted=!e,Oo.TEST_VID.muted?gt(Oo.TEST_VID,"muted","muted"):vt(Oo.TEST_VID,"muted"),e!==Oo.TEST_VID.muted}catch(e){return!1}},Oo.canControlPlaybackRate=function(){if(xn&&Ln&&In<58)return!1;try{var e=Oo.TEST_VID.playbackRate;return Oo.TEST_VID.playbackRate=e/2+.1,e!==Oo.TEST_VID.playbackRate}catch(e){return!1}},Oo.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(u.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(u.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(u.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(u.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Oo.supportsNativeTextTracks=function(){return zn||Fn&&Ln},Oo.supportsNativeVideoTracks=function(){return!(!Oo.TEST_VID||!Oo.TEST_VID.videoTracks)},Oo.supportsNativeAudioTracks=function(){return!(!Oo.TEST_VID||!Oo.TEST_VID.audioTracks)},Oo.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];xo(Oo.prototype,t,(function(){return Oo[n]()}),!0)})),Oo.prototype.movingMediaElementInDOM=!Fn,Oo.prototype.featuresFullscreenResize=!0,Oo.prototype.featuresProgressEvents=!0,Oo.prototype.featuresTimeupdateEvents=!0,Oo.patchCanPlayType=function(){On>=4&&!An&&!Ln&&(_o=Oo.TEST_VID&&Oo.TEST_VID.constructor.prototype.canPlayType,Oo.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":_o.call(this,e)})},Oo.unpatchCanPlayType=function(){var e=Oo.TEST_VID.constructor.prototype.canPlayType;return _o&&(Oo.TEST_VID.constructor.prototype.canPlayType=_o),e},Oo.patchCanPlayType(),Oo.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){}}()}},Oo.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){Oo.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Oo.prototype["set"+vn(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","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){Oo.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","crossOrigin"].forEach((function(e){Oo.prototype["set"+vn(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Oo.prototype[e]=function(){return this.el_[e]()}})),Nr.withSourceHandlers(Oo),Oo.nativeSourceHandler={},Oo.nativeSourceHandler.canPlayType=function(e){try{return Oo.TEST_VID.canPlayType(e)}catch(e){return""}},Oo.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Oo.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Sr(e.src);return Oo.nativeSourceHandler.canPlayType("video/"+n)}return""},Oo.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Oo.nativeSourceHandler.dispose=function(){},Oo.registerSourceHandler(Oo.nativeSourceHandler),Nr.registerTech("Html5",Oo);var Po=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Ao={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Ro=["tiny","xsmall","small","medium","large","xlarge","huge"],Lo={};Ro.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Lo[e]="vjs-layout-"+t}));var Io={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Do=function(e){function t(n,r,i){var o;if(n.id=n.id||r.id||"vjs_video_"+Vt(),(r=Qe(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var a=n.closest("[lang]");a&&a.getAttribute&&(r.language=a.getAttribute("lang"))}else for(var s=n;s&&1===s.nodeType;){if(mt(s).hasOwnProperty("lang")){r.language=s.getAttribute("lang");break}s=s.parentNode}if((o=e.call(this,null,r,i)||this).boundDocumentFullscreenChange_=nn(h()(o),o.documentFullscreenChange_),o.boundFullWindowOnEscKey_=nn(h()(o),o.fullWindowOnEscKey),o.isFullscreen_=!1,o.log=Ye(o.id_),o.fsApi_=Xn,o.isPosterFromTech_=!1,o.queuedCallbacks_=[],o.isReady_=!1,o.hasStarted_=!1,o.userActive_=!1,!o.options_||!o.options_.techOrder||!o.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(o.tag=n,o.tagAttributes=n&&mt(n),o.language(o.options_.language),r.languages){var l={};Object.getOwnPropertyNames(r.languages).forEach((function(e){l[e.toLowerCase()]=r.languages[e]})),o.languages_=l}else o.languages_=t.prototype.options_.languages;o.resetCache_(),o.poster_=r.poster||"",o.controls_=!!r.controls,n.controls=!1,n.removeAttribute("controls"),o.changingSrc_=!1,o.playCallbacks_=[],o.playTerminatedQueue_=[],n.hasAttribute("autoplay")?o.autoplay(!0):o.autoplay(o.options_.autoplay),r.plugins&&Object.keys(r.plugins).forEach((function(e){if("function"!=typeof o[e])throw new Error('plugin "'+e+'" does not exist')})),o.scrubbing_=!1,o.el_=o.createEl(),pn(h()(o),{eventBusKey:"el_"}),o.fsApi_.requestFullscreen&&(Kt(u.a,o.fsApi_.fullscreenchange,o.boundDocumentFullscreenChange_),o.on(o.fsApi_.fullscreenchange,o.boundDocumentFullscreenChange_)),o.fluid_&&o.on("playerreset",o.updateStyleEl_);var c=bn(o.options_);r.plugins&&Object.keys(r.plugins).forEach((function(e){o[e](r.plugins[e])})),o.options_.playerOptions=c,o.middleware_=[],o.initChildren(),o.isAudio("audio"===n.nodeName.toLowerCase()),o.controls()?o.addClass("vjs-controls-enabled"):o.addClass("vjs-controls-disabled"),o.el_.setAttribute("role","region"),o.isAudio()?o.el_.setAttribute("aria-label",o.localize("Audio Player")):o.el_.setAttribute("aria-label",o.localize("Video Player")),o.isAudio()&&o.addClass("vjs-audio"),o.flexNotSupported_()&&o.addClass("vjs-no-flex"),Mn&&o.addClass("vjs-touch-enabled"),Fn||o.addClass("vjs-workinghover"),t.players[o.id_]=h()(o);var f="7.8.4".split(".")[0];return o.addClass("vjs-v"+f),o.userActive(!0),o.reportUserActivity(),o.one("play",o.listenForUserActivity_),o.on("stageclick",o.handleStageClick_),o.on("keydown",o.handleKeyDown),o.breakpoints(o.options_.breakpoints),o.responsive(o.options_.responsive),o}p()(t,e);var n=t.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),$t(u.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),$t(u.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Mr[this.id()]=null,Dr.names.forEach((function(e){var t=Dr[e],r=n[t.getterName]();r&&r.off&&r.off()})),e.prototype.dispose.call(this)},n.createEl=function(){var t,n=this.tag,r=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),i="video-js"===this.tag.tagName.toLowerCase();r?t=this.el_=n.parentNode:i||(t=this.el_=e.prototype.createEl.call(this,"div"));var o=mt(n);if(i){for(t=this.el_=n,n=this.tag=u.a.createElement("video");t.children.length;)n.appendChild(t.firstChild);ct(t,"video-js")||ft(t,"video-js"),t.appendChild(n),r=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{n[e]=t[e]}catch(e){}}))}if(n.setAttribute("tabindex","-1"),o.tabindex="-1",(Dn||Ln&&jn)&&(n.setAttribute("role","application"),o.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach((function(e){i&&"class"===e||t.setAttribute(e,o[e]),i&&n.setAttribute(e,o[e])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Bt("vjs-styles-dimensions");var s=Rt(".vjs-styles-defaults"),l=Rt("head");l.insertBefore(this.styleEl_,s?s.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"),f=0;f<c.length;f++){var h=c.item(f);ft(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!r&&n.parentNode.insertBefore(t,n),lt(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):Ge.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},n.width=function(e){return this.dimension("width",e)},n.height=function(e){return this.dimension("height",e)},n.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t||"auto"===t)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(t);isNaN(r)?Ge.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},n.fluid=function(e){if(void 0===e)return!!this.fluid_;var t,n;this.fluid_=!!e,an(this)&&this.off("playerreset",this.updateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),an(t=function(){this.on("playerreset",this.updateStyleEl_)})?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!==a.a.VIDEOJS_NO_DYNAMIC_STYLE){var e,t,n,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),i=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*i,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Ft(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*i+"%;\n }\n ")}else{var o="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(o>=0&&(u.width=o),s>=0&&(u.height=s))}},n.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=vn(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(Nr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,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};Dr.names.forEach((function(e){var t=Dr[e];o[t.getterName]=n[t.privateName]})),Qe(o,this.options_[r]),Qe(o,this.options_[i]),Qe(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);var a=Nr.getTech(e);if(!a)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new a(o),this.tech_.ready(nn(this,this.handleTechReady_),!0),or(this.textTracksJson_||[],this.tech_),Po.forEach((function(e){n.on(n.tech_,e,n["handleTech"+vn(e)+"_"])})),Object.keys(Ao).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Ao[e]+"_"].bind(n),event:t}):n["handleTech"+Ao[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"fullscreenerror",this.handleTechFullscreenError_),this.on(this.tech_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_),this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||lt(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e=this;Dr.names.forEach((function(t){var n=Dr[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=ir(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},n.tech=function(e){return void 0===e&&Ge.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},n.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mouseup",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},n.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mouseup",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},n.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},n.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},n.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n,r=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var r=t.play();if(tr(r))return r.catch(n)};if("any"===e&&!0!==this.muted()?tr(n=this.play())&&(n=n.catch(r)):n="muted"===e&&!0!==this.muted()?r():this.play(),tr(n))return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(n){t.trigger({type:"autoplay-failure",autoplay:e})}))}},n.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),i=0;i<r.length;i++){var o=r[i];if(o.type&&o.src&&o.src===t)return o.type}return Gr(t)}(this,t)),this.cache_.source=bn({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),i=[],o=this.$$("source"),a=[],s=0;s<o.length;s++){var u=mt(o[s]);i.push(u),u.src&&u.src===t&&a.push(u.src)}a.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},n.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},r=this.currentSource().src,i=e.src;r&&!/^blob:/.test(r)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==r)&&(n=function(){}),n(i),e.src||this.tech_.any(["sourceset","loadstart"],(function(e){if("sourceset"!==e.type){var n=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},n.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},n.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},n.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",(function n(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",n))}))},n.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},n.handleTechFirstPlay_=function(){this.options_.starttime&&(Ge.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){Pt(e)&&this.controls_&&(this.paused()?nr(this.play()):this.pause())},n.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(t){return t.contains(e.target)}))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},n.handleTechTap_=function(){this.userActive(!this.userActive())},n.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},n.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},n.handleTechTouchEnd_=function(e){e.preventDefault()},n.handleStageClick_=function(){this.reportUserActivity()},n.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var n=this.el(),r=u.a[this.fsApi_.fullscreenElement]===n;!r&&n.matches?r=n.matches(":"+this.fsApi_.fullscreen):!r&&n.msMatchesSelector&&(r=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}},n.handleTechFullscreenChange_=function(e,t){t&&(t.nativeIOSFullscreen&&this.toggleClass("vjs-ios-native-fs"),this.isFullscreen(t.isFullscreen))},n.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},n.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},n.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},n.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},n.handleTechError_=function(){var e=this.tech_.error();this.error(e)},n.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},n.getCache=function(){return this.cache_},n.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},n.techCall_=function(e,t){this.ready((function(){if(e in Vr)return function(e,t,n,r){return t[n](e.reduce(Hr(n),r))}(this.middleware_,this.tech_,e,t);if(e in Wr)return Fr(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw Ge(e),e}}),!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in zr)return function(e,t,n){return e.reduceRight(Hr(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Wr)return Fr(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw Ge("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw Ge("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw Ge(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||a.a.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},n.play_=function(e){var t=this;void 0===e&&(e=nr),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||!zn&&!Fn||this.load());var r=this.techGet_("play");null===r?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)},n.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},n.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||qn(0,0)},n.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,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=qn(0,0)),e},n.bufferedPercent=function(){return Gn(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||a.a.Promise;if(t){var n=this;return new t((function(t,r){function i(){n.off("fullscreenerror",a),n.off("fullscreenchange",o)}function o(){i(),t()}function a(e,t){i(),r(t)}n.one("fullscreenchange",o),n.one("fullscreenerror",a);var s=n.requestFullscreenHelper_(e);if(s)return s.then(i,i),s}))}return this.requestFullscreenHelper_()},n.requestFullscreenHelper_=function(e){var t,n=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var r=this.el_[this.fsApi_.requestFullscreen](t);return r&&r.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),r}this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var e=this.options_.Promise||a.a.Promise;if(e){var t=this;return new e((function(e,n){function r(){t.off("fullscreenerror",o),t.off("fullscreenchange",i)}function i(){r(),e()}function o(e,t){r(),n(t)}t.one("fullscreenchange",i),t.one("fullscreenerror",o);var a=t.exitFullscreenHelper_();if(a)return a.then(r,r),a}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=u.a[this.fsApi_.exitFullscreen]();return t&&t.then((function(){return e.isFullscreen(!1)})),t}this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):this.exitFullWindow()},n.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=u.a.documentElement.style.overflow,Kt(u.a,"keydown",this.boundFullWindowOnEscKey_),u.a.documentElement.style.overflow="hidden",ft(u.a.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){v.a.isEventKey(e,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,$t(u.a,"keydown",this.boundFullWindowOnEscKey_),u.a.documentElement.style.overflow=this.docOrigOverflow,ht(u.a.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},n.requestPictureInPicture=function(){if("pictureInPictureEnabled"in u.a)return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in u.a)return u.a.exitPictureInPicture()},n.handleKeyDown=function(e){var t=this.options_.userActions;if(t&&t.hotkeys){(function(e){var t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if("input"===t)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type);return-1!==["textarea"].indexOf(t)})(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}},n.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,r=void 0===n?function(e){return v.a.isEventKey(e,"f")}:n,i=t.muteKey,o=void 0===i?function(e){return v.a.isEventKey(e,"m")}:i,a=t.playPauseKey,s=void 0===a?function(e){return v.a.isEventKey(e,"k")||v.a.isEventKey(e,"Space")}:a;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();var l=_n.getComponent("FullscreenToggle");!1!==u.a[this.fsApi_.fullscreenEnabled]&&l.prototype.handleClick.call(this,e)}else if(o.call(this,e)){e.preventDefault(),e.stopPropagation(),_n.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation(),_n.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},n.canPlayType=function(e){for(var t,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=Nr.getTech(i);if(o||(o=_n.getComponent(i)),o){if(o.isSupported()&&(t=o.canPlayType(e)))return t}else Ge.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(e){var t,n=this,r=this.options_.techOrder.map((function(e){return[e,Nr.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(Ge.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),i=function(e,t,n){var r;return e.some((function(e){return t.some((function(t){if(r=n(e,t))return!0}))})),r},o=function(e,t){var r=e[0];if(e[1].canPlaySource(t,n.options_[r.toLowerCase()]))return{source:t,tech:r}};return(this.options_.sourceOrder?i(e,r,(t=o,function(e,n){return t(n,e)})):i(r,e,o))||!1},n.src=function(e){var t=this;if(void 0===e)return this.cache_.src||"";var n=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):Je(t)&&n.push(t)})),t=n}else t="string"==typeof t&&t.trim()?[Yr({src:t})]:Je(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[Yr(t)]:[];return t}(e);n.length?(this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),Br(this,n[0],(function(e,r){var i,o;if(t.middleware_=r,t.cache_.sources=n,t.updateSourceCaches_(e),t.src_(e))return n.length>1?t.src(n.slice(1)):(t.changingSrc_=!1,t.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void t.triggerReady());i=r,o=t.tech_,i.forEach((function(e){return e.setTech&&e.setTech(o)}))}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},n.src_=function(e){var t,n,r=this,i=this.selectSource([e]);return!i||(t=i.tech,n=this.techName_,vn(t)!==vn(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},n.load=function(){this.techCall_("load")},n.reset=function(){var e=this,t=this.options_.Promise||a.a.Promise;this.paused()||!t?this.doReset_():nr(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_(),an(this)&&this.trigger("playerreset")},n.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},n.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},n.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},n.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},n.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},n.currentSource=function(){return this.cache_.source||{}},n.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},n.currentType=function(){return this.currentSource()&&this.currentSource().type||""},n.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},n.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},n.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},n.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},n.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},n.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},n.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},n.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},n.error=function(e){if(void 0===e)return this.error_||null;if(this.options_.suppressNotSupportedError&&e&&4===e.code){var t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Zn(e),this.addClass("vjs-error"),Ge.error("(CODE:"+this.error_.code+" "+Zn.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},n.reportUserActivity=function(e){this.userActivity_=!0},n.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},n.listenForUserActivity_=function(){var e,t,n,r=nn(this,this.reportUserActivity),i=function(t){r(),this.clearInterval(e)};this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",i),this.on("mouseleave",i);var o,a=this.getChild("controlBar");!a||Fn||xn||(a.on("mouseenter",(function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0})),a.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(o);var e=this.options_.inactivityTimeout;e<=0||(o=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},n.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},n.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},n.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},n.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},n.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},n.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},n.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},n.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},n.language=function(e){if(void 0===e)return this.language_;this.language_=String(e).toLowerCase()},n.languages=function(){return bn(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=bn(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];(r=bn(r)).player=void 0,e.tracks[n]=r}return e},n.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var r=new ar(this,t);return this.addChild(r),r.on("dispose",(function(){n.removeChild(r)})),r.open(),r},n.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<Ro.length;n++){var r=Ro[n];if(t<=this.breakpoints_[r]){if(e===r)return;e&&this.removeClass(Lo[e]),this.addClass(Lo[r]),this.breakpoint_=r;break}}},n.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},n.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=Qe({},Io,e),this.updateCurrentBreakpoint_()),Qe(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 Lo[this.breakpoint_]||""},n.loadMedia=function(e,t){var n=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=bn(e);var r=this.cache_.media,i=r.artwork,o=r.poster,a=r.src,s=r.textTracks;!i&&o&&(this.cache_.media.artwork=[{src:o,type:Gr(o)}]),a&&this.src(a),o&&this.poster(o),Array.isArray(s)&&s.forEach((function(e){return n.addRemoteTextTrack(e,!1)})),this.ready(t)}},n.getMedia=function(){if(!this.cache_.media){var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:Gr(t.poster)}]),t}return bn(this.cache_.media)},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=mt(e),r=n["data-setup"];if(ct(e,"vjs-fill")&&(n.fill=!0),ct(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=y()(r||"{}"),o=i[0],a=i[1];o&&Ge.error(o),Qe(n,a)}if(Qe(t,n),e.hasChildNodes())for(var s=e.childNodes,u=0,l=s.length;u<l;u++){var c=s[u],f=c.nodeName.toLowerCase();"source"===f?t.sources.push(mt(c)):"track"===f&&t.tracks.push(mt(c))}return t},n.flexNotSupported_=function(){var e=u.a.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},t}(_n);Dr.names.forEach((function(e){var t=Dr[e];Do.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Do.prototype.crossorigin=Do.prototype.crossOrigin,Do.players={};var No=a.a.navigator;Do.prototype.options_={techOrder:Nr.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:No&&(No.languages&&No.languages[0]||No.userLanguage||No.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){Do.prototype[e]=function(){return this.techGet_(e)}})),Po.forEach((function(e){Do.prototype["handleTech"+vn(e)+"_"]=function(){return this.trigger(e)}})),_n.registerComponent("Player",Do);var jo={},Mo=function(e){return jo.hasOwnProperty(e)},Uo=function(e){return Mo(e)?jo[e]:void 0},Bo=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},Fo=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},zo=function(e,t){return t.prototype.name=e,function(){Fo(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=E()(t,[this].concat(r));return this[e]=function(){return o},Fo(this,o.getEventHash()),o}},Vo=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,pn(this),delete this.trigger,yn(this,this.constructor.defaultState),Bo(t,this.name),this.dispose=nn(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={}),Qt(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]=zo(e,jo[e])},e.isBasic=function(t){var n="string"==typeof t?Uo(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(Mo(t))Ge.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Do.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 jo[t]=n,"plugin"!==t&&(e.isBasic(n)?Do.prototype[t]=function(e,t){var n=function(){Fo(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return Bo(this,e),Fo(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):Do.prototype[t]=zo(t,n)),n},e.deregisterPlugin=function(e){if("plugin"===e)throw new Error("Cannot de-register base plugin.");Mo(e)&&(delete jo[e],delete Do.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(jo)),e.forEach((function(e){var n=Uo(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=Uo(e);return t&&t.VERSION||""},e}();Vo.getPlugin=Uo,Vo.BASE_PLUGIN_NAME="plugin",Vo.registerPlugin("plugin",Vo),Do.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},Do.prototype.hasPlugin=function(e){return!!Mo(e)};var Wo=function(e){return 0===e.indexOf("#")?e.slice(1):e};function Ho(e,t,n){var r=Ho.getPlayer(e);if(r)return t&&Ge.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"==typeof e?Rt("#"+Wo(e)):e;if(!it(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");i.ownerDocument.defaultView&&i.ownerDocument.body.contains(i)||Ge.warn("The element supplied is not included in the DOM"),t=t||{},Ho.hooks("beforesetup").forEach((function(e){var n=e(i,bn(t));Je(n)&&!Array.isArray(n)?t=bn(t,n):Ge.error("please return an object in beforesetup hooks")}));var o=_n.getComponent("Player");return r=new o(i,t,n),Ho.hooks("setup").forEach((function(e){return e(r)})),r}if(Ho.hooks_={},Ho.hooks=function(e,t){return Ho.hooks_[e]=Ho.hooks_[e]||[],t&&(Ho.hooks_[e]=Ho.hooks_[e].concat(t)),Ho.hooks_[e]},Ho.hook=function(e,t){Ho.hooks(e,t)},Ho.hookOnce=function(e,t){Ho.hooks(e,[].concat(t).map((function(t){return function n(){return Ho.removeHook(e,n),t.apply(void 0,arguments)}})))},Ho.removeHook=function(e,t){var n=Ho.hooks(e).indexOf(t);return!(n<=-1)&&(Ho.hooks_[e]=Ho.hooks_[e].slice(),Ho.hooks_[e].splice(n,1),!0)},!0!==a.a.VIDEOJS_NO_DYNAMIC_STYLE&&rt()){var qo=Rt(".vjs-styles-defaults");if(!qo){qo=Bt("vjs-styles-defaults");var Go=Rt("head");Go&&Go.insertBefore(qo,Go.firstChild),Ft(qo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}jt(1,Ho),Ho.VERSION="7.8.4",Ho.options=Do.prototype.options_,Ho.getPlayers=function(){return Do.players},Ho.getPlayer=function(e){var t,n=Do.players;if("string"==typeof e){var r=Wo(e),i=n[r];if(i)return i;t=Rt("#"+r)}else t=e;if(it(t)){var o=t,a=o.player,s=o.playerId;if(a||n[s])return a||n[s]}},Ho.getAllPlayers=function(){return Object.keys(Do.players).map((function(e){return Do.players[e]})).filter(Boolean)},Ho.players=Do.players,Ho.getComponent=_n.getComponent,Ho.registerComponent=function(e,t){Nr.isTech(t)&&Ge.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),_n.registerComponent.call(_n,e,t)},Ho.getTech=Nr.getTech,Ho.registerTech=Nr.registerTech,Ho.use=function(e,t){jr[e]=jr[e]||[],jr[e].push(t)},Object.defineProperty(Ho,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Ho.middleware,"TERMINATOR",{value:Ur,writeable:!1,enumerable:!0}),Ho.browser=Vn,Ho.TOUCH_ENABLED=Mn,Ho.extend=function(e,t){void 0===t&&(t={});var n=function(){e.apply(this,arguments)},r={};for(var i in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),C()(n,e),e&&(n.super_=e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},Ho.mergeOptions=bn,Ho.bind=nn,Ho.registerPlugin=Vo.registerPlugin,Ho.deregisterPlugin=Vo.deregisterPlugin,Ho.plugin=function(e,t){return Ge.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Vo.registerPlugin(e,t)},Ho.getPlugins=Vo.getPlugins,Ho.getPlugin=Vo.getPlugin,Ho.getPluginVersion=Vo.getPluginVersion,Ho.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),Ho.options.languages=bn(Ho.options.languages,((n={})[e]=t,n)),Ho.options.languages[e]},Ho.log=Ge,Ho.createLogger=Ye,Ho.createTimeRange=Ho.createTimeRanges=qn,Ho.formatTime=ui,Ho.setFormatTime=function(e){si=e},Ho.resetFormatTime=function(){si=ai},Ho.parseUrl=Tr,Ho.isCrossOrigin=Er,Ho.EventTarget=on,Ho.on=Kt,Ho.one=Jt,Ho.off=$t,Ho.trigger=Qt,Ho.xhr=_.a,Ho.TextTrack=Or,Ho.AudioTrack=Pr,Ho.VideoTrack=Ar,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){Ho[e]=function(){return Ge.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),It[e].apply(null,arguments)}})),Ho.computedStyle=et,Ho.dom=It,Ho.url=kr,Ho.defineLazyProperty=xo;
45
+ /**
46
+ * @videojs/http-streaming
47
+ * @version 1.13.2
48
+ * @copyright 2020 Brightcove, Inc
49
+ * @license Apache-2.0
50
+ */
51
+ var Yo=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=O.a.buildAbsoluteURL(a.a.location.href,e)),O.a.buildAbsoluteURL(e,t))},Xo=function(e,t,n){return e&&n.responseURL&&t!==n.responseURL?n.responseURL:t},Ko=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},$o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Qo=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},Jo=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},Zo=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},ea=Ho.mergeOptions,ta=Ho.EventTarget,na=Ho.log,ra=function(e,t){["AUDIO","SUBTITLES"].forEach((function(n){for(var r in e.mediaGroups[n])for(var i in e.mediaGroups[n][r]){var o=e.mediaGroups[n][r][i];t(o,n,r,i)}}))},ia=function(e,t){var n=ea(e,{}),r=n.playlists[t.id];if(!r)return null;if(r.segments&&t.segments&&r.segments.length===t.segments.length&&r.endList===t.endList&&r.mediaSequence===t.mediaSequence)return null;var i=ea(r,t);r.segments&&(i.segments=function(e,t,n){var r=t.slice();n=n||0;for(var i=Math.min(e.length,t.length+n),o=n;o<i;o++)r[o-n]=ea(e[o],r[o-n]);return r}(r.segments,t.segments,t.mediaSequence-r.mediaSequence)),i.segments.forEach((function(e){!function(e,t){e.resolvedUri||(e.resolvedUri=Yo(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Yo(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Yo(t,e.map.uri))}(e,i.resolvedUri)}));for(var o=0;o<n.playlists.length;o++)n.playlists[o].id===t.id&&(n.playlists[o]=i);return n.playlists[t.id]=i,n.playlists[t.uri]=i,n},oa=function(e,t){return e+"-"+t},aa=function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];n.resolvedUri=Yo(e.uri,n.uri),n.id=oa(t,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes||(n.attributes={},na.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}},sa=function(e){ra(e,(function(t){t.uri&&(t.resolvedUri=Yo(e.uri,t.uri))}))},ua=function(e,t){var n=e.segments[e.segments.length-1];return t&&n&&n.duration?1e3*n.duration:500*(e.targetDuration||10)},la=function(e){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ko(this,t);var i=Jo(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),o=r.withCredentials,a=void 0!==o&&o,s=r.handleManifestRedirects,u=void 0!==s&&s;i.srcUrl=e,i.hls_=n,i.withCredentials=a,i.handleManifestRedirects=u;var l=n.options_;if(i.customTagParsers=l&&l.customTagParsers||[],i.customTagMappers=l&&l.customTagMappers||[],!i.srcUrl)throw new Error("A non-empty playlist URL is required");return i.state="HAVE_NOTHING",i.on("mediaupdatetimeout",(function(){"HAVE_METADATA"===i.state&&(i.state="HAVE_CURRENT_METADATA",i.request=i.hls_.xhr({uri:Yo(i.master.uri,i.media().uri),withCredentials:i.withCredentials},(function(e,t){if(i.request)return e?i.playlistRequestError(i.request,i.media(),"HAVE_METADATA"):void i.haveMetadata(i.request,i.media().uri,i.media().id)})))})),i}return Qo(t,e),$o(t,[{key:"playlistRequestError",value:function(e,t,n){var r=t.uri,i=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[i],status:e.status,message:"HLS playlist request error at URL: "+r+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")}},{key:"haveMetadata",value:function(e,t,n){var r=this;this.request=null,this.state="HAVE_METADATA";var i=new j;this.customTagParsers.forEach((function(e){return i.addParser(e)})),this.customTagMappers.forEach((function(e){return i.addTagMapper(e)})),i.push(e.responseText),i.end(),i.manifest.uri=t,i.manifest.id=n,i.manifest.attributes=i.manifest.attributes||{};var o=ia(this.master,i.manifest);this.targetDuration=i.manifest.targetDuration,o?(this.master=o,this.media_=this.master.playlists[n]):this.trigger("playlistunchanged"),this.media().endList||(a.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=a.a.setTimeout((function(){r.trigger("mediaupdatetimeout")}),ua(this.media(),!!o))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.trigger("dispose"),this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),a.a.clearTimeout(this.finalRenditionTimeout),this.off()}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"media",value: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(a.a.clearTimeout(this.finalRenditionTimeout),t){var r=e.targetDuration/2*1e3||5e3;this.finalRenditionTimeout=a.a.setTimeout(this.media.bind(this,e,!1),r)}else{var i=this.state,o=!this.media_||e.id!==this.media_.id;if(this.master.playlists[e.id].endList)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(o&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(o){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.hls_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(function(t,r){if(n.request){if(e.resolvedUri=Xo(n.handleManifestRedirects,e.resolvedUri,r),t)return n.playlistRequestError(n.request,e,i);n.haveMetadata(r,e.uri,e.id),"HAVE_MASTER"===i?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}}},{key:"pause",value:function(){this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}},{key:"load",value:function(e){var t=this;a.a.clearTimeout(this.mediaUpdateTimeout);var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=a.a.setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}},{key:"start",value:function(){var e=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,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.srcUrl+".",responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");var r=new j;if(e.customTagParsers.forEach((function(e){return r.addParser(e)})),e.customTagMappers.forEach((function(e){return r.addTagMapper(e)})),r.push(n.responseText),r.end(),e.state="HAVE_MASTER",e.srcUrl=Xo(e.handleManifestRedirects,e.srcUrl,n),r.manifest.uri=e.srcUrl,r.manifest.playlists)return e.master=r.manifest,aa(e.master),sa(e.master),e.trigger("loadedplaylist"),void(e.request||e.media(r.manifest.playlists[0]));var i=oa(0,e.srcUrl);return e.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:a.a.location.href,playlists:[{uri:e.srcUrl,id:i,resolvedUri:e.srcUrl,attributes:{}}]},e.master.playlists[i]=e.master.playlists[0],e.master.playlists[e.srcUrl]=e.master.playlists[0],e.haveMetadata(n,e.srcUrl,i),e.trigger("loadedmetadata")}}))}}]),t}(ta),ca=Ho.createTimeRange,fa=function(e,t,n){var r,i;return void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence?0:(r=function(e,t){var n=0,r=t-e.mediaSequence,i=e.segments[r];if(i){if(void 0!==i.start)return{result:i.start,precise:!0};if(void 0!==i.end)return{result:i.end-i.duration,precise:!0}}for(;r--;){if(void 0!==(i=e.segments[r]).end)return{result:n+i.end,precise:!0};if(n+=i.duration,void 0!==i.start)return{result:n+i.start,precise:!0}}return{result:n,precise:!1}}(e,t)).precise?r.result:(i=function(e,t){for(var n=0,r=void 0,i=t-e.mediaSequence;i<e.segments.length;i++){if(void 0!==(r=e.segments[i]).start)return{result:r.start-n,precise:!0};if(n+=r.duration,void 0!==r.end)return{result:r.end-n,precise:!0}}return{result:-1,precise:!1}}(e,t)).precise?i.result:r.result+n},ha=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 a.a.Infinity}return fa(e,t,n)},da=function(e,t,n){var r=0;if(t>n){var i=[n,t];t=i[0],n=i[1]}if(t<0){for(var o=t;o<Math.min(0,n);o++)r+=e.targetDuration;t=0}for(var a=t;a<n;a++)r+=e.segments[a].duration;return r},pa=function(e,t){if(!e.segments.length)return 0;var n=e.segments.length,r=e.segments[n-1].duration||e.targetDuration,i="number"==typeof t?t:r+2*e.targetDuration;if(0===i)return n;for(var o=0;n--&&!((o+=e.segments[n].duration)>=i););return Math.max(0,n)},ma=function(e,t,n,r){if(!e||!e.segments)return null;if(e.endList)return ha(e);if(null===t)return null;t=t||0;var i=n?pa(e,r):e.segments.length;return fa(e,e.mediaSequence+i,t)},ya=function(e){return e-Math.floor(e)==0},ga=function(e,t){if(ya(t))return t+.1*e;for(var n=t.toString().split(".")[1].length,r=1;r<=n;r++){var i=Math.pow(10,r),o=t*i;if(ya(o)||r===n)return(o+e)/i}},va=ga.bind(null,1),ba=ga.bind(null,-1),_a=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Ta=function(e){return e.excludeUntil&&e.excludeUntil===1/0},wa=function(e){var t=_a(e);return!e.disabled&&!t},Sa=function(e,t){return t.attributes&&t.attributes[e]},Ea=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!!wa(e)&&(e.attributes.BANDWIDTH||0)<n})).length},ka={duration:ha,seekable:function(e,t,n){var r=t||0,i=ma(e,t,!0,n);return null===i?ca():ca(r,i)},safeLiveIndex:pa,getMediaInfoForTime:function(e,t,n,r){var i=void 0,o=void 0,a=e.segments.length,s=t-r;if(s<0){if(n>0)for(i=n-1;i>=0;i--)if(o=e.segments[i],(s+=ba(o.duration))>0)return{mediaIndex:i,startTime:r-da(e,n,i)};return{mediaIndex:0,startTime:t}}if(n<0){for(i=n;i<0;i++)if((s-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};n=0}for(i=n;i<a;i++)if(o=e.segments[i],(s-=va(o.duration))<0)return{mediaIndex:i,startTime:r+da(e,n,i)};return{mediaIndex:a-1,startTime:t}},isEnabled:wa,isDisabled:function(e){return e.disabled},isBlacklisted:_a,isIncompatible:Ta,playlistEnd:ma,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},isFmp4:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].map)return!0;return!1},hasAttribute:Sa,estimateSegmentRequestTime:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!Sa("BANDWIDTH",n))return NaN;var i=e*n.attributes.BANDWIDTH;return(i-8*r)/t},isLowestEnabledRendition:Ea},Ca=Ho.xhr,xa=Ho.mergeOptions,Oa=function(){return function e(t,n){t=xa({timeout:45e3},t);var r=e.beforeRequest||Ho.Hls.xhr.beforeRequest;if(r&&"function"==typeof r){var i=r(t);i&&(t=i)}var o=Ca(t,(function(e,t){var r=o.response;!e&&r&&(o.responseTime=Date.now(),o.roundTripTime=o.responseTime-o.requestTime,o.bytesReceived=r.byteLength||r.length,o.bandwidth||(o.bandwidth=Math.floor(o.bytesReceived/o.roundTripTime*8*1e3))),t.headers&&(o.responseHeaders=t.headers),e&&"ETIMEDOUT"===e.code&&(o.timedout=!0),e||o.aborted||200===t.statusCode||206===t.statusCode||0===t.statusCode||(e=new Error("XHR Failed with a response of: "+(o&&(r||o.responseText)))),n(e,o)})),a=o.abort;return o.abort=function(){return o.aborted=!0,a.apply(o,arguments)},o.uri=t.uri,o.requestTime=Date.now(),o}},Pa=function(e){var t,n,r={};return e.byterange&&(r.Range=(t=e.byterange,n=t.offset+t.length-1,"bytes="+t.offset+"-"+n)),r},Aa=function(e,t){return e.start(t)+"-"+e.end(t)},Ra=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},La=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Ia=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];ArrayBuffer.isView(r)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t},Da=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Na=function(e){return e.resolvedUri},ja=function(e){for(var t=Array.prototype.slice.call(e),n="",r=0;r<t.length/16;r++)n+=t.slice(16*r,16*r+16).map(Ra).join("")+" "+t.slice(16*r,16*r+16).map(La).join("")+"\n";return n},Ma=Object.freeze({createTransferableMessage:Ia,initSegmentId:Da,segmentKeyId:Na,hexDump:ja,tagDump:function(e){var t=e.bytes;return ja(t)},textRanges:function(e){var t="",n=void 0;for(n=0;n<e.length;n++)t+=Aa(e,n)+" ";return t}}),Ua=function(e){var t=e.playlist,n=e.time,r=void 0===n?void 0:n,i=e.callback;if(!i)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===r)return i({message:"getProgramTime: playlist and time must be provided"});var o=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var n=0,r=void 0,i=0;i<t.segments.length&&!(e<=(n=(r=t.segments[i]).videoTimingInfo?r.videoTimingInfo.transmuxedPresentationEnd:n+r.duration));i++);var o=t.segments[t.segments.length-1];if(o.videoTimingInfo&&o.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>n){if(e>n+.25*o.duration)return null;r=o}return{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:n-r.duration,type:r.videoTimingInfo?"accurate":"estimate"}}(r,t);if(!o)return i({message:"valid programTime was not found"});if("estimate"===o.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:o.estimatedStart});var a={mediaSeconds:r},s=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,r=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*r)}(r,o.segment);return s&&(a.programDateTime=s.toISOString()),i(null,a)},Ba=function e(t){var n=t.programTime,r=t.playlist,i=t.retryCount,o=void 0===i?2:i,a=t.seekTo,s=t.pauseAfterSeek,u=void 0===s||s,l=t.tech,c=t.callback;if(!c)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!r||!a)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.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}(r))return c({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});var f=function(e,t){var n=void 0;try{n=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var r=t.segments[0];if(n<r.dateTimeObject)return null;for(var i=0;i<t.segments.length-1;i++){if(r=t.segments[i],n<t.segments[i+1].dateTimeObject)break}var o,a=t.segments[t.segments.length-1],s=a.dateTimeObject,u=a.videoTimingInfo?(o=a.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:a.duration+.25*a.duration;return n>new Date(s.getTime()+1e3*u)?null:(n>s&&(r=a),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:ka.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(n,r);if(!f)return c({message:n+" was not found in the stream"});var h=f.segment,d=function(e,t){var n=void 0,r=void 0;try{n=new Date(e),r=new Date(t)}catch(e){}var i=n.getTime();return(r.getTime()-i)/1e3}(h.dateTimeObject,n);if("estimate"===f.type)return 0===o?c({message:n+" is not buffered yet. Try again"}):(a(f.estimatedStart+d),void l.one("seeked",(function(){e({programTime:n,playlist:r,retryCount:o-1,seekTo:a,pauseAfterSeek:u,tech:l,callback:c})})));var p=h.start+d;l.one("seeked",(function(){return c(null,l.currentTime())})),u&&l.pause(),a(p)},Fa=function(e,t){var n=[],r=void 0;if(e&&e.length)for(r=0;r<e.length;r++)t(e.start(r),e.end(r))&&n.push([e.start(r),e.end(r)]);return Ho.createTimeRanges(n)},za=function(e,t){return Fa(e,(function(e,n){return e-.1<=t&&n+.1>=t}))},Va=function(e,t){return Fa(e,(function(e){return e-1/30>=t}))},Wa=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(", ")},Ha=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},qa=function(e,t,n){var r=void 0,i=void 0;if(n&&n.cues)for(r=n.cues.length;r--;)(i=n.cues[r]).startTime<=t&&i.endTime>=e&&n.removeCue(i)},Ga=function(e){return isNaN(e)||Math.abs(e)===1/0?Number.MAX_VALUE:e},Ya=function(e,t,n){var r=a.a.WebKitDataCue||a.a.VTTCue;if(t&&t.forEach((function(e){var t=e.stream;this.inbandTextTracks_[t].addCue(new r(e.startTime+this.timestampOffset,e.endTime+this.timestampOffset,e.text))}),e),n){var i=Ga(e.mediaSource_.duration);if(n.forEach((function(e){var t=e.cueTime+this.timestampOffset;!("number"!=typeof t||a.a.isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var n=new r(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Ho.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Ho.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Ho.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),this.metadataTrack_.addCue(n)}),this)}),e),e.metadataTrack_&&e.metadataTrack_.cues&&e.metadataTrack_.cues.length){for(var o=e.metadataTrack_.cues,s=[],u=0;u<o.length;u++)o[u]&&s.push(o[u]);var l=s.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),c=Object.keys(l).sort((function(e,t){return Number(e)-Number(t)}));c.forEach((function(e,t){var n=l[e],r=Number(c[t+1])||i;n.forEach((function(e){e.endTime=r}))}))}}},Xa="undefined"!=typeof window?window:{},Ka="undefined"==typeof Symbol?"__target":Symbol(),$a=Xa.BlobBuilder||Xa.WebKitBlobBuilder||Xa.MozBlobBuilder||Xa.MSBlobBuilder,Qa=Xa.URL||Xa.webkitURL||Qa&&Qa.msURL,Ja=Xa.Worker;function Za(e,t){return function(n){var r=this;if(!t)return new Ja(e);if(Ja&&!n){var i=rs(t.toString().replace(/^function.+?{/,"").slice(0,-1));return this[Ka]=new Ja(i),function(e,t){if(!e||!t)return;var n=e.terminate;e.objURL=t,e.terminate=function(){e.objURL&&Qa.revokeObjectURL(e.objURL),n.call(e)}}(this[Ka],i),this[Ka]}var o={postMessage:function(e){r.onmessage&&setTimeout((function(){r.onmessage({data:e,target:o})}))}};t.call(o),this.postMessage=function(e){setTimeout((function(){o.onmessage({data:e,target:r})}))},this.isThisThread=!0}}if(Ja){var es,ts=rs("self.onmessage = function () {}"),ns=new Uint8Array(1);try{(es=new Ja(ts)).postMessage(ns,[ns.buffer])}catch(e){Ja=null}finally{Qa.revokeObjectURL(ts),es&&es.terminate()}}function rs(e){try{return Qa.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(n){var t=new $a;return t.append(e),Qa.createObjectURL(t.getBlob(type))}}var is=new Za("./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 r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,o;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){e={}}}};e.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},e.prototype.push=function(e){this.trigger("data",e)},e.prototype.flush=function(e){this.trigger("done",e)},e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},e.prototype.reset=function(e){this.trigger("reset",e)};var t,r,i,o,a,s,u,l,c,f,h,d,p,m,y,g,v,b,_,T,w,S,E,k,C,x,O,P,A,R,L,I,D,N,j,M,U,B,F,z,V=e,W=Math.pow(2,32)-1;!function(){var e;if(S={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in S)S.hasOwnProperty(e)&&(S[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);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]),O=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),P={video:x,audio:O},L=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),R=new Uint8Array([0,0,0,0,0,0,0,0]),I=new Uint8Array([0,0,0,0,0,0,0,0]),D=I,N=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),j=I,A=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),t=function(e){var t,n,r=[],i=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)i+=r[t].byteLength;for(n=new Uint8Array(i+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,i=8;t<r.length;t++)n.set(r[t],i),i+=r[t].byteLength;return n},r=function(){return t(S.dinf,t(S.dref,L))},i=function(e){return t(S.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},y=function(e){return t(S.hdlr,P[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(S.mdhd,n)},p=function(e){return t(S.mdia,m(e),y(e.type),s(e))},a=function(e){return t(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},s=function(e){return t(S.minf,"video"===e.type?t(S.vmhd,A):t(S.smhd,R),r(),v(e))},u=function(e,n){for(var r=[],i=n.length;i--;)r[i]=_(n[i]);return t.apply(null,[S.moof,a(e)].concat(r))},l=function(e){for(var n=e.length,r=[];n--;)r[n]=h(e[n]);return t.apply(null,[S.moov,f(4294967295)].concat(r).concat(c(e)))},c=function(e){for(var n=e.length,r=[];n--;)r[n]=T(e[n]);return t.apply(null,[S.mvex].concat(r))},f=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t(S.mvhd,n)},g=function(e){var n,r,i=e.samples||[],o=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,o[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t(S.sdtp,o)},v=function(e){return t(S.stbl,b(e),t(S.stts,j),t(S.stsc,D),t(S.stsz,N),t(S.stco,I))},b=function(e){return t(S.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?M(e):U(e))},M=function(e){var n,r,i=e.sps||[],o=e.pps||[],a=[],s=[];for(n=0;n<i.length;n++)a.push((65280&i[n].byteLength)>>>8),a.push(255&i[n].byteLength),a=a.concat(Array.prototype.slice.call(i[n]));for(n=0;n<o.length;n++)s.push((65280&o[n].byteLength)>>>8),s.push(255&o[n].byteLength),s=s.concat(Array.prototype.slice.call(o[n]));if(r=[S.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),t(S.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length],a,[o.length],s))),t(S.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var u=e.sarRatio[0],l=e.sarRatio[1];r.push(t(S.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,r)},U=function(e){return t(S.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),i(e))},d=function(e){var n=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return t(S.tkhd,n)},_=function(e){var n,r,i,o,a,s;return n=t(S.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/(W+1)),s=Math.floor(e.baseMediaDecodeTime%(W+1)),r=t(S.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===e.type?(i=w(e,92),t(S.traf,n,r,i)):(o=g(e),i=w(e,o.length+92),t(S.traf,n,r,i,o))},h=function(e){return e.duration=e.duration||4294967295,t(S.trak,d(e),p(e))},T=function(e){var n=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(n[n.length-1]=0),t(S.trex,n)},z=function(e,t){var n=0,r=0,i=0,o=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(i=4),void 0!==e[0].compositionTimeOffset&&(o=8)),[0,0,n|r|i|o,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,n){var r,i,o,a;for(n+=20+16*(i=e.samples||[]).length,r=z(i,n),a=0;a<i.length;a++)o=i[a],r=r.concat([(4278190080&o.duration)>>>24,(16711680&o.duration)>>>16,(65280&o.duration)>>>8,255&o.duration,(4278190080&o.size)>>>24,(16711680&o.size)>>>16,(65280&o.size)>>>8,255&o.size,o.flags.isLeading<<2|o.flags.dependsOn,o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,61440&o.flags.degradationPriority,15&o.flags.degradationPriority,(4278190080&o.compositionTimeOffset)>>>24,(16711680&o.compositionTimeOffset)>>>16,(65280&o.compositionTimeOffset)>>>8,255&o.compositionTimeOffset]);return t(S.trun,new Uint8Array(r))},B=function(e,n){var r,i,o,a;for(n+=20+8*(i=e.samples||[]).length,r=z(i,n),a=0;a<i.length;a++)o=i[a],r=r.concat([(4278190080&o.duration)>>>24,(16711680&o.duration)>>>16,(65280&o.duration)>>>8,255&o.duration,(4278190080&o.size)>>>24,(16711680&o.size)>>>16,(65280&o.size)>>>8,255&o.size]);return t(S.trun,new Uint8Array(r))},w=function(e,t){return"audio"===e.type?B(e,t):F(e,t)};o=function(){return t(S.ftyp,E,k,E,C)};var H,q,G,Y,X,K,$,Q,J=function(e){return t(S.mdat,e)},Z=u,ee=function(e){var t,n=o(),r=l(e);return(t=new Uint8Array(n.byteLength+r.byteLength)).set(n),t.set(r,n.byteLength),t},te=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},ne=function(e){var t,n,r=[],i=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,r.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(r.length&&(r.duration=n.dts-r.dts,i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r)),(r=[n]).byteLength=n.data.byteLength,r.pts=n.pts,r.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(r.keyFrame=!0),r.duration=n.dts-r.dts,r.byteLength+=n.data.byteLength,r.push(n));return i.length&&(!r.duration||r.duration<=0)&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r),i},re=function(e){var t,n,r=[],i=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(r.length&&(i.push(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration),(r=[n]).nalCount=n.length,r.byteLength=n.byteLength,r.pts=n.pts,r.dts=n.dts,r.duration=n.duration):(r.duration+=n.duration,r.nalCount+=n.length,r.byteLength+=n.byteLength,r.push(n));return i.length&&r.duration<=0&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration,i.push(r),i},ie=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},oe=function(e,t){var n,r,i,o,a,s=t||0,u=[];for(n=0;n<e.length;n++)for(o=e[n],r=0;r<o.length;r++)a=o[r],s+=(i=te(a,s)).size,u.push(i);return u},ae=function(e){var t,n,r,i,o,a,s=0,u=e.byteLength,l=e.nalCount,c=new Uint8Array(u+4*l),f=new DataView(c.buffer);for(t=0;t<e.length;t++)for(i=e[t],n=0;n<i.length;n++)for(o=i[n],r=0;r<o.length;r++)a=o[r],f.setUint32(s,a.data.byteLength),s+=4,c.set(a.data,s),s+=a.data.byteLength;return c},se=[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={96e3:[se,[227,64],le(154),[56]],88200:[se,[231],le(170),[56]],64e3:[se,[248,192],le(240),[56]],48e3:[se,[255,192],le(268),[55,148,128],le(54),[112]],44100:[se,[255,192],le(268),[55,163,128],le(84),[112]],32e3:[se,[255,192],le(268),[55,234],le(226),[112]],24e3:[se,[255,192],le(268),[55,255,128],le(268),[111,112],le(126),[224]],16e3:[se,[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]]},fe=(H=ce,Object.keys(H).reduce((function(e,t){return e[t]=new Uint8Array(H[t].reduce((function(e,t){return e.concat(t)}),[])),e}),{}));K=function(e,t){return q(X(e,t))},$=function(e,t){return G(Y(e),t)},Q=function(e,t,n){return Y(n?e:e-t)};var he=9e4,de=(q=function(e){return 9e4*e},G=function(e,t){return e*t},Y=function(e){return e/9e4},X=function(e,t){return e/t},K),pe=$,me=Q,ye=function(e,t,n,r){var i,o,a,s,u,l=0,c=0,f=0;if(t.length&&(i=de(e.baseMediaDecodeTime,e.samplerate),o=Math.ceil(he/(e.samplerate/1024)),n&&r&&(l=i-Math.max(n,r),f=(c=Math.floor(l/o))*o),!(c<1||f>he/2))){for((a=fe[e.samplerate])||(a=t[0].data),s=0;s<c;s++)u=t[0],t.splice(0,0,{data:a,dts:u.dts-o,pts:u.pts-o});e.baseMediaDecodeTime-=Math.floor(pe(f,e.samplerate))}},ge=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)})))},ve=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],r.push({size:n.data.byteLength,duration:1024});return r},be=function(e){var t,n,r=0,i=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],i.set(n.data,r),r+=n.data.byteLength;return i},_e=he,Te=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},we=function(e,t){var n,r=e.minSegmentDts;return t||(r-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=r,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/_e,n=Math.floor(n)),n},Se=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){for(var t=0,n={payloadType:-1,payloadSize:0},r=0,i=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)i+=255,t++;if(i+=e[t++],!n.payload&&4===r){n.payloadType=r,n.payloadSize=i,n.payload=e.subarray(t,t+i);break}t+=i,r=0,i=0}return n},ke=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)},Ce=function(e,t){var n,r,i,o,a=[];if(!(64&t[0]))return a;for(r=31&t[0],n=0;n<r;n++)o={type:3&t[(i=3*n)+2],pts:e},4&t[i+2]&&(o.ccData=t[i+3]<<8|t[i+4],a.push(o));return a},xe=4,Oe=function e(){e.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new Ie(0,0),new Ie(0,1),new Ie(1,0),new Ie(1,1)],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)};(Oe.prototype=new V).push=function(e){var t,n,r;if("sei_rbsp"===e.nalUnitType&&(t=Ee(e.escapedRBSP)).payloadType===xe&&(n=ke(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=Ce(e.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Oe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},Oe.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),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},Oe.prototype.flush=function(){return this.flushStream("flush")},Oe.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Oe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},Oe.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)},Oe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},Oe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},Oe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)};var Pe={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},Ae=function(e){return null===e?"":(e=Pe[e]||e,String.fromCharCode(e))},Re=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Le=function(){for(var e=[],t=15;t--;)e.push("");return e},Ie=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,r,i,o;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Le();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Le();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Le()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,i))o=Ae((r=(3&r)<<8)|i),this[this.mode_](e.pts,o),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),o=Ae((r=(3&r)<<8)|i),this[this.mode_](e.pts,o),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var a=Re.indexOf(7968&t);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),o=Ae(r),o+=Ae(i),this[this.mode_](e.pts,o),this.column_+=o.length)}else this.lastControlCode_=null}};Ie.prototype=new V,Ie.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_})},Ie.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Le(),this.nonDisplayed_=Le(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ie.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_},Ie.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ie.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ie.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ie.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ie.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ie.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ie.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ie.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Le(),this.displayed_=Le()),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},Ie.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)},Ie.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)}},Ie.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},Ie.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},Ie.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_]=""},Ie.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var De={CaptionStream:Oe,Cea608Stream:Ie},Ne={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},je=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Me=function e(t){var n,r;e.prototype.init.call(this),this.type_=t||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===r&&(r=e.dts),e.dts=je(e.dts,r),e.pts=je(e.pts,r),n=e.dts,this.trigger("data",e))},this.flush=function(){r=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){r=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Me.prototype=new V;var Ue,Be=Me,Fe=function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i},ze=function(e,t,n){return decodeURIComponent(Fe(e,t,n))},Ve=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},We={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=ze(e.data,1,t),e.value=ze(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=ze(e.data,1,t),e.url=ze(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(Fe(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(Ue=function(e){var t,n={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},r=0,i=[],o=0;if(Ue.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,a,s,u,l;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(o=0,i.length=0),0===i.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))n.debug&&console.log("Skipping unrecognized metadata packet");else if(i.push(e),o+=e.data.byteLength,1===i.length&&(r=Ve(e.data.subarray(6,10)),r+=10),!(o<r)){for(t={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},l=0;l<r;)t.data.set(i[0].data.subarray(0,r-l),l),l+=i[0].data.byteLength,o-=i[0].data.byteLength,i.shift();a=10,64&t.data[5]&&(a+=4,a+=Ve(t.data.subarray(10,14)),r-=Ve(t.data.subarray(16,20)));do{if((s=Ve(t.data.subarray(a+4,a+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((u={id:String.fromCharCode(t.data[a],t.data[a+1],t.data[a+2],t.data[a+3]),data:t.data.subarray(a+10,a+s+10)}).key=u.id,We[u.id]&&(We[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){var c=u.data,f=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;f*=4,f+=3&c[7],u.timeStamp=f,void 0===t.pts&&void 0===t.dts&&(t.pts=u.timeStamp,t.dts=u.timeStamp),this.trigger("timestamp",u)}t.frames.push(u),a+=10,a+=s}while(a<r);this.trigger("data",t)}}}).prototype=new V;var He,qe,Ge,Ye=Ue,Xe=Be;(He=function(){var e=new Uint8Array(188),t=0;He.prototype.init.call(this),this.push=function(n){var r,i=0,o=188;for(t?((r=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),r.set(n,t),t=0):r=n;o<r.byteLength;)71!==r[i]||71!==r[o]?(i++,o++):(this.trigger("data",r.subarray(i,o)),i+=188,o+=188);i<r.byteLength&&(e.set(r.subarray(i),0),t=r.byteLength-i)},this.flush=function(){188===t&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new V,(qe=function(){var e,t,n,r;qe.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var i=0;r.payloadUnitStartIndicator&&(i+=e[i]+1),"pat"===r.type?t(e.subarray(i),r):n(e.subarray(i),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},n=function(e,t){var n,i;if(1&e[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,i=12+((15&e[10])<<8|e[11]);i<n;){var o=e[i],a=(31&e[i+1])<<8|e[i+2];o===Ne.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=a:o===Ne.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=a:o===Ne.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][a]=o),i+=5+((15&e[i+3])<<8|e[i+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===n.pid)n.type="pat",e(t.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,n]):this.processPes_(t,r,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=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)}}).prototype=new V,qe.STREAM_TYPES={h264:27,adts:15},(Ge=function(){var e,t=this,n={data:[],size:0},r={data:[],size:0},i={data:[],size:0},o=function(e,n,r){var i,o,a=new Uint8Array(e.size),s={type:n},u=0,l=0;if(e.data.length&&!(e.size<9)){for(s.trackId=e.data[0].pid,u=0;u<e.data.length;u++)o=e.data[u],a.set(o.data,l),l+=o.data.byteLength;var c,f,h;c=a,(f=s).packetLength=6+(c[4]<<8|c[5]),f.dataAlignmentIndicator=0!=(4&c[6]),192&(h=c[7])&&(f.pts=(14&c[9])<<27|(255&c[10])<<20|(254&c[11])<<12|(255&c[12])<<5|(254&c[13])>>>3,f.pts*=4,f.pts+=(6&c[13])>>>1,f.dts=f.pts,64&h&&(f.dts=(14&c[14])<<27|(255&c[15])<<20|(254&c[16])<<12|(255&c[17])<<5|(254&c[18])>>>3,f.dts*=4,f.dts+=(6&c[18])>>>1)),f.data=c.subarray(9+c[8]),i="video"===n||s.packetLength<=e.size,(r||i)&&(e.size=0,e.data.length=0),i&&t.trigger("data",s)}};Ge.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var e,t;switch(a.streamType){case Ne.H264_STREAM_TYPE:case Ne.H264_STREAM_TYPE:e=n,t="video";break;case Ne.ADTS_STREAM_TYPE:e=r,t="audio";break;case Ne.METADATA_STREAM_TYPE:e=i,t="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&o(e,t,!0),e.data.push(a),e.size+=a.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(e=a.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",n)}})[a.type]()},this.reset=function(){n.size=0,n.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){o(n,"video"),o(r,"audio"),o(i,"timed-metadata")},this.flush=function(){this.flushStreams_(),this.trigger("done")}}).prototype=new V;var Ke={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:He,TransportParseStream:qe,ElementaryStream:Ge,TimestampRolloverStream:Xe,CaptionStream:De.CaptionStream,Cea608Stream:De.Cea608Stream,MetadataStream:Ye};for(var $e in Ne)Ne.hasOwnProperty($e)&&(Ke[$e]=Ne[$e]);var Qe,Je=Ke,Ze=he,et=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(Qe=function(e){var t,n=0;Qe.prototype.init.call(this),this.push=function(r){var i,o,a,s,u,l,c=0;if(e||(n=0),"audio"===r.type)for(t?(s=t,(t=new Uint8Array(s.byteLength+r.data.byteLength)).set(s),t.set(r.data,s.byteLength)):t=r.data;c+5<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(o=2*(1&~t[c+1]),i=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=(u=1024*(1+(3&t[c+6])))*Ze/et[(60&t[c+2])>>>2],a=c+i,t.byteLength<a)return;if(this.trigger("data",{pts:r.pts+n*l,dts:r.dts+n*l,sampleCount:u,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:et[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+o,a)}),n++,t.byteLength===a)return void(t=void 0);t=t.subarray(a)}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")}}).prototype=new V;var tt,nt,rt,it=Qe,ot=function(e){var t=e.byteLength,n=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var i=e.byteLength-t,o=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");o.set(e.subarray(i,i+a)),n=new DataView(o.buffer).getUint32(0),r=8*a,t-=a},this.skipBits=function(e){var i;r>e?(n<<=e,r-=e):(e-=r,e-=8*(i=Math.floor(e/8)),t-=i,this.loadWord(),n<<=e,r-=e)},this.readBits=function(e){var i=Math.min(r,e),o=n>>>32-i;return(r-=i)>0?n<<=i:t>0&&this.loadWord(),(i=e-i)>0?o<<i|this.readBits(i):o},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(0!=(n&2147483648>>>e))return n<<=e,r-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(nt=function(){var e,t,n=0;nt.prototype.init.call(this),this.push=function(r){var i;t?((i=new Uint8Array(t.byteLength+r.data.byteLength)).set(t),i.set(r.data,t.byteLength),t=i):t=r.data;for(var o=t.byteLength;n<o-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<o;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<o);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.reset=function(){t=null,n=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new V,rt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(tt=function(){var e,t,n,r,i,o,a,s=new nt;tt.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,r=e.dts,s.push(e))},s.on("data",(function(a){var s={trackId:t,pts:n,dts:r,data:a};switch(31&a[0]){case 5:s.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:s.nalUnitType="sei_rbsp",s.escapedRBSP=i(a.subarray(1));break;case 7:s.nalUnitType="seq_parameter_set_rbsp",s.escapedRBSP=i(a.subarray(1)),s.config=o(s.escapedRBSP);break;case 8:s.nalUnitType="pic_parameter_set_rbsp";break;case 9:s.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",s)})),s.on("done",(function(){e.trigger("done")})),s.on("partialdone",(function(){e.trigger("partialdone")})),s.on("reset",(function(){e.trigger("reset")})),s.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){s.flush()},this.partialFlush=function(){s.partialFlush()},this.reset=function(){s.reset()},this.endTimeline=function(){s.endTimeline()},a=function(e,t){var n,r=8,i=8;for(n=0;n<e;n++)0!==i&&(i=(r+t.readExpGolomb()+256)%256),r=0===i?r:i},i=function(e){for(var t,n,r=e.byteLength,i=[],o=1;o<r-2;)0===e[o]&&0===e[o+1]&&3===e[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var a=0;for(o=0;o<t;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=e[a];return n},o=function(e){var t,n,r,i,o,s,u,l,c,f,h,d,p,m=0,y=0,g=0,v=0,b=1;if(n=(t=new ot(e)).readUnsignedByte(),i=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),rt[n]&&(3===(o=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==o?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(s=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===s)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),p=0;p<u;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(f=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:d=[1,1];break;case 2:d=[12,11];break;case 3:d=[10,11];break;case 4:d=[16,11];break;case 5:d=[40,33];break;case 6:d=[24,11];break;case 7:d=[20,11];break;case 8:d=[32,11];break;case 9:d=[80,33];break;case 10:d=[18,11];break;case 11:d=[15,11];break;case 12:d=[64,33];break;case 13:d=[160,99];break;case 14:d=[4,3];break;case 15:d=[3,2];break;case 16:d=[2,1];break;case 255:d=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}d&&(b=d[0]/d[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:Math.ceil((16*(l+1)-2*m-2*y)*b),height:(2-f)*(c+1)*16-2*g-2*v,sarRatio:d}}}).prototype=new V;var at,st={H264Stream:tt,NalByteStream:nt},ut=function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},lt=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?n+20:n+10},ct=function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n};(at=function(){var e=new Uint8Array,t=0;at.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var r,i,o,a,s=0,u=0;for(e.length?(a=e.length,(e=new Uint8Array(n.byteLength+a)).set(e.subarray(0,a)),e.set(n,a)):e=n;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(255!=(255&e[u])||240!=(240&e[u+1]))u++;else{if(e.length-u<7)break;if(u+(s=ct(e,u))>e.length)break;o={type:"audio",data:e.subarray(u,u+s),pts:t,dts:t},this.trigger("data",o),u+=s}else{if(e.length-u<10)break;if(u+(s=lt(e,u))>e.length)break;i={type:"timed-metadata",data:e.subarray(u,u+s)},this.trigger("data",i),u+=s}r=e.length-u,e=r>0?e.subarray(u):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new V;var ft,ht,dt,pt,mt=at,yt=st.H264Stream,gt=ut,vt=he,bt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],_t=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Tt=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},wt=function(e,t,n,r,i,o){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(r-t),pts:e+(i-n)},prependedContentDuration:o,baseMediaDecodeTime:e}};(ht=function(e,t){var n=[],r=0,i=0,o=0,a=1/0;t=t||{},ht.prototype.init.call(this),this.push=function(t){Se(e,t),e&&bt.forEach((function(n){e[n]=t[n]})),n.push(t)},this.setEarliestDts=function(t){i=t-e.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){o=e},this.flush=function(){var s,u,l,c,f;0!==n.length?(s=ge(n,e,i),e.baseMediaDecodeTime=we(e,t.keepOriginalTimestamps),ye(e,s,o,a),e.samples=ve(s),l=J(be(s)),n=[],u=Z(r,[e]),c=new Uint8Array(u.byteLength+l.byteLength),r++,c.set(u),c.set(l,u.byteLength),Te(e),f=Math.ceil(1024*vt/e.samplerate),s.length&&this.trigger("timingInfo",{start:s[0].pts,end:s[0].pts+s.length*f}),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){Te(e),n=[],this.trigger("reset")}}).prototype=new V,(ft=function(e,t){var n,r,i=0,o=[],a=[];t=t||{},ft.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Se(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],_t.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),o.push(t)},this.flush=function(){for(var n,r,s,u,l,c,f,h,d=0;o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift();if(0===o.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=ne(o),(s=re(n))[0][0].keyFrame||((r=this.getGopForFusion_(o[0],e))?(d=r.duration,s.unshift(r),s.byteLength+=r.byteLength,s.nalCount+=r.nalCount,s.pts=r.pts,s.dts=r.dts,s.duration+=r.duration):s=ie(s)),a.length){var p;if(!(p=t.alignGopsAtEnd?this.alignGopsAtEnd_(s):this.alignGopsAtStart_(s)))return this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Te(e),s=p}Se(e,s),e.samples=oe(s),l=J(ae(s)),e.baseMediaDecodeTime=we(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",s.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),f=s[0],h=s[s.length-1],this.trigger("segmentTimingInfo",wt(e.baseMediaDecodeTime,f.dts,f.pts,h.dts+h.duration,h.pts+h.duration,d)),this.trigger("timingInfo",{start:s[0].pts,end:s[s.length-1].pts+s[s.length-1].duration}),this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=Z(i,[e]),c=new Uint8Array(u.byteLength+l.byteLength),i++,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_(),o=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){Te(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var n,r,i,o,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)i=(o=this.gopCache_[a]).gop,e.pps&&Tt(e.pps[0],o.pps[0])&&e.sps&&Tt(e.sps[0],o.sps[0])&&(i.dts<e.timelineStartInfo.dts||(n=t.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||s>n)&&(r=o,s=n));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,n,r,i,o,s,u,l;for(o=e.byteLength,s=e.nalCount,u=e.duration,t=n=0;t<a.length&&n<e.length&&(r=a[t],i=e[n],r.pts!==i.pts);)i.pts>r.pts?t++:(n++,o-=i.byteLength,s-=i.nalCount,u-=i.duration);return 0===n?e:n===e.length?null:((l=e.slice(n)).byteLength=o,l.duration=u,l.nalCount=s,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){var t,n,r,i,o,s,u;for(t=a.length-1,n=e.length-1,o=null,s=!1;t>=0&&n>=0;){if(r=a[t],i=e[n],r.pts===i.pts){s=!0;break}r.pts>i.pts?t--:(t===a.length-1&&(o=n),n--)}if(!s&&null===o)return null;if(0===(u=s?n:o))return e;var 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){a=e}}).prototype=new V,(pt=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,pt.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}}).prototype=new V,pt.prototype.flush=function(e){var t,n,r,i,o=0,a={captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,_t.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,bt.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,r=ee(this.pendingTracks),a.initSegment=new Uint8Array(r.byteLength),a.initSegment.set(r),a.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)a.data.set(this.pendingBoxes[i],o),o+=this.pendingBoxes[i].byteLength;for(i=0;i<this.pendingCaptions.length;i++)(t=this.pendingCaptions[i]).startTime=me(t.startPts,s,this.keepOriginalTimestamps),t.endTime=me(t.endPts,s,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(i=0;i<this.pendingMetadata.length;i++)(n=this.pendingMetadata[i]).cueTime=me(n.pts,s,this.keepOriginalTimestamps),a.metadata.push(n);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),i=0;i<a.captions.length;i++)t=a.captions[i],this.trigger("caption",t);for(i=0;i<a.metadata.length;i++)n=a.metadata[i],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},pt.prototype.setRemux=function(e){this.remuxTracks=e},(dt=function(e){var t,n,r=this,i=!0;dt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="aac",i.metadataStream=new Je.MetadataStream,i.aacStream=new mt,i.audioTimestampRolloverStream=new Je.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new Je.TimestampRolloverStream("timed-metadata"),i.adtsStream=new it,i.coalesceStream=new pt(e,i.metadataStream),i.headOfPipeline=i.aacStream,i.aacStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.aacStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.metadataStream.on("timestamp",(function(e){i.aacStream.setTimestamp(e.timeStamp)})),i.aacStream.on("data",(function(o){"timed-metadata"!==o.type||i.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new ht(n,e),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new Je.MetadataStream,i.packetStream=new Je.TransportPacketStream,i.parseStream=new Je.TransportParseStream,i.elementaryStream=new Je.ElementaryStream,i.timestampRolloverStream=new Je.TimestampRolloverStream,i.adtsStream=new it,i.h264Stream=new yt,i.captionStream=new Je.CaptionStream,i.coalesceStream=new pt(e,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",(function(o){var a;if("metadata"===o.type){for(a=o.tracks.length;a--;)t||"video"!==o.tracks[a].type?n||"audio"!==o.tracks[a].type||((n=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new ft(t,e),i.videoSegmentStream.on("timelineStartInfo",(function(e){n&&(n.timelineStartInfo=e,i.audioSegmentStream.setEarliestDts(e.dts))})),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),i.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new ht(n,e),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",(function(e){e.dispatchType=i.metadataStream.dispatchType,r.trigger("id3Frame",e)})),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(r){var i=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,Te(n),e.keepOriginalTimestamps||(n.timelineStartInfo.baseMediaDecodeTime=r),i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity()),t&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Te(t),i.captionStream.reset(),e.keepOriginalTimestamps||(t.timelineStartInfo.baseMediaDecodeTime=r)),i.timestampRolloverStream&&i.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(i){var t=gt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new V;var St={Transmuxer:dt,VideoSegmentStream:ft,AudioSegmentStream:ht,AUDIO_PROPERTIES:bt,VIDEO_PROPERTIES:_t,generateVideoSegmentTimingInfo:wt},Et=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),kt=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=n||{},this.self=t,this.init()}return Et(e,[{key:"init",value:function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new St.Transmuxer(this.options),function(e,t){t.on("data",(function(t){var n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var r=t.data;t.data=r.buffer,e.postMessage({action:"data",segment:t,byteOffset:r.byteOffset,byteLength:r.byteLength},[t.data])})),t.captionStream&&t.captionStream.on("data",(function(t){e.postMessage({action:"caption",data:t})})),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){e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:t})}))}(this.self,this.transmuxer)}},{key:"push",value:function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(9e4*t))}},{key:"setAudioAppendStart",value:function(e){this.transmuxer.setAudioAppendStart(Math.ceil(9e4*e.appendStart))}},{key:"flush",value:function(e){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value: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 kt(e,t.data.options):(this.messageHandlers||(this.messageHandlers=new kt(e)),t.data&&t.data.action&&"init"!==t.data.action&&this.messageHandlers[t.data.action]&&this.messageHandlers[t.data.action](t.data))}}(n)}()})),os={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},as=function(e){return e.map((function(e){return 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)}))}))},ss=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t={codecCount:0},n=void 0;return t.codecCount=e.split(",").length,t.codecCount=t.codecCount||2,(n=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(e))&&(t.videoCodec=n[2],t.videoObjectTypeIndicator=n[3]),t.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(e),t.audioProfile=t.audioProfile&&t.audioProfile[2],t},us=function(e,t,n){return e+"/"+t+'; codecs="'+n.filter((function(e){return!!e})).join(", ")+'"'},ls=function(e,t){var n=function(e){return e.segments&&e.segments.length&&e.segments[0].map?"mp4":"mp2t"}(t),r=function(e){var t=e.attributes||{};return t.CODECS?ss(t.CODECS):os}(t),i=t.attributes||{},o=!0,a=!1;if(!t)return[];if(e.mediaGroups.AUDIO&&i.AUDIO){var s=e.mediaGroups.AUDIO[i.AUDIO];if(s)for(var u in a=!0,o=!1,s)if(!s[u].uri&&!s[u].playlists){o=!0;break}}a&&!r.audioProfile&&(o||(r.audioProfile=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var r in n){var i=n[r];if(i.default&&i.playlists)return ss(i.playlists[0].attributes.CODECS).audioProfile}return null}(e,i.AUDIO)),r.audioProfile||(Ho.log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),r.audioProfile=os.audioProfile));var l={};r.videoCodec&&(l.video=""+r.videoCodec+r.videoObjectTypeIndicator),r.audioProfile&&(l.audio="mp4a.40."+r.audioProfile);var c=us("audio",n,[l.audio]),f=us("video",n,[l.video]),h=us("video",n,[l.video,l.audio]);return a?!o&&l.video?[f,c]:o||l.video?[h,c]:[c,c]:l.video?[h]:[c]},cs=function(e){var t={type:"",parameters:{}},n=e.trim().split(";");return t.type=n.shift().trim(),n.forEach((function(e){var n=e.trim().split("=");if(n.length>1){var r=n[0].replace(/"/g,"").trim(),i=n[1].replace(/"/g,"").trim();t.parameters[r]=i}})),t},fs=function(e){return/mp4a\.\d+.\d+/i.test(e)},hs=function(e){return/avc1\.[\da-f]+/i.test(e)},ds=function(e,t,n){if(null==t||!e.length)return[];var r=Math.ceil(9e4*(t-n+3)),i=void 0;for(i=0;i<e.length&&!(e[i].pts>r);i++);return e.slice(i)},ps=function(e){function t(e,n){Ko(this,t);var r=Jo(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,Ho.EventTarget));r.timestampOffset_=0,r.pendingBuffers_=[],r.bufferUpdating_=!1,r.mediaSource_=e,r.codecs_=n,r.audioCodec_=null,r.videoCodec_=null,r.audioDisabled_=!1,r.appendAudioInitSegment_=!0,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=Ho.browser.IE_VERSION>=11;var i={remux:!1,alignGopsAtEnd:r.safeAppend_};return r.codecs_.forEach((function(e){fs(e)?r.audioCodec_=e:hs(e)&&(r.videoCodec_=e)})),r.transmuxer_=new is,r.transmuxer_.postMessage({action:"init",options:i}),r.transmuxer_.onmessage=function(e){return"data"===e.data.action?r.data_(e):"done"===e.data.action?r.done_(e):"gopInfo"===e.data.action?r.appendGopInfo_(e):"videoSegmentTimingInfo"===e.data.action?r.videoSegmentTimingInfo_(e.data.videoSegmentTimingInfo):void 0},Object.defineProperty(r,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(e){"number"==typeof e&&e>=0&&(this.timestampOffset_=e,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e}))}}),Object.defineProperty(r,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(e){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=e),this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=e)}}),Object.defineProperty(r,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(r,"buffered",{get:function(){return function(e,t,n){var r=null,i=null,o=0,a=[],s=[];if(!e&&!t)return Ho.createTimeRange();if(!e)return t.buffered;if(!t)return e.buffered;if(n)return e.buffered;if(0===e.buffered.length&&0===t.buffered.length)return Ho.createTimeRange();for(var u=e.buffered,l=t.buffered,c=u.length;c--;)a.push({time:u.start(c),type:"start"}),a.push({time:u.end(c),type:"end"});for(c=l.length;c--;)a.push({time:l.start(c),type:"start"}),a.push({time:l.end(c),type:"end"});for(a.sort((function(e,t){return e.time-t.time})),c=0;c<a.length;c++)"start"===a[c].type?2===++o&&(r=a[c].time):"end"===a[c].type&&1===--o&&(i=a[c].time),null!==r&&null!==i&&(s.push([r,i]),r=null,i=null);return Ho.createTimeRanges(s)}(this.videoBuffer_,this.audioBuffer_,this.audioDisabled_)}}),r}return Qo(t,e),$o(t,[{key:"data_",value:function(e){var t=e.data.segment;t.data=new Uint8Array(t.data,e.data.byteOffset,e.data.byteLength),t.initSegment=new Uint8Array(t.initSegment.data,t.initSegment.byteOffset,t.initSegment.byteLength),function(e,t,n){var r=t.player_;if(n.captions&&n.captions.length)for(var i in e.inbandTextTracks_||(e.inbandTextTracks_={}),n.captionStreams)if(!e.inbandTextTracks_[i]){r.tech_.trigger({type:"usage",name:"hls-608"});var o=r.textTracks().getTrackById(i);e.inbandTextTracks_[i]=o||r.addRemoteTextTrack({kind:"captions",id:i,label:i},!1).track}n.metadata&&n.metadata.length&&!e.metadataTrack_&&(e.metadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=n.metadata.dispatchType)}(this,this.mediaSource_,t),this.pendingBuffers_.push(t)}},{key:"done_",value:function(e){"closed"!==this.mediaSource_.readyState?this.processPendingSegments_():this.pendingBuffers_.length=0}},{key:"videoSegmentTimingInfo_",value:function(e){var t={start:{decode:e.start.dts/9e4,presentation:e.start.pts/9e4},end:{decode:e.end.dts/9e4,presentation:e.end.pts/9e4},baseMediaDecodeTime:e.baseMediaDecodeTime/9e4};e.prependedContentDuration&&(t.prependedContentDuration=e.prependedContentDuration/9e4),this.trigger({type:"videoSegmentTimingInfo",videoSegmentTimingInfo:t})}},{key:"createRealSourceBuffers_",value:function(){var e=this,t=["audio","video"];t.forEach((function(n){if(e[n+"Codec_"]&&!e[n+"Buffer_"]){var r=null;if(e.mediaSource_[n+"Buffer_"])(r=e.mediaSource_[n+"Buffer_"]).updating=!1;else{var i=n+'/mp4;codecs="'+e[n+"Codec_"]+'"';r=function(e,t){var n=e.addSourceBuffer(t),r=Object.create(null);r.updating=!1,r.realBuffer_=n;var i=function(e){"function"==typeof n[e]?r[e]=function(){return n[e].apply(n,arguments)}:void 0===r[e]&&Object.defineProperty(r,e,{get:function(){return n[e]},set:function(t){return n[e]=t}})};for(var o in n)i(o);return r}(e.mediaSource_.nativeMediaSource_,i),e.mediaSource_[n+"Buffer_"]=r}e[n+"Buffer_"]=r,["update","updatestart","updateend"].forEach((function(i){r.addEventListener(i,(function(){if("audio"!==n||!e.audioDisabled_)return"updateend"===i&&(e[n+"Buffer_"].updating=!1),t.every((function(t){return!("audio"!==t||!e.audioDisabled_)||(n===t||!e[t+"Buffer_"]||!e[t+"Buffer_"].updating)}))?e.trigger(i):void 0}))}))}}))}},{key:"appendBuffer",value:function(e){if(this.bufferUpdating_=!0,this.audioBuffer_&&this.audioBuffer_.buffered.length){var t=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:t.end(t.length-1)})}this.videoBuffer_&&this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:ds(this.gopBuffer_,this.mediaSource_.player_?this.mediaSource_.player_.currentTime():null,this.timeMapping_)}),this.transmuxer_.postMessage({action:"push",data:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength},[e.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function(e){this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var r=t[0].pts,i=0;i<e.length&&!(e[i].pts>=r);i++);return e.slice(0,i).concat(t)}(this.gopBuffer_,e.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function(e,t){if(this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(e,t),this.gopBuffer_=function(e,t,n,r){for(var i=Math.ceil(9e4*(t-r)),o=Math.ceil(9e4*(n-r)),a=e.slice(),s=e.length;s--&&!(e[s].pts<=o););if(-1===s)return a;for(var u=s+1;u--&&!(e[u].pts<=i););return u=Math.max(u,0),a.splice(u,s-u+1),a}(this.gopBuffer_,e,t,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(e,t)),qa(e,t,this.metadataTrack_),this.inbandTextTracks_)for(var n in this.inbandTextTracks_)qa(e,t,this.inbandTextTracks_[n])}},{key:"processPendingSegments_",value:function(){var e={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};if(!this.pendingBuffers_.length)return this.trigger("updateend"),void(this.bufferUpdating_=!1);e=this.pendingBuffers_.reduce((function(e,t){var n=t.type,r=t.data,i=t.initSegment;return e[n].segments.push(r),e[n].bytes+=r.byteLength,e[n].initSegment=i,t.captions&&(e.captions=e.captions.concat(t.captions)),t.info&&(e[n].info=t.info),t.metadata&&(e.metadata=e.metadata.concat(t.metadata)),e}),e),this.videoBuffer_||this.audioBuffer_||(0===e.video.bytes&&(this.videoCodec_=null),0===e.audio.bytes&&(this.audioCodec_=null),this.createRealSourceBuffers_()),e.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:e.audio.info}),e.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:e.video.info}),this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(e.audio.segments.unshift(e.audio.initSegment),e.audio.bytes+=e.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);var t=!1;this.videoBuffer_&&e.video.bytes?(e.video.segments.unshift(e.video.initSegment),e.video.bytes+=e.video.initSegment.byteLength,this.concatAndAppendSegments_(e.video,this.videoBuffer_)):!this.videoBuffer_||!this.audioDisabled_&&this.audioBuffer_||(t=!0),Ya(this,e.captions,e.metadata),!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(e.audio,this.audioBuffer_),this.pendingBuffers_.length=0,t&&this.trigger("updateend"),this.bufferUpdating_=!1}},{key:"concatAndAppendSegments_",value:function(e,t){var n=0,r=void 0;if(e.bytes){r=new Uint8Array(e.bytes),e.segments.forEach((function(e){r.set(e,n),n+=e.byteLength}));try{t.updating=!0,t.appendBuffer(r)}catch(e){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:e.message,originalError:e})}}}},{key:"abort",value:function(){this.videoBuffer_&&this.videoBuffer_.abort(),!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"reset"}),this.pendingBuffers_.length=0,this.bufferUpdating_=!1}},{key:"dispose",value:function(){this.transmuxer_&&this.transmuxer_.terminate(),this.trigger("dispose"),this.off()}}]),t}(Ho.EventTarget),ms=function(e){function t(){Ko(this,t);var e=Jo(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n=void 0;for(n in e.nativeMediaSource_=new a.a.MediaSource,e.nativeMediaSource_)n in t.prototype||"function"!=typeof e.nativeMediaSource_[n]||(e[n]=e.nativeMediaSource_[n].bind(e.nativeMediaSource_));return e.duration_=NaN,Object.defineProperty(e,"duration",{get:function(){return this.duration_===1/0?this.duration_:this.nativeMediaSource_.duration},set:function(e){this.duration_=e,e===1/0||(this.nativeMediaSource_.duration=e)}}),Object.defineProperty(e,"seekable",{get:function(){return this.duration_===1/0?Ho.createTimeRanges([[0,this.nativeMediaSource_.duration]]):this.nativeMediaSource_.seekable}}),Object.defineProperty(e,"readyState",{get:function(){return this.nativeMediaSource_.readyState}}),Object.defineProperty(e,"activeSourceBuffers",{get:function(){return this.activeSourceBuffers_}}),e.sourceBuffers=[],e.activeSourceBuffers_=[],e.updateActiveSourceBuffers_=function(){if(e.activeSourceBuffers_.length=0,1===e.sourceBuffers.length){var t=e.sourceBuffers[0];return t.appendAudioInitSegment_=!0,t.audioDisabled_=!t.audioCodec_,void e.activeSourceBuffers_.push(t)}for(var n=!1,r=!0,i=0;i<e.player_.audioTracks().length;i++){var o=e.player_.audioTracks()[i];if(o.enabled&&"main"!==o.kind){n=!0,r=!1;break}}e.sourceBuffers.forEach((function(t,i){if(t.appendAudioInitSegment_=!0,t.videoCodec_&&t.audioCodec_)t.audioDisabled_=n;else if(t.videoCodec_&&!t.audioCodec_)t.audioDisabled_=!0,r=!1;else if(!t.videoCodec_&&t.audioCodec_&&(t.audioDisabled_=i?r:!r,t.audioDisabled_))return;e.activeSourceBuffers_.push(t)}))},e.onPlayerMediachange_=function(){e.sourceBuffers.forEach((function(e){e.appendAudioInitSegment_=!0}))},e.onHlsReset_=function(){e.sourceBuffers.forEach((function(e){e.transmuxer_&&e.transmuxer_.postMessage({action:"resetCaptions"})}))},e.onHlsSegmentTimeMapping_=function(t){e.sourceBuffers.forEach((function(e){return e.timeMapping_=t.mapping}))},["sourceopen","sourceclose","sourceended"].forEach((function(e){this.nativeMediaSource_.addEventListener(e,this.trigger.bind(this))}),e),e.on("sourceopen",(function(t){var n=u.a.querySelector('[src="'+e.url_+'"]');n&&(e.player_=Ho(n.parentNode),e.player_&&(e.player_.tech_.on("hls-reset",e.onHlsReset_),e.player_.tech_.on("hls-segment-time-mapping",e.onHlsSegmentTimeMapping_),e.player_.audioTracks&&e.player_.audioTracks()&&(e.player_.audioTracks().on("change",e.updateActiveSourceBuffers_),e.player_.audioTracks().on("addtrack",e.updateActiveSourceBuffers_),e.player_.audioTracks().on("removetrack",e.updateActiveSourceBuffers_)),e.player_.on("mediachange",e.onPlayerMediachange_)))})),e.on("sourceended",(function(t){for(var n=Ga(e.duration),r=0;r<e.sourceBuffers.length;r++){var i=e.sourceBuffers[r],o=i.metadataTrack_&&i.metadataTrack_.cues;o&&o.length&&(o[o.length-1].endTime=n)}})),e.on("sourceclose",(function(e){this.sourceBuffers.forEach((function(e){e.transmuxer_&&e.transmuxer_.terminate()})),this.sourceBuffers.length=0,this.player_&&(this.player_.audioTracks&&this.player_.audioTracks()&&(this.player_.audioTracks().off("change",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("addtrack",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("removetrack",this.updateActiveSourceBuffers_)),this.player_.el_&&this.player_.off("mediachange",this.onPlayerMediachange_),this.player_.tech_&&this.player_.tech_.el_&&(this.player_.tech_.off("hls-reset",this.onHlsReset_),this.player_.tech_.off("hls-segment-time-mapping",this.onHlsSegmentTimeMapping_)))})),e}return Qo(t,e),$o(t,[{key:"addSeekableRange_",value:function(e,t){var n=void 0;if(this.duration!==1/0)throw(n=new Error("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity")).name="InvalidStateError",n.code=11,n;(t>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=t)}},{key:"addSourceBuffer",value:function(e){var t=void 0,n=cs(e);if(/^(video|audio)\/mp2t$/i.test(n.type)){var r=[];n.parameters&&n.parameters.codecs&&(r=n.parameters.codecs.split(","),r=(r=as(r)).filter((function(e){return fs(e)||hs(e)}))),0===r.length&&(r=["avc1.4d400d","mp4a.40.2"]),t=new ps(this,r),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),t.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)}else t=this.nativeMediaSource_.addSourceBuffer(e);return this.sourceBuffers.push(t),t}},{key:"dispose",value:function(){this.trigger("dispose"),this.off(),this.sourceBuffers.forEach((function(e){e.dispose&&e.dispose()})),this.sourceBuffers.length=0}}]),t}(Ho.EventTarget),ys=0;Ho.mediaSources={};var gs=function(e,t){var n=Ho.mediaSources[e];if(!n)throw new Error("Media Source not found (Video.js)");n.trigger({type:"sourceopen",swfId:t})},vs=function(){return!!a.a.MediaSource&&!!a.a.MediaSource.isTypeSupported&&a.a.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')},bs=function(){if(this.MediaSource={open:gs,supportsNativeMediaSources:vs},vs())return new ms;throw new Error("Cannot use create a virtual MediaSource for this video")};bs.open=gs,bs.supportsNativeMediaSources=vs;var _s={createObjectURL:function(e){var t=void 0;return e instanceof ms?(t=a.a.URL.createObjectURL(e.nativeMediaSource_),e.url_=t,t):e instanceof ms?(t="blob:vjs-media-source/"+ys,ys++,Ho.mediaSources[t]=e,t):(t=a.a.URL.createObjectURL(e),e.url_=t,t)}};Ho.MediaSource=bs,Ho.URL=_s;var Ts=Ho.EventTarget,ws=Ho.mergeOptions,Ss=function(e,t){for(var n=void 0,r=ws(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),i=0;i<t.playlists.length;i++){var o=ia(r,t.playlists[i]);o?r=o:n=!0}return ra(t,(function(e,t,i,o){if(e.playlists&&e.playlists.length){var a=e.playlists[0].id,s=ia(r,e.playlists[0]);s&&((r=s).mediaGroups[t][i][o].playlists[0]=r.playlists[a],n=!1)}})),n?null:r},Es=function(e){var t=e.byterange.offset+e.byterange.length-1;return e.uri+"-"+e.byterange.offset+"-"+t},ks=function(e,t){var n,r,i={};for(var o in e){var a=e[o].sidx;if(a){var s=Es(a);if(!t[s])break;var u=t[s].sidxInfo;n=u,r=a,(Boolean(!n.map&&!r.map)||Boolean(n.map&&r.map&&n.map.byterange.offset===r.map.byterange.offset&&n.map.byterange.length===r.map.byterange.length))&&n.uri===r.uri&&n.byterange.offset===r.byterange.offset&&n.byterange.length===r.byterange.length&&(i[s]=t[s])}}return i},Cs=function(e,t,n,r,i){var o={uri:Xo(r.handleManifestRedirects,e.resolvedUri),byterange:e.byterange,playlist:t};return n(Ho.mergeOptions(o,{responseType:"arraybuffer",headers:Pa(o)}),i)},xs=function(e){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3];Ko(this,t);var o=Jo(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),a=r.withCredentials,s=void 0!==a&&a,u=r.handleManifestRedirects,l=void 0!==u&&u;if(o.hls_=n,o.withCredentials=s,o.handleManifestRedirects=l,!e)throw new Error("A non-empty playlist URL or playlist is required");return o.on("minimumUpdatePeriod",(function(){o.refreshXml_()})),o.on("mediaupdatetimeout",(function(){o.refreshMedia_(o.media().id)})),o.state="HAVE_NOTHING",o.loadedPlaylists_={},"string"==typeof e?(o.srcUrl=e,o.sidxMapping_={},Jo(o)):(o.setupChildLoader(i,e),o)}return Qo(t,e),$o(t,[{key:"setupChildLoader",value:function(e,t){this.masterPlaylistLoader_=e,this.childPlaylist_=t}},{key:"dispose",value:function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},a.a.clearTimeout(this.minimumUpdatePeriodTimeout_),a.a.clearTimeout(this.mediaRequest_),a.a.clearTimeout(this.mediaUpdateTimeout),this.off()}},{key:"hasPendingRequest",value:function(){return this.request||this.mediaRequest_}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"sidxRequestFinished_",value:function(e,t,n,r){var i=this;return function(o,a){if(i.request){if(i.request=null,o)return i.error={status:a.status,message:"DASH playlist request error at URL: "+e.uri,response:a.response,code:2},n&&(i.state=n),i.trigger("error"),r(t,null);var s=new Uint8Array(a.response),u=Pe.a.parseSidx(s.subarray(8));return r(t,u)}}}},{key:"media",value: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.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}var r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(r)if(this.media_&&this.trigger("mediachanging"),e.sidx){var i=void 0,o=void 0;this.masterPlaylistLoader_?(i=this.masterPlaylistLoader_.master,o=this.masterPlaylistLoader_.sidxMapping_):(i=this.master,o=this.sidxMapping_);var s=Es(e.sidx);o[s]={sidxInfo:e.sidx},this.request=Cs(e.sidx,e,this.hls_.xhr,{handleManifestRedirects:this.handleManifestRedirects},this.sidxRequestFinished_(e,i,n,(function(r,i){if(!r||!i)throw new Error("failed to request sidx");o[s].sidx=i,t.haveMetadata({startingState:n,playlist:r.playlists[e.id]})})))}else this.mediaRequest_=a.a.setTimeout(this.haveMetadata.bind(this,{startingState:n,playlist:e}),0)}},{key:"haveMetadata",value: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")}},{key:"pause",value:function(){this.stopRequest(),a.a.clearTimeout(this.mediaUpdateTimeout),a.a.clearTimeout(this.minimumUpdatePeriodTimeout_),"HAVE_NOTHING"===this.state&&(this.started=!1)}},{key:"load",value:function(e){var t=this;a.a.clearTimeout(this.mediaUpdateTimeout),a.a.clearTimeout(this.minimumUpdatePeriodTimeout_);var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=a.a.setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}},{key:"parseMasterXml",value:function(){var e=Ce(this.masterXml_,{manifestUri:this.srcUrl,clientOffset:this.clientOffset_,sidxMapping:this.sidxMapping_});e.uri=this.srcUrl;for(var t=0;t<e.playlists.length;t++){var n="placeholder-uri-"+t;e.playlists[t].uri=n}return ra(e,(function(t,n,r,i){if(t.playlists&&t.playlists.length){var o="placeholder-uri-"+n+"-"+r+"-"+i,a=oa(0,o);t.playlists[0].uri=o,t.playlists[0].id=a,e.playlists[a]=t.playlists[0],e.playlists[o]=t.playlists[0]}})),aa(e),sa(e),e}},{key:"start",value:function(){var e=this;this.started=!0,this.masterPlaylistLoader_?this.mediaRequest_=a.a.setTimeout(this.haveMaster_.bind(this),0):this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},(function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"DASH playlist request error at URL: "+e.srcUrl,responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.masterXml_=n.responseText,n.responseHeaders&&n.responseHeaders.date?e.masterLoaded_=Date.parse(n.responseHeaders.date):e.masterLoaded_=Date.now(),e.srcUrl=Xo(e.handleManifestRedirects,e.srcUrl,n),e.syncClientServerClock_(e.onClientServerClockSync_.bind(e))}}))}},{key:"syncClientServerClock_",value:function(e){var t=this,n=xe(this.masterXml_);return null===n?(this.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===n.method?(this.clientOffset_=n.value-Date.now(),e()):void(this.request=this.hls_.xhr({uri:Yo(this.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},(function(r,i){if(t.request){if(r)return t.clientOffset_=t.masterLoaded_-Date.now(),e();var o=void 0;o="HEAD"===n.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):t.masterLoaded_:Date.parse(i.responseText),t.clientOffset_=o-Date.now(),e()}})))}},{key:"haveMaster_",value:function(){this.state="HAVE_MASTER",this.mediaRequest_=null,this.masterPlaylistLoader_?this.media_||this.media(this.childPlaylist_):(this.master=this.parseMasterXml(),this.trigger("loadedplaylist"))}},{key:"onClientServerClockSync_",value:function(){var e=this;this.haveMaster_(),this.hasPendingRequest()||this.media_||this.media(this.master.playlists[0]),this.master&&this.master.minimumUpdatePeriod&&(this.minimumUpdatePeriodTimeout_=a.a.setTimeout((function(){e.trigger("minimumUpdatePeriod")}),this.master.minimumUpdatePeriod))}},{key:"refreshXml_",value:function(){var e=this;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},(function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"DASH playlist request error at URL: "+e.srcUrl,responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.masterXml_=n.responseText,e.sidxMapping_=function(e,t,n,r){var i=Ce(e,{manifestUri:t,clientOffset:n}),o=ks(i.playlists,r);return ra(i,(function(e,t,n,i){if(e.playlists&&e.playlists.length){var a=e.playlists;o=ws(o,ks(a,r))}})),o}(e.masterXml_,e.srcUrl,e.clientOffset_,e.sidxMapping_);var r=e.parseMasterXml(),i=Ss(e.master,r),o=e.media().sidx;if(i)if(o){var s=Es(o);if(!e.sidxMapping_[s]){var u=e.media();e.request=Cs(u.sidx,u,e.hls_.xhr,{handleManifestRedirects:e.handleManifestRedirects},e.sidxRequestFinished_(u,r,e.state,(function(t,n){if(!t||!n)throw new Error("failed to request sidx on minimumUpdatePeriod");e.sidxMapping_[s].sidx=n,e.minimumUpdatePeriodTimeout_=a.a.setTimeout((function(){e.trigger("minimumUpdatePeriod")}),e.master.minimumUpdatePeriod),e.refreshMedia_(e.media().id)})))}}else e.master=i;e.minimumUpdatePeriodTimeout_=a.a.setTimeout((function(){e.trigger("minimumUpdatePeriod")}),e.master.minimumUpdatePeriod)}}))}},{key:"refreshMedia_",value:function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");var n=void 0,r=void 0;this.masterPlaylistLoader_?(n=this.masterPlaylistLoader_.master,r=this.masterPlaylistLoader_.parseMasterXml()):(n=this.master,r=this.parseMasterXml());var i=Ss(n,r);i?(this.masterPlaylistLoader_?this.masterPlaylistLoader_.master=i:this.master=i,this.media_=i.playlists[e]):(this.media_=r.playlists[e],this.trigger("playlistunchanged")),this.media().endList||(this.mediaUpdateTimeout=a.a.setTimeout((function(){t.trigger("mediaupdatetimeout")}),ua(this.media(),!!i))),this.trigger("loadedplaylist")}}]),t}(Ts),Os=function(e){return Ho.log.debug?Ho.log.debug.bind(Ho,"VHS:",e+" >"):function(){}};function Ps(){}var As=function(){function e(t,n,r,i){Ko(this,e),this.callbacks_=[],this.pendingCallback_=null,this.timestampOffset_=0,this.mediaSource=t,this.processedAppend_=!1,this.type_=r,this.mimeType_=n,this.logger_=Os("SourceUpdater["+r+"]["+n+"]"),"closed"===t.readyState?t.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,n,i)):this.createSourceBuffer_(n,i)}return $o(e,[{key:"createSourceBuffer_",value:function(e,t){var n=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(e),this.logger_("created SourceBuffer"),t&&(t.trigger("sourcebufferadded"),this.mediaSource.sourceBuffers.length<2)?t.on("sourcebufferadded",(function(){n.start_()})):this.start_()}},{key:"start_",value:function(){var e=this;this.started_=!0,this.onUpdateendCallback_=function(){var t=e.pendingCallback_;e.pendingCallback_=null,e.sourceBuffer_.removing=!1,e.logger_("buffered ["+Wa(e.buffered())+"]"),t&&t(),e.runCallback_()},this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_),this.runCallback_()}},{key:"abort",value:function(e){var t=this;this.processedAppend_&&this.queueCallback_((function(){t.sourceBuffer_.abort()}),e)}},{key:"appendBuffer",value:function(e,t){var n=this;this.processedAppend_=!0,this.queueCallback_((function(){e.videoSegmentTimingInfoCallback&&n.sourceBuffer_.addEventListener("videoSegmentTimingInfo",e.videoSegmentTimingInfoCallback),n.sourceBuffer_.appendBuffer(e.bytes)}),(function(){e.videoSegmentTimingInfoCallback&&n.sourceBuffer_.removeEventListener("videoSegmentTimingInfo",e.videoSegmentTimingInfoCallback),t()}))}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:Ho.createTimeRanges()}},{key:"remove",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ps;this.processedAppend_&&this.queueCallback_((function(){n.logger_("remove ["+e+" => "+t+"]"),n.sourceBuffer_.removing=!0,n.sourceBuffer_.remove(e,t)}),r)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||!!this.pendingCallback_&&this.pendingCallback_!==Ps}},{key:"timestampOffset",value:function(e){var t=this;return void 0!==e&&(this.queueCallback_((function(){t.sourceBuffer_.timestampOffset=e,t.runCallback_()})),this.timestampOffset_=e),this.timestampOffset_}},{key:"queueCallback_",value:function(e,t){this.callbacks_.push([e.bind(this),t]),this.runCallback_()}},{key:"runCallback_",value:function(){var e=void 0;!this.updating()&&this.callbacks_.length&&this.started_&&(e=this.callbacks_.shift(),this.pendingCallback_=e[1],e[0]())}},{key:"dispose",value:function(){var e=this,t=function t(){e.sourceBuffer_&&"open"===e.mediaSource.readyState&&e.sourceBuffer_.abort(),e.sourceBuffer_.removeEventListener("updateend",t)};this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_),this.sourceBuffer_.removing?this.sourceBuffer_.addEventListener("updateend",t):t()}}]),e}(),Rs={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1},Ls=2,Is=-101,Ds=-102,Ns=function(e){e.forEach((function(e){e.abort()}))},js=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Is,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Ds,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Ls,xhr:t}:null},Ms=function(e,t,n){var r=0,i=!1;return function(o,a){if(!i)return o?(i=!0,Ns(e),n(o,a)):(r+=1)===e.length?(a.endOfAllRequests=Date.now(),a.encryptedBytes?function(e,t,n){e.addEventListener("message",(function r(i){if(i.data.source===t.requestId){e.removeEventListener("message",r);var o=i.data.decrypted;return t.bytes=new Uint8Array(o.bytes,o.byteOffset,o.byteLength),n(null,t)}}));var r=void 0;r=t.key.bytes.slice?t.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.key.bytes)),e.postMessage(Ia({source:t.requestId,encrypted:t.encryptedBytes,key:r,iv:t.key.iv}),[t.encryptedBytes.buffer,r.buffer])}(t,a,n):n(null,a)):void 0}},Us=function(e,t){return function(n){var r,i,o;return e.stats=Ho.mergeOptions(e.stats,(i=(r=n).target,(o={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-i.requestTime||0}).bytesReceived=r.loaded,o.bandwidth=Math.floor(o.bytesReceived/o.roundTripTime*8*1e3),o)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(n,e)}},Bs=function(e,t,n,r,i,o,a){var s=[],u=Ms(s,n,a);if(i.key&&!i.key.bytes){var l=e(Ho.mergeOptions(t,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),function(e,t){return function(n,r){var i=r.response,o=js(n,r);if(o)return t(o,e);if(16!==i.byteLength)return t({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:Ls,xhr:r},e);var a=new DataView(i);return e.key.bytes=new Uint32Array([a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)]),t(null,e)}}(i,u));s.push(l)}if(i.map&&!i.map.bytes){var c=e(Ho.mergeOptions(t,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:Pa(i.map)}),function(e,t,n){return function(r,i){var o=i.response,a=js(r,i);return a?n(a,e):0===o.byteLength?n({status:i.status,message:"Empty HLS segment content at URL: "+i.uri,code:Ls,xhr:i},e):(e.map.bytes=new Uint8Array(i.response),t&&!t.isInitialized()&&t.init(),e.map.timescales=Re.a.timescale(e.map.bytes),e.map.videoTrackIds=Re.a.videoTrackIds(e.map.bytes),n(null,e))}}(i,r,u));s.push(c)}var f=e(Ho.mergeOptions(t,{uri:i.resolvedUri,responseType:"arraybuffer",headers:Pa(i)}),function(e,t,n){return function(r,i){var o=i.response,a=js(r,i),s=void 0;return a?n(a,e):0===o.byteLength?n({status:i.status,message:"Empty HLS segment content at URL: "+i.uri,code:Ls,xhr:i},e):(e.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(i),e.key?e.encryptedBytes=new Uint8Array(i.response):e.bytes=new Uint8Array(i.response),t&&e.map&&e.map.bytes&&(t.isInitialized()||t.init(),(s=t.parse(e.bytes,e.map.videoTrackIds,e.map.timescales))&&s.captions&&(e.captionStreams=s.captionStreams,e.fmp4Captions=s.captions)),n(null,e))}}(i,r,u));return f.addEventListener("progress",Us(i,o)),s.push(f),function(){return Ns(s)}},Fs=function(e,t){var n;return e&&(n=a.a.getComputedStyle(e))?n[t]:""},zs=function(e,t){var n=e.slice();e.sort((function(e,r){var i=t(e,r);return 0===i?n.indexOf(e)-n.indexOf(r):i}))},Vs=function(e,t){var n=void 0,r=void 0;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||a.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),n-(r=r||a.a.Number.MAX_VALUE)},Ws=function(e,t,n){if(!e||!t)return!1;var r=n===e.segments.length;return e.endList&&"open"===t.readyState&&r},Hs=function(e){return"number"==typeof e&&isFinite(e)},qs=function(e){function t(e){Ko(this,t);var n=Jo(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");return n.bandwidth=e.bandwidth,n.throughput={rate:0,count:0},n.roundTrip=NaN,n.resetStats_(),n.mediaIndex=null,n.hasPlayed_=e.hasPlayed,n.currentTime_=e.currentTime,n.seekable_=e.seekable,n.seeking_=e.seeking,n.duration_=e.duration,n.mediaSource_=e.mediaSource,n.hls_=e.hls,n.loaderType_=e.loaderType,n.startingMedia_=void 0,n.segmentMetadataTrack_=e.segmentMetadataTrack,n.goalBufferLength_=e.goalBufferLength,n.sourceType_=e.sourceType,n.inbandTextTracks_=e.inbandTextTracks,n.state_="INIT",n.checkBufferTimeout_=null,n.error_=void 0,n.currentTimeline_=-1,n.pendingSegment_=null,n.mimeType_=null,n.sourceUpdater_=null,n.xhrOptions_=null,n.activeInitSegmentId_=null,n.initSegments_={},n.cacheEncryptionKeys_=e.cacheEncryptionKeys,n.keyCache_={},"main"===n.loaderType_?n.captionParser_=new Ie.a:n.captionParser_=null,n.decrypter_=e.decrypter,n.syncController_=e.syncController,n.syncPoint_={segmentIndex:0,time:0},n.triggerSyncInfoUpdate_=function(){return n.trigger("syncinfoupdate")},n.syncController_.on("syncinfoupdate",n.triggerSyncInfoUpdate_),n.mediaSource_.addEventListener("sourceopen",(function(){return n.ended_=!1})),n.fetchAtBuffer_=!1,n.logger_=Os("SegmentLoader["+n.loaderType_+"]"),Object.defineProperty(n,"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e)}}),n}return Qo(t,e),$o(t,[{key:"resetStats_",value:function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0}},{key:"dispose",value:function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.sourceUpdater_&&this.sourceUpdater_.dispose(),this.resetStats_(),this.captionParser_&&this.captionParser_.reset(),this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}},{key:"abort",value:function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}},{key:"abort_",value:function(){this.pendingSegment_&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null}},{key:"error",value:function(e){return void 0!==e&&(this.error_=e),this.pendingSegment_=null,this.error_}},{key:"endOfStream",value:function(){this.ended_=!0,this.pause(),this.trigger("ended")}},{key:"buffered_",value:function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():Ho.createTimeRanges()}},{key:"initSegment",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;var n=Da(e),r=this.initSegments_[n];return t&&!r&&e.bytes&&(this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,timescales:e.timescales,videoTrackIds:e.videoTrackIds}),r||e}},{key:"segmentKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;var n=Na(e),r=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[n]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});var i={resolvedUri:(r||e).resolvedUri};return r&&(i.bytes=r.bytes),i}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&"INIT"===this.state)&&!this.paused()}},{key:"load",value: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")}}},{key:"init_",value:function(){return this.state="READY",this.sourceUpdater_=new As(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){var n=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0});var i=null;if(n&&(n.id?i=n.id:n.uri&&(i=n.uri)),this.logger_("playlist update ["+i+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(n&&n.uri===e.uri){var o=e.mediaSequence-n.mediaSequence;this.logger_("live window shift ["+o+"]"),null!==this.mediaIndex&&(this.mediaIndex-=o),r&&(r.mediaIndex-=o,r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(n,e)}else null!==this.mediaIndex&&this.resyncLoader()}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(e,t){this.mimeType_||(this.mimeType_=e,this.sourceBufferEmitter_=t,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(e){this.ended_=!1,this.resetLoader(),this.remove(0,1/0,e),this.captionParser_&&this.captionParser_.clearAllCaptions(),this.trigger("reseteverything")}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1,this.resyncLoader()}},{key:"resyncLoader",value:function(){this.mediaIndex=null,this.syncPoint_=null,this.abort()}},{key:"remove",value:function(e,t,n){if(t===1/0&&(t=this.duration_()),this.sourceUpdater_&&this.sourceUpdater_.remove(e,t,n),qa(e,t,this.segmentMetadataTrack_),this.inbandTextTracks_)for(var r in this.inbandTextTracks_)qa(e,t,this.inbandTextTracks_[r])}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=a.a.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&a.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=a.a.setTimeout(this.monitorBufferTick_.bind(this),500)}},{key:"fillBuffer_",value:function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);e&&(this.isEndOfStream_(e.mediaIndex)?this.endOfStream():(e.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&(e.timeline!==this.currentTimeline_&&(this.syncController_.reset(),e.timestampOffset=e.startOfSegment,this.captionParser_&&this.captionParser_.clearAllCaptions()),this.loadSegment_(e)))}}},{key:"isEndOfStream_",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.playlist_;return Ws(t,this.mediaSource_,e)&&!this.sourceUpdater_.updating()}},{key:"checkBuffer_",value:function(e,t,n,r,i,o){var a=0,s=void 0;e.length&&(a=e.end(e.length-1));var u=Math.max(0,a-i);if(!t.segments.length)return null;if(u>=this.goalBufferLength_())return null;if(!r&&u>=1)return null;if(null===o)return n=this.getSyncSegmentCandidate_(t),this.generateSegmentInfo_(t,n,null,!0);if(null!==n){t.segments[n];return s=a,this.generateSegmentInfo_(t,n+1,s,!1)}if(this.fetchAtBuffer_){var l=ka.getMediaInfoForTime(t,a,o.segmentIndex,o.time);n=l.mediaIndex,s=l.startTime}else{var c=ka.getMediaInfoForTime(t,i,o.segmentIndex,o.time);n=c.mediaIndex,s=c.startTime}return this.generateSegmentInfo_(t,n,s,!1)}},{key:"getSyncSegmentCandidate_",value: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)}},{key:"generateSegmentInfo_",value:function(e,t,n,r){if(t<0||t>=e.segments.length)return null;var i=e.segments[t];return{requestId:"segment-loader-"+Math.random(),uri:i.resolvedUri,mediaIndex:t,isSyncRequest:r,startOfSegment:n,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:i.timeline,duration:i.duration,segment:i}}},{key:"abortRequestEarly_",value:function(e){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return!1;var t=this.currentTime_(),n=e.bandwidth,r=this.pendingSegment_.duration,i=ka.estimateSegmentRequestTime(r,n,this.playlist_,e.bytesReceived),o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=e.length?e.end(e.length-1):0;return(r-t)/n}(this.buffered_(),t,this.hls_.tech_.playbackRate())-1;if(i<=o)return!1;var a=function(e){var t=e.master,n=e.currentTime,r=e.bandwidth,i=e.duration,o=e.segmentDuration,a=e.timeUntilRebuffer,s=e.currentTimeline,u=e.syncController,l=t.playlists.filter((function(e){return!ka.isIncompatible(e)})),c=l.filter(ka.isEnabled);c.length||(c=l.filter((function(e){return!ka.isDisabled(e)})));var f=c.filter(ka.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var t=u.getSyncPoint(e,i,s,n)?1:2;return{playlist:e,rebufferingImpact:ka.estimateSegmentRequestTime(o,r,e)*t-a}})),h=f.filter((function(e){return e.rebufferingImpact<=0}));return zs(h,(function(e,t){return Vs(t.playlist,e.playlist)})),h.length?h[0]:(zs(f,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),f[0]||null)}({master:this.hls_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:o,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(a){var s=i-o-a.rebufferingImpact,u=.5;return o<=1/30&&(u=1),!a.playlist||a.playlist.uri===this.playlist_.uri||s<u?!1:(this.bandwidth=a.playlist.attributes.BANDWIDTH*Rs.BANDWIDTH_VARIANCE+1,this.abort(),this.trigger("earlyabort"),!0)}}},{key:"handleProgress_",value:function(e,t){this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId&&!this.abortRequestEarly_(t.stats)&&this.trigger("progress")}},{key:"loadSegment_",value:function(e){this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),e.abortRequests=Bs(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.captionParser_,this.createSimplifiedSegmentObj_(e),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function(e){var t=function(e,t,n){var r=t-30;e.length&&(r=Math.max(r,e.start(0)));var i=t-n;return Math.min(i,r)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}},{key:"createSimplifiedSegmentObj_",value:function(e){var t=e.segment,n={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId};if(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.initSegment(t.map)),n}},{key:"segmentRequestFinished_",value:function(e,t){if(this.mediaRequests+=1,t.stats&&(this.mediaBytesTransferred+=t.stats.bytesReceived,this.mediaTransferDuration+=t.stats.roundTripTime),this.pendingSegment_){if(t.requestId===this.pendingSegment_.requestId){if(e)return this.pendingSegment_=null,this.state="READY",e.code===Ds?void(this.mediaRequestsAborted+=1):(this.pause(),e.code===Is?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,void this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error")));this.bandwidth=t.stats.bandwidth,this.roundTrip=t.stats.roundTripTime,t.map&&(t.map=this.initSegment(t.map,!0)),t.key&&this.segmentKey(t.key,!0),this.processSegmentResponse_(t)}}else this.mediaRequestsAborted+=1}},{key:"processSegmentResponse_",value:function(e){var t=this.pendingSegment_;t.bytes=e.bytes,e.map&&(t.segment.map.bytes=e.map.bytes),t.endOfAllRequests=e.endOfAllRequests,e.fmp4Captions&&(!function(e,t,n){for(var r in n)if(!e[r]){t.trigger({type:"usage",name:"hls-608"});var i=t.textTracks().getTrackById(r);e[r]=i||t.addRemoteTextTrack({kind:"captions",id:r,label:r},!1).track}}(this.inbandTextTracks_,this.hls_.tech_,e.captionStreams),function(e){var t=e.inbandTextTracks,n=e.captionArray,r=e.timestampOffset;if(n){var i=window.WebKitDataCue||window.VTTCue;n.forEach((function(e){var n=e.stream,o=e.startTime,a=e.endTime;t[n]&&(o+=r,a+=r,t[n].addCue(new i(o,a,e.text)))}))}}({inbandTextTracks:this.inbandTextTracks_,captionArray:e.fmp4Captions,timestampOffset:0}),this.captionParser_&&this.captionParser_.clearParsedCaptions()),this.handleSegment_()}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_){var t=this.pendingSegment_,n=t.segment,r=this.syncController_.probeSegmentInfo(t);void 0===this.startingMedia_&&r&&(r.containsAudio||r.containsVideo)&&(this.startingMedia_={containsAudio:r.containsAudio,containsVideo:r.containsVideo});var i,o,a,s=(i=this.loaderType_,o=this.startingMedia_,a=r,"main"===i&&o&&a?a.containsAudio||a.containsVideo?o.containsVideo&&!a.containsVideo?"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.":!o.containsVideo&&a.containsVideo?"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);if(s)return this.error({message:s,blacklistDuration:1/0}),void this.trigger("error");if(t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");if(null!==t.timestampOffset&&t.timestampOffset!==this.sourceUpdater_.timestampOffset()){if(r&&r.segmentTimestampInfo){var u=r.segmentTimestampInfo[0].ptsTime,l=r.segmentTimestampInfo[0].dtsTime;t.timestampOffset-=u-l}this.sourceUpdater_.timestampOffset(t.timestampOffset),this.trigger("timestampoffset")}var c=this.syncController_.mappingForTimeline(t.timeline);if(null!==c&&this.trigger({type:"segmenttimemapping",mapping:c}),this.state="APPENDING",n.map){var f=Da(n.map);if(!this.activeInitSegmentId_||this.activeInitSegmentId_!==f){var h=this.initSegment(n.map);this.sourceUpdater_.appendBuffer({bytes:h.bytes},(function(){e.activeInitSegmentId_=f}))}}t.byteLength=t.bytes.byteLength,"number"==typeof n.start&&"number"==typeof n.end?this.mediaSecondsLoaded+=n.end-n.start:this.mediaSecondsLoaded+=n.duration,this.logger_(function(e){var t=e.segment,n=t.start,r=t.end,i=e.playlist,o=i.mediaSequence,a=i.id,s=i.segments,u=void 0===s?[]:s,l=e.mediaIndex,c=e.timeline;return["appending ["+l+"] of ["+o+", "+(o+u.length)+"] from playlist ["+a+"]","["+n+" => "+r+"] in timeline ["+c+"]"].join(" ")}(t)),this.sourceUpdater_.appendBuffer({bytes:t.bytes,videoSegmentTimingInfoCallback:this.handleVideoSegmentTimingInfo_.bind(this,t.requestId)},this.handleUpdateEnd_.bind(this))}else this.state="READY"}},{key:"handleVideoSegmentTimingInfo_",value:function(e,t){if(this.pendingSegment_&&e===this.pendingSegment_.requestId){var n=this.pendingSegment_.segment;n.videoTimingInfo||(n.videoTimingInfo={}),n.videoTimingInfo.transmuxerPrependedSeconds=t.videoSegmentTimingInfo.prependedContentDuration||0,n.videoTimingInfo.transmuxedPresentationStart=t.videoSegmentTimingInfo.start.presentation,n.videoTimingInfo.transmuxedPresentationEnd=t.videoSegmentTimingInfo.end.presentation,n.videoTimingInfo.baseMediaDecodeTime=t.videoSegmentTimingInfo.baseMediaDecodeTime}}},{key:"handleUpdateEnd_",value:function(){if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_,t=e.segment,n=null!==this.mediaIndex;this.pendingSegment_=null,this.recordThroughput_(e),this.addSegmentMetadataCue_(e),this.state="READY",this.mediaIndex=e.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate"),t.end&&this.currentTime_()-t.end>3*e.playlist.targetDuration?this.resetEverything():(n&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.isEndOfStream_(e.mediaIndex+1,e.playlist)&&this.endOfStream(),this.paused()||this.monitorBuffer_())}},{key:"recordThroughput_",value:function(e){var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,r=t.end;if(Hs(n)&&Hs(r)){qa(n,r,this.segmentMetadataTrack_);var i=a.a.WebKitDataCue||a.a.VTTCue,o={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:n,end:r},s=new i(n,r,JSON.stringify(o));s.value=o,this.segmentMetadataTrack_.addCue(s)}}}}]),t}(Ho.EventTarget),Gs=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},Ys=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),Xs=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ko(this,t);var r=Jo(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.mediaSource_=null,r.subtitlesTrack_=null,r.featuresNativeTextTracks_=e.featuresNativeTextTracks,r}return Qo(t,e),$o(t,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return Ho.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Ho.createTimeRanges([[t,n]])}},{key:"initSegment",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;var n=Da(e),r=this.initSegments_[n];if(t&&!r&&e.bytes){var i=Ys.byteLength+e.bytes.byteLength,o=new Uint8Array(i);o.set(e.bytes),o.set(Ys,e.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:o}}return r||e}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:"init_",value:function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}},{key:"track",value:function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}},{key:"remove",value:function(e,t){qa(e,t,this.subtitlesTrack_)}},{key:"fillBuffer_",value: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)}}},{key:"skipEmptySegments_",value:function(e){for(;e&&e.segment.empty;)e=this.generateSegmentInfo_(e.playlist,e.mediaIndex+1,e.startOfSegment+e.duration,e.isSyncRequest);return e}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_&&this.subtitlesTrack_){this.state="APPENDING";var t=this.pendingSegment_,n=t.segment;if("function"!=typeof a.a.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var r=void 0,i=function(){e.subtitlesTrack_.tech_.off("vttjsloaded",r),e.error({message:"Error loading vtt.js"}),e.state="READY",e.pause(),e.trigger("error")};return r=function(){e.subtitlesTrack_.tech_.off("vttjserror",i),e.handleSegment_()},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",r),void this.subtitlesTrack_.tech_.one("vttjserror",i)}n.requested=!0;try{this.parseVTTCues_(t)}catch(e){return this.error({message:e.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(t,this.syncController_.timelines[t.timeline],this.playlist_),t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");t.byteLength=t.bytes.byteLength,this.mediaSecondsLoaded+=n.duration,t.cues.length&&this.remove(t.cues[0].endTime,t.cues[t.cues.length-1].endTime),t.cues.forEach((function(t){e.subtitlesTrack_.addCue(e.featuresNativeTextTracks_?new a.a.VTTCue(t.startTime,t.endTime,t.text):t)})),this.handleUpdateEnd_()}else this.state="READY"}},{key:"parseVTTCues_",value:function(e){var t=void 0,n=!1;"function"==typeof a.a.TextDecoder?t=new a.a.TextDecoder("utf8"):(t=a.a.WebVTT.StringDecoder(),n=!0);var r=new a.a.WebVTT.Parser(a.a,a.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=function(t){return e.timestampmap=t},r.onparsingerror=function(e){Ho.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var i=e.segment.map.bytes;n&&(i=Gs(i)),r.parse(i)}var o=e.bytes;n&&(o=Gs(o)),r.parse(o),r.flush()}},{key:"updateTimeMapping_",value:function(e,t,n){var r=e.segment;if(t)if(e.cues.length){var i=e.timestampmap,o=i.MPEGTS/9e4-i.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=o,e.endTime+=o})),!n.syncInfo){var a=e.cues[0].startTime,s=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(a,s-r.duration)}}}else r.empty=!0}}]),t}(qs),Ks=function(e,t){for(var n=e.cues,r=0;r<n.length;r++){var i=n[r];if(t>=i.adStartTime&&t<=i.adEndTime)return i}return null},$s=Ne.a.inspect,Qs=[{name:"VOD",run:function(e,t,n,r,i){if(n!==1/0){return{time:0,segmentIndex:0}}return null}},{name:"ProgramDateTime",run:function(e,t,n,r,i){if(!e.datetimeToDisplayTime)return null;var o=t.segments||[],a=null,s=null;i=i||0;for(var u=0;u<o.length;u++){var l=o[u];if(l.dateTimeObject){var c=l.dateTimeObject.getTime()/1e3+e.datetimeToDisplayTime,f=Math.abs(i-c);if(null!==s&&(0===f||s<f))break;s=f,a={time:c,segmentIndex:u}}}return a}},{name:"Segment",run:function(e,t,n,r,i){var o=t.segments||[],a=null,s=null;i=i||0;for(var u=0;u<o.length;u++){var l=o[u];if(l.timeline===r&&void 0!==l.start){var c=Math.abs(i-l.start);if(null!==s&&s<c)break;(!a||null===s||s>=c)&&(s=c,a={time:l.start,segmentIndex:u})}}return a}},{name:"Discontinuity",run:function(e,t,n,r,i){var o=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var a=null,s=0;s<t.discontinuityStarts.length;s++){var u=t.discontinuityStarts[s],l=t.discontinuitySequence+s+1,c=e.discontinuities[l];if(c){var f=Math.abs(i-c.time);if(null!==a&&a<f)break;(!o||null===a||a>=f)&&(a=f,o={time:c.time,segmentIndex:u})}}return o}},{name:"Playlist",run:function(e,t,n,r,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],Js=function(e){function t(){Ko(this,t);var e=Jo(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.inspectCache_=void 0,e.timelines=[],e.discontinuities=[],e.datetimeToDisplayTime=null,e.logger_=Os("SyncController"),e}return Qo(t,e),$o(t,[{key:"getSyncPoint",value:function(e,t,n,r){var i=this.runStrategies_(e,t,n,r);return i.length?this.selectSyncPoint_(i,{key:"time",value:r}):null}},{key:"getExpiredTime",value:function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+da(e,r.segmentIndex,0))}},{key:"runStrategies_",value:function(e,t,n,r){for(var i=[],o=0;o<Qs.length;o++){var a=Qs[o],s=a.run(this,e,t,n,r);s&&(s.strategy=a.name,i.push({strategy:a.name,syncPoint:s}))}return i}},{key:"selectSyncPoint_",value:function(e,t){for(var n=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),i=e[0].strategy,o=1;o<e.length;o++){var a=Math.abs(e[o].syncPoint[t.key]-t.value);a<r&&(r=a,n=e[o].syncPoint,i=e[o].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+i+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+"]"),n}},{key:"saveExpiredSegmentInfo",value:function(e,t){for(var n=t.mediaSequence-e.mediaSequence-1;n>=0;n--){var r=e.segments[n];if(r&&void 0!==r.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:r.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value: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}}},{key:"reset",value:function(){this.inspectCache_=void 0}},{key:"probeSegmentInfo",value:function(e){var t=e.segment,n=e.playlist,r=void 0;return(r=t.map?this.probeMp4Segment_(e):this.probeTsSegment_(e))&&this.calculateSegmentTimeMapping_(e,r)&&(this.saveDiscontinuitySyncInfo_(e),n.syncInfo||(n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:t.start})),r}},{key:"probeMp4Segment_",value:function(e){var t=e.segment,n=Re.a.timescale(t.map.bytes),r=Re.a.compositionStartTime(n,e.bytes);return null!==e.timestampOffset&&(e.timestampOffset-=r),{start:r,end:r+t.duration}}},{key:"probeTsSegment_",value:function(e){var t=$s(e.bytes,this.inspectCache_),n=void 0,r=void 0,i=void 0;return t?(t.video&&2===t.video.length?(this.inspectCache_=t.video[1].dts,n=t.video[0].dtsTime,r=t.video[1].dtsTime,i=t.video):t.audio&&2===t.audio.length&&(this.inspectCache_=t.audio[1].dts,n=t.audio[0].dtsTime,r=t.audio[1].dtsTime,i=t.audio),{segmentTimestampInfo:i,start:n,end:r,containsVideo:t.video&&2===t.video.length,containsAudio:t.audio&&2===t.audio.length}):null}},{key:"timestampOffsetForTimeline",value:function(e){return void 0===this.timelines[e]?null:this.timelines[e].time}},{key:"mappingForTimeline",value:function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}},{key:"calculateSegmentTimeMapping_",value:function(e,t){var n=e.segment,r=this.timelines[e.timeline];if(null!==e.timestampOffset)r={time:e.startOfSegment,mapping:e.startOfSegment-t.start},this.timelines[e.timeline]=r,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+r.time+"] [mapping: "+r.mapping+"]"),n.start=e.startOfSegment,n.end=t.end+r.mapping;else{if(!r)return!1;n.start=t.start+r.mapping,n.end=t.end+r.mapping}return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(e){var t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var r=0;r<t.discontinuityStarts.length;r++){var i=t.discontinuityStarts[r],o=t.discontinuitySequence+r+1,a=i-e.mediaIndex,s=Math.abs(a);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>s){var u=void 0;u=a<0?n.start-da(t,e.mediaIndex,i):n.end+da(t,e.mediaIndex+1,i),this.discontinuities[o]={time:u,accuracy:s}}}}},{key:"dispose",value:function(){this.trigger("dispose"),this.off()}}]),t}(Ho.EventTarget),Zs=new Za("./decrypter-worker.worker.js",(function(e,t){var n=this;!function(){var e=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=null,i=function(){function t(n){e(this,t),r||(r=function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],n=e[1],r=t[4],i=n[4],o=void 0,a=void 0,s=void 0,u=[],l=[],c=void 0,f=void 0,h=void 0,d=void 0,p=void 0;for(o=0;o<256;o++)l[(u[o]=o<<1^283*(o>>7))^o]=o;for(a=s=0;!r[a];a^=c||1,s=l[s]||1)for(h=(h=s^s<<1^s<<2^s<<3^s<<4)>>8^255&h^99,r[a]=h,i[h]=a,p=16843009*u[f=u[c=u[a]]]^65537*f^257*c^16843008*a,d=257*u[h]^16843008*h,o=0;o<4;o++)t[o][a]=d=d<<24^d>>>8,n[o][h]=p=p<<24^p>>>8;for(o=0;o<5;o++)t[o]=t[o].slice(0),n[o]=n[o].slice(0);return e}()),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 i=void 0,o=void 0,a=void 0,s=void 0,u=void 0,l=this._tables[0][4],c=this._tables[1],f=n.length,h=1;if(4!==f&&6!==f&&8!==f)throw new Error("Invalid aes key size");for(s=n.slice(0),u=[],this._key=[s,u],i=f;i<4*f+28;i++)a=s[i-1],(i%f==0||8===f&&i%f==4)&&(a=l[a>>>24]<<24^l[a>>16&255]<<16^l[a>>8&255]<<8^l[255&a],i%f==0&&(a=a<<8^a>>>24^h<<24,h=h<<1^283*(h>>7))),s[i]=s[i-f]^a;for(o=0;i;o++,i--)a=s[3&o?i:i-4],u[o]=i<=4||o<4?a:c[0][l[a>>>24]]^c[1][l[a>>16&255]]^c[2][l[a>>8&255]]^c[3][l[255&a]]}return t.prototype.decrypt=function(e,t,n,r,i,o){var a=this._key[1],s=e^a[0],u=r^a[1],l=n^a[2],c=t^a[3],f=void 0,h=void 0,d=void 0,p=a.length/4-2,m=void 0,y=4,g=this._tables[1],v=g[0],b=g[1],_=g[2],T=g[3],w=g[4];for(m=0;m<p;m++)f=v[s>>>24]^b[u>>16&255]^_[l>>8&255]^T[255&c]^a[y],h=v[u>>>24]^b[l>>16&255]^_[c>>8&255]^T[255&s]^a[y+1],d=v[l>>>24]^b[c>>16&255]^_[s>>8&255]^T[255&u]^a[y+2],c=v[c>>>24]^b[s>>16&255]^_[u>>8&255]^T[255&l]^a[y+3],y+=4,s=f,u=h,l=d;for(m=0;m<4;m++)i[(3&-m)+o]=w[s>>>24]<<24^w[u>>16&255]<<16^w[l>>8&255]<<8^w[255&c]^a[y++],f=s,s=u,u=l,l=c,c=f},t}(),o=function(){function t(){e(this,t),this.listeners={}}return t.prototype.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.prototype.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e].splice(n,1),n>-1},t.prototype.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),o=t.length,a=0;a<o;++a)t[a].apply(this,i)},t.prototype.dispose=function(){this.listeners={}},t.prototype.pipe=function(e){this.on("data",(function(t){e.push(t)}))},t}(),a=function(t){function n(){e(this,n);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,t.call(this,o));return r.jobs=[],r.delay=1,r.timeout_=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),n.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},n.prototype.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},n}(o),s=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},u=function(){function n(t,r,i,o){e(this,n);var u=n.STEP,l=new Int32Array(t.buffer),c=new Uint8Array(t.byteLength),f=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_(l.subarray(f,f+u),r,i,c)),f=u;f<l.length;f+=u)i=new Uint32Array([s(l[f-4]),s(l[f-3]),s(l[f-2]),s(l[f-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(f,f+u),r,i,c));this.asyncStream_.push((function(){var e;o(null,(e=c).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return n.prototype.decryptChunk_=function(e,t,n,r){return function(){var o=function(e,t,n){var r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),o=new i(Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),u=new Int32Array(a.buffer),l=void 0,c=void 0,f=void 0,h=void 0,d=void 0,p=void 0,m=void 0,y=void 0,g=void 0;for(l=n[0],c=n[1],f=n[2],h=n[3],g=0;g<r.length;g+=4)d=s(r[g]),p=s(r[g+1]),m=s(r[g+2]),y=s(r[g+3]),o.decrypt(d,p,m,y,u,g),u[g]=s(u[g]^l),u[g+1]=s(u[g+1]^c),u[g+2]=s(u[g+2]^f),u[g+3]=s(u[g+3]^h),l=d,c=p,f=m,h=y;return a}(e,t,n);r.set(o,e.byteOffset)}},t(n,null,[{key:"STEP",get:function(){return 32e3}}]),n}();new function(e){e.onmessage=function(t){var n=t.data,r=new Uint8Array(n.encrypted.bytes,n.encrypted.byteOffset,n.encrypted.byteLength),i=new Uint32Array(n.key.bytes,n.key.byteOffset,n.key.byteLength/4),o=new Uint32Array(n.iv.bytes,n.iv.byteOffset,n.iv.byteLength/4);new u(r,i,o,(function(t,r){var i,o;e.postMessage((i={source:n.source,decrypted:r},o={},Object.keys(i).forEach((function(e){var t=i[e];ArrayBuffer.isView(t)?o[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:o[e]=t})),o),[r.buffer])}))}}(n)}()})),eu=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},tu=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},nu=function(e,t){t.activePlaylistLoader=e,e.load()},ru={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],i=t.blacklistCurrentPlaylist;tu(n,r);var o=r.activeTrack(),a=r.activeGroup(),s=(a.filter((function(e){return e.default}))[0]||a[0]).id,u=r.tracks[s];if(o!==u){for(var l in Ho.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[l].enabled=r.tracks[l]===u;r.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e];Ho.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),tu(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},iu={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();o.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&o.load()})),t.on("loadedplaylist",(function(){o.playlist(t.media(),i),r.paused()||o.load()})),t.on("error",ru[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[e],a=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();o.playlist(e,i),o.track(a.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&o.load()})),t.on("loadedplaylist",(function(){o.playlist(t.media(),i),r.paused()||o.load()})),t.on("error",ru[e](e,n))}},ou={AUDIO:function(e,t){var n=t.hls,r=t.sourceType,i=t.segmentLoaders[e],o=t.requestOptions,a=t.master.mediaGroups,s=t.mediaTypes[e],u=s.groups,l=s.tracks,c=t.masterPlaylistLoader;for(var f in a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}}),a[e])for(var h in u[f]||(u[f]=[]),a[e][f]){var d=a[e][f][h],p=void 0;if(p=d.resolvedUri?new la(d.resolvedUri,n,o):d.playlists&&"dash"===r?new xs(d.playlists[0],n,o,c):null,d=Ho.mergeOptions({id:h,playlistLoader:p},d),iu[e](e,d.playlistLoader,t),u[f].push(d),void 0===l[h]){var m=new Ho.AudioTrack({id:h,kind:eu(d),enabled:!1,language:d.language,default:d.default,label:h});l[h]=m}}i.on("error",ru[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.hls,i=t.sourceType,o=t.segmentLoaders[e],a=t.requestOptions,s=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,f=t.masterPlaylistLoader;for(var h in s[e])for(var d in l[h]||(l[h]=[]),s[e][h])if(!s[e][h][d].forced){var p=s[e][h][d],m=void 0;if("hls"===i?m=new la(p.resolvedUri,r,a):"dash"===i&&(m=new xs(p.playlists[0],r,a,f)),p=Ho.mergeOptions({id:d,playlistLoader:m},p),iu[e](e,p.playlistLoader,t),l[h].push(p),void 0===c[d]){var y=n.addRemoteTextTrack({id:d,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:d},!1).track;c[d]=y}}o.on("error",ru[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,i=t.mediaTypes[e],o=i.groups,a=i.tracks;for(var s in r[e])for(var u in o[s]||(o[s]=[]),r[e][s]){var l=r[e][s][u];if(l.instreamId.match(/CC\d/)&&(o[s].push(Ho.mergeOptions({id:u},l)),void 0===a[u])){var c=n.addRemoteTextTrack({id:l.instreamId,kind:"captions",default:l.default&&l.autoselect,language:l.language,label:u},!1).track;a[u]=c}}}},au={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if(n[r].enabled)return n[r];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if("showing"===n[r].mode||"hidden"===n[r].mode)return n[r];return null}}},su=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){ou[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,i=e.hls;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var r=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,o=r.media();if(!o)return null;var a=null;return o.attributes[e]&&(a=i[o.attributes[e]]),a=a||i.main,void 0===n?a:null===n?null:a.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=au[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,o=t.mediaTypes[e],a=o.activeTrack(),s=o.activeGroup(a),u=o.activePlaylistLoader;tu(r,o),s&&(s.playlistLoader?(r.resyncLoader(),nu(s.playlistLoader,o)):u&&i.resetEverything())}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,o=t.mediaTypes[e],a=o.activeTrack(),s=o.activeGroup(a),u=o.activePlaylistLoader;tu(r,o),s&&(s.playlistLoader?u!==s.playlistLoader?(r.track&&r.track(a),r.resetEverything(),nu(s.playlistLoader,o)):nu(s.playlistLoader,o):i.resetEverything())}}(n,e)}));var o=t.AUDIO.activeGroup(),a=(o.filter((function(e){return e.default}))[0]||o[0]).id;t.AUDIO.tracks[a].enabled=!0,t.AUDIO.onTrackChanged(),n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))}));var s=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"hls-audio-change"})};for(var u in r.audioTracks().addEventListener("change",s),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",(function(){r.audioTracks().removeEventListener("change",s),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[u])},uu=void 0,lu=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],cu=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},fu=function(e){function t(e){Ko(this,t);var n,r=Jo(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),i=e.url,o=e.handleManifestRedirects,a=e.withCredentials,s=e.tech,u=e.bandwidth,l=e.externHls,c=e.useCueTags,f=e.blacklistDuration,h=e.enableLowInitialPlaylist,d=e.cacheEncryptionKeys,p=e.sourceType;if(!i)throw new Error("A non-empty playlist URL is required");uu=l,r.withCredentials=a,r.tech_=s,r.hls_=s.hls,r.sourceType_=p,r.useCueTags_=c,r.blacklistDuration=f,r.enableLowInitialPlaylist=h,r.useCueTags_&&(r.cueTagsTrack_=r.tech_.addTextTrack("metadata","ad-cues"),r.cueTagsTrack_.inBandMetadataTrackDispatchType=""),r.requestOptions_={withCredentials:a,handleManifestRedirects:o,timeout:null},r.mediaTypes_=(n={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(e){n[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Ps,activeTrack:Ps,onGroupChanged:Ps,onTrackChanged:Ps}})),n),r.mediaSource=new Ho.MediaSource,r.mediaSource.addEventListener("sourceopen",r.handleSourceOpen_.bind(r)),r.seekable_=Ho.createTimeRanges(),r.hasPlayed_=!1,r.syncController_=new Js(e),r.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,r.decrypter_=new Zs,r.inbandTextTracks_={};var m={hls:r.hls_,mediaSource:r.mediaSource,currentTime:r.tech_.currentTime.bind(r.tech_),seekable:function(){return r.seekable()},seeking:function(){return r.tech_.seeking()},duration:function(){return r.mediaSource.duration},hasPlayed:function(){return r.hasPlayed_},goalBufferLength:function(){return r.goalBufferLength()},bandwidth:u,syncController:r.syncController_,decrypter:r.decrypter_,sourceType:r.sourceType_,inbandTextTracks:r.inbandTextTracks_,cacheEncryptionKeys:d};return r.masterPlaylistLoader_="dash"===r.sourceType_?new xs(i,r.hls_,r.requestOptions_):new la(i,r.hls_,r.requestOptions_),r.setupMasterPlaylistLoaderListeners_(),r.mainSegmentLoader_=new qs(Ho.mergeOptions(m,{segmentMetadataTrack:r.segmentMetadataTrack_,loaderType:"main"}),e),r.audioSegmentLoader_=new qs(Ho.mergeOptions(m,{loaderType:"audio"}),e),r.subtitleSegmentLoader_=new Xs(Ho.mergeOptions(m,{loaderType:"vtt",featuresNativeTextTracks:r.tech_.featuresNativeTextTracks}),e),r.setupSegmentLoaderListeners_(),lu.forEach((function(e){r[e+"_"]=cu.bind(r,e)})),r.logger_=Os("MPC"),r.masterPlaylistLoader_.load(),r}return Qo(t,e),$o(t,[{key:"setupMasterPlaylistLoaderListeners_",value:function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Ea(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()),su({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,hls:e.hls_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t);try{e.setupSourceBuffers_()}catch(t){return Ho.log.warn("Failed to create SourceBuffers",t),e.mediaSource.endOfStream("decode")}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){e.excludeUnsupportedVariants_();var n=void 0;return e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),e.initialMedia_=n,void e.masterPlaylistLoader_.media(e.initialMedia_)}if(e.useCueTags_&&e.updateAdCues_(t),e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.updateDuration(),e.tech_.paused()||(e.mainSegmentLoader_.load(),e.audioSegmentLoader_&&e.audioSegmentLoader_.load()),!t.endList){var r=function(){var t=e.seekable();0!==t.length&&e.mediaSource.addSeekableRange_(t.start(0),t.end(0))};if(e.duration()!==1/0){e.tech_.one("durationchange",(function t(){e.duration()===1/0?r():e.tech_.one("durationchange",t)}))}else r()}})),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;Ea(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:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))}},{key:"triggerPresenceUsage_",value:function(e,t){var n=e.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var o in n.AUDIO)for(var a in n.AUDIO[o]){n.AUDIO[o][a].uri||(r=!1)}r&&this.tech_.trigger({type:"usage",name:"hls-demuxed"}),Object.keys(n.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"hls-webvtt"}),uu.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"hls-aes"}),uu.Playlist.isFmp4(t)&&this.tech_.trigger({type:"usage",name:"hls-fmp4"}),i.length&&Object.keys(n.AUDIO[i[0]]).length>1&&this.tech_.trigger({type:"usage",name:"hls-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"})}},{key:"setupSegmentLoaderListeners_",value:function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist(),n=e.masterPlaylistLoader_.media(),r=e.tech_.buffered();(function(e){var t=e.currentPlaylist,n=e.nextPlaylist,r=e.forwardBuffer,i=e.bufferLowWaterLine,o=e.duration;e.log;return n?!t.endList||(o<Rs.MAX_BUFFER_LOW_WATER_LINE||(n.attributes.BANDWIDTH<t.attributes.BANDWIDTH||r>=i)):(Ho.log.warn("We received no playlist to switch to. Please check your stream."),!1)})({currentPlaylist:n,nextPlaylist:t,forwardBuffer:r.length?r.end(r.length-1)-e.tech_.currentTime():0,bufferLowWaterLine:e.bufferLowWaterLine(),duration:e.duration(),log:e.logger_})&&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("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("ended",(function(){e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(){e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120)})),this.mainSegmentLoader_.on("reseteverything",(function(){e.tech_.trigger("hls-reset")})),this.mainSegmentLoader_.on("segmenttimemapping",(function(t){e.tech_.trigger({type:"hls-segment-time-mapping",mapping:t.mapping})})),this.audioSegmentLoader_.on("ended",(function(){e.onEndOfStream()}))}},{key:"mediaSecondsLoaded_",value:function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"load",value:function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}},{key:"smoothQualityChange_",value:function(){var e=this.selectPlaylist();e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())}},{key:"fastQualityChange_",value:function(){var e=this,t=this.selectPlaylist();t!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(t),this.mainSegmentLoader_.resetEverything((function(){Ho.browser.IE_VERSION||Ho.browser.IS_EDGE?e.tech_.setCurrentTime(e.tech_.currentTime()+.04):e.tech_.setCurrentTime(e.tech_.currentTime())})))}},{key:"play",value: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}}},{key:"setupFirstPlay",value: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(Ho.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}},{key:"handleSourceOpen_",value:function(){try{this.setupSourceBuffers_()}catch(e){return Ho.log.warn("Failed to create Source Buffers",e),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")}},{key:"onEndOfStream",value:function(){var e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=!this.mainSegmentLoader_.startingMedia_||this.mainSegmentLoader_.startingMedia_.containsVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),e){this.logger_("calling mediaSource.endOfStream()");try{this.mediaSource.endOfStream()}catch(e){Ho.log.warn("Failed to call media source endOfStream",e)}}}},{key:"stuckAtPlaylistEnd_",value:function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.mediaSource.duration);if(null===t)return!1;var n=uu.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=.1;var o=i.end(i.length-1);return o-r<=.1&&n-o<=.1}},{key:"blacklistCurrentPlaylist",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=void 0,r=void 0;if(n=e.playlist||this.masterPlaylistLoader_.media(),t=t||e.blacklistDuration||this.blacklistDuration,!n){this.error=e;try{return this.mediaSource.endOfStream("network")}catch(e){return this.trigger("error")}}var i=1===this.masterPlaylistLoader_.master.playlists.filter(wa).length,o=this.masterPlaylistLoader_.master.playlists;return 1===o.length?(Ho.log.warn("Problem encountered with the current HLS playlist. Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(i)):(i&&(Ho.log.warn("Removing all playlists from the blacklist because the last rendition is about to be blacklisted."),o.forEach((function(e){e.excludeUntil!==1/0&&delete e.excludeUntil})),this.tech_.trigger("retryplaylist")),n.excludeUntil=Date.now()+1e3*t,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),r=this.selectPlaylist(),Ho.log.warn("Problem encountered with the current HLS playlist."+(e.message?" "+e.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(r,i))}},{key:"pauseLoading",value:function(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}},{key:"setCurrentTime",value:function(e){var t=za(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}},{key:"duration",value:function(){return this.masterPlaylistLoader_?this.mediaSource?this.mediaSource.duration:uu.Playlist.duration(this.masterPlaylistLoader_.media()):0}},{key:"seekable",value:function(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function(){var e=void 0;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.mediaSource.duration);if(null!==n){var r=this.masterPlaylistLoader_.master.suggestedPresentationDelay,i=uu.Playlist.seekable(t,n,r);if(0!==i.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.mediaSource.duration)))return;if(0===(e=uu.Playlist.seekable(t,n,r)).length)return}var o=void 0,a=void 0;this.seekable_&&this.seekable_.length&&(o=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>i.end(0)||i.start(0)>e.end(0)?this.seekable_=i:this.seekable_=Ho.createTimeRanges([[e.start(0)>i.start(0)?e.start(0):i.start(0),e.end(0)<i.end(0)?e.end(0):i.end(0)]]):this.seekable_=i,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===o&&this.seekable_.start(0)===a||(this.logger_("seekable updated ["+Wa(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}}},{key:"updateDuration",value:function(){var e=this,t=this.mediaSource.duration,n=uu.Playlist.duration(this.masterPlaylistLoader_.media()),r=this.tech_.buffered(),i=function t(){e.logger_("Setting duration from "+e.mediaSource.duration+" => "+n);try{e.mediaSource.duration=n}catch(e){Ho.log.warn("Failed to set media source duration",e)}e.tech_.trigger("durationchange"),e.mediaSource.removeEventListener("sourceopen",t)};r.length>0&&(n=Math.max(n,r.end(r.length-1))),t!==n&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",i):i())}},{key:"dispose",value:function(){var e=this;this.trigger("dispose"),this.decrypter_&&this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var r in n)n[r].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.off(),this.mediaSource.dispose&&this.mediaSource.dispose()}},{key:"master",value:function(){return this.masterPlaylistLoader_.master}},{key:"media",value:function(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function(){var e,t=this.masterPlaylistLoader_.media();if(t&&"open"===this.mediaSource.readyState){if((e=ls(this.masterPlaylistLoader_.master,t)).length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+t.resolvedUri,this.mediaSource.endOfStream("decode");this.configureLoaderMimeTypes_(e),this.excludeIncompatibleVariants_(t)}}},{key:"configureLoaderMimeTypes_",value:function(e){var t=e.length>1&&-1===e[0].indexOf(",")&&e[0]!==e[1]?new Ho.EventTarget:null;this.mainSegmentLoader_.mimeType(e[0],t),e[1]&&this.audioSegmentLoader_.mimeType(e[1],t)}},{key:"excludeUnsupportedVariants_",value:function(){this.master().playlists.forEach((function(e){var t;e.attributes.CODECS&&a.a.MediaSource&&a.a.MediaSource.isTypeSupported&&!a.a.MediaSource.isTypeSupported('video/mp4; codecs="'+(t=e.attributes.CODECS,t.replace(/avc1\.(\d+)\.(\d+)/i,(function(e){return as([e])[0]}))+'"'))&&(e.excludeUntil=1/0)}))}},{key:"excludeIncompatibleVariants_",value:function(e){var t=2,n=null,r=void 0;e.attributes.CODECS&&(r=ss(e.attributes.CODECS),n=r.videoCodec,t=r.codecCount),this.master().playlists.forEach((function(e){var r={codecCount:2,videoCodec:null};e.attributes.CODECS&&(r=ss(e.attributes.CODECS)),r.codecCount!==t&&(e.excludeUntil=1/0),r.videoCodec!==n&&(e.excludeUntil=1/0)}))}},{key:"updateAdCues_",value:function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e.segments)for(var r=n,i=void 0,o=0;o<e.segments.length;o++){var s=e.segments[o];if(i||(i=Ks(t,r+s.duration/2)),i){if("cueIn"in s){i.endTime=r,i.adEndTime=r,r+=s.duration,i=null;continue}if(r<i.endTime){r+=s.duration;continue}i.endTime+=s.duration}else if("cueOut"in s&&((i=new a.a.VTTCue(r,r+s.duration,s.cueOut)).adStartTime=r,i.adEndTime=r+parseFloat(s.cueOut),t.addCue(i)),"cueOutCont"in s){var u=void 0,l=void 0,c=s.cueOutCont.split("/").map(parseFloat),f=Zo(c,2);u=f[0],l=f[1],(i=new a.a.VTTCue(r,r+s.duration,"")).adStartTime=r-u,i.adEndTime=i.adStartTime+l,t.addCue(i)}r+=s.duration}}(e,this.cueTagsTrack_,t)}},{key:"goalBufferLength",value:function(){var e=this.tech_.currentTime(),t=Rs.GOAL_BUFFER_LENGTH,n=Rs.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,Rs.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)}},{key:"bufferLowWaterLine",value:function(){var e=this.tech_.currentTime(),t=Rs.BUFFER_LOW_WATER_LINE,n=Rs.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,Rs.MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,r)}}]),t}(Ho.EventTarget),hu=function e(t,n,r){Ko(this,e);var i,o,a,s=t.masterPlaylistController_,u=s[(t.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(s);if(n.attributes.RESOLUTION){var l=n.attributes.RESOLUTION;this.width=l.width,this.height=l.height}this.bandwidth=n.attributes.BANDWIDTH,this.id=r,this.enabled=(i=t.playlists,o=n.id,a=u,function(e){var t=i.master.playlists[o],n=Ta(t),r=wa(t);return void 0===e?r:(e?delete t.disabled:t.disabled=!0,e===r||n||(a(),e?i.trigger("renditionenabled"):i.trigger("renditiondisabled")),e)})},du=["seeking","seeked","pause","playing","error"],pu=function(){function e(t){var n=this;Ko(this,e),this.tech_=t.tech,this.seekable=t.seekable,this.allowSeeksWithinUnsafeLiveWindow=t.allowSeeksWithinUnsafeLiveWindow,this.media=t.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Os("PlaybackWatcher"),this.logger_("initialize");var r=function(){return n.monitorCurrentTime_()},i=function(){return n.techWaiting_()},o=function(){return n.cancelTimer_()},s=function(){return n.fixesBadSeeks_()};this.tech_.on("seekablechanged",s),this.tech_.on("waiting",i),this.tech_.on(du,o),this.tech_.on("canplay",r),this.dispose=function(){n.logger_("dispose"),n.tech_.off("seekablechanged",s),n.tech_.off("waiting",i),n.tech_.off(du,o),n.tech_.off("canplay",r),n.checkCurrentTimeTimeout_&&a.a.clearTimeout(n.checkCurrentTimeTimeout_),n.cancelTimer_()}}return $o(e,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&a.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=a.a.setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value:function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+.1>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"fixesBadSeeks_",value:function(){if(!this.tech_.seeking())return!1;var e=this.seekable(),t=this.tech_.currentTime(),n=void 0;this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(n=e.end(e.length-1));this.beforeSeekableWindow_(e,t)&&(n=e.start(0)+.1);return void 0!==n&&(this.logger_("Trying to seek outside of seekable at time "+t+" with seekable range "+Wa(e)+". Seeking to "+n+"."),this.tech_.setCurrentTime(n),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=za(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."),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}}},{key:"techWaiting_",value: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:"hls-live-resync"}),!0}var r=this.tech_.buffered(),i=Va(r,t);if(this.videoUnderflow_(i,r,t))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(i.length>0){var o=i.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+o+", seeking to "+i.start(0)),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*o,t),!0}return!1}},{key:"afterSeekableWindow_",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e.length)return!1;var i=e.end(e.length-1)+.1,o=!n.endList;return o&&r&&(i=e.end(e.length-1)+3*n.targetDuration),t>i}},{key:"beforeSeekableWindow_",value:function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-.1)}},{key:"videoUnderflow_",value:function(e,t,n){if(0===e.length){var r=this.gapFromVideoUnderflow_(t,n);if(r)return this.logger_("Encountered a gap in video from "+r.start+" to "+r.end+". Seeking to current time "+n),!0}return!1}},{key:"skipTheGap_",value:function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=Va(t,n);this.cancelTimer_(),0!==r.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+1/30),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}},{key:"gapFromVideoUnderflow_",value:function(e,t){for(var n=function(e){if(e.length<2)return Ho.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var r=e.end(n-1),i=e.start(n);t.push([r,i])}return Ho.createTimeRanges(t)}(e),r=0;r<n.length;r++){var i=n.start(r),o=n.end(r);if(t-i<4&&t-i>2)return{start:i,end:o}}return null}}]),e}(),mu={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_)}},yu=function(e){!function e(t,n){var r=0,i=0,o=Ho.mergeOptions(mu,n);t.ready((function(){t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var a=function(){i&&t.currentTime(i)},s=function(e){null!=e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",a),t.src(e),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){if(Date.now()-r<1e3*o.errorInterval)t.trigger({type:"usage",name:"hls-error-reload-canceled"});else{if(o.getSource&&"function"==typeof o.getSource)return r=Date.now(),o.getSource.call(t,s);Ho.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},l=function e(){t.off("loadedmetadata",a),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=function(n){l(),e(t,n)}}(this,e)},gu={PlaylistLoader:la,Playlist:ka,Decrypter:He,AsyncStream:ze,decrypt:We,utils:Ma,STANDARD_PLAYLIST_SELECTOR:function(){var e=this.useDevicePixelRatio&&a.a.devicePixelRatio||1;return function(e,t,n,r,i){var o=e.playlists.map((function(e){var t,n;return t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,{bandwidth:e.attributes.BANDWIDTH||a.a.Number.MAX_VALUE,width:t,height:n,playlist:e}}));zs(o,(function(e,t){return e.bandwidth-t.bandwidth}));var s=(o=o.filter((function(e){return!ka.isIncompatible(e.playlist)}))).filter((function(e){return ka.isEnabled(e.playlist)}));s.length||(s=o.filter((function(e){return!ka.isDisabled(e.playlist)})));var u=s.filter((function(e){return e.bandwidth*Rs.BANDWIDTH_VARIANCE<t})),l=u[u.length-1],c=u.filter((function(e){return e.bandwidth===l.bandwidth}))[0];if(!1===i){var f=c||s[0]||o[0];return f?f.playlist:null}var h=u.filter((function(e){return e.width&&e.height}));zs(h,(function(e,t){return e.width-t.width}));var d=h.filter((function(e){return e.width===n&&e.height===r}));l=d[d.length-1];var p=d.filter((function(e){return e.bandwidth===l.bandwidth}))[0],m=void 0,y=void 0,g=void 0;p||(y=(m=h.filter((function(e){return e.width>n||e.height>r}))).filter((function(e){return e.width===m[0].width&&e.height===m[0].height})),l=y[y.length-1],g=y.filter((function(e){return e.bandwidth===l.bandwidth}))[0]);var v=g||p||c||s[0]||o[0];return v?v.playlist:null}(this.playlists.master,this.systemBandwidth,parseInt(Fs(this.tech_.el(),"width"),10)*e,parseInt(Fs(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions)},INITIAL_PLAYLIST_SELECTOR:function(){var e=this.playlists.master.playlists.filter(ka.isEnabled);return zs(e,(function(e,t){return Vs(e,t)})),e.filter((function(e){return ss(e.attributes.CODECS).videoCodec}))[0]||null},comparePlaylistBandwidth:Vs,comparePlaylistResolution:function(e,t){var n=void 0,r=void 0;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||a.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),n===(r=r||a.a.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-r},xhr:Oa()};["GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BANDWIDTH_VARIANCE"].forEach((function(e){Object.defineProperty(gu,e,{get:function(){return Ho.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),Rs[e]},set:function(t){Ho.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?Ho.log.warn("value of Hls."+e+" must be greater than or equal to 0"):Rs[e]=t}})}));var vu=function(e){if(/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(e))return"hls";return/^application\/dash\+xml/i.test(e)?"dash":null},bu=function(e,t){for(var n=t.media(),r=-1,i=0;i<e.length;i++)if(e[i].id===n.id){r=i;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};gu.canPlaySource=function(){return Ho.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var _u=function(e){var t=e.masterPlaylistController_.mainSegmentLoader_,n=e.masterPlaylistController_.audioSegmentLoader_,r=Ho.players[e.tech_.options_.playerId];if(r.eme){var i=function(e,t,n){if(!e)return e;var r=void 0,i=void 0;if(n.mimeType_)r=t.mimeType_,i=n.mimeType_;else{var o=cs(t.mimeType_),a=o.parameters.codecs.split(","),s=void 0,u=void 0;a.forEach((function(e){e=e.trim(),fs(e)?s=e:hs(e)&&(u=e)})),r=o.type+'; codecs="'+u+'"',i=o.type.replace("video","audio")+'; codecs="'+s+'"'}var l={},c=t.playlist_;for(var f in e)l[f]={audioContentType:i,videoContentType:r},c.contentProtection&&c.contentProtection[f]&&c.contentProtection[f].pssh&&(l[f].pssh=c.contentProtection[f].pssh),"string"==typeof e[f]&&(l[f].url=e[f]);return Ho.mergeOptions(e,l)}(e.source_.keySystems,t,n);i&&(r.currentSource().keySystems=i,11!==Ho.browser.IE_VERSION&&r.eme.initializeMediaKeys&&r.eme.initializeMediaKeys())}},Tu=function(){if(!window.localStorage)return null;var e=window.localStorage.getItem("videojs-vhs");if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};gu.supportsNativeHls=function(){var e=u.a.createElement("video");if(!Ho.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),gu.supportsNativeDash=!!Ho.getTech("Html5").isSupported()&&/maybe|probably/i.test(u.a.createElement("video").canPlayType("application/dash+xml")),gu.supportsTypeNatively=function(e){return"hls"===e?gu.supportsNativeHls:"dash"===e&&gu.supportsNativeDash},gu.isSupported=function(){return Ho.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var wu=function(e){function t(e,n,r){Ko(this,t);var i=Jo(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n,r.hls));if(n.options_&&n.options_.playerId){var o=Ho(n.options_.playerId);o.hasOwnProperty("hls")||Object.defineProperty(o,"hls",{get:function(){return Ho.log.warn("player.hls is deprecated. Use player.tech().hls instead."),n.trigger({type:"usage",name:"hls-player-access"}),i},configurable:!0}),o.vhs=i,o.dash=i,i.player_=o}if(i.tech_=n,i.source_=e,i.stats={},i.ignoreNextSeekingEvent_=!1,i.setOptions_(),i.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(i.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return i.on(u.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=u.a.fullscreenElement||u.a.webkitFullscreenElement||u.a.mozFullScreenElement||u.a.msFullscreenElement;t&&t.contains(i.tech_.el())&&i.masterPlaylistController_.smoothQualityChange_()})),i.on(i.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),i.on(i.tech_,"error",(function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),i.on(i.tech_,"play",i.play),i}return Qo(t,e),$o(t,[{key:"setOptions_",value:function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=this.options_.handleManifestRedirects||!1,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,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=Tu();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,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:"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"].forEach((function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio}},{key:"src",value:function(e,t){var n=this;e&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=this.tech_,this.options_.externHls=gu,this.options_.sourceType=vu(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.masterPlaylistController_=new fu(this.options_),this.playbackWatcher_=new pu(Ho.mergeOptions(this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()}})),this.masterPlaylistController_.on("error",(function(){Ho.players[n.tech_.options_.playerId].error(n.masterPlaylistController_.error)})),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):gu.STANDARD_PLAYLIST_SELECTOR.bind(this),this.masterPlaylistController_.selectInitialPlaylist=gu.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=1/(this.bandwidth||1),t=void 0;return t=this.throughput>0?1/this.throughput:0,Math.floor(1/(e+t))},set:function(){Ho.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 Ha(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 Ha(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(!window.localStorage)return!1;var t=Tu();t=t?Ho.mergeOptions(t,e):e;try{window.localStorage.setItem("videojs-vhs",JSON.stringify(t))}catch(e){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e,t;t=(e=n).playlists,e.representations=function(){return t&&t.master&&t.master.playlists?t.master.playlists.filter((function(e){return!Ta(e)})).map((function(t,n){return new hu(e,t,t.id)})):[]},_u(n)})),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.tech_.src(Ho.URL.createObjectURL(this.masterPlaylistController_.mediaSource)))}},{key:"setupQualityLevels_",value:function(){var e=this,t=Ho.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)})),bu(t,n.playlists)})),this.playlists.on("mediachange",(function(){bu(e.qualityLevels_,e.playlists)})))}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(e){this.masterPlaylistController_.setCurrentTime(e)}},{key:"duration",value:function(){return this.masterPlaylistController_.duration()}},{key:"seekable",value:function(){return this.masterPlaylistController_.seekable()}},{key:"dispose",value: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_.hls&&delete this.tech_.hls,function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"dispose",this).call(this)}},{key:"convertToProgramTime",value:function(e,t){return Ua({playlist:this.masterPlaylistController_.media(),time:e,callback:t})}},{key:"seekToProgramTime",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return Ba({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}}]),t}(Ho.getComponent("Component")),Su={name:"videojs-http-streaming",VERSION:"1.13.2",canHandleSource:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ho.mergeOptions(Ho.options,t);return Su.canPlayType(e.type,n)},handleSource:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ho.mergeOptions(Ho.options,n);return t.hls=new wu(e,t,r),t.hls.xhr=Oa(),t.hls.src(e.src,e.type),t.hls},canPlayType:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ho.mergeOptions(Ho.options,t),r=n.hls.overrideNative,i=vu(e),o=i&&(!gu.supportsTypeNatively(i)||r);return o?"maybe":""}};void 0!==Ho.MediaSource&&void 0!==Ho.URL||(Ho.MediaSource=bs,Ho.URL=_s),bs.supportsNativeMediaSources()&&Ho.getTech("Html5").registerSourceHandler(Su,0),Ho.HlsHandler=wu,Ho.HlsSourceHandler=Su,Ho.Hls=gu,Ho.use||Ho.registerComponent("Hls",gu),Ho.options.hls=Ho.options.hls||{},Ho.registerPlugin?Ho.registerPlugin("reloadSourceOnError",yu):Ho.plugin("reloadSourceOnError",yu);var Eu=Ho;
52
+ /*! @name videojs-contrib-quality-levels @version 2.0.9 @license Apache-2.0 */function ku(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Cu=function e(t){var n=this;if(Eu.browser.IS_IE8)for(var r in n=u.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},xu=function(e){var t,n;function r(){var t,n=ku(ku(t=e.call(this)||this));if(Eu.browser.IS_IE8)for(var i in n=u.a.createElement("custom"),r.prototype)"constructor"!==i&&(n[i]=r.prototype[i]);return n.levels_=[],n.selectedIndex_=-1,Object.defineProperty(n,"selectedIndex",{get:function(){return n.selectedIndex_}}),Object.defineProperty(n,"length",{get:function(){return n.levels_.length}}),n||ku(t)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var n=this.levels_.length;return t=new Cu(e),""+n in this||Object.defineProperty(this,n,{get:function(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t},i.removeQualityLevel=function(e){for(var t=null,n=0,r=this.length;n<r;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},i.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var r=this[t];if(r.id===e)return r}return null},i.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},r}(Eu.EventTarget);for(var Ou in xu.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},xu.prototype.allowedEvents_)xu.prototype["on"+Ou]=null;var Pu=Eu.registerPlugin||Eu.plugin,Au=function(e){return t=this,Eu.mergeOptions({},e),n=t.qualityLevels,r=new xu,t.on("dispose",(function e(){r.dispose(),t.qualityLevels=n,t.off("dispose",e)})),t.qualityLevels=function(){return r},t.qualityLevels.VERSION="2.0.9",r;var t,n,r};Pu("qualityLevels",Au),Au.VERSION="2.0.9";function Ru(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Lu=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=n.id,this.plugin=t,this.source=n,this.enabled=this.enabled.bind(this)}var t,n,r;return t=e,(n=[{key:"enabled",value:function(e){return void 0===e?this.plugin.currentSource===this.source:(e&&this.plugin.setSource(this.source.id),e)}}])&&Ru(t.prototype,n),r&&Ru(t,r),e}();function Iu(e){return(Iu="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 Du(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nu(e,t){return(Nu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ju(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Uu(e);if(t){var i=Uu(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Mu(this,n)}}function Mu(e,t){return!t||"object"!==Iu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Uu(e){return(Uu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Bu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nu(e,t)}(o,e);var t,n,r,i=ju(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).sources=[],n.qualityLevels=e.qualityLevels(),n.populateSources(t.sources),n}return t=o,(n=[{key:"setSource",value:function(e){var t=this,n=this.getSourceById(e);if(null===n)return this.currentSource;var r=this.player.currentTime(),i=!this.player.paused();return this._currentSource=n,this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",(function(){t.player.currentTime()!==r&&t.player.currentTime(r),i&&t.player.play()})),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(e){return this.sources.find((function(t){return t.id===e}))}},{key:"populateSources",value:function(e){var t=this,n=null;e.forEach((function(e){t.qualityLevels.addQualityLevel(new Lu(t,e)),t.sources.push(e),t.trigger({event:"addsource",source:e}),e.default&&(n=e)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(e){for(var t=this.qualityLevels,n=-1,r=0;r<t.length;r++)if(t[r].id===e.id){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})}},{key:"currentSource",get:function(){return this._currentSource}}])&&Du(t.prototype,n),r&&Du(t,r),o}(Eu.getPlugin("plugin"));Eu.registerPlugin("progressiveFiles",Bu);n(289);function Fu(e){return(Fu="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 zu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wu(e,t,n){return(Wu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Yu(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Hu(e,t){return(Hu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yu(e);if(t){var i=Yu(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gu(this,n)}}function Gu(e,t){return!t||"object"!==Fu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yu(e){return(Yu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hu(e,t)}(o,e);var t,n,r,i=qu(o);function o(){return zu(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(Wu(Yu(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Wu(Yu(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&Vu(t.prototype,n),r&&Vu(t,r),o}(Eu.getComponent("Component"));Xu.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},Eu.registerComponent("TimeWrapper",Xu);n(290);function Ku(e){return(Ku="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 $u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ju(e,t,n){return t&&Qu(e.prototype,t),n&&Qu(e,n),e}function Zu(e,t,n){return(Zu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=il(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function el(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tl(e,t)}function tl(e,t){return(tl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=il(e);if(t){var i=il(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return rl(this,n)}}function rl(e,t){return!t||"object"!==Ku(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function il(e){return(il=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ol=function(e){el(n,e);var t=nl(n);function n(e,r){return $u(this,n),t.call(this,e,r)}return Ju(n,[{key:"handleClick",value:function(e){var t=this;Zu(il(n.prototype),"handleClick",this).call(this,e),this.requestAnimationFrame((function(){t.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(e,t,r){if(!this.options_.item)return Zu(il(n.prototype),"createEl",this).call(this,e,t,r);var i=this.options_.item.getCollabsibleName(),o=this.options_.item.getCollabsibleValue(),a='\n <span class="vjs-menu-item-text">'.concat(i,"</span>\n <span>").concat(o,"</span>");return Zu(il(n.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:a},r)}}]),n}(Eu.getComponent("MenuItem")),al=Eu.getComponent("MenuButton"),sl=function(e){el(n,e);var t=nl(n);function n(e,r){return $u(this,n),t.call(this,e,r)}return Ju(n,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(Zu(il(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(Zu(il(n.prototype),"buildCSSClass",this).call(this))}},{key:"pressButton",value:function(){this.update(),al.prototype.pressButton.apply(this)}},{key:"createItems",value:function(){for(var e=[],t=0;t<this.options_.items.length;t++){var n=this.options_.items[t];n.isCollabsible&&(n.showInCollabsibleMenu()&&n.isCollapsed&&e.push(new ol(this.player_,{item:n})))}return e}},{key:"update",value:function(){Zu(il(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}}]),n}(al);Eu.registerComponent("cogButton",sl);n(291),n(292),n(293);function ul(e){return(ul="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 ll(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cl(e,t,n){return(cl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ml(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function fl(e,t){return(fl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ml(e);if(t){var i=ml(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dl(this,n)}}function dl(e,t){return!t||"object"!==ul(t)&&"function"!=typeof t?pl(e):t}function pl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ml(e){return(ml=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fl(e,t)}(o,e);var t,n,r,i=hl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(pl(n)),n.player_.on("playerresize",n.update),n.player_.on("dispose",(function(){n.player_.off("playerresize",n.update)})),n}return t=o,(n=[{key:"togglehidden",value:function(e){for(var t=0;t<this.children_.length;t++){var n=this.children_[t];n.isCollabsible&&(n.alwaysCollapsed||e?(n.isCollapsed=!0,n.addClass("cv-collapsed")):(n.isCollapsed=!1,n.removeClass("cv-collapsed")))}this.getChild("cogButton").update()}},{key:"update",value:function(){var e=this.player_.el().getBoundingClientRect();0!==e.width&&this.togglehidden(e.width<600)}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(cl(ml(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return cl(ml(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&ll(t.prototype,n),r&&ll(t,r),o}(Eu.getComponent("Component"));yl.prototype.options_={children:["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","subsCapsButton","fullscreenToggle"]},Eu.registerComponent("collapserator",yl);n(294);function gl(e){return(gl="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 vl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _l(e,t,n){return(_l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=El(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Tl(e,t){return(Tl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=El(e);if(t){var i=El(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sl(this,n)}}function Sl(e,t){return!t||"object"!==gl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function El(e){return(El=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tl(e,t)}(o,e);var t,n,r,i=wl(o);function o(){return vl(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(_l(El(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return _l(El(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(e){e.update()}))}}])&&bl(t.prototype,n),r&&bl(t,r),o}(Eu.getComponent("Component"));function Cl(e){return(Cl="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 xl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ol(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pl(e,t,n){return(Pl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Il(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Al(e,t){return(Al=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Il(e);if(t){var i=Il(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ll(this,n)}}function Ll(e,t){return!t||"object"!==Cl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Il(e){return(Il=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Al(e,t)}(o,e);var t,n,r,i=Rl(o);function o(){return xl(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Pl(Il(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Pl(Il(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){this.el_.style.width=100*e+"%"}}])&&Ol(t.prototype,n),r&&Ol(t,r),o}(Eu.getComponent("Component"));function Nl(e){return(Nl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ml(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ul(e,t,n){return(Ul="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Vl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Bl(e,t){return(Bl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vl(e);if(t){var i=Vl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zl(this,n)}}function zl(e,t){return!t||"object"!==Nl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vl(e){return(Vl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bl(e,t)}(o,e);var t,n,r,i=Fl(o);function o(){return jl(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(Ul(Vl(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Ul(Vl(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){e>0&&e<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*e+"%"}}])&&Ml(t.prototype,n),r&&Ml(t,r),o}(Eu.getComponent("Component"));function Hl(e){return(Hl="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 ql(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gl(e,t,n){return(Gl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=$l(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Yl(e,t){return(Yl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$l(e);if(t){var i=$l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Kl(this,n)}}function Kl(e,t){return!t||"object"!==Hl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $l(e){return($l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ql=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yl(e,t)}(o,e);var t,n,r,i=Xl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).playProgress=new Wl(n.player_),n.addChild(n.playProgress),n.loadProgress=new Dl(n.player_),n.addChild(n.loadProgress),n.update(),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(Gl($l(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Gl($l(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var e=this.player_.duration(),t=this.options_.endTime-this.options_.startTime;if(e!==this.duration_){var n=t/e;this.el_.style.width=100*n+"%";var r=this.options_.startTime/e;this.el_.style.left=100*r+"%",this.duration_=e}var i=this.getCurrentTime();i<this.options_.startTime?this.playProgress.update(0):i>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((i-this.options_.startTime)/t);var o=this.player_.bufferedEnd();o<this.options_.startTime?this.loadProgress.update(0):o>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((o-this.options_.startTime)/t)}}])&&ql(t.prototype,n),r&&ql(t,r),o}(Eu.getComponent("Component"));function Jl(e,t,n,r){e.kind===t&&(n&&e.label!==n||(e.loaded_?r(e):e.one("loadeddata",(function(){r(e)}))))}var Zl=function(e,t,n,r){var i=function(e){Jl(e.track,t,n,r)},o=e.textTracks(),a=function(e,t,n){if(e.length)for(var r=e.length-1;r>=0;r--){var i=e[r];if(i.kind===t){if(n&&i.label!==n)continue;return i}}}(o,t,n);a?Jl(a,t,n,r):(o.addEventListener("addtrack",i),e.on("dispose",(function(){o.removeEventListener("addtrack",i)})))};function ec(e){return(ec="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 tc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nc(e,t,n){return(nc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=sc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function rc(e,t){return(rc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ic(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sc(e);if(t){var i=sc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oc(this,n)}}function oc(e,t){return!t||"object"!==ec(t)&&"function"!=typeof t?ac(e):t}function ac(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sc(e){return(sc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var uc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rc(e,t)}(o,e);var t,n,r,i=ic(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).onDurationChange=n.onDurationChange.bind(ac(n)),n.createChapterItems=n.createChapterItems.bind(ac(n)),Zl(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("dispose",(function(){n.player_.off("durationchange",n.onDurationChange)})),n}return t=o,(n=[{key:"createEl",value:function(){return Eu.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar")})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var e=nc(sc(o.prototype),"update",this).call(this);return this.chapterBarItems&&this.chapterBarItems.update(),e}},{key:"createChapterItems",value:function(e){e&&(this.track_=e);var t=new kl(this.player_);if(this.track_)for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],i=r.startTime,o=r.endTime,a=this.player_.duration();a&&(n===this.track_.cues.length-1&&r.endTime<this.player_.duration()&&(o=this.player_.duration()),o>a&&(o=a));var s=new Ql(this.player_,{startTime:i,endTime:o});if(t.addChild(s),a&&o===a)break}else t.addChild(new Ql(this.player_,{startTime:0,endTime:this.player_.duration()}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=t,this.addChild(this.chapterBarItems)}}])&&tc(t.prototype,n),r&&tc(t,r),o}(Eu.getComponent("SeekBar"));uc.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},Eu.browser.IS_IOS||Eu.browser.IS_ANDROID||uc.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Eu.registerComponent("ChapterSeekBar",uc);n(295);function lc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)}Eu.getComponent("ProgressControl").prototype.options_={children:[]};n(296);function cc(e){return(cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hc(e,t,n){return(hc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=yc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function dc(e,t){return(dc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yc(e);if(t){var i=yc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mc(this,n)}}function mc(e,t){return!t||"object"!==cc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yc(e){return(yc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dc(e,t)}(o,e);var t,n,r,i=pc(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),Zl(n.player_,"chapters",!1,(function(e){n.track_=e})),n}return t=o,(n=[{key:"createEl",value:function(){var e=hc(yc(o.prototype),"createEl",this).call(this);return this.chapter_=Eu.dom.createEl("div"),e.appendChild(this.chapter_),this.time_=Eu.dom.createEl("div"),e.appendChild(this.time_),e}},{key:"updateTime",value:function(e){var t=this.player_.duration();if(Eu.dom.textContent(this.time_,lc(e,t)),this.track_){for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n];if(r.startTime<=e&&r.endTime>=e)return void Eu.dom.textContent(this.chapter_,r.text)}Eu.dom.textContent(this.chapter_,"")}}}])&&fc(t.prototype,n),r&&fc(t,r),o}(Eu.getComponent("TimeTooltip"));Eu.registerComponent("TimeTooltip",gc);n(297);function vc(e){return(vc="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 bc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _c(e,t,n){return(_c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ec(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Tc(e,t){return(Tc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ec(e);if(t){var i=Ec(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sc(this,n)}}function Sc(e,t){return!t||"object"!==vc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ec(e){return(Ec=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tc(e,t)}(o,e);var t,n,r,i=wc(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"setTrack",value:function(e){this.track_=e}},{key:"createEl",value:function(){var e=_c(Ec(o.prototype),"createEl",this).call(this,"div",{className:"cv-thumbnail-display"});return this.img_=Eu.dom.createEl("img"),e.appendChild(this.img_),e}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(e){var t=e.indexOf("#");if(-1===t)return{src:e,w:0,h:0,x:0,y:0};var n=e.substr(0,t),r=e.substr(t+1);if("xywh="!==r.substr(0,5))return{src:e,w:0,h:0,x:0,y:0};var i=this.options_.scaleFactor,o=r.substr(5).split(",");return{src:n,w:parseInt(o[2])*i,h:parseInt(o[3])*i,x:parseInt(o[0])*i,y:parseInt(o[1])*i}}},{key:"update",value:function(e){var t,n,r;if(null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length){for(var i,o=e,a=0;a<this.track_.cues.length;){var s=this.track_.cues[a];if(s.startTime<=o&&s.endTime>=o){i=this.parseImageLink(s.text);break}a++}if(null===(r=i)||void 0===r?void 0:r.src){this.enable();var u=i,l=u.src,c=u.w,f=u.h,h=u.x,d=u.y,p=this.options_.scaleFactor;this.img_.src=l,this.img_.style.left=-h+"px",this.img_.style.top=-d+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(p,")"),this.el_.style.width=c+"px",this.el_.style.height=f+"px"}else this.disable()}}}])&&bc(t.prototype,n),r&&bc(t,r),o}(Eu.getComponent("Component"));kc.prototype.options_={scaleFactor:1},Eu.registerComponent("ThumbnailDisplay",kc);n(298);function Cc(e){return(Cc="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 xc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oc(e,t){return(Oc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rc(e);if(t){var i=Rc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ac(this,n)}}function Ac(e,t){return!t||"object"!==Cc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Rc(e){return(Rc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Lc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Oc(e,t)}(o,e);var t,n,r,i=Pc(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),Zl(n.player_,"metadata","thumbnails",(function(e){n.getChild("ThumbnailDisplay").setTrack(e)})),n}return t=o,(n=[{key:"update",value:function(e,t){var n=this;this.requestAnimationFrame((function(){var r=t*n.player_.duration();n.getChild("ThumbnailDisplay").update(r),n.getChild("TimeTooltip").updateTime(r);var i=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-i.width/2+"px";var o=e.width*t;o<i.width/2?n.el_.style.left=i.width/2+"px":o>e.width-i.width/2?n.el_.style.left=e.width-i.width/2+"px":n.el_.style.left=e.width*t+"px"}))}}])&&xc(t.prototype,n),r&&xc(t,r),o}(Eu.getComponent("MouseTimeDisplay"));Lc.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},Eu.registerComponent("MouseTimeDisplay",Lc);n(299);var Ic=n(38),Dc=n.n(Ic),Nc=(n(149),n(150),n(45)),jc=n.n(Nc),Mc=n(46),Uc=n.n(Mc),Bc=n(78),Fc=n.n(Bc),zc=n(79),Vc=(n(151),null),Wc=null;function Hc(){if(null===Vc){if("undefined"==typeof document)return Vc=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),Vc=n}return Vc}Dc.a&&window.addEventListener("resize",(function(){Wc!==window.devicePixelRatio&&(Wc=window.devicePixelRatio,Vc=null)}));var qc=function(e){return Array.prototype.reduce.call(e,(function(e,t){var n=t.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(e,t){return t.toUpperCase()}));switch(t.value){case"true":e[r]=!0;break;case"false":e[r]=!1;break;case void 0:e[r]=!0;break;default:e[r]=t.value}}return e}),{})};function Gc(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function Yc(e){return e&&e.ownerDocument?e.ownerDocument:document}var Xc=function(){function e(t,n){var r=this;this.onScroll=function(){var e=Gc(r.el);r.scrollXTicking||(e.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(e.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(e){r.mouseX=e.clientX,r.mouseY=e.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(t=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(e,"x"):r.onTrackClick(e,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(e,"y"):r.onTrackClick(e,"y"))))},this.drag=function(t){var n=r.axis[r.draggedAxis].track,i=n.rect[r.axis[r.draggedAxis].sizeAttr],o=r.axis[r.draggedAxis].scrollbar,a=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],s=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var u=(("y"===r.draggedAxis?t.pageY:t.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(i-o.size)*(a-s);"x"===r.draggedAxis&&(u=r.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u-(i+o.size):u,u=r.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-u:u),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=u},this.onEndDrag=function(e){var t=Yc(r.el),n=Gc(r.el);e.preventDefault(),e.stopPropagation(),r.el.classList.remove(r.classNames.dragging),t.removeEventListener("mousemove",r.drag,!0),t.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout((function(){t.removeEventListener("click",r.preventClick,!0),t.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null}))},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,{},n),this.classNames=Object.assign({},e.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,e.instances.has(this.el)||(this.recalculate=jc()(this.recalculate.bind(this),64),this.onMouseMove=jc()(this.onMouseMove.bind(this),64),this.hideScrollbars=Uc()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Uc()(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=Fc()(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=t.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var i=e.getOffset(n),o=e.getOffset(r);n.scrollLeft=999;var a=e.getOffset(r);return{isRtlScrollingInverted:i.left!==o.left&&o.left-a.left!=0,isRtlScrollbarInverted:i.left!==o.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=Yc(e),r=Gc(e);return{top:t.top+(r.pageYOffset||n.documentElement.scrollTop),left:t.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),Dc.a&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(e.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),n=document.createElement("div");t.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),t.appendChild(n),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this,t=Gc(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize);var n=!1,r=t.ResizeObserver||zc.a;this.resizeObserver=new r((function(){n&&e.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new t.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var e=Gc(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var s=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=n?r+"px":"auto",this.placeholderEl.style.height=s+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=u>r,this.axis.y.isOverflowing=s>l,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==a&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var c=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&s>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],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=r/n;return t=Math.max(~~(i*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},t.positionScrollbar=function(t){if(void 0===t&&(t="y"),this.axis[t].isOverflowing){var n=this.contentWrapperEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[t].sizeAttr],10),o=this.axis[t].scrollbar,a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=(a="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-a:a)/(n-i),u=~~((r-o.size)*s);u="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u+(r-o.size):u,o.el.style.transform="x"===t?"translate3d("+u+"px, 0, 0)":"translate3d(0, "+u+"px, 0)"}},t.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,n=this.axis[e].scrollbar.el;this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden"),this.axis[e].isOverflowing?n.style.display="block":n.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.rect=this.axis[e].track.el.getBoundingClientRect(),this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[e].scrollbar.rect)?this.axis[e].scrollbar.el.classList.add(this.classNames.hover):this.axis[e].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[e].track.rect)?(this.showScrollbar(e),this.axis[e].track.el.classList.add(this.classNames.hover)):this.axis[e].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.el.classList.remove(this.classNames.hover),this.axis[e].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(e){void 0===e&&(e="y");var t=this.axis[e].scrollbar.el;this.axis[e].isVisible||(t.classList.add(this.classNames.visible),this.axis[e].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(e,t){void 0===t&&(t="y");var n=Yc(this.el),r=Gc(this.el),i=this.axis[t].scrollbar,o="y"===t?e.pageY:e.pageX;this.axis[t].dragOffset=o-i.rect[this.axis[t].offsetAttr],this.draggedAxis=t,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var r=Gc(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var i=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],o=parseInt(this.elStyles[this.axis[t].sizeAttr],10),a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=("y"===t?this.mouseY-i:this.mouseX-i)<0?-1:1,u=-1===s?a-o:a+o;!function e(){var i,o;-1===s?a>u&&(a-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((i={})[n.axis[t].offsetAttr]=a,i)),r.requestAnimationFrame(e)):a<u&&(a+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((o={})[n.axis[t].offsetAttr]=a,o)),r.requestAnimationFrame(e))}()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Hc()}catch(e){return Hc()}},t.removeListeners=function(){var e=this,t=Gc(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}();Xc.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},Xc.instances=new WeakMap,Xc.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")||Xc.instances.has(e)||new Xc(e,qc(e.attributes))}))},Xc.removeObserver=function(){this.globalObserver.disconnect()},Xc.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(Xc.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))},Xc.handleMutations=function(e){e.forEach((function(e){Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?!Xc.instances.has(e)&&new Xc(e,qc(e.attributes)):Array.prototype.forEach.call(e.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||Xc.instances.has(e)||new Xc(e,qc(e.attributes))})))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&(e.hasAttribute('[data-simplebar="init"]')?Xc.instances.has(e)&&Xc.instances.get(e).unMount():Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar="init"]'),(function(e){Xc.instances.has(e)&&Xc.instances.get(e).unMount()})))}))}))},Xc.getOptions=qc,Dc.a&&Xc.initHtmlApi();var Kc=Xc,$c={initMenuScrollbar:function(e){$c.unMountScrollbar(e);var t=$c.getMenuEl(e);t&&(e.simpleBar_=new Kc(t,{autoHide:!1}),e.one("dispose",(function(){return $c.unMountScrollbar(e)})))},unMountScrollbar:function(e){e.simpleBar_&&e.simpleBar_.unMount()},getMenuEl:function(e){return e.el().querySelector(".vjs-menu-content")}};n(304);function Qc(e){return(Qc="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 Jc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zc(e,t,n){return(Zc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rf(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ef(e,t){return(ef=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rf(e);if(t){var i=rf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nf(this,n)}}function nf(e,t){return!t||"object"!==Qc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rf(e){return(rf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var of=Eu.getComponent("ChaptersTrackMenuItem"),af=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ef(e,t)}(o,e);var t,n,r,i=tf(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).nonIconControl=!1,n.thumbnailDisplay=new kc(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),Zl(n.player_,"metadata","thumbnails",(function(e){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(e),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return t=o,(n=[{key:"update",value:function(){this.player_&&of.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(e,t,n){return this.nonIconControl=!0,Zc(rf(o.prototype),"createEl",this).call(this,"li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},t),n)}},{key:"getInnerHTML",value:function(){var e=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat(lc(this.options_.cue.startTime,e),")</p>")+"</span>"}}])&&Jc(t.prototype,n),r&&Jc(t,r),o}(of);n(305);function sf(e){return(sf="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 uf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lf(e,t,n){return(lf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=df(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function cf(e,t){return(cf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ff(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=df(e);if(t){var i=df(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hf(this,n)}}function hf(e,t){return!t||"object"!==sf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function df(e){return(df=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cf(e,t)}(o,e);var t,n,r,i=ff(o);function o(e,t,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,e,t,n)).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(lf(df(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(lf(df(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new af(this.player_,{track:this.track_,cue:i});e.push(o)}return e}},{key:"setTrack",value:function(e){var t=this;lf(df(o.prototype),"setTrack",this).call(this,e),this.track_&&"chapters"===this.track_.kind&&e.one("loadeddata",(function(){t.update()}))}},{key:"update",value:function(e){lf(df(o.prototype),"update",this).call(this,e),$c.initMenuScrollbar(this)}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var e;return(null===(e=this.track_.activeCues[0])||void 0===e?void 0:e.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var e=this.track_.cues;return!(!e||!e.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&uf(t.prototype,n),r&&uf(t,r),o}(Eu.getComponent("ChaptersButton"));Eu.registerComponent("ChaptersButton",pf);n(306);function mf(e){return(mf="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 yf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vf(e,t,n){return(vf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=wf(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function bf(e,t){return(bf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wf(e);if(t){var i=wf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Tf(this,n)}}function Tf(e,t){return!t||"object"!==mf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wf(e){return(wf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Sf=Eu.getComponent("SubsCapsButton"),Ef=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bf(e,t)}(o,e);var t,n,r,i=_f(o);function o(){var e;return yf(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(vf(wf(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"update",value:function(){vf(wf(o.prototype),"update",this).call(this),$c.initMenuScrollbar(this)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Sf.prototype.handleClick.apply(this)}}])&&gf(t.prototype,n),r&&gf(t,r),o}(Sf);function kf(e){return(kf="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 Cf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xf(e,t){return(xf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Of(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rf(e);if(t){var i=Rf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Pf(this,n)}}function Pf(e,t){return!t||"object"!==kf(t)&&"function"!=typeof t?Af(e):t}function Af(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rf(e){return(Rf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Eu.registerComponent("SubsCapsButton",Ef);var Lf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xf(e,t)}(o,e);var t,n,r,i=Of(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).qualityId=t.qualityId;var r=e.qualityLevels(),a=n.handleQualityChange.bind(Af(n));return r.on("change",a),e.on("dispose",(function(){r.off("change",a)})),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var e=this.player_.qualityLevels(),t=0;t<e.length;t++){var n=e[t];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var e=this.player_.qualityLevels(),t=e[e.selectedIndex],n=t&&t.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&Cf(t.prototype,n),r&&Cf(t,r),o}(Eu.getComponent("MenuItem"));n(307);function If(e){return(If="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Df(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nf(e,t,n){return(Nf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ff(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function jf(e,t){return(jf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ff(e);if(t){var i=Ff(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Uf(this,n)}}function Uf(e,t){return!t||"object"!==If(t)&&"function"!=typeof t?Bf(e):t}function Bf(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ff(e){return(Ff=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zf={240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},Vf=Eu.getComponent("MenuButton"),Wf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jf(e,t)}(o,e);var t,n,r,i=Mf(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0;var r=n.player_.qualityLevels(),a=n.update.bind(Bf(n));return r.on("addqualitylevel",a),r.on("removequalitylevel",a),e.on("dispose",(function(){r.removeEventListener("addqualitylevel",a),r.removeEventListener("removequalitylevel",a)})),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Nf(Ff(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button ".concat(Nf(Ff(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){for(var e=[],t=this.player_.qualityLevels(),n=0;n<t.length;n++){var r=t[n];if(r){var i=zf[r.id];i&&e.push(new Lf(this.player_,{qualityId:r.id,label:i,selectable:!0,multiSelectable:!1}))}}return e}},{key:"update",value:function(){Nf(Ff(o.prototype),"update",this).call(this),$c.initMenuScrollbar(this)}},{key:"getCollabsibleName",value:function(){return"Playback quality"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.qualityLevels(),t=e[e.selectedIndex];return t?zf[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){Vf.prototype.handleClick.apply(this)}}])&&Df(t.prototype,n),r&&Df(t,r),o}(Vf);Eu.registerComponent("QualityButton",Wf);n(308);function Hf(e){return(Hf="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 qf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yf(e,t,n){return(Yf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Qf(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Xf(e,t){return(Xf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Kf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qf(e);if(t){var i=Qf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $f(this,n)}}function $f(e,t){return!t||"object"!==Hf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qf(e){return(Qf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Jf=Eu.getComponent("Menu"),Zf=Eu.getComponent("MenuButton"),eh=Eu.getComponent("PlaybackRateMenuItem"),th=Eu.getComponent("PlaybackRateMenuButton"),nh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xf(e,t)}(o,e);var t,n,r,i=Kf(o);function o(){var e;return qf(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=Zf.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(Yf(Qf(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createMenu",value:function(){var e=new Jf(this.player(),{menuButton:this}),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addItem(new eh(this.player(),{rate:t[n]+"x"}));return e}},{key:"handleClick",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=Zf.prototype.handleClick).apply.apply(e,[this].concat(n))}},{key:"updateLabel",value:function(){var e;this.setupLabelEl();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=th.prototype.updateLabel).apply.apply(e,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var e=this.$("button");e&&(this.labelEl_=Eu.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback rate"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&Gf(t.prototype,n),r&&Gf(t,r),o}(th);Eu.registerComponent("PlaybackRateMenuButton",nh);var rh;n(309),n(310),n(311),n(312);function ih(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oh(e){e.paused()?e.play():e.pause()}function ah(e,t){e.currentTime(e.currentTime()+t)}function sh(e,t){e.volume(e.volume()+t)}var uh=(ih(rh={},"f",(function(e){document[e.fsApi_.fullscreenEnabled]&&(e.isFullscreen()?e.exitFullscreen():e.requestFullscreen())})),ih(rh,"m",(function(e){var t=e.volume(),n=e.lastVolume_();if(0===t){var r=n<.1?.1:n;e.volume(r),e.muted(!1)}else e.muted(!e.muted())})),ih(rh,"k",oh),ih(rh,"space",oh),ih(rh,"left",(function(e){return ah(e,-5)})),ih(rh,"right",(function(e){return ah(e,5)})),ih(rh,"j",(function(e){return ah(e,-10)})),ih(rh,"l",(function(e){return ah(e,10)})),ih(rh,"up",(function(e){return sh(e,.05)})),ih(rh,"down",(function(e){return sh(e,-.05)})),rh);function lh(e){var t=v()(e);uh[t]&&(e.preventDefault(),e.stopPropagation(),uh[t](this,e))}function ch(e){return(ch="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 fh(e,t){return!t||"object"!==ch(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hh(e){var t="function"==typeof Map?new Map:void 0;return(hh=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return dh(e,arguments,yh(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),mh(r,e)})(e)}function dh(e,t,n){return(dh=ph()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&mh(i,n.prototype),i}).apply(null,arguments)}function ph(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function mh(e,t){return(mh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yh(e){return(yh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mh(e,t)}(i,e);var t,n,r=(t=i,n=ph(),function(){var e,r=yh(t);if(n){var i=yh(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return fh(this,e)});function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=r.call(this,e)).url=t,n}return i}(hh(Error));function vh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var bh=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},_h=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,(n=[{key:"get",value:function(e){return bh(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=this,t.next=3,fetch(e,{method:"GET",mode:"cors"});case 3:return t.t1=t.sent,t.next=6,t.t0.parseResponse.call(t.t0,t.t1);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"parseResponse",value:function(e){return bh(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(404!==e.status){t.next=2;break}return t.abrupt("return",null);case 2:if(e.ok){t.next=4;break}throw new gh("Ajax error",e.url);case 4:return t.next=6,e.json();case 6:return n=t.sent,t.abrupt("return",n);case 8:case"end":return t.stop()}}),t)})))}}])&&vh(t.prototype,n),r&&vh(t,r),e}());function Th(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var wh=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Sh=450,Eh=function(){function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=Eu.mergeOptions({},e.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(t),this.buildVideoJs(),this.bindEventListeners(),this.setupSeekBar(),this.player.ready((function(){r.configurePlugins(),r.options.setup&&r.options.setup(r.options,r.player),r.options.startTime&&r.player.currentTime(r.options.startTime),r.fetch().catch((function(e){r.player.error(e.message)}))}))}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){}},{key:"configurePlugins",value:function(){}},{key:"buildVideoJs",value:function(){return this.player=Eu(this.el,this.getPlayerOptions())}},{key:"getPlayerOptions",value:function(){return{controls:this.options.controls,autoplay:this.options.autoplay,fluid:!this.options.embed,fill:!!this.options.embed,inactivityTimeout:500,controlBar:{children:["timeWrapper","progressControl","collapserator"]},userActions:{hotkeys:lh},playbackRates:this.options.playbackRates}}},{key:"fetch",value:function(){return wh(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.options.fetch,void 0===this.options.fetch&&(t=function(e){var t="".concat(i.options.playerApi.origin,"/api/playback?viewKey=").concat(e);return _h.get(t)}),this.options.viewKey){e.next=4;break}throw new Error("Please specify a viewKey or a fetch function");case 4:return e.next=6,t(this.options.viewKey);case 6:if(n=e.sent){e.next=9;break}throw new Error("Error fetching playback object");case 9:n.chapters.list.length>0&&(r=this.player.addTextTrack("chapters"),n.chapters.list.forEach((function(e){r.addCue({startTime:e.timestamp,endTime:e.endTimestamp,text:e.name})})),r.trigger({type:"loadeddata",target:r})),this.player.progressiveFiles({sources:n.files.progressive.map((function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}}))}),n.subtitles.list.length>0&&n.subtitles.list.forEach((function(e){"text/vtt"===e.mimeType&&i.player.addRemoteTextTrack({kind:"subtitles",src:e.url,language:e.language,label:e.label,default:e.isDefault},!0)})),n.posterUrl&&this.player.poster(n.posterUrl);case 13:case"end":return e.stop()}}),e,this)})))}},{key:"createEl",value:function(e){var t;"string"==typeof e?(e=function(e){return 0===e.indexOf("#")?e.slice(1):e}(e),t=Eu.dom.$("#"+e)):t=e;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=Eu.dom.createEl("video",{},{class:n}),t.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(e,t){this.player.on(e,t)}},{key:"one",value:function(e,t){this.player.one(e,t)}},{key:"off",value:function(e,t){this.player.off(e,t)}},{key:"trigger",value:function(e,t){return this.player.trigger(e,t)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(e){this.player.ready(e)}},{key:"play",value:function(){this.player.play()}},{key:"currentTime",value:function(e){return this.player.currentTime(e)}},{key:"bindEventListeners",value:function(){var e=this,t=function(){return e.configureMenuDimensions()};if(this.on("resize",t),this.on("fullscreenchange",t),this.one("play",t),this.on("resizemenus",t),this.player.on("dispose",(function(){e.off("resize",t),e.off("fullscreenchange",t),e.off("resizemenus",t)})),this.options.hotkeyElQuerySelector){var n=Eu.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.on("dispose",(function(){e.player.off(n,"keydown",e.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var e=Eu.getComponent(this.getSeekBarComponent());Eu.registerComponent("seekBar",e),this.player.controlBar.getChild("progressControl").addChild("seekBar")}},{key:"getSeekBarComponent",value:function(){return"ChapterSeekBar"}},{key:"configureMenuDimensions",value:function(){var e=this,t=this.player.currentWidth(),n=this.player.currentHeight()/t*100,r=this.player.el().querySelector(".cv-collapsorator"),i=this.player.el().querySelectorAll(".vjs-menu"),o=r&&r.offsetHeight;o?i&&i.length&&i.forEach((function(r){r.style.paddingTop="calc(".concat(n,"% - ").concat(o,"px)"),r.style.marginBottom="".concat(o,"px"),r.querySelector(".vjs-menu-content")&&(t<=Sh?e.player.addClass("cv-player-small"):e.player.removeClass("cv-player-small"))})):this.one("play",(function(){return e.configureMenuDimensions()}))}}])&&Th(t.prototype,n),r&&Th(t,r),e}();Eh.options_={viewKey:null,controls:!0,playbackRates:[.5,1,1.5,2],playerApi:new URL("http://localhost:52000")};n(313);function kh(e){return(kh="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 Ch(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xh(e,t,n){return(xh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Rh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Oh(e,t){return(Oh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ph(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rh(e);if(t){var i=Rh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ah(this,n)}}function Ah(e,t){return!t||"object"!==kh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Rh(e){return(Rh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Lh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Oh(e,t)}(o,e);var t,n,r,i=Ph(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"vjs-example-button ".concat(xh(Rh(o.prototype),"buildCSSClass",this).call(this))}}])&&Ch(t.prototype,n),r&&Ch(t,r),o}(Eu.getComponent("Button"));Lh.prototype.controlText_="Example Button",Eu.registerComponent("ExampleButton",Lh);var Ih=n(112),Dh=n.n(Ih);function Nh(e){return(Nh="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 jh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Uh(e,t,n){return t&&Mh(e.prototype,t),n&&Mh(e,n),e}function Bh(e,t,n){return(Bh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Hh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Fh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zh(e,t)}function zh(e,t){return(zh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hh(e);if(t){var i=Hh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Wh(this,n)}}function Wh(e,t){return!t||"object"!==Nh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Hh(e){return(Hh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qh=Eu.getComponent("Component"),Gh={tagName:"div"};function Yh(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Gh;if(!e)throw new Error("componentCtor is required");var n=function(n){Fh(i,n);var r=Vh(i);function i(){return jh(this,i),r.apply(this,arguments)}return Uh(i,[{key:"createEl",value:function(){var n=Eu.dom.createEl(t.tagName,t.properties,t.attributes);return Dh.a.render(e(this.player_,this.options_),n),n}},{key:"dispose",value:function(){Dh.a.unmountComponentAtNode(this.el()),Bh(Hh(i.prototype),"dispose",this).call(this)}}]),i}(qh);return n}function Xh(){return i.a.createElement("button",{style:{height:"100%",cursor:"pointer"},onClick:function(){return console.log("Clicked React Button")}},"React Button")}function Kh(e){return(Kh="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 $h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qh(e,t){return(Qh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ed(e);if(t){var i=ed(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zh(this,n)}}function Zh(e,t){return!t||"object"!==Kh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ed(e){return(ed=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Eu.registerComponent("ExampleReactButton",Yh((function(){return i.a.createElement(Xh,null)})));var td=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qh(e,t)}(o,e);var t,n,r,i=Jh(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){this.player.controlBar.getChild("collapserator").addChild("exampleReactButton")}}])&&$h(t.prototype,n),r&&$h(t,r),o}(Eu.getPlugin("plugin"));function nd(e){return(nd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function id(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function od(e,t){return(od=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ad(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ud(e);if(t){var i=ud(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return sd(this,n)}}function sd(e,t){return!t||"object"!==nd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ud(e){return(ud=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Eu.registerPlugin("examplePlugin",td);var ld=Eu.getPlugin("plugin"),cd="play",fd="playing",hd="pause",dd="seeking",pd="seekstart",md="seekend",yd="ended",gd="pausedseek",vd="timeupdate",bd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&od(e,t)}(o,e);var t,n,r,i=ad(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=t,n.initialize(),n}return t=o,(n=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var e,t=this,n=(rd(e={},cd,(function(){return t.onPlay()})),rd(e,hd,(function(){return t.onPause()})),rd(e,vd,(function(){return t.onTimeUpdate()})),rd(e,dd,(function(){return t.onSeeking()})),rd(e,yd,(function(){return t.onEnded()})),e);for(var r in n)n.hasOwnProperty(r)&&this.player.on(r,n[r])}},{key:"startInterval",value:function(){var e=this,t=this.options.interval||5e3;setInterval((function(){return e.flushBuffer()}),t)}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent(md),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(cd)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){e.isPlaying=!1,e.logEvent(hd),delete e.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(cd)),this.isPlaying&&!this.isSeeking&&this.logEvent(fd)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(gd),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(pd))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(yd)}},{key:"logEvent",value:function(e){var t=this.player.currentTime();e===pd&&(t=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:t,type:e})}},{key:"shouldUseCarriedOverTime",value:function(e){return this.lastPlayingTime&&(e===fd||e===cd)}},{key:"shouldClearCarriedOverTime",value:function(e){return e===yd||e===gd}},{key:"flushBuffer",value:function(){for(var e=[],t={};this.eventBuffer.length;){var n=this.eventBuffer.shift();this.shouldClearCarriedOverTime(n.type)?delete this.lastPlayingTime:t.start?n.type===fd&&this.eventBuffer.length>0||(this.shouldUseCarriedOverTime(n.type)&&(this.lastPlayingTime=n.time),t.end=n,e.push(t),t={}):(this.shouldUseCarriedOverTime(n.type)&&(n.time=this.lastPlayingTime,delete this.lastPlayingTime),t.start=n)}this.eventBuffer=[],e.length&&this.options.onFlush(e)}}])&&id(t.prototype,n),r&&id(t,r),o}(ld);function _d(e){return(_d="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 Td(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wd(e,t){return(wd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kd(e);if(t){var i=kd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ed(this,n)}}function Ed(e,t){return!t||"object"!==_d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kd(e){return(kd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Eu.registerPlugin("progressReporterPlugin",bd);var Cd=Eu.getPlugin("plugin"),xd="cv-persisttest",Od=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wd(e,t)}(o,e);var t,n,r,i=Sd(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).initialize(),t}return t=o,(n=[{key:"initialize",value:function(){var e=this;if(this.hasLocalStorage()){this.player.on("volumechange",(function(){e.store("cv-volume",e.player.volume().toString()),e.store("cv-mute",e.player.muted().toString())}));var t=this.get("cv-volume"),n=this.get("cv-mute");t&&this.player.volume(+t),n&&this.player.muted("true"===n)}}},{key:"store",value:function(e,t){window.localStorage.setItem(e,t)}},{key:"get",value:function(e){return window.localStorage.getItem(e)}},{key:"hasLocalStorage",value:function(){try{return window.localStorage.setItem(xd,"persistVolume"),window.localStorage.removeItem(xd),!0}catch(e){return!1}}}])&&Td(t.prototype,n),r&&Td(t,r),o}(Cd);function Pd(e){return(Pd="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 Ad(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rd(e,t){return(Rd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ld(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nd(e);if(t){var i=Nd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Id(this,n)}}function Id(e,t){return!t||"object"!==Pd(t)&&"function"!=typeof t?Dd(e):t}function Dd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nd(e){return(Nd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Eu.registerPlugin("persistVolumePlugin",Od);var jd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rd(e,t)}(o,e);var t,n,r,i=Ld(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).hasScreenOrientation()&&t.player.supportsFullScreen()?(t.onRotate=t.onRotate.bind(Dd(t)),t.onFullscreenChange=t.onFullscreenChange.bind(Dd(t)),t.initialize(),t):Id(t)}return t=o,(n=[{key:"initialize",value:function(){var e=this;window.addEventListener("orientationchange",this.onRotate),this.hasScreenLock()&&this.player.on("fullscreenchange",this.onFullscreenChange),this.player.one("dispose",(function(){window.removeEventListener("orientationchange",e.onRotate),e.hasScreenLock()&&e.player.off("fullscreenchange",e.onFullscreenChange)}))}},{key:"onFullscreenChange",value:function(){!this.getAngle()&&this.player.isFullscreen()?window.screen.orientation.lock("portrait-primary"):window.screen.orientation.unlock()}},{key:"onRotate",value:function(){var e=this.getAngle();90===e||-90===e||270===e?this.player.requestFullscreen():this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"hasScreenOrientation",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"hasScreenLock",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"getAngle",value:function(){var e,t;return"number"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.angle)?window.screen.orientation.angle:0}}])&&Ad(t.prototype,n),r&&Ad(t,r),o}(Eu.getPlugin("plugin"));Eu.registerPlugin("fullscreenOnRotatePlugin",jd);n(317);function Md(e){return(Md="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 Ud(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bd(e,t){return(Bd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wd(e);if(t){var i=Wd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zd(this,n)}}function zd(e,t){return!t||"object"!==Md(t)&&"function"!=typeof t?Vd(e):t}function Vd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wd(e){return(Wd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hd=Eu.getComponent("Button"),qd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bd(e,t)}(o,e);var t,n,r,i=Fd(o);function o(e,t){var n,r,a,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update=(r=n.update.bind(Vd(n)),a=1e3,s=window.performance.now(),function(){var e=window.performance.now();e-s>=a&&(r.apply(void 0,arguments),s=e)}),e.on("timeupdate",n.update),e.on("dispose",(function(){e.off("timeupdate",n.update)})),n}return t=o,(n=[{key:"update",value:function(){var e=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(e)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var e={innerHTML:"<svg viewBox='0 0 434 71'><g><path fill='#FFFFFF' d='M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z'/><path fill='#F8981D' d='M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z'/></g></svg>",className:this.buildCSSClass()},t={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=Eu.dom.createEl("a",e,t);return this.createControlTextEl(n),n}}])&&Ud(t.prototype,n),r&&Ud(t,r),o}(Hd);function Gd(e){return(Gd="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 Yd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xd(e,t){return(Xd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Kd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qd(e);if(t){var i=Qd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $d(this,n)}}function $d(e,t){return!t||"object"!==Gd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qd(e){return(Qd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}qd.prototype.controlText_="Open in ClickView",Eu.registerComponent("OpenExternallyButton",qd);var Jd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xd(e,t)}(o,e);var t,n,r,i=Kd(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){var e=this.player.controlBar.getChild("collapserator");e.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},e.children_.length-2)}}])&&Yd(t.prototype,n),r&&Yd(t,r),o}(Eu.getPlugin("plugin"));function Zd(e){return(Zd="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 ep(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tp(e,t){return(tp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function np(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=op(e);if(t){var i=op(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return rp(this,n)}}function rp(e,t){return!t||"object"!==Zd(t)&&"function"!=typeof t?ip(e):t}function ip(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function op(e){return(op=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Eu.registerPlugin("openExternallyPlugin",Jd);var ap=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tp(e,t)}(o,e);var t,n,r,i=np(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e))._clipStart=t.startTime,n._clipEnd=t.startTime+t.duration,n.playerEndedFn=n.player.ended.bind(e),n.playerDurationFn=n.player.duration.bind(e),n.playerCurrentTimeFn=n.player.currentTime.bind(e),n.playerbufferedFn=n.player.buffered.bind(e),n.player.ended=n.ended.bind(ip(n)),n.player.duration=n.duration.bind(ip(n)),n.player.currentTime=n.currentTime.bind(ip(n)),n.player.buffered=n.buffered.bind(ip(n)),n.initialize(),n.player.trigger("durationchange"),n}return t=o,(n=[{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.player.off("play",this.onPlay),this.player.ended=this.playerEndedFn,this.player.duration=this.playerDurationFn,this.player.currentTime=this.playerCurrentTimeFn,this.player.buffered=this.playerbufferedFn,this.player.trigger("durationchange")}},{key:"initialize",value:function(){var e=this;this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay),this.player.on("dispose",(function(){e.dispose()}))}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var e=this.getCurrentTime(!1);e>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,e<this.clipStart&&this.playerCurrentTimeFn(this.clipStart))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(e){return void 0!==e&&this.playerDurationFn(e),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(e){if(void 0===e)return this.getCurrentTime(!0);var t=e+this.clipStart;this.playerCurrentTimeFn(t)}},{key:"getCurrentTime",value:function(e){var t=this.playerCurrentTimeFn(),n=0;return t>=this.clipStart&&(n=t-this.clipStart),this.player.getCache().currentTime=n,e?n:t}},{key:"buffered",value:function(){for(var e=this.playerbufferedFn(),t=[],n=0;n<e.length;n++)t[n]=[Math.max(0,e.start(n)-this.clipStart),Math.min(Math.max(0,e.end(n)-this.clipStart),this.player.duration())];return Eu.createTimeRanges(t)}},{key:"clipStart",get:function(){var e=this.playerDurationFn();return this._clipStart>e?e:this._clipStart}},{key:"clipEnd",get:function(){var e=this.playerDurationFn();return this._clipEnd>e?e:this._clipEnd}}])&&ep(t.prototype,n),r&&ep(t,r),o}(Eu.getPlugin("plugin"));Eu.registerPlugin("clipPlugin",ap);n(318);function sp(e){return(sp="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 up(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lp(e,t,n){return(lp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=dp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function cp(e,t){return(cp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dp(e);if(t){var i=dp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hp(this,n)}}function hp(e,t){return!t||"object"!==sp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dp(e){return(dp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cp(e,t)}(o,e);var t,n,r,i=fp(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(lp(dp(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return lp(dp(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"setUi",value:function(e,t){var n=this,r=e>0,i=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(i,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*e,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){n.removeText()}),t)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&up(t.prototype,n),r&&up(t,r),o}(Eu.getComponent("component"));function mp(e){return(mp="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 yp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gp(e,t){return(gp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_p(e);if(t){var i=_p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bp(this,n)}}function bp(e,t){return!t||"object"!==mp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _p(e){return(_p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Eu.registerComponent("TouchControls",pp);var Tp=Eu.getPlugin("plugin"),wp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gp(e,t)}(o,e);var t,n,r,i=vp(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).doubleTouchCount=0,t.seekStartTime=0,t.directionModifier=0,t.bindFunctions(),t.initialize(),t}return t=o,(n=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this),this.unBindEventListeners=this.unBindEventListeners.bind(this)}},{key:"initialize",value:function(){this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.player.on("dispose",this.unBindEventListeners),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),this.on(this.tech,"touchstart",this.onTouchStart),this.on(this.tech,"touchend",this.onTouchEnd)}},{key:"unBindEventListeners",value:function(){this.tech&&(this.off(this.tech,"touchstart",this.onTouchStart),this.off(this.tech,"touchend",this.onTouchEnd))}},{key:"onTouchStart",value:function(e){this.touchStartTime=e.timeStamp}},{key:"onTouchEnd",value:function(e){var t=this;if(e.changedTouches.length){if(e.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(e),void(this.lastTouchTime=e.timeStamp);this.resetProperties(),this.lastTouchTime=e.timeStamp,e.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){t.doubleTouchCount||(t.player.paused()?t.player.play():t.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(e){var t=this.player.el().getBoundingClientRect(),n=t.left+t.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),e.changedTouches[0].pageX<n?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}])&&yp(t.prototype,n),r&&yp(t,r),o}(Tp);Eu.registerPlugin("touchControls",wp);var Sp="URLSearchParams"in self,Ep="Symbol"in self&&"iterator"in Symbol,kp="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),Cp="FormData"in self,xp="ArrayBuffer"in self;if(xp)var Op=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Pp=ArrayBuffer.isView||function(e){return e&&Op.indexOf(Object.prototype.toString.call(e))>-1};function Ap(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function Rp(e){return"string"!=typeof e&&(e=String(e)),e}function Lp(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Ep&&(t[Symbol.iterator]=function(){return t}),t}function Ip(e){this.map={},e instanceof Ip?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function Dp(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Np(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function jp(e){var t=new FileReader,n=Np(t);return t.readAsArrayBuffer(e),n}function Mp(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Up(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:kp&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Cp&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Sp&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():xp&&kp&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Mp(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):xp&&(ArrayBuffer.prototype.isPrototypeOf(e)||Pp(e))?this._bodyArrayBuffer=Mp(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Sp&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},kp&&(this.blob=function(){var e=Dp(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?Dp(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(jp)}),this.text=function(){var e,t,n,r=Dp(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=Np(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Cp&&(this.formData=function(){return this.text().then(zp)}),this.json=function(){return this.text().then(JSON.parse)},this}Ip.prototype.append=function(e,t){e=Ap(e),t=Rp(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Ip.prototype.delete=function(e){delete this.map[Ap(e)]},Ip.prototype.get=function(e){return e=Ap(e),this.has(e)?this.map[e]:null},Ip.prototype.has=function(e){return this.map.hasOwnProperty(Ap(e))},Ip.prototype.set=function(e,t){this.map[Ap(e)]=Rp(t)},Ip.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Ip.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Lp(e)},Ip.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Lp(e)},Ip.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Lp(e)},Ep&&(Ip.prototype[Symbol.iterator]=Ip.prototype.entries);var Bp=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Fp(e,t){var n,r,i=(t=t||{}).body;if(e instanceof Fp){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Ip(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Ip(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),Bp.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function zp(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function Vp(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"",this.headers=new Ip(t.headers),this.url=t.url||"",this._initBody(e)}Fp.prototype.clone=function(){return new Fp(this,{body:this._bodyInit})},Up.call(Fp.prototype),Up.call(Vp.prototype),Vp.prototype.clone=function(){return new Vp(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Ip(this.headers),url:this.url})},Vp.error=function(){var e=new Vp(null,{status:0,statusText:""});return e.type="error",e};var Wp=[301,302,303,307,308];Vp.redirect=function(e,t){if(-1===Wp.indexOf(t))throw new RangeError("Invalid status code");return new Vp(null,{status:t,headers:{location:e}})};var Hp=self.DOMException;try{new Hp}catch(e){(Hp=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),Hp.prototype.constructor=Hp}function qp(e,t){return new Promise((function(n,r){var i=new Fp(e,t);if(i.signal&&i.signal.aborted)return r(new Hp("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new Ip,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){n(new Vp(i,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new Hp("Aborted","AbortError"))}),0)},o.open(i.method,function(e){try{return""===e&&self.location.href?self.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(kp?o.responseType="blob":xp&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),i.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}qp.polyfill=!0,self.fetch||(self.fetch=qp,self.Headers=Ip,self.Request=Fp,self.Response=Vp);var Gp=n(159),Yp=n.n(Gp),Xp=n(160);function Kp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Qp={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i};function Jp(e,t,n){var r=Kp(t.exec(n)||[],1)[0];return r||(r="Unknown"),{name:e,version:r}}function Zp(e,t,n){if(!t)return{name:e,version:"Unknown"};var r=t.exec(n);return{name:e,version:r&&r.length?r[0].trim():"Unknown"}}var em=function(){var e=window.navigator.userAgent;return Qp.android.test(e)?Zp("Android",Qp.androidVersion,e):Qp.iphone.test(e)||Qp.ipad.test(e)?Zp("iOS",Qp.iosVersion,e):Qp.linux.test(e)?Zp("Linux",null,e):Qp.unix.test(e)?Zp("Unix",null,e):Qp.mac.test(e)?Zp("Macintosh",Qp.osxVersion,e):Qp.windows.test(e)?function(e,t){var n={name:e,version:null};return Qp.win2000.test(t)&&(n.version="2000"),Qp.winXP.test(t)&&(n.version="XP"),Qp.winVista.test(t)&&(n.version="Vista"),Qp.win7.test(t)&&(n.version="7"),Qp.win8.test(t)&&(n.version="8"),Qp.win81.test(t)&&(n.version="8.1"),Qp.win10.test(t)&&(n.version="10"),n.version||(n.version="Unknown"),n}("Windows",e):Qp.blackberry.test(e)?Zp("BlackBerry",Qp.blackberryVersion,e):Qp.windowsPhone.test(e)?Zp("Windows Phone",Qp.windowsPhoneVersion,e):{name:"Unknown",version:"Unknown"}},tm=function(){var e=window.navigator.userAgent;return Qp.chrome.test(e)?Jp("Chrome",Qp.generalVersion,e):Qp.firefox.test(e)?Jp("Firefox",Qp.generalVersion,e):Qp.safari.test(e)?Jp("Safari",Qp.generalVersion,e):Qp.ie.test(e)?Jp("Internet Explorer",Qp.ieVersion,e):Qp.edge.test(e)?Jp("Edge",Qp.edgeVersion,e):Qp.opera.test(e)?Jp("Opera",Qp.operaVersion,e):{name:"Unknown",version:"Unknown"}};function nm(e){return(nm="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 rm,im,om=function(e){var t=nm(e);return"function"===t||"object"===t&&!!e},am=function(e){return"function"==typeof e},sm=function(e,t){if(e){var n=e;return e.endsWith("/")||(n+="/"),t?n+=t.startsWith("/")?t.slice(1):t:n}};!function(e){e.Staff="staff",e.Learner="learner",e.Unknown="unknown"}(rm||(rm={})),function(e){e.CvApSoutheast1="cv-ap-southeast-1",e.CvApSoutheast2="cv-ap-southeast-2",e.CvEuWest1="cv-eu-west-1"}(im||(im={}));var um,lm,cm={CvApSoutheast1:{displayName:"ClickView Asia Pacific (AU)",systemName:im.CvApSoutheast1},CvApSoutheast2:{displayName:"ClickView Asia Pacific (NZ)",systemName:im.CvApSoutheast2},CvEuWest1:{displayName:"ClickView EU West (UK)",systemName:im.CvEuWest1}};function fm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.AU="au",e.NZ="nz",e.UK="uk"}(um||(um={}));var hm=(fm(lm={},um.AU,im.CvApSoutheast1),fm(lm,um.NZ,im.CvApSoutheast2),fm(lm,um.UK,im.CvEuWest1),lm);function dm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var pm,mm,ym,gm,vm,bm,_m,Tm,wm,Sm,Em,km,Cm,xm,Om,Pm,Am,Rm,Lm,Im,Dm,Nm=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},jm=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){this.validateOptions()}},{key:"log",value:function(e){return Nm(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Array.isArray(e)){t.next=2;break}return t.abrupt("return",this.logBulk(e));case 2:if(this.shouldLog(e)){t.next=4;break}return t.abrupt("return");case 4:return this.validateEvent(e),t.t0=this,t.next=8,this.formatData(e);case 8:return t.t1=t.sent,t.next=11,t.t0.postData.call(t.t0,t.t1);case 11:case"end":return t.stop()}}),t,this)})))}},{key:"logBulk",value:function(e){return Nm(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.filter((function(e){return i.shouldLog(e)}))).length){t.next=3;break}return t.abrupt("return");case 3:return n.forEach((function(e){return i.validateEvent(e)})),t.next=6,Promise.all(n.map((function(e){return i.formatData(e)})));case 6:return r=t.sent,t.next=9,this.postData(r);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"validateOptions",value:function(){if(!am(this.options.getUser))throw new Error("getUser option is required.")}},{key:"shouldLog",value:function(e){return!am(this.options.shouldLog)||this.options.shouldLog(e)}},{key:"postData",value:function(e){return Nm(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegionalUrl(this.options.collectionApiUrls);case 2:return n=t.sent,r=JSON.stringify(e),i=Object.assign({"Content-Type":"application/json"},this.getSignatureHeader(r)),o=sm(n,"/v1/ingest"),Array.isArray(e)&&(o=sm(o,"/bulk")),t.next=9,fetch(o,{method:"POST",mode:"cors",headers:i,body:r});case 9:case"end":return t.stop()}}),t,this)})))}},{key:"getSignatureHeader",value:function(e){var t=new Yp.a("SHA-1","TEXT",{hmacKey:{value:"zXJL9nOHxzDlMUDjiP41",format:"TEXT",encoding:"UTF8"}});return t.update(e),{"cv-analytics-signature":"".concat(this.options.collectionApiClientId,".").concat(t.getHash("B64"))}}},{key:"getRegionalUrl",value:function(e){return Nm(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegion();case 2:n=t.sent,t.t0=n.systemName,t.next=t.t0===im.CvEuWest1?6:t.t0===im.CvApSoutheast2?7:(t.t0,im.CvApSoutheast1,8);break;case 6:return t.abrupt("return",e.cvEuWest1);case 7:return t.abrupt("return",e.cvApSoutheast2);case 8:return t.abrupt("return",e.cvApSoutheast1);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"validateEvent",value:function(e){if("string"!=typeof e.type)throw new Error("Event type is required.");if(!om(e.actionContext))throw new Error("Event actionContext is required.");if(!e.actionContext.entity)throw new Error("Event actionContext entity is required.")}},{key:"formatData",value:function(e){return Nm(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=e.type,t.next=3,this.getEventData(e);case 3:return t.t1=t.sent,t.t2=this.getEventMetadata(e),t.abrupt("return",{type:t.t0,data:t.t1,metadata:t.t2});case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getEventData",value:function(e){return Nm(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i,o,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.actionContext,t.next=3,this.getUserData();case 3:return r=t.sent,i={user:r,action:n,platform:this.getPlatformMetadata(),product:{name:this.options.productName,version:this.options.productVersion}},o=this.extractData(e),a=Object.keys(i).map((function(e){return e.toLowerCase()})),s=Object.keys(o).map((function(e){return e.toLowerCase()})),a.forEach((function(e){if(s.includes(e))throw Error("".concat(e," is a reserved key."))})),t.abrupt("return",Object.assign(Object.assign({},i),o));case 10:case"end":return t.stop()}}),t,this)})))}},{key:"extractData",value:function(e){return am(this.options.formatData)?this.options.formatData(e):(t={},n=e.actionContext.entity,r=e.data,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t);var t,n,r}},{key:"getUserData",value:function(){var e,t,n;return Nm(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.options.getUser();case 2:if(i=r.sent,null===(e=i)||void 0===e?void 0:e.id){r.next=5;break}return r.abrupt("return");case 5:return r.t0=i.id,r.t1=(null===(t=i.role)||void 0===t?void 0:t.toLowerCase())||"unknown",r.t2=(null===(n=i.userGroup)||void 0===n?void 0:n.toLowerCase())||rm.Unknown,r.t3=this.normalizeYearGroup(i.yearGroup),r.t4=i.customerId,r.t5=i.customerName,r.t6=i.customerGuid,r.t7=i.crmId,r.t8=i.countryCode,r.next=16,this.getRegion();case 16:return r.t9=r.sent,r.t10=!!i.isOpenCustomer,r.t11={id:r.t4,name:r.t5,customerGuid:r.t6,crmId:r.t7,country:r.t8,region:r.t9,openCustomer:r.t10},r.abrupt("return",{id:r.t0,role:r.t1,userGroup:r.t2,yearGroup:r.t3,customer:r.t11});case 20:case"end":return r.stop()}}),r,this)})))}},{key:"getRegion",value:function(){var e,t;return Nm(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r,i,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.options.getUser();case 2:return r=n.sent,i=null===(t=null===(e=r)||void 0===e?void 0:e.countryCode)||void 0===t?void 0:t.toLowerCase(),o=i?hm[i]:this.options.regionName,n.abrupt("return",this.getRegionByName(o));case 6:case"end":return n.stop()}}),n,this)})))}},{key:"getPlatformMetadata",value:function(){return{browser:tm(),os:em(),request:{url:window.location.href,referrer:document.referrer},screenResolution:"".concat(window.screen.width,"x").concat(window.screen.height)}}},{key:"getEventMetadata",value:function(e){return{client:{name:"".concat(this.name,".ts"),version:Xp.a,region:this.getRegionByName(this.options.regionName)},timestamp:(new Date).toISOString(),eventVersion:e.eventVersion}}},{key:"getRegionByName",value:function(e){var t;return Object.values(cm).forEach((function(n){n.systemName===e&&(t=n)})),t}},{key:"normalizeYearGroup",value:function(e){return e?e.toLowerCase().split(" ").join("_"):"unknown"}},{key:"name",get:function(){return"CollectionApiClient"}}])&&dm(t.prototype,n),r&&dm(t,r),e}();!function(e){e.Stream="cv_product_stream",e.StreamRaw="cv_product_stream_raw",e.WebPlayerStream="cv_product_webplayer_stream",e.StreamProgress="cv_product_stream_progress",e.Login="cv_product_login",e.LoginSsoRedirect="cv_product_login_sso_redirect",e.LoginFailed="cv_product_login_failed",e.Search="cv_product_search",e.InstantSearch="cv_product_search",e.SearchEmptyResult="cv_product_search_empty_result",e.Filter="cv_product_search_filter",e.SearchLanding="cv_product_search_landing",e.Share="cv_product_share",e.WorkspaceAdd="cv_product_tv_add",e.Rename="cv_product_rename",e.Move="cv_product_move",e.Sort="cv_product_sort",e.Create="cv_product_create",e.Delete="cv_product_delete",e.Associate="cv_product_associate",e.Dissociate="cv_product_dissociate",e.Edit="cv_product_edit",e.Approve="cv_product_approve",e.Reject="cv_product_reject",e.Disable="cv_product_disable",e.Upload="cv_product_upload",e.Download="cv_product_download",e.Navigate="cv_product_navigate",e.Click="cv_product_click",e.Suggest="cv_product_suggest",e.EditAssoc="cv_product_edit_assoc",e.Play="cv_product_play",e.Favourite="cv_product_favourite",e.Follow="cv_product_follow",e.Prefer="cv_product_prefer",e.Print="cv_product_print",e.Copy="cv_product_copy",e.Activate="cv_product_activate",e.SetAccess="cv_product_set_access",e.AddToLocalCache="cv_product_add_to_lc",e.ResolveWarning="cv_product_resolve_warning",e.DismissWarning="cv_product_dismiss_warning"}(pm||(pm={})),function(e){e.Folder="folder",e.Video="video",e.Rating="rating",e.Series="series",e.Library="library",e.Resource="resource",e.Tag="tag",e.Subtitle="subtitle",e.Chapter="chapter",e.Restriction="restriction",e.Interactive="interactive",e.PDF="pdf",e.CustomerSetting="customer_setting",e.UserSetting="user_setting",e.StaffRequest="staff_request",e.Logo="logo",e.Pagination="pagination",e.Thumbnail="thumbnail",e.Banner="banner",e.Link="link",e.Playlist="playlist",e.Person="person",e.Company="company",e.Classroom="classroom",e.ClassroomGroup="classroom_group",e.Classification="classification",e.ShareLink="share_link",e.Upload="upload",e.SearchResults="search_results",e.Audience="audience",e.User="user",e.Clip="clip",e.UserChannel="user_channel",e.Widget="widget",e.Url="url"}(mm||(mm={})),function(e){e.TopNav="top_nav",e.LeftNav="left_nav",e.Popup="popup",e.Banner="banner",e.VideoList="video_list",e.VideoListItem="video_list_item",e.VideoListHeader="video_header",e.VideoThumbnail="video_thumbnail",e.VideoItemPreview="video_item_preview",e.VideoDetails="video_details",e.VideoDetailsHeader="video_details_header",e.EditVideoDetails="edit_video_details",e.EditVideoChapters="edit_video_chapters",e.EditVideoResources="edit_video_resources",e.VideoUpload="video_upload",e.VideoRequest="video_request",e.Pagination="pagination",e.SearchBar="search_bar",e.InstantSearch="instant_search",e.SearchFilters="search_filters",e.LibraryHeader="library_header",e.LibraryTiles="library_tiles",e.StaffRequestDetails="staff_request_details",e.SubFolderList="sub_folder_list",e.AwaitingReviewVideoListHeader="awaiting_review_video_list_header",e.AwaitingReviewVideoItem="awaiting_review_video_item",e.PastReleasesHeader="past_releases_header",e.MigrationWarnings="migration_warnings",e.PlaylistListHeader="playlist_list_header",e.PlaylistListItem="playlist_list_item",e.StaffManager="staff_manager",e.StaffManagerListItem="staff_manager_list_item",e.StudentManager="student_manager",e.StudentManagerListItem="student_manager_list_item",e.ClassroomsList="classrooms_list",e.ClassroomsListItem="classrooms_list_item",e.ClassroomOverview="classroom_overview",e.ClassroomOverviewStudentListItem="classroom_overview_student_list_item",e.ManageClassroomStudents="manage_classroom_students",e.ManageClassroomStudentListItem="manage_classroom_student_list_item",e.ManageClassroomGroups="manage_classroom_groups",e.ManageClassroomGroupListItem="manage_classroom_group_list_item",e.PlayPage="play_page",e.Player="player",e.FloatingPlayer="floating_player",e.InteractivePlayer="interactive_player",e.EmbeddedPlayer="embedded_player",e.ContentUpdatesClassificationBanner="content_updates_classification_banner",e.PreferencesSettings="preferences_settings",e.MyUploads="my_uploads",e.SlidingList="sliding_list",e.HeroBannerItem="hero_banner_item",e.SlidingListItem="sliding_list_item",e.ClassificationListItem="classification_list_item",e.ClassificationComingSoon="classification_coming_soon",e.Dashboard="dashboard"}(ym||(ym={})),function(e){e.Start="start",e.Complete="complete",e.Save="save",e.Discard="discard"}(gm||(gm={})),function(e){e.PageLoad="page_load"}(vm||(vm={})),function(e){e.Single="single",e.Bulk="bulk",e.All="all"}(bm||(bm={})),function(e){e.ProductionYear="production_year",e.Alphabetical="alphabetical"}(_m||(_m={})),function(e){e.Content="content",e.Quality="quality",e.Duration="duration",e.Reset="reset"}(Tm||(Tm={})),function(e){e.Submit="submit",e.ShowAll="show_all",e.Recent="recent",e.SearchIcon="search_icon"}(wm||(wm={})),function(e){e.Start="start",e.Finish="finish",e.Terminate="terminate",e.Play="play",e.Pause="pause",e.Playback="playback",e.NextChapter="next_chapter",e.PreviousChapter="previous_chapter",e.FullScreenEnter="full_screen_enter",e.FullScreenExit="full_screen_exit"}(Sm||(Sm={})),function(e){e.TogglePreview="toggle_preview",e.NavigateHome="navigate_home",e.OpenInStaffView="open_in_staff_view",e.Title="title",e.ToggleHideValidListings="toggle_hide_valid_listings",e.LaunchImmersiveReader="launch_immersive_reader",e.CopyEmbedHtml="copy_embed_html",e.Close="close",e.Open="open",e.Button="button",e.Link="link",e.Tile="tile",e.Thumbnail="thumbnail",e.Cover="cover",e.TallPoster="tall_poster",e.Slide="slide"}(Em||(Em={})),function(e){e.FeatureUserChannelVideo="feature_user_channel_video",e.RemoveFromUserChannelPlaylist="remove_from_user_channel_playlist",e.ShareClip="share_clip",e.ViewOriginalVideo="view_original_video",e.ShareInteractive="share_interactive",e.DeleteInteractiveVideo="delete_interactive_video",e.CopyInteractiveVideo="copy_interactive_video",e.EditInteractiveVideo="edit_interactive_video",e.PrintAsWorksheet="print_as_worksheet",e.PreviewInteractiveVideo="preview_interactive_video",e.ViewResults="view_results",e.MoveToAnotherFolder="move_to_another_folder",e.CreateInteractiveVideo="create_interactive_video",e.ShareVideo="share_video",e.EditVideo="edit_video",e.DownloadVideo="download_video",e.AddToExchange="add_to_exchange",e.AddToUserChannel="add_to_user_channel",e.CreateClip="create_clip",e.FlagVideo="flag_video",e.AddToLibrary="add_to_library",e.AddToWorkspace="add_to_workspace",e.AddToPlaylist="add_to_playlist",e.RemoveFromPlaylist="remove_from_playlist",e.AddCurriculumLink="add_curriculum_link",e.ViewCurriculumLinks="view_curriculum_links",e.OpenInCurator="open_in_curator",e.ManageVideoAccess="manage_video_access",e.Approve="approve",e.AddToLocalCache="add_to_local_cache",e.OpenInLibraryEditor="open_in_library_editor",e.PlayClip="play_clip",e.EditClip="edit_clip",e.DeleteClip="delete_clip"}(km||(km={})),function(e){e.LibraryReview="library_review"}(Cm||(Cm={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(xm||(xm={})),function(e){e.Edit="edit"}(Om||(Om={})),function(e){e.Image="image",e.User="user",e.Playlist="playlist",e.Link="link"}(Pm||(Pm={})),function(e){e.On="on",e.Off="off"}(Am||(Am={})),function(e){e.EntityRemoved="cv_entity_removed",e.ValueUpdated="cv_value_updated"}(Rm||(Rm={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(Lm||(Lm={})),function(e){e.Video="videos",e.Folder="categories",e.Series="series",e.Tags="tags"}(Im||(Im={})),function(e){e[e.V1=1]="V1"}(Dm||(Dm={}));var Mm=function(){return!0},Um=function(){return!1};var Bm=function(e){return e};function Fm(e){if(e&&e.code)return e.code}function zm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.id){var n={id:e.id};return e.name&&!t.ignoreTitle&&(n.title=e.name),n}}function Vm(e){if(e&&e.length){var t=e[0];return{id:t.id,title:t.name}}}var Wm,Hm,qm,Gm=function(e){var t=e.model,n={id:t.id.toString(),year:t.productionYear,title:t.name,trackingCode:t.trackingCode},r=Fm(t.rating),i=zm(t.series),o=Vm(t.categories),a=zm(t.owner,{ignoreTitle:!0}),s=zm(t.playlist);return r&&(n.rating=r),a&&(n.ownerId=a.id),i&&(n.seriesId=i.id,n.series=i.title),o&&(n.category=o.title),s&&(n.playlist=s),n},Ym={getUploadData:function(e,t){var n=t.actionContext.entity;if(n===mm.Video)return Ym.formatVideoUpload(e,t);if(n===mm.Resource||n===mm.Subtitle)return Ym.formatResourceUpload(e);if(n===mm.Banner||n===mm.Thumbnail)return e;throw new Error("Upload data event not correctly formatted.")},formatVideoUpload:function(e,t){var n=t.actionContext.workflowPhase;return n===gm.Start?Ym.getStartVideoUploadData(e):n===gm.Discard?Ym.getDiscardVideoUploadData(e):n===gm.Complete?Ym.getCompleteUploadData(e):void 0},getStartVideoUploadData:function(e){return e&&e.length?(e instanceof FileList&&(e=Array.from(e)),e.map((function(t){return{fileName:t.name,size:t.size,type:t.type,count:e.length}}))):[]},getDiscardVideoUploadData:function(e){var t=function(t){var n=t.file,r=n.type,i=n.name,o=n.status,a=n.cvUpload,s={fileName:i,count:Array.isArray(e)?e.length:1,type:r,status:o};return t.progress&&(s.progress=t.progress.toFixed(2)),a&&(s.uploadId=a.uploadId),s};return Array.isArray(e)?e.map((function(e){return t(e)})):[t(e)]},getCompleteUploadData:function(e){return e&&e.length?e.map((function(t){return{fileName:t.fileName,libraryId:t.libraryId,folderId:t.folderId,count:e.length}})):[]},formatResourceUpload:function(e){var t={id:e.id,name:e.name};return om(e.metadata)&&(t.type=e.metadata.type),t}};function Xm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Km=(Xm(Wm={},pm.Navigate,Um),Xm(Wm,pm.Click,Mm),Xm(Wm,pm.Search,Mm),Xm(Wm,pm.InstantSearch,Mm),Xm(Wm,pm.Play,Mm),Xm(Wm,pm.Stream,Mm),Xm(Wm,pm.StreamRaw,Um),Xm(Wm,pm.StreamProgress,Mm),Xm(Wm,pm.Rename,Mm),Xm(Wm,pm.Move,Mm),Xm(Wm,pm.Create,Mm),Xm(Wm,pm.Delete,Mm),Xm(Wm,pm.Associate,Mm),Xm(Wm,pm.Dissociate,Mm),Xm(Wm,pm.Filter,Mm),Xm(Wm,pm.Sort,Mm),Xm(Wm,pm.Approve,Mm),Xm(Wm,pm.Reject,Mm),Xm(Wm,pm.Disable,Mm),Xm(Wm,pm.Upload,Mm),Xm(Wm,pm.Download,Um),Xm(Wm,pm.SetAccess,Mm),Xm(Wm,pm.AddToLocalCache,Um),Xm(Wm,pm.Share,Mm),Xm(Wm,pm.Edit,Mm),Xm(Wm,pm.Suggest,Mm),Xm(Wm,pm.ResolveWarning,Mm),Xm(Wm,pm.DismissWarning,Mm),Xm(Wm,pm.EditAssoc,Mm),Xm(Wm,pm.Follow,Mm),Wm),$m=(Xm(Hm={},pm.Search,Bm),Xm(Hm,pm.InstantSearch,Bm),Xm(Hm,pm.Play,Bm),Xm(Hm,pm.Stream,Gm),Xm(Hm,pm.StreamRaw,Bm),Xm(Hm,pm.StreamProgress,Bm),Xm(Hm,pm.Click,Bm),Xm(Hm,pm.Filter,Bm),Xm(Hm,pm.Sort,Bm),Xm(Hm,pm.SetAccess,Bm),Xm(Hm,pm.Approve,Bm),Xm(Hm,pm.Reject,Bm),Xm(Hm,pm.Create,Bm),Xm(Hm,pm.Delete,Bm),Xm(Hm,pm.Rename,Bm),Xm(Hm,pm.Move,Bm),Xm(Hm,pm.Edit,Bm),Xm(Hm,pm.Share,Bm),Xm(Hm,pm.Disable,Bm),Xm(Hm,pm.Suggest,Bm),Xm(Hm,pm.Upload,Ym.getUploadData),Xm(Hm,pm.ResolveWarning,Bm),Xm(Hm,pm.DismissWarning,Bm),Xm(Hm,pm.Follow,Bm),Hm),Qm=(Xm(qm={},pm.Search,(function(){return"search"})),Xm(qm,pm.InstantSearch,(function(){return"search"})),Xm(qm,pm.Filter,(function(){return"filter"})),Xm(qm,pm.StreamRaw,(function(e){return e.actionContext.entity===mm.Interactive?mm.Video:e.actionContext.entity})),qm),Jm={user:"target_user"},Zm=Xm({},pm.StreamProgress,!0),ey={shouldLog:function(e){return!!Km[e.type](e)},formatData:function(e){var t=$m[e.type],n=am(t)?t(e.data,e):e.data;if(Zm[e.type])return n;var r=e.actionContext.entity;return am(Qm[e.type])&&(r=Qm[e.type](e)),Jm[r]&&(r=Jm[r]),Xm({},r,n)}};function ty(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ny={version:"1.0.0",region:"cv-ap-southeast-1",urls:{collectionApi:{cvApSoutheast1:"https://staging-collection.clickview.com.au/",cvApSoutheast2:"https://staging-collection.clickview.com.au/",cvEuWest1:"https://staging-collection.clickview.co.uk/"}},collectionApiClientId:"cv_webplayer"},ry=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initialize()}var t,n,r;return t=e,r=[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}],(n=[{key:"logStream",value:function(){this.collectionApiClient.log({type:pm.Stream,actionContext:this.getActionContext(),data:{},eventVersion:Dm.V1})}},{key:"logVideoProgress",value:function(e){var t=this;this.collectionApiClient.log(e.map((function(e){return{type:pm.StreamProgress,actionContext:t.getActionContext(),data:{progress:e,video:{}},eventVersion:Dm.V1}})))}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){this.collectionApiClient=new jm({productName:"webplayer.web",productVersion:ny.version,regionName:ny.region,collectionApiUrls:ny.urls.collectionApi,collectionApiClientId:ny.collectionApiClientId,getUser:this.getCurrentUser,shouldLog:ey.shouldLog,formatData:ey.formatData})}},{key:"getCurrentUser",value:function(){return{}}},{key:"getActionContext",value:function(){return{entity:mm.Video,location:ym.Player,productArea:null,descriptor:null,workflowPhase:null}}}])&&ty(t.prototype,n),r&&ty(t,r),e}().Instance;function iy(e){return(iy="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 oy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ay(e,t){return(ay=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ly(e);if(t){var i=ly(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return uy(this,n)}}function uy(e,t){return!t||"object"!==iy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ly(e){return(ly=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cy,fy,hy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ay(e,t)}(o,e);var t,n,r,i=sy(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"configurePlugins",value:function(){try{var e=this.player;e.progressReporterPlugin({onFlush:function(e){return ry.logVideoProgress(e)}}),e.persistVolumePlugin(),e.fullscreenOnRotatePlugin(),e.touchControls(),this.options.getExternalLink&&e.openExternallyPlugin({getExternalLink:this.options.getExternalLink})}catch(e){console.log("failed to register plugins",e)}}}])&&oy(t.prototype,n),r&&oy(t,r),o}(Eh),dy=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function py(e){var t=e.className,n=void 0===t?"":t,r=e.playerApi,o=e.innerRef,a=dy(e,["className","playerApi","innerRef"]),s=i.a.useRef(),u=i.a.useRef(),l=o||s;return i.a.useEffect((function(){var e;null===(e=u.current)||void 0===e||e.dispose(),l&&(u.current=new hy(l.current,Object.assign(Object.assign({},a),{playerApi:r&&new URL(r)})))}),Object.keys(e).map((function(t){return e[t]}))),i.a.createElement("div",{ref:l,className:n})}!function(e){e[e.MultipleChoice=1]="MultipleChoice",e[e.ShortAnswer=2]="ShortAnswer",e[e.TrueOrFalse=3]="TrueOrFalse",e[e.Annotation=4]="Annotation",e[e.Image=5]="Image",e[e.MissingWord=6]="MissingWord"}(cy||(cy={})),function(e){e[e.View=0]="View",e[e.Create=1]="Create"}(fy||(fy={}));var my=n(59),yy=n.n(my),gy=null,vy=null;function by(){if(null===gy){if("undefined"==typeof document)return gy=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),gy=n}return gy}function _y(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function Ty(e){return e&&e.ownerDocument?e.ownerDocument:document}Dc.a&&window.addEventListener("resize",(function(){vy!==window.devicePixelRatio&&(vy=window.devicePixelRatio,gy=null)}));var wy=function(){function e(t,n){var r=this;this.onScroll=function(){var e=_y(r.el);r.scrollXTicking||(e.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(e.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(e){r.mouseX=e.clientX,r.mouseY=e.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(t=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(e,"x"):r.onTrackClick(e,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(e,"y"):r.onTrackClick(e,"y"))))},this.drag=function(t){var n=r.axis[r.draggedAxis].track,i=n.rect[r.axis[r.draggedAxis].sizeAttr],o=r.axis[r.draggedAxis].scrollbar,a=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],s=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var u=(("y"===r.draggedAxis?t.pageY:t.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(i-o.size)*(a-s);"x"===r.draggedAxis&&(u=r.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u-(i+o.size):u,u=r.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-u:u),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=u},this.onEndDrag=function(e){var t=Ty(r.el),n=_y(r.el);e.preventDefault(),e.stopPropagation(),r.el.classList.remove(r.classNames.dragging),t.removeEventListener("mousemove",r.drag,!0),t.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout((function(){t.removeEventListener("click",r.preventClick,!0),t.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null}))},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,{},n),this.classNames=Object.assign({},e.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,e.instances.has(this.el)||(this.recalculate=jc()(this.recalculate.bind(this),64),this.onMouseMove=jc()(this.onMouseMove.bind(this),64),this.hideScrollbars=Uc()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Uc()(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=Fc()(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=t.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var i=e.getOffset(n),o=e.getOffset(r);n.scrollLeft=999;var a=e.getOffset(r);return{isRtlScrollingInverted:i.left!==o.left&&o.left-a.left!=0,isRtlScrollbarInverted:i.left!==o.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=Ty(e),r=_y(e);return{top:t.top+(r.pageYOffset||n.documentElement.scrollTop),left:t.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),Dc.a&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(e.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),n=document.createElement("div");t.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),t.appendChild(n),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this,t=_y(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize);var n=!1,r=t.ResizeObserver||zc.a;this.resizeObserver=new r((function(){n&&e.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new t.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var e=_y(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var s=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=n?r+"px":"auto",this.placeholderEl.style.height=s+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=u>r,this.axis.y.isOverflowing=s>l,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==a&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var c=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&s>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],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=r/n;return t=Math.max(~~(i*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},t.positionScrollbar=function(t){if(void 0===t&&(t="y"),this.axis[t].isOverflowing){var n=this.contentWrapperEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[t].sizeAttr],10),o=this.axis[t].scrollbar,a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=(a="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-a:a)/(n-i),u=~~((r-o.size)*s);u="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u+(r-o.size):u,o.el.style.transform="x"===t?"translate3d("+u+"px, 0, 0)":"translate3d(0, "+u+"px, 0)"}},t.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,n=this.axis[e].scrollbar.el;this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden"),this.axis[e].isOverflowing?n.style.display="block":n.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.rect=this.axis[e].track.el.getBoundingClientRect(),this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[e].scrollbar.rect)?this.axis[e].scrollbar.el.classList.add(this.classNames.hover):this.axis[e].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[e].track.rect)?(this.showScrollbar(e),this.axis[e].track.el.classList.add(this.classNames.hover)):this.axis[e].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.el.classList.remove(this.classNames.hover),this.axis[e].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(e){void 0===e&&(e="y");var t=this.axis[e].scrollbar.el;this.axis[e].isVisible||(t.classList.add(this.classNames.visible),this.axis[e].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(e,t){void 0===t&&(t="y");var n=Ty(this.el),r=_y(this.el),i=this.axis[t].scrollbar,o="y"===t?e.pageY:e.pageX;this.axis[t].dragOffset=o-i.rect[this.axis[t].offsetAttr],this.draggedAxis=t,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var r=_y(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var i=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],o=parseInt(this.elStyles[this.axis[t].sizeAttr],10),a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=("y"===t?this.mouseY-i:this.mouseX-i)<0?-1:1,u=-1===s?a-o:a+o;!function e(){var i,o;-1===s?a>u&&(a-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((i={})[n.axis[t].offsetAttr]=a,i)),r.requestAnimationFrame(e)):a<u&&(a+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((o={})[n.axis[t].offsetAttr]=a,o)),r.requestAnimationFrame(e))}()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:by()}catch(e){return by()}},t.removeListeners=function(){var e=this,t=_y(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}();wy.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},wy.instances=new WeakMap;var Sy=wy;function Ey(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ky(){return(ky=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Cy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xy(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Oy=i.a.forwardRef((function(e,t){var n,o=e.children,a=e.scrollableNodeProps,s=void 0===a?{}:a,u=xy(e,["children","scrollableNodeProps"]),l=Object(r.useRef)(),c=Object(r.useRef)(),f=Object(r.useRef)(),h={},d={},p=[];return Object.keys(u).forEach((function(e){Object.prototype.hasOwnProperty.call(Sy.defaultOptions,e)?h[e]=u[e]:e.match(/data-simplebar-(.+)/)&&"data-simplebar-direction"!==e?p.push({name:e,value:u[e]}):d[e]=u[e]})),p.length&&console.warn("simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:\n 'data-simplebar-auto-hide=\"false\"' —> 'autoHide=\"false\"'\n "),Object(r.useEffect)((function(){var e;return l=s.ref||l,c.current&&(n=new Sy(c.current,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cy(n,!0).forEach((function(t){Ey(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cy(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(e=p,Array.prototype.reduce.call(e,(function(e,t){var n=t.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(e,t){return t.toUpperCase()}));switch(t.value){case"true":e[r]=!0;break;case"false":e[r]=!1;break;case void 0:e[r]=!0;break;default:e[r]=t.value}}return e}),{})),{},h,{},l&&{scrollableNode:l.current},{},f.current&&{contentNode:f.current})),t&&(t.current=n)),function(){n.unMount(),n=null}}),[]),i.a.createElement("div",ky({ref:c,"data-simplebar":!0},d),i.a.createElement("div",{className:"simplebar-wrapper"},i.a.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},i.a.createElement("div",{className:"simplebar-height-auto-observer"})),i.a.createElement("div",{className:"simplebar-mask"},i.a.createElement("div",{className:"simplebar-offset"},"function"==typeof o?o({scrollableNodeRef:l,contentNodeRef:f}):i.a.createElement("div",ky({},s,{className:"simplebar-content-wrapper".concat(s.className?" ".concat(s.className):"")}),i.a.createElement("div",{className:"simplebar-content"},o)))),i.a.createElement("div",{className:"simplebar-placeholder"})),i.a.createElement("div",{className:"simplebar-track simplebar-horizontal"},i.a.createElement("div",{className:"simplebar-scrollbar"})),i.a.createElement("div",{className:"simplebar-track simplebar-vertical"},i.a.createElement("div",{className:"simplebar-scrollbar"})))}));Oy.displayName="SimpleBar",Oy.propTypes={children:yy.a.oneOfType([yy.a.node,yy.a.func]),scrollableNodeProps:yy.a.object};var Py=Oy;function Ay(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ry(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ry(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ry(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ly(){return i.a.createElement("div",{className:"alert alert-info mt-3",role:"alert"},"Psst, you haven't attempted this question yet. You can continue to watch the video and answer the question later if you like.")}var Iy,Dy,Ny;n(321);function jy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var My=(jy(Iy={},cy.Annotation,null),jy(Iy,cy.Image,null),jy(Iy,cy.MissingWord,null),jy(Iy,cy.MultipleChoice,null),jy(Iy,cy.ShortAnswer,(function(e){var t=e.state,n=e.setState,r=e.interaction;return i.a.createElement("div",{className:"cv-create-short-answer"},i.a.createElement("h2",{className:"font-body"},"Create Short Answer"),i.a.createElement("textarea",{className:"form-control",rows:3,onChange:function(e){n(Object.assign(Object.assign({},t),{text:e.target.value}))},value:t.text||r.data.text}))})),Iy);var Uy=(jy(Dy={},cy.Annotation,null),jy(Dy,cy.Image,null),jy(Dy,cy.MissingWord,null),jy(Dy,cy.MultipleChoice,null),jy(Dy,cy.ShortAnswer,(function(e){return!!e.text})),jy(Dy,cy.TrueOrFalse,null),Dy);var By=(jy(Ny={},cy.Annotation,null),jy(Ny,cy.Image,null),jy(Ny,cy.MissingWord,null),jy(Ny,cy.MultipleChoice,null),jy(Ny,cy.ShortAnswer,(function(e,t){return new Promise((function(n){window.setTimeout((function(){t.data.text=e.text,n()}),200)}))})),jy(Ny,cy.TrueOrFalse,null),Ny);n(322);function Fy(e){var t=e.interaction;return i.a.createElement("div",{className:"cv-interaction-heading mb-3"},i.a.createElement("span",{className:"cv-iteraction-icon",style:{backgroundImage:"url(https:".concat(t.type.icon,")"),backgroundColor:"#".concat(t.type.colour)}}),i.a.createElement("h2",{className:"cv-interaction-title h5"},t.name))}n(323);function zy(e){var t=e.correct;return e.showFeedback?i.a.createElement(i.a.Fragment,null,t?i.a.createElement("div",{className:"alert alert-success"},"Correct"):i.a.createElement("div",{className:"alert alert-danger"},"Incorrect")):i.a.createElement(i.a.Fragment,null)}function Vy(e){return(Vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Wy=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Hy(e,t){return t.actionableItems.every((function(t){return t.name===e[t.id]}))}n(324);function qy(e){return(qy="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 Gy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Yy=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Xy(e,t){return t.actionableItems.filter((function(e){return e.isCorrect})).every((function(t){return e[t.id]}))}function Ky(e){return!!Object.keys(e).length}function $y(){return new Promise((function(e){e()}))}function Qy(e){var t=e.state,n=e.setState,r=e.interaction,o=e.showFeedback,a=1===r.actionableItems.filter((function(e){return e.isCorrect})).length;return i.a.createElement("div",{className:"cv-interactive-question"},i.a.createElement(zy,{correct:Xy(t,r),showFeedback:o}),i.a.createElement(Fy,{interaction:r}),i.a.createElement("form",{className:"cv-multiple-choice-form"},i.a.createElement("table",{className:"table-bordered w-100"},i.a.createElement("tbody",{className:"table-bordered w-100"},r.actionableItems.map((function(e,r){var s=t[e.id];return i.a.createElement("tr",{key:r},i.a.createElement("td",{className:"cv-multiple-choice-input-container"},i.a.createElement("div",{className:"custom-control ".concat(a?"custom-radio":"custom-checkbox")},i.a.createElement("input",{id:e.id,type:a?"radio":"checkbox",className:"custom-control-input",name:"multiple-choice",checked:!!s,onChange:function(r){return function(e,r){if(a)n(Gy({},e.id,!0));else if(r.target.checked)n(Object.assign(Object.assign({},t),Gy({},e.id,!0)));else{var i=e.id,o=(t[i],Yy(t,["symbol"===qy(i)?i:i+""]));n(o)}}(e,r)},disabled:o}),i.a.createElement("label",{htmlFor:e.id,className:"custom-control-label"}))),i.a.createElement("td",{className:"cv-multiple-choice-label-container w-100"},i.a.createElement("label",{htmlFor:e.id},e.name)))}))))))}function Jy(){return(Jy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Zy=r.useLayoutEffect,eg=function(e){var t=Object(r.useRef)(e);return Zy((function(){t.current=e})),t},tg=function(e,t){"function"!=typeof e?e.current=t:e(t)},ng=function(e,t){var n=Object(r.useRef)();return Object(r.useCallback)((function(r){e.current=r,n.current&&tg(n.current,null),n.current=t,t&&tg(t,r)}),[t])},rg={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},ig=function(e){Object.keys(rg).forEach((function(t){e.style.setProperty(t,rg[t],"important")}))},og=null;var ag,sg,ug,lg=function(){},cg=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width"],fg=!!document.documentElement.currentStyle,hg=function(e,t){var n=e.cacheMeasurements,i=e.maxRows,o=e.minRows,a=e.onChange,s=void 0===a?lg:a,u=e.onHeightChange,l=void 0===u?lg:u,c=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]);var f,h=void 0!==c.value,d=Object(r.useRef)(null),p=ng(d,t),m=Object(r.useRef)(0),y=Object(r.useRef)(),g=function(){var e=d.current,t=n&&y.current?y.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,cg.reduce((function(e,t){return e[t]=n[t],e}),{})),i=r.boxSizing;return""===i?null:(fg&&"border-box"===i&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})}(e);if(t){y.current=t;var r=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),og||((og=document.createElement("textarea")).setAttribute("tab-index","-1"),og.setAttribute("aria-hidden","true"),ig(og)),null===og.parentNode&&document.body.appendChild(og);var i=e.paddingSize,o=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach((function(e){var t=e;og.style[t]=a[t]})),ig(og),og.value=t;var u=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize}(og,e);og.value="x";var l=og.scrollHeight-i,c=l*n;"border-box"===s&&(c=c+i+o),u=Math.max(c,u);var f=l*r;return"border-box"===s&&(f=f+i+o),[u=Math.min(f,u),l]}(t,e.value||e.placeholder||"x",o,i),a=r[0],s=r[1];m.current!==a&&(m.current=a,e.style.setProperty("height",a+"px","important"),l(a,{rowHeight:s}))}};return Object(r.useLayoutEffect)(g),f=eg(g),Object(r.useEffect)((function(){var e=function(e){f.current(e)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),Object(r.createElement)("textarea",Jy({},c,{onChange:function(e){h||g(),s(e)},ref:p}))},dg=Object(r.forwardRef)(hg);function pg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mg=(pg(ag={},cy.Annotation,(function(e){var t=e.interaction;return i.a.createElement("div",{className:"cv-interactive-question"},i.a.createElement(Fy,{interaction:t}),i.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.interaction.data.annotation}}))})),pg(ag,cy.Image,(function(e){var t=e.interaction,n=e.recalculateScroll,r=i.a.useCallback((function(e){e&&(e.onload=function(){n()})}),[]);return i.a.createElement("div",{className:"cv-interactive-question cv-image-interactive"},i.a.createElement(Fy,{interaction:t}),i.a.createElement("div",{className:"cv-image-container"},i.a.createElement("img",{className:"img-fluid",src:t.data.url,ref:r})))})),pg(ag,cy.MissingWord,(function(e){var t=e.state,n=e.setState,r=e.interaction,o=e.showFeedback,a=r.data.sentence.replace(/{([^{}]*)}/g,(function(e,t){return"{".concat("cv-missing-word-").concat(t,"}")})).split(/{([^{}]*)}/g);function s(e,r){if(r.target.value){var i,o,a;n(Object.assign(Object.assign({},t),(i={},o=e.id,a=r.target.value,o in i?Object.defineProperty(i,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[o]=a,i)))}else{var s=e.id,u=(t[s],Wy(t,["symbol"===Vy(s)?s:s+""]));n(u)}}return i.a.createElement("div",{className:"cv-interactive-question"},i.a.createElement(zy,{correct:Hy(t,r),showFeedback:o}),i.a.createElement(Fy,{interaction:r}),i.a.createElement("form",null,a.map((function(e,t){if(!e.startsWith("cv-missing-word-"))return e;var n=e.replace("cv-missing-word-",""),o=r.actionableItems.find((function(e){return e.order.toString()===n}));if(o){var a,u,l=(a=o.name,(u=document.createElement("canvas").getContext("2d")).font="17pt arial",u.measureText(a).width);return i.a.createElement("input",{key:t,style:{width:l+"px"},onChange:function(e){return s(o,e)}})}}))))})),pg(ag,cy.MultipleChoice,Qy),pg(ag,cy.ShortAnswer,(function(e){var t=e.interaction,n=e.state,r=e.setState;return i.a.createElement("div",{className:"cv-interactive-question"},i.a.createElement(Fy,{interaction:t}),i.a.createElement(dg,{translate:!0,className:"form-control",minRows:3,value:n.text||"",onChange:function(e){r(Object.assign(Object.assign({},n),{text:e.target.value}))}}))})),pg(ag,cy.TrueOrFalse,Qy),ag);function yg(){return!0}var gg=(pg(sg={},cy.Annotation,yg),pg(sg,cy.Image,yg),pg(sg,cy.MissingWord,(function(e,t){return Object.keys(e).length===t.actionableItems.length})),pg(sg,cy.MultipleChoice,Ky),pg(sg,cy.ShortAnswer,(function(e){return!!e.text})),pg(sg,cy.TrueOrFalse,Ky),sg);function vg(){return Promise.resolve()}var bg=(pg(ug={},cy.Annotation,vg),pg(ug,cy.Image,vg),pg(ug,cy.MissingWord,(function(){return new Promise((function(e){e()}))})),pg(ug,cy.MultipleChoice,$y),pg(ug,cy.ShortAnswer,(function(){return new Promise((function(e){e()}))})),pg(ug,cy.TrueOrFalse,$y),ug);function _g(e,t){if(t===fy.Create)return function(e){return Uy[e]}(e);if(t===fy.View)return function(e){return gg[e]}(e);throw new Error("Cannot find validation functions for the mode ".concat(t))}function Tg(e,t){if(t===fy.Create)return function(e){return By[e]}(e);if(t===fy.View)return function(e){return bg[e]}(e);throw new Error("Cannot find validation functions for the mode ".concat(t))}function wg(e,t){if(t===fy.Create)return function(e){return My[e]}(e);if(t===fy.View)return function(e){return mg[e]}(e);throw new Error("Cannot find components for the mode ".concat(t))}function Sg(e){return"t".concat(e.id)}function Eg(e){return"i".concat(e.id)}n(325);var kg={isValid:!0,submitted:!1,preview:!1};function Cg(e){var t=e.timepoint,n=e.continueInteractive,r=e.mode,o=e.state,a=e.dispatch,s=e.recalculateScroll,u=e.timepointState,l=e.immediateFeedback;return i.a.createElement("div",{className:"cv-timepoint"},i.a.createElement("div",null,t.interactions.map((function(e,t){var n=wg(e.type.id,r);return i.a.createElement(n,{interaction:e,state:o[Eg(e)]||{},setState:function(t){return a({key:Eg(e),value:t})},key:t,recalculateScroll:s,showFeedback:u.submitted})})),!u.isValid&&i.a.createElement(Ly,null)),i.a.createElement("div",{className:"cv-timpoint-button-container"},!u.isValid&&i.a.createElement("a",{className:"btn btn-secondary",onClick:n},"Come back later"),i.a.createElement("a",{className:"btn btn-info ml-2",onClick:function(){if(u.submitted)n();else if(!t.interactions.some((function(e){return!_g(e.typeId,r)(o[Eg(e)]||{},e)}))){var e=t.interactions.map((function(e){return Tg(e.typeId,r)(o[Eg(e)]||{},e)}));Promise.all(e).then((function(){a({key:Sg(t),value:Object.assign(Object.assign({},u),{submitted:!0,isValid:!0})}),l&&function(e){return e.interactions.some((function(e){return e.typeId===cy.MissingWord||e.typeId===cy.MultipleChoice||e.typeId===cy.TrueOrFalse}))}(t)||n()}))}else a({key:Sg(t),value:Object.assign(Object.assign({},u),{isValid:!1})})}},"Save & Continue")))}n(326);var xg=[{name:"Annotation",type:cy.Annotation},{name:"Image",type:cy.Image},{name:"MissingWord",type:cy.MissingWord},{name:"MultipleChoice",type:cy.MultipleChoice},{name:"ShortAnswer",type:cy.ShortAnswer},{name:"TrueOrFalse",type:cy.TrueOrFalse}];function Og(e){var t=e.onTypeSelected;return i.a.createElement("div",{className:"cv-interactive-type-selector"},xg.map((function(e,n){return i.a.createElement("a",{key:n,className:"btn btn-info",onClick:function(){return t(e.type)}},e.name)})))}n(327);function Pg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ag(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ag(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ag(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rg(e,t){return Object.assign(Object.assign({},e),(n={},r=t.key,i=t.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n));var n,r,i}function Lg(e){var t=e.player,n=e.track,r=e.mode,o=e.interactive,a=Pg(i.a.useReducer(Rg,{}),2),s=a[0],u=a[1],l=function(e){var t=e.player,n=e.track,r=e.interactive,o=e.mode,a=Ay(i.a.useState(o===fy.Create),2),s=a[0],u=a[1],l=Ay(i.a.useState(null),2),c=l[0],f=l[1];function h(){var e=n.activeCues;if(!e.length)return o!==fy.Create&&u(!1),void f(null);var i=r.timepoints.find((function(t){return t.id.toString()===e[0].text.toString()}));i.shouldPause&&(t.seeking()?t.one("play",(function(){return t.pause()})):t.pause()),u(!0),f(i)}return i.a.useEffect((function(){return n.addEventListener("cuechange",h),function(){return n.removeEventListener("cuechange",h)}})),{open:s,timepoint:c,continueInteractive:function(){o!==fy.Create&&u(!1),t.play()},lockPlayer:function(){},unlockPlayer:function(){}}}({player:t,track:n,interactive:o,mode:r}),c=l.open,f=l.timepoint,h=l.continueInteractive,d=i.a.useRef();return i.a.createElement("div",{className:"cv-interactive-container"},i.a.createElement("div",{className:"cv-interactive ".concat(c?"cv-open":"")},i.a.createElement(Py,{style:{height:"100%"},ref:d},!f&&r===fy.Create&&i.a.createElement(Og,{onTypeSelected:function(e){t.pause();var r=t.currentTime(),i=Math.round(Math.random()*Number.MAX_SAFE_INTEGER).toString();o.timepoints||(o.timepoints=[]),o.timepoints.push({id:i,visibleAt:1e3*r,interactiveId:o.id,shouldPause:1,interactions:[{id:Math.round(Math.random()*Number.MAX_SAFE_INTEGER).toString(),typeId:e,type:{id:e,name:"",colour:"",icon:""},timepointId:i,order:0,interactiveId:o.id,data:{}}]}),n.addCue({startTime:r,endTime:r+1,text:i})}}),!!f&&i.a.createElement(Cg,{timepoint:f,continueInteractive:h,immediateFeedback:o.immediateFeedback,mode:r,state:s,dispatch:u,recalculateScroll:function(){d.current.recalculate()},timepointState:s[Sg(f)]||kg}))))}Eu.registerComponent("Interactive",Yh((function(e,t){return i.a.createElement(Lg,Object.assign({player:e},t))})));n(328);function Ig(e){return(Ig="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 Dg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ng(e,t,n){return(Ng="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function jg(e,t){return(jg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bg(e);if(t){var i=Bg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ug(this,n)}}function Ug(e,t){return!t||"object"!==Ig(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bg(e){return(Bg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jg(e,t)}(o,e);var t,n,r,i=Mg(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).timepoint_=t.timepoint,n.time_=t.timepoint.visibleAt/1e3;var r=t.timepoint.interactions[0];return r||n.hide(),n.setColour(r.type.colour),n.controlText(r.name),n.update(),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-item ".concat(Ng(Bg(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Ng(Bg(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){var e=this.player_.duration(),t=this.time_/e;this.el().style.left=100*t+"%",t>100||t<0?this.hide():this.show()}},{key:"handleClick",value:function(e){e.stopPropagation(),this.player_.currentTime(this.time_)}},{key:"setColour",value:function(e){this.el().querySelector(".vjs-icon-placeholder").style.backgroundColor="#"+e}}])&&Dg(t.prototype,n),r&&Dg(t,r),o}(Eu.getComponent("Button"));n(329);function zg(e){return(zg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wg(e,t,n){return(Wg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Hg(e,t){return(Hg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xg(e);if(t){var i=Xg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gg(this,n)}}function Gg(e,t){return!t||"object"!==zg(t)&&"function"!=typeof t?Yg(e):t}function Yg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xg(e){return(Xg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Kg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hg(e,t)}(o,e);var t,n,r,i=qg(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).track_=t.track,n.interactive_=t.interactive,n.onDurationChange=n.onDurationChange.bind(Yg(n)),n.createInteractionItems=n.createInteractionItems.bind(Yg(n)),n.createInteractionItems(),n.player_.on("durationchange",n.onDurationChange),n.player_.on("dispose",(function(){n.player_.off("durationchange",n.onDurationChange)})),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-items ".concat(Wg(Xg(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Wg(Xg(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(e){e.update()}))}},{key:"createInteractionItems",value:function(){var e=this;if(this.track_){this.children_.forEach((function(t){e.removeChild(t)}));for(var t=0;t<this.track_.cues.length;t++){var n=this.track_.cues[t],r=this.getTimepointById(n.text);r&&this.addChild(new Fg(this.player_,{timepoint:r}))}}}},{key:"onDurationChange",value:function(){this.update()}},{key:"getTimepointById",value:function(e){var t;return null===(t=this.interactive_.timepoints)||void 0===t?void 0:t.find((function(t){return t.id===e}))}}])&&Vg(t.prototype,n),r&&Vg(t,r),o}(Eu.getComponent("Component"));function $g(e){return($g="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 Qg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jg(e,t){return(Jg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tv(e);if(t){var i=tv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ev(this,n)}}function ev(e,t){return!t||"object"!==$g(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tv(e){return(tv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jg(e,t)}(o,e);var t,n,r,i=Zg(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options=t,e.ready((function(){return n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){Zl(this.player,"metadata","interactive",this.onTrackLoaded.bind(this))}},{key:"onTrackLoaded",value:function(e){this.player.addChild("Interactive",{track:e,interactive:this.options.interactive,mode:this.options.mode}),this.player.controlBar.getChild("progressControl").getChild("SeekBar").addChild(new Kg(this.player,{interactive:this.options.interactive,track:e}))}}])&&Qg(t.prototype,n),r&&Qg(t,r),o}(Eu.getPlugin("plugin"));function rv(e){return(rv="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 iv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ov(e,t){return(ov=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function av(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=uv(e);if(t){var i=uv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return sv(this,n)}}function sv(e,t){return!t||"object"!==rv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function uv(e){return(uv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Eu.registerPlugin("viewInteractivePlugin",nv);var lv=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},cv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ov(e,t)}(o,e);var t,n,r,i=av(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"configurePlugins",value:function(){return lv(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.player.addTextTrack("metadata","interactive"),this.options.mode!==fy.Create){e.next=4;break}return this.player.viewInteractivePlugin({interactive:{id:Math.round(Math.random()*Number.MAX_SAFE_INTEGER).toString()},mode:fy.Create,track:t}),e.abrupt("return");case 4:return e.next=6,_h.get("/interactive.json");case 6:(n=e.sent).timepoints.forEach((function(e){var n=e.visibleAt/1e3,r=e.visibleFor?n+e.visibleFor/1e3:n+1;t.addCue({startTime:n,endTime:r,text:e.id})})),this.player.viewInteractivePlugin({interactive:n,mode:fy.View});case 9:case"end":return e.stop()}}),e,this)})))}}])&&iv(t.prototype,n),r&&iv(t,r),o}(Eh),fv=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function hv(e){var t=e.onReady,n=fv(e,["onReady"]),r=i.a.useRef();return i.a.useEffect((function(){var e=new cv(r.current,n);t&&e.ready((function(){t(e)}))}),[]),i.a.createElement("div",{ref:r})}function dv(e){return(dv="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 pv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yv(e,t,n){return(yv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_v(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function gv(e,t){return(gv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_v(e);if(t){var i=_v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bv(this,n)}}function bv(e,t){return!t||"object"!==dv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _v(e){return(_v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Tv=Eu.getComponent("Component"),wv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gv(e,t)}(o,e);var t,n,r,i=vv(o);function o(){return pv(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-clip-timepoint-handle ".concat(yv(_v(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return yv(_v(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:'<svg viewBox="0 0 5 14"><g id="Clips" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Clip-2" transform="translate(-835.000000, -632.000000)" fill="#FFFFFF"><g id="Video-Copy" transform="translate(275.000000, 96.000000)"><g id="Handles" transform="translate(560.000000, 536.000000)"><circle id="Oval" cx="1" cy="1" r="1"></circle><circle id="Oval-Copy-2" cx="1" cy="5" r="1"></circle><circle id="Oval-Copy-4" cx="1" cy="9" r="1"></circle><circle id="Oval-Copy-8" cx="1" cy="13" r="1"></circle><circle id="Oval-Copy" cx="4" cy="1" r="1"></circle><circle id="Oval-Copy-3" cx="4" cy="5" r="1"></circle><circle id="Oval-Copy-5" cx="4" cy="9" r="1"></circle><circle id="Oval-Copy-9" cx="4" cy="13" r="1"></circle></g></g></g></g></svg>'}),n)}},{key:"isEventTarget",value:function(e){return this.el().contains(e.target)}}])&&mv(t.prototype,n),r&&mv(t,r),o}(Tv);n(330);function Sv(e){return(Sv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ev(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kv(e,t,n){return(kv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Pv(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Cv(e,t){return(Cv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pv(e);if(t){var i=Pv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ov(this,n)}}function Ov(e,t){return!t||"object"!==Sv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pv(e){return(Pv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Av=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cv(e,t)}(o,e);var t,n,r,i=xv(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).dragStartActive=!1,n.dragEndActive=!1,n.dragSliderActive=!1,n.dragSliderCurrentPosition=null,n.setStartTime(t.startTime,!1),n.setEndTime(t.endTime,!1),n.startHandle=new wv(n.player(),t),n.startHandle.addClass("cv-clip-start-handle"),n.addChild(n.startHandle),n.endHandle=new wv(n.player(),t),n.endHandle.addClass("cv-clip-end-handle"),n.addChild(n.endHandle),n.on(n.player(),"update:clip:start:time",(function(e){var t=e.time;return n.setStartTime(t)})),n.on(n.player(),"update:clip:end:time",(function(e){var t=e.time;return n.setEndTime(t)})),n.bindDragListeners(),n.update(),n}return t=o,(n=[{key:"createEl",value:function(){return kv(Pv(o.prototype),"createEl",this).call(this,"div",{className:"cv-clip-timepoint-selector"},{})}},{key:"update",value:function(){var e=this;this.options_.onChangeStartTime(this.startTime),this.options_.onChangeEndTime(this.endTime),this.requestAnimationFrame((function(){e.setStartOffset(),e.setWidth()}))}},{key:"setStartTime",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];isNaN(e)||(e<0&&(e=0),this.startTime=e,this.player().currentTime(this.startTime),t&&this.update())}},{key:"setEndTime",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];isNaN(e)||(e>this.player().duration()&&(e=this.player().duration()),this.endTime=e,t&&this.update())}},{key:"bindDragListeners",value:function(){var e=this;this.dragStart=this.dragStart.bind(this),this.dragEnd=this.dragEnd.bind(this),this.drag=this.drag.bind(this);var t=function(t){var n={passive:!0};t.addEventListener("touchstart",e.dragStart,n),t.addEventListener("touchend",e.dragEnd,n),t.addEventListener("touchmove",e.drag,n),t.addEventListener("mousedown",e.dragStart,n),t.addEventListener("mouseup",e.dragEnd,n),t.addEventListener("mousemove",e.drag,n),e.player().on("dispose",(function(){t.removeEventListener("touchstart",e.dragStart),t.removeEventListener("touchend",e.dragEnd),t.removeEventListener("touchmove",e.drag),t.removeEventListener("mousedown",e.dragStart),t.removeEventListener("mouseup",e.dragEnd),t.removeEventListener("mousemove",e.drag)}))};t(this.player().controlBar.el()),t(this.el())}},{key:"dragStart",value:function(e){this.startHandle.isEventTarget(e)&&(e.stopImmediatePropagation(),this.dragStartActive=!0),this.endHandle.isEventTarget(e)&&(e.stopImmediatePropagation(),this.dragEndActive=!0),e.target===this.el()&&(e.stopImmediatePropagation(),this.dragSliderActive=!0,this.dragSliderCurrentPosition=this.getPosition(e))}},{key:"dragEnd",value:function(){this.dragStartActive=!1,this.dragEndActive=!1,this.dragSliderActive=!1,this.dragSliderCurrentPosition=null}},{key:"drag",value:function(e){if((this.dragStartActive||this.dragEndActive||this.dragSliderActive)&&Eu.dom.isSingleLeftClick(e)){var t=this.getPosition(e),n=t*this.player().duration();this.dragStartActive&&this.handleStartHandleDrag(n),this.dragEndActive&&this.handleEndHandleDrag(n),this.dragSliderActive&&this.handleSliderDrag(t)}}},{key:"handleStartHandleDrag",value:function(e){var t=this.endTime-this.options_.minDuration;e>t&&(e=t),this.setStartTime(e)}},{key:"handleEndHandleDrag",value:function(e){var t=this.startTime+this.options_.minDuration;e<t&&(e=t),this.setEndTime(e)}},{key:"handleSliderDrag",value:function(e){var t=(e-this.dragSliderCurrentPosition)*this.player().duration(),n=this.startTime+t,r=this.endTime+t;n<=0||r>=this.player().duration()||(this.dragSliderCurrentPosition=e,this.setStartTime(n),this.setEndTime(r))}},{key:"getPosition",value:function(e){return Eu.dom.getPointerPosition(this.el_.parentNode,e).x}},{key:"setStartOffset",value:function(){this.el_.style.marginLeft="".concat(this.getPercentage(this.startTime),"%")}},{key:"setWidth",value:function(){this.el_.style.width="".concat(this.getPercentage(this.endTime-this.startTime),"%")}},{key:"getPercentage",value:function(e){return+(e/this.player().duration()*100).toFixed(4)}}])&&Ev(t.prototype,n),r&&Ev(t,r),o}(Eu.getComponent("Component"));n(331);function Rv(e){return(Rv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Iv(e,t){return(Iv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jv(e);if(t){var i=jv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Nv(this,n)}}function Nv(e,t){return!t||"object"!==Rv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jv(e){return(jv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Mv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Iv(e,t)}(o,e);var t,n,r,i=Dv(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addClass("cv-create-clip-seek-bar"),n}return t=o,(n=[{key:"initialize",value:function(e){var t=new Av(this.player(),e);this.addChild(t)}}])&&Lv(t.prototype,n),r&&Lv(t,r),o}(Eu.getComponent("SeekBar"));function Uv(e){return(Uv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fv(e,t){return(Fv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hv(e);if(t){var i=Hv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Vv(this,n)}}function Vv(e,t){return!t||"object"!==Uv(t)&&"function"!=typeof t?Wv(e):t}function Wv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hv(e){return(Hv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Mv.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},Eu.browser.IS_IOS||Eu.browser.IS_ANDROID||Mv.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Eu.registerComponent("CreateClipSeekBar",Mv);var qv=Eu.getPlugin("plugin"),Gv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fv(e,t)}(o,e);var t,n,r,i=zv(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,n.initCreateClipSeekBar=n.initCreateClipSeekBar.bind(Wv(n)),n.player.on("loadedmetadata",(function(){return n.player.ready(n.initCreateClipSeekBar)})),n}return t=o,(n=[{key:"initCreateClipSeekBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");if(t){var n=!isNaN(this.options.startTime)&&this.options.startTime>=0?this.options.startTime:0,r=!isNaN(this.options.endTime)&&this.options.endTime<=this.player.duration()?this.options.endTime:this.player.duration(),i=this.options.minDuration||3;t.initialize({startTime:n,endTime:r,minDuration:i,onChangeStartTime:this.options.onChangeStartTime,onChangeEndTime:this.options.onChangeEndTime})}}},{key:"dispose",value:function(){this.player.off("loadedmetadata",this.initCreateClipSeekBar)}}])&&Bv(t.prototype,n),r&&Bv(t,r),o}(qv);function Yv(e){return(Yv="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 Xv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kv(e,t){return(Kv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Jv(e);if(t){var i=Jv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Qv(this,n)}}function Qv(e,t){return!t||"object"!==Yv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Jv(e){return(Jv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Eu.registerPlugin("createClipPlugin",Gv);var Zv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kv(e,t)}(o,e);var t,n,r,i=$v(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,Object.assign(Object.assign({},t),{playbackRates:null}))}return t=o,(n=[{key:"getPlayerClassName",value:function(){return"cv-create-clip-player"}},{key:"configurePlugins",value:function(){var e=this.options,t=e.startTime,n=e.endTime,r=e.minDuration,i=e.onChangeStartTime,o=e.onChangeEndTime;this.player.createClipPlugin({startTime:t,endTime:n,minDuration:r,onChangeStartTime:i,onChangeEndTime:o})}},{key:"getSeekBarComponent",value:function(){return"CreateClipSeekBar"}}])&&Xv(t.prototype,n),r&&Xv(t,r),o}(Eh);function eb(e){var t=i.a.useRef(),n=i.a.useRef();return i.a.useEffect((function(){n.current=new Zv(t.current,e)}),[]),i.a.useEffect((function(){var t;null===(t=n.current)||void 0===t||t.trigger({type:"update:clip:start:time",time:e.startTime})}),[e.startTime]),i.a.useEffect((function(){var t;null===(t=n.current)||void 0===t||t.trigger({type:"update:clip:end:time",time:e.endTime})}),[e.endTime]),i.a.createElement("div",{ref:t})}n.d(t,"ClickViewPlayer",(function(){return py})),n.d(t,"ClickViewInteractivePlayer",(function(){return hv})),n.d(t,"ClickViewCreateClipPlayer",(function(){return eb})),n.d(t,"Player",(function(){return hy})),n.d(t,"InteractivePlayer",(function(){return cv}))}])}));