1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 02:48:51 +00:00
Files
seahub/media/assets/frontend/static/js/sharedFileViewVideo.60310af9.js

2 lines
1.0 MiB

/*! For license information please see sharedFileViewVideo.60310af9.js.LICENSE.txt */
(self.webpackChunkseahub_frontend=self.webpackChunkseahub_frontend||[]).push([[9650],{51925:function(e,t,n){"use strict";var r=n(23029),i=n(92901),a=n(39874),o=n(85501),s=n(9950),u=n(17119),l=n(65604),c=n(97011),d=n(40326),p=n(4086),h=n(44414),f=window.app.pageOptions.isOrgContext,m=function(e){function t(e){var n;return(0,r.A)(this,t),(n=(0,a.A)(this,t,[e])).getContainer=function(){return u.findDOMNode(n)},n.handleProps=function(){n.state.showInfo?n.addEvents():n.removeEvents()},n.addEvents=function(){["click","touchstart","keyup"].forEach((function(e){return document.addEventListener(e,n.handleDocumentClick,!0)}))},n.removeEvents=function(){["click","touchstart","keyup"].forEach((function(e){return document.removeEventListener(e,n.handleDocumentClick,!0)}))},n.handleDocumentClick=function(e){if(!e||3!==e.which&&("keyup"!==e.type||e.which===l.Aq.keyCodes.tab)){var t=n.getContainer();(!t.contains(e.target)||t===e.target||"keyup"===e.type&&e.which!==l.Aq.keyCodes.tab)&&n.setState({showInfo:!n.state.showInfo})}},n.onClickAccount=function(e){e.preventDefault(),n.isFirstMounted?(c.e.getAccountInfo().then((function(e){n.setState({userName:e.data.name,contactEmail:e.data.email,usageRate:e.data.space_usage,quotaUsage:l.Aq.bytesToSize(e.data.usage),quotaTotal:l.Aq.bytesToSize(e.data.total),isStaff:e.data.is_staff,isInstAdmin:e.data.is_inst_admin,isOrgStaff:1===e.data.is_org_staff,showInfo:!n.state.showInfo,enableSubscription:e.data.enable_subscription})})).catch((function(e){var t=l.Aq.getErrorMsg(e);p.A.danger(t)})),n.isFirstMounted=!1):n.setState({showInfo:!n.state.showInfo})},n.renderMenu=function(){var e,t=n.state,r=t.isStaff,i=t.isOrgStaff,a=t.isInstAdmin;return n.props.isAdminPanel?r?e={url:d.Yc,text:(0,d.AP)("Exit System Admin")}:i?e={url:d.Yc,text:(0,d.AP)("Exit Organization Admin")}:a&&(e={url:d.Yc,text:(0,d.AP)("Exit Institution Admin")}):r?e={url:"".concat(d.Yc,"sys/info/"),text:(0,d.AP)("System Admin")}:i?e={url:"".concat(d.Yc,"org/info/"),text:(0,d.AP)("Organization Admin")}:d.am&&a&&(e={url:"".concat(d.Yc,"inst/useradmin/"),text:(0,d.AP)("Institution Admin")}),e&&(0,h.jsx)("a",{href:e.url,title:e.text,className:"item",children:e.text})},n.renderAvatar=function(){return(0,h.jsx)("img",{src:d.wg,width:"36",height:"36",className:"avatar",alt:(0,d.AP)("Avatar")})},n.state={showInfo:!1,userName:"",contactEmail:"",quotaUsage:"",quotaTotal:"",isStaff:!1,isOrgStaff:!1,usageRate:"",enableSubscription:!1},n.isFirstMounted=!0,n}return(0,o.A)(t,e),(0,i.A)(t,[{key:"componentDidUpdate",value:function(e){this.handleProps()}},{key:"render",value:function(){return(0,h.jsxs)("div",{id:"account",children:[(0,h.jsx)("a",{id:"my-info",href:"#",onClick:this.onClickAccount,className:"account-toggle no-deco d-none d-md-block","aria-label":(0,d.AP)("View profile and more"),children:this.renderAvatar()}),(0,h.jsx)("span",{className:"account-toggle sf2-icon-more mobile-icon d-md-none","aria-label":(0,d.AP)("View profile and more"),onClick:this.onClickAccount}),(0,h.jsxs)("div",{id:"user-info-popup",className:"account-popup sf-popover ".concat(this.state.showInfo?"":"hide"),children:[(0,h.jsx)("div",{className:"outer-caret up-outer-caret",children:(0,h.jsx)("div",{className:"inner-caret"})}),(0,h.jsxs)("div",{className:"sf-popover-con",children:[(0,h.jsxs)("div",{className:"item o-hidden",children:[this.renderAvatar(),(0,h.jsx)("div",{className:"txt",children:this.state.userName})]}),(0,h.jsx)("div",{id:"space-traffic",children:(0,h.jsxs)("div",{className:"item",children:[(0,h.jsxs)("p",{children:[(0,d.AP)("Used:")," ",this.state.quotaUsage," / ",this.state.quotaTotal]}),(0,h.jsx)("div",{id:"quota-bar",children:(0,h.jsx)("span",{id:"quota-usage",className:"usage",style:{width:this.state.usageRate}})})]})}),(0,h.jsx)("a",{href:d.Yc+"profile/",className:"item",children:(0,d.AP)("Settings")}),this.state.enableSubscription&&!f&&(0,h.jsx)("a",{href:d.Yc+"subscription/",className:"item",children:"\u4ed8\u8d39\u7ba1\u7406"}),this.renderMenu(),d.p8&&(0,h.jsx)("a",{href:d.Yc+"sso-to-thirdpart/",className:"item",children:(0,d.AP)("Customer Portal")}),(0,h.jsx)("a",{href:d.Yc+"accounts/logout/",className:"item",children:(0,d.AP)("Log out")})]})]})]})}}])}(s.Component);m.defaultProps={isAdminPanel:!1},t.A=m},22695:function(e,t,n){"use strict";n.d(t,{A:function(){return T}});var r=n(90675),i=n(10467),a=n(23029),o=n(92901),s=n(39874),u=n(85501),l=n(9950),c=n(85077),d=n(4086),p=n(81446),h=n(77574),f=n(47991),m=n(89615),g=n(97011),v=n(40326),y=n(65604),_=n(13042),b=n(44414),w=function(e){function t(e){var n;return(0,a.A)(this,t),(n=(0,s.A)(this,t,[e])).onOtherRepoToggle=(0,i.A)((0,r.A)().mark((function e(){var t,i,a,o,s,u;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.e.listRepos();case 3:t=e.sent,i=t.data.repos,a=[],o=[],i.forEach((function(e){"rw"===e.permission&&(n.props.repoID&&e.repo_name===n.state.currentRepoInfo.repo_name||o.includes(e.repo_id)||(a.push(e),o.push(e.repo_id)))})),s=y.Aq.sortRepos(a,"name","asc"),n.setState({repoList:s,isOtherRepoShow:!n.state.isOtherRepoShow,selectedItemInfo:{}}),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),u=y.Aq.getErrorMsg(e.t0),d.A.danger(u);case 16:case"end":return e.stop()}}),e,null,[[0,12]])}))),n.onCurrentRepoToggle=function(){n.setState({isCurrentRepoShow:!n.state.isCurrentRepoShow})},n.onDirentItemClick=function(e,t,r){n.props.onDirentItemClick(e,t,r),n.setState({selectedRepo:e,selectedPath:t})},n.onRepoItemClick=function(e){n.props.onRepoItemClick&&n.props.onRepoItemClick(e),n.setState({selectedRepo:e,selectedPath:"/"})},n.onCloseSearching=function(){n.setState({isSearching:!1,isResultGot:!1,isBrowsing:!1,browsingPath:"",searchInfo:"",searchResults:[],selectedPath:n.props.currentPath,selectedItemInfo:{}}),n.inputValue="",n.timer=null,n.source=null},n.onSearchInfoChanged=function(e){var t=e.target.value.trim();if(!n.state.searchResults.length&&t.length>0&&n.setState({isSearching:!0,isResultGot:!1}),n.setState({searchInfo:t}),n.inputValue===t)return!1;if(n.inputValue=t,""===n.inputValue)return n.setState({isSearching:!1,isResultGot:!1}),!1;var r=n.props.repoID,i=n.props.isShowFile,a={q:t,search_repo:"only_current_library"===n.props.mode?r:"all",search_ftypes:"all",obj_type:i?"file":"dir"};n.timer&&clearTimeout(n.timer),n.timer=setTimeout(n.getSearchResult(a),500)},n.getSearchResult=function(e){n.source&&n.cancelRequest(),n.setState({isResultGot:!1}),n.source=g.e.getSource(),n.sendRequest(e,n.source.token)},n.sendRequest=function(e,t){v.am&&g.e.searchFiles(e,t).then((function(e){var t,r=(t=e.data.results,"only_other_libraries"===n.props.mode?t.filter((function(e){return e.repo_id!==n.state.currentRepoInfo.repo_id})):t);n.setState({searchResults:e.data.total?n.formatResultItems(r):[],isResultGot:!0}),n.source=null}))},n.cancelRequest=function(){n.source.cancel("prev request is cancelled")},n.getValueLength=function(e){for(var t,n=0,r=0;n<e.length;n++)10==(t=e.charCodeAt(n))?r+=2:t<127?r+=1:t>=128&&t<=2047?r+=2:t>=2048&&t<=65535&&(r+=3);return r},n.formatResultItems=function(e){for(var t=[],n=e.length>10?10:e.length,r=0;r<n;r++)t[r]={},t[r].index=[r],t[r].name=e[r].name,t[r].path=e[r].fullpath,t[r].repo_id=e[r].repo_id,t[r].repo_name=e[r].repo_name,t[r].is_dir=e[r].is_dir,t[r].link_content=decodeURI(e[r].fullpath).substring(1),t[r].content=e[r].content_highlight;return t},n.onSearchedItemClick=function(e){e.type=e.is_dir?"dir":"file";var t=new m.A(e);n.props.onDirentItemClick(t,e.path,e)},n.renderSearchedView=function(){return n.state.isResultGot?n.state.isResultGot&&0===n.state.searchResults.length?(0,b.jsx)("div",{className:"search-result-none text-center",children:(0,v.AP)("No results matching")}):n.state.isResultGot&&n.state.searchResults.length>0?(0,b.jsx)(f.A,{searchResults:n.state.searchResults,onItemClick:n.onSearchedItemClick,onSearchedItemDoubleClick:n.onSearchedItemDoubleClick}):void 0:(0,b.jsx)(p.A,{})},n.onSearchedItemDoubleClick=function(){var e=(0,i.A)((0,r.A)().mark((function e(t){var a,o,s,u,l,c,p;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("dir"===t.type){e.next=2;break}return e.abrupt("return");case 2:if(a=n.props.repoID,o=n.state.currentRepoInfo,s={repoID:t.repo_id,filePath:t.path},n.setState({selectedItemInfo:s}),u=function(e,t){n.setState({selectedRepo:e,selectedPath:t,isCurrentRepoShow:!0})},l=function(e){var t=y.Aq.getErrorMsg(e);d.A.danger(t)},c=function(){var e=(0,i.A)((0,r.A)().mark((function e(){var n,i,o;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.e.getRepoInfo(a);case 3:n=e.sent,i=new m.A(n.data),o=t.path.substring(0,t.path.length-1),u(i,o),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),l(e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}(),p=function(){var e=(0,i.A)((0,r.A)().mark((function e(){var i,s,u,c,d,p,h;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.e.listRepos();case 3:i=e.sent,s=i.data.repos,u=[],c=[],s.forEach((function(e){"rw"===e.permission&&(a&&e.repo_name===o.repo_name||c.includes(e.repo_id)||(u.push(e),c.push(e.repo_id)))})),d=y.Aq.sortRepos(u,"name","asc"),p=d.find((function(e){return e.repo_id===t.repo_id})),h=t.path.substring(0,t.path.length-1),n.setState({repoList:d,isOtherRepoShow:!0,selectedPath:h,selectedRepo:p}),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),l(e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(){return e.apply(this,arguments)}}(),!a||t.repo_id!==a){e.next=15;break}return e.next=13,c();case 13:e.next=17;break;case 15:return e.next=17,p();case 17:n.setState({isSearching:!1,isResultGot:!1,searchResults:[],isBrowsing:!0,browsingPath:t.path.substring(0,t.path.length-1)}),n.inputValue="",n.timer=null,n.source=null;case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n.onScroll=function(e){e.stopPropagation()},n.renderRepoListView=function(){var e=n.props,t=e.mode,r=e.currentPath,i=e.isShowFile,a=e.fileSuffixes,o=n.state,s=o.isCurrentRepoShow,u=o.isOtherRepoShow,l=o.currentRepoInfo,c=o.repoList,d=o.selectedRepo,p=o.selectedPath,f=o.selectedItemInfo;return(0,b.jsx)(h.A,{mode:t,currentPath:r,isShowFile:i,fileSuffixes:a,isBrowsing:n.state.isBrowsing,browsingPath:n.state.browsingPath,selectedItemInfo:f,currentRepoInfo:l,selectedRepo:d,isCurrentRepoShow:s,isOtherRepoShow:u,selectedPath:p,repoList:c,onCurrentRepoToggle:n.onCurrentRepoToggle,onOtherRepoToggle:n.onOtherRepoToggle,handleClickRepo:n.onRepoItemClick,handleClickDirent:n.onDirentItemClick})},n.state={isCurrentRepoShow:!0,isOtherRepoShow:!1,repoList:[],currentRepoInfo:null,selectedRepo:null,selectedPath:n.props.currentPath||"/",isSearching:!1,isResultGot:!1,searchInfo:"",searchResults:[],selectedItemInfo:{},isBrowsing:!1,browsingPath:""},n.inputValue="",n.timer=null,n.source=null,n}return(0,u.A)(t,e),(0,o.A)(t,[{key:"componentDidMount",value:function(){var e=(0,i.A)((0,r.A)().mark((function e(){var t,n,a,o=this;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props.repoID,n=function(){var e=(0,i.A)((0,r.A)().mark((function e(t){var n,i,a;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.e.getRepoInfo(t);case 3:n=e.sent,i=new m.A(n.data),o.setState({currentRepoInfo:i,selectedRepo:i}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),a=y.Aq.getErrorMsg(e.t0),d.A.danger(a);case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),a=function(){var e=(0,i.A)((0,r.A)().mark((function e(){var t,n,i,a,s,u;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.e.listRepos();case 3:t=e.sent,n=t.data.repos,i=[],a=[],n.forEach((function(e){"rw"!==e.permission||a.includes(e.repo_id)||(i.push(e),a.push(e.repo_id))})),s=y.Aq.sortRepos(i,"name","asc"),o.setState({repoList:s}),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),u=y.Aq.getErrorMsg(e.t0),d.A.danger(u);case 16:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}(),!t){e.next=8;break}return e.next=6,n(t);case 6:e.next=10;break;case 8:return e.next=10,a();case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"componentDidUpdate",value:function(e,t){e.mode!==this.props.mode&&(this.setState({isSearching:!1,isResultGot:!1,isBrowsing:!1,browsingPath:"",searchInfo:"",searchResults:[]}),this.props.mode===_.wY.ONLY_OTHER_LIBRARIES&&this.onOtherRepoToggle())}},{key:"render",value:function(){var e=this.props,t=e.repoID,n=e.mode,r=this.state,i=r.selectedRepo,a=r.searchInfo,o=r.isSearching;return!i&&t?"":(0,b.jsxs)(l.Fragment,{children:[v.am&&"recently_used"!==n&&(0,b.jsxs)("div",{className:"file-chooser-search-input",children:[(0,b.jsx)(c.A,{className:"search-input",placeholder:(0,v.AP)("Search"),type:"text",value:a,onChange:this.onSearchInfoChanged}),0!==a.length&&(0,b.jsx)("span",{className:"search-control attr-action-icon sf3-font sf3-font-x-01",onClick:this.onCloseSearching})]}),o?(0,b.jsx)("div",{className:"file-chooser-search-container",children:this.renderSearchedView()}):this.renderRepoListView()]})}}])}(l.Component);w.defaultProps={isShowFile:!1,hideLibraryName:!1,repoID:"",onDirentItemClick:function(){},onRepoItemClick:function(){},fileSuffixes:[],currentPath:"",searchResults:[],selectedSearchedItem:{},selectedRepo:null,selectedPath:""};var T=w},77574:function(e,t,n){"use strict";n.d(t,{A:function(){return N}});var r=n(9950),i=n(23029),a=n(92901),o=n(39874),s=n(85501),u=n(90675),l=n(10467),c=n(44414),d=function(e){function t(e){var n,r;return(0,i.A)(this,t),(n=(0,o.A)(this,t,[e])).onToggleClick=function(e){e.stopPropagation();var t=n.props.node;t.isExpanded?n.props.onNodeCollapse(t):n.props.onNodeExpanded(t)},n.onItemClick=function(e){e.stopPropagation();var t=!1;n.props.selectedRepo&&(t=n.props.selectedRepo.repo_id===n.props.repo.repo_id),t?n.props.selectedPath!==n.state.filePath?n.props.onDirentItemClick(n.state.filePath,n.props.node.object):"dir"===n.props.node.object.type&&n.onToggleClick(e):n.props.onDirentItemClick(n.state.filePath,n.props.node.object)},n.renderChildren=function(){var e=n.props.node;return e.hasChildren()?(0,c.jsx)("div",{className:"list-view-content",children:e.children.map((function(e){return(0,c.jsx)(t,{node:e,onNodeCollapse:n.props.onNodeCollapse,onNodeExpanded:n.props.onNodeExpanded,repo:n.props.repo,onDirentItemClick:n.props.onDirentItemClick,selectedRepo:n.props.selectedRepo,selectedPath:n.props.selectedPath,fileSuffixes:n.props.fileSuffixes,filePath:n.state.filePath,level:(n.props.level||0)+1},e.path)}))}):""},r="/"===n.props.filePath?"/"+n.props.node.object.name:n.props.filePath?n.props.filePath+"/"+n.props.node.object.name:n.props.node.path,n.state={filePath:r},n}return(0,s.A)(t,e),(0,a.A)(t,[{key:"render",value:function(){var e=this.props.node,t=!1;this.props.selectedRepo&&(t=this.props.selectedRepo.repo_id===this.props.repo.repo_id);var n=this.props.selectedPath===this.state.filePath||this.props.selectedPath===e.path,r=e.object.name;if(this.props.fileSuffixes&&r&&"file"===e.object.type)if(-1!==r.indexOf(".")){var i=r.slice(r.lastIndexOf(".")+1).toLowerCase();if(!this.props.fileSuffixes.includes(i))return null}else if("file"===e.object.type)return null;var a="".concat(20*this.props.level,"px");return(0,c.jsxs)("div",{className:"file-chooser-item",children:[(0,c.jsx)("div",{className:"".concat("/"===e.path?"hide":""),children:(0,c.jsxs)("div",{className:"".concat(t&&n?"item-active":""," item-info"),onClick:this.onItemClick,style:{paddingLeft:a},children:[(0,c.jsxs)("div",{className:"item-left-icon",children:["file"!==e.object.type&&(0,c.jsx)("span",{className:"icon item-toggle sf3-font ".concat(e.isExpanded?"sf3-font-down":"sf3-font-down rotate-270 d-inline-block"),onClick:this.onToggleClick}),(0,c.jsx)("i",{className:"tree-node-icon",children:(0,c.jsx)("span",{className:"icon sf3-font ".concat("dir"===e.object.type?"sf3-font-folder":"sf3-font-file")})})]}),(0,c.jsx)("div",{className:"item-text",children:(0,c.jsx)("span",{className:"name user-select-none ellipsis",title:e.object&&e.object.name,children:e.object&&e.object.name})})]})}),e.isExpanded&&this.renderChildren()]})}}])}(r.Component),p=function(e){function t(){return(0,i.A)(this,t),(0,o.A)(this,t,arguments)}return(0,s.A)(t,e),(0,a.A)(t,[{key:"render",value:function(){var e=this.props,t=e.treeData,n=e.selectedPath,r=e.onNodeCollapse,i=e.onNodeExpanded,a=e.repo,o=e.onDirentItemClick,s=e.selectedRepo,u=e.fileSuffixes,l=t.root;return(0,c.jsx)("div",{className:"list-view-content",children:(0,c.jsx)(d,{node:l,onNodeCollapse:r,onNodeExpanded:i,repo:a,onDirentItemClick:o,selectedRepo:s,selectedPath:n,fileSuffixes:u,level:0})})}}])}(r.Component),h=p,f=n(56044),m=n(84878),g=n(97011),v=n(25547),y=n(65604),_=n(4086),b=function(e){function t(e){var n;return(0,i.A)(this,t),(n=(0,o.A)(this,t,[e])).clearLoadRepoTimer=function(){n.loadRepoTimer&&(clearTimeout(n.loadRepoTimer),n.loadRepoTimer=null)},n.loadRepoDirentList=function(){var e=(0,l.A)((0,u.A)().mark((function e(t){var r,i,a,o,s;return(0,u.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.state.hasLoaded){e.next=3;break}return e.abrupt("return");case 3:return r=t.repo_id,e.prev=4,e.next=7,g.e.listDir(r,"/");case 7:if(i=e.sent,n.isComponentMounted){e.next=10;break}return e.abrupt("return");case 10:a=n.state.treeData.clone(),o=n.props.isShowFile?i.data.dirent_list:i.data.dirent_list.filter((function(e){return"dir"===e.type})),n.addResponseListToNode(o,a.root),n.setState({treeData:a,hasLoaded:!0}),e.next=22;break;case 16:if(e.prev=16,e.t0=e.catch(4),n.isComponentMounted){e.next=20;break}return e.abrupt("return");case 20:s=y.Aq.getErrorMsg(e.t0),_.A.danger(s);case 22:case"end":return e.stop()}}),e,null,[[4,16]])})));return function(t){return e.apply(this,arguments)}}(),n.addResponseListToNode=function(e,t){t.isLoaded=!0,t.isExpanded=!0;var n=e.map((function(e){return new m.A(e)})),r=(n=y.Aq.sortDirents(n,"name","asc")).map((function(e){return new f.A({object:e})}));t.addChildren(r)},n.onNodeExpanded=function(e){var t=n.props.repo.repo_id,r=n.state.treeData.clone();(e=r.getNodeByPath(e.path)).isLoaded?(r.expandNode(e),n.setState({treeData:r})):g.e.listDir(t,e.path).then((function(t){var i=[];i=!0===n.props.isShowFile?t.data.dirent_list:t.data.dirent_list.filter((function(e){return"dir"===e.type})),n.addResponseListToNode(i,e),n.setState({treeData:r})})).catch((function(e){var t=y.Aq.getErrorMsg(e);_.A.danger(t)}))},n.onNodeCollapse=function(e){var t=v.A.collapseNode(n.state.treeData,e);n.setState({treeData:t})},n.loadNodeAndParentsByPath=function(e,t,r){var i=n.state.treeData.clone();g.e.listDir(e,t,{with_parents:!0}).then((function(e){var a=e.data.dirent_list;a=a.filter((function(e){return"dir"===e.type}));for(var o={},s=0;s<a.length;s++){var u=a[s],l=u.parent_dir,c="/"===l?"/":l.slice(0,l.length-1);o[c]||(o[c]=[]),o[c].push(u)}for(var d in o){var p=i.getNodeByPath(d);p.isLoaded||n.addResponseListToNode(o[d],p)}n.setState({treeData:i},(function(){r&&n.onNodeExpanded(i.getNodeByPath(t))}))})).catch((function(e){var t=y.Aq.getErrorMsg(e);_.A.danger(t)}))},n.onToggleClick=function(e){e.stopPropagation();var t=n.props.repo;n.loadRepoDirentList(t),n.setState({isShowChildren:!n.state.isShowChildren})},n.onDirentItemClick=function(e,t){var r=n.props.repo;n.props.onDirentItemClick(r,e,t)},n.onRepoItemClick=function(e){var t=n.props,r=t.repo,i=t.selectedPath;!n.isCurrentRepo()||""!==i&&"/"!==i?n.props.onRepoItemClick(r):n.onToggleClick(e)},n.isCurrentRepo=function(){var e=n.props,t=e.selectedRepo,r=e.repo;return t&&r.repo_id===t.repo_id},n.state={isShowChildren:n.props.initToShowChildren,treeData:v.A.buildTree(),hasLoaded:!1},n.loadRepoTimer=null,n.isComponentMounted=!1,n}return(0,s.A)(t,e),(0,a.A)(t,[{key:"componentDidMount",value:function(){var e=this;this.isComponentMounted=!0;var t=this.props,n=t.isCurrentRepo,r=t.currentPath,i=t.repo,a=t.selectedItemInfo||{},o=a.repoID,s=a.filePath;if(o&&o===i.repo_id)return this.loadRepoDirentList(i),void(this.loadRepoTimer=setTimeout((function(){e.isComponentMounted&&(e.setState({isShowChildren:!0}),e.loadNodeAndParentsByPath(o,s))}),0));(i&&i.repo_id===this.props.selectedRepo.repo_id||n)&&(this.loadRepoDirentList(i),this.loadRepoTimer=setTimeout((function(){var t=i.repo_id;if(n&&r&&"/"!=r){e.loadNodeAndParentsByPath(t,r,!0)}}),0))}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.props,r=n.repo,i=n.selectedRepo,a=n.selectedPath,o=n.newFolderName;r.repo_id===i.repo_id&&e.selectedRepo!==i&&g.e.listDir(r.repo_id,a).then((function(e){if(t.isComponentMounted){var n=e.data.dirent_list.find((function(e){return"dir"===e.type&&e.name===o}));if(n){var r=new m.A(n),i=new f.A({object:r}),s=v.A.addNodeToParentByPath(t.state.treeData,i,a);t.setState({treeData:s})}}})).catch((function(e){if(t.isComponentMounted){var n=y.Aq.getErrorMsg(e);_.A.danger(n)}}))}},{key:"componentWillUnmount",value:function(){this.isComponentMounted=!1,this.clearLoadRepoTimer(),this.setState({hasLoaded:!1})}},{key:"render",value:function(){var e=!1;return this.isCurrentRepo()&&"/"==this.props.selectedPath&&(e=!0),(0,c.jsxs)("li",{children:[!this.props.hideLibraryName&&(0,c.jsxs)("div",{className:"".concat(e?"item-active":""," item-info"),onClick:this.onRepoItemClick,children:[(0,c.jsxs)("div",{className:"item-left-icon",children:[(0,c.jsx)("span",{className:"item-toggle icon sf3-font ".concat(this.state.isShowChildren?"sf3-font-down":"sf3-font-down rotate-270 d-inline-block"),onClick:this.onToggleClick}),(0,c.jsx)("i",{className:"tree-node-icon",children:(0,c.jsx)("span",{className:"icon sf3-font sf3-font-folder tree-node-icon"})})]}),(0,c.jsx)("div",{className:"item-text",children:(0,c.jsx)("span",{className:"name user-select-none ellipsis",title:this.props.repo.repo_name,children:this.props.repo.repo_name})})]}),this.state.isShowChildren&&(0,c.jsx)(h,{repo:this.props.repo,onDirentItemClick:this.onDirentItemClick,selectedRepo:this.props.selectedRepo,selectedPath:this.props.selectedPath,fileSuffixes:this.props.fileSuffixes,treeData:this.state.treeData,onNodeCollapse:this.onNodeCollapse,onNodeExpanded:this.onNodeExpanded})]})}}])}(r.Component),w=b,T=function(e){function t(){return(0,i.A)(this,t),(0,o.A)(this,t,arguments)}return(0,s.A)(t,e),(0,a.A)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.currentRepoInfo,r=t.currentPath,i=t.repoList,a=t.selectedSearchedRepo,o=t.initToShowChildren;return n&&(i=[]).push(n),a&&(i=[]).push(a),(0,c.jsx)("ul",{className:"list-view-content file-chooser-item",children:i.length>0&&i.map((function(t,i){return(0,c.jsx)(w,{isCurrentRepo:!!n,currentPath:r,repo:t,initToShowChildren:o,selectedRepo:e.props.selectedRepo,selectedPath:e.props.selectedPath,onRepoItemClick:e.props.onRepoItemClick,onDirentItemClick:e.props.onDirentItemClick,isShowFile:e.props.isShowFile,fileSuffixes:e.props.fileSuffixes,selectedItemInfo:e.props.selectedItemInfo,newFolderName:e.props.newFolderName},t.repo_id)}))})}}])}(r.Component);T.defaultProps={currentRepoInfo:null,isShowFile:!1,repo:null,repoList:[],selectedRepo:null,selectedPath:"",fileSuffixes:[],selectedItemInfo:null,currentPath:""};var k=T,S=n(60436),E=n(5544),C=function(e){var t=e.item,n=e.isSelected,r=e.onItemClick;if(!t||"string"!==typeof t.path)return"";var i=y.Aq.getFileName(t.path)||t.repo.repo_name;return(0,c.jsx)("li",{children:(0,c.jsxs)("div",{className:"".concat(n?"item-active":""," item-info recently-used"),onClick:function(){r(t.repo,t.path)},children:[(0,c.jsx)("div",{className:"item-left-icon",children:(0,c.jsx)("i",{className:"tree-node-icon",children:(0,c.jsx)("span",{className:"icon sf3-font sf3-font-folder tree-node-icon"})})}),(0,c.jsx)("div",{className:"item-text",children:(0,c.jsx)("span",{className:"name user-select-none ellipsis",title:i,children:i})})]})})},A=function(e){var t=e.currentRepoInfo,n=e.repoList,i=e.onDirentItemClick,a=(0,r.useState)(null),o=(0,E.A)(a,2),s=o[0],u=o[1],l=(0,r.useMemo)((function(){var e=JSON.parse(localStorage.getItem("recently-used-list"))||[],r=[].concat((0,S.A)(n),[t]);return e.map((function(e){var t=r.find((function(t){return t.repo_id===e.repo_id}));return t?{path:e.path,repo:t}:null})).filter((function(e){return null!==e}))}),[t,n]),d=function(e,t){u(t),i(e,t)};return(0,c.jsx)("ul",{className:"list-view-content file-chooser-item",children:l.length>0&&l.map((function(e,t){return(0,c.jsx)(C,{item:e,isSelected:s===e.path,onItemClick:d},t)}))})},x=n(40326),P=n(47991),I=n(81009),O=n(13042),R=n(81446),L=function(e){var t=e.mode,n=e.isShowFile,r=e.fileSuffixes,i=e.currentPath,a=e.isCurrentRepoShow,o=e.currentRepoInfo,s=e.selectedRepo,u=e.selectedPath,l=e.isOtherRepoShow,d=e.selectedItemInfo,p=e.repoList,h=e.searchStatus,f=e.searchResults,m=e.onSearchedItemClick,g=e.onSearchedItemDoubleClick,v=e.selectedSearchedRepo,y=e.newFolderName,_=e.initToShowChildren;return(0,c.jsx)("div",{className:"file-chooser-scroll-wrapper",onScroll:function(e){e.stopPropagation()},children:(0,c.jsxs)("div",{className:"file-chooser-container user-select-none",children:[t===O.wY.CURRENT_AND_OTHER_REPOS&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"list-view",children:[(0,c.jsxs)("div",{className:"file-chooser-list-view-header",children:[(0,c.jsx)("span",{className:"item-toggle sf3-font ".concat(a?"sf3-font-down":"sf3-font-down rotate-270 d-inline-block"),onClick:e.onCurrentRepoToggle}),(0,c.jsx)("span",{className:"library",children:(0,x.AP)("Current Library")})]}),a&&o&&(0,c.jsx)(k,{initToShowChildren:!0,currentRepoInfo:o,currentPath:i,selectedRepo:s,selectedPath:u,isShowFile:n,fileSuffixes:r,selectedItemInfo:d,onRepoItemClick:e.handleClickRepo,onDirentItemClick:e.handleClickDirent})]}),(0,c.jsxs)("div",{className:"list-view",children:[(0,c.jsxs)("div",{className:"file-chooser-list-view-header",children:[(0,c.jsx)("span",{className:"item-toggle sf3-font ".concat(l?"sf3-font-down":"sf3-font-down rotate-270 d-inline-block"),onClick:e.onOtherRepoToggle}),(0,c.jsx)("span",{className:"library",children:(0,x.AP)("Other Libraries")})]}),l&&(0,c.jsx)(k,{initToShowChildren:!0,repoList:p,selectedRepo:s,selectedPath:u,isShowFile:n,fileSuffixes:r,selectedItemInfo:d,onRepoItemClick:e.handleClickRepo,onDirentItemClick:e.handleClickDirent})]})]}),t===O.wY.ONLY_CURRENT_LIBRARY&&(0,c.jsx)("div",{className:"list-view",children:(0,c.jsx)(k,{initToShowChildren:!0,currentRepoInfo:o,currentPath:i,selectedRepo:s,selectedPath:u,isShowFile:n,fileSuffixes:r,selectedItemInfo:d,onRepoItemClick:e.handleClickRepo,onDirentItemClick:e.handleClickDirent,selectedSearchedRepo:v,newFolderName:y})}),t===O.wY.ONLY_ALL_REPOS&&(0,c.jsx)("div",{className:"file-chooser-container",children:(0,c.jsxs)("div",{className:"list-view",children:[(0,c.jsxs)("div",{className:"file-chooser-list-view-header",children:[(0,c.jsx)("span",{className:"item-toggle sf3-font sf3-font-down"}),(0,c.jsx)("span",{className:"library",children:(0,x.AP)("Libraries")})]}),(0,c.jsx)(k,{initToShowChildren:!1,repoList:p,selectedRepo:s,selectedPath:u,isShowFile:n,fileSuffixes:r,selectedItemInfo:d,onRepoItemClick:e.handleClickRepo,onDirentItemClick:e.handleClickDirent})]})}),t===O.wY.ONLY_OTHER_LIBRARIES&&(0,c.jsx)("div",{className:"list-view",children:(0,c.jsx)(k,{initToShowChildren:_,repoList:p,selectedRepo:s,selectedPath:u,isShowFile:n,fileSuffixes:r,selectedItemInfo:d,onRepoItemClick:e.handleClickRepo,onDirentItemClick:e.handleClickDirent,selectedSearchedRepo:v,newFolderName:y})}),t===O.wY.RECENTLY_USED&&(0,c.jsx)("div",{className:"list-view",children:(0,c.jsx)(A,{currentRepoInfo:o,repoList:p,onDirentItemClick:e.handleClickDirent})}),t===O.wY.SEARCH_RESULTS&&(0,c.jsx)("div",{className:"list-view",children:function(){switch(h){case I.z.LOADING:return(0,c.jsx)(R.A,{});case I.z.RESULTS:return(0,c.jsx)(c.Fragment,{children:0===f.length?(0,c.jsx)("div",{className:"search-results-none text-center",children:(0,x.AP)("No results matching")}):(0,c.jsx)(P.A,{searchResults:f,onItemClick:m,onSearchedItemDoubleClick:g})});default:return null}}()})]})})};L.defaultProps={isShowFile:!1,fileSuffixes:[]};var N=L},47991:function(e,t,n){"use strict";n.d(t,{A:function(){return f}});var r=n(23029),i=n(92901),a=n(39874),o=n(85501),s=n(9950),u=n(48738),l=n.n(u),c=n(65604),d=n(44414),p=function(e){function t(){var e;(0,r.A)(this,t);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(e=(0,a.A)(this,t,[].concat(i))).onClick=function(){e.props.onItemClick(e.props.item)},e.searchItemDoubleClick=function(){e.props.onSearchedItemDoubleClick(e.props.item)},e}return(0,o.A)(t,e),(0,i.A)(t,[{key:"render",value:function(){var e=this.props,t=e.item,n=e.currentItem;return(0,d.jsxs)("tr",{className:l()("searched-list-item",{"tr-active":n&&t.repo_id===n.repo_id&&t.path===n.path,"searched-dir":t.is_dir}),onClick:this.onClick,onDoubleClick:this.searchItemDoubleClick,children:[(0,d.jsx)("td",{className:"text-center searched-item-icon",children:t.is_dir?(0,d.jsx)("span",{className:"icon sf3-font sf3-font-folder tree-node-icon"}):(0,d.jsx)("img",{className:"item-img",src:c.Aq.getFileIconUrl(t.name),alt:"",width:"24"})}),(0,d.jsx)("td",{className:"searched-item-link",children:(0,d.jsxs)("span",{className:"item-link",children:[t.repo_name,"/",t.link_content]})})]})}}])}(s.Component),h=p,f=function(e){function t(e){var n;return(0,r.A)(this,t),(n=(0,a.A)(this,t,[e])).handleKeyDown=function(e){var t=n.props.searchResults,r=n.state.currentIndex;if("ArrowDown"===e.key){var i=(r+1)%t.length;n.setState({currentItem:t[i],currentIndex:i})}else if("ArrowUp"===e.key){var a=(r-1+t.length)%t.length;n.setState({currentItem:t[a],currentIndex:a})}else"Enter"===e.key&&(n.onItemClick(t[r],r),n.props.onSearchedItemDoubleClick(t[r]))},n.onItemClick=function(e,t){n.setState({currentItem:e,currentIndex:t}),n.props.onItemClick(e)},n.state={currentItem:e.searchResults.length>0?e.searchResults[0]:null,currentIndex:e.searchResults.length>0?0:-1},n.itemRef=s.createRef(),n}return(0,o.A)(t,e),(0,i.A)(t,[{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"render",value:function(){var e=this;return(0,d.jsxs)("table",{className:"table-thead-hidden file-chooser-table",rules:"node",frame:"void",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{width:"8%"}),(0,d.jsx)("th",{width:"92%"})]})}),(0,d.jsx)("tbody",{children:this.props.searchResults.map((function(t,n){return(0,d.jsx)(h,{ref:e.itemRef,item:t,currentItem:e.state.currentItem,onItemClick:function(){return e.onItemClick(t,n)},onSearchedItemDoubleClick:e.props.onSearchedItemDoubleClick,initToShowChildren:!1},n)}))})]})}}])}(s.Component)},81009:function(e,t,n){"use strict";n.d(t,{z:function(){return d},A:function(){return p}});var r=n(5544),i=n(9950),a=n(85077),o=n(40326),s=n(97011),u=n(47089),l=n(13042),c=n(44414),d={LOADING:"loading",RESULTS:"results"},p=function(e){var t=e.onUpdateMode,n=e.onUpdateSearchStatus,p=e.onUpdateSearchResults,h=e.onClose,f=(0,i.useState)(""),m=(0,r.A)(f,2),g=m[0],v=m[1],y=(0,i.useRef)(null),_=(0,i.useRef)(null),b=(0,i.useRef)(null);(0,i.useEffect)((function(){var e=function(e){y.current&&!y.current.contains(e.target)&&""===g&&h()};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[g,h]);var w=(0,i.useCallback)((function(e){b.current&&b.current.cancel("prev request is cancelled"),b.current=s.e.getSource(),s.e.searchFiles(e,b.current.token).then((function(e){n(d.RESULTS),p(e.data.total?k(e.data.results):[]),b.current=null})).catch((function(e){b.current=null}))}),[n,p]),T=(0,i.useCallback)((function(e){var t=e.target.value.trim();if(v(t),0!==t.length){n(d.LOADING);var r={q:t,search_repo:"all",search_ftypes:"all",obj_type:"dir"};_&&clearTimeout(_.current),_.current=setTimeout((function(){w(r)}),500)}else p([])}),[n,p,w]),k=function(e){for(var t=[],n=e.length>10?10:e.length,r=0;r<n;r++)t[r]={},t[r].index=[r],t[r].name=e[r].name,t[r].path=e[r].fullpath,t[r].repo_id=e[r].repo_id,t[r].repo_name=e[r].repo_name,t[r].is_dir=e[r].is_dir,t[r].link_content=decodeURI(e[r].fullpath).substring(1),t[r].content=e[r].content_highlight;return t},S=(0,i.useCallback)((function(e){e.stopPropagation(),"Enter"===e.key&&g.trim().length>0&&t(l.wY.SEARCH_RESULTS)}),[g,t]),E=(0,i.useCallback)((function(){v(""),h()}),[h]);return(0,c.jsx)("div",{className:"search-container file-chooser-searcher",style:{zIndex:u.X7},children:(0,c.jsxs)("div",{className:"search-input-container",children:[(0,c.jsx)("i",{className:"search-icon-left input-icon-addon sf3-font sf3-font-search"}),(0,c.jsx)(a.A,{innerRef:y,className:"search-input",placeholder:(0,o.AP)("Search"),type:"text",value:g,onChange:T,onKeyDown:S,autoFocus:!0}),0!==g.length&&(0,c.jsx)("span",{className:"search-control attr-action-icon sf3-font sf3-font-x-01",onClick:E})]})})}},81446:function(e,t,n){"use strict";n(9950);var r=n(44414);t.A=function(){return(0,r.jsx)("span",{className:"loading-icon loading-tip"})}},15167:function(e,t,n){"use strict";var r=n(23029),i=n(92901),a=n(39874),o=n(85501),s=n(9950),u=n(40326),l=n(44414),c=window.shared.pageOptions,d=c.err,p=c.trafficOverLimit,h=c.zipped,f=c.filePath,m=c.canDownload,g=function(e){function t(){return(0,r.A)(this,t),(0,a.A)(this,t,arguments)}return(0,o.A)(t,e),(0,i.A)(t,[{key:"render",value:function(){var e;e="File preview unsupported"==d?(0,l.jsx)("p",{children:(0,u.AP)("Online view is not applicable to this file format")}):(0,l.jsx)("p",{className:"error",children:d||this.props.errorMsg});var t=m&&!p;return(0,l.jsx)("div",{className:"shared-file-view-body",children:(0,l.jsxs)("div",{className:"file-view-tip ".concat(t?"":"pt-7"),children:[e,t&&(0,l.jsx)("a",{href:"?".concat(h?"p="+encodeURIComponent(f)+"&":"","dl=1"),className:"btn btn-secondary",children:(0,u.AP)("Download")})]})})}}])}(s.Component);t.A=g},88204:function(e,t,n){"use strict";n.d(t,{A:function(){return X}});var r,i=n(23029),a=n(92901),o=n(39874),s=n(85501),u=n(9950),l=n(51925),c=n(40326),d=n(18849),p=n(65604),h=n(58195),f=n(14113),m=n(99308),g=n(76115),v=n(85907),y=n(97011),_=n(22695),b=n(44414),w=function(e){function t(e){var n;return(0,i.A)(this,t),(n=(0,o.A)(this,t,[e])).onSaveSharedFile=function(){var e=n.props,t=e.sharedToken,r=e.filePath;y.e.saveSharedFile(n.state.repo.repo_id,n.state.selectedPath,t,r).then((function(e){n.props.toggleCancel(),n.props.handleSaveSharedFile()})).catch((function(e){var t=p.Aq.getErrorMsg(e);n.setState({errMessage:t})}))},n.onDirentItemClick=function(e,t,r){"dir"===r.type?n.setState({repo:e,selectedPath:t}):n.setState({repo:null,selectedPath:""})},n.onRepoItemClick=function(e){n.setState({repo:e,selectedPath:"/"})},n.state={repo:null,selectedPath:"",errMessage:""},n}return(0,s.A)(t,e),(0,a.A)(t,[{key:"render",value:function(){return(0,b.jsxs)(h.A,{isOpen:!0,className:"sf-save-file",children:[(0,b.jsx)(f.A,{toggle:this.props.toggleCancel,children:(0,c.AP)("Save to:")}),(0,b.jsxs)(m.A,{children:[(0,b.jsx)(_.A,{isShowFile:!1,onDirentItemClick:this.onDirentItemClick,onRepoItemClick:this.onRepoItemClick,mode:"only_all_repos"}),this.state.errMessage&&(0,b.jsx)(g.A,{color:"danger",children:this.state.errMessage})]}),(0,b.jsxs)(v.A,{children:[(0,b.jsx)(d.A,{color:"secondary",onClick:this.props.toggleCancel,children:(0,c.AP)("Cancel")}),this.state.selectedPath?(0,b.jsx)(d.A,{color:"primary",onClick:this.onSaveSharedFile,children:(0,c.AP)("Submit")}):(0,b.jsx)(d.A,{color:"primary",disabled:!0,children:(0,c.AP)("Submit")})]})]})}}])}(u.Component),T=w,k=n(19247),S=n(76152),E=n(55627),C=n(85077),A=n(4086),x=function(e){function t(e){var n;return(0,i.A)(this,t),(n=(0,o.A)(this,t,[e])).onAbuseReport=function(){n.state.reporter?y.e.addAbuseReport(n.props.sharedToken,n.state.abuseType,n.state.description,n.state.reporter,n.props.filePath).then((function(e){n.props.toggleAddAbuseReportDialog(),A.A.success((0,c.AP)("Abuse report added"),{duration:2})})).catch((function(e){e.response&&n.setState({errMessage:e.response.data.error_msg})})):n.setState({errMessage:(0,c.AP)("Contact information is required.")})},n.onAbuseTypeChange=function(e){var t=e.target.value;t!==n.state.abuseType&&n.setState({abuseType:t})},n.setReporter=function(e){var t=e.target.value.trim();n.setState({reporter:t})},n.setDescription=function(e){var t=e.target.value.trim();n.setState({description:t})},n.state={abuseType:"copyright",description:"",reporter:n.props.contactEmail,errMessage:""},n}return(0,s.A)(t,e),(0,a.A)(t,[{key:"render",value:function(){var e=this;return(0,b.jsxs)(h.A,{isOpen:this.props.isAddAbuseReportDialogOpen,toggle:this.props.toggleAddAbuseReportDialog,children:[(0,b.jsx)(f.A,{toggle:this.props.toggleAddAbuseReportDialog,children:(0,c.AP)("Report Abuse")}),(0,b.jsxs)(m.A,{children:[(0,b.jsxs)(k.A,{children:[(0,b.jsxs)(S.A,{children:[(0,b.jsx)(E.A,{for:"abuse-type-select",children:(0,c.AP)("Abuse Type")}),(0,b.jsxs)(C.A,{type:"select",id:"abuse-type-select",onChange:function(t){return e.onAbuseTypeChange(t)},children:[(0,b.jsx)("option",{value:"copyright",children:(0,c.AP)("Copyright Infringement")}),(0,b.jsx)("option",{value:"virus",children:(0,c.AP)("Virus")}),(0,b.jsx)("option",{value:"abuse_content",children:(0,c.AP)("Abuse Content")}),(0,b.jsx)("option",{value:"other",children:(0,c.AP)("Other")})]})]}),(0,b.jsxs)(S.A,{children:[(0,b.jsx)(E.A,{children:(0,c.AP)("Contact Information")}),(0,b.jsx)(C.A,{type:"text",value:this.state.reporter,onChange:function(t){return e.setReporter(t)}})]}),(0,b.jsxs)(S.A,{children:[(0,b.jsx)(E.A,{children:(0,c.AP)("Description")}),(0,b.jsx)(C.A,{type:"textarea",onChange:function(t){return e.setDescription(t)}})]})]}),this.state.errMessage&&(0,b.jsx)(g.A,{color:"danger",children:this.state.errMessage})]}),(0,b.jsxs)(v.A,{children:[(0,b.jsx)(d.A,{color:"secondary",onClick:this.props.toggleAddAbuseReportDialog,children:(0,c.AP)("Cancel")}),(0,b.jsx)(d.A,{color:"primary",onClick:this.onAbuseReport,children:(0,c.AP)("Submit")})]})]})}}])}(u.Component),P=n(47838),I=n.n(P),O=window.app.pageOptions.name,R=window.app.pageOptions.contactEmail,L=window.shared.pageOptions,N=L.sharedToken,D=L.trafficOverLimit,M=L.fileName,U=L.fileSize,F=L.sharedBy,j=L.siteName,B=L.enableWatermark,q=L.canDownload,H=L.zipped,z=L.filePath,V=L.enableShareLinkReportAbuse,W=L.sharedFileDownloadURL,G=function(e){function t(e){var n;return(0,i.A)(this,t),(n=(0,o.A)(this,t,[e])).handleSaveSharedFileDialog=function(){n.setState({showSaveSharedFileDialog:!0})},n.toggleCancel=function(){n.setState({showSaveSharedFileDialog:!1})},n.handleSaveSharedFile=function(){A.A.success((0,c.AP)("Successfully saved"),{duration:3})},n.toggleAddAbuseReportDialog=function(){n.setState({isAddAbuseReportDialogOpen:!n.state.isAddAbuseReportDialogOpen})},n.renderPath=function(){return(0,b.jsxs)(u.Fragment,{children:[H.map((function(e,t){return t!=H.length-1?(0,b.jsxs)(u.Fragment,{children:[(0,b.jsx)("a",{className:"text-truncate mx-1",href:"".concat(c.Yc,"d/").concat(N,"/?p=").concat(encodeURIComponent(e.path)),title:e.name,children:e.name}),(0,b.jsx)("span",{children:" / "})]},t):null})),(0,b.jsx)("span",{className:"text-truncate ml-1",title:H[H.length-1].name,children:H[H.length-1].name})]})},n.state={showSaveSharedFileDialog:!1,isAddAbuseReportDialogOpen:!1},n}return(0,s.A)(t,e),(0,a.A)(t,[{key:"componentDidMount",value:function(){var e=p.Aq.getFileIconUrl(M);document.getElementById("favicon").href=e,D&&A.A.danger((0,c.AP)("File download is disabled: the share link traffic of owner is used up."),{duration:3}),q||(document.addEventListener("contextmenu",(function(e){return e.preventDefault(),!1})),document.addEventListener("keydown",(function(e){if((e.ctrlKey||e.metaKey)&&(83==e.which||80==e.which||65==e.which||67==e.which))return e.preventDefault(),e.stopPropagation(),!1})))}},{key:"render",value:function(){var e=this.props.fileType;return(0,b.jsxs)("div",{className:"shared-file-view-md",children:[(0,b.jsxs)("div",{className:"shared-file-view-md-header d-flex",children:[(0,b.jsx)(u.Fragment,{children:(0,b.jsx)("a",{href:c.Yc,children:(0,b.jsx)("img",{src:c.SG+c.VI,height:c.hM,width:c.gA,title:c.q0,alt:"logo"})})}),O&&(0,b.jsx)(l.A,{})]}),(0,b.jsxs)("div",{className:"shared-file-view-md-main",children:[(0,b.jsxs)("div",{className:"shared-file-view-head ".concat("md"==e||"pdf"==e?"w-100 px-4":""),children:[(0,b.jsxs)("div",{className:"text-truncate",children:[(0,b.jsx)("h2",{className:"ellipsis",title:M,children:M}),H?(0,b.jsxs)("p",{className:"m-0 d-flex",children:[(0,c.AP)("Current path: "),this.renderPath()]}):(0,b.jsxs)("p",{className:"share-by ellipsis",children:[(0,c.AP)("Shared by:")," ",F]})]}),(0,b.jsxs)("div",{className:"flex-shrink-0 ml-4",children:[q&&O&&O!==F&&(0,b.jsx)(d.A,{color:"secondary",id:"save",onClick:this.handleSaveSharedFileDialog,children:(0,c.AP)("Save as ...")})," ",q&&!D&&(0,b.jsxs)("a",{href:"".concat(H?"?p="+encodeURIComponent(z)+"&dl=1":W),className:"btn btn-success",children:[(0,c.AP)("Download")," (",p.Aq.bytesToSize(U),")"]})," ",V&&O!==F&&(0,b.jsx)(d.A,{onClick:this.toggleAddAbuseReportDialog,children:(0,c.AP)("Report Abuse")})]})]}),this.props.content]}),this.state.showSaveSharedFileDialog&&(0,b.jsx)(T,{sharedToken:N,filePath:H?z:"",toggleCancel:this.toggleCancel,handleSaveSharedFile:this.handleSaveSharedFile}),this.state.isAddAbuseReportDialogOpen&&V&&(0,b.jsx)(x,{sharedToken:N,filePath:z,toggleAddAbuseReportDialog:this.toggleAddAbuseReportDialog,isAddAbuseReportDialogOpen:this.state.isAddAbuseReportDialogOpen,contactEmail:R})]})}}])}(u.Component);B&&(r=O?j+" "+O:F?j+" "+F:(0,c.AP)("Anonymous User"),I().init({watermark_txt:r,watermark_alpha:.075}));var X=G},4086:function(e,t,n){"use strict";n.d(t,{A:function(){return k}});var r=n(89379),i=n(92901),a=n(23029),o=n(9950),s=n(17119),u=n(80045),l=n(60436),c=n(24765),d=n(39874),p=n(85501),h=n(29357),f=n(44414),m=function(e){function t(){return(0,a.A)(this,t),(0,d.A)(this,t,arguments)}return(0,p.A)(t,e),(0,i.A)(t,[{key:"getIconClass",value:function(e){switch(e){case"success":default:return"sf3-font sf3-font-check-circle";case"warning":return"sf3-font sf3-font-exclamation-triangle";case"none":case"danger":return"sf3-font sf3-font-exclamation-circle";case"notify-in-progress":return"loading-icon"}}},{key:"render",value:function(){var e=this.props,t=e.intent,n=e.title,r=e.children,i=e.isRemovable,a=e.onRemove,o=this.getIconClass(t);return(0,f.jsxs)("div",{className:"seahub-toast-alert-container ".concat(t||"success"),children:[(0,f.jsx)("div",{className:"toast-alert-icon",children:(0,f.jsx)("i",{className:o})}),(0,f.jsxs)("div",{className:"toast-text-container",children:[(0,f.jsx)("p",{className:"toast-text-title",children:n}),r?(0,f.jsx)("p",{className:"toast-text-child",children:r}):null]}),i&&(0,f.jsx)("div",{onClick:a,className:"toast-close",children:(0,f.jsx)("span",{children:"\xd7"})})]})}}])}(o.PureComponent),g=m,v=function(e){function t(){var e;(0,a.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,d.A)(this,t,[].concat(r)))._isMounted=!1,e.state={isShown:!0},e.containerRef=o.createRef(),e.close=function(t){t&&(t.nativeEvent.stopImmediatePropagation(),t.stopPropagation()),e.clearCloseTimer(),e._isMounted&&e.setState({isShown:!1})},e.startCloseTimer=function(){e.props.duration&&(e.closeTimer=setTimeout((function(){e.close()}),1e3*e.props.duration))},e.clearCloseTimer=function(){e.closeTimer&&(clearTimeout(e.closeTimer),e.closeTimer=null)},e.handleMouseEnter=function(){e.clearCloseTimer()},e.handleMouseLeave=function(){e.startCloseTimer()},e.onRef=function(t){null!==t&&setTimeout((function(){var n=t.getBoundingClientRect().height;e.containerRef.current.style.height=n+"px"}),1)},e}return(0,p.A)(t,e),(0,i.A)(t,[{key:"componentDidUpdate",value:function(e){e.isShown!==this.props.isShown&&this.setState({isShown:this.props.isShown})}},{key:"componentDidMount",value:function(){this._isMounted=!0,this.startCloseTimer()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.clearCloseTimer()}},{key:"render",value:function(){var e=this;return(0,f.jsx)(h.default,{appear:!0,unmountOnExit:!0,timeout:240,in:this.state.isShown,onExited:this.props.onRemove,children:function(t){return(0,f.jsx)("div",{"data-state":t,className:"seahub-toast-container ".concat(t),onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,style:{zIndex:e.props.zIndex},ref:e.containerRef,children:(0,f.jsx)("div",{ref:e.onRef,style:{padding:8},children:(0,f.jsx)(g,{intent:e.props.intent,title:e.props.title,children:e.props.children||"",isRemovable:e.props.hasCloseButton,onRemove:function(t){return e.close(t)}})})})}})}}])}(o.PureComponent);v.defaultProps={intent:"none"};var y=["id","description"],_=function(e){return Object.hasOwnProperty.call(e,"id")},b=function(e){function t(e,n){var i;return(0,a.A)(this,t),(i=(0,d.A)(this,t,[e,n])).getToasts=function(){return i.state.toasts},i.closeAll=function(){i.getToasts().forEach((function(e){return e.close()}))},i.notify=function(e,t){if(_(t)){var n,r=(0,c.A)(i.state.toasts);try{for(r.s();!(n=r.n()).done;){var a=n.value;String(a.id).startsWith(t.id)&&i.closeToast(a.id)}}catch(s){r.e(s)}finally{r.f()}}var o=i.createToastInstance(e,t);return i.setState((function(e){return{toasts:[o].concat((0,l.A)(e.toasts))}})),o},i.createToastInstance=function(e,n){var r=++t.idCounter,a=_(n)?"".concat(n.id,"-").concat(r):r,o=n.hasCloseButton||!0,s=n.duration||2;return void 0!==n.hasCloseButton&&(o=n.hasCloseButton),void 0!==n.duration&&(s=n.duration),{id:a,title:e,description:n.description,hasCloseButton:o,duration:s,close:function(){return i.closeToast(a)},intent:n.intent}},i.closeToast=function(e){i.setState((function(t){return{toasts:t.toasts.map((function(t){return t.id===e?(0,r.A)((0,r.A)({},t),{},{isShown:!1}):t}))}}))},i.removeToast=function(e){i.setState((function(t){return{toasts:t.toasts.filter((function(t){return t.id!==e}))}}))},e.bindNotify(i.notify),e.bindGetToasts(i.getToasts),e.bindCloseAll(i.closeAll),i.state={toasts:[]},i}return(0,p.A)(t,e),(0,i.A)(t,[{key:"render",value:function(){var e=this;return(0,f.jsx)("div",{className:"seahub-toast-manager",children:this.state.toasts.map((function(t){var n=t.id,i=t.description,a=(0,u.A)(t,y);return(0,f.jsx)(v,(0,r.A)((0,r.A)({onRemove:function(){return e.removeToast(n)}},a),{},{children:i}),n)}))})}}])}(o.PureComponent);b.idCounter=0;var w="undefined"!==typeof window&&"undefined"!==typeof window.document,T=(0,i.A)((function e(){var t=this;if((0,a.A)(this,e),this._bindNotify=function(e){t.notifyHandler=e},this._bindGetToasts=function(e){t.getToastsHandler=e},this._bindCloseAll=function(e){t.closeAllHandler=e},this.getToasts=function(){return t.getToastsHandler()},this.closeAll=function(){return t.closeAllHandler()},this.notify=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.notifyHandler(e,(0,r.A)((0,r.A)({},n),{},{intent:"none"}))},this.notifyInProgress=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.notifyHandler(e,(0,r.A)((0,r.A)({},n),{},{intent:"notify-in-progress"}))},this.success=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.notifyHandler(e,(0,r.A)((0,r.A)({},n),{},{intent:"success"}))},this.warning=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.notifyHandler(e,(0,r.A)((0,r.A)({},n),{},{intent:"warning"}))},this.danger=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.notifyHandler(e,(0,r.A)((0,r.A)({},n),{},{intent:"danger"}))},w){var n=document.createElement("div");n.setAttribute("data-evergreen-toaster-container",""),document.body.appendChild(n),s.render((0,f.jsx)(b,{bindNotify:this._bindNotify,bindGetToasts:this._bindGetToasts,bindCloseAll:this._bindCloseAll}),n)}})),k=new T},25547:function(e,t,n){"use strict";n.d(t,{A:function(){return d}});var r=n(23029),i=n(92901),a=n(65604),o=n(60436),s=n(56044),u=function(){function e(){(0,r.A)(this,e),this.root=null}return(0,i.A)(e,[{key:"clone",value:function(){var t=new e;return this.root&&(t.root=this.root.clone()),t}},{key:"setRoot",value:function(e){this.root=e}},{key:"getNodeByPath",value:function(e){var t=null;return this.traverseDF((function(n){return n.path===e&&(t=n,!0)})),t}},{key:"getNodeChildrenObject",value:function(e){return e.children.map((function(e){return e.object}))}},{key:"addNodeToParent",value:function(e,t){t.addChild(e)}},{key:"addNodeListToParent",value:function(e,t){e.forEach((function(e){t.addChild(e)}))}},{key:"deleteNode",value:function(e){this.getNodeByPath(e.parentNode.path).deleteChild(e)}},{key:"deleteNodeList",value:function(e){var t=this;e.forEach((function(e){t.deleteNode(e)}))}},{key:"renameNode",value:function(e,t){e.rename(t)}},{key:"updateNode",value:function(e,t,n){e.updateObjectParam(t,n)}},{key:"moveNode",value:function(e,t){this.deleteNode(e),t.addChild(e)}},{key:"copyNode",value:function(e,t){t.addChild(e)}},{key:"traverseDF",value:function(e){var t=[],n=!1;t.unshift(this.root);for(var r=t.shift();!n&&r;)(n=1==e(r))||(t.unshift.apply(t,(0,o.A)(r.children)),r=t.shift())}},{key:"traverseBF",value:function(e){var t=[],n=!1;t.push(this.root);for(var r=t.shift();!n&&r;)(n=!0===e(r))||(t.push.apply(t,(0,o.A)(r.children)),r=t.shift())}},{key:"expandNode",value:function(e){for(e.isExpanded=!0;e.parentNode;)e.parentNode.isExpanded=!0,e=e.parentNode}},{key:"collapseNode",value:function(e){e.isExpanded=!1}},{key:"isNodeChild",value:function(e,t){return t.children.some((function(t){return t.path===e.path}))}},{key:"serializeToJson",value:function(){return this.root.serializeToJson()}},{key:"deserializefromJson",value:function(t){var n=s.A.deserializefromJson(t),r=new e;return r.setRoot(n),r}}])}(),l=n(84878),c=function(){return(0,i.A)((function e(){(0,r.A)(this,e)}),[{key:"expandNode",value:function(e,t){e.expandNode(t)}},{key:"collapseNode",value:function(e,t){var n=e.clone();return t=n.getNodeByPath(t.path),n.collapseNode(t),n}},{key:"findNodeByPath",value:function(e,t){return e.clone().getNodeByPath(t)}},{key:"getNodeChildrenObject",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"name",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"asc",i=e.getNodeChildrenObject(t);return i=a.Aq.sortDirents(i,n,r)}},{key:"addNodeToParent",value:function(e,t,n){return e.addNodeToParentNode(t,n),e}},{key:"addNodeListToParent",value:function(e,t,n){return e.addNodeListToParent(t,n),e}},{key:"addNodeToParentByPath",value:function(e,t,n){var r=e.clone(),i=r.getNodeByPath(n);return r.addNodeToParent(t,i),r}},{key:"deleteNodeByPath",value:function(e,t){var n=e.clone(),r=n.getNodeByPath(t);return r&&n.deleteNode(r),n}},{key:"deleteNodeListByPaths",value:function(e,t){var n=e.clone();return t.forEach((function(e){var t=n.getNodeByPath(e);t&&n.deleteNode(t)})),n}},{key:"renameNodeByPath",value:function(e,t,n){var r=e.clone(),i=r.getNodeByPath(t);return i?(r.renameNode(i,n),r):r}},{key:"updateNodeByPath",value:function(e,t,n,r){var i=e.clone(),a=i.getNodeByPath(t);return i.updateNode(a,n,r),i}},{key:"moveNodeByPath",value:function(e,t,n,r){var i=e.clone(),a=i.getNodeByPath(t),o=i.getNodeByPath(n);return o&&a&&(a.object.name=r,i.moveNode(a,o)),!o&&a&&i.deleteNode(a),i}},{key:"moveNodeListByPaths",value:function(e,t,n){var r=e.clone(),i=r.getNodeByPath(n);return i?t.forEach((function(e){var t=r.getNodeByPath(e);r.moveNode(t,i)})):t.forEach((function(e){var t=r.getNodeByPath(e);r.delete(t)})),r}},{key:"copyNodeByPath",value:function(e,t,n,r){var i=e.clone(),a=i.getNodeByPath(n),o=i.getNodeByPath(t);if(a){var s=o.clone();s.object.name=r,i.copyNode(s,a)}return i}},{key:"copyNodeListByPaths",value:function(e,t,n){var r=e.clone(),i=r.getNodeByPath(n);return i&&t.forEach((function(e){var t=r.getNodeByPath(e);r.copyNode(t,i)})),r}},{key:"buildTree",value:function(){var e=new u,t=new l.A({name:"/"}),n=new s.A({object:t,isLoaded:!1,isExpanded:!0});return e.setRoot(n),e}}])}(),d=new c},56044:function(e,t,n){"use strict";var r=n(23029),i=n(92901),a=function(){function e(t){var n=t.path,i=t.object,a=t.isLoaded,o=t.isPreload,s=t.isExpanded,u=t.parentNode;(0,r.A)(this,e),this.path=n||i.name,this.object=i,this.isLoaded=a||!1,this.isPreload=o||!1,this.isExpanded=s||!1,this.children=[],this.parentNode=u||null}return(0,i.A)(e,[{key:"clone",value:function(t){var n=new e({path:this.path,object:this.object.clone(),isLoaded:this.isLoaded,isPreload:this.isPreload,isExpanded:this.isExpanded,parentNode:t||null});return n.children=this.children.map((function(e){return e.clone(n)})),n}},{key:"setParent",value:function(e){this.path=this.generatePath(e),this.parentNode=e,this.isLoaded=!1}},{key:"hasChildren",value:function(){return 0!==this.children.length}},{key:"addChild",value:function(e){e.setParent(this);var t=this.children;if(e.object.isDir())this.children.unshift(e);else{for(var n=-1,r=0;r<t.length;r++)if(!t[r].object.isDir()){n=r;break}-1===n?this.children.push(e):0===n?this.children.unshift(e):this.children.splice(n,0,e)}}},{key:"addChildren",value:function(e){var t=this;e.forEach((function(e){e.setParent(t)})),this.children=e}},{key:"deleteChild",value:function(e){var t=this.children.filter((function(t){return t!==e}));this.children=t}},{key:"rename",value:function(e){this.object.name=e,this.path=this.generatePath(this.parentNode),this.isExpanded?this.updateChildrenPath(this):this.isLoaded=!1}},{key:"updateChildrenPath",value:function(e){e.children.forEach((function(e){e.path=e.generatePath(e.parentNode),e.isExpanded?e.updateChildrenPath(e):e.isLoaded=!1}))}},{key:"updateObjectProperties",value:function(e,t){var n=this;Array.isArray(e)&&Array.isArray(t)?e.forEach((function(e,r){n.object[e]=t[r]})):this.object[e]=t}},{key:"generatePath",value:function(e){return"/"===e.path?e.path+this.object.name:e.path+"/"+this.object.name}},{key:"serializeToJson",value:function(){var e=[];return this.hasChildren&&(e=this.children.map((function(e){return e.serializeToJson()}))),{path:this.path,object:this.object.clone(),isLoaded:this.isLoaded,isPreload:this.isPreload,isExpanded:this.isExpanded,parentNode:this.parentNode,children:e}}}],[{key:"deserializefromJson",value:function(t){var n=t.path,r=t.object,i=t.isLoaded,a=t.isPreload,o=t.isExpanded,s=t.parentNode,u=t.children,l=void 0===u?[]:u;return new e({path:n,object:r=r.clone(),isLoaded:i,isPreload:a,isExpanded:o,parentNode:s,children:l.map((function(t){return e.deserializefromJson(t)}))})}}])}();t.A=a},22899:function(e,t,n){"use strict";var r=n(23029),i=n(92901),a=n(39874),o=n(85501),s=n(9950),u=n(13336),l=(n(37253),n(44414)),c=function(e){function t(){return(0,r.A)(this,t),(0,a.A)(this,t,arguments)}return(0,o.A)(t,e),(0,i.A)(t,[{key:"componentDidMount",value:function(){this.player=(0,u.A)(this.videoNode,this.props,(function(){}))}},{key:"componentWillUnmount",value:function(){this.player&&this.player.dispose()}},{key:"render",value:function(){var e=this;return(0,l.jsx)("div",{"data-vjs-player":!0,children:(0,l.jsx)("video",{ref:function(t){return e.videoNode=t},className:"video-js"})})}}])}(s.Component);t.A=c},13042:function(e,t,n){"use strict";n.d(t,{b1:function(){return l},cK:function(){return r},K$:function(){return u},wY:function(){return c},AT:function(){return i},xQ:function(){return o},R5:function(){return s},cj:function(){return a}});var r={Backspace:8,Tab:9,Enter:13,Shift:16,Ctrl:17,Alt:18,PauseBreak:19,CapsLock:20,Escape:27,Esc:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,LeftArrow:37,UpArrow:38,RightArrow:39,DownArrow:40,Insert:45,Delete:46,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,LeftWindowKey:91,RightWindowKey:92,SelectKey:93,NumPad0:96,NumPad1:97,NumPad2:98,NumPad3:99,NumPad4:100,NumPad5:101,NumPad6:102,NumPad7:103,NumPad8:104,NumPad9:105,Multiply:106,Add:107,Subtract:109,DecimalPoint:110,Divide:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F12:123,NumLock:144,ScrollLock:145,SemiColon:186,EqualSign:187,Comma:188,Dash:189,Period:190,ForwardSlash:191,GraveAccent:192,OpenBracket:219,BackSlash:220,CloseBracket:221,SingleQuote:222,ChineseInputMethod:229},i=(window.innerHeight,{FILE_EXTENDED_PROPERTIES:"__file_extended_properties",FACE_RECOGNITION:"__face_recognition"}),a=["#FBD44A","#EAA775","#F4667C","#DC82D2","#9860E5","#9F8CF1","#59CB74","#ADDF84","#89D2EA","#4ECCCB","#46A1FD","#C2C2C2"],o=71,s=28,u={B_MAP:"b_map",G_MAP:"g_map"},l=[u.B_MAP],c={CURRENT_AND_OTHER_REPOS:"current_repo_and_other_repos",ONLY_CURRENT_LIBRARY:"only_current_library",ONLY_ALL_REPOS:"only_all_repos",ONLY_OTHER_LIBRARIES:"only_other_libraries",RECENTLY_USED:"recently_used",SEARCH_RESULTS:"search_results"}},47089:function(e,t,n){"use strict";n.d(t,{V0:function(){return a},X7:function(){return s},bV:function(){return i},r:function(){return r},yH:function(){return o}});var r=2,i=2,a=3,o=1045,s=1046},84878:function(e,t,n){"use strict";var r=n(23029),i=n(92901),a=n(4159),o=n.n(a),s=n(37609),u=n.n(s),l=n(65604),c=n(67665);o().extend(u());var d=function(){function e(t){if((0,r.A)(this,e),this.id=t.id||"0000000000000000",this.name=t.name,this.type=t.type,this.mtime=t.mtime,t.mtime?this.mtime_relative=o().unix(t.mtime).fromNow():this.mtime_relative="",this.permission=t.permission||"rw",this.isSelected=!1,this.starred=t.starred||!1,"dir"===t.type&&(this.has_been_shared_out=!1),"file"===t.type){this.size_original=t.size_original||t.size,this.size="number"===typeof t.size?l.Aq.bytesToSize(t.size):t.size,this.is_locked=t.is_locked||!1,this.is_freezed=t.is_freezed||!1,this.lock_time=t.lock_time||"",this.lock_owner=t.lock_owner||null,this.lock_owner_name=t.lock_owner_name||null,this.locked_by_me=t.locked_by_me||!1,this.modifier_name=t.modifier_name||"",this.modifier_email=t.modifier_email||"",this.modifier_contact_email=t.modifier_contact_email||"";var n=[];t.file_tags&&(n=t.file_tags.map((function(e){return new c.A(e)}))),this.file_tags=n,t.encoded_thumbnail_src&&(this.encoded_thumbnail_src=t.encoded_thumbnail_src),l.Aq.isSdocFile(t.name)&&(this.is_sdoc_revision=t.is_sdoc_revision||!1,this.revision_id=t.revision_id||null)}}return(0,i.A)(e,[{key:"clone",value:function(){return new e(this)}},{key:"isDir",value:function(){return"file"!==this.type}}])}();t.A=d},67665:function(e,t,n){"use strict";var r=n(92901),i=n(23029),a=(0,r.A)((function e(t){(0,i.A)(this,e),this.id=t.file_tag_id,this.repo_tag_id=t.repo_tag_id,this.name=t.tag_name,this.color=t.tag_color}));t.A=a},89615:function(e,t,n){"use strict";var r=n(92901),i=n(23029),a=n(65604),o=(0,r.A)((function e(t){(0,i.A)(this,e),this.repo_id=t.repo_id,this.repo_name=t.repo_name,this.permission=t.permission,this.size=a.Aq.bytesToSize(t.size),this.file_count=t.file_count,this.owner_name=t.owner_name,this.owner_email=t.owner_email,this.owner_contact_email=t.owner_contact_email,this.owner_avatar=t.owner_avatar||"",this.is_admin=t.is_admin,this.is_virtual=t.is_virtual,this.no_quota=t.no_quota,this.has_been_shared_out=t.has_been_shared_out,this.encrypted=t.encrypted,this.lib_need_decrypt=t.lib_need_decrypt,this.last_modified=t.last_modified,this.status=t.status}));t.A=o},91:function(e,t,n){"use strict";var r=n(89379),i=n(23029),a=n(92901),o=n(39874),s=n(85501),u=n(9950),l=n(17119),c=n(88204),d=n(15167),p=n(22899),h=n(40326),f=(n(21936),n(44414)),m=window.shared.pageOptions,g=m.rawPath,v=m.err,y=m.fileExt,_=function(e){function t(){return(0,i.A)(this,t),(0,o.A)(this,t,arguments)}return(0,s.A)(t,e),(0,a.A)(t,[{key:"render",value:function(){return(0,f.jsx)(c.A,{content:(0,f.jsx)(b,{})})}}])}(u.Component),b=function(e){function t(){return(0,i.A)(this,t),(0,o.A)(this,t,arguments)}return(0,s.A)(t,e),(0,a.A)(t,[{key:"render",value:function(){if(v)return(0,f.jsx)(d.A,{});var e={autoplay:!1,controls:!0,preload:"auto",playbackRates:[.5,1,1.5,2],sources:[{src:g,type:h.Oo[y]||"video/mp4"}]};return(0,f.jsx)("div",{className:"shared-file-view-body d-flex",children:(0,f.jsx)("div",{className:"flex-1",children:(0,f.jsx)(p.A,(0,r.A)({},e))})})}}])}(u.Component);l.render((0,f.jsx)(_,{}),document.getElementById("wrapper"))},40326:function(e,t,n){"use strict";n.d(t,{$0:function(){return H},$6:function(){return a},$L:function(){return lt},$j:function(){return St},$z:function(){return Me},AP:function(){return r},B$:function(){return v},CJ:function(){return ve},DX:function(){return Oe},DY:function(){return Nt},E7:function(){return xe},EK:function(){return Je},EL:function(){return re},EU:function(){return nt},Ej:function(){return Ge},Et:function(){return oe},Ez:function(){return h},F1:function(){return Le},GC:function(){return qe},GF:function(){return ae},Gn:function(){return se},HF:function(){return Ye},HJ:function(){return ce},Hh:function(){return $e},II:function(){return Ze},IX:function(){return g},Id:function(){return at},Ih:function(){return I},Iw:function(){return Pt},JC:function(){return vt},Ji:function(){return Xe},Ky:function(){return K},L5:function(){return ie},LS:function(){return ct},Lp:function(){return It},M$:function(){return w},M8:function(){return Se},MT:function(){return Ot},Md:function(){return tt},Mj:function(){return we},Nz:function(){return Ae},OZ:function(){return $},Oo:function(){return Mt},Oq:function(){return mt},P9:function(){return pe},PA:function(){return Ie},PX:function(){return Be},Q7:function(){return We},QU:function(){return Y},QV:function(){return q},Qd:function(){return it},Qv:function(){return Ee},RF:function(){return U},Rf:function(){return he},SG:function(){return s},Sr:function(){return Dt},Tr:function(){return wt},Ts:function(){return Ne},UU:function(){return C},V6:function(){return Ke},VI:function(){return o},Vb:function(){return R},Wg:function(){return E},XH:function(){return ut},XV:function(){return Ct},Xh:function(){return x},YX:function(){return _e},Yc:function(){return i},Yi:function(){return M},ZD:function(){return Rt},_R:function(){return S},_s:function(){return P},a8:function(){return yt},aK:function(){return Pe},am:function(){return p},ay:function(){return Re},bH:function(){return dt},bd:function(){return A},bw:function(){return B},cN:function(){return He},cT:function(){return de},dq:function(){return le},eB:function(){return Lt},eg:function(){return fe},ep:function(){return D},er:function(){return Qe},ez:function(){return j},fY:function(){return N},gA:function(){return c},gV:function(){return Z},gj:function(){return V},gv:function(){return _t},hM:function(){return d},hP:function(){return xt},hf:function(){return be},hn:function(){return ye},i$:function(){return st},iD:function(){return ne},if:function(){return k},j9:function(){return J},jQ:function(){return W},jR:function(){return Et},jk:function(){return Ce},ju:function(){return At},kM:function(){return ee},lU:function(){return ke},ln:function(){return ze},m$:function(){return Tt},mz:function(){return ot},n5:function(){return bt},n6:function(){return pt},nV:function(){return Fe},o6:function(){return De},oC:function(){return ue},oI:function(){return Ve},oi:function(){return X},ol:function(){return Q},p8:function(){return Te},pP:function(){return O},pu:function(){return l},pv:function(){return Ue},q0:function(){return u},q5:function(){return f},r8:function(){return G},s$:function(){return et},s4:function(){return kt},sO:function(){return T},sh:function(){return ht},si:function(){return y},uQ:function(){return ge},vV:function(){return m},vX:function(){return rt},vf:function(){return te},vn:function(){return me},w4:function(){return gt},wA:function(){return ft},wR:function(){return F},wg:function(){return b},xF:function(){return z},xW:function(){return _},yR:function(){return je},zn:function(){return L}});var r=window.gettext,i=window.app.config.siteRoot,a=window.app.config.loginUrl,o=(window.app.config.avatarInfo,window.app.config.logoPath),s=window.app.config.mediaUrl,u=window.app.config.siteTitle,l=window.app.config.siteName,c=window.app.config.logoWidth,d=window.app.config.logoHeight,p="True"===window.app.config.isPro,h=window.app.config.isDBSqlite3,f="True"===window.app.config.isDocs,m=window.app.config.lang,g=window.app.config.fileServerRoot,v=window.app.config.useGoFileserver,y=window.app.config.seafileVersion,_=window.app.config.serviceURL,b=window.app.config.avatarURL,w=window.app.config.faviconPath,T=window.app.config.loginBGPath,k=window.app.config.enableRepoAutoDel,S=window.app.pageOptions.trashReposExpireDays,E=window.app.pageOptions.seafileCollabServer,C=window.app.pageOptions.name,A=window.app.pageOptions.contactEmail,x=window.app.pageOptions.username,P=window.app.pageOptions.canAddRepo,I=window.app.pageOptions.canShareRepo,O=window.app.pageOptions.canAddGroup,R=window.app.pageOptions.groupImportMembersExtraMsg,L=window.app.pageOptions.canGenerateShareLink,N=window.app.pageOptions.canGenerateUploadLink,D=window.app.pageOptions.canSendShareLinkEmail,M="True"===window.app.pageOptions.canViewOrg,U=window.app.pageOptions.fileAuditEnabled,F=window.app.pageOptions.folderPermEnabled,j="True"===window.app.pageOptions.enableResetEncryptedRepoPassword,B="True"===window.app.pageOptions.isEmailConfigured,q=(window.app.pageOptions.enableUploadFolder,window.app.pageOptions.enableResumableFileUpload,window.app.pageOptions.resumableUploadFileBlockSize),H=window.app.pageOptions.storages,z=window.app.pageOptions.libraryTemplates,V=window.app.pageOptions.enableRepoSnapshotLabel,W=window.app.pageOptions.shareLinkForceUsePassword,G=window.app.pageOptions.shareLinkPasswordMinLength,X=window.app.pageOptions.shareLinkPasswordStrengthLevel,K=window.app.pageOptions.shareLinkExpireDaysMin,$=window.app.pageOptions.shareLinkExpireDaysMax,Y=window.app.pageOptions.sideNavFooterCustomHtml,Q=window.app.pageOptions.aboutDialogCustomHtml,J=window.app.pageOptions.shareLinkExpireDaysDefault,Z=window.app.pageOptions.uploadLinkExpireDaysMin,ee=window.app.pageOptions.uploadLinkExpireDaysMax,te=window.app.pageOptions.uploadLinkExpireDaysDefault,ne=window.app.pageOptions.enableShareToDepartment,re=(window.app.pageOptions.maxFileName,window.app.pageOptions.canPublishRepo),ie=window.app.pageOptions.enableEncryptedLibrary,ae=window.app.pageOptions.enableRepoHistorySetting,oe=window.app.pageOptions.enableUserCleanTrash,se=window.app.pageOptions.isSystemStaff,ue=window.app.pageOptions.thumbnailSizeForOriginal,le=window.app.pageOptions.thumbnailDefaultSize,ce=window.app.pageOptions.thumbnailSizeForGrid,de=window.app.pageOptions.repoPasswordMinLength,pe=window.app.pageOptions.canAddPublicRepo,he=window.app.pageOptions.canInvitePeople,fe=window.app.pageOptions.canLockUnlockFile,me=window.app.pageOptions.customNavItems,ge=window.app.pageOptions.enableShowContactEmailWhenSearchUser,ve=window.app.pageOptions.enableShowLoginIDWhenSearchUser,ye=window.app.pageOptions.maxUploadFileSize,_e=window.app.pageOptions.maxNumberOfFilesForFileupload,be=window.app.pageOptions.enableOCM,we=window.app.pageOptions.ocmRemoteServers,Te=(window.app.pageOptions.enableOCMViaWebdav,window.app.pageOptions.enableSSOToThirdpartWebsite),ke=window.app.pageOptions.enableSeadoc,Se=window.app.pageOptions.curNoteMsg,Ee=window.app.pageOptions.curNoteID,Ce=window.app.pageOptions.enableTC,Ae=window.app.pageOptions.enableVideoThumbnail,xe=window.app.pageOptions.enablePDFThumbnail,Pe=window.app.pageOptions.enableOnlyoffice||!1,Ie=window.app.pageOptions.onlyofficeConverterExtensions||[],Oe=window.app.pageOptions.enableFileTags||!1,Re=window.app.pageOptions.enableShowAbout||!1,Le=(window.app.pageOptions.workspaceID,window.app.pageOptions.showLogoutIcon),Ne=window.app.pageOptions.additionalShareDialogNote,De=window.app.pageOptions.additionalAboutDialogLinks,Me=window.app.pageOptions.baiduMapKey,Ue=window.app.pageOptions.googleMapKey,Fe=window.app.pageOptions.googleMapId,je=(window.app.pageOptions.mineMapKey,window.wiki?window.wiki.config.slug:""),Be=window.wiki?window.wiki.config.wikiId:"",qe=window.wiki?window.wiki.config.repoId:"",He=window.wiki?window.wiki.config.initial_path:"",ze=window.wiki?"True"===window.wiki.config.permission:"",Ve=window.wiki?window.wiki.config.permission:"",We=window.wiki?window.wiki.config.isDir:"",Ge=(window.wiki&&window.wiki.config.serviceUrl,window.wiki?"True"===window.wiki.config.isPublicWiki:""),Xe=window.wiki?window.wiki.config.sharedToken:"",Ke=(window.wiki&&window.wiki.config.sharedType,window.wiki?window.wiki.config.hasIndex:""),$e=window.wiki?window.wiki.config.assetsUrl:"",Ye=!!window.wiki&&window.wiki.config.isWiki2,Qe=window.wiki?window.wiki.config.seadocServerUrl:"",Je=(window.wiki&&window.wiki.config.seadocAccessToken,25),Ze=window.fileHistory?window.fileHistory.pageOptions.repoID:"",et=(window.fileHistory&&window.fileHistory.pageOptions.repoName,window.fileHistory?window.fileHistory.pageOptions.filePath:""),tt=window.fileHistory?window.fileHistory.pageOptions.fileName:"",nt=window.fileHistory?window.fileHistory.pageOptions.use_new_api:"",rt=window.fileHistory?window.fileHistory.pageOptions.can_download_file:"",it=window.fileHistory?window.fileHistory.pageOptions.can_compare:"",at=window.org?window.org.pageOptions.orgID:"",ot=(window.org&&window.org.pageOptions.orgName,window.org?window.org.pageOptions.invitationLink:""),st=window.org?window.org.pageOptions.orgMemberQuotaEnabled:"",ut=!!window.org&&"True"===window.org.pageOptions.orgEnableAdminCustomLogo,lt=!!window.org&&"True"===window.org.pageOptions.orgEnableAdminCustomName,ct=!!window.org&&"True"===window.org.pageOptions.orgEnableAdminInviteUser,dt=!!window.org&&"True"===window.org.pageOptions.enableMultiADFS,pt=!!window.org&&window.org.pageOptions.enableSubscription,ht=window.sysadmin?window.sysadmin.pageOptions.constance_enabled:"",ft=window.sysadmin?window.sysadmin.pageOptions.multi_tenancy:"",mt=window.sysadmin?window.sysadmin.pageOptions.multi_institution:"",gt=window.sysadmin?window.sysadmin.pageOptions.sysadmin_extra_enabled:"",vt=window.sysadmin?window.sysadmin.pageOptions.enable_guest_invitation:"",yt=window.sysadmin?window.sysadmin.pageOptions.enable_terms_and_conditions:"",_t=window.sysadmin?window.sysadmin.pageOptions.is_default_admin:"",bt=window.sysadmin?window.sysadmin.pageOptions.enable_file_scan:"",wt=window.sysadmin?window.sysadmin.pageOptions.admin_permissions.can_view_system_info:"",Tt=window.sysadmin?window.sysadmin.pageOptions.admin_permissions.can_view_statistic:"",kt=window.sysadmin?window.sysadmin.pageOptions.admin_permissions.can_config_system:"",St=window.sysadmin?window.sysadmin.pageOptions.admin_permissions.can_manage_library:"",Et=window.sysadmin?window.sysadmin.pageOptions.admin_permissions.can_manage_user:"",Ct=window.sysadmin?window.sysadmin.pageOptions.admin_permissions.can_manage_group:"",At=window.sysadmin?window.sysadmin.pageOptions.admin_permissions.can_view_user_log:"",xt=window.sysadmin?window.sysadmin.pageOptions.admin_permissions.can_view_admin_log:"",Pt=window.sysadmin?window.sysadmin.pageOptions.admin_permissions.other_permission:"",It=window.sysadmin?window.sysadmin.pageOptions.enable_work_weixin:"",Ot=window.sysadmin?window.sysadmin.pageOptions.enable_dingtalk:"",Rt=window.sysadmin?window.sysadmin.pageOptions.enableSysAdminViewRepo:"",Lt=window.sysadmin?window.sysadmin.pageOptions.haveLDAP:"",Nt=window.sysadmin?window.sysadmin.pageOptions.enable_share_link_report_abuse:"",Dt=window.app?window.app.pageOptions.institutionName:"",Mt={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"}},97011:function(e,t,n){"use strict";n.d(t,{e:function(){return d}});var r=n(23029),i=n(92901),a=n(26910),o=n(85520),s=n.n(o),u=n(58801),l=n(40326),c=function(){return(0,i.A)((function e(){(0,r.A)(this,e)}),[{key:"init",value:function(e){var t=e.server,n=e.username,r=e.password,i=e.token;return this.server=t,this.username=n,this.password=r,this.token=i,this.token&&this.server&&(this.req=a.A.create({baseURL:this.server,headers:{Authorization:"Token "+this.token}})),this}},{key:"initForSeahubUsage",value:function(e){var t=e.siteRoot,n=e.xcsrfHeaders;if(t&&"/"===t.charAt(t.length-1)){var r=t.substring(0,t.length-1);this.server=r}else this.server=t;return this.req=a.A.create({headers:{"X-CSRFToken":n}}),this}},{key:"_sendPostRequest",value:function(e,t){return t.getHeaders?this.req.post(e,t,{headers:t.getHeaders()}):this.req.post(e,t)}},{key:"getAuthTokenBySession",value:function(){var e=this.server+"/api/v2.1/auth-token-by-session/";return this.req.get(e)}},{key:"createAuthTokenBySession",value:function(){var e=this.server+"/api/v2.1/auth-token-by-session/";return this.req.post(e)}},{key:"deleteAuthTokenBySession",value:function(){var e=this.server+"/api/v2.1/auth-token-by-session/";return this.req.delete(e)}},{key:"login",value:function(){var e=this,t=this.server+"/api2/auth-token/";return a.A.post(t,{username:this.username,password:this.password}).then((function(t){e.token=t.data.token,e.req=a.A.create({baseURL:e.server,headers:{Authorization:"Token "+e.token}})}))}},{key:"authPing",value:function(){var e=this.server+"/api2/auth/ping/";return this.req.get(e)}},{key:"getAccountInfo",value:function(){var e=this.server+"/api2/account/info/";return this.req.get(e)}},{key:"listDepartments",value:function(){var e=this.server+"/api/v2.1/departments/";return this.req.get(e)}},{key:"listGroups",value:function(){var e={with_repos:arguments.length>0&&void 0!==arguments[0]&&arguments[0]?1:0},t=this.server+"/api/v2.1/groups/";return this.req.get(t,{params:e})}},{key:"listGroupRepos",value:function(e,t,n){var r=this.server+"/api/v2.1/groups/"+e+"/libraries/",i={};return void 0!=t&&(i.page=t),void 0!=n&&(i.per_page=n),this.req.get(r,{params:i})}},{key:"getGroup",value:function(e){var t=this.server+"/api/v2.1/groups/"+e+"/";return this.req.get(t)}},{key:"createGroup",value:function(e){var t=this.server+"/api/v2.1/groups/",n=new(s());return n.append("name",e),this._sendPostRequest(t,n)}},{key:"renameGroup",value:function(e,t){var n=this.server+"/api/v2.1/groups/"+e+"/",r={name:t};return this.req.put(n,r)}},{key:"deleteGroup",value:function(e){var t=this.server+"/api/v2.1/groups/"+e+"/";return this.req.delete(t)}},{key:"transferGroup",value:function(e,t){var n=this.server+"/api/v2.1/groups/"+e+"/",r={owner:t};return this.req.put(n,r)}},{key:"quitGroup",value:function(e,t){var n=encodeURIComponent(t),r=this.server+"/api/v2.1/groups/"+e+"/members/"+n+"/";return this.req.delete(r)}},{key:"listGroupMembers",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:64,a=this.server+"/api/v2.1/groups/"+e+"/members/",o={page:t||1,per_page:n||100,is_admin:r,avatar_size:i};return this.req.get(a,{params:o})}},{key:"searchGroupMember",value:function(e,t){var n=this.server+"/api/v2.1/groups/"+e+"/search-member/",r={q:t};return this.req.get(n,{params:r})}},{key:"addGroupMember",value:function(e,t){var n=this.server+"/api/v2.1/groups/"+e+"/members/",r={email:t};return this.req.post(n,r)}},{key:"addGroupMembers",value:function(e,t){var n=this.server+"/api/v2.1/groups/"+e+"/members/bulk/",r=new(s());return r.append("emails",t.join(",")),this._sendPostRequest(n,r)}},{key:"importGroupMembersViaFile",value:function(e,t){var n=this.server+"/api/v2.1/groups/"+e+"/members/import/",r=new(s());return r.append("file",t),this._sendPostRequest(n,r)}},{key:"deleteGroupMember",value:function(e,t){var n=encodeURIComponent(t),r=this.server+"/api/v2.1/groups/"+e+"/members/"+n+"/";return this.req.delete(r)}},{key:"setGroupAdmin",value:function(e,t,n){var r=encodeURIComponent(t),i=this.server+"/api/v2.1/groups/"+e+"/members/"+r+"/",a={is_admin:n};return this.req.put(i,a)}},{key:"createGroupOwnedLibrary",value:function(e,t){var n=t.repo_name,r=t.permission?t.permission:"rw",i=this.server+"/api/v2.1/groups/"+e+"/group-owned-libraries/",a=new(s());return a.append("name",n),t.passwd&&a.append("passwd",t.passwd),a.append("permission",r),t.library_template&&a.append("library_template",t.library_template),this._sendPostRequest(i,a)}},{key:"deleteGroupOwnedLibrary",value:function(e,t){var n=this.server+"/api/v2.1/groups/"+e+"/group-owned-libraries/"+t+"/";return this.req.delete(n)}},{key:"renameGroupOwnedLibrary",value:function(e,t,n){var r=this.server+"/api/v2.1/groups/"+e+"/group-owned-libraries/"+t+"/",i=new(s());return i.append("name",n),this.req.put(r,i)}},{key:"shareGroupOwnedRepoToUser",value:function(e,t,n,r){var i=this.server+"/api/v2.1/group-owned-libraries/"+e+"/user-share/",a=new(s());return a.append("permission",t),a.append("path",r),Array.isArray(n)?n.forEach((function(e){a.append("username",e)})):a.append("username",n),this._sendPostRequest(i,a)}},{key:"modifyGroupOwnedRepoUserSharedPermission",value:function(e,t,n,r){var i=this.server+"/api/v2.1/group-owned-libraries/"+e+"/user-share/",a=new(s());return a.append("permission",t),a.append("username",n),a.append("path",r),this.req.put(i,a)}},{key:"deleteGroupOwnedRepoSharedUserItem",value:function(e,t,n){var r=this.server+"/api/v2.1/group-owned-libraries/"+e+"/user-share/",i={username:t,path:n};return this.req.delete(r,{data:i})}},{key:"shareGroupOwnedRepoToGroup",value:function(e,t,n,r){var i=this.server+"/api/v2.1/group-owned-libraries/"+e+"/group-share/",a=new(s());return a.append("permission",t),a.append("path",r),Array.isArray(n)?n.forEach((function(e){a.append("group_id",e)})):a.append("group_id",n),this._sendPostRequest(i,a)}},{key:"modifyGroupOwnedRepoGroupSharedPermission",value:function(e,t,n,r){var i=this.server+"/api/v2.1/group-owned-libraries/"+e+"/group-share/",a=new(s());return a.append("permission",t),a.append("group_id",n),a.append("path",r),this.req.put(i,a)}},{key:"deleteGroupOwnedRepoSharedGroupItem",value:function(e,t,n){var r=this.server+"/api/v2.1/group-owned-libraries/"+e+"/group-share/",i={group_id:t,path:n};return this.req.delete(r,{data:i})}},{key:"listShareLinks",value:function(e){var t=e.repoID,n=e.path,r=e.page,i=e.perPage,a=this.server+"/api/v2.1/share-links/",o={};return t&&n&&(o.repo_id=t,o.path=n),o.page=r||1,o.per_page=i||25,this.req.get(a,{params:o})}},{key:"createMultiShareLink",value:function(e,t,n,r,i){var a=this.server+"/api/v2.1/multi-share-links/",o=new(s());return o.append("path",t),o.append("repo_id",e),i&&o.append("permissions",i),n&&o.append("password",n),r&&o.append("expiration_time",r),this._sendPostRequest(a,o)}},{key:"batchCreateMultiShareLink",value:function(e,t,n,r,i,a){var o=this.server+"/api/v2.1/multi-share-links/batch/",u=new(s());return u.append("path",t),u.append("repo_id",e),u.append("number",n),u.append("auto_generate_password",r),a&&u.append("permissions",a),i&&u.append("expiration_time",i),this._sendPostRequest(o,u)}},{key:"createShareLink",value:function(e,t,n,r,i){var a=this.server+"/api/v2.1/share-links/",o=new(s());return o.append("path",t),o.append("repo_id",e),i&&o.append("permissions",i),n&&o.append("password",n),r&&o.append("expiration_time",r),this._sendPostRequest(a,o)}},{key:"updateShareLink",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.server+"/api/v2.1/share-links/"+e+"/",i=new(s());return t&&i.append("permissions",t),n&&i.append("expiration_time",n),this.req.put(r,i)}},{key:"deleteShareLink",value:function(e){var t=this.server+"/api/v2.1/share-links/"+e+"/";return this.req.delete(t)}},{key:"deleteShareLinks",value:function(e){var t=this.server+"/api/v2.1/share-links/",n={tokens:e};return this.req.delete(t,{data:n})}},{key:"cleanInvalidShareLinks",value:function(){var e=this.server+"/api/v2.1/share-links/clean-invalid/";return this.req.delete(e)}},{key:"sendShareLink",value:function(e,t,n){var r=this.server+"/api2/send-share-link/",i=new(s());return i.append("token",e),i.append("email",t),n&&i.append("extra_msg",n),this._sendPostRequest(r,i)}},{key:"getRepoFolderShareInfo",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/share-info/",r={};return void 0!=t&&(r.path=t),this.req.get(n,{params:r})}},{key:"listRepoShareLinks",value:function(e){var t=this.server+"/api/v2.1/repos/"+e+"/share-links/";return this.req.get(t)}},{key:"deleteRepoShareLink",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/share-links/"+t+"/";return this.req.delete(n)}},{key:"listSharedRepos",value:function(){var e=this.server+"/api/v2.1/shared-repos/";return this.req.get(e)}},{key:"getShareLinkRepoTags",value:function(e){var t=this.server+"/api/v2.1/share-links/"+e+"/repo-tags/";return this.req.get(t)}},{key:"getShareLinkTaggedFiles",value:function(e,t){var n=this.server+"/api/v2.1/share-links/"+e+"/tagged-files/"+t+"/";return this.req.get(n)}},{key:"getAllRepoFolderShareInfo",value:function(e,t){var n=this.server+"/api/v2.1/repo-folder-share-info/",r={repo_id:e};return t&&(r.share_to=t),this.req.get(n,{params:r})}},{key:"listUserUploadLinks",value:function(){var e=this.server+"/api/v2.1/upload-links/";return this.req.get(e)}},{key:"getUploadLink",value:function(e,t){var n=this.server+"/api/v2.1/upload-links/?repo_id="+e+"&path="+encodeURIComponent(t);return this.req.get(n)}},{key:"createUploadLink",value:function(e,t,n,r){var i=this.server+"/api/v2.1/upload-links/",a=new(s());return a.append("path",t),a.append("repo_id",e),n&&a.append("password",n),r&&a.append("expiration_time",r),this._sendPostRequest(i,a)}},{key:"updateUploadLink",value:function(e,t){var n=this.server+"/api/v2.1/upload-links/"+e+"/",r=new(s());return r.append("expiration_time",t),this.req.put(n,r)}},{key:"deleteUploadLink",value:function(e){var t=this.server+"/api/v2.1/upload-links/"+e+"/";return this.req.delete(t)}},{key:"cleanInvalidUploadLinks",value:function(){var e=this.server+"/api/v2.1/upload-links/clean-invalid/";return this.req.delete(e)}},{key:"sendUploadLink",value:function(e,t,n){var r=this.server+"/api2/send-upload-link/",i=new(s());return i.append("token",e),i.append("email",t),n&&i.append("extra_msg",n),this._sendPostRequest(r,i)}},{key:"listRepoUploadLinks",value:function(e){var t=this.server+"/api/v2.1/repos/"+e+"/upload-links/";return this.req.get(t)}},{key:"deleteRepoUploadLink",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/upload-links/"+t+"/";return this.req.delete(n)}},{key:"listSharedItems",value:function(e,t,n){t=encodeURIComponent(t);var r=this.server+"/api2/repos/"+e+"/dir/shared_items/?p="+t+"&share_type="+n;return this.req.get(r)}},{key:"getBeSharedRepos",value:function(){var e=this.server+"/api2/beshared-repos/";return this.req.get(e)}},{key:"leaveShareRepo",value:function(e,t){var n=this.server+"/api2/beshared-repos/"+e+"/";return this.req.delete(n,{params:t})}},{key:"deleteShareToUserItem",value:function(e,t,n,r){t=encodeURIComponent(t);var i=this.server+"/api2/repos/"+e+"/dir/shared_items/?p="+t+"&share_type="+n+"&username="+encodeURIComponent(r);return this.req.delete(i)}},{key:"updateShareToUserItemPermission",value:function(e,t,n,r,i){t=encodeURIComponent(t);var a=this.server+"/api2/repos/"+e+"/dir/shared_items/?p="+t+"&share_type="+n+"&username="+encodeURIComponent(r),o=new(s());return o.append("permission",i),this._sendPostRequest(a,o)}},{key:"deleteShareToGroupItem",value:function(e,t,n,r){t=encodeURIComponent(t);var i=this.server+"/api2/repos/"+e+"/dir/shared_items/?p="+t+"&share_type="+n+"&group_id="+r;return this.req.delete(i)}},{key:"updateShareToGroupItemPermission",value:function(e,t,n,r,i){t=encodeURIComponent(t);var a=this.server+"/api2/repos/"+e+"/dir/shared_items/?p="+t+"&share_type="+n+"&group_id="+r,o=new(s());return o.append("permission",i),this._sendPostRequest(a,o)}},{key:"leaveShareGroupOwnedRepo",value:function(e){var t=this.server+"/api/v2.1/group-owned-libraries/user-share-in-libraries/"+e+"/";return this.req.delete(t)}},{key:"shareableGroups",value:function(){var e=this.server+"/api/v2.1/shareable-groups/";return this.req.get(e)}},{key:"getSharedRepos",value:function(){var e=this.server+"/api2/shared-repos/";return this.req.get(e)}},{key:"updateRepoSharePerm",value:function(e,t){var n=this.server+"/api/v2.1/shared-repos/"+e+"/";return this.req.put(n,t)}},{key:"unshareRepo",value:function(e,t){var n=this.server+"/api/v2.1/shared-repos/"+e+"/";return this.req.delete(n,{params:t})}},{key:"unshareRepoToGroup",value:function(e,t){var n=this.server+"/api/v2.1/groups/"+t+"/libraries/"+e+"/";return this.req.delete(n)}},{key:"shareFolder",value:function(e,t,n,r,i){t=encodeURIComponent(t);var a=new(s());if(a.append("share_type",n),a.append("permission",r),"user"==n)for(var o=0;o<i.length;o++)a.append("username",i[o]);else for(var u=0;u<i.length;u++)a.append("group_id",i[u]);var l=this.server+"/api2/repos/"+e+"/dir/shared_items/?p="+t;return this.req.put(l,a)}},{key:"listSharedFolders",value:function(){var e=this.server+"/api/v2.1/shared-folders/";return this.req.get(e)}},{key:"updateFolderSharePerm",value:function(e,t,n){var r=this.server+"/api2/repos/"+e+"/dir/shared_items/";return this.req.post(r,t,{params:n})}},{key:"unshareFolder",value:function(e,t){var n=this.server+"/api2/repos/"+e+"/dir/shared_items/";return this.req.delete(n,{params:t})}},{key:"listCustomPermissions",value:function(e){var t=this.server+"/api/v2.1/repos/"+e+"/custom-share-permissions/";return this.req.get(t)}},{key:"createCustomPermission",value:function(e,t,n,r){var i=this.server+"/api/v2.1/repos/"+e+"/custom-share-permissions/",a={permission_name:t,description:n,permission:JSON.stringify(r)};return this.req.post(i,a)}},{key:"getCustomPermission",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/custom-share-permissions/"+t+"/";return this.req.get(n)}},{key:"deleteCustomPermission",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/custom-share-permissions/"+t+"/";return this.req.delete(n)}},{key:"updateCustomPermission",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/custom-share-permissions/"+t.id+"/",r={permission_name:t.name,description:t.description,permission:JSON.stringify(t.permission)};return this.req.put(n,r)}},{key:"createMineRepo",value:function(e){var t=this.server+"/api2/repos/?from=web";return this.req.post(t,e)}},{key:"createGroupRepo",value:function(e,t){var n=this.server+"/api/v2.1/groups/"+e+"/libraries/",r=new(s());return r.append("repo_name",t.repo_name),t.password&&r.append("password",t.password),r.append("permission",t.permission),t.library_template&&r.append("library_template",t.library_template),this._sendPostRequest(n,r)}},{key:"listRepos",value:function(e){var t=this.server+"/api/v2.1/repos/";return e?this.req.get(t,{params:e,paramsSerializer:{serialize:function(e){var t=[];for(var n in e)if(Array.isArray(e[n]))for(var r=0,i=e[n].length;r<i;r++)t.push(n+"="+encodeURIComponent(e[n][r]));else t.push(n+"="+encodeURIComponent(e[n]));return t.join("&")}}}):this.req.get(t)}},{key:"getRepoInfo",value:function(e){var t=this.server+"/api/v2.1/repos/"+e+"/";return this.req.get(t)}},{key:"getRepoHistoryLimit",value:function(e){var t=this.server+"/api2/repos/"+e+"/history-limit/";return this.req.get(t)}},{key:"setRepoHistoryLimit",value:function(e,t){var n=this.server+"/api2/repos/"+e+"/history-limit/",r=new(s());return r.append("keep_days",t),this.req.put(n,r)}},{key:"resetAndSendEncryptedRepoPassword",value:function(e){var t=this.server+"/api/v2.1/repos/"+e+"/send-new-password/",n=new(s());return this._sendPostRequest(t,n)}},{key:"deleteRepo",value:function(e){var t=this.server+"/api/v2.1/repos/"+e+"/";return this.req.delete(t)}},{key:"renameRepo",value:function(e,t){var n=this.server+"/api2/repos/"+e+"/?op=rename",r=new(s());return r.append("repo_name",t),this._sendPostRequest(n,r)}},{key:"transferRepo",value:function(e,t){var n=this.server+"/api2/repos/"+e+"/owner/",r=new(s());return r.append("owner",t),this.req.put(n,r)}},{key:"setRepoDecryptPassword",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/set-password/",r=new(s());return r.append("password",t),this._sendPostRequest(n,r)}},{key:"changeEncryptedRepoPassword",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/set-password/",i={old_password:t,new_password:n};return this.req.put(r,i)}},{key:"createPublicRepo",value:function(e){var t=this.server+"/api2/repos/public/";return this.req.post(t,e)}},{key:"selectOwnedRepoToPublic",value:function(e,t){var n=this.server+"/api/v2.1/shared-repos/"+e+"/";return this.req.put(n,t)}},{key:"getSource",value:function(){return a.A.CancelToken.source()}},{key:"searchFilesInPublishedRepo",value:function(e,t,n,r){var i=this.server+"/api/v2.1/published-repo-search/",a={repo_id:e,q:t,page:n,per_page:r};return this.req.get(i,{params:a})}},{key:"searchFiles",value:function(e,t){var n=this.server+"/api2/search/";if(n=n+"?q="+e.q,e.search_repo&&(n=n+"&search_repo="+e.search_repo),e.search_ftypes&&(n=n+"&search_ftypes="+e.search_ftypes),e.page&&(n=n+"&page="+e.page),e.per_page&&(n=n+"&per_page="+e.per_page),e.search_path&&(n=n+"&search_path="+e.search_path),e.obj_type&&(n=n+"&obj_type="+e.obj_type),e.input_fexts&&(n=n+"&input_fexts="+e.input_fexts),e.with_permission&&(n=n+"&with_permission="+e.with_permission),e.time_from&&(n=n+"&time_from="+e.time_from),e.time_to&&(n=n+"&time_to="+e.time_to),e.size_from&&(n=n+"&size_from="+e.size_from),e.size_to&&(n=n+"&size_to="+e.size_to),e.shared_from&&(n=n+"&shared_from="+e.shared_from),e.not_shared_from&&(n=n+"&not_shared_from="+e.not_shared_from),e.search_filename_only&&(n=n+"&search_filename_only="+e.search_filename_only),e.ftype)for(var r=0;r<e.ftype.length;r++)n=n+"&ftype="+e.ftype[r];return this.req.get(n,{cancelToken:t})}},{key:"searchFileInRepo",value:function(e,t){var n=this.server+"/api/v2.1/search-file/",r={repo_id:e,q:t};return this.req.get(n,{params:r})}},{key:"listRepoAPITokens",value:function(e){var t=this.server+"/api/v2.1/repos/"+e+"/repo-api-tokens/";return this.req.get(t)}},{key:"addRepoAPIToken",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/repo-api-tokens/",i=new(s());return i.append("app_name",t),i.append("permission",n),this._sendPostRequest(r,i)}},{key:"deleteRepoAPIToken",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/repo-api-tokens/"+t+"/";return this.req.delete(n)}},{key:"updateRepoAPIToken",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/repo-api-tokens/"+t+"/",i=new(s());return i.append("permission",n),this.req.put(r,i)}},{key:"listDeletedRepo",value:function(){var e=this.server+"/api/v2.1/deleted-repos/";return this.req.get(e)}},{key:"restoreDeletedRepo",value:function(e){var t=this.server+"/api/v2.1/deleted-repos/",n=new(s());return n.append("repo_id",e),this._sendPostRequest(t,n)}},{key:"listDir",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.recursive,i=void 0!==r&&r,a=n.type,o=void 0===a?"":a,s=n.with_thumbnail,u=void 0!==s&&s,l=n.with_parents,c=void 0!==l&&l,d=this.server+"/api/v2.1/repos/"+e+"/dir/",p={};return p.p=t,i&&(p.recursive=i?1:0),o&&(p.t=o),u&&(p.with_thumbnail=u),c&&(p.with_parents=c),this.req.get(d,{params:p})}},{key:"listWikiDir",value:function(e,t,n){var r=encodeURIComponent(t),i=this.server+"/api/v2.1/wikis/"+encodeURIComponent(e)+"/dir/?p="+r;return n&&(i=this.server+"/api/v2.1/wikis/"+encodeURIComponent(e)+"/dir/?p="+r+"&with_parents="+n),this.req.get(i)}},{key:"getDirInfo",value:function(e,t){var n=encodeURIComponent(t),r=this.server+"/api/v2.1/repos/"+e+"/dir/detail/?path="+n;return this.req.get(r)}},{key:"createDir",value:function(e,t){var n=encodeURIComponent(t),r=this.server+"/api2/repos/"+e+"/dir/?p="+n,i=new(s());return i.append("operation","mkdir"),this._sendPostRequest(r,i)}},{key:"renameDir",value:function(e,t,n){var r=encodeURIComponent(t),i=this.server+"/api2/repos/"+e+"/dir/?p="+r,a=new(s());return a.append("operation","rename"),a.append("newname",n),this._sendPostRequest(i,a)}},{key:"deleteDir",value:function(e,t){var n=encodeURIComponent(t),r=this.server+"/api/v2.1/repos/"+e+"/dir/?p="+n;return this.req.delete(r)}},{key:"copyDir",value:function(e,t,n,r,i){var a=[],o=this.server;o+=e===t?"/api/v2.1/repos/sync-batch-copy-item/":"/api/v2.1/repos/async-batch-copy-item/",Array.isArray(i)?a=i:a.push(i);var s={src_repo_id:e,src_parent_dir:r,dst_repo_id:t,dst_parent_dir:n,src_dirents:a};return this._sendPostRequest(o,s,{headers:{"Content-Type":"application/json"}})}},{key:"moveDir",value:function(e,t,n,r,i){var a=[],o=this.server;o+=e===t?"/api/v2.1/repos/sync-batch-move-item/":"/api/v2.1/repos/async-batch-move-item/",Array.isArray(i)?a=i:a.push(i);var s={src_repo_id:e,src_parent_dir:r,dst_repo_id:t,dst_parent_dir:n,src_dirents:a};return this._sendPostRequest(o,s,{headers:{"Content-Type":"application/json"}})}},{key:"queryAsyncOperationProgress",value:function(e){var t=this.server+"/api/v2.1/query-copy-move-progress/?task_id="+e;return this.req.get(t)}},{key:"cancelCopyMoveOperation",value:function(e){var t=this.server+"/api/v2.1/copy-move-task/",n={task_id:e};return this.req.delete(t,{data:n})}},{key:"deleteMutipleDirents",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/batch-delete-item/",i={repo_id:e,parent_dir:t,dirents:n};return this.req.delete(r,{data:i},{headers:{"Content-Type":"application/json"}})}},{key:"zipDownload",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/zip-task/",i=new(s());return i.append("parent_dir",t),Array.isArray(n)?n.forEach((function(e){i.append("dirents",e)})):i.append("dirents",n),this._sendPostRequest(r,i)}},{key:"queryZipProgress",value:function(e){var t=this.server+"/api/v2.1/query-zip-progress/?token="+e;return this.req.get(t)}},{key:"cancelZipTask",value:function(e){var t=this.server+"/api/v2.1/cancel-zip-task/",n=new(s());return n.append("token",e),this.req.post(t,n)}},{key:"getFileInfo",value:function(e,t){var n=encodeURIComponent(t),r=this.server+"/api2/repos/"+e+"/file/detail/?p="+n;return this.req.get(r)}},{key:"getFileHistory",value:function(e,t){var n=this.server+"/api2/repos/"+e+"/file/history/?p="+encodeURIComponent(t);return this.req.get(n)}},{key:"getFileDownloadLink",value:function(e,t){var n=encodeURIComponent(t),r=this.server+"/api2/repos/"+e+"/file/?p="+n+"&reuse=1";return this.req.get(r)}},{key:"getFileContent",value:function(e){return a.A.create().get(e)}},{key:"createFile",value:function(e,t,n){var r=encodeURIComponent(t),i=this.server+"/api/v2.1/repos/"+e+"/file/?p="+r,a=new(s());return a.append("operation","create"),a.append("is_draft",n),this._sendPostRequest(i,a)}},{key:"renameFile",value:function(e,t,n){var r=encodeURIComponent(t),i=this.server+"/api/v2.1/repos/"+e+"/file/?p="+r,a=new(s());return a.append("operation","rename"),a.append("newname",n),this._sendPostRequest(i,a)}},{key:"convertFile",value:function(e,t,n){var r=encodeURIComponent(t),i=this.server+"/api/v2.1/repos/"+e+"/file/?p="+r,a=new(s());return a.append("operation","convert"),a.append("dst_type",n),this._sendPostRequest(i,a)}},{key:"lockfile",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/file/?p="+encodeURIComponent(t),i=new(s());return i.append("operation","lock"),void 0!=n&&i.append("expire",n),this.req.put(r,i)}},{key:"unlockfile",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/file/?p="+encodeURIComponent(t),r=new(s());return r.append("operation","unlock"),this.req.put(n,r)}},{key:"revertFile",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/file/?p="+encodeURIComponent(t),i=new(s());return i.append("operation","revert"),i.append("commit_id",n),this._sendPostRequest(r,i)}},{key:"revertFolder",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/dir/?p="+encodeURIComponent(t),i=new(s());return i.append("operation","revert"),i.append("commit_id",n),this._sendPostRequest(r,i)}},{key:"revertRepo",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/commits/"+t+"/revert/";return this.req.post(n)}},{key:"deleteFile",value:function(e,t){var n=encodeURIComponent(t),r=this.server+"/api/v2.1/repos/"+e+"/file/?p="+n;return this.req.delete(r)}},{key:"getFileServerUploadLink",value:function(e,t){var n=encodeURIComponent(t),r=this.server+"/api2/repos/"+e+"/upload-link/?p="+n+"&from=web";return this.req.get(r)}},{key:"sharedLinkGetFileUploadUrl",value:function(e,t){var n=this.server+"/api/v2.1/share-links/"+e+"/upload/?path="+encodeURIComponent(t);return this.req.get(n)}},{key:"getFileUploadedBytes",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/file-uploaded-bytes/",i={parent_dir:t,file_name:n};return this.req.get(r,{params:i})}},{key:"sharedUploadLinkGetFileUploadUrl",value:function(e){var t=this.server+"/api/v2.1/upload-links/"+e+"/upload/";return this.req.get(t)}},{key:"shareLinksUploadDone",value:function(e,t,n){var r=this.server+"/api/v2.1/share-links/"+e+"/upload/done/",i=new(s());return i.append("file_path",t),void 0!=n&&i.append("is_dir",n),this._sendPostRequest(r,i)}},{key:"uploadImage",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return a.A.create()({method:"post",data:t,url:e,onUploadProgress:n})}},{key:"getUpdateLink",value:function(e,t){var n=this.server+"/api2/repos/"+e+"/update-link/?p="+encodeURIComponent(t);return this.req.get(n)}},{key:"updateFile",value:function(e,t,n,r){var i=new(s());i.append("target_file",t),i.append("filename",n);var o=new Blob([r],{type:"text/plain"});return i.append("file",o),a.A.create()({method:"post",url:e,data:i})}},{key:"listFileHistoryRecords",value:function(e,t,n,r){var i=this.server+"/api/v2.1/repos/"+e+"/file/new_history/",a={path:t,page:n,per_page:r};return this.req.get(i,{params:a})}},{key:"listOldFileHistoryRecords",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/file/history/",i={path:t,commit_id:n};return this.req.get(r,{params:i})}},{key:"getFileRevision",value:function(e,t,n){var r=this.server+"/api2/repos/"+e+"/file/revision/?p="+encodeURIComponent(n)+"&commit_id="+t;return this.req.get(r)}},{key:"getFileExtendedProperties",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/extended-properties/?path="+t;return this.req.get(n)}},{key:"newFileExtendedProperties",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/extended-properties/",i=new(s());return i.append("path",t),i.append("props_data",JSON.stringify(n)),this._sendPostRequest(r,i)}},{key:"updateFileExtendedProperties",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/extended-properties/",i=new(s());return i.append("path",t),i.append("props_data",JSON.stringify(n)),this.req.put(r,i)}},{key:"deleteFileExtendedProperties",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/extended-properties/?path="+t;return this.req.delete(n)}},{key:"applyFolderExtendedProperties",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/apply-folder-extended-properties/",r=new(s());return r.append("path",t),this.req.post(n,r)}},{key:"deleteComment",value:function(e,t){var n=this.server+"/api2/repos/"+e+"/file/comments/"+t+"/";return this.req.delete(n)}},{key:"listComments",value:function(e,t,n){var r=encodeURIComponent(t),i=this.server+"/api2/repos/"+e+"/file/comments/?p="+r;return n&&(i=i+"&resolved="+n),this.req.get(i)}},{key:"postComment",value:function(e,t,n,r){var i=encodeURIComponent(t),a=this.server+"/api2/repos/"+e+"/file/comments/?p="+i,o=new(s());return o.append("comment",n),r&&o.append("detail",r),this._sendPostRequest(a,o)}},{key:"getCommentsNumber",value:function(e,t){var n=encodeURIComponent(t),r=this.server+"/api2/repos/"+e+"/file/comments/counts/?p="+n;return this.req.get(r)}},{key:"updateComment",value:function(e,t,n,r,i){var a=this.server+"/api2/repos/"+e+"/file/comments/"+t+"/",o={};return n&&(o.resolved=n),r&&(o.detail=r),i&&(o.comment=i),this.req.put(a,o)}},{key:"listStarredItems",value:function(){var e=this.server+"/api/v2.1/starred-items/";return this.req.get(e)}},{key:"starItem",value:function(e,t){var n=this.server+"/api/v2.1/starred-items/",r=new(s());return r.append("repo_id",e),r.append("path",t),this._sendPostRequest(n,r)}},{key:"unstarItem",value:function(e,t){var n=this.server+"/api/v2.1/starred-items/?repo_id="+e+"&path="+encodeURIComponent(t);return this.req.delete(n)}},{key:"monitorRepo",value:function(e){var t=this.server+"/api/v2.1/monitored-repos/",n=new(s());return n.append("repo_id",e),this._sendPostRequest(t,n)}},{key:"unMonitorRepo",value:function(e){var t=this.server+"/api/v2.1/monitored-repos/"+e+"/";return this.req.delete(t)}},{key:"listRepoTags",value:function(e){var t=this.server+"/api/v2.1/repos/"+e+"/repo-tags/";return this.req.get(t)}},{key:"createRepoTag",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/repo-tags/",i=new(s());return i.append("name",t),i.append("color",n),this._sendPostRequest(r,i)}},{key:"createRepoTags",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/repo-tags/",r={tags:t};return this.req.put(n,r)}},{key:"deleteRepoTag",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/repo-tags/"+t+"/";return this.req.delete(n)}},{key:"updateRepoTag",value:function(e,t,n,r){var i=this.server+"/api/v2.1/repos/"+e+"/repo-tags/"+t+"/",a={name:n,color:r};return this.req.put(i,a)}},{key:"listTaggedFiles",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/tagged-files/"+t+"/";return this.req.get(n)}},{key:"listFileTags",value:function(e,t){var n=encodeURIComponent(t),r=this.server+"/api/v2.1/repos/"+e+"/file-tags/?file_path="+n;return this.req.get(r)}},{key:"addFileTag",value:function(e,t,n){var r=new(s());r.append("file_path",t),r.append("repo_tag_id",n);var i=this.server+"/api/v2.1/repos/"+e+"/file-tags/";return this._sendPostRequest(i,r)}},{key:"deleteFileTag",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/file-tags/"+t+"/";return this.req.delete(n)}},{key:"saveSharedFile",value:function(e,t,n,r){var i=this.server+"/api/v2.1/share-links/"+n+"/save-file-to-repo/",a=new(s());return a.append("dst_repo_id",e),a.append("dst_parent_dir",t),r&&a.append("path",r),this._sendPostRequest(i,a)}},{key:"saveSharedDir",value:function(e,t,n,r,i){var a=this.server+"/api/v2.1/share-links/"+n+"/save-items-to-repo/",o=new(s());return o.append("src_parent_dir",r),i.forEach((function(e){o.append("src_dirents",e)})),o.append("dst_repo_id",e),o.append("dst_parent_dir",t),this._sendPostRequest(a,o)}},{key:"addAbuseReport",value:function(e,t,n,r,i){var a=this.server+"/api/v2.1/abuse-reports/",o=new(s());return o.append("share_link_token",e),o.append("abuse_type",t),o.append("description",n),o.append("reporter",r),o.append("file_path",i),this._sendPostRequest(a,o)}},{key:"getInternalLink",value:function(e,t,n){var r="dir"===n,i=encodeURIComponent(t),a=this.server+"/api/v2.1/smart-link/?repo_id="+e+"&path="+i+"&is_dir="+r;return this.req.get(a)}},{key:"getWikiFileContent",value:function(e,t){var n=encodeURIComponent(t),r=(new Date).getTime(),i=this.server+"/api/v2.1/wikis/"+encodeURIComponent(e)+"/content/?p="+n+"&_="+r;return this.req.get(i)}},{key:"getUserAvatar",value:function(e,t){var n=this.server+"/api2/avatars/user/"+encodeURIComponent(e)+"/resized/"+t+"/";return this.req.get(n)}},{key:"listNotifications",value:function(e,t){var n=this.server+"/api/v2.1/notifications/",r={page:e,per_page:t};return this.req.get(n,{params:r})}},{key:"updateNotifications",value:function(){var e=this.server+"/api/v2.1/notifications/";return this.req.put(e)}},{key:"deleteNotifications",value:function(){var e=this.server+"/api/v2.1/notifications/";return this.req.delete(e)}},{key:"getUnseenNotificationCount",value:function(){var e=this.server+"/api/v2.1/notifications/";return this.req.get(e)}},{key:"markNoticeAsRead",value:function(e){var t=this.server+"/api/v2.1/notification/",n=new(s());return n.append("notice_id",e),this.req.put(t,n)}},{key:"listLinkedDevices",value:function(){var e=this.server+"/api2/devices/";return this.req.get(e)}},{key:"unlinkDevice",value:function(e,t,n){var r=this.server+"/api2/devices/",i={platform:e,device_id:t,wipe_device:n?"true":"false"};return this.req.delete(r,{data:i})}},{key:"listActivities",value:function(e){var t=this.server+"/api/v2.1/activities/?page="+e;return this.req.get(t)}},{key:"createThumbnail",value:function(e,t,n){var r=this.server+"/thumbnail/"+e+"/create/?path="+encodeURIComponent(t)+"&size="+n;return this.req.get(r,{headers:{"X-Requested-With":"XMLHttpRequest"}})}},{key:"searchUsers",value:function(e){var t=this.server+"/api2/search-user/?q="+encodeURIComponent(e);return this.req.get(t)}},{key:"listWikis",value:function(e){var t=this.server+"/api/v2.1/wikis/";return e?this.req.get(t,{params:e,paramsSerializer:{serialize:function(e){var t=[];for(var n in e)if(Array.isArray(e[n]))for(var r=0,i=e[n].length;r<i;r++)t.push(n+"="+encodeURIComponent(e[n][r]));else t.push(n+"="+encodeURIComponent(e[n]));return t.join("&")}}}):this.req.get(t)}},{key:"addWiki",value:function(e){var t=this.server+"/api/v2.1/wikis/",n=new(s());return n.append("repo_id",e),this._sendPostRequest(t,n)}},{key:"renameWiki",value:function(e,t){var n=this.server+"/api/v2.1/wikis/"+e+"/",r=new(s());return r.append("wiki_name",t),this._sendPostRequest(n,r)}},{key:"updateWikiPermission",value:function(e,t){var n=this.server+"/api/v2.1/wikis/"+e+"/",r={permission:t};return this.req.put(n,r)}},{key:"deleteWiki",value:function(e){var t=this.server+"/api/v2.1/wikis/"+e+"/";return this.req.delete(t)}},{key:"fileMetaData",value:function(e,t){var n=this.server+"/api2/repos/"+e+"/file/metadata/?p="+encodeURIComponent(t);return this.req.get(n)}},{key:"dirMetaData",value:function(e,t){var n=this.server+"/api2/repos/"+e+"/dir/metadata/?p="+encodeURIComponent(t);return this.req.get(n)}},{key:"markdownLint",value:function(e){var t=this.server+"/api/v2.1/markdown-lint/",n=new(s());return n.append("slate",e),this._sendPostRequest(t,n)}},{key:"queryOfficeFileConvertStatus",value:function(e,t,n,r,i){var a=this.server+"/office-convert/status/",o={repo_id:e,commit_id:t,path:n,doctype:r};return i&&(o.token=i),this.req.get(a,{headers:{"X-Requested-With":"XMLHttpRequest"},params:o})}},{key:"listSharedDir",value:function(e,t,n){var r=this.server+"/api/v2.1/share-links/"+e+"/dirents/",i={thumbnail_size:n,path:t};return this.req.get(r,{params:i})}},{key:"getShareLinkZipTask",value:function(e,t){var n=this.server+"/api/v2.1/share-link-zip-task/",r={share_link_token:e,path:t};return this.req.get(n,{params:r})}},{key:"getShareLinkDirentsZipTask",value:function(e,t,n){var r=this.server+"/api/v2.1/share-link-zip-task/",i={token:e,parent_dir:t,dirents:n};return this.req.post(r,i)}},{key:"getShareLinkThumbnail",value:function(e,t,n){var r=this.server+"/thumbnail/"+e+"/create/",i={path:t,size:n};return this.req.get(r,{params:i})}},{key:"getAllRepoSnapshotLabels",value:function(){var e=this.server+"/api/v2.1/revision-tags/tag-names/";return this.req.get(e)}},{key:"addNewRepoLabels",value:function(e,t){var n=this.server+"/api/v2.1/revision-tags/tagged-items/",r={repo_id:e,tag_names:t};return this.req.post(n,r)}},{key:"updateRepoCommitLabels",value:function(e,t,n){var r=this.server+"/api/v2.1/revision-tags/tagged-items/",i={repo_id:e,commit_id:t,tag_names:n};return this.req.put(r,i)}},{key:"invitePeople",value:function(e){var t=this.server+"/api/v2.1/invitations/batch/",n=new(s());n.append("type","guest");for(var r=0;r<e.length;r++)n.append("accepter",e[r]);return this._sendPostRequest(t,n)}},{key:"listInvitations",value:function(){var e=this.server+"/api/v2.1/invitations/";return this.req.get(e)}},{key:"deleteInvitation",value:function(e){var t=this.server+"/api/v2.1/invitations/"+e+"/";return this.req.delete(t)}},{key:"revokeInvitation",value:function(e){var t=this.server+"/api/v2.1/invitations/"+e+"/revoke/";return this.req.post(t)}},{key:"addRepoShareInvitations",value:function(e,t,n,r){var i=this.server+"/api/v2.1/repos/"+e+"/shared/invitations/batch/",a={type:"guest",accepters:n,path:t,permission:r};return this.req.post(i,a)}},{key:"listRepoShareInvitations",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/shared/invitations/?path="+t;return this.req.get(n)}},{key:"updateRepoShareInvitation",value:function(e,t,n,r){var i=this.server+"/api/v2.1/repos/"+e+"/shared/invitation/",a={token:n,path:t,permission:r};return this.req.put(i,a)}},{key:"deleteRepoShareInvitation",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/shared/invitation/",i={token:n,path:t};return this.req.delete(r,{data:i})}},{key:"updateUserAvatar",value:function(e){var t=this.server+"/api/v2.1/user-avatar/",n=new(s());return n.append("avatar",e),this._sendPostRequest(t,n)}},{key:"getUserInfo",value:function(){var e=this.server+"/api/v2.1/user/";return this.req.get(e)}},{key:"updateUserInfo",value:function(e){var t=e.name,n=e.telephone,r=e.contact_email,i=e.list_in_address_book,a=this.server+"/api/v2.1/user/",o={};return void 0!=t&&(o.name=t),void 0!=n&&(o.telephone=n),void 0!=r&&(o.contact_email=r),void 0!=i&&(o.list_in_address_book=i),this.req.put(a,o)}},{key:"updateEmailNotificationInterval",value:function(e,t){var n=this.server+"/api2/account/info/",r={file_updates_email_interval:e,collaborate_email_interval:t};return this.req.put(n,r)}},{key:"updateWebdavSecret",value:function(e){var t=this.server+"/api/v2.1/webdav-secret/",n={secret:e};return this.req.put(t,n)}},{key:"listUserFolderPerm",value:function(e,t){var n=this.server+"/api2/repos/"+e+"/user-folder-perm/";return t&&(n=n+"?folder_path="+encodeURIComponent(t)),this.req.get(n)}},{key:"addUserFolderPerm",value:function(e,t,n,r){var i=this.server+"/api2/repos/"+e+"/user-folder-perm/",a=new(s());return a.append("permission",t),a.append("folder_path",n),Array.isArray(r)?r.forEach((function(e){a.append("user_email",e)})):a.append("user_email",r),this._sendPostRequest(i,a)}},{key:"updateUserFolderPerm",value:function(e,t,n,r){var i=this.server+"/api2/repos/"+e+"/user-folder-perm/",a=new(s());return a.append("permission",t),a.append("folder_path",n),a.append("user_email",r),this.req.put(i,a)}},{key:"deleteUserFolderPerm",value:function(e,t,n,r){var i=this.server+"/api2/repos/"+e+"/user-folder-perm/",a={permission:t,folder_path:n,user_email:r};return this.req.delete(i,{data:a})}},{key:"listGroupFolderPerm",value:function(e,t){var n=this.server+"/api2/repos/"+e+"/group-folder-perm/";return t&&(n=n+"?folder_path="+encodeURIComponent(t)),this.req.get(n)}},{key:"addGroupFolderPerm",value:function(e,t,n,r){var i=this.server+"/api2/repos/"+e+"/group-folder-perm/",a=new(s());return a.append("permission",t),a.append("folder_path",n),a.append("group_id",r),this._sendPostRequest(i,a)}},{key:"updateGroupFolderPerm",value:function(e,t,n,r){var i=this.server+"/api2/repos/"+e+"/group-folder-perm/",a=new(s());return a.append("permission",t),a.append("folder_path",n),a.append("group_id",r),this.req.put(i,a)}},{key:"deleteGroupFolderPerm",value:function(e,t,n,r){var i=this.server+"/api2/repos/"+e+"/group-folder-perm/",a={permission:t,folder_path:n,group_id:r};return this.req.delete(i,{data:a})}},{key:"listDepartmentRepoUserFolderPerm",value:function(e,t){var n=this.server+"/api/v2.1/group-owned-libraries/"+e+"/user-folder-permission/";return t&&(n=n+"?folder_path="+encodeURIComponent(t)),this.req.get(n)}},{key:"addDepartmentRepoUserFolderPerm",value:function(e,t,n,r){var i=this.server+"/api/v2.1/group-owned-libraries/"+e+"/user-folder-permission/",a=new(s());return a.append("permission",t),a.append("folder_path",n),Array.isArray(r)?r.forEach((function(e){a.append("user_email",e)})):a.append("user_email",r),this._sendPostRequest(i,a)}},{key:"updateDepartmentRepoUserFolderPerm",value:function(e,t,n,r){var i=this.server+"/api/v2.1/group-owned-libraries/"+e+"/user-folder-permission/",a=new(s());return a.append("permission",t),a.append("folder_path",n),a.append("user_email",r),this.req.put(i,a)}},{key:"deleteDepartmentRepoUserFolderPerm",value:function(e,t,n,r){var i=this.server+"/api/v2.1/group-owned-libraries/"+e+"/user-folder-permission/",a={permission:t,folder_path:n,user_email:r};return this.req.delete(i,{data:a})}},{key:"listDepartmentRepoGroupFolderPerm",value:function(e,t){var n=this.server+"/api/v2.1/group-owned-libraries/"+e+"/group-folder-permission/";return t&&(n=n+"?folder_path="+encodeURIComponent(t)),this.req.get(n)}},{key:"addDepartmentRepoGroupFolderPerm",value:function(e,t,n,r){var i=this.server+"/api/v2.1/group-owned-libraries/"+e+"/group-folder-permission/",a=new(s());return a.append("permission",t),a.append("folder_path",n),a.append("group_id",r),this._sendPostRequest(i,a)}},{key:"updateDepartmentRepoGroupFolderPerm",value:function(e,t,n,r){var i=this.server+"/api/v2.1/group-owned-libraries/"+e+"/group-folder-permission/",a=new(s());return a.append("permission",t),a.append("folder_path",n),a.append("group_id",r),this.req.put(i,a)}},{key:"deleteDepartmentRepoGroupFolderPerm",value:function(e,t,n,r){var i=this.server+"/api/v2.1/group-owned-libraries/"+e+"/group-folder-permission/",a={permission:t,folder_path:n,group_id:r};return this.req.delete(i,{data:a})}},{key:"getRepoHistory",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/history/",i={page:t||1,per_page:n||100};return this.req.get(r,{params:i})}},{key:"getCommitDetails",value:function(e,t){var n=this.server+"/ajax/repo/"+e+"/history/changes/",r={commit_id:t};return this.req.get(n,{headers:{"X-Requested-With":"XMLHttpRequest"},params:r})}},{key:"getRepoFolderTrash",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/trash/",i={path:t};return n&&(i.scan_stat=n),this.req.post(r,i)}},{key:"restoreDirents",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/trash/revert-dirents/",i=new(s());return n.forEach((function(e){i.append("path",e)})),i.append("commit_id",t),this._sendPostRequest(r,i)}},{key:"deleteRepoTrash",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/trash/",r={keep_days:t};return this.req.delete(n,{data:r})}},{key:"restoreFolder",value:function(e,t,n){var r=this.server+"/api2/repos/"+e+"/dir/revert/",i={commit_id:t,p:n};return this.req.put(r,i)}},{key:"restoreFile",value:function(e,t,n){var r=this.server+"/api2/repos/"+e+"/file/revert/",i={commit_id:t,p:n};return this.req.put(r,i)}},{key:"listCommitDir",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/commits/"+t+"/dir/",i={path:n};return this.req.get(r,{params:i})}},{key:"listRepoRelatedUsers",value:function(e){var t=this.server+"/api/v2.1/repos/"+e+"/related-users/";return this.req.get(t)}},{key:"listFileParticipants",value:function(e,t){var n=encodeURIComponent(t),r=this.server+"/api/v2.1/repos/"+e+"/file/participants/?path="+n;return this.req.get(r)}},{key:"addFileParticipants",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/file/participants/",i={path:t,emails:n};return this.req.post(r,i)}},{key:"deleteFileParticipant",value:function(e,t,n){var r=this.server+"/api/v2.1/repos/"+e+"/file/participant/",i={path:t,email:n};return this.req.delete(r,{data:i})}},{key:"listOCMSharesPrepare",value:function(e){var t=this.server+"/api/v2.1/ocm/shares-prepare/";return e&&(t+="?repo_id="+e),this.req.get(t)}},{key:"addOCMSharePrepare",value:function(e,t,n,r,i){var a=this.server+"/api/v2.1/ocm/shares-prepare/",o={to_user:e,to_server_url:t,repo_id:n,path:r,permission:i};return this.req.post(a,o)}},{key:"deleteOCMSharePrepare",value:function(e){var t=this.server+"/api/v2.1/ocm/shares-prepare/"+e+"/";return this.req.delete(t)}},{key:"listOCMSharesReceived",value:function(){var e=this.server+"/api/v2.1/ocm/shares-received/";return this.req.get(e)}},{key:"deleteOCMShareReceived",value:function(e){var t=this.server+"/api/v2.1/ocm/shares-received/"+e+"/";return this.req.delete(t)}},{key:"listOCMRepoDir",value:function(e,t,n){var r=this.server+"/api/v2.1/ocm/providers/"+e+"/repos/"+t+"/dir/?path="+encodeURIComponent(n);return this.req.get(r)}},{key:"getOCMRepoDownloadURL",value:function(e,t,n){var r=this.server+"/api/v2.1/ocm/providers/"+e+"/repos/"+t+"/download-link/?path="+encodeURIComponent(n);return this.req.get(r)}},{key:"getOCMRepoUploadURL",value:function(e,t,n){var r=this.server+"/api/v2.1/ocm/providers/"+e+"/repos/"+t+"/upload-link/?path="+encodeURIComponent(n);return this.req.get(r)}},{key:"getRepoOldFilesAutoDelDays",value:function(e){var t=this.server+"/api/v2.1/repos/"+e+"/auto-delete/";return this.req.get(t)}},{key:"setRepoOldFilesAutoDelDays",value:function(e,t){var n=this.server+"/api/v2.1/repos/"+e+"/auto-delete/",r=new(s());return r.append("auto_delete_days",t),this.req.put(n,r)}},{key:"sdocCopyHistoryFile",value:function(e,t,n,r){var i=this.server+"/api/v2.1/seadoc/copy-history-file/"+e+"/",a=new(s());return a.append("obj_id",n),a.append("p",t),a.append("ctime",r),this._sendPostRequest(i,a)}},{key:"listSdocHistory",value:function(e,t,n){var r=this.server+"/api/v2.1/seadoc/history/"+e+"/",i={page:t,per_page:n};return this.req.get(r,{params:i})}},{key:"listSdocDailyHistoryDetail",value:function(e,t){var n=this.server+"/api/v2.1/seadoc/daily-history-detail/"+e+"/",r={op_date:t};return this.req.get(n,{params:r})}},{key:"renameSdocHistory",value:function(e,t,n){var r=this.server+"/api/v2.1/seadoc/history/"+e+"/",i={obj_id:t,new_name:n};return this.req.post(r,i)}},{key:"sdocStartRevise",value:function(e,t){var n=this.server+"/api/v2.1/seadoc/revisions/",r=new(s());return r.append("p",t),r.append("repo_id",e),this._sendPostRequest(n,r)}},{key:"sdocPublishRevision",value:function(e){var t=this.server+"/api/v2.1/seadoc/publish-revision/"+e+"/";return this.req.post(t)}},{key:"onlyofficeConvert",value:function(e,t){var n=this.server+"/onlyoffice-api/convert/",r=new(s());return r.append("repo_id",e),r.append("file_path",t),this._sendPostRequest(n,r)}},{key:"importSdoc",value:function(e,t,n){var r=this.server+"/api/v2.1/seadoc/import/"+t+"/",i=new(s());return i.append("file",e),i.append("parent_dir",n),this._sendPostRequest(r,i)}}])}(),d=new c,p=u.Ay.load("sfcsrftoken");d.initForSeahubUsage({siteRoot:l.Yc,xcsrfHeaders:p})},94634:function(e,t,n){"use strict";var r=n(40326),i={NEW_FOLDER:{key:"New Folder",value:(0,r.AP)("New Folder")},NEW_FILE:{key:"New File",value:(0,r.AP)("New File")},NEW_MARKDOWN_FILE:{key:"New Markdown File",value:(0,r.AP)("New Markdown File")},NEW_EXCEL_FILE:{key:"New Excel File",value:(0,r.AP)("New Excel File")},NEW_POWERPOINT_FILE:{key:"New PowerPoint File",value:(0,r.AP)("New PowerPoint File")},NEW_WORD_FILE:{key:"New Word File",value:(0,r.AP)("New Word File")},NEW_SEADOC_FILE:{key:"New SeaDoc File",value:(0,r.AP)("New SeaDoc File")},SHARE:{key:"Share",value:(0,r.AP)("Share")},DOWNLOAD:{key:"Download",value:(0,r.AP)("Download")},DELETE:{key:"Delete",value:(0,r.AP)("Delete")},RENAME:{key:"Rename",value:(0,r.AP)("Rename")},MOVE:{key:"Move",value:(0,r.AP)("Move")},COPY:{key:"Copy",value:(0,r.AP)("Copy")},PERMISSION:{key:"Permission",value:(0,r.AP)("Permission")},DETAILS:{key:"Details",value:(0,r.AP)("Details")},OPEN_VIA_CLIENT:{key:"Open via Client",value:(0,r.AP)("Open via Client")},LOCK:{key:"Lock",value:(0,r.AP)("Lock")},UNLOCK:{key:"Unlock",value:(0,r.AP)("Unlock")},FREEZE_DOCUMENT:{key:"Freeze Document",value:(0,r.AP)("Freeze Document")},UNFREEZE_DOCUMENT:{key:"Unfreeze Document",value:(0,r.AP)("Unfreeze Document")},CONVERT_AND_EXPORT:{key:"Convert & Export",value:(0,r.AP)("Convert & Export")},CONVERT_TO_MARKDOWN:{key:"Convert to Markdown",value:(0,r.AP)("Convert to Markdown")},CONVERT_TO_SDOC:{key:"Convert to sdoc",value:(0,r.AP)("Convert to sdoc")},CONVERT_TO_DOCX:{key:"Convert to docx",value:(0,r.AP)("Convert to docx")},EXPORT_DOCX:{key:"Export docx",value:(0,r.AP)("Export as docx")},HISTORY:{key:"History",value:(0,r.AP)("History")},ACCESS_LOG:{key:"Access Log",value:(0,r.AP)("Access Log")},PROPERTIES:{key:"Properties",value:(0,r.AP)("Properties")},TAGS:{key:"Tags",value:(0,r.AP)("Tags")},TRASH:{key:"Trash",value:(0,r.AP)("Trash")},ONLYOFFICE_CONVERT:{key:"Convert with ONLYOFFICE",value:(0,r.AP)("Convert with ONLYOFFICE")},DISPLAY_FILES:{key:"Display files",value:(0,r.AP)("Display files")},EXPORT_SDOC:{key:"Export sdoc",value:(0,r.AP)("Export as zip")},TRANSFER:{key:"Transfer",value:(0,r.AP)("Transfer")},FOLDER_PERMISSION:{key:"Folder Permission",value:(0,r.AP)("Folder Permission")},SHARE_ADMIN:{key:"Share Admin",value:(0,r.AP)("Share Admin")},CHANGE_PASSWORD:{key:"Change Password",value:(0,r.AP)("Change Password")},RESET_PASSWORD:{key:"Reset Password",value:(0,r.AP)("Reset Password")},UNWATCH_FILE_CHANGES:{key:"Unwatch File Changes",value:(0,r.AP)("Unwatch File Changes")},WATCH_FILE_CHANGES:{key:"Watch File Changes",value:(0,r.AP)("Watch File Changes")},ADVANCED:{key:"advanced",value:(0,r.AP)("Advanced")},API_TOKEN:{key:"API Token",value:(0,r.AP)("API Token")},LABEL_CURRENT_STATE:{key:"Label Current State",value:(0,r.AP)("Label Current State")},UNSHARE:{key:"Unshare",value:(0,r.AP)("Unshare")}};t.A=i},65604:function(e,t,n){"use strict";n.d(t,{Aq:function(){return h},OT:function(){return m},Fr:function(){return f},yS:function(){return v},Oj:function(){return g}});var r=n(89379),i=n(40326),a=n(94634),o=(n(9950),n(4086)),s=n(44414);var u=function(){var e="".concat(i.$6,"?next=").concat(encodeURIComponent(location.href)),t=(0,i.AP)("Permission denied. Please try {placeholder-left}login again.{placeholder-right}");return t=(t=t.replace("{placeholder-left}",'<a class="action-link p-0" href='+e+">")).replace("{placeholder-right}","</a>"),(0,s.jsx)("span",{className:"error",dangerouslySetInnerHTML:{__html:t}})},l=function(e){return/^[0-9a-zA-Z]+$/.test(e)},c=function(e){return/^[\u4E00-\u9FA5]+$/.test(e)},d=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[],r=e.match(/\d+|\D+/g),i=0;i<r.length;i++){var a=r[i];isNaN(a)?n=n.concat(a.split("")):t?n.push(a):n=n.concat(a.split(""))}return n},p=n(13042),h={keyCodes:{enter:13,esc:27,space:32,tab:9,up:38,down:40},bytesToSize:function(e){if("undefined"==typeof e)return" ";if(e<0)return"--";var t=["bytes","KB","MB","GB","TB","PB"];if(0===e)return e+" "+t[0];var n=parseInt(Math.floor(Math.log(e)/Math.log(1e3)),10);return 0===n?e+" "+t[n]:(e/Math.pow(1e3,n)).toFixed(1)+" "+t[n]},isHiDPI:function(){return(window.devicePixelRatio?window.devicePixelRatio:1)>1},isDesktop:function(){return window.innerWidth>=768},isWeChat:function(){var e=window.navigator.userAgent.toLowerCase(),t="micromessenger"==e.match(/MicroMessenger/i);return"micromessenger"==e.match(/MicroMessenger/i)&&"wxwork"==e.match(/wxwork/i)||t},FILEEXT_ICON_MAP:{txt:"txt.png",md:"md.png",pdf:"pdf.png",doc:"word.png",docx:"word.png",odt:"word.png",fodt:"word.png",ppt:"ppt.png",pptx:"ppt.png",odp:"ppt.png",fodp:"ppt.png",xls:"excel.png",xlsx:"excel.png",ods:"excel.png",fods:"excel.png",mp4:"video.png",ogv:"video.png",webm:"video.png",mov:"video.png",flv:"video.png",wmv:"video.png",rmvb:"video.png",mp3:"music.png",oga:"music.png",ogg:"music.png",wav:"music.png",flac:"music.png",opus:"music.png",aac:"music.png",ac3:"music.png",wma:"music.png",jpg:"pic.png",jpeg:"pic.png",png:"pic.png",svg:"pic.png",gif:"pic.png",bmp:"pic.png",ico:"pic.png",heic:"pic.png",tif:"pic.png",tiff:"pic.png",webp:"pic.png",jfif:"pic.png",psd:"psd.png",zip:"zip.png",rar:"zip.png",tar:"zip.png",css:"css.png",sdoc:"sdoc.png",sdoc_notification:"sdoc_notification.ico",default:"file.png"},imageCheck:function(e){if(-1==e.lastIndexOf("."))return!1;var t=e.substr(e.lastIndexOf(".")+1).toLowerCase();return-1!=["gif","jpeg","jpg","png","ico","bmp","tif","tiff","jfif","heic"].indexOf(t)},pdfCheck:function(e){if(-1==e.lastIndexOf("."))return!1;var t=e.substr(e.lastIndexOf(".")+1).toLowerCase();return-1!=["pdf"].indexOf(t)},isFaceRecognition:function(e){return e===p.AT.FACE_RECOGNITION},getShareLinkPermissionList:function(e,t,n,r){var i=[];return h.getUserPermission(t).isCustomPermission?(i.push("preview_download"),i.push("preview_only"),i):("rw"!=t&&"admin"!=t&&"r"!=t||i.push("preview_download"),i.push("preview_only"),"library"==e||"dir"==e?"rw"!=t&&"admin"!=t||i.push("download_upload"):this.isEditableOfficeFile(n)&&("rw"==t||"admin"==t)&&r&&i.push("edit_download"),i)},getShareLinkPermissionStr:function(e){var t=e.can_edit,n=e.can_download,r=e.can_upload;switch("".concat(t," ").concat(n," ").concat(r)){case"false true false":return"preview_download";case"false false false":return"preview_only";case"false true true":return"download_upload";case"true true false":return"edit_download";case"true false false":return"cloud_edit"}},isEditableOfficeFile:function(e){if(-1==e.lastIndexOf("."))return!1;var t=e.substr(e.lastIndexOf(".")+1).toLowerCase();return-1!=["docx","pptx","xlsx"].indexOf(t)},videoCheck:function(e){if(-1==e.lastIndexOf("."))return!1;var t=e.substr(e.lastIndexOf(".")+1).toLowerCase();return-1!=["mp4","ogv","webm","mov"].indexOf(t)},checkDuplicatedNameInList:function(e,t){return e.some((function(e){return e.name===t}))},encodePath:function(e){if(!e)return"";for(var t=e.split("/"),n=[],r=0,i=t.length;r<i;r++)n.push(encodeURIComponent(t[r]));return n.join("/")},HTMLescape:function(e){return document.createElement("div").appendChild(document.createTextNode(e)).parentNode.innerHTML},generateDialogTitle:function(e,t){return e.replace("{placeholder}",t)},getFileName:function(e){var t=e.lastIndexOf("/");return e.slice(t+1)},getPaths:function(e){for(var t=e.split("/").slice(1),n=[];t.length;)n.push("/"+t.join("/")),t.pop();return n.reverse()},getFolderName:function(e){return"/"===e?e:(e="/"!==e[e.length-1]?e:e.slice(0,e.length-1)).slice(e.lastIndexOf("/")+1)},getDirName:function(e){var t=e.slice(0,e.lastIndexOf("/"));return""===t?"/":t},isChildPath:function(e,t){return this.getDirName(e)===t},isAncestorPath:function(e,t){return t.indexOf(e)>-1},renameAncestorPath:function(e,t,n){return e.replace(t,n)},joinPath:function(e,t){return"/"===e[e.length-1]?e+t:e+"/"+t},isSupportUploadFolder:function(){return-1!=navigator.userAgent.indexOf("Firefox")||navigator.userAgent.indexOf("Chrome")>-1||navigator.userAgent.indexOf("Safari")>-1},isIEBrowser:function(){var e=navigator.userAgent,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1,n=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;return t||n},getDefaultLibIconUrl:function(e){var t=h.isHiDPI()?48:24;t=e?256:t;return i.SG+"img/lib/"+t+"/lib.png"},getLibIconUrl:function(e,t){var n=e.permission||e.share_permission,r=h.isHiDPI()?48:24;r=t?256:r;var a="lib.png";switch(e.encrypted&&(a="lib-encrypted.png"),n){case"r":a="lib-readonly.png";break;case"preview":a="lib-cloud-preview.png";break;case"cloud-edit":a="lib-cloud-preview-edit.png"}return"read-only"==e.status&&(a="lib-readonly.png"),i.SG+"img/lib/"+r+"/"+a},getDirentIcon:function(e,t){if(!e)return"";var n=h.isHiDPI()?48:24;if(n=t?192:n,"file"==e.type)return h.getFileIconUrl(e.name);var r=!1;return!e.permission||"r"!==e.permission&&"preview"!==e.permission||(r=!0),h.getFolderIconUrl(r,n,e.has_been_shared_out)},getAdminTemplateDirentIcon:function(e){return e.is_file?this.getFileIconUrl(e.obj_name):this.getFolderIconUrl()},getFolderIconUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return t||(t=h.isHiDPI()?48:24),t=t>24?192:24,"".concat(i.SG,"img/folder").concat(e?"-read-only":"").concat(n?"-shared-out":"","-").concat(t,".png")},getFileIconName:function(e){if(-1==e.lastIndexOf("."))return h.FILEEXT_ICON_MAP.default;var t=e.substr(e.lastIndexOf(".")+1).toLowerCase();return h.FILEEXT_ICON_MAP[t]?h.FILEEXT_ICON_MAP[t]:h.FILEEXT_ICON_MAP.default},getFileIconUrl:function(e){var t="";return-1==e.lastIndexOf(".")?i.SG+"img/file/256/"+h.FILEEXT_ICON_MAP.default:(t=e.substr(e.lastIndexOf(".")+1).toLowerCase(),h.FILEEXT_ICON_MAP[t]?i.SG+"img/file/256/"+h.FILEEXT_ICON_MAP[t]:i.SG+"img/file/256/"+h.FILEEXT_ICON_MAP.default)},getLibIconTitle:function(e){var t,n=e.permission||e.share_permission;if(e.encrypted)t=(0,i.AP)("Encrypted library");else if(e.is_admin)t=(0,i.AP)("Admin access");else switch(n){case"rw":t=(0,i.AP)("Read-Write library");break;case"r":t=(0,i.AP)("Read-Only library");break;case"cloud-edit":t=(0,i.AP)("Online Read-Write library");break;case"preview":t=(0,i.AP)("Online Read-Only library")}return t},getFolderIconTitle:function(e){var t;switch(e.permission){case"rw":t=(0,i.AP)("Read-Write folder");break;case"r":t=(0,i.AP)("Read-Only folder");break;case"cloud-edit":t=(0,i.AP)("Online Read-Write folder");break;case"preview":t=(0,i.AP)("Online Read-Only folder")}return t},getFolderOperationList:function(e,t,n,r){var o=[],s=a.A.SHARE,u=a.A.DOWNLOAD,l=a.A.DELETE,c=a.A.RENAME,d=a.A.MOVE,p=a.A.COPY,f=a.A.PERMISSION,m=a.A.OPEN_VIA_CLIENT,g=n.permission,v=h.getUserPermission(g),y=v.isCustomPermission,_=v.customPermission;return r&&("rw"!=g&&"r"!=g||o.push(u),y&&_.permission.download&&o.push(u),h.isHasPermissionToShare(t,g,n)&&o.push(s),"rw"!=g&&"cloud-edit"!=g||o.push(l,"Divider"),y&&_.permission.delete&&o.push(l,"Divider")),"rw"!=g&&"cloud-edit"!=g||o.push(c,d),y&&_.permission.modify&&o.push(c,d),"rw"!=g&&"cloud-edit"!=g||o.push(p),y&&_.permission.copy&&o.push(p),"rw"==g&&(i.wR&&(e&&t.has_been_shared_out||t.is_admin)&&o.push("Divider",f),o.push("Divider",m)),"r"!=g||t.encrypted||o.push(p),"Divider"===o[o.length-1]&&o.pop(),o},getFileOperationList:function(e,t,n,o){var s=[],u=a.A.SHARE,l=a.A.DOWNLOAD,c=a.A.DELETE,d=a.A.RENAME,p=a.A.MOVE,f=a.A.COPY,m=a.A.TAGS,g=a.A.UNLOCK,v=a.A.LOCK,y=a.A.UNFREEZE_DOCUMENT,_=a.A.FREEZE_DOCUMENT,b=a.A.HISTORY,w=a.A.ACCESS_LOG,T=a.A.PROPERTIES,k=a.A.OPEN_VIA_CLIENT,S=a.A.ONLYOFFICE_CONVERT,E=a.A.CONVERT_AND_EXPORT,C=a.A.CONVERT_TO_MARKDOWN,A=a.A.CONVERT_TO_DOCX,x=a.A.EXPORT_DOCX,P=a.A.CONVERT_TO_SDOC,I=a.A.EXPORT_SDOC,O=n.permission,R=h.getUserPermission(O),L=R.isCustomPermission,N=R.customPermission;if(o&&("rw"!=O&&"r"!=O||s.push(l),L&&N.permission.download&&s.push(l),h.isHasPermissionToShare(t,O,n)&&s.push(u),"rw"!=O&&"cloud-edit"!=O||((!n.is_locked||n.is_locked&&n.locked_by_me)&&s.push(c),s.push("Divider")),L&&N.permission.delete&&((!n.is_locked||n.is_locked&&n.locked_by_me)&&s.push(c),s.push("Divider"))),"rw"!=O&&"cloud-edit"!=O||(!n.is_locked||n.is_locked&&n.locked_by_me)&&s.push(d,p),L&&N.permission.modify&&(!n.is_locked||n.is_locked&&n.locked_by_me)&&s.push(d,p),"rw"!=O&&"cloud-edit"!=O||s.push(f),L&&N.permission.copy&&s.push(f),"rw"==O&&(i.DX&&s.push(m),i.am&&(n.is_locked?(n.locked_by_me||"OnlineOffice"==n.lock_owner||e||t.is_admin)&&(n.name.endsWith(".sdoc")||s.push(g)):n.name.endsWith(".sdoc")||s.push(v)),s.push("Divider"),i.am&&!n.is_locked&&n.name.endsWith(".sdoc")&&s.push(_),i.am&&n.is_locked&&n.name.endsWith(".sdoc")&&s.push(y)),("rw"==O||"cloud-edit"==O)&&i.lU&&!t.encrypted&&((n.name.endsWith(".md")||n.name.endsWith(".docx"))&&s.push(P),n.name.endsWith(".sdoc")))if(h.isDesktop()){var D=[C,A,x,I];s.push((0,r.A)((0,r.A)({},E),{},{subOpList:D}))}else s.push(C),s.push(A),s.push(x),s.push(I);"rw"==O&&(s.push("Divider"),s.push(T,b),i.am&&i.RF&&s.push(w),s.push("Divider",k)),"r"==O&&(t.encrypted||s.push(f),s.push(b)),"rw"==O&&i.aK&&i.PA.includes(h.getFileExtension(n.name,!1))&&s.push(S),"Divider"===s[s.length-1]&&s.pop();for(var M=0;M<s.length;M++)"Divider"===s[M]&&"Divider"===s[M+1]&&(s.splice(M,1),M--);return s},getFileExtension:function(e,t){var n=e.toLowerCase().split(".");return t?n.pop():"."+n.pop()},getDirentOperationList:function(e,t,n,r){return("dir"===n.type?h.getFolderOperationList:h.getFileOperationList)(e,t,n,r)},getRepoOperationList:function(e){var t=i.am&&e.encrypted&&i.ez&&i.bw,n=[],o="Divider",s=a.A.SHARE,u=a.A.DELETE,l=a.A.RENAME,c=a.A.TRANSFER,d=a.A.FOLDER_PERMISSION,p=a.A.SHARE_ADMIN,f=a.A.CHANGE_PASSWORD,m=a.A.RESET_PASSWORD,g=a.A.UNWATCH_FILE_CHANGES,v=a.A.WATCH_FILE_CHANGES,y=a.A.ADVANCED;if(n.push(s,u,o,l,c),i.wR&&n.push(d),n.push(p,o),e.encrypted&&n.push(f),t&&n.push(m),i.am){var _=e.monitored?g:v;n.push(_)}n.push(o);var b=h.getAdvancedOperations();return n.push((0,r.A)((0,r.A)({},y),{},{subOpList:b})),n.filter((function(e,t,n){return!(e===o&&n[t+1]===o)}))},getAdvancedOperations:function(){var e=[],t=a.A.API_TOKEN,n=a.A.LABEL_CURRENT_STATE;return e.push(t),i.gj&&e.push(n),e},getSharedLibsOperationList:function(e){var t=a.A.SHARE,n=a.A.UNSHARE,r=a.A.WATCH_FILE_CHANGES,o=a.A.UNWATCH_FILE_CHANGES,s=[];i.am&&e.is_admin&&s.push(t),s.push(n);var u=e.monitored?o:r;return s.push(u),s},getPublicSharedRepoOperationList:function(e){var t=a.A.UNSHARE,n=[],r=e.owner_email===i.Xh;return(i.Gn||r)&&n.push(t),n},getSharedRepoOperationList:function(e,t,n){var o=[],s=a.A.SHARE,u=a.A.UNSHARE,l=a.A.DELETE,c=a.A.RENAME,d=a.A.FOLDER_PERMISSION,p=a.A.SHARE_ADMIN,f=a.A.UNWATCH_FILE_CHANGES,m=a.A.WATCH_FILE_CHANGES,g=a.A.ADVANCED,v=a.A.CHANGE_PASSWORD,y=a.A.RESET_PASSWORD,_=a.A.API_TOKEN,b=t&&t.admins&&t.admins.indexOf(i.Xh)>-1,w=e.owner_email===i.Xh,T=e.is_admin,k="Divider";if(n)return(i.Gn||w)&&o.push(u),o;if(i.am){if(-1!==e.owner_email.indexOf("@seafile_group")){if(b){if(e.owner_email==="".concat(t.id,"@seafile_group")){if(o.push(s,l,c),i.wR&&o.push(d),o.push(p,k),e.encrypted&&o.push(v),e.encrypted&&i.ez&&i.bw&&o.push(y),"r"===e.permission||"rw"===e.permission){var S=e.monitored?f:m;o.push(S)}if(h.isDesktop()){o.push(k);var E=[_];o.push((0,r.A)((0,r.A)({},g),{},{subOpList:E}))}return o}o.push(u)}}else(w||T)&&o.push(s),(b||w||T)&&o.push(u);if("r"===e.permission||"rw"===e.permission){var C=e.monitored?f:m;o.push(C)}}else w&&o.push(s),(b||w)&&o.push(u);return o},sharePerms:function(e){var t;switch(e){case"rw":t=(0,i.AP)("Read-Write");break;case"r":t=(0,i.AP)("Read-Only");break;case"admin":t=(0,i.AP)("Admin");break;case"cloud-edit":t=(0,i.AP)("Online Read-Write");break;case"preview":t=(0,i.AP)("Online Read-Only");break;case"invisible":t=(0,i.AP)("Invisible")}return t},sharePermsExplanation:function(e){var t;switch(e){case"rw":t=(0,i.AP)("User can read, write, upload, download and sync files.");break;case"r":t=(0,i.AP)("User can read, download and sync files.");break;case"admin":t=(0,i.AP)("Besides Write permission, user can also share the library.");break;case"cloud-edit":t=(0,i.AP)("User can view and edit file online via browser. Files can't be downloaded.");break;case"preview":t=(0,i.AP)("User can only view files online via browser. Files can't be downloaded.");break;case"invisible":t=(0,i.AP)("User can not see this folder.")}return t},getShareLinkPermissionObject:function(e){switch(e){case"preview_download":return{value:e,text:(0,i.AP)("Preview and download"),permissionDetails:{can_edit:!1,can_download:!0,can_upload:!1}};case"preview_only":return{value:e,text:(0,i.AP)("Preview only"),permissionDetails:{can_edit:!1,can_download:!1,can_upload:!1}};case"download_upload":return{value:e,text:(0,i.AP)("Download and upload"),permissionDetails:{can_edit:!1,can_download:!0,can_upload:!0}};case"edit_download":return{value:e,text:(0,i.AP)("Edit on cloud and download"),permissionDetails:{can_edit:!0,can_download:!0,can_upload:!1}};case"cloud_edit":return{value:e,text:(0,i.AP)("Edit on cloud only"),permissionDetails:{can_edit:!0,can_download:!1,can_upload:!1}}}return{text:""}},formatSize:function(e){var t=e.bytes,n=e.precision||0,r=1e3,i=1e6,a=1e9,o=1e12;return t>=0&&t<r?t+" B":t>=r&&t<i?(t/r).toFixed(n)+" KB":t>=i&&t<a?(t/i).toFixed(n)+" MB":t>=a&&t<o?(t/a).toFixed(n)+" GB":t>=o?(t/o).toFixed(n)+" TB":t+" B"},formatBitRate:function(e){var t;return"number"!==typeof e?"":(t=e/8)>=1e9?(t/1e9).toFixed(2)+" GB/s":t>=1e6?(t/1e6).toFixed(2)+" MB/s":t>=1e3?(t/1e3).toFixed(2)+" kB/s":t.toFixed(2)+" B/s"},isMarkdownFile:function(e){var t=e.lastIndexOf(".");if(-1===t)return!1;var n=e.substring(t).toLowerCase();return".md"===n||".markdown"===n},isSdocFile:function(e){var t=e.lastIndexOf(".");return-1!==t&&".sdoc"===e.substring(t).toLowerCase()},isDocxFile:function(e){var t=e.lastIndexOf(".");return-1!==t&&".docx"===e.substring(t).toLowerCase()},isPptxFile:function(e){var t=e.lastIndexOf(".");return-1!==t&&".pptx"===e.substring(t).toLowerCase()},isDescriptionSupportedFile:function(e){return h.isSdocFile(e)||h.isMarkdownFile(e)||h.pdfCheck(e)||h.isDocxFile(e)||h.isPptxFile(e)},isFileMetadata:function(e){return e===p.AT.FILE_EXTENDED_PROPERTIES},isInternalFileLink:function(e,t){return new RegExp(i.xW+"/lib/"+t+"/file.*").test(e)},isInternalMarkdownLink:function(e,t){return new RegExp(i.xW+"/lib/"+t+".*.md$").test(e)},isInternalDirLink:function(e,t){return new RegExp(i.xW+"/library/"+t+".*").test(e)},getPathFromInternalMarkdownLink:function(e,t){var n=new RegExp(i.xW+"/lib/"+t+"/file(.*.md)").exec(e);return decodeURIComponent(n[1])},getPathFromInternalDirLink:function(e,t){var n=new RegExp(i.xW+"/library/"+t+"(/.*)").exec(e),r=decodeURIComponent(n[1]);return r=(r=r.slice(1)).slice(r.indexOf("/"))},isWikiInternalMarkdownLink:function(e,t){return t=encodeURIComponent(t),new RegExp(i.xW+"/published/"+t+".*.md$").test(e)},isWikiInternalDirLink:function(e,t){return t=encodeURIComponent(t),new RegExp(i.xW+"/published/"+t+".*").test(e)},getPathFromWikiInternalMarkdownLink:function(e,t){t=encodeURIComponent(t);var n=new RegExp(i.xW+"/published/"+t+"(.*.md)").exec(e)[1];try{n=decodeURIComponent(n)}catch(r){n=n.replace(/%/g,"%25"),n=decodeURIComponent(n)}return n},getPathFromWikiInternalDirLink:function(e,t){t=encodeURIComponent(t);var n=new RegExp(i.xW+"/published/"+t+"(/.*)").exec(e)[1];try{n=decodeURIComponent(n)}catch(r){n=n.replace(/%/g,"%25"),n=decodeURIComponent(n)}return n},compareTwoWord:function(e,t){return function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(l(e)&&l(t))return e.localeCompare(t,"zh-Hans-CN",{numeric:!0});if(c(e)&&c(t))return e.localeCompare(t,"zh-Hans-CN",{numeric:!0});for(var r=d(e,n),i=d(t,n),a=0,o=Math.min(r.length,i.length),s=0;s<o;s++){var u=r[s],p=i[s];if(!c(u)&&c(p))return-1;if(c(u)&&!c(p))return 1;if(0!==(a=c(u)&&c(p)?u.localeCompare(p,"zh-Hans-CN"):u.localeCompare(p,"zh-Hans-CN",{numeric:!0})))return a}return r.length>i.length?1:r.length<i.length?-1:0}(e,t)},compareStrWithNumbersIn:function(e,t){var n,r,i,a=/\d+|\D+/g,o=/\d/,s=e.match(a),u=t.match(a),l=Math.min(s.length,u.length);if(s&&u&&(n=o.test(s[0]))==o.test(u[0]))for(var c=0;c<l;c++){if(r=s[c],i=u[c],n&&(r=parseInt(r,10),i=parseInt(i,10)),r!=i)return r<i?-1:1;n=!n}return(e>=t)-(e<=t)},sortRepos:function(e,t,n){var r,i=this;switch("".concat(t,"-").concat(n)){case"name-asc":r=function(e,t){return e.repo_name?t.repo_name?i.compareTwoWord(e.repo_name,t.repo_name):-1:1};break;case"name-desc":r=function(e,t){return e.repo_name?t.repo_name?-i.compareTwoWord(e.repo_name,t.repo_name):1:-1};break;case"time-asc":r=function(e,t){return e.last_modified<t.last_modified?-1:1};break;case"time-desc":r=function(e,t){return e.last_modified<t.last_modified?1:-1};break;case"size-asc":r=function(e,t){return e.size===t.size?i.compareTwoWord(e.repo_name,t.repo_name):e.size_original<t.size_original?-1:1};break;case"size-desc":r=function(e,t){return e.size===t.size?-i.compareTwoWord(e.repo_name,t.repo_name):e.size_original<t.size_original?1:-1}}return e.sort(r),e},sortDirents:function(e,t,n){var r,i=this;switch("".concat(t,"-").concat(n)){case"name-asc":r=function(e,t){return i.compareTwoWord(e.name,t.name)};break;case"name-desc":r=function(e,t){return-i.compareTwoWord(e.name,t.name)};break;case"time-asc":r=function(e,t){return e.mtime<t.mtime?-1:1};break;case"time-desc":r=function(e,t){return e.mtime<t.mtime?1:-1};break;case"size-asc":r=function(e,t){return"dir"==e.type&&"dir"==t.type?0:e.size_original<t.size_original?-1:1};break;case"size-desc":r=function(e,t){return"dir"==e.type&&"dir"==t.type?0:e.size_original<t.size_original?1:-1}}return e.sort((function(e,t){return"dir"==e.type&&"file"==t.type?-1:"file"==e.type&&"dir"==t.type?1:r(e,t)})),e},sortDirentsInSharedDir:function(e,t,n){var r,i=this;switch("".concat(t,"-").concat(n)){case"name-asc":r=function(e,t){return e.is_dir?i.compareTwoWord(e.folder_name,t.folder_name):i.compareTwoWord(e.file_name,t.file_name)};break;case"name-desc":r=function(e,t){return-(e.is_dir?i.compareTwoWord(e.folder_name,t.folder_name):i.compareTwoWord(e.file_name,t.file_name))};break;case"time-asc":r=function(e,t){return e.last_modified<t.last_modified?-1:1};break;case"time-desc":r=function(e,t){return e.last_modified<t.last_modified?1:-1};break;case"size-asc":r=function(e,t){return e.is_dir?0:e.size<t.size?-1:1};break;case"size-desc":r=function(e,t){return e.is_dir?0:e.size<t.size?1:-1}}return e.sort((function(e,t){return e.is_dir&&!t.is_dir?-1:!e.is_dir&&t.is_dir?1:r(e,t)})),e},getErrorMsg:function(e,t){var n="";return e.response?403==e.response.status?(t&&o.A.danger((0,s.jsx)(u,{}),{id:"permission_denied",duration:3600}),n=(0,i.AP)("Permission denied")):n=429==e.response.status?(0,i.AP)("Too many requests"):e.response.data&&e.response.data.error_msg?e.response.data.error_msg:(0,i.AP)("Error"):n=(0,i.AP)("Please check the network."),n},changeMarkdownNodes:function(e,t){return e.forEach((function(e){t(e),e.children&&e.children.length>0&&h.changeMarkdownNodes(e.children,t)})),e},chooseLanguage:function(e){var t;switch(e){case"py":t="python";break;case"js":t="javascript";break;case"c":t="c";break;case"cpp":t="cpp";break;case"cs":t="csharp";break;case"java":t="java";break;case"mdf":t="text/x-sql";break;case"html":t="html";break;case"sh":t="shell";break;default:t=e}return t},DARK_COLOR_MAP:{red:"#D11507",orange:"#FF8C00",yellow:"#EDEF00",green:"#006400",cyan:"#00E0E1",blue:"#2510A3",indigo:"#350C56",purple:"#551054",pink:"#E3A5B0",azure:"#C4D0D0",lime:"#00E100",teal:"#006A6B",gray:"#545454","#FFA8A8":"#E49090","#FFA94D":"#E39136","#FFD43B":"#E0B815","#A0EC50":"#83CF32","#A9E34B":"#8DC72E","#63E6BE":"#43CAA4","#4FD2C9":"#2DB9B0","#72C3FC":"#57ABE3","#91A7FF":"#7A91E7","#E599F7":"#CC82DE","#B197FC":"#9B82E5","#F783AC":"#DF6D97","#CED4DA":"#A8ADB2"},getDarkColor:function(e){return this.DARK_COLOR_MAP[e]},getCopySuccessfulMessage:function(e){var t=e.length;return(1===t?(0,i.AP)("Successfully copied %(name)s."):2===t?(0,i.AP)("Successfully copied %(name)s and 1 other item."):(0,i.AP)("Successfully copied %(name)s and %(amount)s other items.").replace("%(amount)s",t-1)).replace("%(name)s",e[0])},getMoveSuccessMessage:function(e){var t=e.length;return(1===t?(0,i.AP)("Successfully moved %(name)s."):2===t?(0,i.AP)("Successfully moved %(name)s and 1 other item."):(0,i.AP)("Successfully moved %(name)s and %(amount)s other items.").replace("%(amount)s",t-1)).replace("%(name)s",e[0])},getCopyFailedMessage:function(e){var t=e.length;return(t>1?(0,i.AP)("Failed to copy %(name)s and %(amount)s other item(s).").replace("%(amount)s",t-1):(0,i.AP)("Failed to copy %(name)s.")).replace("%(name)s",e[0])},getMoveFailedMessage:function(e){var t=e.length;return(t>1?(0,i.AP)("Failed to move %(name)s and %(amount)s other item(s).").replace("%(amount)s",t-1):(0,i.AP)("Failed to move %(name)s.")).replace("%(name)s",e[0])},handleSearchedItemClick:function(e){if(!0===e.is_dir){var t=i.Yc+"library/"+e.repo_id+"/"+e.repo_name+e.path;window.open("about:blank").location.href=t}else{var n=i.Yc+"lib/"+e.repo_id+"/file"+h.encodePath(e.path);window.open("about:blank").location.href=n}},generatePassword:function(e){var t="";t+=String.fromCharCode(Math.floor(25*Math.random()+65)),t+=String.fromCharCode(Math.floor(25*Math.random()+97)),t+=String.fromCharCode(Math.floor(9*Math.random()+48)),t+=String.fromCharCode(Math.floor(14*Math.random()+33));for(var n=0;n<e-4;n++){var r=Math.floor(94*Math.random()+33);t+=String.fromCharCode(r)}return t},pathNormalize:function(e){for(var t=e.split("/"),n=[],r=0;r<t.length;r++)"."!==t[r]&&""!==t[r]&&(".."===t[r]?n.pop():n.push(t[r]));return n.join("/")},getEventData:function(e,t){return e.target.dataset?e.target.dataset[t]:e.target.getAttribute("data-"+t)},isHasPermissionToShare:function(e,t,n){var r=h.getUserPermission(t),a=r.isCustomPermission,o=r.customPermission;if(a)return o.permission.download_external_link;var s=e.is_admin,u=e.is_virtual,l=e.encrypted,c=e.owner_email===i.Xh;if(l)return!0;if(n&&("rw"==t||"r"==t))return!0;if(i.zn&&("rw"==t||"r"==t))return!0;if(i.fY&&"rw"==t)return!0;return!(u||!c&&!s)&&!0},registerGlobalVariable:function(e,t,n){window[e]||(window[e]={}),window[e][t]=n},formatTime:function(e){var t=parseInt(e),n=0,r=0;t>60&&(n=parseInt(t/60),t=parseInt(t%60)),n>60&&(r=parseInt(n/60),n=parseInt(n%60));var i=("00"+parseInt(t)).slice(-2);return i=n>0?("00"+parseInt(n)).slice(-2)+":"+i:"00:"+i,i=r>0?("00"+parseInt(r)).slice(-2)+":"+i:"00:"+i},hasNextPage:function(e,t,n){return e*t<n},getStrengthLevel:function(e){var t=0;if(e.length<i.r8)return 0;for(var n=0;n<e.length;n++)t|=this.getCharMode(e.charCodeAt(n));return this.calculateBitwise(t)},getCharMode:function(e){return e>=48&&e<=57?1:e>=65&&e<=90?2:e>=97&&e<=122?4:8},calculateBitwise:function(e){for(var t=0,n=0;n<4;n++)1&e&&t++,e>>>=1;return t},getSharedPermission:function(e){var t=e.permission;return e.is_admin&&(t="admin"),e.permission.startsWith("custom-")&&(t=e.permission.slice(7)),t},getUserPermission:function(e){var t=window.custom_permission;if(!t||["rw","r","admin","cloud-edit","preview"].indexOf(e)>-1)return{isCustomPermission:!1};if(t&&t.id===parseInt(e.split("-")[1]))return{isCustomPermission:!0,customPermission:t};return{isCustomPermission:!1}},onKeyDown:function(e){"Enter"!=e.key&&"Space"!=e.key||e.target.click()},updateTabTitle:function(e){document.getElementsByTagName("title")[0].innerText=e},generateHistoryURL:function(e,t,n){return e&&t&&n?e+"repo/file_revisions/"+t+"/?p="+this.encodePath(n):""},generateRevisionURL:function(e,t,n){return e&&t&&n?e+"repo/sdoc_revision/"+t+"/?p="+this.encodePath(n):""},generateRevisionsURL:function(e,t,n){return e&&t&&n?e+"repo/sdoc_revisions/"+t+"/?p="+this.encodePath(n):""},isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},getUrlSearches:function(){var e=location.search,t={};return 0===e.length||e.split("?")[1].split("&").forEach((function(e){var n=e.split("=");t[n[0]]=decodeURI(n[1])})),t},updateSearchParameter:function(e,t){var n=location,r=n.origin,i=n.pathname,a=this.getUrlSearches();a[e]=t;var o="?";for(var s in a){var u=a[s];u&&(o="?"===o?"?".concat(s,"=").concat(u):"".concat(o,"&").concat(s,"=").concat(u))}history.replaceState(null,"",r+i+o)},isRelativePath:function(e){return!new RegExp("^(?:[a-z]+:)?//","i").test(e)},isMac:function(){var e=navigator.platform;return"Mac68K"==e||"MacPPC"==e||"Macintosh"==e||"MacIntel"==e}},f="undefined"!==typeof window&&(window.innerWidth<768||null!=navigator.userAgent.toLowerCase().match(/(ipod|ipad|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i)),m=function(e){var t=0,n=e.length,r=/[A-Z]/.test(e),i=/[a-z]/.test(e),a=/\d/.test(e),o=/[`~!@#$%^&*()_\-+=<>?:"{}|,./;'\\]/.test(e);return 0===n?"empty":(n>=16?t+=4:n>=12?t+=3:n>=8?t+=2:n>=6&&(t+=1),r&&(t+=1),i&&(t+=1),a&&(t+=1),o&&(t+=1),t>=8?"very_strong":t>=6?"strong":t>=4?"medium":"weak")},g=function(e){var t=window.app.pageOptions.userStrongPasswordRequired,n=m(e);return(t?["strong","very_strong"]:["medium","strong","very_strong"]).includes(n)},v=function(e){var t=!0,n="";return e&&e.trim()?e.includes("/")?{isValid:t=!1,errMessage:n=(0,i.AP)("Name cannot contain slash")}:e.includes("`")?{isValid:t=!1,errMessage:n=(0,i.AP)("Name cannot contain backtick")}:e.includes("\\")?{isValid:t=!1,errMessage:n=(0,i.AP)("Name cannot contain backslash")}:".."===e?{isValid:t=!1,errMessage:n=(0,i.AP)("Name cannot be double dots")}:{isValid:t,errMessage:n}:{isValid:t=!1,errMessage:n=(0,i.AP)("Name is required")}}},61045:function(e,t,n){"use strict";var r=n(77626);e.exports=function(e,t){return void 0===t&&(t=!1),function(n,i,a){if(n)e(n);else if(i.statusCode>=400&&i.statusCode<=599){var o=a;if(t)if(r.TextDecoder){var s=function(e){void 0===e&&(e="");return e.toLowerCase().split(";").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1];return"charset"===r.trim()?i.trim():e}),"utf-8")}(i.headers&&i.headers["content-type"]);try{o=new TextDecoder(s).decode(a)}catch(u){}}else o=String.fromCharCode.apply(null,new Uint8Array(a));e({cause:o})}else e(null,a)}}},96938:function(e,t,n){"use strict";var r=n(77626),i=n(72253),a=n(28650);u.httpHandler=n(61045);var o=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();"undefined"===typeof t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t};function s(e,t,n){var r=e;return a(t)?(n=t,"string"===typeof e&&(r={uri:e})):r=i({},t,{uri:e}),r.callback=n,r}function u(e,t,n){return l(t=s(e,t,n))}function l(e){if("undefined"===typeof e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=c.response?c.response:c.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(n){}return null}(c),v)try{e=JSON.parse(e)}catch(t){}return e}function i(e){return clearTimeout(d),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,y)}function a(){if(!l){var t;clearTimeout(d),t=e.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var i=y,a=null;return 0!==t?(i={body:r(),statusCode:t,method:h,headers:{},url:p,rawRequest:c},c.getAllResponseHeaders&&(i.headers=o(c.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),n(a,i,i.body)}}var s,l,c=e.xhr||null;c||(c=e.cors||e.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var d,p=c.url=e.uri||e.url,h=c.method=e.method||"GET",f=e.body||e.data,m=c.headers=e.headers||{},g=!!e.sync,v=!1,y={body:void 0,headers:{},statusCode:0,method:h,url:p,rawRequest:c};if("json"in e&&!1!==e.json&&(v=!0,m.accept||m.Accept||(m.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(m["content-type"]||m["Content-Type"]||(m["Content-Type"]="application/json"),f=JSON.stringify(!0===e.json?f:e.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(a,0)},c.onload=a,c.onerror=i,c.onprogress=function(){},c.onabort=function(){l=!0},c.ontimeout=i,c.open(h,p,!g,e.username,e.password),g||(c.withCredentials=!!e.withCredentials),!g&&e.timeout>0&&(d=setTimeout((function(){if(!l){l=!0,c.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),c.setRequestHeader)for(s in m)m.hasOwnProperty(s)&&c.setRequestHeader(s,m[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(c.responseType=e.responseType),"beforeSend"in e&&"function"===typeof e.beforeSend&&e.beforeSend(c),c.send(f||null),c}e.exports=u,e.exports.default=u,u.XMLHttpRequest=r.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.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){u["delete"===e?"del":e]=function(t,n,r){return(n=s(t,n,r)).method=e.toUpperCase(),l(n)}}))},12132:function(e,t){"use strict";function n(e,t){return void 0===t&&(t=Object),t&&"function"===typeof t.freeze?t.freeze(e):e}var r=n({HTML:"text/html",isHTML:function(e){return e===r.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=n({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===i.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!==typeof e)throw new TypeError("target is not an object");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.find=function(e,t,n){if(void 0===n&&(n=Array.prototype),e&&"function"===typeof n.find)return n.find.call(e,t);for(var r=0;r<e.length;r++)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];if(t.call(void 0,i,r,e))return i}},t.freeze=n,t.MIME_TYPE=r,t.NAMESPACE=i},96018:function(e,t,n){var r=n(12132),i=n(66188),a=n(4489),o=n(47748),s=i.DOMImplementation,u=r.NAMESPACE,l=o.ParseError,c=o.XMLReader;function d(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function p(e){this.options=e||{locator:{}}}function h(){this.cdata=!1}function f(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function m(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(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 v(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}p.prototype.parseFromString=function(e,t){var n=this.options,r=new c,i=n.domBuilder||new h,o=n.errorHandler,s=n.locator,l=n.xmlns||{},p=/\/x?html?$/.test(t),f=p?a.HTML_ENTITIES:a.XML_ENTITIES;s&&i.setDocumentLocator(s),r.errorHandler=function(e,t,n){if(!e){if(t instanceof h)return t;e=t}var r={},i=e instanceof Function;function a(t){var a=e[t];!a&&i&&(a=2==e.length?function(n){e(t,n)}:e),r[t]=a&&function(e){a("[xmldom "+t+"]\t"+e+m(n))}||function(){}}return n=n||{},a("warning"),a("error"),a("fatalError"),r}(o,i,s),r.domBuilder=n.domBuilder||i,p&&(l[""]=u.HTML),l.xml=l.xml||u.XML;var g=n.normalizeLineEndings||d;return e&&"string"===typeof e?r.parse(g(e),l,f):r.errorHandler.error("invalid doc source"),i.doc},h.prototype={startDocument:function(){this.doc=(new s).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),o=r.length;v(this,a),this.currentElement=a,this.locator&&f(this.locator,a);for(var s=0;s<o;s++){e=r.getURI(s);var u=r.getValue(s),l=(n=r.getQName(s),i.createAttributeNS(e,n));this.locator&&f(r.getLocator(s),l),l.value=l.nodeValue=u,a.setAttributeNode(l)}},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&&f(this.locator,n),v(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=g.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&&f(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=g.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&f(this.locator,r),v(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&&f(this.locator,i),v(this,i),this.doc.doctype=i}},warning:function(e){console.warn("[xmldom warning]\t"+e,m(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,m(this.locator))},fatalError:function(e){throw new l(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){h.prototype[e]=function(){return null}})),t.DOMParser=p},66188:function(e,t,n){var r=n(12132),i=r.find,a=r.NAMESPACE;function o(e){return""!==e}function s(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function u(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(o):[]}(e);return Object.keys(t.reduce(s,{}))}function l(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function c(e,t){var n=e.prototype;if(!(n instanceof t)){var r=function(){};r.prototype=t.prototype,l(n,r=new r),e.prototype=n=r}n.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),n.constructor=e)}var d={},p=d.ELEMENT_NODE=1,h=d.ATTRIBUTE_NODE=2,f=d.TEXT_NODE=3,m=d.CDATA_SECTION_NODE=4,g=d.ENTITY_REFERENCE_NODE=5,v=d.ENTITY_NODE=6,y=d.PROCESSING_INSTRUCTION_NODE=7,_=d.COMMENT_NODE=8,b=d.DOCUMENT_NODE=9,w=d.DOCUMENT_TYPE_NODE=10,T=d.DOCUMENT_FRAGMENT_NODE=11,k=d.NOTATION_NODE=12,S={},E={},C=(S.INDEX_SIZE_ERR=(E[1]="Index size error",1),S.DOMSTRING_SIZE_ERR=(E[2]="DOMString size error",2),S.HIERARCHY_REQUEST_ERR=(E[3]="Hierarchy request error",3)),A=(S.WRONG_DOCUMENT_ERR=(E[4]="Wrong document",4),S.INVALID_CHARACTER_ERR=(E[5]="Invalid character",5),S.NO_DATA_ALLOWED_ERR=(E[6]="No data allowed",6),S.NO_MODIFICATION_ALLOWED_ERR=(E[7]="No modification allowed",7),S.NOT_FOUND_ERR=(E[8]="Not found",8)),x=(S.NOT_SUPPORTED_ERR=(E[9]="Not supported",9),S.INUSE_ATTRIBUTE_ERR=(E[10]="Attribute in use",10));S.INVALID_STATE_ERR=(E[11]="Invalid state",11),S.SYNTAX_ERR=(E[12]="Syntax error",12),S.INVALID_MODIFICATION_ERR=(E[13]="Invalid modification",13),S.NAMESPACE_ERR=(E[14]="Invalid namespace",14),S.INVALID_ACCESS_ERR=(E[15]="Invalid access",15);function P(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,E[e]),this.message=E[e],Error.captureStackTrace&&Error.captureStackTrace(this,P);return n.code=e,t&&(this.message=this.message+": "+t),n}function I(){}function O(e,t){this._node=e,this._refresh=t,R(this)}function R(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var n=e._refresh(e._node);if(_e(e,"length",n.length),!e.$$length||n.length<e.$$length)for(var r=n.length;r in e;r++)Object.prototype.hasOwnProperty.call(e,r)&&delete e[r];l(n,e),e._inc=t}}function L(){}function N(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function D(e,t,n,r){if(r?t[N(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&H(i,e,r),function(e,t,n){e&&e._inc++;var r=n.namespaceURI;r===a.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function M(e,t,n){var r=N(t,n);if(!(r>=0))throw new P(A,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var a=e.ownerDocument;a&&(H(a,e,n),n.ownerElement=null)}}function U(){}function F(){}function j(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function B(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(B(e,t))return!0}while(e=e.nextSibling)}function q(){this.ownerDocument=this}function H(e,t,n,r){e&&e._inc++,n.namespaceURI===a.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function z(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,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a,delete r[r.length]}}}function V(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,z(e.ownerDocument,e),t}function W(e){return e&&e.nodeType===F.DOCUMENT_TYPE_NODE}function G(e){return e&&e.nodeType===F.ELEMENT_NODE}function X(e){return e&&e.nodeType===F.TEXT_NODE}function K(e,t){var n=e.childNodes||[];if(i(n,G)||W(t))return!1;var r=i(n,W);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function $(e,t){var n=e.childNodes||[];if(i(n,(function(e){return G(e)&&e!==t})))return!1;var r=i(n,W);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function Y(e,t,n){if(!function(e){return e&&(e.nodeType===F.DOCUMENT_NODE||e.nodeType===F.DOCUMENT_FRAGMENT_NODE||e.nodeType===F.ELEMENT_NODE)}(e))throw new P(C,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new P(A,"child not in parent");if(!function(e){return e&&(G(e)||X(e)||W(e)||e.nodeType===F.DOCUMENT_FRAGMENT_NODE||e.nodeType===F.COMMENT_NODE||e.nodeType===F.PROCESSING_INSTRUCTION_NODE)}(t)||W(t)&&e.nodeType!==F.DOCUMENT_NODE)throw new P(C,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function Q(e,t,n){var r=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===F.DOCUMENT_FRAGMENT_NODE){var o=a.filter(G);if(o.length>1||i(a,X))throw new P(C,"More than one element or text in fragment");if(1===o.length&&!K(e,n))throw new P(C,"Element in fragment can not be inserted before doctype")}if(G(t)&&!K(e,n))throw new P(C,"Only one element can be added and only after doctype");if(W(t)){if(i(r,W))throw new P(C,"Only one doctype is allowed");var s=i(r,G);if(n&&r.indexOf(s)<r.indexOf(n))throw new P(C,"Doctype can only be inserted before an element");if(!n&&s)throw new P(C,"Doctype can not be appended since element is present")}}function J(e,t,n){var r=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===F.DOCUMENT_FRAGMENT_NODE){var o=a.filter(G);if(o.length>1||i(a,X))throw new P(C,"More than one element or text in fragment");if(1===o.length&&!$(e,n))throw new P(C,"Element in fragment can not be inserted before doctype")}if(G(t)&&!$(e,n))throw new P(C,"Only one element can be added and only after doctype");if(W(t)){if(i(r,(function(e){return W(e)&&e!==n})))throw new P(C,"Only one doctype is allowed");var s=i(r,G);if(n&&r.indexOf(s)<r.indexOf(n))throw new P(C,"Doctype can only be inserted before an element")}}function Z(e,t,n,r){Y(e,t,n),e.nodeType===F.DOCUMENT_NODE&&(r||Q)(e,t,n);var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===T){var a=t.firstChild;if(null==a)return t;var o=t.lastChild}else a=o=t;var s=n?n.previousSibling:e.lastChild;a.previousSibling=s,o.nextSibling=n,s?s.nextSibling=a:e.firstChild=a,null==n?e.lastChild=o:n.previousSibling=o;do{a.parentNode=e}while(a!==o&&(a=a.nextSibling));return z(e.ownerDocument||e,e),t.nodeType==T&&(t.firstChild=t.lastChild=null),t}function ee(){this._nsMap={}}function te(){}function ne(){}function re(){}function ie(){}function ae(){}function oe(){}function se(){}function ue(){}function le(){}function ce(){}function de(){}function pe(){}function he(e,t){var n=[],r=9==this.nodeType&&this.documentElement||this,i=r.prefix,a=r.namespaceURI;if(a&&null==i&&null==(i=r.lookupPrefix(a)))var o=[{namespace:a,prefix:null}];return ge(this,n,e,t,o),n.join("")}function fe(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!i)return!1;if("xml"===r&&i===a.XML||i===a.XMLNS)return!1;for(var o=n.length;o--;){var s=n[o];if(s.prefix===r)return s.namespace!==i}return!0}function me(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,j),'"')}function ge(e,t,n,r,i){if(i||(i=[]),r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case p:var o=e.attributes,s=o.length,u=e.firstChild,l=e.tagName,c=l;if(!(n=a.isHTML(e.namespaceURI)||n)&&!e.prefix&&e.namespaceURI){for(var d,v=0;v<o.length;v++)if("xmlns"===o.item(v).name){d=o.item(v).value;break}if(!d)for(var k=i.length-1;k>=0;k--){if(""===(S=i[k]).prefix&&S.namespace===e.namespaceURI){d=S.namespace;break}}if(d!==e.namespaceURI)for(k=i.length-1;k>=0;k--){var S;if((S=i[k]).namespace===e.namespaceURI){S.prefix&&(c=S.prefix+":"+l);break}}}t.push("<",c);for(var E=0;E<s;E++){"xmlns"==(C=o.item(E)).prefix?i.push({prefix:C.localName,namespace:C.value}):"xmlns"==C.nodeName&&i.push({prefix:"",namespace:C.value})}for(E=0;E<s;E++){var C,A,x;if(fe(C=o.item(E),0,i))me(t,(A=C.prefix||"")?"xmlns:"+A:"xmlns",x=C.namespaceURI),i.push({prefix:A,namespace:x});ge(C,t,n,r,i)}if(l===c&&fe(e,0,i))me(t,(A=e.prefix||"")?"xmlns:"+A:"xmlns",x=e.namespaceURI),i.push({prefix:A,namespace:x});if(u||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(">"),n&&/^script$/i.test(l))for(;u;)u.data?t.push(u.data):ge(u,t,n,r,i.slice()),u=u.nextSibling;else for(;u;)ge(u,t,n,r,i.slice()),u=u.nextSibling;t.push("</",c,">")}else t.push("/>");return;case b:case T:for(u=e.firstChild;u;)ge(u,t,n,r,i.slice()),u=u.nextSibling;return;case h:return me(t,e.name,e.value);case f:return t.push(e.data.replace(/[<&>]/g,j));case m:return t.push("<![CDATA[",e.data,"]]>");case _:return t.push("\x3c!--",e.data,"--\x3e");case w:var P=e.publicId,I=e.systemId;if(t.push("<!DOCTYPE ",e.name),P)t.push(" PUBLIC ",P),I&&"."!=I&&t.push(" ",I),t.push(">");else if(I&&"."!=I)t.push(" SYSTEM ",I,">");else{var O=e.internalSubset;O&&t.push(" [",O,"]"),t.push(">")}return;case y:return t.push("<?",e.target," ",e.data,"?>");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ve(e,t,n){var r;switch(t.nodeType){case p:(r=t.cloneNode(!1)).ownerDocument=e;case T:break;case h:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(ve(e,i,n)),i=i.nextSibling;return r}function ye(e,t,n){var r=new t.constructor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=t[i];"object"!=typeof a&&a!=r[i]&&(r[i]=a)}switch(t.childNodes&&(r.childNodes=new I),r.ownerDocument=e,r.nodeType){case p:var o=t.attributes,s=r.attributes=new L,u=o.length;s._ownerElement=r;for(var l=0;l<u;l++)r.setAttributeNode(ye(e,o.item(l),!0));break;case h:n=!0}if(n)for(var c=t.firstChild;c;)r.appendChild(ye(e,c,n)),c=c.nextSibling;return r}function _e(e,t,n){e[t]=n}P.prototype=Error.prototype,l(S,P),I.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ge(this[r],n,e,t);return n.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},O.prototype.item=function(e){return R(this),this[e]||null},c(O,I),L.prototype={length:0,item:I.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 P(x);var n=this.getNamedItem(e.nodeName);return D(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new P(x);return t=this.getNamedItemNS(e.namespaceURI,e.localName),D(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return M(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return M(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}},U.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,n){var r=new q;if(r.implementation=this,r.childNodes=new I,r.doctype=n||null,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new oe;return r.name=e,r.nodeName=e,r.publicId=t||"",r.systemId=n||"",r}},F.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 Z(this,e,t)},replaceChild:function(e,t){Z(this,e,t,J),t&&this.removeChild(t)},removeChild:function(e){return V(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return ye(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==f&&e.nodeType==f?(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(Object.prototype.hasOwnProperty.call(n,r)&&n[r]===e)return r;t=t.nodeType==h?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e];t=t.nodeType==h?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},l(d,F),l(d,F.prototype),q.prototype={nodeName:"#document",nodeType:b,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==T){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return Z(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===p&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),V(this,e)},replaceChild:function(e,t){Z(this,e,t,J),e.ownerDocument=this,t&&this.removeChild(t),G(e)&&(this.documentElement=e)},importNode:function(e,t){return ve(this,e,t)},getElementById:function(e){var t=null;return B(this.documentElement,(function(n){if(n.nodeType==p&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=u(e);return new O(this,(function(n){var r=[];return t.length>0&&B(n.documentElement,(function(i){if(i!==n&&i.nodeType===p){var a=i.getAttribute("class");if(a){var o=e===a;if(!o){var s=u(a);o=t.every((l=s,function(e){return l&&-1!==l.indexOf(e)}))}o&&r.push(i)}}var l})),r}))},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new I,(t.attributes=new L)._ownerElement=t,t},createDocumentFragment:function(){var e=new ce;return e.ownerDocument=this,e.childNodes=new I,e},createTextNode:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ae;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new de;return n.ownerDocument=this,n.tagName=n.nodeName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new ee,r=t.split(":"),i=n.attributes=new L;return n.childNodes=new I,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 te,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}},c(q,F),ee.prototype={nodeType:p,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===T?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,z(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 O(this,(function(t){var n=[];return B(t,(function(r){r===t||r.nodeType!=p||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new O(this,(function(n){var r=[];return B(n,(function(i){i===n||i.nodeType!==p||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},q.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,q.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,c(ee,F),te.prototype.nodeType=h,c(te,F),ne.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(E[C])},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}},c(ne,F),re.prototype={nodeName:"#text",nodeType:f,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}},c(re,ne),ie.prototype={nodeName:"#comment",nodeType:_},c(ie,ne),ae.prototype={nodeName:"#cdata-section",nodeType:m},c(ae,ne),oe.prototype.nodeType=w,c(oe,F),se.prototype.nodeType=k,c(se,F),ue.prototype.nodeType=v,c(ue,F),le.prototype.nodeType=g,c(le,F),ce.prototype.nodeName="#document-fragment",ce.prototype.nodeType=T,c(ce,F),de.prototype.nodeType=y,c(de,F),pe.prototype.serializeToString=function(e,t,n){return he.call(e,t,n)},F.prototype.toString=he;try{if(Object.defineProperty){var be=function(e){switch(e.nodeType){case p:case T:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(be(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}};Object.defineProperty(O.prototype,"length",{get:function(){return R(this),this.$$length}}),Object.defineProperty(F.prototype,"textContent",{get:function(){return be(this)},set:function(e){switch(this.nodeType){case p:case T: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}}}),_e=function(e,t,n){e["$$"+t]=n}}}catch(we){}t.DocumentType=oe,t.DOMException=P,t.DOMImplementation=U,t.Element=ee,t.Node=F,t.NodeList=I,t.XMLSerializer=pe},4489:function(e,t,n){"use strict";var r=n(12132).freeze;t.XML_ENTITIES=r({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=r({Aacute:"\xc1",aacute:"\xe1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223e",acd:"\u223f",acE:"\u223e\u0333",Acirc:"\xc2",acirc:"\xe2",acute:"\xb4",Acy:"\u0410",acy:"\u0430",AElig:"\xc6",aelig:"\xe6",af:"\u2061",Afr:"\ud835\udd04",afr:"\ud835\udd1e",Agrave:"\xc0",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03b1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2a3f",AMP:"&",amp:"&",And:"\u2a53",and:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",Aogon:"\u0104",aogon:"\u0105",Aopf:"\ud835\udd38",aopf:"\ud835\udd52",ap:"\u2248",apacir:"\u2a6f",apE:"\u2a70",ape:"\u224a",apid:"\u224b",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224a",Aring:"\xc5",aring:"\xe5",Ascr:"\ud835\udc9c",ascr:"\ud835\udcb6",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224d",Atilde:"\xc3",atilde:"\xe3",Auml:"\xc4",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",Backslash:"\u2216",Barv:"\u2ae7",barvee:"\u22bd",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",Bernoullis:"\u212c",Beta:"\u0392",beta:"\u03b2",beth:"\u2136",between:"\u226c",Bfr:"\ud835\udd05",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bNot:"\u2aed",bnot:"\u2310",Bopf:"\ud835\udd39",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxbox:"\u29c9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250c",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252c",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxUL:"\u255d",boxUl:"\u255c",boxuL:"\u255b",boxul:"\u2518",boxUR:"\u255a",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256c",boxVh:"\u256b",boxvH:"\u256a",boxvh:"\u253c",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255f",boxvR:"\u255e",boxvr:"\u251c",bprime:"\u2035",Breve:"\u02d8",breve:"\u02d8",brvbar:"\xa6",Bscr:"\u212c",bscr:"\ud835\udcb7",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",Bumpeq:"\u224e",bumpeq:"\u224f",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22d2",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",CapitalDifferentialD:"\u2145",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",Cayleys:"\u212d",ccaps:"\u2a4d",Ccaron:"\u010c",ccaron:"\u010d",Ccedil:"\xc7",ccedil:"\xe7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2a4c",ccupssm:"\u2a50",Cdot:"\u010a",cdot:"\u010b",cedil:"\xb8",Cedilla:"\xb8",cemptyv:"\u29b2",cent:"\xa2",CenterDot:"\xb7",centerdot:"\xb7",Cfr:"\u212d",cfr:"\ud835\udd20",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03a7",chi:"\u03c7",cir:"\u25cb",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",CircleDot:"\u2299",circledR:"\xae",circledS:"\u24c8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29c3",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2a74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",Congruent:"\u2261",Conint:"\u222f",conint:"\u222e",ContourIntegral:"\u222e",Copf:"\u2102",copf:"\ud835\udd54",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xa9",copy:"\xa9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21b5",Cross:"\u2a2f",cross:"\u2717",Cscr:"\ud835\udc9e",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",Cup:"\u22d3",cup:"\u222a",cupbrcap:"\u2a48",CupCap:"\u224d",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21a1",dArr:"\u21d3",darr:"\u2193",dash:"\u2010",Dashv:"\u2ae4",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",Dcaron:"\u010e",dcaron:"\u010f",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21ca",DDotrahd:"\u2911",ddotseq:"\u2a77",deg:"\xb0",Del:"\u2207",Delta:"\u0394",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",Dfr:"\ud835\udd07",dfr:"\ud835\udd21",dHar:"\u2965",dharl:"\u21c3",dharr:"\u21c2",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",diam:"\u22c4",Diamond:"\u22c4",diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",DifferentialD:"\u2146",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",Dopf:"\ud835\udd3b",dopf:"\ud835\udd55",Dot:"\xa8",dot:"\u02d9",DotDot:"\u20dc",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21d3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",DownTeeArrow:"\u21a7",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",Dscr:"\ud835\udc9f",dscr:"\ud835\udcb9",DScy:"\u0405",dscy:"\u0455",dsol:"\u29f6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",DZcy:"\u040f",dzcy:"\u045f",dzigrarr:"\u27ff",Eacute:"\xc9",eacute:"\xe9",easter:"\u2a6e",Ecaron:"\u011a",ecaron:"\u011b",ecir:"\u2256",Ecirc:"\xca",ecirc:"\xea",ecolon:"\u2255",Ecy:"\u042d",ecy:"\u044d",eDDot:"\u2a77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\ud835\udd08",efr:"\ud835\udd22",eg:"\u2a9a",Egrave:"\xc8",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",Element:"\u2208",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25fb",emptyv:"\u2205",EmptyVerySmallSquare:"\u25ab",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014a",eng:"\u014b",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\ud835\udd3c",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",Epsilon:"\u0395",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",Equal:"\u2a75",equals:"=",EqualTilde:"\u2242",equest:"\u225f",Equilibrium:"\u21cc",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212f",esdot:"\u2250",Esim:"\u2a73",esim:"\u2242",Eta:"\u0397",eta:"\u03b7",ETH:"\xd0",eth:"\xf0",Euml:"\xcb",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",Ffr:"\ud835\udd09",ffr:"\ud835\udd23",filig:"\ufb01",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",Fopf:"\ud835\udd3d",fopf:"\ud835\udd57",ForAll:"\u2200",forall:"\u2200",fork:"\u22d4",forkv:"\u2ad9",Fouriertrf:"\u2131",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\ud835\udcbb",gacute:"\u01f5",Gamma:"\u0393",gamma:"\u03b3",Gammad:"\u03dc",gammad:"\u03dd",gap:"\u2a86",Gbreve:"\u011e",gbreve:"\u011f",Gcedil:"\u0122",Gcirc:"\u011c",gcirc:"\u011d",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2a8c",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",ges:"\u2a7e",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",Gfr:"\ud835\udd0a",gfr:"\ud835\udd24",Gg:"\u22d9",gg:"\u226b",ggg:"\u22d9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2aa5",glE:"\u2a92",glj:"\u2aa4",gnap:"\u2a8a",gnapprox:"\u2a8a",gnE:"\u2269",gne:"\u2a88",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",Gopf:"\ud835\udd3e",gopf:"\ud835\udd58",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",Gt:"\u226b",GT:">",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",hArr:"\u21d4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",Hfr:"\u210c",hfr:"\ud835\udd25",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",Hopf:"\u210d",hopf:"\ud835\udd59",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210b",hscr:"\ud835\udcbd",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xcd",iacute:"\xed",ic:"\u2063",Icirc:"\xce",icirc:"\xee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",Ifr:"\u2111",ifr:"\ud835\udd26",Igrave:"\xcc",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",Int:"\u222c",int:"\u222b",intcal:"\u22ba",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\ud835\udd40",iopf:"\ud835\udd5a",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",Iscr:"\u2110",iscr:"\ud835\udcbe",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xcf",iuml:"\xef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\ud835\udd0d",jfr:"\ud835\udd27",jmath:"\u0237",Jopf:"\ud835\udd41",jopf:"\ud835\udd5b",Jscr:"\ud835\udca5",jscr:"\ud835\udcbf",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\ud835\udd0e",kfr:"\ud835\udd28",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\ud835\udd42",kopf:"\ud835\udd5c",Kscr:"\ud835\udca6",kscr:"\ud835\udcc0",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",Lang:"\u27ea",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\xab",Larr:"\u219e",lArr:"\u21d0",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",lAtail:"\u291b",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lBarr:"\u290e",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",Leftarrow:"\u21d0",leftarrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\ud835\udd0f",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22d8",ll:"\u226a",llarr:"\u21c7",llcorner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lnE:"\u2268",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftarrow:"\u27f5",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",Lopf:"\ud835\udd43",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\ud835\udcc1",Lsh:"\u21b0",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226a",LT:"<",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014",mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\ud835\udd44",mopf:"\ud835\udd5e",mp:"\u2213",Mscr:"\u2133",mscr:"\ud835\udcc2",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21d7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\ud835\udd11",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",nGg:"\u22d9\u0338",ngsim:"\u2275",nGt:"\u226b\u20d2",ngt:"\u226f",ngtr:"\u226f",nGtv:"\u226b\u0338",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlArr:"\u21cd",nlarr:"\u219a",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21cd",nleftarrow:"\u219a",nLeftrightarrow:"\u21ce",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nLl:"\u22d8\u0338",nlsim:"\u2274",nLt:"\u226a\u20d2",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nLtv:"\u226a\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xa0",Nopf:"\u2115",nopf:"\ud835\udd5f",Not:"\u2aec",not:"\xac",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",notin:"\u2209",notindot:"\u22f5\u0338",notinE:"\u22f9\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nRightarrow:"\u21cf",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\ud835\udca9",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",Ntilde:"\xd1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",Nu:"\u039d",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224d\u20d2",nVDash:"\u22af",nVdash:"\u22ae",nvDash:"\u22ad",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvHarr:"\u2904",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwarhk:"\u2923",nwArr:"\u21d6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xd3",oacute:"\xf3",oast:"\u229b",ocir:"\u229a",Ocirc:"\xd4",ocirc:"\xf4",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\ud835\udd12",ofr:"\ud835\udd2c",ogon:"\u02db",Ograve:"\xd2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",Omacr:"\u014c",omacr:"\u014d",Omega:"\u03a9",omega:"\u03c9",Omicron:"\u039f",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",Oopf:"\ud835\udd46",oopf:"\ud835\udd60",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",Or:"\u2a54",or:"\u2228",orarr:"\u21bb",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\ud835\udcaa",oscr:"\u2134",Oslash:"\xd8",oslash:"\xf8",osol:"\u2298",Otilde:"\xd5",otilde:"\xf5",Otimes:"\u2a37",otimes:"\u2297",otimesas:"\u2a36",Ouml:"\xd6",ouml:"\xf6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",par:"\u2225",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\ud835\udd13",pfr:"\ud835\udd2d",Phi:"\u03a6",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",Poincareplane:"\u210c",pointint:"\u2a15",Popf:"\u2119",popf:"\ud835\udd61",pound:"\xa3",Pr:"\u2abb",pr:"\u227a",prap:"\u2ab7",prcue:"\u227c",prE:"\u2ab3",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportion:"\u2237",Proportional:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",Pscr:"\ud835\udcab",pscr:"\ud835\udcc5",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\ud835\udd14",qfr:"\ud835\udd2e",qint:"\u2a0c",Qopf:"\u211a",qopf:"\ud835\udd62",qprime:"\u2057",Qscr:"\ud835\udcac",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",QUOT:'"',quot:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",Rang:"\u27eb",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",Rarr:"\u21a0",rArr:"\u21d2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",rAtail:"\u291c",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",RBarr:"\u2910",rBarr:"\u290f",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",Re:"\u211c",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",REG:"\xae",reg:"\xae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",Rfr:"\u211c",rfr:"\ud835\udd2f",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u03f1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",Rightarrow:"\u21d2",rightarrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",rightthreetimes:"\u22cc",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",Ropf:"\u211d",ropf:"\ud835\udd63",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",Rscr:"\u211b",rscr:"\ud835\udcc7",Rsh:"\u21b1",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",Sc:"\u2abc",sc:"\u227b",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227d",scE:"\u2ab4",sce:"\u2ab0",Scedil:"\u015e",scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",searhk:"\u2925",seArr:"\u21d8",searr:"\u2198",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\ud835\udd16",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",Sopf:"\ud835\udd4a",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",Square:"\u25a1",square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",Sscr:"\ud835\udcae",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",Sub:"\u22d0",sub:"\u2282",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",Subset:"\u22d0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",Sum:"\u2211",sum:"\u2211",sung:"\u266a",Sup:"\u22d1",sup:"\u2283",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supdot:"\u2abe",supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",Supset:"\u22d1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swArr:"\u21d9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",Tab:"\t",target:"\u2316",Tau:"\u03a4",tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\ud835\udd17",tfr:"\ud835\udd31",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\xde",thorn:"\xfe",Tilde:"\u223c",tilde:"\u02dc",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",Topf:"\ud835\udd4b",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\ud835\udcaf",tscr:"\ud835\udcc9",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\xda",uacute:"\xfa",Uarr:"\u219f",uArr:"\u21d1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\ud835\udd18",ufr:"\ud835\udd32",Ugrave:"\xd9",ugrave:"\xf9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\xa8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\ud835\udd4c",uopf:"\ud835\udd66",UpArrow:"\u2191",Uparrow:"\u21d1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",Updownarrow:"\u21d5",updownarrow:"\u2195",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",upsi:"\u03c5",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTee:"\u22a5",UpTeeArrow:"\u21a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\ud835\udcb0",uscr:"\ud835\udcca",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\xdc",uuml:"\xfc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",vArr:"\u21d5",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",Vbar:"\u2aeb",vBar:"\u2ae8",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22ab",Vdash:"\u22a9",vDash:"\u22a8",vdash:"\u22a2",Vdashl:"\u2ae6",Vee:"\u22c1",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\ud835\udd4d",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",Vscr:"\ud835\udcb1",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",Wedge:"\u22c0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\ud835\udd1a",wfr:"\ud835\udd34",Wopf:"\ud835\udd4e",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\ud835\udcb2",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",Xfr:"\ud835\udd1b",xfr:"\ud835\udd35",xhArr:"\u27fa",xharr:"\u27f7",Xi:"\u039e",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",Xopf:"\ud835\udd4f",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",Xscr:"\ud835\udcb3",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\xdd",yacute:"\xfd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\xa5",Yfr:"\ud835\udd1c",yfr:"\ud835\udd36",YIcy:"\u0407",yicy:"\u0457",Yopf:"\ud835\udd50",yopf:"\ud835\udd6a",Yscr:"\ud835\udcb4",yscr:"\ud835\udcce",YUcy:"\u042e",yucy:"\u044e",Yuml:"\u0178",yuml:"\xff",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",Zfr:"\u2128",zfr:"\ud835\udd37",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",Zopf:"\u2124",zopf:"\ud835\udd6b",Zscr:"\ud835\udcb5",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"}),t.entityMap=t.HTML_ENTITIES},65820:function(e,t,n){var r=n(66188);r.DOMImplementation,r.XMLSerializer,t.DOMParser=n(96018).DOMParser},47748:function(e,t,n){var r=n(12132).NAMESPACE,i=/[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]/,a=new RegExp("[\\-\\.0-9"+i.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),o=new RegExp("^"+i.source+a.source+"*(?::"+i.source+a.source+"*)?$");function s(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,s)}function u(){}function l(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function c(e,t,n,i,a,o){function s(e,t,r){n.attributeNames.hasOwnProperty(e)&&o.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),r)}for(var u,l=++t,c=0;;){var d=e.charAt(l);switch(d){case"=":if(1===c)u=e.slice(t,l),c=3;else{if(2!==c)throw new Error("attribute equal must after attrName");c=3}break;case"'":case'"':if(3===c||1===c){if(1===c&&(o.warning('attribute value must after "="'),u=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error("attribute value no end '"+d+"' match");s(u,p=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');s(u,p=e.slice(t,l),t),o.warning('attribute "'+u+'" missed start quot('+d+")!!"),t=l+1,c=5}break;case"/":switch(c){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:c=7,n.closed=!0;case 4:case 1:break;case 2:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==c&&n.setTagName(e.slice(t,l)),l;case">":switch(c){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=e.slice(t,l)).slice(-1)&&(n.closed=!0,p=p.slice(0,-1));case 2:2===c&&(p=u),4==c?(o.warning('attribute "'+p+'" missed quot(")!'),s(u,p,t)):(r.isHTML(i[""])&&p.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),s(p,p,t));break;case 3:throw new Error("attribute value missed!!")}return l;case"\x80":d=" ";default:if(d<=" ")switch(c){case 0:n.setTagName(e.slice(t,l)),c=6;break;case 1:u=e.slice(t,l),c=2;break;case 4:var p=e.slice(t,l);o.warning('attribute "'+p+'" missed quot(")!!'),s(u,p,t);case 5:c=6}else switch(c){case 2:n.tagName;r.isHTML(i[""])&&u.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+u+'" missed value!! "'+u+'" instead2!!'),s(u,u,t),t=l,c=1;break;case 5:o.warning('attribute space is required"'+u+'"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}function d(e,t,n){for(var i=e.tagName,a=null,o=e.length;o--;){var s=e[o],u=s.qName,l=s.value;if((h=u.indexOf(":"))>0)var c=s.prefix=u.slice(0,h),d=u.slice(h+1),p="xmlns"===c&&d;else d=u,c=null,p="xmlns"===u&&"";s.localName=d,!1!==p&&(null==a&&(a={},f(n,n={})),n[p]=a[p]=l,s.uri=r.XMLNS,t.startPrefixMapping(p,l))}for(o=e.length;o--;){(c=(s=e[o]).prefix)&&("xml"===c&&(s.uri=r.XML),"xmlns"!==c&&(s.uri=n[c||""]))}var h;(h=i.indexOf(":"))>0?(c=e.prefix=i.slice(0,h),d=e.localName=i.slice(h+1)):(c=null,d=e.localName=i);var m=e.uri=n[c||""];if(t.startElement(m,d,i,e),!e.closed)return e.currentNSMap=n,e.localNSMap=a,!0;if(t.endElement(m,d,i),a)for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&t.endPrefixMapping(c)}function p(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("</"+n+">",t),o=e.substring(t+1,a);if(/[&<]/.test(o))return/^script$/i.test(n)?(i.characters(o,0,o.length),a):(o=o.replace(/&#?\w+;/g,r),i.characters(o,0,o.length),a)}return t+1}function h(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)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function m(e,t,n,r){if("-"===e.charAt(t+2))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;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 a=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),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var s=a[1][0],u=!1,l=!1;o>3&&(/^public$/i.test(a[2][0])?(u=a[3][0],l=o>4&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var c=a[o-1];return n.startDTD(s,u,l),n.endDTD(),c.index+c[0].length}return-1}function g(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 v(){this.attributeNames={}}s.prototype=new Error,s.prototype.name=s.name,u.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),f(t,t={}),function(e,t,n,i,a){function o(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function u(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?o(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function f(t){if(t>E){var n=e.substring(E,t).replace(/&#?\w+;/g,u);T&&y(E),i.characters(n,0,t-E),E=t}}function y(t,n){for(;t>=b&&(n=w.exec(e));)_=n.index,b=_+n[0].length,T.lineNumber++;T.columnNumber=t-_+1}var _=0,b=0,w=/.*(?:\r\n?|\n)|.*$/g,T=i.locator,k=[{currentNSMap:t}],S={},E=0;for(;;){try{var C=e.indexOf("<",E);if(C<0){if(!e.substr(E).match(/^\s*$/)){var A=i.doc,x=A.createTextNode(e.substr(E));A.appendChild(x),i.currentElement=x}return}switch(C>E&&f(C),e.charAt(C+1)){case"/":var P=e.indexOf(">",C+3),I=e.substring(C+2,P).replace(/[ \t\n\r]+$/g,""),O=k.pop();P<0?(I=e.substring(C+2).replace(/[\s<].*/,""),a.error("end tag name: "+I+" is not complete:"+O.tagName),P=C+1+I.length):I.match(/\s</)&&(I=I.replace(/[\s<].*/,""),a.error("end tag name: "+I+" maybe not complete"),P=C+1+I.length);var R=O.localNSMap,L=O.tagName==I;if(L||O.tagName&&O.tagName.toLowerCase()==I.toLowerCase()){if(i.endElement(O.uri,O.localName,I),R)for(var N in R)Object.prototype.hasOwnProperty.call(R,N)&&i.endPrefixMapping(N);L||a.fatalError("end tag name: "+I+" is not match the current start tagName:"+O.tagName)}else k.push(O);P++;break;case"?":T&&y(C),P=g(e,C,i);break;case"!":T&&y(C),P=m(e,C,i,a);break;default:T&&y(C);var D=new v,M=k[k.length-1].currentNSMap,U=(P=c(e,C,D,M,u,a),D.length);if(!D.closed&&h(e,P,D.tagName,S)&&(D.closed=!0,n.nbsp||a.warning("unclosed xml attribute")),T&&U){for(var F=l(T,{}),j=0;j<U;j++){var B=D[j];y(B.offset),B.locator=l(T,{})}i.locator=F,d(D,i,M)&&k.push(D),i.locator=T}else d(D,i,M)&&k.push(D);r.isHTML(D.uri)&&!D.closed?P=p(e,P,D.tagName,u,i):P++}}catch(q){if(q instanceof s)throw q;a.error("element parse error: "+q),P=-1}P>E?E=P:f(Math.max(C,E)+1)}}(e,t,n,i,this.errorHandler),i.endDocument()}},v.prototype={setTagName:function(e){if(!o.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!o.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,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}},t.XMLReader=u,t.ParseError=s},46676:function(e,t){"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,a=s(e),o=a[0],u=a[1],l=new i(function(e,t,n){return 3*(t+n)/4-n}(0,o,u)),c=0,d=u>0?o-4:o;for(n=0;n<d;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[c++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,l=r-i;s<l;s+=o)a.push(u(e,s,s+o>l?l:s+o));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],r=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=a[o],r[a.charCodeAt(o)]=o;function s(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 u(e,t,r){for(var i,a,o=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},93325:function(e,t,n){"use strict";var r=n(17383).default,i=n(34579).default,a=n(18336).default,o=n(29511).default,s=n(46676),u=n(66897),l="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=p,t.IS=50;var c=2147483647;function d(e){if(e>c)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,p.prototype),t}function p(e,t,n){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return m(e)}return h(e,t,n)}function h(e,t,n){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!p.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|_(e,t),r=d(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){var t=new Uint8Array(e);return v(t.buffer,t.byteOffset,t.byteLength)}return g(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return v(e,t,n);if("undefined"!==typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return v(e,t,n);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return p.from(r,t,n);var i=function(e){if(p.isBuffer(e)){var t=0|y(e.length),n=d(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!==typeof e.length||ee(e.length)?d(0):g(e);if("Buffer"===e.type&&Array.isArray(e.data))return g(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return p.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function m(e){return f(e),d(e<0?0:0|y(e))}function g(e){for(var t=e.length<0?0:0|y(e.length),n=d(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function v(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,p.prototype),r}function y(e){if(e>=c)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+c.toString(16)+" bytes");return 0|e}function _(e,t){if(p.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Q(e).length;default:if(i)return r?-1:Y(e).length;t=(""+t).toLowerCase(),i=!0}}function b(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 N(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return L(this,t,n);case"base64":return P(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function w(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function T(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),ee(n=+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=p.from(t,r)),p.isBuffer(t))return 0===t.length?-1:k(e,t,n,r,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):k(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function k(e,t,n,r,i){var a,o=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;o=2,s/=2,u/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=n;a<s;a++)if(l(e,a)===l(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(n+u>s&&(n=s-u),a=n;a>=0;a--){for(var d=!0,p=0;p<u;p++)if(l(e,a+p)!==l(t,p)){d=!1;break}if(d)return a}return-1}function S(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a,o=t.length;for(r>o/2&&(r=o/2),a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(ee(s))return a;e[n+a]=s}return a}function E(e,t,n,r){return J(Y(t,e.length-n),e,n,r)}function C(e,t,n,r){return J(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function A(e,t,n,r){return J(Q(t),e,n,r)}function x(e,t,n,r){return J(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function P(e,t,n){return 0===t&&n===e.length?s.fromByteArray(e):s.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=n){var u=void 0,l=void 0,c=void 0,d=void 0;switch(s){case 1:a<128&&(o=a);break;case 2:128===(192&(u=e[i+1]))&&(d=(31&a)<<6|63&u)>127&&(o=d);break;case 3:u=e[i+1],l=e[i+2],128===(192&u)&&128===(192&l)&&(d=(15&a)<<12|(63&u)<<6|63&l)>2047&&(d<55296||d>57343)&&(o=d);break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],128===(192&u)&&128===(192&l)&&128===(192&c)&&(d=(15&a)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&d<1114112&&(o=d)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=O));return n}(r)}p.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(n){return!1}}(),p.TYPED_ARRAY_SUPPORT||"undefined"===typeof console||"function"!==typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}}),p.poolSize=8192,p.from=function(e,t,n){return h(e,t,n)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array),p.alloc=function(e,t,n){return function(e,t,n){return f(e),e<=0?d(e):void 0!==t?"string"===typeof n?d(e).fill(t,n):d(e).fill(t):d(e)}(e,t,n)},p.allocUnsafe=function(e){return m(e)},p.allocUnsafeSlow=function(e){return m(e)},p.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==p.prototype},p.compare=function(e,t){if(Z(e,Uint8Array)&&(e=p.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=p.from(t,t.offset,t.byteLength)),!p.isBuffer(e)||!p.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},p.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}},p.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return p.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=p.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(Z(a,Uint8Array))i+a.length>r.length?(p.isBuffer(a)||(a=p.from(a)),a.copy(r,i)):Uint8Array.prototype.set.call(r,a,i);else{if(!p.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i)}i+=a.length}return r},p.byteLength=_,p.prototype._isBuffer=!0,p.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)w(this,t,t+1);return this},p.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)w(this,t,t+3),w(this,t+1,t+2);return this},p.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)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},p.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?I(this,0,e):b.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(e){if(!p.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===p.compare(this,e)},p.prototype.inspect=function(){var e="",n=t.IS;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},l&&(p.prototype[l]=p.prototype.inspect),p.prototype.compare=function(e,t,n,r,i){if(Z(e,Uint8Array)&&(e=p.from(e,e.offset,e.byteLength)),!p.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);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 a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),u=this.slice(r,i),l=e.slice(t,n),c=0;c<s;++c)if(u[c]!==l[c]){a=u[c],o=l[c];break}return a<o?-1:o<a?1:0},p.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},p.prototype.indexOf=function(e,t,n){return T(this,e,t,n,!0)},p.prototype.lastIndexOf=function(e,t,n){return T(this,e,t,n,!1)},p.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 a=!1;;)switch(r){case"hex":return S(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":case"latin1":case"binary":return C(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function R(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 L(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 N(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=te[e[a]];return i}function D(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length-1;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function M(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 U(e,t,n,r,i,a){if(!p.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function F(e,t,n,r,i){G(t,r,i,e,n,7);var a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function j(e,t,n,r,i){G(t,r,i,e,n,7);var a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function B(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function q(e,t,n,r,i){return t=+t,n>>>=0,i||B(e,0,n,4),u.write(e,t,n,r,23,4),n+4}function H(e,t,n,r,i){return t=+t,n>>>=0,i||B(e,0,n,8),u.write(e,t,n,r,52,8),n+8}p.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,p.prototype),r},p.prototype.readUintLE=p.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},p.prototype.readUintBE=p.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},p.prototype.readUint8=p.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},p.prototype.readBigUInt64LE=ne((function(e){X(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||K(e,this.length-8);var r=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),i=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(r)+(BigInt(i)<<BigInt(32))})),p.prototype.readBigUInt64BE=ne((function(e){X(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||K(e,this.length-8);var r=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],i=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),p.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},p.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},p.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},p.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},p.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},p.prototype.readBigInt64LE=ne((function(e){X(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||K(e,this.length-8);var r=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24))})),p.prototype.readBigInt64BE=ne((function(e){X(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||K(e,this.length-8);var r=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+n)})),p.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),u.read(this,e,!0,23,4)},p.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),u.read(this,e,!1,23,4)},p.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),u.read(this,e,!0,52,8)},p.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),u.read(this,e,!1,52,8)},p.prototype.writeUintLE=p.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||U(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||U(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},p.prototype.writeUint8=p.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,1,255,0),this[t]=255&e,t+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigUInt64LE=ne((function(e){return F(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeBigUInt64BE=ne((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);U(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},p.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);U(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},p.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},p.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},p.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigInt64LE=ne((function(e){return F(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeBigInt64BE=ne((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeFloatLE=function(e,t,n){return q(this,e,t,!0,n)},p.prototype.writeFloatBE=function(e,t,n){return q(this,e,t,!1,n)},p.prototype.writeDoubleLE=function(e,t,n){return H(this,e,t,!0,n)},p.prototype.writeDoubleBE=function(e,t,n){return H(this,e,t,!1,n)},p.prototype.copy=function(e,t,n,r){if(!p.isBuffer(e))throw new TypeError("argument should be a Buffer");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("Index out of range");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=r-n;return this===e&&"function"===typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},p.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),void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!p.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"===typeof e?e&=255:"boolean"===typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=p.isBuffer(e)?e:p.from(e,r),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var z={};function V(e,t,n){z[e]=function(n){function s(){var n;return r(this,s),n=a(this,s),Object.defineProperty(n,"message",{value:t.apply(n,arguments),writable:!0,configurable:!0}),n.name="".concat(n.name," [").concat(e,"]"),n.stack,delete n.name,n}return o(s,n),i(s,[{key:"code",get:function(){return e},set:function(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(e,"]: ").concat(this.message)}}])}(n)}function W(e){for(var t="",n=e.length,r="-"===e[0]?1:0;n>=r+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function G(e,t,n,r,i,a){if(e>n||e<t){var o,s="bigint"===typeof t?"n":"";throw o=a>3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(a+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(a+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(a+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(n).concat(s),new z.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){X(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||K(t,e.length-(n+1))}(r,i,a)}function X(e,t){if("number"!==typeof e)throw new z.ERR_INVALID_ARG_TYPE(t,"number",e)}function K(e,t,n){if(Math.floor(e)!==e)throw X(e,n),new z.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(t),e)}V("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),V("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)}),TypeError),V("ERR_OUT_OF_RANGE",(function(e,t,n){var r='The value of "'.concat(e,'" is out of range.'),i=n;return Number.isInteger(n)&&Math.abs(n)>Math.pow(2,32)?i=W(String(n)):"bigint"===typeof n&&(i=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(i=W(i)),i+="n"),r+=" It must be ".concat(t,". Received ").concat(i)}),RangeError);var $=/[^+/0-9A-Za-z-_]/g;function Y(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.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;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function Q(e){return s.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace($,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function J(e,t,n,r){var i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function ee(e){return e!==e}var te=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}();function ne(e){return"undefined"===typeof BigInt?re:e}function re(){throw new Error("BigInt not supported")}},63785:function(e,t){"use strict";t.parse=function(e,t){if("string"!==typeof e)throw new TypeError("argument str must be a string");for(var r={},a=t||{},s=e.split(i),u=a.decode||n,l=0;l<s.length;l++){var c=s[l],d=c.indexOf("=");if(!(d<0)){var p=c.substr(0,d).trim(),h=c.substr(++d,c.length).trim();'"'==h[0]&&(h=h.slice(1,-1)),void 0==r[p]&&(r[p]=o(h,u))}}return r},t.serialize=function(e,t,n){var i=n||{},o=i.encode||r;if("function"!==typeof o)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");var s=o(t);if(s&&!a.test(s))throw new TypeError("argument val is invalid");var u=e+"="+s;if(null!=i.maxAge){var l=i.maxAge-0;if(isNaN(l))throw new Error("maxAge should be a Number");u+="; Max-Age="+Math.floor(l)}if(i.domain){if(!a.test(i.domain))throw new TypeError("option domain is invalid");u+="; Domain="+i.domain}if(i.path){if(!a.test(i.path))throw new TypeError("option path is invalid");u+="; Path="+i.path}if(i.expires){if("function"!==typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");u+="; Expires="+i.expires.toUTCString()}i.httpOnly&&(u+="; HttpOnly");i.secure&&(u+="; Secure");if(i.sameSite){switch("string"===typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;default:throw new TypeError("option sameSite is invalid")}}return u};var n=decodeURIComponent,r=encodeURIComponent,i=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function o(e,t){try{return t(e)}catch(n){return e}}},4159:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",i="second",a="minute",o="hour",s="day",u="week",l="month",c="quarter",d="year",p="date",h="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:u,d:s,D:p,h:o,m:a,s:i,ms:r,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},_="en",b={};b[_]=g;var w=function(e){return e instanceof E},T=function(e,t,n){var r;if(!e)return _;if("string"==typeof e)b[e]&&(r=e),t&&(b[e]=t,r=e);else{var i=e.name;b[i]=e,r=i}return!n&&r&&(_=r),r||!n&&_},k=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new E(n)},S=y;S.l=T,S.i=w,S.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=T(e.locale,null,!0),this.parse(e)}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(f);if(r){var i=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return S},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return k(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<k(e)},v.$g=function(e,t,n){return S.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,r=!!S.u(t)||t,c=S.p(e),h=function(e,t){var i=S.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},f=function(e,t){return S.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},m=this.$W,g=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case d:return r?h(1,0):h(31,11);case l:return r?h(1,g):h(0,g+1);case u:var _=this.$locale().weekStart||0,b=(m<_?m+7:m)-_;return h(r?v-b:v+(6-b),g);case s:case p:return f(y+"Hours",0);case o:return f(y+"Minutes",1);case a:return f(y+"Seconds",2);case i:return f(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,u=S.p(e),c="set"+(this.$u?"UTC":""),h=(n={},n[s]=c+"Date",n[p]=c+"Date",n[l]=c+"Month",n[d]=c+"FullYear",n[o]=c+"Hours",n[a]=c+"Minutes",n[i]=c+"Seconds",n[r]=c+"Milliseconds",n)[u],f=u===s?this.$D+(t-this.$W):t;if(u===l||u===d){var m=this.clone().set(p,1);m.$d[h](f),m.init(),this.$d=m.set(p,Math.min(this.$D,m.daysInMonth())).$d}else h&&this.$d[h](f);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[S.p(e)]()},v.add=function(r,c){var p,h=this;r=Number(r);var f=S.p(c),m=function(e){var t=k(h);return S.w(t.date(t.date()+Math.round(e*r)),h)};if(f===l)return this.set(l,this.$M+r);if(f===d)return this.set(d,this.$y+r);if(f===s)return m(1);if(f===u)return m(7);var g=(p={},p[a]=t,p[o]=n,p[i]=e,p)[f]||1,v=this.$d.getTime()+r*g;return S.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",i=S.z(this),a=this.$H,o=this.$m,s=this.$M,u=n.weekdays,l=n.months,c=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].substr(0,a)},d=function(e){return S.s(a%12||12,e,"0")},p=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},f={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:S.s(s+1,2,"0"),MMM:c(n.monthsShort,s,l,3),MMMM:c(l,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:c(n.weekdaysMin,this.$W,u,2),ddd:c(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(a),HH:S.s(a,2,"0"),h:d(1),hh:d(2),a:p(a,o,!0),A:p(a,o,!1),m:String(o),mm:S.s(o,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:i};return r.replace(m,(function(e,t){return t||f[e]||i.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(r,p,h){var f,m=S.p(p),g=k(r),v=(g.utcOffset()-this.utcOffset())*t,y=this-g,_=S.m(this,g);return _=(f={},f[d]=_/12,f[l]=_,f[c]=_/3,f[u]=(y-v)/6048e5,f[s]=(y-v)/864e5,f[o]=y/n,f[a]=y/t,f[i]=y/e,f)[m]||y,h?_:S.a(_)},v.daysInMonth=function(){return this.endOf(l).$D},v.$locale=function(){return b[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=T(e,t,!0);return r&&(n.$L=r),n},v.clone=function(){return S.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),C=E.prototype;return k.prototype=C,[["$ms",r],["$s",i],["$m",a],["$H",o],["$W",s],["$M",l],["$y",d],["$D",p]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),k.extend=function(e,t){return e.$i||(e(t,E,k),e.$i=!0),k},k.locale=T,k.isDayjs=w,k.unix=function(e){return k(1e3*e)},k.en=b[_],k.Ls=b,k.p={},k}()},37609:function(e){e.exports=function(){"use strict";return function(e,t,n){e=e||{};var r=t.prototype,i={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(e,t,n,i){return r.fromToBase(e,t,n,i)}n.en.relativeTime=i,r.fromToBase=function(t,r,a,o,s){for(var u,l,c,d=a.$locale().relativeTime||i,p=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],h=p.length,f=0;f<h;f+=1){var m=p[f];m.d&&(u=o?n(t).diff(a,m.d,!0):a.diff(t,m.d,!0));var g=(e.rounding||Math.round)(Math.abs(u));if(c=u>0,g<=m.r||!m.r){g<=1&&f>0&&(m=p[f-1]);var v=d[m.l];s&&(g=s(""+g)),l="string"==typeof v?v.replace("%d",g):v(g,r,m.l,c);break}}if(r)return l;var y=c?d.future:d.past;return"function"==typeof y?y(l):y.replace("%s",l)},r.to=function(e,t){return a(e,t,this,!0)},r.from=function(e,t){return a(e,t,this)};var o=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(o(this),e)},r.fromNow=function(e){return this.from(o(this),e)}}}()},85520:function(e){e.exports="object"==typeof self?self.FormData:window.FormData},15063:function(e,t,n){var r,i="undefined"!==typeof n.g?n.g:"undefined"!==typeof window?window:{},a=n(80542);"undefined"!==typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=r},77626:function(e,t,n){var r;r="undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self?self:{},e.exports=r},66897:function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,d=n?i-1:0,p=n?-1:1,h=e[t+d];for(d+=p,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+d],d+=p,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+d],d+=p,c-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=l}return(h?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,u,l=8*a-i-1,c=(1<<l)-1,d=c>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,f=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,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+d>=1?p/u:p*Math.pow(2,1-d))*u>=2&&(o++,u/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*u-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=f,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+h]=255&o,h+=f,o/=256,l-=8);e[n+h-f]|=128*m}},28650:function(e){e.exports=function(e){if(!e)return!1;var n=t.call(e);return"[object Function]"===n||"function"===typeof e&&"[object RegExp]"!==n||"undefined"!==typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},26391: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 o[e];var n,a=String(e);return(n=r[a.toLowerCase()])?n:(n=i[a.toLowerCase()])||(1===a.length?a.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"===typeof e){var n=e.which||e.keyCode||e.charCode;if(null===n||void 0===n)return!1;if("string"===typeof t){var a;if(a=r[t.toLowerCase()])return a===n;if(a=i[t.toLowerCase()])return a===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,"\u21e7":16,"\u2325":18,"\u2303":17,"\u2318":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(a=97;a<123;a++)r[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)r[a-48]=a;for(a=1;a<13;a++)r["f"+a]=a+111;for(a=0;a<10;a++)r["numpad "+a]=a+96;var o=t.names=t.title={};for(a in r)o[r[a]]=a;for(var s in i)r[s]=i[s]},72024:function(e,t,n){var r=n(45672).getUint64;e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},i=12;0===n.version?(n.earliestPresentationTime=t.getUint32(i),n.firstOffset=t.getUint32(i+4),i+=8):(n.earliestPresentationTime=r(e.subarray(i)),n.firstOffset=r(e.subarray(i+8)),i+=16),i+=2;var a=t.getUint16(i);for(i+=2;a>0;i+=12,a--)n.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return n}},82356:function(e){var t,n,r,i,a,o,s,u=9e4;t=function(e){return e*u},n=function(e,t){return e*t},r=function(e){return e/u},i=function(e,t){return e/t},a=function(e,n){return t(i(e,n))},o=function(e,t){return n(r(e),t)},s=function(e,t,n){return r(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:u,secondsToVideoTs:t,secondsToAudioTs:n,videoTsToSeconds:r,audioTsToSeconds:i,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:s}},45672:function(e){var t=Math.pow(2,32);e.exports={getUint64:function(e){var n,r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getBigUint64?(n=r.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(n):n:r.getUint32(0)*t+r.getUint32(4)},MAX_UINT32:t}},26470:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;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(i){return!1}}()?Object.assign:function(e,i){for(var a,o,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){for(var l in a=Object(arguments[u]))n.call(a,l)&&(s[l]=a[l]);if(t){o=t(a);for(var c=0;c<o.length;c++)r.call(a,o[c])&&(s[o[c]]=a[o[c]])}}return s}},85224:function(e){var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"===typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"===typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var s,u=[],l=!1,c=-1;function d(){l&&s&&(l=!1,s.length?u=s.concat(u):c=-1,u.length&&p())}function p(){if(!l){var e=o(d);l=!0;for(var t=u.length;t;){for(s=u,u=[];++c<t;)s&&s[c].run();c=-1,t=u.length}s=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function f(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||l||o(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=f,r.addListener=f,r.once=f,r.off=f,r.removeListener=f,r.removeAllListeners=f,r.emit=f,r.prependListener=f,r.prependOnceListener=f,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},43488:function(e,t,n){"use strict";var r=n(93959);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==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,bigint: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:a,resetWarningCache:i};return n.PropTypes=n,n}},11942:function(e,t,n){e.exports=n(43488)()},93959:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},58801:function(e,t,n){"use strict";var r=n(85224);var i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var a=s(n(63785)),o=s(n(26470));function s(e){return e&&e.__esModule?e:{default:e}}var u="undefined"===typeof document||"undefined"!==typeof r&&{NODE_ENV:"production",PUBLIC_URL:"http://0.0.0.0:3000/assets/bundles",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}&&!1,l={},c=void 0;function d(){return c&&!c.headersSent}function p(e,t){var n=u?l:a.default.parse(document.cookie),r=n&&n[e];if("undefined"===typeof t&&(t=!r||"{"!==r[0]&&"["!==r[0]),!t)try{r=JSON.parse(r)}catch(i){}return r}function h(e){var t=u?l:a.default.parse(document.cookie);if("undefined"===typeof e&&(e=!t||"{"!==t[0]&&"["!==t[0]),!e)try{t=JSON.parse(t)}catch(n){}return t}function f(e){var t=u?l:a.default.parse(document.cookie);return t?e?Object.keys(t).reduce((function(n,r){if(!e.test(r))return n;var i={};return i[r]=t[r],(0,o.default)({},n,i)}),{}):t:{}}function m(e,t,n){l[e]=t,"object"===("undefined"===typeof t?"undefined":i(t))&&(l[e]=JSON.stringify(t)),u||(document.cookie=a.default.serialize(e,l[e],n)),d()&&c.cookie&&c.cookie(e,t,n)}function g(e,t){delete l[e],t="undefined"===typeof t?{}:"string"===typeof t?{path:t}:(0,o.default)({},t),"undefined"!==typeof document&&(t.expires=new Date(1970,1,1,0,0,1),t.maxAge=0,document.cookie=a.default.serialize(e,"",t)),d()&&c.clearCookie&&c.clearCookie(e,t)}function v(e){l=e?a.default.parse(e):{}}function y(e,t){return e.cookie?l=e.cookie:e.cookies?l=e.cookies:e.headers&&e.headers.cookie?v(e.headers.cookie):l={},c=t,function(){c=null,l={}}}t.Ay={setRawCookie:v,load:p,loadAll:h,select:f,save:m,remove:g,plugToRequest:y}},38345:function(e,t,n){"use strict";var r=n(9950),i=n(26470),a=n(75340);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(o(227));var s=new Set,u={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(u[e]=t,e=0;e<t.length;e++)s.add(t[e])}var d=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),p=/^[: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]*$/,h=Object.prototype.hasOwnProperty,f={},m={};function g(e,t,n,r,i,a,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=a,this.removeEmptyString=o}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){v[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];v[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){v[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){v[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){v[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){v[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){v[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){v[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){v[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function _(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=v.hasOwnProperty(t)?v[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||"undefined"===typeof 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!!h.call(m,e)||!h.call(f,e)&&(p.test(e)?m[e]=!0:(f[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))))}"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(y,_);v[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,_);v[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,_);v[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,T=60103,k=60106,S=60107,E=60108,C=60114,A=60109,x=60110,P=60112,I=60113,O=60120,R=60115,L=60116,N=60121,D=60128,M=60129,U=60130,F=60131;if("function"===typeof Symbol&&Symbol.for){var j=Symbol.for;T=j("react.element"),k=j("react.portal"),S=j("react.fragment"),E=j("react.strict_mode"),C=j("react.profiler"),A=j("react.provider"),x=j("react.context"),P=j("react.forward_ref"),I=j("react.suspense"),O=j("react.suspense_list"),R=j("react.memo"),L=j("react.lazy"),N=j("react.block"),j("react.scope"),D=j("react.opaque.id"),M=j("react.debug_trace_mode"),U=j("react.offscreen"),F=j("react.legacy_hidden")}var B,q="function"===typeof Symbol&&Symbol.iterator;function H(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=q&&e[q]||e["@@iterator"])?e:null}function z(e){if(void 0===B)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);B=t&&t[1]||""}return"\n"+B+e}var V=!1;function W(e,t){if(!e||V)return"";V=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var i=u.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s])return"\n"+i[o].replace(" at new "," at ")}while(1<=o&&0<=s);break}}}finally{V=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?z(e):""}function G(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=W(e.type,!1);case 11:return e=W(e.type.render,!1);case 22:return e=W(e.type._render,!1);case 1:return e=W(e.type,!0);default:return""}}function X(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 S:return"Fragment";case k:return"Portal";case C:return"Profiler";case E:return"StrictMode";case I:return"Suspense";case O:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case x:return(e.displayName||"Context")+".Consumer";case A:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case R:return X(e.type);case N:return X(e._render);case L:t=e._payload,e=e._init;try{return X(e(t))}catch(n){}}return null}function K(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function $(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=$(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.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 Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(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 ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(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 te(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=K(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")?ie(e,t.type,n):t.hasOwnProperty("defaultValue")&&ie(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(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._wrapperState.initialChecked,""!==n&&(e.name=n)}function ie(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ae(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 oe(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=""+K(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 se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ue(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function le(e,t){var n=K(t.value),r=K(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 ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de="http://www.w3.org/1999/xhtml",pe="http://www.w3.org/2000/svg";function he(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 fe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?he(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var me,ge,ve=(ge=function(e,t){if(e.namespaceURI!==pe||"innerHTML"in e)e.innerHTML=t;else{for((me=me||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ge(e,t)}))}:ge);function ye(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var _e={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},be=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||_e.hasOwnProperty(e)&&_e[e]?(""+t).trim():t+"px"}function Te(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(_e).forEach((function(e){be.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_e[t]=_e[e]}))}));var ke=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 Se(e,t){if(t){if(ke[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function Ee(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 Ce(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ae=null,xe=null,Pe=null;function Ie(e){if(e=ri(e)){if("function"!==typeof Ae)throw Error(o(280));var t=e.stateNode;t&&(t=ai(t),Ae(e.stateNode,e.type,t))}}function Oe(e){xe?Pe?Pe.push(e):Pe=[e]:xe=e}function Re(){if(xe){var e=xe,t=Pe;if(Pe=xe=null,Ie(e),t)for(e=0;e<t.length;e++)Ie(t[e])}}function Le(e,t){return e(t)}function Ne(e,t,n,r,i){return e(t,n,r,i)}function De(){}var Me=Le,Ue=!1,Fe=!1;function je(){null===xe&&null===Pe||(De(),Re())}function Be(e,t){var n=e.stateNode;if(null===n)return null;var r=ai(n);if(null===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":case"onMouseEnter":(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(o(231,t,typeof n));return n}var qe=!1;if(d)try{var He={};Object.defineProperty(He,"passive",{get:function(){qe=!0}}),window.addEventListener("test",He,He),window.removeEventListener("test",He,He)}catch(ge){qe=!1}function ze(e,t,n,r,i,a,o,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(c){this.onError(c)}}var Ve=!1,We=null,Ge=!1,Xe=null,Ke={onError:function(e){Ve=!0,We=e}};function $e(e,t,n,r,i,a,o,s,u){Ve=!1,We=null,ze.apply(Ke,arguments)}function Ye(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(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 Je(e){if(Ye(e)!==e)throw Error(o(188))}function Ze(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ye(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Je(i),e;if(a===r)return Je(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=a;break}if(u===r){s=!0,r=i,n=a;break}u=u.sibling}if(!s){for(u=a.child;u;){if(u===n){s=!0,n=a,r=i;break}if(u===r){s=!0,r=a,n=i;break}u=u.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e),!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}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,it,at=!1,ot=[],st=null,ut=null,lt=null,ct=new Map,dt=new Map,pt=[],ht="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ft(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function mt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":ut=null;break;case"mouseover":case"mouseout":lt=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":dt.delete(t.pointerId)}}function gt(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e=ft(t,n,r,i,a),null!==t&&(null!==(t=ri(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function vt(e){var t=ni(e.target);if(null!==t){var n=Ye(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void it(e.lanePriority,(function(){a.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function yt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ri(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function _t(e,t,n){yt(e)&&n.delete(t)}function bt(){for(at=!1;0<ot.length;){var e=ot[0];if(null!==e.blockedOn){null!==(e=ri(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&ot.shift()}null!==st&&yt(st)&&(st=null),null!==ut&&yt(ut)&&(ut=null),null!==lt&&yt(lt)&&(lt=null),ct.forEach(_t),dt.forEach(_t)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,at||(at=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,bt)))}function Tt(e){function t(t){return wt(t,e)}if(0<ot.length){wt(ot[0],e);for(var n=1;n<ot.length;n++){var r=ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&wt(st,e),null!==ut&&wt(ut,e),null!==lt&&wt(lt,e),ct.forEach(t),dt.forEach(t),n=0;n<pt.length;n++)(r=pt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<pt.length&&null===(n=pt[0]).blockedOn;)vt(n),null===n.blockedOn&&pt.shift()}function kt(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:kt("Animation","AnimationEnd"),animationiteration:kt("Animation","AnimationIteration"),animationstart:kt("Animation","AnimationStart"),transitionend:kt("Transition","TransitionEnd")},Et={},Ct={};function At(e){if(Et[e])return Et[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ct)return Et[e]=n[t];return e}d&&(Ct=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var xt=At("animationend"),Pt=At("animationiteration"),It=At("animationstart"),Ot=At("transitionend"),Rt=new Map,Lt=new Map,Nt=["abort","abort",xt,"animationEnd",Pt,"animationIteration",It,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ot,"transitionEnd","waiting","waiting"];function Dt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Lt.set(r,t),Rt.set(r,i),l(i,[r])}}(0,a.unstable_now)();var Mt=8;function Ut(e){if(0!==(1&e))return Mt=15,1;if(0!==(2&e))return Mt=14,2;if(0!==(4&e))return Mt=13,4;var t=24&e;return 0!==t?(Mt=12,t):0!==(32&e)?(Mt=11,32):0!==(t=192&e)?(Mt=10,t):0!==(256&e)?(Mt=9,256):0!==(t=3584&e)?(Mt=8,t):0!==(4096&e)?(Mt=7,4096):0!==(t=4186112&e)?(Mt=6,t):0!==(t=62914560&e)?(Mt=5,t):67108864&e?(Mt=4,67108864):0!==(134217728&e)?(Mt=3,134217728):0!==(t=805306368&e)?(Mt=2,t):0!==(1073741824&e)?(Mt=1,1073741824):(Mt=8,e)}function Ft(e,t){var n=e.pendingLanes;if(0===n)return Mt=0;var r=0,i=0,a=e.expiredLanes,o=e.suspendedLanes,s=e.pingedLanes;if(0!==a)r=a,i=Mt=15;else if(0!==(a=134217727&n)){var u=a&~o;0!==u?(r=Ut(u),i=Mt):0!==(s&=a)&&(r=Ut(s),i=Mt)}else 0!==(a=n&~o)?(r=Ut(a),i=Mt):0!==s&&(r=Ut(s),i=Mt);if(0===r)return 0;if(r=n&((0>(r=31-Vt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&o)){if(Ut(t),i<=Mt)return t;Mt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Vt(t)),r|=e[n],t&=~i;return r}function jt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Bt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=qt(24&~t))?Bt(10,t):e;case 10:return 0===(e=qt(192&~t))?Bt(8,t):e;case 8:return 0===(e=qt(3584&~t))&&(0===(e=qt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=qt(805306368&~t))&&(t=268435456),t}throw Error(o(358,e))}function qt(e){return e&-e}function Ht(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function zt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Vt(t)]=n}var Vt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Wt(e)/Gt|0)|0},Wt=Math.log,Gt=Math.LN2;var Xt=a.unstable_UserBlockingPriority,Kt=a.unstable_runWithPriority,$t=!0;function Yt(e,t,n,r){Ue||De();var i=Jt,a=Ue;Ue=!0;try{Ne(i,e,t,n,r)}finally{(Ue=a)||je()}}function Qt(e,t,n,r){Kt(Xt,Jt.bind(null,e,t,n,r))}function Jt(e,t,n,r){var i;if($t)if((i=0===(4&t))&&0<ot.length&&-1<ht.indexOf(e))e=ft(null,e,t,n,r),ot.push(e);else{var a=Zt(e,t,n,r);if(null===a)i&&mt(e,r);else{if(i){if(-1<ht.indexOf(e))return e=ft(a,e,t,n,r),void ot.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return st=gt(st,e,t,n,r,i),!0;case"dragenter":return ut=gt(ut,e,t,n,r,i),!0;case"mouseover":return lt=gt(lt,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return ct.set(a,gt(ct.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,dt.set(a,gt(dt.get(a)||null,e,t,n,r,i)),!0}return!1}(a,e,t,n,r))return;mt(e,r)}Dr(e,t,r,null,n)}}}function Zt(e,t,n,r){var i=Ce(r);if(null!==(i=ni(i))){var a=Ye(i);if(null===a)i=null;else{var o=a.tag;if(13===o){if(null!==(i=Qe(a)))return i;i=null}else if(3===o){if(a.stateNode.hydrate)return 3===a.tag?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return Dr(e,t,r,i,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,i="value"in en?en.value:en.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return nn=i.slice(e,1<t?1-t:void 0)}function an(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}function on(){return!0}function sn(){return!1}function un(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?on:sn,this.isPropagationStopped=sn,this}return i(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=on)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var ln,cn,dn,pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hn=un(pn),fn=i({},pn,{view:0,detail:0}),mn=un(fn),gn=i({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==dn&&(dn&&"mousemove"===e.type?(ln=e.screenX-dn.screenX,cn=e.screenY-dn.screenY):cn=ln=0,dn=e),ln)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),vn=un(gn),yn=un(i({},gn,{dataTransfer:0})),_n=un(i({},fn,{relatedTarget:0})),bn=un(i({},pn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=i({},pn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Tn=un(wn),kn=un(i({},pn,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},En={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"},Cn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function An(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Cn[e])&&!!t[e]}function xn(){return An}var Pn=i({},fn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=an(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?En[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xn,charCode:function(e){return"keypress"===e.type?an(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?an(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),In=un(Pn),On=un(i({},gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=un(i({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xn})),Ln=un(i({},pn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=i({},gn,{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:0,deltaMode:0}),Dn=un(Nn),Mn=[9,13,27,32],Un=d&&"CompositionEvent"in window,Fn=null;d&&"documentMode"in document&&(Fn=document.documentMode);var jn=d&&"TextEvent"in window&&!Fn,Bn=d&&(!Un||Fn&&8<Fn&&11>=Fn),qn=String.fromCharCode(32),Hn=!1;function zn(e,t){switch(e){case"keyup":return-1!==Mn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Wn=!1;var Gn={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 Xn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Gn[e.type]:"textarea"===t}function Kn(e,t,n,r){Oe(r),0<(t=Ur(t,"onChange")).length&&(n=new hn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var $n=null,Yn=null;function Qn(e){Pr(e,0)}function Jn(e){if(Q(ii(e)))return e}function Zn(e,t){if("change"===e)return t}var er=!1;if(d){var tr;if(d){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"===typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function ir(){$n&&($n.detachEvent("onpropertychange",ar),Yn=$n=null)}function ar(e){if("value"===e.propertyName&&Jn(Yn)){var t=[];if(Kn(t,Yn,e,Ce(e)),e=Qn,Ue)e(t);else{Ue=!0;try{Le(e,t)}finally{Ue=!1,je()}}}}function or(e,t,n){"focusin"===e?(ir(),Yn=n,($n=t).attachEvent("onpropertychange",ar)):"focusout"===e&&ir()}function sr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Jn(Yn)}function ur(e,t){if("click"===e)return Jn(t)}function lr(e,t){if("input"===e||"change"===e)return Jn(t)}var cr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},dr=Object.prototype.hasOwnProperty;function pr(e,t){if(cr(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(!dr.call(t,n[r])||!cr(e[n[r]],t[n[r]]))return!1;return!0}function hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fr(e,t){var n,r=hr(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=hr(r)}}function mr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?mr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function gr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function vr(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 yr=d&&"documentMode"in document&&11>=document.documentMode,_r=null,br=null,wr=null,Tr=!1;function kr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Tr||null==_r||_r!==J(r)||("selectionStart"in(r=_r)&&vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&pr(wr,r)||(wr=r,0<(r=Ur(br,"onSelect")).length&&(t=new hn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=_r)))}Dt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Dt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Dt(Nt,2);for(var Sr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Er=0;Er<Sr.length;Er++)Lt.set(Sr[Er],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ar=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cr));function xr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,s,u,l){if($e.apply(this,arguments),Ve){if(!Ve)throw Error(o(198));var c=We;Ve=!1,We=null,Ge||(Ge=!0,Xe=c)}}(r,t,void 0,e),e.currentTarget=null}function Pr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],u=s.instance,l=s.currentTarget;if(s=s.listener,u!==a&&i.isPropagationStopped())break e;xr(i,s,l),a=u}else for(o=0;o<r.length;o++){if(u=(s=r[o]).instance,l=s.currentTarget,s=s.listener,u!==a&&i.isPropagationStopped())break e;xr(i,s,l),a=u}}}if(Ge)throw e=Xe,Ge=!1,Xe=null,e}function Ir(e,t){var n=oi(t),r=e+"__bubble";n.has(r)||(Nr(t,e,2,!1),n.add(r))}var Or="_reactListening"+Math.random().toString(36).slice(2);function Rr(e){e[Or]||(e[Or]=!0,s.forEach((function(t){Ar.has(t)||Lr(t,!1,e,null),Lr(t,!0,e,null)})))}function Lr(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,a=n;if("selectionchange"===e&&9!==n.nodeType&&(a=n.ownerDocument),null!==r&&!t&&Ar.has(e)){if("scroll"!==e)return;i|=2,a=r}var o=oi(a),s=e+"__"+(t?"capture":"bubble");o.has(s)||(t&&(i|=4),Nr(a,e,i,t),o.add(s))}function Nr(e,t,n,r){var i=Lt.get(t);switch(void 0===i?2:i){case 0:i=Yt;break;case 1:i=Qt;break;default:i=Jt}n=i.bind(null,t,n,e),i=void 0,!qe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Dr(e,t,n,r,i){var a=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var u=o.tag;if((3===u||4===u)&&((u=o.stateNode.containerInfo)===i||8===u.nodeType&&u.parentNode===i))return;o=o.return}for(;null!==s;){if(null===(o=ni(s)))return;if(5===(u=o.tag)||6===u){r=a=o;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Fe)return e(t,n);Fe=!0;try{return Me(e,t,n)}finally{Fe=!1,je()}}((function(){var r=a,i=Ce(n),o=[];e:{var s=Rt.get(e);if(void 0!==s){var u=hn,l=e;switch(e){case"keypress":if(0===an(n))break e;case"keydown":case"keyup":u=In;break;case"focusin":l="focus",u=_n;break;case"focusout":l="blur",u=_n;break;case"beforeblur":case"afterblur":u=_n;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=vn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Rn;break;case xt:case Pt:case It:u=bn;break;case Ot:u=Ln;break;case"scroll":u=mn;break;case"wheel":u=Dn;break;case"copy":case"cut":case"paste":u=Tn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=On}var c=0!==(4&t),d=!c&&"scroll"===e,p=c?null!==s?s+"Capture":null:s;c=[];for(var h,f=r;null!==f;){var m=(h=f).stateNode;if(5===h.tag&&null!==m&&(h=m,null!==p&&(null!=(m=Be(f,p))&&c.push(Mr(f,m,h)))),d)break;f=f.return}0<c.length&&(s=new u(s,l,null,n,i),o.push({event:s,listeners:c}))}}if(0===(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(l=n.relatedTarget||n.fromElement)||!ni(l)&&!l[ei])&&(u||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(l=(l=n.relatedTarget||n.toElement)?ni(l):null)&&(l!==(d=Ye(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(u=null,l=r),u!==l)){if(c=vn,m="onMouseLeave",p="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(c=On,m="onPointerLeave",p="onPointerEnter",f="pointer"),d=null==u?s:ii(u),h=null==l?s:ii(l),(s=new c(m,f+"leave",u,n,i)).target=d,s.relatedTarget=h,m=null,ni(i)===r&&((c=new c(p,f+"enter",l,n,i)).target=h,c.relatedTarget=d,m=c),d=m,u&&l)e:{for(p=l,f=0,h=c=u;h;h=Fr(h))f++;for(h=0,m=p;m;m=Fr(m))h++;for(;0<f-h;)c=Fr(c),f--;for(;0<h-f;)p=Fr(p),h--;for(;f--;){if(c===p||null!==p&&c===p.alternate)break e;c=Fr(c),p=Fr(p)}c=null}else c=null;null!==u&&jr(o,s,u,c,!1),null!==l&&null!==d&&jr(o,d,l,c,!0)}if("select"===(u=(s=r?ii(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var g=Zn;else if(Xn(s))if(er)g=lr;else{g=sr;var v=or}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ur);switch(g&&(g=g(e,r))?Kn(o,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ie(s,"number",s.value)),v=r?ii(r):window,e){case"focusin":(Xn(v)||"true"===v.contentEditable)&&(_r=v,br=r,wr=null);break;case"focusout":wr=br=_r=null;break;case"mousedown":Tr=!0;break;case"contextmenu":case"mouseup":case"dragend":Tr=!1,kr(o,n,i);break;case"selectionchange":if(yr)break;case"keydown":case"keyup":kr(o,n,i)}var y;if(Un)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else Wn?zn(e,n)&&(_="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(_="onCompositionStart");_&&(Bn&&"ko"!==n.locale&&(Wn||"onCompositionStart"!==_?"onCompositionEnd"===_&&Wn&&(y=rn()):(tn="value"in(en=i)?en.value:en.textContent,Wn=!0)),0<(v=Ur(r,_)).length&&(_=new kn(_,e,null,n,i),o.push({event:_,listeners:v}),y?_.data=y:null!==(y=Vn(n))&&(_.data=y))),(y=jn?function(e,t){switch(e){case"compositionend":return Vn(t);case"keypress":return 32!==t.which?null:(Hn=!0,qn);case"textInput":return(e=t.data)===qn&&Hn?null:e;default:return null}}(e,n):function(e,t){if(Wn)return"compositionend"===e||!Un&&zn(e,t)?(e=rn(),nn=tn=en=null,Wn=!1,e):null;switch(e){case"paste":default: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 Bn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Ur(r,"onBeforeInput")).length&&(i=new kn("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=y))}Pr(o,t)}))}function Mr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ur(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=Be(e,n))&&r.unshift(Mr(e,a,i)),null!=(a=Be(e,t))&&r.push(Mr(e,a,i))),e=e.return}return r}function Fr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function jr(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var s=n,u=s.alternate,l=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==l&&(s=l,i?null!=(u=Be(n,a))&&o.unshift(Mr(n,u,s)):i||null!=(u=Be(n,a))&&o.push(Mr(n,u,s))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}function Br(){}var qr=null,Hr=null;function zr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Vr(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 Wr="function"===typeof setTimeout?setTimeout:void 0,Gr="function"===typeof clearTimeout?clearTimeout:void 0;function Xr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Kr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function $r(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 Yr=0;var Qr=Math.random().toString(36).slice(2),Jr="__reactFiber$"+Qr,Zr="__reactProps$"+Qr,ei="__reactContainer$"+Qr,ti="__reactEvents$"+Qr;function ni(e){var t=e[Jr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ei]||n[Jr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=$r(e);null!==e;){if(n=e[Jr])return n;e=$r(e)}return t}n=(e=n).parentNode}return null}function ri(e){return!(e=e[Jr]||e[ei])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ii(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function ai(e){return e[Zr]||null}function oi(e){var t=e[ti];return void 0===t&&(t=e[ti]=new Set),t}var si=[],ui=-1;function li(e){return{current:e}}function ci(e){0>ui||(e.current=si[ui],si[ui]=null,ui--)}function di(e,t){ui++,si[ui]=e.current,e.current=t}var pi={},hi=li(pi),fi=li(!1),mi=pi;function gi(e,t){var n=e.type.contextTypes;if(!n)return pi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function vi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function yi(){ci(fi),ci(hi)}function _i(e,t,n){if(hi.current!==pi)throw Error(o(168));di(hi,t),di(fi,n)}function bi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var a in r=r.getChildContext())if(!(a in e))throw Error(o(108,X(t)||"Unknown",a));return i({},n,r)}function wi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pi,mi=hi.current,di(hi,e),di(fi,fi.current),!0}function Ti(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=bi(e,t,mi),r.__reactInternalMemoizedMergedChildContext=e,ci(fi),ci(hi),di(hi,e)):ci(fi),di(fi,n)}var ki=null,Si=null,Ei=a.unstable_runWithPriority,Ci=a.unstable_scheduleCallback,Ai=a.unstable_cancelCallback,xi=a.unstable_shouldYield,Pi=a.unstable_requestPaint,Ii=a.unstable_now,Oi=a.unstable_getCurrentPriorityLevel,Ri=a.unstable_ImmediatePriority,Li=a.unstable_UserBlockingPriority,Ni=a.unstable_NormalPriority,Di=a.unstable_LowPriority,Mi=a.unstable_IdlePriority,Ui={},Fi=void 0!==Pi?Pi:function(){},ji=null,Bi=null,qi=!1,Hi=Ii(),zi=1e4>Hi?Ii:function(){return Ii()-Hi};function Vi(){switch(Oi()){case Ri:return 99;case Li:return 98;case Ni:return 97;case Di:return 96;case Mi:return 95;default:throw Error(o(332))}}function Wi(e){switch(e){case 99:return Ri;case 98:return Li;case 97:return Ni;case 96:return Di;case 95:return Mi;default:throw Error(o(332))}}function Gi(e,t){return e=Wi(e),Ei(e,t)}function Xi(e,t,n){return e=Wi(e),Ci(e,t,n)}function Ki(){if(null!==Bi){var e=Bi;Bi=null,Ai(e)}$i()}function $i(){if(!qi&&null!==ji){qi=!0;var e=0;try{var t=ji;Gi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),ji=null}catch(n){throw null!==ji&&(ji=ji.slice(e+1)),Ci(Ri,Ki),n}finally{qi=!1}}}var Yi=w.ReactCurrentBatchConfig;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}return t}var Ji=li(null),Zi=null,ea=null,ta=null;function na(){ta=ea=Zi=null}function ra(e){var t=Ji.current;ci(Ji),e.type._context._currentValue=t}function ia(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function aa(e,t){Zi=e,ta=ea=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Uo=!0),e.firstContext=null)}function oa(e,t){if(ta!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(ta=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ea){if(null===Zi)throw Error(o(308));ea=t,Zi.dependencies={lanes:0,firstContext:t,responders:null}}else ea=ea.next=t;return e._currentValue}var sa=!1;function ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function la(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ca(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function da(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function pa(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ha(e,t,n,r){var a=e.updateQueue;sa=!1;var o=a.firstBaseUpdate,s=a.lastBaseUpdate,u=a.shared.pending;if(null!==u){a.shared.pending=null;var l=u,c=l.next;l.next=null,null===s?o=c:s.next=c,s=l;var d=e.alternate;if(null!==d){var p=(d=d.updateQueue).lastBaseUpdate;p!==s&&(null===p?d.firstBaseUpdate=c:p.next=c,d.lastBaseUpdate=l)}}if(null!==o){for(p=a.baseState,s=0,d=c=l=null;;){u=o.lane;var h=o.eventTime;if((r&u)===u){null!==d&&(d=d.next={eventTime:h,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var f=e,m=o;switch(u=t,h=n,m.tag){case 1:if("function"===typeof(f=m.payload)){p=f.call(h,p,u);break e}p=f;break e;case 3:f.flags=-4097&f.flags|64;case 0:if(null===(u="function"===typeof(f=m.payload)?f.call(h,p,u):f)||void 0===u)break e;p=i({},p,u);break e;case 2:sa=!0}}null!==o.callback&&(e.flags|=32,null===(u=a.effects)?a.effects=[o]:u.push(o))}else h={eventTime:h,lane:u,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===d?(c=d=h,l=p):d=d.next=h,s|=u;if(null===(o=o.next)){if(null===(u=a.shared.pending))break;o=u.next,u.next=null,a.lastBaseUpdate=u,a.shared.pending=null}}null===d&&(l=p),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=d,Hs|=s,e.lanes=s,e.memoizedState=p}}function fa(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(o(191,i));i.call(r)}}}var ma=(new r.Component).refs;function ga(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var va={isMounted:function(e){return!!(e=e._reactInternals)&&Ye(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hu(),i=fu(e),a=ca(r,i);a.payload=t,void 0!==n&&null!==n&&(a.callback=n),da(e,a),mu(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hu(),i=fu(e),a=ca(r,i);a.tag=1,a.payload=t,void 0!==n&&null!==n&&(a.callback=n),da(e,a),mu(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hu(),r=fu(e),i=ca(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),da(e,i),mu(e,r,n)}};function ya(e,t,n,r,i,a,o){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!pr(n,r)||!pr(i,a))}function _a(e,t,n){var r=!1,i=pi,a=t.contextType;return"object"===typeof a&&null!==a?a=oa(a):(i=vi(t)?mi:hi.current,a=(r=null!==(r=t.contextTypes)&&void 0!==r)?gi(e,i):pi),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=va,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function ba(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&&va.enqueueReplaceState(t,t.state,null)}function wa(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=ma,ua(e);var a=t.contextType;"object"===typeof a&&null!==a?i.context=oa(a):(a=vi(t)?mi:hi.current,i.context=gi(e,a)),ha(e,n,i,r),i.state=e.memoizedState,"function"===typeof(a=t.getDerivedStateFromProps)&&(ga(e,t,a,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&&va.enqueueReplaceState(i,i.state,null),ha(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4)}var Ta=Array.isArray;function ka(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(o(309));var r=n.stateNode}if(!r)throw Error(o(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===ma&&(t=r.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!==typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function Sa(e,t){if("textarea"!==e.type)throw Error(o(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Ea(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.flags=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){return(e=Xu(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Qu(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=ka(e,t,n),r.return=e,r):((r=Ku(n.type,n.key,n.props,null,e.mode,r)).ref=ka(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 d(e,t,n,r,a){return null===t||7!==t.tag?((t=$u(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function p(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Qu(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case T:return(n=Ku(t.type,t.key,t.props,null,e.mode,n)).ref=ka(e,null,t),n.return=e,n;case k:return(t=Ju(t,e.mode,n)).return=e,t}if(Ta(t)||H(t))return(t=$u(t,e.mode,n,null)).return=e,t;Sa(e,t)}return null}function h(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 T:return n.key===i?n.type===S?d(e,t,n.props.children,r,i):l(e,t,n,r):null;case k:return n.key===i?c(e,t,n,r):null}if(Ta(n)||H(n))return null!==i?null:d(e,t,n,r,null);Sa(e,n)}return null}function f(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 T:return e=e.get(null===r.key?n:r.key)||null,r.type===S?d(t,e,r.props.children,i,r.key):l(t,e,r,i);case k:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(Ta(r)||H(r))return d(t,e=e.get(n)||null,r,i,null);Sa(t,r)}return null}function m(i,o,s,u){for(var l=null,c=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=h(i,d,s[m],u);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),o=a(v,o,m),null===c?l=v:c.sibling=v,c=v,d=g}if(m===s.length)return n(i,d),l;if(null===d){for(;m<s.length;m++)null!==(d=p(i,s[m],u))&&(o=a(d,o,m),null===c?l=d:c.sibling=d,c=d);return l}for(d=r(i,d);m<s.length;m++)null!==(g=f(d,i,m,s[m],u))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=a(g,o,m),null===c?l=g:c.sibling=g,c=g);return e&&d.forEach((function(e){return t(i,e)})),l}function g(i,s,u,l){var c=H(u);if("function"!==typeof c)throw Error(o(150));if(null==(u=c.call(u)))throw Error(o(151));for(var d=c=null,m=s,g=s=0,v=null,y=u.next();null!==m&&!y.done;g++,y=u.next()){m.index>g?(v=m,m=null):v=m.sibling;var _=h(i,m,y.value,l);if(null===_){null===m&&(m=v);break}e&&m&&null===_.alternate&&t(i,m),s=a(_,s,g),null===d?c=_:d.sibling=_,d=_,m=v}if(y.done)return n(i,m),c;if(null===m){for(;!y.done;g++,y=u.next())null!==(y=p(i,y.value,l))&&(s=a(y,s,g),null===d?c=y:d.sibling=y,d=y);return c}for(m=r(i,m);!y.done;g++,y=u.next())null!==(y=f(m,i,g,y.value,l))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=a(y,s,g),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(i,e)})),c}return function(e,r,a,u){var l="object"===typeof a&&null!==a&&a.type===S&&null===a.key;l&&(a=a.props.children);var c="object"===typeof a&&null!==a;if(c)switch(a.$$typeof){case T:e:{for(c=a.key,l=r;null!==l;){if(l.key===c){if(7===l.tag){if(a.type===S){n(e,l.sibling),(r=i(l,a.props.children)).return=e,e=r;break e}}else if(l.elementType===a.type){n(e,l.sibling),(r=i(l,a.props)).ref=ka(e,l,a),r.return=e,e=r;break e}n(e,l);break}t(e,l),l=l.sibling}a.type===S?((r=$u(a.props.children,e.mode,u,a.key)).return=e,e=r):((u=Ku(a.type,a.key,a.props,null,e.mode,u)).ref=ka(e,r,a),u.return=e,e=u)}return s(e);case k:e:{for(l=a.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=i(r,a.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ju(a,e.mode,u)).return=e,e=r}return s(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,a)).return=e,e=r):(n(e,r),(r=Qu(a,e.mode,u)).return=e,e=r),s(e);if(Ta(a))return m(e,r,a,u);if(H(a))return g(e,r,a,u);if(c&&Sa(e,a),"undefined"===typeof a&&!l)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(o(152,X(e.type)||"Component"))}return n(e,r)}}var Ca=Ea(!0),Aa=Ea(!1),xa={},Pa=li(xa),Ia=li(xa),Oa=li(xa);function Ra(e){if(e===xa)throw Error(o(174));return e}function La(e,t){switch(di(Oa,t),di(Ia,e),di(Pa,xa),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fe(null,"");break;default:t=fe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ci(Pa),di(Pa,t)}function Na(){ci(Pa),ci(Ia),ci(Oa)}function Da(e){Ra(Oa.current);var t=Ra(Pa.current),n=fe(t,e.type);t!==n&&(di(Ia,e),di(Pa,n))}function Ma(e){Ia.current===e&&(ci(Pa),ci(Ia))}var Ua=li(0);function Fa(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.flags))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}var ja=null,Ba=null,qa=!1;function Ha(e,t){var n=Wu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function za(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);default:return!1}}function Va(e){if(qa){var t=Ba;if(t){var n=t;if(!za(e,t)){if(!(t=Kr(n.nextSibling))||!za(e,t))return e.flags=-1025&e.flags|2,qa=!1,void(ja=e);Ha(ja,n)}ja=e,Ba=Kr(t.firstChild)}else e.flags=-1025&e.flags|2,qa=!1,ja=e}}function Wa(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ja=e}function Ga(e){if(e!==ja)return!1;if(!qa)return Wa(e),qa=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Vr(t,e.memoizedProps))for(t=Ba;t;)Ha(e,t),t=Kr(t.nextSibling);if(Wa(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ba=Kr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ba=null}}else Ba=ja?Kr(e.stateNode.nextSibling):null;return!0}function Xa(){Ba=ja=null,qa=!1}var Ka=[];function $a(){for(var e=0;e<Ka.length;e++)Ka[e]._workInProgressVersionPrimary=null;Ka.length=0}var Ya=w.ReactCurrentDispatcher,Qa=w.ReactCurrentBatchConfig,Ja=0,Za=null,eo=null,to=null,no=!1,ro=!1;function io(){throw Error(o(321))}function ao(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function oo(e,t,n,r,i,a){if(Ja=a,Za=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ya.current=null===e||null===e.memoizedState?Lo:No,e=n(r,i),ro){a=0;do{if(ro=!1,!(25>a))throw Error(o(301));a+=1,to=eo=null,t.updateQueue=null,Ya.current=Do,e=n(r,i)}while(ro)}if(Ya.current=Ro,t=null!==eo&&null!==eo.next,Ja=0,to=eo=Za=null,no=!1,t)throw Error(o(300));return e}function so(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===to?Za.memoizedState=to=e:to=to.next=e,to}function uo(){if(null===eo){var e=Za.alternate;e=null!==e?e.memoizedState:null}else e=eo.next;var t=null===to?Za.memoizedState:to.next;if(null!==t)to=t,eo=e;else{if(null===e)throw Error(o(310));e={memoizedState:(eo=e).memoizedState,baseState:eo.baseState,baseQueue:eo.baseQueue,queue:eo.queue,next:null},null===to?Za.memoizedState=to=e:to=to.next=e}return to}function lo(e,t){return"function"===typeof t?t(e):t}function co(e){var t=uo(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=eo,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var u=s=a=null,l=i;do{var c=l.lane;if((Ja&c)===c)null!==u&&(u=u.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),r=l.eagerReducer===e?l.eagerState:e(r,l.action);else{var d={lane:c,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};null===u?(s=u=d,a=r):u=u.next=d,Za.lanes|=c,Hs|=c}l=l.next}while(null!==l&&l!==i);null===u?a=r:u.next=s,cr(r,t.memoizedState)||(Uo=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function po(e){var t=uo(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);cr(a,t.memoizedState)||(Uo=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function ho(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Ja&e)===e)&&(t._workInProgressVersionPrimary=r,Ka.push(t))),e)return n(t._source);throw Ka.push(t),Error(o(350))}function fo(e,t,n,r){var i=Ns;if(null===i)throw Error(o(349));var a=t._getVersion,s=a(t._source),u=Ya.current,l=u.useState((function(){return ho(i,t,n)})),c=l[1],d=l[0];l=to;var p=e.memoizedState,h=p.refs,f=h.getSnapshot,m=p.source;p=p.subscribe;var g=Za;return e.memoizedState={refs:h,source:t,subscribe:r},u.useEffect((function(){h.getSnapshot=n,h.setSnapshot=c;var e=a(t._source);if(!cr(s,e)){e=n(t._source),cr(d,e)||(c(e),e=fu(g),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,o=e;0<o;){var u=31-Vt(o),l=1<<u;r[u]|=e,o&=~l}}}),[n,t,r]),u.useEffect((function(){return r(t._source,(function(){var e=h.getSnapshot,n=h.setSnapshot;try{n(e(t._source));var r=fu(g);i.mutableReadLanes|=r&i.pendingLanes}catch(a){n((function(){throw a}))}}))}),[t,r]),cr(f,n)&&cr(m,t)&&cr(p,r)||((e={pending:null,dispatch:null,lastRenderedReducer:lo,lastRenderedState:d}).dispatch=c=Oo.bind(null,Za,e),l.queue=e,l.baseQueue=null,d=ho(i,t,n),l.memoizedState=l.baseState=d),d}function mo(e,t,n){return fo(uo(),e,t,n)}function go(e){var t=so();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:lo,lastRenderedState:e}).dispatch=Oo.bind(null,Za,e),[t.memoizedState,e]}function vo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Za.updateQueue)?(t={lastEffect:null},Za.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function yo(e){return e={current:e},so().memoizedState=e}function _o(){return uo().memoizedState}function bo(e,t,n,r){var i=so();Za.flags|=e,i.memoizedState=vo(1|t,n,void 0,void 0===r?null:r)}function wo(e,t,n,r){var i=uo();r=void 0===r?null:r;var a=void 0;if(null!==eo){var o=eo.memoizedState;if(a=o.destroy,null!==r&&ao(r,o.deps))return void vo(t,n,a,r)}Za.flags|=e,i.memoizedState=vo(1|t,n,a,r)}function To(e,t){return bo(516,4,e,t)}function ko(e,t){return wo(516,4,e,t)}function So(e,t){return wo(4,2,e,t)}function Eo(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Co(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wo(4,2,Eo.bind(null,t,e),n)}function Ao(){}function xo(e,t){var n=uo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ao(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Po(e,t){var n=uo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ao(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Io(e,t){var n=Vi();Gi(98>n?98:n,(function(){e(!0)})),Gi(97<n?97:n,(function(){var n=Qa.transition;Qa.transition=1;try{e(!1),t()}finally{Qa.transition=n}}))}function Oo(e,t,n){var r=hu(),i=fu(e),a={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},o=t.pending;if(null===o?a.next=a:(a.next=o.next,o.next=a),t.pending=a,o=e.alternate,e===Za||null!==o&&o===Za)ro=no=!0;else{if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,u=o(s,n);if(a.eagerReducer=o,a.eagerState=u,cr(u,s))return}catch(l){}mu(e,i,r)}}var Ro={readContext:oa,useCallback:io,useContext:io,useEffect:io,useImperativeHandle:io,useLayoutEffect:io,useMemo:io,useReducer:io,useRef:io,useState:io,useDebugValue:io,useDeferredValue:io,useTransition:io,useMutableSource:io,useOpaqueIdentifier:io,unstable_isNewReconciler:!1},Lo={readContext:oa,useCallback:function(e,t){return so().memoizedState=[e,void 0===t?null:t],e},useContext:oa,useEffect:To,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,bo(4,2,Eo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return bo(4,2,e,t)},useMemo:function(e,t){var n=so();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=so();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Oo.bind(null,Za,e),[r.memoizedState,e]},useRef:yo,useState:go,useDebugValue:Ao,useDeferredValue:function(e){var t=go(e),n=t[0],r=t[1];return To((function(){var t=Qa.transition;Qa.transition=1;try{r(e)}finally{Qa.transition=t}}),[e]),n},useTransition:function(){var e=go(!1),t=e[0];return yo(e=Io.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=so();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},fo(r,e,t,n)},useOpaqueIdentifier:function(){if(qa){var e=!1,t=function(e){return{$$typeof:D,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Yr++).toString(36))),Error(o(355))})),n=go(t)[1];return 0===(2&Za.mode)&&(Za.flags|=516,vo(5,(function(){n("r:"+(Yr++).toString(36))}),void 0,null)),t}return go(t="r:"+(Yr++).toString(36)),t},unstable_isNewReconciler:!1},No={readContext:oa,useCallback:xo,useContext:oa,useEffect:ko,useImperativeHandle:Co,useLayoutEffect:So,useMemo:Po,useReducer:co,useRef:_o,useState:function(){return co(lo)},useDebugValue:Ao,useDeferredValue:function(e){var t=co(lo),n=t[0],r=t[1];return ko((function(){var t=Qa.transition;Qa.transition=1;try{r(e)}finally{Qa.transition=t}}),[e]),n},useTransition:function(){var e=co(lo)[0];return[_o().current,e]},useMutableSource:mo,useOpaqueIdentifier:function(){return co(lo)[0]},unstable_isNewReconciler:!1},Do={readContext:oa,useCallback:xo,useContext:oa,useEffect:ko,useImperativeHandle:Co,useLayoutEffect:So,useMemo:Po,useReducer:po,useRef:_o,useState:function(){return po(lo)},useDebugValue:Ao,useDeferredValue:function(e){var t=po(lo),n=t[0],r=t[1];return ko((function(){var t=Qa.transition;Qa.transition=1;try{r(e)}finally{Qa.transition=t}}),[e]),n},useTransition:function(){var e=po(lo)[0];return[_o().current,e]},useMutableSource:mo,useOpaqueIdentifier:function(){return po(lo)[0]},unstable_isNewReconciler:!1},Mo=w.ReactCurrentOwner,Uo=!1;function Fo(e,t,n,r){t.child=null===e?Aa(t,null,n,r):Ca(t,e.child,n,r)}function jo(e,t,n,r,i){n=n.render;var a=t.ref;return aa(t,i),r=oo(e,t,n,r,a,i),null===e||Uo?(t.flags|=1,Fo(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,os(e,t,i))}function Bo(e,t,n,r,i,a){if(null===e){var o=n.type;return"function"!==typeof o||Gu(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ku(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,qo(e,t,o,r,i,a))}return o=e.child,0===(i&a)&&(i=o.memoizedProps,(n=null!==(n=n.compare)?n:pr)(i,r)&&e.ref===t.ref)?os(e,t,a):(t.flags|=1,(e=Xu(o,r)).ref=t.ref,e.return=t,t.child=e)}function qo(e,t,n,r,i,a){if(null!==e&&pr(e.memoizedProps,r)&&e.ref===t.ref){if(Uo=!1,0===(a&i))return t.lanes=e.lanes,os(e,t,a);0!==(16384&e.flags)&&(Uo=!0)}return Vo(e,t,n,r,a)}function Ho(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},ku(t,n);else{if(0===(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},ku(t,e),null;t.memoizedState={baseLanes:0},ku(t,null!==a?a.baseLanes:n)}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,ku(t,r);return Fo(e,t,i,n),t.child}function zo(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Vo(e,t,n,r,i){var a=vi(n)?mi:hi.current;return a=gi(t,a),aa(t,i),n=oo(e,t,n,r,a,i),null===e||Uo?(t.flags|=1,Fo(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,os(e,t,i))}function Wo(e,t,n,r,i){if(vi(n)){var a=!0;wi(t)}else a=!1;if(aa(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),_a(t,n,r),wa(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var u=o.context,l=n.contextType;"object"===typeof l&&null!==l?l=oa(l):l=gi(t,l=vi(n)?mi:hi.current);var c=n.getDerivedStateFromProps,d="function"===typeof c||"function"===typeof o.getSnapshotBeforeUpdate;d||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==r||u!==l)&&ba(t,o,r,l),sa=!1;var p=t.memoizedState;o.state=p,ha(t,r,o,i),u=t.memoizedState,s!==r||p!==u||fi.current||sa?("function"===typeof c&&(ga(t,n,c,r),u=t.memoizedState),(s=sa||ya(t,n,s,r,p,u,l))?(d||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4)):("function"===typeof o.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=l,r=s):("function"===typeof o.componentDidMount&&(t.flags|=4),r=!1)}else{o=t.stateNode,la(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Qi(t.type,s),o.props=l,d=t.pendingProps,p=o.context,"object"===typeof(u=n.contextType)&&null!==u?u=oa(u):u=gi(t,u=vi(n)?mi:hi.current);var h=n.getDerivedStateFromProps;(c="function"===typeof h||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==d||p!==u)&&ba(t,o,r,u),sa=!1,p=t.memoizedState,o.state=p,ha(t,r,o,i);var f=t.memoizedState;s!==d||p!==f||fi.current||sa?("function"===typeof h&&(ga(t,n,h,r),f=t.memoizedState),(l=sa||ya(t,n,l,r,p,f,u))?(c||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,f,u),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,f,u)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=f),o.props=r,o.state=f,o.context=u,r=l):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=256),r=!1)}return Go(e,t,n,r,a,i)}function Go(e,t,n,r,i,a){zo(e,t);var o=0!==(64&t.flags);if(!r&&!o)return i&&Ti(t,n,!1),os(e,t,a);r=t.stateNode,Mo.current=t;var s=o&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=Ca(t,e.child,null,a),t.child=Ca(t,null,s,a)):Fo(e,t,s,a),t.memoizedState=r.state,i&&Ti(t,n,!0),t.child}function Xo(e){var t=e.stateNode;t.pendingContext?_i(0,t.pendingContext,t.pendingContext!==t.context):t.context&&_i(0,t.context,!1),La(e,t.containerInfo)}var Ko,$o,Yo,Qo,Jo={dehydrated:null,retryLane:0};function Zo(e,t,n){var r,i=t.pendingProps,a=Ua.current,o=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(o=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),di(Ua,1&a),null===e?(void 0!==i.fallback&&Va(t),e=i.children,a=i.fallback,o?(e=es(t,e,a,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Jo,e):"number"===typeof i.unstable_expectedLoadTime?(e=es(t,e,a,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Jo,t.lanes=33554432,e):((n=Yu({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,o?(i=ns(e,t,i.children,i.fallback,n),o=t.child,a=e.child.memoizedState,o.memoizedState=null===a?{baseLanes:n}:{baseLanes:a.baseLanes|n},o.childLanes=e.childLanes&~n,t.memoizedState=Jo,i):(n=ts(e,t,i.children,n),t.memoizedState=null,n))}function es(e,t,n,r){var i=e.mode,a=e.child;return t={mode:"hidden",children:t},0===(2&i)&&null!==a?(a.childLanes=0,a.pendingProps=t):a=Yu(t,i,0,null),n=$u(n,i,r,null),a.return=e,n.return=e,a.sibling=n,e.child=a,n}function ts(e,t,n,r){var i=e.child;return e=i.sibling,n=Xu(i,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ns(e,t,n,r,i){var a=t.mode,o=e.child;e=o.sibling;var s={mode:"hidden",children:n};return 0===(2&a)&&t.child!==o?((n=t.child).childLanes=0,n.pendingProps=s,null!==(o=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=o,o.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Xu(o,s),null!==e?r=Xu(e,r):(r=$u(r,a,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function rs(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ia(e.return,t)}function is(e,t,n,r,i,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.lastEffect=a)}function as(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Fo(e,t,r.children,n),0!==(2&(r=Ua.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&rs(e,n);else if(19===e.tag)rs(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(di(Ua,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===Fa(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),is(t,!1,i,n,a,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Fa(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}is(t,!0,n,null,a,t.lastEffect);break;case"together":is(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function os(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Hs|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Xu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Xu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function ss(e,t){if(!qa)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,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return vi(t.type)&&yi(),null;case 3:return Na(),ci(fi),ci(hi),$a(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ga(t)?t.flags|=4:r.hydrate||(t.flags|=256)),$o(t),null;case 5:Ma(t);var a=Ra(Oa.current);if(n=t.type,null!==e&&null!=t.stateNode)Yo(e,t,n,r,a),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(o(166));return null}if(e=Ra(Pa.current),Ga(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Jr]=t,r[Zr]=s,n){case"dialog":Ir("cancel",r),Ir("close",r);break;case"iframe":case"object":case"embed":Ir("load",r);break;case"video":case"audio":for(e=0;e<Cr.length;e++)Ir(Cr[e],r);break;case"source":Ir("error",r);break;case"img":case"image":case"link":Ir("error",r),Ir("load",r);break;case"details":Ir("toggle",r);break;case"input":ee(r,s),Ir("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ir("invalid",r);break;case"textarea":ue(r,s),Ir("invalid",r)}for(var l in Se(n,s),e=null,s)s.hasOwnProperty(l)&&(a=s[l],"children"===l?"string"===typeof a?r.textContent!==a&&(e=["children",a]):"number"===typeof a&&r.textContent!==""+a&&(e=["children",""+a]):u.hasOwnProperty(l)&&null!=a&&"onScroll"===l&&Ir("scroll",r));switch(n){case"input":Y(r),re(r,s,!0);break;case"textarea":Y(r),ce(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=Br)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(l=9===a.nodeType?a:a.ownerDocument,e===de&&(e=he(n)),e===de?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Jr]=t,e[Zr]=r,Ko(e,t,!1,!1),t.stateNode=e,l=Ee(n,r),n){case"dialog":Ir("cancel",e),Ir("close",e),a=r;break;case"iframe":case"object":case"embed":Ir("load",e),a=r;break;case"video":case"audio":for(a=0;a<Cr.length;a++)Ir(Cr[a],e);a=r;break;case"source":Ir("error",e),a=r;break;case"img":case"image":case"link":Ir("error",e),Ir("load",e),a=r;break;case"details":Ir("toggle",e),a=r;break;case"input":ee(e,r),a=Z(e,r),Ir("invalid",e);break;case"option":a=ae(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=i({},r,{value:void 0}),Ir("invalid",e);break;case"textarea":ue(e,r),a=se(e,r),Ir("invalid",e);break;default:a=r}Se(n,a);var c=a;for(s in c)if(c.hasOwnProperty(s)){var d=c[s];"style"===s?Te(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&ve(e,d):"children"===s?"string"===typeof d?("textarea"!==n||""!==d)&&ye(e,d):"number"===typeof d&&ye(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(u.hasOwnProperty(s)?null!=d&&"onScroll"===s&&Ir("scroll",e):null!=d&&b(e,s,d,l))}switch(n){case"input":Y(e),re(e,r,!1);break;case"textarea":Y(e),ce(e);break;case"option":null!=r.value&&e.setAttribute("value",""+K(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?oe(e,!!r.multiple,s,!1):null!=r.defaultValue&&oe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof a.onClick&&(e.onclick=Br)}zr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Qo(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(o(166));n=Ra(Oa.current),Ra(Pa.current),Ga(t)?(r=t.stateNode,n=t.memoizedProps,r[Jr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Jr]=t,t.stateNode=r)}return null;case 13:return ci(Ua),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Ga(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Ua.current)?0===js&&(js=3):(0!==js&&3!==js||(js=4),null===Ns||0===(134217727&Hs)&&0===(134217727&zs)||_u(Ns,Ms))),(r||n)&&(t.flags|=4),null);case 4:return Na(),$o(t),null===e&&Rr(t.stateNode.containerInfo),null;case 10:return ra(t),null;case 19:if(ci(Ua),null===(r=t.memoizedState))return null;if(s=0!==(64&t.flags),null===(l=r.rendering))if(s)ss(r,!1);else{if(0!==js||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(l=Fa(e))){for(t.flags|=64,ss(r,!1),null!==(s=l.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return di(Ua,1&Ua.current|2),t.child}e=e.sibling}null!==r.tail&&zi()>Xs&&(t.flags|=64,s=!0,ss(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=Fa(l))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ss(r,!0),null===r.tail&&"hidden"===r.tailMode&&!l.alternate&&!qa)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*zi()-r.renderingStartTime>Xs&&1073741824!==n&&(t.flags|=64,s=!0,ss(r,!1),t.lanes=33554432);r.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=r.last)?n.sibling=l:t.child=l,r.last=l)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=zi(),n.sibling=null,t=Ua.current,di(Ua,s?1&t|2:1&t),n):null;case 23:case 24:return Su(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(o(156,t.tag))}function ls(e){switch(e.tag){case 1:vi(e.type)&&yi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Na(),ci(fi),ci(hi),$a(),0!==(64&(t=e.flags)))throw Error(o(285));return e.flags=-4097&t|64,e;case 5:return Ma(e),null;case 13:return ci(Ua),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ci(Ua),null;case 4:return Na(),null;case 10:return ra(e),null;case 23:case 24:return Su(),null;default:return null}}function cs(e,t){try{var n="",r=t;do{n+=G(r),r=r.return}while(r);var i=n}catch(a){i="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:i}}function ds(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Ko=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}},$o=function(){},Yo=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,Ra(Pa.current);var o,s=null;switch(n){case"input":a=Z(e,a),r=Z(e,r),s=[];break;case"option":a=ae(e,a),r=ae(e,r),s=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),s=[];break;case"textarea":a=se(e,a),r=se(e,r),s=[];break;default:"function"!==typeof a.onClick&&"function"===typeof r.onClick&&(e.onclick=Br)}for(d in Se(n,r),n=null,a)if(!r.hasOwnProperty(d)&&a.hasOwnProperty(d)&&null!=a[d])if("style"===d){var l=a[d];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(u.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var c=r[d];if(l=null!=a?a[d]:void 0,r.hasOwnProperty(d)&&c!==l&&(null!=c||null!=l))if("style"===d)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(s||(s=[]),s.push(d,n)),n=c;else"dangerouslySetInnerHTML"===d?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(d,c)):"children"===d?"string"!==typeof c&&"number"!==typeof c||(s=s||[]).push(d,""+c):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(u.hasOwnProperty(d)?(null!=c&&"onScroll"===d&&Ir("scroll",e),s||l===c||(s=[])):"object"===typeof c&&null!==c&&c.$$typeof===D?c.toString():(s=s||[]).push(d,c))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}},Qo=function(e,t,n,r){n!==r&&(t.flags|=4)};var ps="function"===typeof WeakMap?WeakMap:Map;function hs(e,t,n){(n=ca(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Qs||(Qs=!0,Js=r),ds(0,t)},n}function fs(e,t,n){(n=ca(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return ds(0,t),r(i)}}var a=e.stateNode;return null!==a&&"function"===typeof a.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Zs?Zs=new Set([this]):Zs.add(this),ds(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var ms="function"===typeof WeakSet?WeakSet:Set;function gs(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){qu(e,n)}else t.current=null}function vs(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&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}return;case 3:return void(256&t.flags&&Xr(t.stateNode.containerInfo))}throw Error(o(163))}function ys(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(Fu(n,e),Uu(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Qi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&fa(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}fa(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&zr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Tt(n)))))}throw Error(o(163))}function _s(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=void 0!==i&&null!==i&&i.hasOwnProperty("display")?i.display:null,r.style.display=we("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bs(e,t){if(Si&&"function"===typeof Si.onCommitFiberUnmount)try{Si.onCommitFiberUnmount(ki,t)}catch(a){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!==(4&r))Fu(t,n);else{r=t;try{i()}catch(a){qu(r,a)}}n=n.next}while(n!==e)}break;case 1:if(gs(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(a){qu(t,a)}break;case 5:gs(t);break;case 4:Cs(e,t)}}function ws(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Ts(e){return 5===e.tag||3===e.tag||4===e.tag}function ks(e){e:{for(var t=e.return;null!==t;){if(Ts(t))break e;t=t.return}throw Error(o(160))}var n=t;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(o(161))}16&n.flags&&(ye(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Ts(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.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Ss(e,n,t):Es(e,n,t)}function Ss(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Br));else if(4!==r&&null!==(e=e.child))for(Ss(e,t,n),e=e.sibling;null!==e;)Ss(e,t,n),e=e.sibling}function Es(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Es(e,t,n),e=e.sibling;null!==e;)Es(e,t,n),e=e.sibling}function Cs(e,t){for(var n,r,i=t,a=!1;;){if(!a){a=i.return;e:for(;;){if(null===a)throw Error(o(160));switch(n=a.stateNode,a.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}a=a.return}a=!0}if(5===i.tag||6===i.tag){e:for(var s=e,u=i,l=u;;)if(bs(s,l),null!==l.child&&4!==l.tag)l.child.return=l,l=l.child;else{if(l===u)break e;for(;null===l.sibling;){if(null===l.return||l.return===u)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}r?(s=n,u=i.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(bs(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(a=!1)}i.sibling.return=i.return,i=i.sibling}}function As(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var a=t.updateQueue;if(t.updateQueue=null,null!==a){for(n[Zr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Ee(e,i),t=Ee(e,r),i=0;i<a.length;i+=2){var s=a[i],u=a[i+1];"style"===s?Te(n,u):"dangerouslySetInnerHTML"===s?ve(n,u):"children"===s?ye(n,u):b(n,s,u,t)}switch(e){case"input":ne(n,r);break;case"textarea":le(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(a=r.value)?oe(n,!!r.multiple,a,!1):e!==!!r.multiple&&(null!=r.defaultValue?oe(n,!!r.multiple,r.defaultValue,!0):oe(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(o(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,Tt(n.containerInfo)));case 13:return null!==t.memoizedState&&(Gs=zi(),_s(t.child,!0)),void xs(t);case 19:return void xs(t);case 23:case 24:return void _s(t,null!==t.memoizedState)}throw Error(o(163))}function xs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ms),t.forEach((function(t){var r=zu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Ps(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Is=Math.ceil,Os=w.ReactCurrentDispatcher,Rs=w.ReactCurrentOwner,Ls=0,Ns=null,Ds=null,Ms=0,Us=0,Fs=li(0),js=0,Bs=null,qs=0,Hs=0,zs=0,Vs=0,Ws=null,Gs=0,Xs=1/0;function Ks(){Xs=zi()+500}var $s,Ys=null,Qs=!1,Js=null,Zs=null,eu=!1,tu=null,nu=90,ru=[],iu=[],au=null,ou=0,su=null,uu=-1,lu=0,cu=0,du=null,pu=!1;function hu(){return 0!==(48&Ls)?zi():-1!==uu?uu:uu=zi()}function fu(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===Vi()?1:2;if(0===lu&&(lu=qs),0!==Yi.transition){0!==cu&&(cu=null!==Ws?Ws.pendingLanes:0),e=lu;var t=4186112&~cu;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Vi(),0!==(4&Ls)&&98===e?e=Bt(12,lu):e=Bt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),lu),e}function mu(e,t,n){if(50<ou)throw ou=0,su=null,Error(o(185));if(null===(e=gu(e,t)))return null;zt(e,t,n),e===Ns&&(zs|=t,4===js&&_u(e,Ms));var r=Vi();1===t?0!==(8&Ls)&&0===(48&Ls)?bu(e):(vu(e,n),0===Ls&&(Ks(),Ki())):(0===(4&Ls)||98!==r&&99!==r||(null===au?au=new Set([e]):au.add(e)),vu(e,n)),Ws=e}function gu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function vu(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,s=e.pendingLanes;0<s;){var u=31-Vt(s),l=1<<u,c=a[u];if(-1===c){if(0===(l&r)||0!==(l&i)){c=t,Ut(l);var d=Mt;a[u]=10<=d?c+250:6<=d?c+5e3:-1}}else c<=t&&(e.expiredLanes|=l);s&=~l}if(r=Ft(e,e===Ns?Ms:0),t=Mt,0===r)null!==n&&(n!==Ui&&Ai(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Ui&&Ai(n)}15===t?(n=bu.bind(null,e),null===ji?(ji=[n],Bi=Ci(Ri,$i)):ji.push(n),n=Ui):14===t?n=Xi(99,bu.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(o(358,e))}}(t),n=Xi(n,yu.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function yu(e){if(uu=-1,cu=lu=0,0!==(48&Ls))throw Error(o(327));var t=e.callbackNode;if(Mu()&&e.callbackNode!==t)return null;var n=Ft(e,e===Ns?Ms:0);if(0===n)return null;var r=n,i=Ls;Ls|=16;var a=Au();for(Ns===e&&Ms===r||(Ks(),Eu(e,r));;)try{Iu();break}catch(u){Cu(e,u)}if(na(),Os.current=a,Ls=i,null!==Ds?r=0:(Ns=null,Ms=0,r=js),0!==(qs&zs))Eu(e,0);else if(0!==r){if(2===r&&(Ls|=64,e.hydrate&&(e.hydrate=!1,Xr(e.containerInfo)),0!==(n=jt(e))&&(r=xu(e,n))),1===r)throw t=Bs,Eu(e,0),_u(e,n),vu(e,zi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(o(345));case 2:case 5:Lu(e);break;case 3:if(_u(e,n),(62914560&n)===n&&10<(r=Gs+500-zi())){if(0!==Ft(e,0))break;if(((i=e.suspendedLanes)&n)!==n){hu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Wr(Lu.bind(null,e),r);break}Lu(e);break;case 4:if(_u(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var s=31-Vt(n);a=1<<s,(s=r[s])>i&&(i=s),n&=~a}if(n=i,10<(n=(120>(n=zi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Is(n/1960))-n)){e.timeoutHandle=Wr(Lu.bind(null,e),n);break}Lu(e);break;default:throw Error(o(329))}}return vu(e,zi()),e.callbackNode===t?yu.bind(null,e):null}function _u(e,t){for(t&=~Vs,t&=~zs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Vt(t),r=1<<n;e[n]=-1,t&=~r}}function bu(e){if(0!==(48&Ls))throw Error(o(327));if(Mu(),e===Ns&&0!==(e.expiredLanes&Ms)){var t=Ms,n=xu(e,t);0!==(qs&zs)&&(n=xu(e,t=Ft(e,t)))}else n=xu(e,t=Ft(e,0));if(0!==e.tag&&2===n&&(Ls|=64,e.hydrate&&(e.hydrate=!1,Xr(e.containerInfo)),0!==(t=jt(e))&&(n=xu(e,t))),1===n)throw n=Bs,Eu(e,0),_u(e,t),vu(e,zi()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Lu(e),vu(e,zi()),null}function wu(e,t){var n=Ls;Ls|=1;try{return e(t)}finally{0===(Ls=n)&&(Ks(),Ki())}}function Tu(e,t){var n=Ls;Ls&=-2,Ls|=8;try{return e(t)}finally{0===(Ls=n)&&(Ks(),Ki())}}function ku(e,t){di(Fs,Us),Us|=t,qs|=t}function Su(){Us=Fs.current,ci(Fs)}function Eu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Gr(n)),null!==Ds)for(n=Ds.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&yi();break;case 3:Na(),ci(fi),ci(hi),$a();break;case 5:Ma(r);break;case 4:Na();break;case 13:case 19:ci(Ua);break;case 10:ra(r);break;case 23:case 24:Su()}n=n.return}Ns=e,Ds=Xu(e.current,null),Ms=Us=qs=t,js=0,Bs=null,Vs=zs=Hs=0}function Cu(e,t){for(;;){var n=Ds;try{if(na(),Ya.current=Ro,no){for(var r=Za.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}no=!1}if(Ja=0,to=eo=Za=null,ro=!1,Rs.current=null,null===n||null===n.return){js=1,Bs=t,Ds=null;break}e:{var a=e,o=n.return,s=n,u=t;if(t=Ms,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==u&&"object"===typeof u&&"function"===typeof u.then){var l=u;if(0===(2&s.mode)){var c=s.alternate;c?(s.updateQueue=c.updateQueue,s.memoizedState=c.memoizedState,s.lanes=c.lanes):(s.updateQueue=null,s.memoizedState=null)}var d=0!==(1&Ua.current),p=o;do{var h;if(h=13===p.tag){var f=p.memoizedState;if(null!==f)h=null!==f.dehydrated;else{var m=p.memoizedProps;h=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!d)}}if(h){var g=p.updateQueue;if(null===g){var v=new Set;v.add(l),p.updateQueue=v}else g.add(l);if(0===(2&p.mode)){if(p.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var y=ca(-1,1);y.tag=2,da(s,y)}s.lanes|=1;break e}u=void 0,s=t;var _=a.pingCache;if(null===_?(_=a.pingCache=new ps,u=new Set,_.set(l,u)):void 0===(u=_.get(l))&&(u=new Set,_.set(l,u)),!u.has(s)){u.add(s);var b=Hu.bind(null,a,l,s);l.then(b,b)}p.flags|=4096,p.lanes=t;break e}p=p.return}while(null!==p);u=Error((X(s.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.")}5!==js&&(js=2),u=cs(u,s),p=o;do{switch(p.tag){case 3:a=u,p.flags|=4096,t&=-t,p.lanes|=t,pa(p,hs(0,a,t));break e;case 1:a=u;var w=p.type,T=p.stateNode;if(0===(64&p.flags)&&("function"===typeof w.getDerivedStateFromError||null!==T&&"function"===typeof T.componentDidCatch&&(null===Zs||!Zs.has(T)))){p.flags|=4096,t&=-t,p.lanes|=t,pa(p,fs(p,a,t));break e}}p=p.return}while(null!==p)}Ru(n)}catch(k){t=k,Ds===n&&null!==n&&(Ds=n=n.return);continue}break}}function Au(){var e=Os.current;return Os.current=Ro,null===e?Ro:e}function xu(e,t){var n=Ls;Ls|=16;var r=Au();for(Ns===e&&Ms===t||Eu(e,t);;)try{Pu();break}catch(i){Cu(e,i)}if(na(),Ls=n,Os.current=r,null!==Ds)throw Error(o(261));return Ns=null,Ms=0,js}function Pu(){for(;null!==Ds;)Ou(Ds)}function Iu(){for(;null!==Ds&&!xi();)Ou(Ds)}function Ou(e){var t=$s(e.alternate,e,Us);e.memoizedProps=e.pendingProps,null===t?Ru(e):Ds=t,Rs.current=null}function Ru(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=us(n,t,Us)))return void(Ds=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Us)||0===(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=ls(t)))return n.flags&=2047,void(Ds=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Ds=t);Ds=t=e}while(null!==t);0===js&&(js=5)}function Lu(e){var t=Vi();return Gi(99,Nu.bind(null,e,t)),null}function Nu(e,t){do{Mu()}while(null!==tu);if(0!==(48&Ls))throw Error(o(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,a=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var s=e.eventTimes,u=e.expirationTimes;0<a;){var l=31-Vt(a),c=1<<l;i[l]=0,s[l]=-1,u[l]=-1,a&=~c}if(null!==au&&0===(24&r)&&au.has(e)&&au.delete(e),e===Ns&&(Ds=Ns=null,Ms=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Ls,Ls|=32,Rs.current=null,qr=$t,vr(s=gr())){if("selectionStart"in s)u={start:s.selectionStart,end:s.selectionEnd};else e:if(u=(u=s.ownerDocument)&&u.defaultView||window,(c=u.getSelection&&u.getSelection())&&0!==c.rangeCount){u=c.anchorNode,a=c.anchorOffset,l=c.focusNode,c=c.focusOffset;try{u.nodeType,l.nodeType}catch(C){u=null;break e}var d=0,p=-1,h=-1,f=0,m=0,g=s,v=null;t:for(;;){for(var y;g!==u||0!==a&&3!==g.nodeType||(p=d+a),g!==l||0!==c&&3!==g.nodeType||(h=d+c),3===g.nodeType&&(d+=g.nodeValue.length),null!==(y=g.firstChild);)v=g,g=y;for(;;){if(g===s)break t;if(v===u&&++f===a&&(p=d),v===l&&++m===c&&(h=d),null!==(y=g.nextSibling))break;v=(g=v).parentNode}g=y}u=-1===p||-1===h?null:{start:p,end:h}}else u=null;u=u||{start:0,end:0}}else u=null;Hr={focusedElem:s,selectionRange:u},$t=!1,du=null,pu=!1,Ys=r;do{try{Du()}catch(C){if(null===Ys)throw Error(o(330));qu(Ys,C),Ys=Ys.nextEffect}}while(null!==Ys);du=null,Ys=r;do{try{for(s=e;null!==Ys;){var _=Ys.flags;if(16&_&&ye(Ys.stateNode,""),128&_){var b=Ys.alternate;if(null!==b){var w=b.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(1038&_){case 2:ks(Ys),Ys.flags&=-3;break;case 6:ks(Ys),Ys.flags&=-3,As(Ys.alternate,Ys);break;case 1024:Ys.flags&=-1025;break;case 1028:Ys.flags&=-1025,As(Ys.alternate,Ys);break;case 4:As(Ys.alternate,Ys);break;case 8:Cs(s,u=Ys);var T=u.alternate;ws(u),null!==T&&ws(T)}Ys=Ys.nextEffect}}catch(C){if(null===Ys)throw Error(o(330));qu(Ys,C),Ys=Ys.nextEffect}}while(null!==Ys);if(w=Hr,b=gr(),_=w.focusedElem,s=w.selectionRange,b!==_&&_&&_.ownerDocument&&mr(_.ownerDocument.documentElement,_)){null!==s&&vr(_)&&(b=s.start,void 0===(w=s.end)&&(w=b),"selectionStart"in _?(_.selectionStart=b,_.selectionEnd=Math.min(w,_.value.length)):(w=(b=_.ownerDocument||document)&&b.defaultView||window).getSelection&&(w=w.getSelection(),u=_.textContent.length,T=Math.min(s.start,u),s=void 0===s.end?T:Math.min(s.end,u),!w.extend&&T>s&&(u=s,s=T,T=u),u=fr(_,T),a=fr(_,s),u&&a&&(1!==w.rangeCount||w.anchorNode!==u.node||w.anchorOffset!==u.offset||w.focusNode!==a.node||w.focusOffset!==a.offset)&&((b=b.createRange()).setStart(u.node,u.offset),w.removeAllRanges(),T>s?(w.addRange(b),w.extend(a.node,a.offset)):(b.setEnd(a.node,a.offset),w.addRange(b))))),b=[];for(w=_;w=w.parentNode;)1===w.nodeType&&b.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"===typeof _.focus&&_.focus(),_=0;_<b.length;_++)(w=b[_]).element.scrollLeft=w.left,w.element.scrollTop=w.top}$t=!!qr,Hr=qr=null,e.current=n,Ys=r;do{try{for(_=e;null!==Ys;){var k=Ys.flags;if(36&k&&ys(_,Ys.alternate,Ys),128&k){b=void 0;var S=Ys.ref;if(null!==S){var E=Ys.stateNode;Ys.tag,b=E,"function"===typeof S?S(b):S.current=b}}Ys=Ys.nextEffect}}catch(C){if(null===Ys)throw Error(o(330));qu(Ys,C),Ys=Ys.nextEffect}}while(null!==Ys);Ys=null,Fi(),Ls=i}else e.current=n;if(eu)eu=!1,tu=e,nu=t;else for(Ys=r;null!==Ys;)t=Ys.nextEffect,Ys.nextEffect=null,8&Ys.flags&&((k=Ys).sibling=null,k.stateNode=null),Ys=t;if(0===(r=e.pendingLanes)&&(Zs=null),1===r?e===su?ou++:(ou=0,su=e):ou=0,n=n.stateNode,Si&&"function"===typeof Si.onCommitFiberRoot)try{Si.onCommitFiberRoot(ki,n,void 0,64===(64&n.current.flags))}catch(C){}if(vu(e,zi()),Qs)throw Qs=!1,e=Js,Js=null,e;return 0!==(8&Ls)||Ki(),null}function Du(){for(;null!==Ys;){var e=Ys.alternate;pu||null===du||(0!==(8&Ys.flags)?et(Ys,du)&&(pu=!0):13===Ys.tag&&Ps(e,Ys)&&et(Ys,du)&&(pu=!0));var t=Ys.flags;0!==(256&t)&&vs(e,Ys),0===(512&t)||eu||(eu=!0,Xi(97,(function(){return Mu(),null}))),Ys=Ys.nextEffect}}function Mu(){if(90!==nu){var e=97<nu?97:nu;return nu=90,Gi(e,ju)}return!1}function Uu(e,t){ru.push(t,e),eu||(eu=!0,Xi(97,(function(){return Mu(),null})))}function Fu(e,t){iu.push(t,e),eu||(eu=!0,Xi(97,(function(){return Mu(),null})))}function ju(){if(null===tu)return!1;var e=tu;if(tu=null,0!==(48&Ls))throw Error(o(331));var t=Ls;Ls|=32;var n=iu;iu=[];for(var r=0;r<n.length;r+=2){var i=n[r],a=n[r+1],s=i.destroy;if(i.destroy=void 0,"function"===typeof s)try{s()}catch(l){if(null===a)throw Error(o(330));qu(a,l)}}for(n=ru,ru=[],r=0;r<n.length;r+=2){i=n[r],a=n[r+1];try{var u=i.create;i.destroy=u()}catch(l){if(null===a)throw Error(o(330));qu(a,l)}}for(u=e.current.firstEffect;null!==u;)e=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=e;return Ls=t,Ki(),!0}function Bu(e,t,n){da(e,t=hs(0,t=cs(n,t),1)),t=hu(),null!==(e=gu(e,1))&&(zt(e,1,t),vu(e,t))}function qu(e,t){if(3===e.tag)Bu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Bu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Zs||!Zs.has(r))){var i=fs(n,e=cs(t,e),1);if(da(n,i),i=hu(),null!==(n=gu(n,1)))zt(n,1,i),vu(n,i);else if("function"===typeof r.componentDidCatch&&(null===Zs||!Zs.has(r)))try{r.componentDidCatch(t,e)}catch(a){}break}}n=n.return}}function Hu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=hu(),e.pingedLanes|=e.suspendedLanes&n,Ns===e&&(Ms&n)===n&&(4===js||3===js&&(62914560&Ms)===Ms&&500>zi()-Gs?Eu(e,0):Vs|=n),vu(e,t)}function zu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Vi()?1:2:(0===lu&&(lu=qs),0===(t=qt(62914560&~lu))&&(t=4194304))),n=hu(),null!==(e=gu(e,t))&&(zt(e,t,n),vu(e,n))}function Vu(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.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Wu(e,t,n,r){return new Vu(e,t,n,r)}function Gu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Xu(e,t){var n=e.alternate;return null===n?((n=Wu(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.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ku(e,t,n,r,i,a){var s=2;if(r=e,"function"===typeof e)Gu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case S:return $u(n.children,i,a,t);case M:s=8,i|=16;break;case E:s=8,i|=1;break;case C:return(e=Wu(12,n,t,8|i)).elementType=C,e.type=C,e.lanes=a,e;case I:return(e=Wu(13,n,t,i)).type=I,e.elementType=I,e.lanes=a,e;case O:return(e=Wu(19,n,t,i)).elementType=O,e.lanes=a,e;case U:return Yu(n,i,a,t);case F:return(e=Wu(24,n,t,i)).elementType=F,e.lanes=a,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case A:s=10;break e;case x:s=9;break e;case P:s=11;break e;case R:s=14;break e;case L:s=16,r=null;break e;case N:s=22;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Wu(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function $u(e,t,n,r){return(e=Wu(7,e,r,t)).lanes=n,e}function Yu(e,t,n,r){return(e=Wu(23,e,r,t)).elementType=U,e.lanes=n,e}function Qu(e,t,n){return(e=Wu(6,e,null,t)).lanes=n,e}function Ju(e,t,n){return(t=Wu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zu(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ht(0),this.expirationTimes=Ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ht(0),this.mutableSourceEagerHydrationData=null}function el(e,t,n,r){var i=t.current,a=hu(),s=fu(i);e:if(n){t:{if(Ye(n=n._reactInternals)!==n||1!==n.tag)throw Error(o(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(vi(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(o(171))}if(1===n.tag){var l=n.type;if(vi(l)){n=bi(n,l,u);break e}}n=u}else n=pi;return null===t.context?t.context=n:t.pendingContext=n,(t=ca(a,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),da(i,t),mu(i,s,a),s}function tl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nl(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function rl(e,t){nl(e,t),(e=e.alternate)&&nl(e,t)}function il(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Zu(e,t,null!=n&&!0===n.hydrate),t=Wu(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,ua(t),e[ei]=n.current,Rr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function al(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ol(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a._internalRoot;if("function"===typeof i){var s=i;i=function(){var e=tl(o);s.call(e)}}el(t,o,e,i)}else{if(a=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 il(e,0,t?{hydrate:!0}:void 0)}(n,r),o=a._internalRoot,"function"===typeof i){var u=i;i=function(){var e=tl(o);u.call(e)}}Tu((function(){el(t,o,e,i)}))}return tl(o)}function sl(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!al(t))throw Error(o(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:k,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}$s=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||fi.current)Uo=!0;else{if(0===(n&r)){switch(Uo=!1,t.tag){case 3:Xo(t),Xa();break;case 5:Da(t);break;case 1:vi(t.type)&&wi(t);break;case 4:La(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;di(Ji,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Zo(e,t,n):(di(Ua,1&Ua.current),null!==(t=os(e,t,n))?t.sibling:null);di(Ua,1&Ua.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return as(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),di(Ua,Ua.current),r)break;return null;case 23:case 24:return t.lanes=0,Ho(e,t,n)}return os(e,t,n)}Uo=0!==(16384&e.flags)}else Uo=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=gi(t,hi.current),aa(t,n),i=oo(null,t,r,e,i,n),t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,vi(r)){var a=!0;wi(t)}else a=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,ua(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&ga(t,r,s,e),i.updater=va,t.stateNode=i,i._reactInternals=t,wa(t,r,e,n),t=Go(null,t,r,!0,a,n)}else t.tag=0,Fo(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(a=i._init)(i._payload),t.type=i,a=t.tag=function(e){if("function"===typeof e)return Gu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===P)return 11;if(e===R)return 14}return 2}(i),e=Qi(i,e),a){case 0:t=Vo(null,t,i,e,n);break e;case 1:t=Wo(null,t,i,e,n);break e;case 11:t=jo(null,t,i,e,n);break e;case 14:t=Bo(null,t,i,Qi(i.type,e),r,n);break e}throw Error(o(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Vo(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Wo(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 3:if(Xo(t),r=t.updateQueue,null===e||null===r)throw Error(o(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,la(e,t),ha(t,r,null,n),(r=t.memoizedState.element)===i)Xa(),t=os(e,t,n);else{if((a=(i=t.stateNode).hydrate)&&(Ba=Kr(t.stateNode.containerInfo.firstChild),ja=t,a=qa=!0),a){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(a=e[i])._workInProgressVersionPrimary=e[i+1],Ka.push(a);for(n=Aa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Fo(e,t,r,n),Xa();t=t.child}return t;case 5:return Da(t),null===e&&Va(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,Vr(r,i)?s=null:null!==a&&Vr(r,a)&&(t.flags|=16),zo(e,t),Fo(e,t,s,n),t.child;case 6:return null===e&&Va(t),null;case 13:return Zo(e,t,n);case 4:return La(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ca(t,null,r,n):Fo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,jo(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 7:return Fo(e,t,t.pendingProps,n),t.child;case 8:case 12:return Fo(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value;var u=t.type._context;if(di(Ji,u._currentValue),u._currentValue=a,null!==s)if(u=s.value,0===(a=cr(u,a)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,a):1073741823))){if(s.children===i.children&&!fi.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&a)){1===u.tag&&((c=ca(-1,n&-n)).tag=2,da(u,c)),u.lanes|=n,null!==(c=u.alternate)&&(c.lanes|=n),ia(u.return,n),l.lanes|=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}Fo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(a=t.pendingProps).children,aa(t,n),r=r(i=oa(i,a.unstable_observedBits)),t.flags|=1,Fo(e,t,r,n),t.child;case 14:return a=Qi(i=t.type,t.pendingProps),Bo(e,t,i,a=Qi(i.type,a),r,n);case 15:return qo(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.flags|=2),t.tag=1,vi(r)?(e=!0,wi(t)):e=!1,aa(t,n),_a(t,r,i),wa(t,r,i,n),Go(null,t,r,!0,e,n);case 19:return as(e,t,n);case 23:case 24:return Ho(e,t,n)}throw Error(o(156,t.tag))},il.prototype.render=function(e){el(e,this._internalRoot,null,null)},il.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;el(null,e,null,(function(){t[ei]=null}))},tt=function(e){13===e.tag&&(mu(e,4,hu()),rl(e,4))},nt=function(e){13===e.tag&&(mu(e,67108864,hu()),rl(e,67108864))},rt=function(e){if(13===e.tag){var t=hu(),n=fu(e);mu(e,n,t),rl(e,n)}},it=function(e,t){return t()},Ae=function(e,t,n){switch(t){case"input":if(ne(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=ai(r);if(!i)throw Error(o(90));Q(r),ne(r,i)}}}break;case"textarea":le(e,n);break;case"select":null!=(t=n.value)&&oe(e,!!n.multiple,t,!1)}},Le=wu,Ne=function(e,t,n,r,i){var a=Ls;Ls|=4;try{return Gi(98,e.bind(null,t,n,r,i))}finally{0===(Ls=a)&&(Ks(),Ki())}},De=function(){0===(49&Ls)&&(function(){if(null!==au){var e=au;au=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,vu(e,zi())}))}Ki()}(),Mu())},Me=function(e,t){var n=Ls;Ls|=2;try{return e(t)}finally{0===(Ls=n)&&(Ks(),Ki())}};var ul={Events:[ri,ii,ai,Oe,Re,Mu,{current:!1}]},ll={findFiberByHostInstance:ni,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},cl={bundleType:ll.bundleType,version:ll.version,rendererPackageName:ll.rendererPackageName,rendererConfig:ll.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:ll.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var dl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dl.isDisabled&&dl.supportsFiber)try{ki=dl.inject(cl),Si=dl}catch(ge){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ul,t.createPortal=sl,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));throw Error(o(268,Object.keys(e)))}return e=null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Ls;if(0!==(48&n))return e(t);Ls|=1;try{if(e)return Gi(99,e.bind(null,t))}finally{Ls=n,Ki()}},t.hydrate=function(e,t,n){if(!al(t))throw Error(o(200));return ol(null,e,t,!0,n)},t.render=function(e,t,n){if(!al(t))throw Error(o(200));return ol(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!al(e))throw Error(o(40));return!!e._reactRootContainer&&(Tu((function(){ol(null,null,e,!1,(function(){e._reactRootContainer=null,e[ei]=null}))})),!0)},t.unstable_batchedUpdates=wu,t.unstable_createPortal=function(e,t){return sl(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!al(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return ol(e,t,n,!1,r)},t.version="17.0.2"},17119:function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(38345)},4899:function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function i(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function o(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,o=null,s=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?s="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==o||null!==s){var u=e.displayName||e.name,l="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==o?"\n "+o:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=i),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,{polyfill:function(){return o}}),r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},29357:function(e,t,n){"use strict";n.r(t),n.d(t,{ENTERED:function(){return h},ENTERING:function(){return p},EXITED:function(){return d},EXITING:function(){return f},UNMOUNTED:function(){return c}});var r=n(98587),i=n(77387),a=n(9950),o=n(17119),s=n(35460),u=n(28555),l=n(50385),c="unmounted",d="exited",p="entering",h="entered",f="exiting",m=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(i=d,r.appearStatus=p):i=h:i=t.unmountOnExit||t.mountOnEnter?c:d,r.state={status:i},r.nextCallback=null,r}(0,i.A)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===c?{status:d}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==p&&n!==h&&(t=p):n!==p&&n!==h||(t=f)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===p){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:o.findDOMNode(this);n&&(0,l.F)(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===d&&this.setState({status:c})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[o.findDOMNode(this),r],a=i[0],u=i[1],l=this.getTimeouts(),c=r?l.appear:l.enter;!e&&!n||s.A.disabled?this.safeSetState({status:h},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,u),this.safeSetState({status:p},(function(){t.props.onEntering(a,u),t.onTransitionEnd(c,(function(){t.safeSetState({status:h},(function(){t.props.onEntered(a,u)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:o.findDOMNode(this);t&&!s.A.disabled?(this.props.onExit(r),this.safeSetState({status:f},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:d},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:d},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:o.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],s=i[1];this.props.addEndListener(a,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===c)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,r.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.createElement(u.A.Provider,{value:null},"function"===typeof n?n(e,i):a.cloneElement(a.Children.only(n),i))},t}(a.Component);function g(){}m.contextType=u.A,m.propTypes={},m.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:g,onEntering:g,onEntered:g,onExit:g,onExiting:g,onExited:g},m.UNMOUNTED=c,m.EXITED=d,m.ENTERING=p,m.ENTERED=h,m.EXITING=f,t.default=m},28555:function(e,t,n){"use strict";var r=n(9950);t.A=r.createContext(null)},35460:function(e,t){"use strict";t.A={disabled:!1}},50385:function(e,t,n){"use strict";n.d(t,{F:function(){return r}});var r=function(e){return e.scrollTop}},32654:function(e,t,n){"use strict";n(26470);var r=n(9950),i=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var a=Symbol.for;i=a("react.element"),t.Fragment=a("react.fragment")}var o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,a={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(c=t.ref),t)s.call(t,r)&&!u.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:i,type:e,key:l,ref:c,props:a,_owner:o.current}}t.jsx=l,t.jsxs=l},32049:function(e,t,n){"use strict";var r=n(26470),i=60103,a=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var o=60109,s=60110,u=60112;t.Suspense=60113;var l=60115,c=60116;if("function"===typeof Symbol&&Symbol.for){var d=Symbol.for;i=d("react.element"),a=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),o=d("react.provider"),s=d("react.context"),u=d("react.forward_ref"),t.Suspense=d("react.suspense"),l=d("react.memo"),c=d("react.lazy")}var p="function"===typeof Symbol&&Symbol.iterator;function h(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 f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function g(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}function v(){}function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(h(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=g.prototype;var _=y.prototype=new v;_.constructor=y,r(_,g.prototype),_.isPureReactComponent=!0;var b={current:null},w=Object.prototype.hasOwnProperty,T={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,n){var r,a={},o=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)w.call(t,r)&&!T.hasOwnProperty(r)&&(a[r]=t[r]);var u=arguments.length-2;if(1===u)a.children=n;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];a.children=l}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===a[r]&&(a[r]=u[r]);return{$$typeof:i,type:e,key:o,ref:s,props:a,_owner:b.current}}function S(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var E=/\/+/g;function C(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 A(e,t,n,r,o){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case i:case a:u=!0}}if(u)return o=o(u=e),e=""===r?"."+C(u,0):r,Array.isArray(o)?(n="",null!=e&&(n=e.replace(E,"$&/")+"/"),A(o,t,n,"",(function(e){return e}))):null!=o&&(S(o)&&(o=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||u&&u.key===o.key?"":(""+o.key).replace(E,"$&/")+"/")+e)),t.push(o)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=r+C(s=e[l],l);u+=A(s,t,n,c,o)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),l=0;!(s=e.next()).done;)u+=A(s=s.value,t,n,c=r+C(s,l++),o);else if("object"===s)throw t=""+e,Error(h(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function x(e,t,n){if(null==e)return e;var r=[],i=0;return A(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function P(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,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)}))}if(1===e._status)return e._result;throw e._result}var I={current:null};function O(){var e=I.current;if(null===e)throw Error(h(321));return e}var R={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:b,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:x,forEach:function(e,t,n){x(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return x(e,(function(){t++})),t},toArray:function(e){return x(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error(h(143));return e}},t.Component=g,t.PureComponent=y,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(h(267,e));var a=r({},e.props),o=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=b.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)w.call(t,c)&&!T.hasOwnProperty(c)&&(a[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)a.children=n;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];a.children=l}return{$$typeof:i,type:e.type,key:o,ref:s,props:a,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:P}},t.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return O().useCallback(e,t)},t.useContext=function(e,t){return O().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return O().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return O().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return O().useLayoutEffect(e,t)},t.useMemo=function(e,t){return O().useMemo(e,t)},t.useReducer=function(e,t,n){return O().useReducer(e,t,n)},t.useRef=function(e){return O().useRef(e)},t.useState=function(e){return O().useState(e)},t.version="17.0.2"},9950:function(e,t,n){"use strict";e.exports=n(32049)},44414:function(e,t,n){"use strict";e.exports=n(32654)},76115:function(e,t,n){"use strict";var r=n(58168),i=n(98587),a=n(64467),o=n(9950),s=n(11942),u=n.n(s),l=n(48738),c=n.n(l),d=n(44208),p=n(58367);function h(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m={children:u().node,className:u().string,closeClassName:u().string,closeAriaLabel:u().string,cssModule:u().object,color:u().string,fade:u().bool,isOpen:u().bool,toggle:u().func,tag:d.tagPropType,transition:u().shape(p.A.propTypes),innerRef:u().oneOfType([u().object,u().string,u().func])},g={color:"success",isOpen:!0,tag:"div",closeAriaLabel:"Close",fade:!0,transition:f(f({},p.A.defaultProps),{},{unmountOnExit:!0})};function v(e){var t=e.className,n=e.closeClassName,a=e.closeAriaLabel,s=e.cssModule,u=e.tag,l=e.color,h=e.isOpen,m=e.toggle,g=e.children,v=e.transition,y=e.fade,_=e.innerRef,b=(0,i.A)(e,["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"]),w=(0,d.mapToCssModules)(c()(t,"alert","alert-"+l,{"alert-dismissible":m}),s),T=(0,d.mapToCssModules)(c()("close",n),s),k=f(f(f({},p.A.defaultProps),v),{},{baseClass:y?v.baseClass:"",timeout:y?v.timeout:0});return o.createElement(p.A,(0,r.A)({},b,k,{tag:u,className:w,in:h,role:"alert",innerRef:_}),m?o.createElement("button",{type:"button",className:T,"aria-label":a,onClick:m},o.createElement("span",{"aria-hidden":"true"},"\xd7")):null,g)}v.propTypes=m,v.defaultProps=g,t.A=v},18849:function(e,t,n){"use strict";var r=n(58168),i=n(98587),a=n(9417),o=n(77387),s=n(9950),u=n(11942),l=n.n(u),c=n(48738),d=n.n(c),p=n(44208),h={active:l().bool,"aria-label":l().string,block:l().bool,color:l().string,disabled:l().bool,outline:l().bool,tag:p.tagPropType,innerRef:l().oneOfType([l().object,l().func,l().string]),onClick:l().func,size:l().string,children:l().node,className:l().string,cssModule:l().object,close:l().bool},f=function(e){function t(t){var n;return(n=e.call(this,t)||this).onClick=n.onClick.bind((0,a.A)(n)),n}(0,o.A)(t,e);var n=t.prototype;return n.onClick=function(e){if(!this.props.disabled)return this.props.onClick?this.props.onClick(e):void 0;e.preventDefault()},n.render=function(){var e=this.props,t=e.active,n=e["aria-label"],a=e.block,o=e.className,u=e.close,l=e.cssModule,c=e.color,h=e.outline,f=e.size,m=e.tag,g=e.innerRef,v=(0,i.A)(e,["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"]);u&&"undefined"===typeof v.children&&(v.children=s.createElement("span",{"aria-hidden":!0},"\xd7"));var y="btn"+(h?"-outline":"")+"-"+c,_=(0,p.mapToCssModules)(d()(o,{close:u},u||"btn",u||y,!!f&&"btn-"+f,!!a&&"btn-block",{active:t,disabled:this.props.disabled}),l);v.href&&"button"===m&&(m="a");var b=u?"Close":null;return s.createElement(m,(0,r.A)({type:"button"===m&&v.onClick?"button":void 0},v,{className:_,ref:g,onClick:this.onClick,"aria-label":n||b}))},t}(s.Component);f.propTypes=h,f.defaultProps={color:"secondary",tag:"button"},t.A=f},58367:function(e,t,n){"use strict";var r=n(58168),i=n(98587),a=n(64467),o=n(9950),s=n(11942),u=n.n(s),l=n(48738),c=n.n(l),d=n(44623),p=n(44208);function h(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=f(f({},d.Transition.propTypes),{},{children:u().oneOfType([u().arrayOf(u().node),u().node]),tag:p.tagPropType,baseClass:u().string,baseClassActive:u().string,className:u().string,cssModule:u().object,innerRef:u().oneOfType([u().object,u().string,u().func])}),g=f(f({},d.Transition.defaultProps),{},{tag:"div",baseClass:"fade",baseClassActive:"show",timeout:p.TransitionTimeouts.Fade,appear:!0,enter:!0,exit:!0,in:!0});function v(e){var t=e.tag,n=e.baseClass,a=e.baseClassActive,s=e.className,u=e.cssModule,l=e.children,h=e.innerRef,f=(0,i.A)(e,["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"]),m=(0,p.pick)(f,p.TransitionPropTypeKeys),g=(0,p.omit)(f,p.TransitionPropTypeKeys);return o.createElement(d.Transition,m,(function(e){var i="entered"===e,d=(0,p.mapToCssModules)(c()(s,n,i&&a),u);return o.createElement(t,(0,r.A)({className:d},g,{ref:h}),l)}))}v.propTypes=m,v.defaultProps=g,t.A=v},19247:function(e,t,n){"use strict";var r=n(58168),i=n(98587),a=n(9417),o=n(77387),s=n(9950),u=n(11942),l=n.n(u),c=n(48738),d=n.n(c),p=n(44208),h={children:l().node,inline:l().bool,tag:p.tagPropType,innerRef:l().oneOfType([l().object,l().func,l().string]),className:l().string,cssModule:l().object},f=function(e){function t(t){var n;return(n=e.call(this,t)||this).getRef=n.getRef.bind((0,a.A)(n)),n.submit=n.submit.bind((0,a.A)(n)),n}(0,o.A)(t,e);var n=t.prototype;return n.getRef=function(e){this.props.innerRef&&this.props.innerRef(e),this.ref=e},n.submit=function(){this.ref&&this.ref.submit()},n.render=function(){var e=this.props,t=e.className,n=e.cssModule,a=e.inline,o=e.tag,u=e.innerRef,l=(0,i.A)(e,["className","cssModule","inline","tag","innerRef"]),c=(0,p.mapToCssModules)(d()(t,!!a&&"form-inline"),n);return s.createElement(o,(0,r.A)({},l,{ref:u,className:c}))},t}(s.Component);f.propTypes=h,f.defaultProps={tag:"form"},t.A=f},76152:function(e,t,n){"use strict";var r=n(58168),i=n(98587),a=n(9950),o=n(11942),s=n.n(o),u=n(48738),l=n.n(u),c=n(44208),d={children:s().node,row:s().bool,check:s().bool,inline:s().bool,disabled:s().bool,tag:c.tagPropType,className:s().string,cssModule:s().object},p=function(e){var t=e.className,n=e.cssModule,o=e.row,s=e.disabled,u=e.check,d=e.inline,p=e.tag,h=(0,i.A)(e,["className","cssModule","row","disabled","check","inline","tag"]),f=(0,c.mapToCssModules)(l()(t,!!o&&"row",u?"form-check":"form-group",!(!u||!d)&&"form-check-inline",!(!u||!s)&&"disabled"),n);return"fieldset"===p&&(h.disabled=s),a.createElement(p,(0,r.A)({},h,{className:f}))};p.propTypes=d,p.defaultProps={tag:"div"},t.A=p},85077:function(e,t,n){"use strict";var r=n(58168),i=n(98587),a=n(9417),o=n(77387),s=n(9950),u=n(11942),l=n.n(u),c=n(48738),d=n.n(c),p=n(44208),h={children:l().node,type:l().string,size:l().oneOfType([l().number,l().string]),bsSize:l().string,valid:l().bool,invalid:l().bool,tag:p.tagPropType,innerRef:l().oneOfType([l().object,l().func,l().string]),plaintext:l().bool,addon:l().bool,className:l().string,cssModule:l().object},f=function(e){function t(t){var n;return(n=e.call(this,t)||this).getRef=n.getRef.bind((0,a.A)(n)),n.focus=n.focus.bind((0,a.A)(n)),n}(0,o.A)(t,e);var n=t.prototype;return n.getRef=function(e){this.props.innerRef&&this.props.innerRef(e),this.ref=e},n.focus=function(){this.ref&&this.ref.focus()},n.render=function(){var e=this.props,t=e.className,n=e.cssModule,a=e.type,o=e.bsSize,u=e.valid,l=e.invalid,c=e.tag,h=e.addon,f=e.plaintext,m=e.innerRef,g=(0,i.A)(e,["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"]),v=["radio","checkbox"].indexOf(a)>-1,y=new RegExp("\\D","g"),_=c||("select"===a||"textarea"===a?a:"input"),b="form-control";f?(b+="-plaintext",_=c||"input"):"file"===a?b+="-file":"range"===a?b+="-range":v&&(b=h?null:"form-check-input"),g.size&&y.test(g.size)&&((0,p.warnOnce)('Please use the prop "bsSize" instead of the "size" to bootstrap\'s input sizing.'),o=g.size,delete g.size);var w=(0,p.mapToCssModules)(d()(t,l&&"is-invalid",u&&"is-valid",!!o&&"form-control-"+o,b),n);return("input"===_||c&&"function"===typeof c)&&(g.type=a),g.children&&!f&&"select"!==a&&"string"===typeof _&&"select"!==_&&((0,p.warnOnce)('Input with a type of "'+a+'" cannot have children. Please use "value"/"defaultValue" instead.'),delete g.children),s.createElement(_,(0,r.A)({},g,{ref:m,className:w,"aria-invalid":l}))},t}(s.Component);f.propTypes=h,f.defaultProps={type:"text"},t.A=f},55627:function(e,t,n){"use strict";var r=n(58168),i=n(98587),a=n(9950),o=n(11942),s=n.n(o),u=n(48738),l=n.n(u),c=n(44208),d=s().oneOfType([s().number,s().string]),p=s().oneOfType([s().bool,s().string,s().number,s().shape({size:d,order:d,offset:d})]),h={children:s().node,hidden:s().bool,check:s().bool,size:s().string,for:s().string,tag:c.tagPropType,className:s().string,cssModule:s().object,xs:p,sm:p,md:p,lg:p,xl:p,widths:s().array},f={tag:"label",widths:["xs","sm","md","lg","xl"]},m=function(e,t,n){return!0===n||""===n?e?"col":"col-"+t:"auto"===n?e?"col-auto":"col-"+t+"-auto":e?"col-"+n:"col-"+t+"-"+n},g=function(e){var t=e.className,n=e.cssModule,o=e.hidden,s=e.widths,u=e.tag,d=e.check,p=e.size,h=e.for,f=(0,i.A)(e,["className","cssModule","hidden","widths","tag","check","size","for"]),g=[];s.forEach((function(t,r){var i=e[t];if(delete f[t],i||""===i){var a,o=!r;if((0,c.isObject)(i)){var s,u=o?"-":"-"+t+"-";a=m(o,t,i.size),g.push((0,c.mapToCssModules)(l()(((s={})[a]=i.size||""===i.size,s["order"+u+i.order]=i.order||0===i.order,s["offset"+u+i.offset]=i.offset||0===i.offset,s))),n)}else a=m(o,t,i),g.push(a)}}));var v=(0,c.mapToCssModules)(l()(t,!!o&&"sr-only",!!d&&"form-check-label",!!p&&"col-form-label-"+p,g,!!g.length&&"col-form-label"),n);return a.createElement(u,(0,r.A)({htmlFor:h},f,{className:v}))};g.propTypes=h,g.defaultProps=f,t.A=g},58195:function(e,t,n){"use strict";n.d(t,{A:function(){return C}});var r=n(64467),i=n(58168),a=n(9417),o=n(77387),s=n(9950),u=n(11942),l=n.n(u),c=n(48738),d=n.n(c),p=n(17119),h=n(44208),f={children:l().node.isRequired,node:l().any},m=function(e){function t(){return e.apply(this,arguments)||this}(0,o.A)(t,e);var n=t.prototype;return n.componentWillUnmount=function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null},n.render=function(){return h.canUseDOM?(this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),p.createPortal(this.props.children,this.props.node||this.defaultNode)):null},t}(s.Component);m.propTypes=f;var g=m,v=n(58367);function y(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 _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(){}var w=l().shape(v.A.propTypes),T={isOpen:l().bool,autoFocus:l().bool,centered:l().bool,scrollable:l().bool,size:l().string,toggle:l().func,keyboard:l().bool,role:l().string,labelledBy:l().string,backdrop:l().oneOfType([l().bool,l().oneOf(["static"])]),onEnter:l().func,onExit:l().func,onOpened:l().func,onClosed:l().func,children:l().node,className:l().string,wrapClassName:l().string,modalClassName:l().string,backdropClassName:l().string,contentClassName:l().string,external:l().node,fade:l().bool,cssModule:l().object,zIndex:l().oneOfType([l().number,l().string]),backdropTransition:w,modalTransition:w,innerRef:l().oneOfType([l().object,l().string,l().func]),unmountOnClose:l().bool,returnFocusAfterClose:l().bool,container:h.targetPropType,trapFocus:l().bool},k=Object.keys(T),S={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:b,onClosed:b,modalTransition:{timeout:h.TransitionTimeouts.Modal},backdropTransition:{mountOnEnter:!0,timeout:h.TransitionTimeouts.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},E=function(e){function t(t){var n;return(n=e.call(this,t)||this)._element=null,n._originalBodyPadding=null,n.getFocusableChildren=n.getFocusableChildren.bind((0,a.A)(n)),n.handleBackdropClick=n.handleBackdropClick.bind((0,a.A)(n)),n.handleBackdropMouseDown=n.handleBackdropMouseDown.bind((0,a.A)(n)),n.handleEscape=n.handleEscape.bind((0,a.A)(n)),n.handleStaticBackdropAnimation=n.handleStaticBackdropAnimation.bind((0,a.A)(n)),n.handleTab=n.handleTab.bind((0,a.A)(n)),n.onOpened=n.onOpened.bind((0,a.A)(n)),n.onClosed=n.onClosed.bind((0,a.A)(n)),n.manageFocusAfterClose=n.manageFocusAfterClose.bind((0,a.A)(n)),n.clearBackdropAnimationTimeout=n.clearBackdropAnimationTimeout.bind((0,a.A)(n)),n.trapFocus=n.trapFocus.bind((0,a.A)(n)),n.state={isOpen:!1,showStaticBackdropAnimation:!1},n}(0,o.A)(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.props,t=e.isOpen,n=e.autoFocus,r=e.onEnter;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0},n.componentDidUpdate=function(e,t){if(this.props.isOpen&&!e.isOpen)return this.init(),void this.setState({isOpen:!0});this.props.autoFocus&&this.state.isOpen&&!t.isOpen&&this.setFocus(),this._element&&e.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)},n.componentWillUnmount=function(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1},n.trapFocus=function(e){if(this.props.trapFocus&&this._element&&(!this._dialog||this._dialog.parentNode!==e.target)&&!(this.modalIndex<t.openCount-1)){for(var n=this.getFocusableChildren(),r=0;r<n.length;r++)if(n[r]===e.target)return;n.length>0&&(e.preventDefault(),e.stopPropagation(),n[0].focus())}},n.onOpened=function(e,t){this.props.onOpened(),(this.props.modalTransition.onEntered||b)(e,t)},n.onClosed=function(e){var t=this.props.unmountOnClose;this.props.onClosed(),(this.props.modalTransition.onExited||b)(e),t&&this.destroy(),this.close(),this._isMounted&&this.setState({isOpen:!1})},n.setFocus=function(){this._dialog&&this._dialog.parentNode&&"function"===typeof this._dialog.parentNode.focus&&this._dialog.parentNode.focus()},n.getFocusableChildren=function(){return this._element.querySelectorAll(h.focusableElements.join(", "))},n.getFocusedChild=function(){var e,t=this.getFocusableChildren();try{e=document.activeElement}catch(n){e=t[0]}return e},n.handleBackdropClick=function(e){if(e.target===this._mouseDownElement){e.stopPropagation();var t=this._dialog?this._dialog.parentNode:null;if(t&&e.target===t&&"static"===this.props.backdrop&&this.handleStaticBackdropAnimation(),!this.props.isOpen||!0!==this.props.backdrop)return;t&&e.target===t&&this.props.toggle&&this.props.toggle(e)}},n.handleTab=function(e){if(9===e.which&&!(this.modalIndex<t.openCount-1)){var n=this.getFocusableChildren(),r=n.length;if(0!==r){for(var i=this.getFocusedChild(),a=0,o=0;o<r;o+=1)if(n[o]===i){a=o;break}e.shiftKey&&0===a?(e.preventDefault(),n[r-1].focus()):e.shiftKey||a!==r-1||(e.preventDefault(),n[0].focus())}}},n.handleBackdropMouseDown=function(e){this._mouseDownElement=e.target},n.handleEscape=function(e){this.props.isOpen&&e.keyCode===h.keyCodes.esc&&this.props.toggle&&(this.props.keyboard?(e.preventDefault(),e.stopPropagation(),this.props.toggle(e)):"static"===this.props.backdrop&&(e.preventDefault(),e.stopPropagation(),this.handleStaticBackdropAnimation()))},n.handleStaticBackdropAnimation=function(){var e=this;this.clearBackdropAnimationTimeout(),this.setState({showStaticBackdropAnimation:!0}),this._backdropAnimationTimeout=setTimeout((function(){e.setState({showStaticBackdropAnimation:!1})}),100)},n.init=function(){try{this._triggeringElement=document.activeElement}catch(e){this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=(0,h.getTarget)(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=(0,h.getOriginalBodyPadding)(),(0,h.conditionallyUpdateScrollbar)(),0===t.openCount&&(document.body.className=d()(document.body.className,(0,h.mapToCssModules)("modal-open",this.props.cssModule))),this.modalIndex=t.openCount,t.openCount+=1},n.destroy=function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()},n.manageFocusAfterClose=function(){if(this._triggeringElement){var e=this.props.returnFocusAfterClose;this._triggeringElement.focus&&e&&this._triggeringElement.focus(),this._triggeringElement=null}},n.close=function(){if(t.openCount<=1){var e=(0,h.mapToCssModules)("modal-open",this.props.cssModule),n=new RegExp("(^| )"+e+"( |$)");document.body.className=document.body.className.replace(n," ").trim()}this.manageFocusAfterClose(),t.openCount=Math.max(0,t.openCount-1),(0,h.setScrollbarWidth)(this._originalBodyPadding)},n.renderModalDialog=function(){var e,t=this,n=(0,h.omit)(this.props,k),r="modal-dialog";return s.createElement("div",(0,i.A)({},n,{className:(0,h.mapToCssModules)(d()(r,this.props.className,(e={},e["modal-"+this.props.size]=this.props.size,e[r+"-centered"]=this.props.centered,e[r+"-scrollable"]=this.props.scrollable,e)),this.props.cssModule),role:"document",ref:function(e){t._dialog=e}}),s.createElement("div",{className:(0,h.mapToCssModules)(d()("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))},n.render=function(){var e=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!e)){var t=!!this._element&&!this.state.isOpen&&!e;this._element.style.display=t?"none":"block";var n=this.props,r=n.wrapClassName,a=n.modalClassName,o=n.backdropClassName,u=n.cssModule,l=n.isOpen,c=n.backdrop,p=n.role,f=n.labelledBy,m=n.external,y=n.innerRef,b={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":f,role:p,tabIndex:"-1"},w=this.props.fade,T=_(_(_({},v.A.defaultProps),this.props.modalTransition),{},{baseClass:w?this.props.modalTransition.baseClass:"",timeout:w?this.props.modalTransition.timeout:0}),k=_(_(_({},v.A.defaultProps),this.props.backdropTransition),{},{baseClass:w?this.props.backdropTransition.baseClass:"",timeout:w?this.props.backdropTransition.timeout:0}),S=c&&(w?s.createElement(v.A,(0,i.A)({},k,{in:l&&!!c,cssModule:u,className:(0,h.mapToCssModules)(d()("modal-backdrop",o),u)})):s.createElement("div",{className:(0,h.mapToCssModules)(d()("modal-backdrop","show",o),u)}));return s.createElement(g,{node:this._element},s.createElement("div",{className:(0,h.mapToCssModules)(r)},s.createElement(v.A,(0,i.A)({},b,T,{in:l,onEntered:this.onOpened,onExited:this.onClosed,cssModule:u,className:(0,h.mapToCssModules)(d()("modal",a,this.state.showStaticBackdropAnimation&&"modal-static"),u),innerRef:y}),m,this.renderModalDialog()),S))}return null},n.clearBackdropAnimationTimeout=function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)},t}(s.Component);E.propTypes=T,E.defaultProps=S,E.openCount=0;var C=E},99308:function(e,t,n){"use strict";var r=n(58168),i=n(98587),a=n(9950),o=n(11942),s=n.n(o),u=n(48738),l=n.n(u),c=n(44208),d={tag:c.tagPropType,className:s().string,cssModule:s().object},p=function(e){var t=e.className,n=e.cssModule,o=e.tag,s=(0,i.A)(e,["className","cssModule","tag"]),u=(0,c.mapToCssModules)(l()(t,"modal-body"),n);return a.createElement(o,(0,r.A)({},s,{className:u}))};p.propTypes=d,p.defaultProps={tag:"div"},t.A=p},85907:function(e,t,n){"use strict";var r=n(58168),i=n(98587),a=n(9950),o=n(11942),s=n.n(o),u=n(48738),l=n.n(u),c=n(44208),d={tag:c.tagPropType,className:s().string,cssModule:s().object},p=function(e){var t=e.className,n=e.cssModule,o=e.tag,s=(0,i.A)(e,["className","cssModule","tag"]),u=(0,c.mapToCssModules)(l()(t,"modal-footer"),n);return a.createElement(o,(0,r.A)({},s,{className:u}))};p.propTypes=d,p.defaultProps={tag:"div"},t.A=p},14113:function(e,t,n){"use strict";var r=n(58168),i=n(98587),a=n(9950),o=n(11942),s=n.n(o),u=n(48738),l=n.n(u),c=n(44208),d={tag:c.tagPropType,wrapTag:c.tagPropType,toggle:s().func,className:s().string,cssModule:s().object,children:s().node,closeAriaLabel:s().string,charCode:s().oneOfType([s().string,s().number]),close:s().object},p=function(e){var t,n=e.className,o=e.cssModule,s=e.children,u=e.toggle,d=e.tag,p=e.wrapTag,h=e.closeAriaLabel,f=e.charCode,m=e.close,g=(0,i.A)(e,["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","charCode","close"]),v=(0,c.mapToCssModules)(l()(n,"modal-header"),o);if(!m&&u){var y="number"===typeof f?String.fromCharCode(f):f;t=a.createElement("button",{type:"button",onClick:u,className:(0,c.mapToCssModules)("close",o),"aria-label":h},a.createElement("span",{"aria-hidden":"true"},y))}return a.createElement(p,(0,r.A)({},g,{className:v}),a.createElement(d,{className:(0,c.mapToCssModules)("modal-title",o)},s),m||t)};p.propTypes=d,p.defaultProps={tag:"h5",wrapTag:"div",closeAriaLabel:"Close",charCode:215},t.A=p},44208:function(e,t,n){"use strict";n.r(t),n.d(t,{DOMElement:function(){return _},PopperPlacements:function(){return C},TransitionPropTypeKeys:function(){return k},TransitionStatuses:function(){return S},TransitionTimeouts:function(){return T},addMultipleEventListeners:function(){return U},canUseDOM:function(){return A},conditionallyUpdateScrollbar:function(){return c},defaultToggleEvents:function(){return M},deprecated:function(){return v},findDOMElements:function(){return L},focusableElements:function(){return F},getOriginalBodyPadding:function(){return l},getScrollbarWidth:function(){return o},getTarget:function(){return D},isArrayOrNodeList:function(){return N},isBodyOverflowing:function(){return u},isFunction:function(){return R},isObject:function(){return O},isReactRefObj:function(){return x},keyCodes:function(){return E},mapToCssModules:function(){return p},omit:function(){return h},pick:function(){return f},setGlobalCssModule:function(){return d},setScrollbarWidth:function(){return s},tagPropType:function(){return w},targetPropType:function(){return b},toNumber:function(){return I},warnOnce:function(){return g}});var r,i=n(11942),a=n.n(i);function o(){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function s(e){document.body.style.paddingRight=e>0?e+"px":null}function u(){return document.body.clientWidth<window.innerWidth}function l(){var e=window.getComputedStyle(document.body,null);return parseInt(e&&e.getPropertyValue("padding-right")||0,10)}function c(){var e=o(),t=document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")[0],n=t?parseInt(t.style.paddingRight||0,10):0;u()&&s(n+e)}function d(e){r=e}function p(e,t){return void 0===e&&(e=""),void 0===t&&(t=r),t?e.split(" ").map((function(e){return t[e]||e})).join(" "):e}function h(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}function f(e,t){for(var n,r=Array.isArray(t)?t:[t],i=r.length,a={};i>0;)a[n=r[i-=1]]=e[n];return a}var m={};function g(e){m[e]||("undefined"!==typeof console&&console.error(e),m[e]=!0)}function v(e,t){return function(n,r,i){null!==n[r]&&"undefined"!==typeof n[r]&&g('"'+r+'" property of "'+i+'" has been deprecated.\n'+t);for(var a=arguments.length,o=new Array(a>3?a-3:0),s=3;s<a;s++)o[s-3]=arguments[s];return e.apply(void 0,[n,r,i].concat(o))}}var y="object"===typeof window&&window.Element||function(){};function _(e,t,n){if(!(e[t]instanceof y))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var b=a().oneOfType([a().string,a().func,_,a().shape({current:a().any})]),w=a().oneOfType([a().func,a().string,a().shape({$$typeof:a().symbol,render:a().func}),a().arrayOf(a().oneOfType([a().func,a().string,a().shape({$$typeof:a().symbol,render:a().func})]))]),T={Fade:150,Collapse:350,Modal:300,Carousel:600},k=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],S={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},E={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},C=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],A=!("undefined"===typeof window||!window.document||!window.document.createElement);function x(e){return!(!e||"object"!==typeof e)&&"current"in e}function P(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function I(e){var t=typeof e;if("number"===t)return e;if("symbol"===t||"object"===t&&"[object Symbol]"===P(e))return NaN;if(O(e)){var n="function"===typeof e.valueOf?e.valueOf():e;e=O(n)?""+n:n}if("string"!==t)return 0===e?e:+e;e=e.replace(/^\s+|\s+$/g,"");var r=/^0b[01]+$/i.test(e);return r||/^0o[0-7]+$/i.test(e)?parseInt(e.slice(2),r?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?NaN:+e}function O(e){var t=typeof e;return null!=e&&("object"===t||"function"===t)}function R(e){if(!O(e))return!1;var t=P(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object Proxy]"===t}function L(e){if(x(e))return e.current;if(R(e))return e();if("string"===typeof e&&A){var t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll("#"+e)),!t.length)throw new Error("The target '"+e+"' could not be identified in the dom, tip: check spelling");return t}return e}function N(e){return null!==e&&(Array.isArray(e)||A&&"number"===typeof e.length)}function D(e,t){var n=L(e);return t?N(n)?n:null===n?[]:[n]:N(n)?n[0]:n}var M=["touchstart","click"];function U(e,t,n,r){var i=e;N(i)||(i=[i]);var a=n;if("string"===typeof a&&(a=a.split(/\s+/)),!N(i)||"function"!==typeof t||!Array.isArray(a))throw new Error("\n The first argument of this function must be DOM node or an array on DOM nodes or NodeList.\n The second must be a function.\n The third is a string or an array of strings that represents DOM events\n ");return Array.prototype.forEach.call(a,(function(e){Array.prototype.forEach.call(i,(function(n){n.addEventListener(e,t,r)}))})),function(){Array.prototype.forEach.call(a,(function(e){Array.prototype.forEach.call(i,(function(n){n.removeEventListener(e,t,r)}))}))}}var F=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])']},78418:function(e,t,n){"use strict";var r=n(24994);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,i.default)(e,t)||("string"===typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var i=r(n(7579));e.exports=t.default},7579:function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},23115:function(e){"use strict";function t(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,n){e.classList?e.classList.remove(n):"string"===typeof e.className?e.className=t(e.className,n):e.setAttribute("class",t(e.className&&e.className.baseVal||"",n))}},83251:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(11942));var r=s(n(78418)),i=s(n(23115)),a=s(n(9950)),o=s(n(60356));n(62279);function s(e){return e&&e.__esModule?e:{default:e}}function u(){return u=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},u.apply(this,arguments)}var l=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,r.default)(e,t)}))},c=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,i.default)(e,t)}))},d=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).onEnter=function(e,n){var r=t.getClassNames(n?"appear":"enter").className;t.removeClasses(e,"exit"),l(e,r),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.getClassNames(n?"appear":"enter").activeClassName;t.reflowAndAddClass(e,r),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.getClassNames("appear").doneClassName,i=t.getClassNames("enter").doneClassName,a=n?r+" "+i:i;t.removeClasses(e,n?"appear":"enter"),l(e,a),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),l(e,n),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,n),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),l(e,n),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"===typeof n,i=r?(r&&n?n+"-":"")+e:n[e];return{className:i,activeClassName:r?i+"-active":n[e+"Active"],doneClassName:r?i+"-done":n[e+"Done"]}},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.removeClasses=function(e,t){var n=this.getClassNames(t),r=n.className,i=n.activeClassName,a=n.doneClassName;r&&c(e,r),i&&c(e,i),a&&c(e,a)},i.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,l(e,t))},i.render=function(){var e=u({},this.props);return delete e.classNames,a.default.createElement(o.default,u({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(a.default.Component);d.defaultProps={classNames:""},d.propTypes={};var p=d;t.default=p,e.exports=t.default},10572:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;o(n(11942));var r=o(n(9950)),i=n(17119),a=o(n(98441));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e){var t,n;function o(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=o.prototype;return s.handleLifecycle=function(e,t,n){var a,o=this.props.children,s=r.default.Children.toArray(o)[t];s.props[e]&&(a=s.props)[e].apply(a,n),this.props[e]&&this.props[e]((0,i.findDOMNode)(this))},s.render=function(){var e=this.props,t=e.children,n=e.in,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["children","in"]),o=r.default.Children.toArray(t),s=o[0],u=o[1];return delete i.onEnter,delete i.onEntering,delete i.onEntered,delete i.onExit,delete i.onExiting,delete i.onExited,r.default.createElement(a.default,i,n?r.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(u,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},o}(r.default.Component);s.propTypes={};var u=s;t.default=u,e.exports=t.default},60356:function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(11942)),i=s(n(9950)),a=s(n(17119)),o=n(4899);n(62279);function s(e){return e&&e.__esModule?e:{default:e}}var u="unmounted";t.UNMOUNTED=u;var l="exited";t.EXITED=l;var c="entering";t.ENTERING=c;var d="entered";t.ENTERED=d;var p="exiting";t.EXITING=p;var h=function(e){var t,n;function r(t,n){var r;r=e.call(this,t,n)||this;var i,a=n.transitionGroup,o=a&&!a.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=l,r.appearStatus=c):i=d:i=t.unmountOnExit||t.mountOnEnter?u:l,r.state={status:i},r.nextCallback=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.getChildContext=function(){return{transitionGroup:null}},r.getDerivedStateFromProps=function(e,t){return e.in&&t.status===u?{status:l}:null},o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==c&&n!==d&&(t=c):n!==c&&n!==d||(t=p)}this.updateStatus(!1,t)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},o.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=a.default.findDOMNode(this);t===c?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===l&&this.setState({status:u})},o.performEnter=function(e,t){var n=this,r=this.props.enter,i=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,a=this.getTimeouts(),o=i?a.appear:a.enter;t||r?(this.props.onEnter(e,i),this.safeSetState({status:c},(function(){n.props.onEntering(e,i),n.onTransitionEnd(e,o,(function(){n.safeSetState({status:d},(function(){n.props.onEntered(e,i)}))}))}))):this.safeSetState({status:d},(function(){n.props.onEntered(e)}))},o.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:p},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:l},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:l},(function(){t.props.onExited(e)}))},o.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},o.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},o.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},o.render=function(){var e=this.state.status;if(e===u)return null;var t=this.props,n=t.children,r=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"===typeof n)return n(e,r);var a=i.default.Children.only(n);return i.default.cloneElement(a,r)},r}(i.default.Component);function f(){}h.contextTypes={transitionGroup:r.object},h.childContextTypes={transitionGroup:function(){}},h.propTypes={},h.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:f,onEntering:f,onEntered:f,onExit:f,onExiting:f,onExited:f},h.UNMOUNTED=0,h.EXITED=1,h.ENTERING=2,h.ENTERED=3,h.EXITING=4;var m=(0,o.polyfill)(h);t.default=m},98441:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(11942)),i=s(n(9950)),a=n(4899),o=n(90177);function s(e){return e&&e.__esModule?e:{default:e}}function u(){return u=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},u.apply(this,arguments)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},d=function(e){var t,n;function r(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(l(l(r)));return r.state={handleExited:i,firstRender:!0},r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=r.prototype;return a.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},a.componentDidMount=function(){this.appeared=!0,this.mounted=!0},a.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,o.getInitialChildMapping)(e,r):(0,o.getNextChildMapping)(e,n,r),firstRender:!1}},a.handleExited=function(e,t){var n=(0,o.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=u({},t.children);return delete n[e.key],{children:n}})))},a.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["component","childFactory"]),a=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:i.default.createElement(t,r,a)},r}(i.default.Component);d.childContextTypes={transitionGroup:r.default.object.isRequired},d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,a.polyfill)(d);t.default=p,e.exports=t.default},44623:function(e,t,n){"use strict";var r=s(n(83251)),i=s(n(10572)),a=s(n(98441)),o=s(n(60356));function s(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:o.default,TransitionGroup:a.default,ReplaceTransition:i.default,CSSTransition:r.default}},90177:function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=i,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return i(e.children,(function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:o(n,"appear",e),enter:o(n,"enter",e),exit:o(n,"exit",e)})}))},t.getNextChildMapping=function(e,t,n){var s=i(e.children),u=a(t,s);return Object.keys(u).forEach((function(i){var a=u[i];if((0,r.isValidElement)(a)){var l=i in t,c=i in s,d=t[i],p=(0,r.isValidElement)(d)&&!d.props.in;!c||l&&!p?c||!l||p?c&&l&&(0,r.isValidElement)(d)&&(u[i]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:d.props.in,exit:o(a,"exit",e),enter:o(a,"enter",e)})):u[i]=(0,r.cloneElement)(a,{in:!1}):u[i]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:o(a,"exit",e),enter:o(a,"enter",e)})}})),u};var r=n(9950);function i(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),a=[];for(var o in e)o in t?a.length&&(i[o]=a,a=[]):a.push(o);var s={};for(var u in t){if(i[u])for(r=0;r<i[u].length;r++){var l=i[u][r];s[i[u][r]]=n(l)}s[u]=n(u)}for(r=0;r<a.length;r++)s[a[r]]=n(a[r]);return s}function o(e,t,n){return null!=n[t]?n[t]:e.props[t]}},62279:function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r;(r=n(11942))&&r.__esModule;t.timeoutsShape=null;t.classNamesShape=null},4415:function(e){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(i){r=i}return[r,n]}},31761:function(e,t){"use strict";var n,r,i,a;if("object"===typeof performance&&"function"===typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var l=null,c=null,d=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(n){throw setTimeout(d,0),n}};n=function(e){null!==l?setTimeout(n,0,e):(l=e,setTimeout(d,0))},r=function(e,t){c=setTimeout(e,t)},i=function(){clearTimeout(c)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,h=window.clearTimeout;if("undefined"!==typeof console){var f=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof f&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,g=null,v=-1,y=5,_=0;t.unstable_shouldYield=function(){return t.unstable_now()>=_},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):y=0<e?Math.floor(1e3/e):5};var b=new MessageChannel,w=b.port2;b.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();_=e+y;try{g(!0,e)?w.postMessage(null):(m=!1,g=null)}catch(n){throw w.postMessage(null),n}}else m=!1},n=function(e){g=e,m||(m=!0,w.postMessage(null))},r=function(e,n){v=p((function(){e(t.unstable_now())}),n)},i=function(){h(v),v=-1}}function T(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<E(i,t)))break e;e[r]=t,e[n]=i,n=r}}function k(e){return void 0===(e=e[0])?null:e}function S(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 a=2*(r+1)-1,o=e[a],s=a+1,u=e[s];if(void 0!==o&&0>E(o,n))void 0!==u&&0>E(u,o)?(e[r]=u,e[s]=n,r=s):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==u&&0>E(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function E(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],A=[],x=1,P=null,I=3,O=!1,R=!1,L=!1;function N(e){for(var t=k(A);null!==t;){if(null===t.callback)S(A);else{if(!(t.startTime<=e))break;S(A),t.sortIndex=t.expirationTime,T(C,t)}t=k(A)}}function D(e){if(L=!1,N(e),!R)if(null!==k(C))R=!0,n(M);else{var t=k(A);null!==t&&r(D,t.startTime-e)}}function M(e,n){R=!1,L&&(L=!1,i()),O=!0;var a=I;try{for(N(n),P=k(C);null!==P&&(!(P.expirationTime>n)||e&&!t.unstable_shouldYield());){var o=P.callback;if("function"===typeof o){P.callback=null,I=P.priorityLevel;var s=o(P.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?P.callback=s:P===k(C)&&S(C),N(n)}else S(C);P=k(C)}if(null!==P)var u=!0;else{var l=k(A);null!==l&&r(D,l.startTime-n),u=!1}return u}finally{P=null,I=a,O=!1}}var U=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||O||(R=!0,n(M))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return k(C)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=U,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_scheduleCallback=function(e,a,o){var s=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?s+o:s:o=s,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:x++,callback:a,priorityLevel:e,startTime:o,expirationTime:u=o+u,sortIndex:-1},o>s?(e.sortIndex=o,T(A,e),null===k(C)&&e===k(A)&&(L?i():L=!0,r(D,o-s))):(e.sortIndex=u,T(C,e),R||O||(R=!0,n(M))),e},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}}},75340:function(e,t,n){"use strict";e.exports=n(31761)},35488:function(e){!function(){var t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,i=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),!(t=t.trim())){if(!r.alwaysNormalize)return e;var i=a.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=a.normalizePath(i.path),a.buildURLFromParts(i)}var o=a.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return r.alwaysNormalize?(o.path=a.normalizePath(o.path),a.buildURLFromParts(o)):t;var s=a.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var u=n.exec(s.path);s.netLoc=u[1],s.path=u[2]}s.netLoc&&!s.path&&(s.path="/");var l={scheme:s.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(l.netLoc=s.netLoc,"/"!==o.path[0]))if(o.path){var c=s.path,d=c.substring(0,c.lastIndexOf("/")+1)+o.path;l.path=a.normalizePath(d)}else l.path=s.path,o.params||(l.params=s.params,o.query||(l.query=s.query));return null===l.path&&(l.path=r.alwaysNormalize?a.normalizePath(o.path):o.path),a.buildURLFromParts(l)},parseURL:function(e){var n=t.exec(e);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(i,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=a}()},13336:function(e,t,n){"use strict";n.d(t,{A:function(){return pc}});var r=n(77626),i=n.n(r),a=n(15063),o=n.n(a),s=n(58168),u=n(26391),l=n.n(u),c=n(9417),d=n(77387),p=n(4415),h=n.n(p),f=n(96938),m=n.n(f),g=n(37974),v=n.n(g),y=n(36324),_=n(85501),b=n(35488),w=n.n(b),T="http://example.com",k=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=i().location&&i().location.href||"");var n="function"===typeof i().URL,r=/^\/\//.test(e),a=!i().location&&!/\/\//i.test(e);if(n?e=new(i().URL)(e,i().location||T):/\/\//i.test(e)||(e=w().buildAbsoluteURL(i().location&&i().location.href||"",e)),n){var o=new URL(t,e);return a?o.href.slice(18):r?o.href.slice(o.protocol.length):o.href}return w().buildAbsoluteURL(e,t)},S=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),a=t.length,o=0;o<a;++o)t[o].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),E=n(93325).hp;function C(e){for(var t,n=(t=e,i().atob?i().atob(t):E.from(t,"base64").toString("binary")),r=new Uint8Array(n.length),a=0;a<n.length;a++)r[a]=n.charCodeAt(a);return r}var A,x=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return(0,d.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}(S),P=String.fromCharCode(9),I=function(e){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),n={};return t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),n},O=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},R=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}(0,d.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=/^#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:?(.*)?$/.exec(e))return n=(0,s.A)(I(t[1]),{type:"tag",tagType:"byterange"}),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 a=O(t[1]);a.URI&&(n.uri=a.URI),a.BYTERANGE&&(n.byterange=I(a.BYTERANGE))}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=O(t[1]),n.attributes.RESOLUTION){var o=n.attributes.RESOLUTION.split("x"),u={};o[0]&&(u.width=parseInt(o[0],10)),o[1]&&(u.height=parseInt(o[1],10)),n.attributes.RESOLUTION=u}n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),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=O(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=O(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=O(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);if((t=/^#EXT-X-SKIP:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"skip"}).attributes=O(t[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(P)),void r.trigger("data",n);if((t=/^#EXT-X-PART:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part"}).attributes=O(t[1]),["DURATION"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=I(n.attributes.BYTERANGE)),void r.trigger("data",n);if((t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"server-control"}).attributes=O(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),void r.trigger("data",n);if((t=/^#EXT-X-PART-INF:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part-inf"}).attributes=O(t[1]),["PART-TARGET"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),void r.trigger("data",n);if((t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"preload-hint"}).attributes=O(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseInt(n.attributes[e],10);var t="BYTERANGE-LENGTH"===e?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[t]=n.attributes[e],delete n.attributes[e]}})),void r.trigger("data",n);if((t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"rendition-report"}).attributes=O(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseInt(n.attributes[e],10))})),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,a=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:a}),!0}))},n.addTagMapper=function(e){var t=e.expression,n=e.map;this.tagMappers.push((function(e){return t.test(e)?n(e):e}))},t}(S),L=function(e){var t={};return Object.keys(e).forEach((function(n){var r;t[(r=n,r.toLowerCase().replace(/-(\w)/g,(function(e){return e[1].toUpperCase()})))]=e[n]})),t},N=function(e){var t=e.serverControl,n=e.targetDuration,r=e.partTargetDuration;if(t){var i="#EXT-X-SERVER-CONTROL",a="holdBack",o="partHoldBack",s=n&&3*n,u=r&&2*r;n&&!t.hasOwnProperty(a)&&(t[a]=s,this.trigger("info",{message:i+" defaulting HOLD-BACK to targetDuration * 3 ("+s+")."})),s&&t[a]<s&&(this.trigger("warn",{message:i+" clamping HOLD-BACK ("+t[a]+") to targetDuration * 3 ("+s+")"}),t[a]=s),r&&!t.hasOwnProperty(o)&&(t[o]=3*r,this.trigger("info",{message:i+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+t[o]+")."})),r&&t[o]<u&&(this.trigger("warn",{message:i+" clamping PART-HOLD-BACK ("+t[o]+") to partTargetDuration * 2 ("+u+")."}),t[o]=u)}},D=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new x,t.parseStream=new R,t.lineStream.pipe(t.parseStream);var n,r,i=(0,c.A)(t),a=[],o={},u=!1,l=function(){},d={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},p=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var h=0,f=0;return t.on("end",(function(){o.uri||!o.parts&&!o.preloadHints||(!o.map&&n&&(o.map=n),!o.key&&r&&(o.key=r),o.timeline||"number"!==typeof p||(o.timeline=p),t.manifest.preloadSegment=o)})),t.parseStream.on("data",(function(e){var t,c;({tag:function(){({version:function(){e.version&&(this.manifest.version=e.version)},"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&&(o.byterange=t,t.length=e.length,"offset"in e||(e.offset=h)),"offset"in e&&(o.byterange=t,t.offset=e.offset),h=t.offset+t.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(o.duration=e.duration),0===e.duration&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=a},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("com.microsoft.playready"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri: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)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:C(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},"undefined"!==typeof 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,p=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),r&&(n.key=r)},"stream-inf":function(){this.manifest.playlists=a,this.manifest.mediaGroups=this.manifest.mediaGroups||d,e.attributes?(o.attributes||(o.attributes={}),(0,s.A)(o.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||d,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(){p+=1,o.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time":function(){"undefined"===typeof this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),o.dateTimeString=e.dateTimeString,o.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,N.call(this,this.manifest))},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(){o.cueOut=e.data},"cue-out-cont":function(){o.cueOutCont=e.data},"cue-in":function(){o.cueIn=e.data},skip:function(){this.manifest.skip=L(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;u=!0;var n=this.manifest.segments.length,r=L(e.attributes);o.parts=o.parts||[],o.parts.push(r),r.byterange&&(r.byterange.hasOwnProperty("offset")||(r.byterange.offset=f),f=r.byterange.offset+r.byterange.length);var i=o.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+i+" for segment #"+n,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((function(e,n){e.hasOwnProperty("lastPart")||t.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+n+" lacks required attribute(s): LAST-PART"})}))},"server-control":function(){var t=this.manifest.serverControl=L(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),N.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var t=this.manifest.segments.length,n=L(e.attributes),r=n.type&&"PART"===n.type;o.preloadHints=o.preloadHints||[],o.preloadHints.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=r?f:0,r&&(f=n.byterange.offset+n.byterange.length)));var i=o.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t,e.attributes,["TYPE","URI"]),n.type)for(var a=0;a<o.preloadHints.length-1;a++){var s=o.preloadHints[a];s.type&&(s.type===n.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t+" has the same TYPE "+n.type+" as preload hint #"+a}))}},"rendition-report":function(){var t=L(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);var n=this.manifest.renditionReports.length-1,r=["LAST-MSN","URI"];u&&r.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+n,e.attributes,r)},"part-inf":function(){this.manifest.partInf=L(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),N.call(this,this.manifest)}}[e.tagType]||l).call(i)},uri:function(){o.uri=e.uri,a.push(o),this.manifest.targetDuration&&!("duration"in o)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),r&&(o.key=r),o.timeline=p,n&&(o.map=n),f=0,o={}},comment:function(){},custom:function(){e.segment?(o.custom=o.custom||{},o.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(i)})),t}(0,d.A)(t,e);var n=t.prototype;return n.warnOnMissingAttributes_=function(e,t,n){var r=[];n.forEach((function(e){t.hasOwnProperty(e)||r.push(e)})),r.length&&this.trigger("warn",{message:e+" lacks required attribute(s): "+r.join(", ")})},n.push=function(e){this.lineStream.push(e)},n.end=function(){this.lineStream.push("\n"),this.trigger("end")},n.addParser=function(e){this.parseStream.addParser(e)},n.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(S),M={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},U=["video","audio","text"],F=["Video","Audio","Text"],j=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})):e},B=function(e){void 0===e&&(e="");var t=e.split(","),n=[];return t.forEach((function(e){var t;e=e.trim(),U.forEach((function(r){var i=M[r].exec(e.toLowerCase());if(i&&!(i.length<=1)){t=r;var a=e.substring(0,i[1].length),o=e.replace(a,"");n.push({type:a,details:o,mediaType:r})}})),t||n.push({type:e,details:"",mediaType:"unknown"})})),n},q=function(e){return void 0===e&&(e=""),M.audio.test(e.trim().toLowerCase())},H=function(e){if(e&&"string"===typeof e){var t,n=e.toLowerCase().split(",").map((function(e){return j(e.trim())})),r="video";1===n.length&&q(n[0])?r="audio":1===n.length&&(void 0===(t=n[0])&&(t=""),M.text.test(t.trim().toLowerCase()))&&(r="application");var i="mp4";return n.every((function(e){return M.mp4.test(e)}))?i="mp4":n.every((function(e){return M.webm.test(e)}))?i="webm":n.every((function(e){return M.ogg.test(e)}))&&(i="ogg"),r+"/"+i+';codecs="'+e+'"'}},z=function(e){return void 0===e&&(e=""),i().MediaSource&&i().MediaSource.isTypeSupported&&i().MediaSource.isTypeSupported(H(e))||!1},V=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<F.length;t++){if(M["muxer"+F[t]].test(e))return!0}return!1}))},W="mp4a.40.2",G=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,X=/^application\/dash\+xml/i,K=function(e){return G.test(e)?"hls":X.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null},$=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Y=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||$(e)||e instanceof ArrayBuffer||(e="number"!==typeof e||"number"===typeof e&&e!==e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Q=i().BigInt||Number,J=[Q("0x1"),Q("0x100"),Q("0x10000"),Q("0x1000000"),Q("0x100000000"),Q("0x10000000000"),Q("0x1000000000000"),Q("0x100000000000000"),Q("0x10000000000000000")],Z=(function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}(),function(e,t){var n=void 0===t?{}:t,r=n.signed,i=void 0!==r&&r,a=n.le,o=void 0!==a&&a;e=Y(e);var s=o?"reduce":"reduceRight",u=(e[s]?e[s]:Array.prototype[s]).call(e,(function(t,n,r){var i=o?r:Math.abs(r+1-e.length);return t+Q(n)*J[i]}),Q(0));if(i){var l=J[e.length]/Q(2)-Q(1);(u=Q(u))>l&&(u-=l,u-=l,u-=Q(2))}return Number(u)}),ee=function(e,t){var n=(void 0===t?{}:t).le,r=void 0!==n&&n;("bigint"!==typeof e&&"number"!==typeof e||"number"===typeof e&&e!==e)&&(e=0),e=Q(e);for(var i,a=(i=e,Math.ceil(function(e){return e.toString(2).length}(i)/8)),o=new Uint8Array(new ArrayBuffer(a)),s=0;s<a;s++){var u=r?s:Math.abs(s+1-o.length);o[u]=Number(e/J[s]&Q(255)),e<0&&(o[u]=Math.abs(~o[u]),o[u]-=0===s?1:2)}return o},te=function(e,t){if("string"!==typeof e&&e&&"function"===typeof e.toString&&(e=e.toString()),"string"!==typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n},ne=function(e,t,n){var r=void 0===n?{}:n,i=r.offset,a=void 0===i?0:i,o=r.mask,s=void 0===o?[]:o;e=Y(e);var u=(t=Y(t)).every?t.every:Array.prototype.every;return t.length&&e.length-a>=t.length&&u.call(t,(function(t,n){return t===(s[n]?s[n]&e[a+n]:e[a+n])}))},re=n(65820),ie=function(e){return!!e&&"object"===typeof e},ae=function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(t,n){return"object"!==typeof n||Object.keys(n).forEach((function(r){Array.isArray(t[r])&&Array.isArray(n[r])?t[r]=t[r].concat(n[r]):ie(t[r])&&ie(n[r])?t[r]=e(t[r],n[r]):t[r]=n[r]})),t}),{})},oe=function(e){return Object.keys(e).map((function(t){return e[t]}))},se=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},ue=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},le=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1},ce="INVALID_NUMBER_OF_PERIOD",de="DASH_EMPTY_MANIFEST",pe="DASH_INVALID_XML",he="NO_BASE_URL",fe="SEGMENT_TIME_UNSPECIFIED",me="UNSUPPORTED_UTC_TIMING_SCHEME",ge=function(e){var t=e.baseUrl,n=void 0===t?"":t,r=e.source,a=void 0===r?"":r,o=e.range,s=void 0===o?"":o,u=e.indexRange,l=void 0===u?"":u,c={uri:a,resolvedUri:k(n||"",a)};if(s||l){var d,p=(s||l).split("-"),h=i().BigInt?i().BigInt(p[0]):parseInt(p[0],10),f=i().BigInt?i().BigInt(p[1]):parseInt(p[1],10);h<Number.MAX_SAFE_INTEGER&&"bigint"===typeof h&&(h=Number(h)),f<Number.MAX_SAFE_INTEGER&&"bigint"===typeof f&&(f=Number(f)),"bigint"===typeof(d="bigint"===typeof f||"bigint"===typeof h?i().BigInt(f)-i().BigInt(h)+i().BigInt(1):f-h+1)&&d<Number.MAX_SAFE_INTEGER&&(d=Number(d)),c.byterange={length:d,offset:h}}return c},ve=function(e){return e&&"number"!==typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e},ye={static:function(e){var t=e.duration,n=e.timescale,r=void 0===n?1:n,i=e.sourceDuration,a=e.periodDuration,o=ve(e.endNumber),s=t/r;return"number"===typeof o?{start:0,end:o}:"number"===typeof a?{start:0,end:a/s}:{start:0,end:i/s}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,r=e.availabilityStartTime,i=e.timescale,a=void 0===i?1:i,o=e.duration,s=e.periodStart,u=void 0===s?0:s,l=e.minimumUpdatePeriod,c=void 0===l?0:l,d=e.timeShiftBufferDepth,p=void 0===d?1/0:d,h=ve(e.endNumber),f=(t+n)/1e3,m=r+u,g=f+c-m,v=Math.ceil(g*a/o),y=Math.floor((f-m-p)*a/o),_=Math.floor((f-m)*a/o);return{start:Math.max(0,y),end:"number"===typeof h?h:Math.min(v,_)}}},_e=function(e){var t=e.type,n=e.duration,r=e.timescale,i=void 0===r?1:r,a=e.periodDuration,o=e.sourceDuration,s=ye[t](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){var n=e.duration,r=e.timescale,i=void 0===r?1:r,a=e.periodStart,o=e.startNumber;return{number:(void 0===o?1:o)+t,duration:n/i,timeline:a,time:t*n}}}(e));if("static"===t){var l=u.length-1,c="number"===typeof a?a:o;u[l].duration=c-n/i*l}return u},be=function(e){var t=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,i=e.sourceDuration,a=e.indexRange,o=void 0===a?"":a,s=e.periodStart,u=e.presentationTime,l=e.number,c=void 0===l?0:l,d=e.duration;if(!t)throw new Error(he);var p=ge({baseUrl:t,source:r.sourceURL,range:r.range}),h=ge({baseUrl:t,source:t,indexRange:o});if(h.map=p,d){var f=_e(e);f.length&&(h.duration=f[0].duration,h.timeline=f[0].timeline)}else i&&(h.duration=i,h.timeline=s);return h.presentationTime=u||s,h.number=c,[h]},we=function(e,t,n){var r,a=e.sidx.map?e.sidx.map:null,o=e.sidx.duration,s=e.timeline||0,u=e.sidx.byterange,l=u.offset+u.length,c=t.timescale,d=t.references.filter((function(e){return 1!==e.referenceType})),p=[],h=e.endList?"static":"dynamic",f=e.sidx.timeline,m=f,g=e.mediaSequence||0;r="bigint"===typeof t.firstOffset?i().BigInt(l)+t.firstOffset:l+t.firstOffset;for(var v=0;v<d.length;v++){var y=t.references[v],_=y.referencedSize,b=y.subsegmentDuration,w=void 0;w="bigint"===typeof r?r+i().BigInt(_)-i().BigInt(1):r+_-1;var T=be({baseUrl:n,timescale:c,timeline:s,periodStart:f,presentationTime:m,number:g,duration:b,sourceDuration:o,indexRange:r+"-"+w,type:h})[0];a&&(T.map=a),p.push(T),r+="bigint"===typeof r?i().BigInt(_):_,m+=b/c,g++}return e.segments=p,e},Te=["AUDIO","SUBTITLES"],ke=1/60,Se=function(e){return(t=e,n=function(e){return e.timeline},oe(t.reduce((function(e,t){return t.forEach((function(t){e[n(t)]=t})),e}),{}))).sort((function(e,t){return e.timeline>t.timeline?1:-1}));var t,n},Ee=function(e){var t,n,r=[];return t=e,n=function(e,t,n,i){r=r.concat(e.playlists||[])},Te.forEach((function(e){for(var r in t.mediaGroups[e])for(var i in t.mediaGroups[e][r]){var a=t.mediaGroups[e][r][i];n(a,e,r,i)}})),r},Ce=function(e){var t=e.playlist,n=e.mediaSequence;t.mediaSequence=n,t.segments.forEach((function(e,n){e.number=t.mediaSequence+n}))},Ae=function(e){var t=e.oldManifest,n=e.newManifest,r=t.playlists.concat(Ee(t)),i=n.playlists.concat(Ee(n));return n.timelineStarts=Se([t.timelineStarts,n.timelineStarts]),function(e){var t=e.oldPlaylists,n=e.newPlaylists,r=e.timelineStarts;n.forEach((function(e){e.discontinuitySequence=le(r,(function(t){return t.timeline===e.timeline}));var n=function(e,t){for(var n=0;n<e.length;n++)if(e[n].attributes.NAME===t)return e[n];return null}(t,e.attributes.NAME);if(n&&!e.sidx){var i=e.segments[0],a=le(n.segments,(function(e){return Math.abs(e.presentationTime-i.presentationTime)<ke}));if(-1===a)return Ce({playlist:e,mediaSequence:n.mediaSequence+n.segments.length}),e.segments[0].discontinuity=!0,e.discontinuityStarts.unshift(0),void((!n.segments.length&&e.timeline>n.timeline||n.segments.length&&e.timeline>n.segments[n.segments.length-1].timeline)&&e.discontinuitySequence--);n.segments[a].discontinuity&&!i.discontinuity&&(i.discontinuity=!0,e.discontinuityStarts.unshift(0),e.discontinuitySequence--),Ce({playlist:e,mediaSequence:n.segments[a].number})}}))}({oldPlaylists:r,newPlaylists:i,timelineStarts:n.timelineStarts}),n},xe=function(e){return e&&e.uri+"-"+function(e){var t;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?i().BigInt(e.offset)+i().BigInt(e.length)-i().BigInt(1):e.offset+e.length-1,e.offset+"-"+t}(e.byterange)},Pe=function(e){return oe(e.reduce((function(e,t){var n=t.attributes.id+(t.attributes.lang||"");if(e[n]){var r;if(t.segments)t.segments[0]&&(t.segments[0].discontinuity=!0),(r=e[n].segments).push.apply(r,t.segments);t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)}else e[n]=t,e[n].attributes.timelineStarts=[];return e[n].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{})).map((function(e){return e.discontinuityStarts=function(e,t){return e.reduce((function(e,n,r){return n[t]&&e.push(r),e}),[])}(e.segments||[],"discontinuity"),e}))},Ie=function(e,t){var n=xe(e.sidx),r=n&&t[n]&&t[n].sidx;return r&&we(e,r,e.sidx.resolvedUri),e},Oe=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e)e[n]=Ie(e[n],t);return e},Re=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,a=e.discontinuityStarts,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,timeline:n.periodStart,resolvedUri:"",targetDuration:n.duration,discontinuityStarts:a,timelineStarts:n.timelineStarts,segments:r};return n.frameRate&&(o.attributes["FRAME-RATE"]=n.frameRate),n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},Le=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},Ne=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},De=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},Me=function(e){return e?Object.keys(e).reduce((function(t,n){var r=e[n];return t.concat(r.playlists)}),[]):[]},Ue=function(e){var t,n=e.dashPlaylists,r=e.locations,i=e.sidxMapping,a=void 0===i?{}:i,o=e.previousManifest;if(!n.length)return{};var s=n[0].attributes,u=s.sourceDuration,l=s.type,c=s.suggestedPresentationDelay,d=s.minimumUpdatePeriod,p=Pe(n.filter(Le)).map(Re),h=Pe(n.filter(Ne)),f=Pe(n.filter(De)),m=n.map((function(e){return e.attributes.captionServices})).filter(Boolean),g={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:u,playlists:Oe(p,a)};d>=0&&(g.minimumUpdatePeriod=1e3*d),r&&(g.locations=r),"dynamic"===l&&(g.suggestedPresentationDelay=c);var v,y,_=0===g.playlists.length,b=h.length?function(e,t,n){var r;void 0===t&&(t={}),void 0===n&&(n=!1);var i=e.reduce((function(e,i){var a=i.attributes.role&&i.attributes.role.value||"",o=i.attributes.lang||"",s=i.attributes.label||"main";if(o&&!i.attributes.label){var u=a?" ("+a+")":"";s=""+i.attributes.lang+u}e[s]||(e[s]={language:o,autoselect:!0,default:"main"===a,playlists:[],uri:""});var l=Ie(function(e,t){var n,r=e.attributes,i=e.segments,a=e.sidx,o=e.mediaSequence,s=e.discontinuitySequence,u=e.discontinuityStarts,l={attributes:(n={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===r.type,timeline:r.periodStart,resolvedUri:"",targetDuration:r.duration,discontinuitySequence:s,discontinuityStarts:u,timelineStarts:r.timelineStarts,mediaSequence:o,segments:i};return r.contentProtection&&(l.contentProtection=r.contentProtection),a&&(l.sidx=a),t&&(l.attributes.AUDIO="audio",l.attributes.SUBTITLES="subs"),l}(i,n),t);return e[s].playlists.push(l),"undefined"===typeof r&&"main"===a&&((r=i).default=!0),e}),{});return r||(i[Object.keys(i)[0]].default=!0),i}(h,a,_):null,w=f.length?function(e,t){return void 0===t&&(t={}),e.reduce((function(e,n){var r=n.attributes.lang||"text";return e[r]||(e[r]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),e[r].playlists.push(Ie(function(e){var t,n=e.attributes,r=e.segments,i=e.mediaSequence,a=e.discontinuityStarts,o=e.discontinuitySequence;"undefined"===typeof r&&(r=[{uri:n.baseUrl,timeline:n.periodStart,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var s=((t={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,t);return n.codecs&&(s.CODECS=n.codecs),{attributes:s,uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,timelineStarts:n.timelineStarts,discontinuityStarts:a,discontinuitySequence:o,mediaSequence:i,segments:r}}(n),t)),e}),{})}(f,a):null,T=p.concat(Me(b),Me(w)),k=T.map((function(e){return e.timelineStarts}));return g.timelineStarts=Se(k),v=T,y=g.timelineStarts,v.forEach((function(e){e.mediaSequence=0,e.discontinuitySequence=le(y,(function(t){return t.timeline===e.timeline})),e.segments&&e.segments.forEach((function(e,t){e.number=t}))})),b&&(g.mediaGroups.AUDIO.audio=b),w&&(g.mediaGroups.SUBTITLES.subs=w),m.length&&(g.mediaGroups["CLOSED-CAPTIONS"].cc=m.reduce((function(e,t){return t?(t.forEach((function(t){var n=t.channel,r=t.language;e[r]={autoselect:!1,default:!1,instreamId:n,language:r},t.hasOwnProperty("aspectRatio")&&(e[r].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[r].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[r]["3D"]=t["3D"])})),e):e}),{})),o?Ae({oldManifest:o,newManifest:g}):g},Fe=function(e,t,n){var r=e.NOW,i=e.clientOffset,a=e.availabilityStartTime,o=e.timescale,s=void 0===o?1:o,u=e.periodStart,l=void 0===u?0:u,c=e.minimumUpdatePeriod,d=(r+i)/1e3+(void 0===c?0:c)-(a+l);return Math.ceil((d*s-t)/n)},je=function(e,t){for(var n=e.type,r=e.minimumUpdatePeriod,i=void 0===r?0:r,a=e.media,o=void 0===a?"":a,s=e.sourceDuration,u=e.timescale,l=void 0===u?1:u,c=e.startNumber,d=void 0===c?1:c,p=e.periodStart,h=[],f=-1,m=0;m<t.length;m++){var g=t[m],v=g.d,y=g.r||0,_=g.t||0;f<0&&(f=_),_&&_>f&&(f=_);var b=void 0;if(y<0){var w=m+1;b=w===t.length?"dynamic"===n&&i>0&&o.indexOf("$Number$")>0?Fe(e,f,v):(s*l-f)/v:(t[w].t-f)/v}else b=y+1;for(var T=d+h.length+b,k=d+h.length;k<T;)h.push({number:k,duration:v/l,time:f,timeline:p}),f+=v,k++}return h},Be=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,qe=function(e,t){return e.replace(Be,function(e){return function(t,n,r,i){if("$$"===t)return"$";if("undefined"===typeof e[n])return t;var a=""+e[n];return"RepresentationID"===n?a:(i=r?parseInt(i,10):1,a.length>=i?a:""+new Array(i-a.length+1).join("0")+a)}}(t))},He=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},r=e.initialization,i=void 0===r?{sourceURL:"",range:""}:r,a=ge({baseUrl:e.baseUrl,source:qe(i.sourceURL,n),range:i.range}),o=function(e,t){return e.duration||t?e.duration?_e(e):je(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]}(e,t);return o.map((function(t){n.Number=t.number,n.Time=t.time;var r=qe(e.media||"",n),i=e.timescale||1,o=e.presentationTimeOffset||0,s=e.periodStart+(t.time-o)/i;return{uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:k(e.baseUrl||"",r),map:a,number:t.number,presentationTime:s}}))},ze=function(e,t){var n=e.duration,r=e.segmentUrls,i=void 0===r?[]:r,a=e.periodStart;if(!n&&!t||n&&t)throw new Error(fe);var o,s=i.map((function(t){return function(e,t){var n=e.baseUrl,r=e.initialization,i=void 0===r?{}:r,a=ge({baseUrl:n,source:i.sourceURL,range:i.range}),o=ge({baseUrl:n,source:t.media,range:t.mediaRange});return o.map=a,o}(e,t)}));return n&&(o=_e(e)),t&&(o=je(e,t)),o.map((function(t,n){if(s[n]){var r=s[n],i=e.timescale||1,o=e.presentationTimeOffset||0;return r.timeline=t.timeline,r.duration=t.duration,r.number=t.number,r.presentationTime=a+(t.time-o)/i,r}})).filter((function(e){return e}))},Ve=function(e){var t,n,r=e.attributes,i=e.segmentInfo;i.template?(n=He,t=ae(r,i.template)):i.base?(n=be,t=ae(r,i.base)):i.list&&(n=ze,t=ae(r,i.list));var a={attributes:r};if(!n)return a;var o=n(t,i.segmentTimeline);if(t.duration){var s=t,u=s.duration,l=s.timescale,c=void 0===l?1:l;t.duration=u/c}else o.length?t.duration=o.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return a.attributes=t,a.segments=o,i.base&&t.indexRange&&(a.sidx=o[0],a.segments=[]),a},We=function(e,t){return ue(e.childNodes).filter((function(e){return e.tagName===t}))},Ge=function(e){return e.textContent.trim()},Xe=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],a=n[2],o=n[3],s=n[4],u=n[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(i||0)+86400*parseFloat(a||0)+3600*parseFloat(o||0)+60*parseFloat(s||0)+parseFloat(u||0)},Ke={mediaPresentationDuration:function(e){return Xe(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 Xe(e)},suggestedPresentationDelay:function(e){return Xe(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return Xe(e)},start:function(e){return Xe(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},frameRate:function(e){return function(e){return parseFloat(e.split("/").reduce((function(e,t){return e/t})))}(e)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?Xe(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},$e=function(e){return e&&e.attributes?ue(e.attributes).reduce((function(e,t){var n=Ke[t.name]||Ke.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},Ye={"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"},Qe=function(e,t){return t.length?se(e.map((function(e){return t.map((function(t){return k(e,Ge(t))}))}))):e},Je=function(e){var t=We(e,"SegmentTemplate")[0],n=We(e,"SegmentList")[0],r=n&&We(n,"SegmentURL").map((function(e){return ae({tag:"SegmentURL"},$e(e))})),i=We(e,"SegmentBase")[0],a=n||t,o=a&&We(a,"SegmentTimeline")[0],s=n||i||t,u=s&&We(s,"Initialization")[0],l=t&&$e(t);l&&u?l.initialization=u&&$e(u):l&&l.initialization&&(l.initialization={sourceURL:l.initialization});var c={template:l,segmentTimeline:o&&We(o,"S").map((function(e){return $e(e)})),list:n&&ae($e(n),{segmentUrls:r,initialization:$e(u)}),base:i&&ae($e(i),{initialization:$e(u)})};return Object.keys(c).forEach((function(e){c[e]||delete c[e]})),c},Ze=function(e,t,n){return function(r){var i,a=$e(r),o=Qe(t,We(r,"BaseURL")),s=We(r,"Role")[0],u={role:$e(s)},l=ae(e,a,u),c=We(r,"Accessibility")[0],d="urn:scte:dash:cc:cea-608:2015"===(i=$e(c)).schemeIdUri?("string"!==typeof i.value?[]:i.value.split(";")).map((function(e){var t,n;if(n=e,/^CC\d=/.test(e)){var r=e.split("=");t=r[0],n=r[1]}else/^CC\d$/.test(e)&&(t=e);return{channel:t,language:n}})):"urn:scte:dash:cc:cea-708:2015"===i.schemeIdUri?("string"!==typeof i.value?[]:i.value.split(";")).map((function(e){var t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var n=e.split("="),r=n[0],i=n[1],a=void 0===i?"":i;t.channel=r,t.language=e,a.split(",").forEach((function(e){var n=e.split(":"),r=n[0],i=n[1];"lang"===r?t.language=i:"er"===r?t.easyReader=Number(i):"war"===r?t.aspectRatio=Number(i):"3D"===r&&(t["3D"]=Number(i))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})):void 0;d&&(l=ae(l,{captionServices:d}));var p=We(r,"Label")[0];if(p&&p.childNodes.length){var h=p.childNodes[0].nodeValue.trim();l=ae(l,{label:h})}var f=We(r,"ContentProtection").reduce((function(e,t){var n=$e(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());var r=Ye[n.schemeIdUri];if(r){e[r]={attributes:n};var i=We(t,"cenc:pssh")[0];if(i){var a=Ge(i);e[r].pssh=a&&C(a)}}return e}),{});Object.keys(f).length&&(l=ae(l,{contentProtection:f}));var m=Je(r),g=We(r,"Representation"),v=ae(n,m);return se(g.map(function(e,t,n){return function(r){var i=We(r,"BaseURL"),a=Qe(t,i),o=ae(e,$e(r)),s=Je(r);return a.map((function(e){return{segmentInfo:ae(n,s),attributes:ae(o,{baseUrl:e})}}))}}(l,o,v)))}},et=function(e,t){return function(n,r){var i=Qe(t,We(n.node,"BaseURL")),a=ae(e,{periodStart:n.attributes.start});"number"===typeof n.attributes.duration&&(a.periodDuration=n.attributes.duration);var o=We(n.node,"AdaptationSet"),s=Je(n.node);return se(o.map(Ze(a,i,s)))}},tt=function(e){if(""===e)throw new Error(de);var t,n,r=new re.DOMParser;try{n=(t=r.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(i){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(pe);return n},nt=function(e,t){void 0===t&&(t={});var n=function(e,t){void 0===t&&(t={});var n=t,r=n.manifestUri,i=void 0===r?"":r,a=n.NOW,o=void 0===a?Date.now():a,s=n.clientOffset,u=void 0===s?0:s,l=We(e,"Period");if(!l.length)throw new Error(ce);var c=We(e,"Location"),d=$e(e),p=Qe([i],We(e,"BaseURL"));d.type=d.type||"static",d.sourceDuration=d.mediaPresentationDuration||0,d.NOW=o,d.clientOffset=u,c.length&&(d.locations=c.map(Ge));var h=[];return l.forEach((function(e,t){var n=$e(e),r=h[t-1];n.start=function(e){var t=e.attributes,n=e.priorPeriodAttributes,r=e.mpdType;return"number"===typeof t.start?t.start:n&&"number"===typeof n.start&&"number"===typeof n.duration?n.start+n.duration:n||"static"!==r?null:0}({attributes:n,priorPeriodAttributes:r?r.attributes:null,mpdType:d.type}),h.push({node:e,attributes:n})})),{locations:d.locations,representationInfo:se(h.map(et(d,p)))}}(tt(e),t),r=n.representationInfo.map(Ve);return Ue({dashPlaylists:r,locations:n.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})},rt=function(e){return function(e){var t=We(e,"UTCTiming")[0];if(!t)return null;var n=$e(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;default:throw new Error(me)}return n}(tt(e))},it=n(72024),at=n.n(it),ot=Y([73,68,51]),st=function e(t,n){return void 0===n&&(n=0),(t=Y(t)).length-n<10||!ne(t,ot,{offset:n})?n:(n+=function(e,t){void 0===t&&(t=0);var n=(e=Y(e))[t+5],r=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&n)>>4?r+20:r+10}(t,n),e(t,n))},ut=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"===typeof e?te(e):e}),lt=function(e){e=Y(e);for(var t=[],n=0;e.length>n;){var r=e[n],i=0,a=0,o=e[++a];for(a++;128&o;)i=(127&o)<<7,o=e[a],a++;i+=127&o;for(var s=0;s<A.length;s++){var u=A[s],l=u.id,c=u.parser;if(r===l){t.push(c(e.subarray(a,a+i)));break}}n+=i+a}return t};A=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var n=e[t.size];t.url=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,Y(e));try{return decodeURIComponent(escape(t))}catch(n){}return t}(e.subarray(t.size+1,t.size+1+n)),t.size+=n}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=lt(e.subarray(t.size))||[],t}},{id:4,parser:function(e){return{tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:lt(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var ct=function e(t,n,r){void 0===r&&(r=!1),n=function(e){return Array.isArray(e)?e.map((function(e){return ut(e)})):[ut(e)]}(n),t=Y(t);var i=[];if(!n.length)return i;for(var a=0;a<t.length;){var o=(t[a]<<24|t[a+1]<<16|t[a+2]<<8|t[a+3])>>>0,s=t.subarray(a+4,a+8);if(0===o)break;var u=a+o;if(u>t.length){if(r)break;u=t.length}var l=t.subarray(a+8,u);ne(s,n[0])&&(1===n.length?i.push(l):i.push.apply(i,e(l,n.slice(1),r))),a=u}return i},dt={EBML:Y([26,69,223,163]),DocType:Y([66,130]),Segment:Y([24,83,128,103]),SegmentInfo:Y([21,73,169,102]),Tracks:Y([22,84,174,107]),Track:Y([174]),TrackNumber:Y([215]),DefaultDuration:Y([35,227,131]),TrackEntry:Y([174]),TrackType:Y([131]),FlagDefault:Y([136]),CodecID:Y([134]),CodecPrivate:Y([99,162]),VideoTrack:Y([224]),AudioTrack:Y([225]),Cluster:Y([31,67,182,117]),Timestamp:Y([231]),TimestampScale:Y([42,215,177]),BlockGroup:Y([160]),BlockDuration:Y([155]),Block:Y([161]),SimpleBlock:Y([163])},pt=[128,64,32,16,8,4,2,1],ht=function(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=!1);var i=function(e){for(var t=1,n=0;n<pt.length&&!(e&pt[n]);n++)t++;return t}(e[t]),a=e.subarray(t,t+i);return n&&((a=Array.prototype.slice.call(e,t,t+i))[0]^=pt[i-1]),{length:i,value:Z(a,{signed:r}),bytes:a}},ft=function e(t){return"string"===typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"===typeof t?ee(t):t},mt=function e(t,n,r){if(r>=n.length)return n.length;var i=ht(n,r,!1);if(ne(t.bytes,i.bytes))return r;var a=ht(n,r+i.length);return e(t,n,r+a.length+a.value+i.length)},gt=function e(t,n){n=function(e){return Array.isArray(e)?e.map((function(e){return ft(e)})):[ft(e)]}(n),t=Y(t);var r=[];if(!n.length)return r;for(var i=0;i<t.length;){var a=ht(t,i,!1),o=ht(t,i+a.length),s=i+a.length+o.length;127===o.value&&(o.value=mt(a,t,s),o.value!==t.length&&(o.value-=s));var u=s+o.value>t.length?t.length:s+o.value,l=t.subarray(s,u);ne(n[0],a.bytes)&&(1===n.length?r.push(l):r=r.concat(e(l,n.slice(1)))),i+=a.length+o.length+l.length}return r},vt=Y([0,0,0,1]),yt=Y([0,0,1]),_t=Y([0,0,3]),bt=function(e){for(var t=[],n=1;n<e.length-2;)ne(e.subarray(n,n+3),_t)&&(t.push(n+2),n++),n++;if(0===t.length)return e;var r=e.length-t.length,i=new Uint8Array(r),a=0;for(n=0;n<r;a++,n++)a===t[0]&&(a++,t.shift()),i[n]=e[a];return i},wt=function(e,t,n,r){void 0===r&&(r=1/0),e=Y(e),n=[].concat(n);for(var i,a=0,o=0;a<e.length&&(o<r||i);){var s=void 0;if(ne(e.subarray(a),vt)?s=4:ne(e.subarray(a),yt)&&(s=3),s){if(o++,i)return bt(e.subarray(i,a));var u=void 0;"h264"===t?u=31&e[a+s]:"h265"===t&&(u=e[a+s]>>1&63),-1!==n.indexOf(u)&&(i=a+s),a+=s+("h264"===t?1:2)}else a++}return e.subarray(0,0)},Tt={webm:Y([119,101,98,109]),matroska:Y([109,97,116,114,111,115,107,97]),flac:Y([102,76,97,67]),ogg:Y([79,103,103,83]),ac3:Y([11,119]),riff:Y([82,73,70,70]),avi:Y([65,86,73]),wav:Y([87,65,86,69]),"3gp":Y([102,116,121,112,51,103]),mp4:Y([102,116,121,112]),fmp4:Y([115,116,121,112]),mov:Y([102,116,121,112,113,116]),moov:Y([109,111,111,118]),moof:Y([109,111,111,102])},kt={aac:function(e){var t=st(e);return ne(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=st(e);return ne(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=gt(e,[dt.EBML,dt.DocType])[0];return ne(t,Tt.webm)},mkv:function(e){var t=gt(e,[dt.EBML,dt.DocType])[0];return ne(t,Tt.matroska)},mp4:function(e){return!kt["3gp"](e)&&!kt.mov(e)&&(!(!ne(e,Tt.mp4,{offset:4})&&!ne(e,Tt.fmp4,{offset:4}))||(!(!ne(e,Tt.moof,{offset:4})&&!ne(e,Tt.moov,{offset:4}))||void 0))},mov:function(e){return ne(e,Tt.mov,{offset:4})},"3gp":function(e){return ne(e,Tt["3gp"],{offset:4})},ac3:function(e){var t=st(e);return ne(e,Tt.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=st(e);return ne(e,Tt.flac,{offset:t})},ogg:function(e){return ne(e,Tt.ogg)},avi:function(e){return ne(e,Tt.riff)&&ne(e,Tt.avi,{offset:8})},wav:function(e){return ne(e,Tt.riff)&&ne(e,Tt.wav,{offset:8})},h264:function(e){return function(e,t,n){return wt(e,"h264",t,n)}(e,7,3).length},h265:function(e){return function(e,t,n){return wt(e,"h265",t,n)}(e,[32,33],3).length}},St=Object.keys(kt).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);St.forEach((function(e){var t=kt[e];kt[e]=function(e){return t(Y(e))}}));for(var Et,Ct=kt,At=function(e){e=Y(e);for(var t=0;t<St.length;t++){var n=St[t];if(Ct[n](e))return n}return""},xt=n(82356),Pt=n(50531),It="7.21.6",Ot={},Rt=function(e,t){return Ot[e]=Ot[e]||[],t&&(Ot[e]=Ot[e].concat(t)),Ot[e]},Lt=function(e,t){var n=Rt(e).indexOf(t);return!(n<=-1)&&(Ot[e]=Ot[e].slice(),Ot[e].splice(n,1),!0)},Nt={prefixed:!0},Dt=[["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"]],Mt=Dt[0],Ut=0;Ut<Dt.length;Ut++)if(Dt[Ut][1]in o()){Et=Dt[Ut];break}if(Et){for(var Ft=0;Ft<Et.length;Ft++)Nt[Mt[Ft]]=Et[Ft];Nt.prefixed=Et[0]!==Mt[0]}var jt=[];var Bt=function e(t){var n,r="info",a=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,a){var o=t.levels[r],s=new RegExp("^("+o+")$");if("log"!==n&&a.unshift(n.toUpperCase()+":"),a.unshift(e+":"),jt){jt.push([].concat(a));var u=jt.length-1e3;jt.splice(0,u>0?u:0)}if(i().console){var l=i().console[n];l||"debug"!==n||(l=i().console.info||i().console.log),l&&o&&s.test(n)&&l[Array.isArray(a)?"apply":"call"](i().console,a)}}}(t,a),a.createLogger=function(n){return e(t+": "+n)},a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},a.level=function(e){if("string"===typeof e){if(!a.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},(a.history=function(){return jt?[].concat(jt):[]}).filter=function(e){return(jt||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},a.history.clear=function(){jt&&(jt.length=0)},a.history.disable=function(){null!==jt&&(jt.length=0,jt=null)},a.history.enable=function(){null===jt&&(jt=[])},a.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)},a.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)},a.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)},a}("VIDEOJS"),qt=Bt.createLogger,Ht=Object.prototype.toString,zt=function(e){return Gt(e)?Object.keys(e):[]};function Vt(e,t){zt(e).forEach((function(n){return t(e[n],n)}))}function Wt(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?s.A.apply(void 0,[e].concat(n)):(n.forEach((function(t){t&&Vt(t,(function(t,n){e[n]=t}))})),e)}function Gt(e){return!!e&&"object"===typeof e}function Xt(e){return Gt(e)&&"[object Object]"===Ht.call(e)&&e.constructor===Object}function Kt(e,t){if(!e||!t)return"";if("function"===typeof i().getComputedStyle){var n;try{n=i().getComputedStyle(e)}catch(r){return""}return n?n.getPropertyValue(t)||n[t]:""}return""}var $t=i().navigator&&i().navigator.userAgent||"",Yt=/AppleWebKit\/([\d.]+)/i.exec($t),Qt=Yt?parseFloat(Yt.pop()):null,Jt=/iPod/i.test($t),Zt=function(){var e=$t.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),en=/Android/i.test($t),tn=function(){var e=$t.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}(),nn=en&&tn<5&&Qt<537,rn=/Firefox/i.test($t),an=/Edg/i.test($t),on=!an&&(/Chrome/i.test($t)||/CriOS/i.test($t)),sn=function(){var e=$t.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),un=function(){var e=/MSIE\s(\d+)\.\d/.exec($t),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test($t)&&/rv:11.0/.test($t)&&(t=11),t}(),ln=/Safari/i.test($t)&&!on&&!en&&!an,cn=/Windows/i.test($t),dn=Boolean(_n()&&("ontouchstart"in i()||i().navigator.maxTouchPoints||i().DocumentTouch&&i().document instanceof i().DocumentTouch)),pn=/iPad/i.test($t)||ln&&dn&&!/iPhone/i.test($t),hn=/iPhone/i.test($t)&&!pn,fn=hn||pn||Jt,mn=(ln||fn)&&!on,gn=Object.freeze({__proto__:null,IS_IPOD:Jt,IOS_VERSION:Zt,IS_ANDROID:en,ANDROID_VERSION:tn,IS_NATIVE_ANDROID:nn,IS_FIREFOX:rn,IS_EDGE:an,IS_CHROME:on,CHROME_VERSION:sn,IE_VERSION:un,IS_SAFARI:ln,IS_WINDOWS:cn,TOUCH_ENABLED:dn,IS_IPAD:pn,IS_IPHONE:hn,IS_IOS:fn,IS_ANY_SAFARI:mn});function vn(e){return"string"===typeof e&&Boolean(e.trim())}function yn(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function _n(){return o()===i().document}function bn(e){return Gt(e)&&1===e.nodeType}function wn(){try{return i().parent!==i().self}catch(e){return!0}}function Tn(e){return function(t,n){if(!vn(t))return o()[e](null);vn(n)&&(n=o().querySelector(n));var r=bn(n)?n:o();return r[e]&&r[e](t)}}function kn(e,t,n,r){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var i=o().createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Bt.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?Sn(i,n):i[e]===n&&"tabIndex"!==e||(i[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){i.setAttribute(e,n[e])})),r&&zn(i,r),i}function Sn(e,t){return"undefined"===typeof e.textContent?e.innerText=t:e.textContent=t,e}function En(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Cn(e,t){return yn(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function An(e,t){return e.classList?e.classList.add(t):Cn(e,t)||(e.className=(e.className+" "+t).trim()),e}function xn(e,t){return e?(e.classList?e.classList.remove(t):(yn(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e):(Bt.warn("removeClass was called with an element that doesn't exist"),null)}function Pn(e,t,n){var r=Cn(e,t);if("function"===typeof n&&(n=n(e,t)),"boolean"!==typeof n&&(n=!r),n!==r)return n?An(e,t):xn(e,t),e}function In(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];null===r||"undefined"===typeof r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)}))}function On(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 a=r[i].name,o=r[i].value;"boolean"!==typeof e[a]&&-1===n.indexOf(","+a+",")||(o=null!==o),t[a]=o}return t}function Rn(e,t){return e.getAttribute(t)}function Ln(e,t,n){e.setAttribute(t,n)}function Nn(e,t){e.removeAttribute(t)}function Dn(){o().body.focus(),o().onselectstart=function(){return!1}}function Mn(){o().onselectstart=function(){return!0}}function Un(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(Kt(e,"height"))),n.width||(n.width=parseFloat(Kt(e,"width"))),n}}function Fn(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,n=e.offsetHeight,r=0,i=0;e.offsetParent&&e!==o()[Nt.fullscreenElement];)r+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{left:r,top:i,width:t,height:n}}function jn(e,t){var n={x:0,y:0};if(fn)for(var r=e;r&&"html"!==r.nodeName.toLowerCase();){var i=Kt(r,"transform");if(/^matrix/.test(i)){var a=i.slice(7,-1).split(/,\s/).map(Number);n.x+=a[4],n.y+=a[5]}else if(/^matrix3d/.test(i)){var o=i.slice(9,-1).split(/,\s/).map(Number);n.x+=o[12],n.y+=o[13]}r=r.parentNode}var s={},u=Fn(t.target),l=Fn(e),c=l.width,d=l.height,p=t.offsetY-(l.top-u.top),h=t.offsetX-(l.left-u.left);return t.changedTouches&&(h=t.changedTouches[0].pageX-l.left,p=t.changedTouches[0].pageY+l.top,fn&&(h-=n.x,p-=n.y)),s.y=1-Math.max(0,Math.min(1,p/d)),s.x=Math.max(0,Math.min(1,h/c)),s}function Bn(e){return Gt(e)&&3===e.nodeType}function qn(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Hn(e){return"function"===typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"===typeof e&&(e=e()),bn(e)||Bn(e)?e:"string"===typeof e&&/\S/.test(e)?o().createTextNode(e):void 0})).filter((function(e){return e}))}function zn(e,t){return Hn(t).forEach((function(t){return e.appendChild(t)})),e}function Vn(e,t){return zn(qn(e),t)}function Wn(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 Gn,Xn=Tn("querySelector"),Kn=Tn("querySelectorAll"),$n=Object.freeze({__proto__:null,isReal:_n,isEl:bn,isInFrame:wn,createEl:kn,textContent:Sn,prependTo:En,hasClass:Cn,addClass:An,removeClass:xn,toggleClass:Pn,setAttributes:In,getAttributes:On,getAttribute:Rn,setAttribute:Ln,removeAttribute:Nn,blockTextSelection:Dn,unblockTextSelection:Mn,getBoundingClientRect:Un,findPosition:Fn,getPointerPosition:jn,isTextNode:Bn,emptyEl:qn,normalizeContent:Hn,appendContent:zn,insertContent:Vn,isSingleLeftClick:Wn,$:Xn,$$:Kn}),Yn=!1,Qn=function(){if(!1!==Gn.options.autoSetup){var e=Array.prototype.slice.call(o().getElementsByTagName("video")),t=Array.prototype.slice.call(o().getElementsByTagName("audio")),n=Array.prototype.slice.call(o().getElementsByTagName("video-js")),r=e.concat(t,n);if(r&&r.length>0)for(var i=0,a=r.length;i<a;i++){var s=r[i];if(!s||!s.getAttribute){Jn(1);break}void 0===s.player&&null!==s.getAttribute("data-setup")&&Gn(s)}else Yn||Jn(1)}};function Jn(e,t){_n()&&(t&&(Gn=t),i().setTimeout(Qn,e))}function Zn(){Yn=!0,i().removeEventListener("load",Zn)}_n()&&("complete"===o().readyState?Zn():i().addEventListener("load",Zn));var er,tr=function(e){var t=o().createElement("style");return t.className=e,t},nr=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},rr=3;function ir(){return rr++}i().WeakMap||(er=function(){function e(){this.vdata="vdata"+Math.floor(i().performance&&i().performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var n=e[this.vdata]||ir();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];Bt("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 ar,or=i().WeakMap?new WeakMap:new er;function sr(e,t){if(or.has(e)){var n=or.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&&or.delete(e)}}function ur(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function lr(e){if(e.fixed_)return e;function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){var r=e||i().event;for(var a in e={},r)"layerX"!==a&&"layerY"!==a&&"keyLocation"!==a&&"webkitMovementX"!==a&&"webkitMovementY"!==a&&"path"!==a&&("returnValue"===a&&r.preventDefault||(e[a]=r[a]));if(e.target||(e.target=e.srcElement||o()),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 s=o().documentElement,u=o().body;e.pageX=e.clientX+(s&&s.scrollLeft||u&&u.scrollLeft||0)-(s&&s.clientLeft||u&&u.clientLeft||0),e.pageY=e.clientY+(s&&s.scrollTop||u&&u.scrollTop||0)-(s&&s.clientTop||u&&u.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}var cr=["touchstart","touchmove"];function dr(e,t,n){if(Array.isArray(t))return ur(dr,e,t,n);or.has(e)||or.set(e,{});var r=or.get(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=ir()),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=lr(t);var i=r.handlers[t.type];if(i)for(var a=i.slice(0),o=0,s=a.length;o<s&&!t.isImmediatePropagationStopped();o++)try{a[o].call(e,t,n)}catch(u){Bt.error(u)}}}),1===r.handlers[t].length)if(e.addEventListener){var a=!1;(function(){if("boolean"!==typeof ar){ar=!1;try{var e=Object.defineProperty({},"passive",{get:function(){ar=!0}});i().addEventListener("test",null,e),i().removeEventListener("test",null,e)}catch(t){}}return ar})()&&cr.indexOf(t)>-1&&(a={passive:!0}),e.addEventListener(t,r.dispatcher,a)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function pr(e,t,n){if(or.has(e)){var r=or.get(e);if(r.handlers){if(Array.isArray(t))return ur(pr,e,t,n);var i=function(e,t){r.handlers[t]=[],sr(e,t)};if(void 0!==t){var a=r.handlers[t];if(a)if(n){if(n.guid)for(var o=0;o<a.length;o++)a[o].guid===n.guid&&a.splice(o--,1);sr(e,t)}else i(e,t)}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(e,s)}}}function hr(e,t,n){var r=or.has(e)?or.get(e):{},i=e.parentNode||e.ownerDocument;if("string"===typeof t?t={type:t,target:e}:t.target||(t.target=e),t=lr(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)hr.call(null,i,t,n);else if(!i&&!t.defaultPrevented&&t.target&&t.target[t.type]){or.has(t.target)||or.set(t.target,{});var a=or.get(t.target);t.target[t.type]&&(a.disabled=!0,"function"===typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function fr(e,t,n){if(Array.isArray(t))return ur(fr,e,t,n);var r=function r(){pr(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||ir(),dr(e,t,r)}function mr(e,t,n){var r=function r(){pr(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||ir(),dr(e,t,r)}var gr,vr=Object.freeze({__proto__:null,fixEvent:lr,on:dr,off:pr,trigger:hr,one:fr,any:mr}),yr=30,_r=function(e,t,n){t.guid||(t.guid=ir());var r=t.bind(e);return r.guid=n?n+"_"+t.guid:t.guid,r},br=function(e,t){var n=i().performance.now();return function(){var r=i().performance.now();r-n>=t&&(e.apply(void 0,arguments),n=r)}},wr=function(){};wr.prototype.allowedEvents_={},wr.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},dr(this,e,t),this.addEventListener=n},wr.prototype.addEventListener=wr.prototype.on,wr.prototype.off=function(e,t){pr(this,e,t)},wr.prototype.removeEventListener=wr.prototype.off,wr.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},fr(this,e,t),this.addEventListener=n},wr.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},mr(this,e,t),this.addEventListener=n},wr.prototype.trigger=function(e){var t=e.type||e;"string"===typeof e&&(e={type:t}),e=lr(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),hr(this,e)},wr.prototype.dispatchEvent=wr.prototype.trigger,wr.prototype.queueTrigger=function(e){var t=this;gr||(gr=new Map);var n=e.type||e,r=gr.get(this);r||(r=new Map,gr.set(this,r));var a=r.get(n);r.delete(n),i().clearTimeout(a);var o=i().setTimeout((function(){r.delete(n),0===r.size&&(r=null,gr.delete(t)),t.trigger(e)}),0);r.set(n,o)};var Tr=function(e){return"function"===typeof e.name?e.name():"string"===typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e},kr=function(e){return e instanceof wr||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"===typeof e[t]}))},Sr=function(e){return"string"===typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},Er=function(e,t,n){if(!e||!e.nodeName&&!kr(e))throw new Error("Invalid target for "+Tr(t)+"#"+n+"; must be a DOM node or evented object.")},Cr=function(e,t,n){if(!Sr(e))throw new Error("Invalid event type for "+Tr(t)+"#"+n+"; must be a non-empty string or array.")},Ar=function(e,t,n){if("function"!==typeof e)throw new Error("Invalid listener for "+Tr(t)+"#"+n+"; must be a function.")},xr=function(e,t,n){var r,i,a,o=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return o?(r=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],a=t[1]):(r=t[0],i=t[1],a=t[2]),Er(r,e,n),Cr(i,e,n),Ar(a,e,n),{isTargetingSelf:o,target:r,type:i,listener:a=_r(e,a)}},Pr=function(e,t,n,r){Er(e,e,t),e.nodeName?vr[t](e,n,r):e[t](n,r)},Ir={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=xr(this,n,"on"),a=i.isTargetingSelf,o=i.target,s=i.type,u=i.listener;if(Pr(o,"on",s,u),!a){var l=function(){return e.off(o,s,u)};l.guid=u.guid;var c=function(){return e.off("dispose",l)};c.guid=u.guid,Pr(this,"on","dispose",l),Pr(o,"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=xr(this,n,"one"),a=i.isTargetingSelf,o=i.target,s=i.type,u=i.listener;if(a)Pr(o,"one",s,u);else{var l=function t(){e.off(o,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,Pr(o,"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=xr(this,n,"any"),a=i.isTargetingSelf,o=i.target,s=i.type,u=i.listener;if(a)Pr(o,"any",s,u);else{var l=function t(){e.off(o,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,Pr(o,"any",s,l)}},off:function(e,t,n){if(!e||Sr(e))pr(this.eventBusEl_,e,t);else{var r=e,i=t;Er(r,this,"off"),Cr(i,this,"off"),Ar(n,this,"off"),n=_r(this,n),this.off("dispose",n),r.nodeName?(pr(r,i,n),pr(r,"dispose",n)):kr(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){Er(this.eventBusEl_,this,"trigger");var n=e&&"string"!==typeof e?e.type:e;if(!Sr(n)){var r="Invalid event type for "+Tr(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(!e)throw new Error(r);(this.log||Bt).error(r)}return hr(this.eventBusEl_,e,t)}};function Or(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_=kn("span",{className:"vjs-event-bus"});return Wt(e,Ir),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()})),e.on("dispose",(function(){e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&or.has(e)&&or.delete(e)})),i().setTimeout((function(){e.eventBusEl_=null}),0)})),e}var Rr={state:{},setState:function(e){var t,n=this;return"function"===typeof e&&(e=e()),Vt(e,(function(e,r){n.state[r]!==e&&((t=t||{})[r]={from:n.state[r],to:e}),n.state[r]=e})),t&&kr(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Lr(e,t){return Wt(e,Rr),e.state=Wt({},e.state,t),"function"===typeof e.handleStateChanged&&kr(e)&&e.on("statechanged",e.handleStateChanged),e}var Nr=function(e){return"string"!==typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},Dr=function(e){return"string"!==typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function Mr(){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&&Vt(t,(function(t,n){Xt(t)?(Xt(e[n])||(e[n]={}),e[n]=Mr(e[n],t)):e[n]=t}))})),e}var Ur=function(){function e(){this.map_={}}var t=e.prototype;return t.has=function(e){return e in this.map_},t.delete=function(e){var t=this.has(e);return delete this.map_[e],t},t.set=function(e,t){return this.map_[e]=t,this},t.forEach=function(e,t){for(var n in this.map_)e.call(t,this.map_[n],n,this)},e}(),Fr=i().Map?i().Map:Ur,jr=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}(),Br=i().Set?i().Set:jr,qr=function(){function e(e,t,n){var r=this;if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Mr({},this.options_),t=this.options_=Mr(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var i=e&&e.id&&e.id()||"no_player";this.id_=i+"_component_"+ir()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach((function(e){return r.addClass(e)})),!1!==t.evented&&(Or(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Lr(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Br,this.setIntervalIds_=new Br,this.rafIds_=new Br,this.namedRafs_=new Fr,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var t=e.prototype;return t.dispose=function(e){if(void 0===e&&(e={}),!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(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_=Mr(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return kn(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(),a=i&&i[r],o=r&&r.split("-")[0],s=i&&i[o],u=n;return a&&a[e]?u=a[e]:s&&s[e]&&(u=s[e]),t&&(u=u.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],i=r;return"undefined"===typeof r&&(i=e),i}))),u},t.handleLanguagechange=function(){},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(e){return this.childIndex_[e]},t.getChild=function(e){if(e)return this.childNameIndex_[e]},t.getDescendant=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reduce((function(e,t){return e.concat(t)}),[]);for(var r=this,i=0;i<t.length;i++)if(!(r=r.getChild(t[i]))||!r.getChild)return;return r},t.addChild=function(t,n,r){var i,a;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"===typeof t){a=Dr(t);var o=n.componentClass||a;n.name=a;var s=e.getComponent(o);if(!s)throw new Error("Component "+o+" 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),(a=a||i.name&&Dr(i.name()))&&(this.childNameIndex_[a]=i,this.childNameIndex_[Nr(a)]=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_:bn(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_[Dr(e.name())]=null,this.childNameIndex_[Nr(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_,a=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||Dr(t.name));return n&&!a.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 a=t.addChild(n,r);a&&(t[n]=a)}}))}},t.buildCSSClass=function(){return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},t.$=function(e,t){return Xn(e,t||this.contentEl())},t.$$=function(e,t){return Kn(e,t||this.contentEl())},t.hasClass=function(e){return Cn(this.el_,e)},t.addClass=function(e){An(this.el_,e)},t.removeClass=function(e){xn(this.el_,e)},t.toggleClass=function(e,t){Pn(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 Rn(this.el_,e)},t.setAttribute=function(e,t){Ln(this.el_,e,t)},t.removeAttribute=function(e){Nn(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"+Dr(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=Kt(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+Dr(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_&&(l().isEventKey(e,"Tab")||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=i().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)&&(i().performance.now()-t<200&&(r.preventDefault(),this.trigger("tap")))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=_r(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=_r(this,e),this.clearTimersOnDispose_(),n=i().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),i().clearTimeout(e)),e},t.setInterval=function(e,t){e=_r(this,e),this.clearTimersOnDispose_();var n=i().setInterval(e,t);return this.setIntervalIds_.add(n),n},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),i().clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=_r(this,e),t=i().requestAnimationFrame((function(){n.rafIds_.has(t)&&n.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},t.requestNamedAnimationFrame=function(e,t){var n=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=_r(this,t);var r=this.requestAnimationFrame((function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}));return this.namedRafs_.set(e,r),e}},t.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},t.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),i().cancelAnimationFrame(e)),e):this.clearTimeout(e)},t.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var n=t[0],r=t[1];e[n].forEach((function(t,n){return e[r](n)}))})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,n){if("string"!==typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var r,i=e.getComponent("Tech"),a=i&&i.isTech(n),o=e===n||e.prototype.isPrototypeOf(n.prototype);if(a||!o)throw r=a?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+r+".");t=Dr(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_[Nr(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();function Hr(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 zr(e){var t;return t=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:Hr.bind(null,"start",0,e),end:Hr.bind(null,"end",1,e)},i().Symbol&&i().Symbol.iterator&&(t[i().Symbol.iterator]=function(){return(e||[]).values()}),t}function Vr(e,t){return Array.isArray(e)?zr(e):void 0===e||void 0===t?zr():zr([[e,t]])}function Wr(e,t){var n,r,i=0;if(!t)return 0;e&&e.length||(e=Vr(0,0));for(var a=0;a<e.length;a++)n=e.start(a),(r=e.end(a))>t&&(r=t),i+=r-n;return i/t}function Gr(e){if(e instanceof Gr)return e;"number"===typeof e?this.code=e:"string"===typeof e?this.message=e:Gt(e)&&("number"===typeof e.code&&(this.code=e.code),Wt(this,e)),this.message||(this.message=Gr.defaultMessages[this.code]||"")}qr.prototype.supportsRaf_="function"===typeof i().requestAnimationFrame&&"function"===typeof i().cancelAnimationFrame,qr.registerComponent("Component",qr),Gr.prototype.code=0,Gr.prototype.message="",Gr.prototype.status=null,Gr.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Gr.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 Xr=0;Xr<Gr.errorTypes.length;Xr++)Gr[Gr.errorTypes[Xr]]=Xr,Gr.prototype[Gr.errorTypes[Xr]]=Xr;function Kr(e){return void 0!==e&&null!==e&&"function"===typeof e.then}function $r(e){Kr(e)&&e.then(null,(function(e){}))}var Yr=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}}))})},Qr=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=Yr(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(Yr))},Jr=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()},Zr="vjs-modal-dialog",ei=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleKeyDown_=function(e){return r.handleKeyDown(e)},r.close_=function(e){return r.close(e)},r.opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=kn("div",{className:Zr+"-content"},{role:"document"}),r.descEl_=kn("p",{className:Zr+"-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),Sn(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}(0,d.A)(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 Zr+" 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(),Vn(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"),qn(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return"undefined"!==typeof e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=o().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(),l().isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(l().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}o().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 i().HTMLAnchorElement||e instanceof i().HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof i().HTMLInputElement||e instanceof i().HTMLSelectElement||e instanceof i().HTMLTextAreaElement||e instanceof i().HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof i().HTMLIFrameElement||e instanceof i().HTMLObjectElement||e instanceof i().HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(qr);ei.prototype.options_={pauseOnOpen:!0,temporary:!0},qr.registerComponent("ModalDialog",ei);var ti=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty((0,c.A)(n),"length",{get:function(){return this.tracks_.length}});for(var r=0;r<t.length;r++)n.addTrack(t[r]);return n}(0,d.A)(t,e);var n=t.prototype;return n.addTrack=function(e){var t=this,n=this.tracks_.length;""+n in this||Object.defineProperty(this,n,{get:function(){return this.tracks_[n]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){t.trigger({track:e,type:"labelchange",target:t})},kr(e)&&e.addEventListener("labelchange",e.labelchange_)},n.removeTrack=function(e){for(var t,n=0,r=this.length;n<r;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},n.getTrackById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},t}(wr);for(var ni in ti.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},ti.prototype.allowedEvents_)ti.prototype["on"+ni]=null;var ri=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)},ii=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].enabled){ri(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,n}(0,d.A)(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&ri(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,ri(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}(ti),ai=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)},oi=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].selected){ai(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty((0,c.A)(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}(0,d.A)(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&ai(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,ai(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}(ti),si=function(e){function t(){return e.apply(this,arguments)||this}(0,d.A)(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}(ti),ui=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}(),li=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}(),ci={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},di={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},pi={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},hi={disabled:"disabled",hidden:"hidden",showing:"showing"},fi=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var r={id:t.id||"vjs_track_"+ir(),kind:t.kind||"",language:t.language||""},i=t.label||"",a=function(e){Object.defineProperty((0,c.A)(n),e,{get:function(){return r[e]},set:function(){}})};for(var o in r)a(o);return Object.defineProperty((0,c.A)(n),"label",{get:function(){return i},set:function(e){e!==i&&(i=e,this.trigger("labelchange"))}}),n}return(0,d.A)(t,e),t}(wr),mi=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=o().createElement("a");n.href=e;for(var r={},a=0;a<t.length;a++)r[t[a]]=n[t[a]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),r.protocol||(r.protocol=i().location.protocol),r.host||(r.host=i().location.host),r},gi=function(e){if(!e.match(/^https?:\/\//)){var t=o().createElement("a");t.href=e,e=t.href}return e},vi=function(e){if("string"===typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},yi=function(e,t){void 0===t&&(t=i().location);var n=mi(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},_i=Object.freeze({__proto__:null,parseUrl:mi,getAbsoluteURL:gi,getFileExtension:vi,isCrossOrigin:yi}),bi=function(e,t){var n=new(i().WebVTT.Parser)(i(),i().vttjs,i().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&&(i().console&&i().console.groupCollapsed&&i().console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return Bt.error(e)})),i().console&&i().console.groupEnd&&i().console.groupEnd()),n.flush()},wi=function(e,t){var n={uri:e},r=yi(e);r&&(n.cors=r);var a="use-credentials"===t.tech_.crossOrigin();a&&(n.withCredentials=a),m()(n,_r(this,(function(e,n,r){if(e)return Bt.error(e,n);t.loaded_=!0,"function"!==typeof i().WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return bi(r,t);Bt.error("vttjs failed to load, stopping trying to process "+t.src)})):bi(r,t)})))},Ti=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var r=Mr(t,{kind:pi[t.kind]||"subtitles",language:t.language||t.srclang||""}),i=hi[r.mode]||"disabled",a=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 o=new li(n.cues_),s=new li(n.activeCues_),u=!1;n.timeupdateHandler=_r((0,c.A)(n),(function(e){void 0===e&&(e={}),this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));return n.tech_.one("dispose",(function(){n.stopTracking()})),"disabled"!==i&&n.startTracking(),Object.defineProperties((0,c.A)(n),{default:{get:function(){return a},set:function(){}},mode:{get:function(){return i},set:function(e){hi[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||wi(this.src,this),this.stopTracking(),"disabled"!==i&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?o: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 a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(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_||"subtitles"!==r.kind&&"captions"!==r.kind)&&wi(n.src,(0,c.A)(n))):n.loaded_=!0,n}(0,d.A)(t,e);var n=t.prototype;return n.startTracking=function(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)},n.stopTracking=function(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)},n.addCue=function(e){var t=e;if(t.constructor&&"VTTCue"!==t.constructor.name){for(var n in t=new(i().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(),a=0;a<r.length;a++)r[a]!==this&&r[a].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},n.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(fi);Ti.prototype.allowedEvents_={cuechange:"cuechange"};var ki=function(e){function t(t){var n;void 0===t&&(t={});var r=Mr(t,{kind:di[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty((0,c.A)(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(0,d.A)(t,e),t}(fi),Si=function(e){function t(t){var n;void 0===t&&(t={});var r=Mr(t,{kind:ci[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty((0,c.A)(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(0,d.A)(t,e),t}(fi),Ei=function(e){function t(t){var n,r;void 0===t&&(t={}),n=e.call(this)||this;var i=new Ti(t);return n.kind=i.kind,n.src=i.src,n.srclang=i.language,n.label=i.label,n.default=i.default,Object.defineProperties((0,c.A)(n),{readyState:{get:function(){return r}},track:{get:function(){return i}}}),r=0,i.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:(0,c.A)(n)})})),n}return(0,d.A)(t,e),t}(wr);Ei.prototype.allowedEvents_={load:"load"},Ei.NONE=0,Ei.LOADING=1,Ei.LOADED=2,Ei.ERROR=3;var Ci={audio:{ListClass:ii,TrackClass:ki,capitalName:"Audio"},video:{ListClass:oi,TrackClass:Si,capitalName:"Video"},text:{ListClass:si,TrackClass:Ti,capitalName:"Text"}};Object.keys(Ci).forEach((function(e){Ci[e].getterName=e+"Tracks",Ci[e].privateName=e+"Tracks_"}));var Ai={remoteText:{ListClass:si,TrackClass:Ti,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:ui,TrackClass:Ei,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},xi=(0,s.A)({},Ci,Ai);Ai.names=Object.keys(Ai),Ci.names=Object.keys(Ci),xi.names=[].concat(Ai.names).concat(Ci.names);var Pi=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).onDurationChange_=function(e){return r.onDurationChange(e)},r.trackProgress_=function(e){return r.trackProgress(e)},r.trackCurrentTime_=function(e){return r.trackCurrentTime(e)},r.stopTrackingCurrentTime_=function(e){return r.stopTrackingCurrentTime(e)},r.disposeSourceHandler_=function(e){return r.disposeSourceHandler(e)},r.queuedHanders_=new Set,r.hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),xi.names.forEach((function(e){var n=xi[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 xi.text.ListClass,r.initTrackListeners(),t.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}(0,d.A)(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(_r(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 Vr(0,0)},n.bufferedPercent=function(){return Wr(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(Ci.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},n.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===e&&t.removeRemoteTextTrack(i),n.removeTrack(i)}}))},n.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.crossOrigin=function(){},n.setCrossOrigin=function(){},n.error=function(e){return void 0!==e&&(this.error_=new Gr(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?Vr(0,0):Vr()},n.play=function(){},n.setScrubbing=function(){},n.scrubbing=function(){},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTrackListeners=function(){var e=this;Ci.names.forEach((function(t){var n=Ci[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(!i().WebVTT)if(o().body.contains(this.el())){if(!this.options_["vtt.js"]&&Xt(v())&&Object.keys(v()).length>0)return void this.trigger("vttjsloaded");var t=o().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})),i().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 a=function(){return e.trigger("texttrackchange")},o=function(){a();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",a),"showing"===n.mode&&n.addEventListener("cuechange",a)}};o(),t.addEventListener("change",o),t.addEventListener("addtrack",o),t.addEventListener("removetrack",o),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",o),t.removeEventListener("addtrack",o),t.removeEventListener("removetrack",o);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",a)}}))},n.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,r,i){void 0===i&&(i={});var a=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var o=new xi.text.TrackClass(i);return a.addTrack(o),o}(this,e,t,n)},n.createRemoteTextTrack=function(e){var t=Mr(e,{tech:this});return new Ai.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&&(Bt.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||i().Promise;if(e)return e.reject()},n.disablePictureInPicture=function(){return!0},n.setDisablePictureInPicture=function(){},n.requestVideoFrameCallback=function(e){var t=this,n=ir();return!this.isReady_||this.paused()?(this.queuedHanders_.add(n),this.one("playing",(function(){t.queuedHanders_.has(n)&&(t.queuedHanders_.delete(n),e())}))):this.requestNamedAnimationFrame(n,e),n},n.cancelVideoFrameCallback=function(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)},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=Dr(e),t.techs_[e]=n,t.techs_[Nr(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=Dr(e),i()&&i().videojs&&i().videojs[e]?(Bt.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),i().videojs[e]):void 0)},t}(qr);xi.names.forEach((function(e){var t=xi[e];Pi.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Pi.prototype.featuresVolumeControl=!0,Pi.prototype.featuresMuteControl=!0,Pi.prototype.featuresFullscreenResize=!1,Pi.prototype.featuresPlaybackRate=!1,Pi.prototype.featuresProgressEvents=!1,Pi.prototype.featuresSourceset=!1,Pi.prototype.featuresTimeupdateEvents=!1,Pi.prototype.featuresNativeTextTracks=!1,Pi.prototype.featuresVideoFrameCallback=!1,Pi.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:Bt.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)}},qr.registerComponent("Tech",Pi),Pi.registerTech("Tech",Pi),Pi.defaultTechOrder_=[];var Ii={},Oi={},Ri={};function Li(e,t,n){e.setTimeout((function(){return ji(t,Ii[t.type],n,e)}),1)}function Ni(e,t,n,r){void 0===r&&(r=null);var i="call"+Dr(n),a=e.reduce(Fi(i),r),o=a===Ri,s=o?null:t[n](a);return function(e,t,n,r){for(var i=e.length-1;i>=0;i--){var a=e[i];a[t]&&a[t](r,n)}}(e,n,s,o),s}var Di={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Mi={setCurrentTime:1,setMuted:1,setVolume:1},Ui={play:1,pause:1};function Fi(e){return function(t,n){return t===Ri?Ri:n[e]?n[e](t):t}}function ji(e,t,n,r,i,a){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===i&&(i=[]),void 0===a&&(a=!1);var o=t,s=o[0],u=o.slice(1);if("string"===typeof s)ji(e,Ii[s],n,r,i,a);else if(s){var l=function(e,t){var n=Oi[e.id()],r=null;if(void 0===n||null===n)return r=t(e),Oi[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var a=n[i],o=a[0],s=a[1];o===t&&(r=s)}return null===r&&(r=t(e),n.push([t,r])),r}(r,s);if(!l.setSource)return i.push(l),ji(e,u,n,r,i,a);l.setSource(Wt({},e),(function(t,o){if(t)return ji(e,u,n,r,i,a);i.push(l),ji(o,e.type===o.type?u:Ii[o.type],n,r,i,a)}))}else u.length?ji(e,u,n,r,i,a):a?n(e,i):ji(e,Ii["*"],n,r,i,!0)}var Bi={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},qi=function(e){void 0===e&&(e="");var t=vi(e);return Bi[t.toLowerCase()]||""},Hi=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):Gt(t)&&n.push(t)})),t=n}else t="string"===typeof t&&t.trim()?[zi({src:t})]:Gt(t)&&"string"===typeof t.src&&t.src&&t.src.trim()?[zi(t)]:[];return t};function zi(e){if(!e.type){var t=qi(e.src);t&&(e.type=t)}return e}var Vi=function(e){function t(t,n,r){var i,a=Mr({createEl:!1},n);if(i=e.call(this,t,a,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var o=0,s=n.playerOptions.techOrder;o<s.length;o++){var u=Dr(s[o]),l=Pi.getTech(u);if(u||(l=qr.getComponent(u)),l&&l.isSupported()){t.loadTech_(u);break}}return i}return(0,d.A)(t,e),t}(qr);qr.registerComponent("MediaLoader",Vi);var Wi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).options_.controlText&&r.controlText(r.options_.controlText),r.handleMouseOver_=function(e){return r.handleMouseOver(e)},r.handleMouseOut_=function(e){return r.handleMouseOut(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.emitTapEvents(),r.enable(),r}(0,d.A)(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={}),t=Wt({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&Bt.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),n=Wt({role:"button"},n),this.tabIndex_=t.tabIndex;var r=kn(e,t,n);return r.appendChild(kn("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=kn("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,Sn(this.controlTextEl_,n),this.nonIconControl||this.player_.options_.noUITitleAttributes||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"),"undefined"!==typeof 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"),"undefined"!==typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)},n.handleLanguagechange=function(){this.controlText(this.controlText_)},n.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},n.handleKeyDown=function(t){l().isEventKey(t,"Space")||l().isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(qr);qr.registerComponent("ClickableComponent",Wi);var Gi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update(),r.update_=function(e){return r.update(e)},t.on("posterchange",r.update_),r}(0,d.A)(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 kn("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)||(un||an)&&t||this.player_.tech(!0).focus(),this.player_.paused()?$r(this.player_.play()):this.player_.pause()}},t}(Wi);qr.registerComponent("PosterImage",Gi);var Xi="#222",Ki={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 $i(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 Yi(e,t,n){try{e.style[t]=n}catch(r){return}}var Qi=function(e){function t(t,n,r){var a;a=e.call(this,t,n,r)||this;var o=function(e){return a.updateDisplay(e)};return t.on("loadstart",(function(e){return a.toggleDisplay(e)})),t.on("texttrackchange",o),t.on("loadedmetadata",(function(e){return a.preselectTrack(e)})),t.ready(_r((0,c.A)(a),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",o),t.on("playerresize",o),i().addEventListener("orientationchange",o),t.on("dispose",(function(){return i().removeEventListener("orientationchange",o)}));for(var e=this.options_.playerOptions.tracks||[],n=0;n<e.length;n++)this.player_.addRemoteTextTrack(e[n],!0);this.preselectTrack()}}))),a}(0,d.A)(t,e);var n=t.prototype;return n.preselectTrack=function(){for(var e,t,n,r={captions:1,subtitles:1},i=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,o=0;o<i.length;o++){var s=i[o];a&&a.enabled&&a.language&&a.language===s.language&&s.kind in r?s.kind===a.kind?n=s:n||(n=s):a&&!a.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"},{translate:"yes","aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"===typeof i().WebVTT&&i().WebVTT.processCues(i(),[],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 a=null,o=null,s=e.length;s--;){var u=e[s];"showing"===u.mode&&("descriptions"===u.kind?a=u:o=u)}o?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(o)):a&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(a))}},n.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;r--;){var a=n[r];if(a){var o=a.displayState;if(t.color&&(o.firstChild.style.color=t.color),t.textOpacity&&Yi(o.firstChild,"color",$i(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(o.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Yi(o.firstChild,"backgroundColor",$i(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Yi(o,"backgroundColor",$i(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 "+Xi:"raised"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+Xi:"depressed"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+Xi:"uniform"===t.edgeStyle&&(o.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+Xi)),t.fontPercent&&1!==t.fontPercent){var s=i().parseFloat(o.style.fontSize);o.style.fontSize=s*t.fontPercent+"px",o.style.height="auto",o.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=Ki[t.fontFamily])}}},n.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"===typeof i().WebVTT&&!e.every((function(e){return!e.activeCues}))){for(var t=[],n=0;n<e.length;++n)for(var r=e[n],a=0;a<r.activeCues.length;++a)t.push(r.activeCues[a]);i().WebVTT.processCues(i(),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;An(l,"vjs-text-track-cue"),An(l,"vjs-text-track-cue-"+(s.language?s.language:o)),s.language&&Ln(l,"lang",s.language)}this.player_.textTrackSettings&&this.updateDisplayState(s)}}},t}(qr);qr.registerComponent("TextTrackDisplay",Qi);var Ji=function(e){function t(){return e.apply(this,arguments)||this}return(0,d.A)(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),r=kn("span",{className:"vjs-control-text",textContent: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}(qr);qr.registerComponent("LoadingSpinner",Ji);var Zi=function(e){function t(){return e.apply(this,arguments)||this}(0,d.A)(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var r=kn("button",t=Wt({className:this.buildCSSClass()},t),n=Wt({type:"button"},n));return r.appendChild(kn("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return Bt.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),qr.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){l().isEventKey(t,"Space")||l().isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(Wi);qr.registerComponent("Button",Zi);var ea=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).mouseused_=!1,r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r}(0,d.A)(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 $r(t),void(!this.player_.tech(!0)||(un||an)&&n||this.player_.tech(!0).focus())}var r=this.player_.getChild("controlBar"),i=r&&r.getChild("playToggle");if(i){var a=function(){return i.focus()};Kr(t)?t.then(a,(function(){})):this.setTimeout(a,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(Zi);ea.prototype.controlText_="Play Video",qr.registerComponent("BigPlayButton",ea);var ta=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}(0,d.A)(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){l().isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Zi);qr.registerComponent("CloseButton",ta);var na=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",(function(e){return r.handlePlay(e)})),r.on(t,"pause",(function(e){return r.handlePause(e)})),n.replay&&r.on(t,"ended",(function(e){return r.handleEnded(e)})),r}(0,d.A)(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()?$r(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){var t=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",(function(e){return t.handleSeeked(e)}))},t}(Zi);na.prototype.controlText_="Play",qr.registerComponent("PlayToggle",na);var ra=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),a=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||o>0?i+":":"")+(r=((i||a>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},ia=ra;function aa(e,t){return void 0===t&&(t=e),ia(e,t)}var oa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["timeupdate","ended"],(function(e){return r.updateContent(e)})),r.updateTextNode_(),r}(0,d.A)(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"}),r=kn("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+"\xa0"},{role:"presentation"});return n.appendChild(r),this.contentEl_=kn("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=aa(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(t.contentEl_){var e=t.textNode_;e&&t.contentEl_.firstChild!==e&&(e=null,Bt.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=o().createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},n.updateContent=function(e){},t}(qr);oa.prototype.labelText_="Time",oa.prototype.controlText_="Time",qr.registerComponent("TimeDisplay",oa);var sa=function(e){function t(){return e.apply(this,arguments)||this}(0,d.A)(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}(oa);sa.prototype.labelText_="Current Time",sa.prototype.controlText_="Current Time",qr.registerComponent("CurrentTimeDisplay",sa);var ua=function(e){function t(t,n){var r,i=function(e){return r.updateContent(e)};return(r=e.call(this,t,n)||this).on(t,"durationchange",i),r.on(t,"loadstart",i),r.on(t,"loadedmetadata",i),r}(0,d.A)(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}(oa);ua.prototype.labelText_="Duration",ua.prototype.controlText_="Duration",qr.registerComponent("DurationDisplay",ua);var la=function(e){function t(){return e.apply(this,arguments)||this}return(0,d.A)(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),n=e.prototype.createEl.call(this,"div"),r=e.prototype.createEl.call(this,"span",{textContent:"/"});return n.appendChild(r),t.appendChild(n),t},t}(qr);qr.registerComponent("TimeDivider",la);var ca=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",(function(e){return r.updateContent(e)})),r}(0,d.A)(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!1!==this.options_.displayNegative&&t.insertBefore(kn("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}(oa);ca.prototype.labelText_="Remaining Time",ca.prototype.controlText_="Remaining Time",qr.registerComponent("RemainingTimeDisplay",ca);var da=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateShowing(),r.on(r.player(),"durationchange",(function(e){return r.updateShowing(e)})),r}(0,d.A)(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_=kn("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(kn("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+"\xa0"})),this.contentEl_.appendChild(o().createTextNode(this.localize("LIVE"))),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}(qr);qr.registerComponent("LiveDisplay",da);var pa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&(r.updateLiveEdgeStatusHandler_=function(e){return r.updateLiveEdgeStatus(e)},r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatusHandler_)),r}(0,d.A)(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_=kn("span",{className:"vjs-seek-to-live-text",textContent: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.updateLiveEdgeStatusHandler_),this.textEl_=null,e.prototype.dispose.call(this)},t}(Zi);pa.prototype.controlText_="Seek to live, currently playing live",qr.registerComponent("SeekToLive",pa);var ha=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},fa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseDown_=function(e){return r.handleMouseDown(e)},r.handleMouseUp_=function(e){return r.handleMouseUp(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleMouseMove_=function(e){return r.handleMouseMove(e)},r.update_=function(e){return r.update(e)},r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}(0,d.A)(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=Wt({tabIndex:0},n),r=Wt({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||on||e.preventDefault(),Dn(),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,!0)},n.handleMouseMove=function(e){},n.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;Mn(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},n.update=function(){var e=this;if(this.el_&&this.bar){var t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",(function(){var n=e.vertical()?"height":"width";e.bar.el().style[n]=(100*t).toFixed(2)+"%"}))),t}},n.getProgress=function(){return Number(ha(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=jn(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){l().isEventKey(t,"Left")||l().isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):l().isEventKey(t,"Right")||l().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}(qr);qr.registerComponent("Slider",fa);var ma=function(e,t){return ha(e/t*100,0,100).toFixed(2)+"%"},ga=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).partEls_=[],r.on(t,"progress",(function(e){return r.update(e)})),r}(0,d.A)(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=kn("span",{className:"vjs-control-text"}),r=kn("span",{textContent:this.localize("Loaded")}),i=o().createTextNode(": ");return this.percentageEl_=kn("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(r),n.appendChild(i),n.appendChild(this.percentageEl_),t},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var e=t.player_.liveTracker,n=t.player_.buffered(),r=e&&e.isLive()?e.seekableEnd():t.player_.duration(),i=t.player_.bufferedEnd(),a=t.partEls_,o=ma(i,r);t.percent_!==o&&(t.el_.style.width=o,Sn(t.percentageEl_,o),t.percent_=o);for(var s=0;s<n.length;s++){var u=n.start(s),l=n.end(s),c=a[s];c||(c=t.el_.appendChild(kn()),a[s]=c),c.dataset.start===u&&c.dataset.end===l||(c.dataset.start=u,c.dataset.end=l,c.style.left=ma(u,i),c.style.width=ma(l-u,i))}for(var d=a.length;d>n.length;d--)t.el_.removeChild(a[d-1]);a.length=n.length}))},t}(qr);qr.registerComponent("LoadProgressBar",ga);var va=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=br(_r((0,c.A)(r),r.update),yr),r}(0,d.A)(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=Fn(this.el_),i=Un(this.player_.el()),a=e.width*t;if(i&&r){var o=e.left-i.left+a,s=e.width-a+(i.right-e.right),u=r.width/2;o<u?u+=u-o:s<u&&(u=s),u<0?u=0:u>r.width&&(u=r.width),u=Math.round(u),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(e){Sn(this.el_,e)},n.updateTime=function(e,t,n,r){var i=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var a,o=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var s=i.player_.liveTracker.liveWindow(),u=s-t*s;a=(u<1?"":"-")+aa(u,s)}else a=aa(n,o);i.update(e,t,a),r&&r()}))},t}(qr);qr.registerComponent("TimeTooltip",va);var ya=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=br(_r((0,c.A)(r),r.update),yr),r}(0,d.A)(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}(qr);ya.prototype.options_={children:[]},fn||en||ya.prototype.options_.children.push("timeTooltip"),qr.registerComponent("PlayProgressBar",ya);var _a=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=br(_r((0,c.A)(r),r.update),yr),r}(0,d.A)(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}(qr);_a.prototype.options_={children:["timeTooltip"]},qr.registerComponent("MouseTimeDisplay",_a);var ba=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).setEventHandlers_(),r}(0,d.A)(t,e);var n=t.prototype;return n.setEventHandlers_=function(){var e=this;this.update_=_r(this,this.update),this.update=br(this.update_,yr),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(t){return e.enableInterval_(t)},this.disableIntervalHandler_=function(t){return e.disableInterval_(t)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in o()&&"visibilityState"in o()&&this.on(o(),"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){"hidden"===o().visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,yr))},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;if("hidden"!==o().visibilityState){var r=e.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,i=n.player_.duration();t&&t.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[aa(e,i),aa(i,i)],"{1} of {2}")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(Un(n.el()),n.getProgress())})),r}},n.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},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){Wn(t)&&(t.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},n.handleMouseMove=function(e,t){if(void 0===t&&(t=!1),Wn(e)){var n;t||this.player_.scrubbing()||this.player_.scrubbing(!0);var r=this.calculateDistance(e),i=this.player_.liveTracker;if(i&&i.isLive()){if(r>=.99)return void i.seekToLiveEdge();var a=i.seekableStart(),o=i.liveCurrentTime();if((n=a+r*i.liveWindow())>=o&&(n=o),n<=a&&(n=a+.1),n===1/0)return}else(n=r*this.player_.duration())===this.player_.duration()&&(n-=.1);this.userSeek_(n)}},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?$r(this.player_.play()):this.update_()},n.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},n.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},n.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleKeyDown=function(t){var n=this.player_.liveTracker;if(l().isEventKey(t,"Space")||l().isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(l().isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(l().isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(l()(t))){t.preventDefault(),t.stopPropagation();var r=10*(l().codes[l()(t)]-l().codes[0])/100;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*r):this.userSeek_(this.player_.duration()*r)}else l().isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):l().isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(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.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in o()&&"visibilityState"in o()&&this.off(o(),"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(fa);ba.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},fn||en||ba.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),qr.registerComponent("SeekBar",ba);var wa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseMove=br(_r((0,c.A)(r),r.handleMouseMove),yr),r.throttledHandleMouseSeek=br(_r((0,c.A)(r),r.handleMouseSeek),yr),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.handleMouseDownHandler_=function(e){return r.handleMouseDown(e)},r.enable(),r}(0,d.A)(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(),a=Fn(i),o=jn(i,e).x;o=ha(o,0,1),r&&r.update(a,o),n&&n.update(a,t.getProgress())}}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.disable=function(){if(this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&$r(this.player_.play())}},n.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},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.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseUp=function(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},t}(qr);wa.prototype.options_={children:["seekBar"]},qr.registerComponent("ProgressControl",wa);var Ta=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],(function(e){return r.handlePictureInPictureChange(e)})),r.on(t,["disablepictureinpicturechanged","loadedmetadata"],(function(e){return r.handlePictureInPictureEnabledChange(e)})),r.on(t,["loadedmetadata","audioonlymodechange","audiopostermodechange"],(function(){"audio"===t.currentType().substring(0,5)||t.audioPosterMode()||t.audioOnlyMode()?(t.isInPictureInPicture()&&t.exitPictureInPicture(),r.hide()):r.show()})),r.disable(),r}(0,d.A)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){o().pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},n.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},n.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(Zi);Ta.prototype.controlText_="Picture-in-Picture",qr.registerComponent("PictureInPictureToggle",Ta);var ka=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"fullscreenchange",(function(e){return r.handleFullscreenChange(e)})),!1===o()[t.fsApi_.fullscreenEnabled]&&r.disable(),r}(0,d.A)(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}(Zi);ka.prototype.controlText_="Fullscreen",qr.registerComponent("FullscreenToggle",ka);var Sa=function(e){function t(){return e.apply(this,arguments)||this}return(0,d.A)(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return t.appendChild(e.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),t},t}(qr);qr.registerComponent("VolumeLevel",Sa);var Ea=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=br(_r((0,c.A)(r),r.update),yr),r}(0,d.A)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n,r){if(!n){var i=Un(this.el_),a=Un(this.player_.el()),o=e.width*t;if(!a||!i)return;var s=e.left-a.left+o,u=e.width-o+(a.right-e.right),l=i.width/2;s<l?l+=l-s:u<l&&(l=u),l<0?l=0:l>i.width&&(l=i.width),this.el_.style.right="-"+l+"px"}this.write(r+"%")},n.write=function(e){Sn(this.el_,e)},n.updateVolume=function(e,t,n,r,i){var a=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(function(){a.update(e,t,n,r.toFixed(0)),i&&i()}))},t}(qr);qr.registerComponent("VolumeLevelTooltip",Ea);var Ca=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=br(_r((0,c.A)(r),r.update),yr),r}(0,d.A)(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,n){var r=this,i=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,i,(function(){n?r.el_.style.bottom=e.height*t+"px":r.el_.style.left=e.width*t+"px"}))},t}(qr);Ca.prototype.options_={children:["volumeLevelTooltip"]},qr.registerComponent("MouseVolumeLevelDisplay",Ca);var Aa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on("slideractive",(function(e){return r.updateLastVolume_(e)})),r.on(t,"volumechange",(function(e){return r.updateARIAAttributes(e)})),t.ready((function(){return r.updateARIAAttributes()})),r}(0,d.A)(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){Wn(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var n=this.el(),r=Un(n),i=this.vertical(),a=jn(n,e);a=i?a.y:a.x,a=ha(a,0,1),t.update(r,a,i)}Wn(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}(fa);Aa.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},fn||en||Aa.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Aa.prototype.playerEvent="volumechange",qr.registerComponent("VolumeBar",Aa);var xa=function(e){function t(t,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,("undefined"===typeof n.volumeBar||Xt(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")}))}((0,c.A)(r),t),r.throttledHandleMouseMove=br(_r((0,c.A)(r),r.handleMouseMove),yr),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r.on("touchstart",(function(e){return r.handleMouseDown(e)})),r.on("mousemove",(function(e){return r.handleMouseMove(e)})),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}(0,d.A)(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.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},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.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(qr);xa.prototype.options_={children:["volumeBar"]},qr.registerComponent("VolumeControl",xa);var Pa=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")}))}((0,c.A)(r),t),r.on(t,["loadstart","volumechange"],(function(e){return r.update(e)})),r}(0,d.A)(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++)xn(this.el_,"vjs-vol-"+n);An(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}(Zi);Pa.prototype.controlText_="Mute",qr.registerComponent("MuteToggle",Pa);var Ia=function(e){function t(t,n){var r;return void 0===n&&(n={}),"undefined"!==typeof n.inline?n.inline=n.inline:n.inline=!0,("undefined"===typeof n.volumeControl||Xt(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=e.call(this,t,n)||this).handleKeyPressHandler_=function(e){return r.handleKeyPress(e)},r.on(t,["loadstart"],(function(e){return r.volumePanelState_(e)})),r.on(r.muteToggle,"keyup",(function(e){return r.handleKeyPress(e)})),r.on(r.volumeControl,"keyup",(function(e){return r.handleVolumeControlKeyUp(e)})),r.on("keydown",(function(e){return r.handleKeyPress(e)})),r.on("mouseover",(function(e){return r.handleMouseOver(e)})),r.on("mouseout",(function(e){return r.handleMouseOut(e)})),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}(0,d.A)(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){l().isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),dr(o(),"keyup",this.handleKeyPressHandler_)},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),pr(o(),"keyup",this.handleKeyPressHandler_)},n.handleKeyPress=function(e){l().isEventKey(e,"Esc")&&this.handleMouseOut()},t}(qr);Ia.prototype.options_={children:["muteToggle","volumeControl"]},qr.registerComponent("VolumePanel",Ia);var Oa=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",(function(e){return r.handleKeyDown(e)})),r.boundHandleBlur_=function(e){return r.handleBlur(e)},r.boundHandleTapClick_=function(e){return r.handleTapClick(e)},r}(0,d.A)(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof qr&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof qr&&(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_=kn(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_),dr(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||o().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){l().isEventKey(e,"Left")||l().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(l().isEventKey(e,"Right")||l().isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},n.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},n.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},n.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(qr);qr.registerComponent("Menu",Oa);var Ra=function(e){function t(t,n){var r;void 0===n&&(n={}),(r=e.call(this,t,n)||this).menuButton_=new Zi(t,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var i=Zi.prototype.buildCSSClass();r.menuButton_.el_.className=r.buildCSSClass()+" "+i,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0;var a=function(e){return r.handleClick(e)};return r.handleMenuKeyUp_=function(e){return r.handleMenuKeyUp(e)},r.on(r.menuButton_,"tap",a),r.on(r.menuButton_,"click",a),r.on(r.menuButton_,"keydown",(function(e){return r.handleKeyDown(e)})),r.on(r.menuButton_,"mouseenter",(function(){r.addClass("vjs-hover"),r.menu.show(),dr(o(),"keyup",r.handleMenuKeyUp_)})),r.on("mouseleave",(function(e){return r.handleMouseLeave(e)})),r.on("keydown",(function(e){return r.handleSubmenuKeyDown(e)})),r}(0,d.A)(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.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))},n.createMenu=function(){var e=new Oa(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=kn("li",{className:"vjs-menu-title",textContent:Dr(this.options_.title),tabIndex:-1}),n=new qr(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+" "+Zi.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"),pr(o(),"keyup",this.handleMenuKeyUp_)},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(e){l().isEventKey(e,"Esc")||l().isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),l().isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(l().isEventKey(e,"Up")||l().isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(e){(l().isEventKey(e,"Esc")||l().isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},n.handleSubmenuKeyDown=function(e){(l().isEventKey(e,"Esc")||l().isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),l().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&&wn())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}(qr);qr.registerComponent("MenuButton",Ra);var La=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(0,c.A)(r);var a=_r((0,c.A)(r),r.update);return i.addEventListener("removetrack",a),i.addEventListener("addtrack",a),i.addEventListener("labelchange",a),r.player_.on("ready",a),r.player_.on("dispose",(function(){i.removeEventListener("removetrack",a),i.removeEventListener("addtrack",a),i.removeEventListener("labelchange",a)})),r}return(0,d.A)(t,e),t}(Ra);qr.registerComponent("TrackButton",La);var Na=["Tab","Esc","Up","Down","Right","Left"],Da=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}(0,d.A)(t,e);var n=t.prototype;return n.createEl=function(t,n,r){this.nonIconControl=!0;var i=e.prototype.createEl.call(this,"li",Wt({className:"vjs-menu-item",tabIndex:-1},n),r);return i.replaceChild(kn("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),i.querySelector(".vjs-icon-placeholder")),i},n.handleKeyDown=function(t){Na.some((function(e){return l().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}(Wi);qr.registerComponent("MenuItem",Da);var Ma=function(e){function t(t,n){var r,a=n.track,s=t.textTracks();n.label=a.label||a.language||"Unknown",n.selected="showing"===a.mode,(r=e.call(this,t,n)||this).track=a,r.kinds=(n.kinds||[n.kind||r.track.kind]).filter(Boolean);var u,l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply((0,c.A)(r),t)},d=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleSelectedLanguageChange.apply((0,c.A)(r),t)};(t.on(["loadstart","texttrackchange"],l),s.addEventListener("change",l),s.addEventListener("selectedlanguagechange",d),r.on("dispose",(function(){t.off(["loadstart","texttrackchange"],l),s.removeEventListener("change",l),s.removeEventListener("selectedlanguagechange",d)})),void 0===s.onchange)&&r.on(["tap","click"],(function(){if("object"!==typeof i().Event)try{u=new(i().Event)("change")}catch(e){}u||(u=o().createEvent("Event")).initEvent("change",!0,!0),s.dispatchEvent(u)}));return r.handleTracksChange(),r}(0,d.A)(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 a=r[i];-1!==this.kinds.indexOf(a.kind)&&(a===n?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled"))}},n.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},n.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},n.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(Da);qr.registerComponent("TextTrackMenuItem",Ma);var Ua=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}(0,d.A)(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 a=t[r];if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Ma);qr.registerComponent("OffTextTrackMenuItem",Ua);var Fa=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return(0,d.A)(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=Ma),this.label_&&(n=this.label_+" off"),e.push(new Ua(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 a=r[i];if(this.kinds_.indexOf(a.kind)>-1){var o=new t(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});o.addClass("vjs-"+a.kind+"-menu-item"),e.push(o)}}return e},t}(La);qr.registerComponent("TextTrackButton",Fa);var ja=function(e){function t(t,n){var r,i=n.track,a=n.cue,o=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=a.text,n.selected=a.startTime<=o&&o<a.endTime,(r=e.call(this,t,n)||this).track=i,r.cue=a,r}return(0,d.A)(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime)},t}(Da);qr.registerComponent("ChaptersTrackMenuItem",ja);var Ba=function(e){function t(t,n,r){var i;return(i=e.call(this,t,n,r)||this).selectCurrentItem_=function(){i.items.forEach((function(e){e.selected(i.track_.activeCues[0]===e.cue)}))},i}(0,d.A)(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){if(!t||!t.track||"chapters"===t.track.kind){var n=this.findChaptersTrack();n!==this.track_?(this.setTrack(n),e.prototype.update.call(this)):(!this.items||n&&n.cues&&n.cues.length!==this.items.length)&&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_.removeEventListener("cuechange",this.selectCurrentItem_),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_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}},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(Dr(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],a=new ja(this.player_,{track:this.track_,cue:i});e.push(a)}return e},t}(Fa);Ba.prototype.kind_="chapters",Ba.prototype.controlText_="Chapters",qr.registerComponent("ChaptersButton",Ba);var qa=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var a=t.textTracks(),o=_r((0,c.A)(i),i.handleTracksChange);return a.addEventListener("change",o),i.on("dispose",(function(){a.removeEventListener("change",o)})),i}(0,d.A)(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 a=t[r];if(a.kind!==this.kind_&&"showing"===a.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Fa);qa.prototype.kind_="descriptions",qa.prototype.controlText_="Descriptions",qr.registerComponent("DescriptionsButton",qa);var Ha=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}(0,d.A)(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}(Fa);Ha.prototype.kind_="subtitles",Ha.prototype.controlText_="Subtitles",qr.registerComponent("SubtitlesButton",Ha);var za=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(0,d.A)(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Ma);qr.registerComponent("CaptionSettingsMenuItem",za);var Va=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}(0,d.A)(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 za(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Fa);Va.prototype.kind_="captions",Va.prototype.controlText_="Captions",qr.registerComponent("CaptionsButton",Va);var Wa=function(e){function t(){return e.apply(this,arguments)||this}return(0,d.A)(t,e),t.prototype.createEl=function(t,n,r){var i=e.prototype.createEl.call(this,t,n,r),a=i.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(a.appendChild(kn("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(kn("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),i},t}(Ma);qr.registerComponent("SubsCapsMenuItem",Wa);var Ga=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(Dr(r.label_)),r}(0,d.A)(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 za(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,Wa)},t}(Fa);Ga.prototype.kinds_=["captions","subtitles"],Ga.prototype.controlText_="Subtitles",qr.registerComponent("SubsCapsButton",Ga);var Xa=function(e){function t(t,n){var r,i=n.track,a=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 o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply((0,c.A)(r),t)};return a.addEventListener("change",o),r.on("dispose",(function(){a.removeEventListener("change",o)})),r}(0,d.A)(t,e);var n=t.prototype;return n.createEl=function(t,n,r){var i=e.prototype.createEl.call(this,t,n,r),a=i.querySelector(".vjs-menu-item-text");return"main-desc"===this.options_.track.kind&&(a.appendChild(kn("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(kn("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),i},n.handleClick=function(t){if(e.prototype.handleClick.call(this,t),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks)for(var n=this.player_.audioTracks(),r=0;r<n.length;r++){var i=n[r];i!==this.track&&(i.enabled=i===this.track)}},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(Da);qr.registerComponent("AudioTrackMenuItem",Xa);var Ka=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}(0,d.A)(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 Xa(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},t}(La);Ka.prototype.controlText_="Audio Track",qr.registerComponent("AudioTrackButton",Ka);var $a=function(e){function t(t,n){var r,i=n.rate,a=parseFloat(i,10);return n.label=i,n.selected=a===t.playbackRate(),n.selectable=!0,n.multiSelectable=!1,(r=e.call(this,t,n)||this).label=i,r.rate=a,r.on(t,"ratechange",(function(e){return r.update(e)})),r}(0,d.A)(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}(Da);$a.prototype.contentElType="button",qr.registerComponent("PlaybackRateMenuItem",$a);var Ya=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).menuButton_.el_.setAttribute("aria-describedby",r.labelElId_),r.updateVisibility(),r.updateLabel(),r.on(t,"loadstart",(function(e){return r.updateVisibility(e)})),r.on(t,"ratechange",(function(e){return r.updateLabel(e)})),r.on(t,"playbackrateschange",(function(e){return r.handlePlaybackRateschange(e)})),r}(0,d.A)(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=kn("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"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.createItems=function(){for(var e=this.playbackRates(),t=[],n=e.length-1;n>=0;n--)t.push(new $a(this.player(),{rate:e[n]+"x"}));return t},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){var t=this.player().playbackRate(),n=this.playbackRates(),r=(n.indexOf(t)+1)%n.length;this.player().playbackRate(n[r])},n.handlePlaybackRateschange=function(e){this.update()},n.playbackRates=function(){var e=this.player();return e.playbackRates&&e.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_.textContent=this.player().playbackRate()+"x")},t}(Ra);Ya.prototype.controlText_="Playback Rate",qr.registerComponent("PlaybackRateMenuButton",Ya);var Qa=function(e){function t(){return e.apply(this,arguments)||this}(0,d.A)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(t,n,r){return void 0===t&&(t="div"),void 0===n&&(n={}),void 0===r&&(r={}),n.className||(n.className=this.buildCSSClass()),e.prototype.createEl.call(this,t,n,r)},t}(qr);qr.registerComponent("Spacer",Qa);var Ja=function(e){function t(){return e.apply(this,arguments)||this}(0,d.A)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:"\xa0"})},t}(Qa);qr.registerComponent("CustomControlSpacer",Ja);var Za=function(e){function t(){return e.apply(this,arguments)||this}return(0,d.A)(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(qr);Za.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in o()&&Za.prototype.options_.children.splice(Za.prototype.options_.children.length-1,0,"pictureInPictureToggle"),qr.registerComponent("ControlBar",Za);var eo=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"error",(function(e){return r.open(e)})),r}(0,d.A)(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}(ei);eo.prototype.options_=(0,s.A)({},ei.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),qr.registerComponent("ErrorDisplay",eo);var to="vjs-text-track-settings",no=["#000","Black"],ro=["#00F","Blue"],io=["#0FF","Cyan"],ao=["#0F0","Green"],oo=["#F0F","Magenta"],so=["#F00","Red"],uo=["#FFF","White"],lo=["#FF0","Yellow"],co=["1","Opaque"],po=["0.5","Semi-Transparent"],ho=["0","Transparent"],fo={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[no,uo,so,ao,ro,lo,oo,io]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[co,po,ho]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[uo,no,so,ao,ro,lo,oo,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,po]},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,po,co]}};function mo(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}fo.windowColor.options=fo.backgroundColor.options;var go=function(e){function t(t,n){var r;return n.temporary=!1,(r=e.call(this,t,n)||this).updateDisplay=r.updateDisplay.bind((0,c.A)(r)),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=kn("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()})),Vt(fo,(function(e){r.on(r.$(e.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}(0,d.A)(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=fo[e],a=i.id.replace("%s",this.id_),o=[t,a].join(" ").trim();return["<"+n+' id="'+a+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"</"+n+">",'<select aria-labelledby="'+o+'">'].concat(i.options.map((function(e){var t=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+o+" "+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 kn("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return kn("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 kn("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,a,o=(i=r.$(t.selector),a=t.parser,mo(i.options[i.options.selectedIndex].value,a));return void 0!==o&&(e[n]=o),e},void 0===(n={})&&(n=0),zt(e=fo).reduce((function(n,r){return t(n,e[r],r)}),n)},n.setValues=function(e){var t=this;Vt(fo,(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;Vt(fo,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},n.restoreSettings=function(){var e;try{e=JSON.parse(i().localStorage.getItem(to))}catch(t){Bt.warn(t)}e&&this.setValues(e)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?i().localStorage.setItem(to,JSON.stringify(e)):i().localStorage.removeItem(to)}catch(t){Bt.warn(t)}}},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}(ei);qr.registerComponent("TextTrackSettings",go);var vo=function(e){function t(t,n){var r,a=n.ResizeObserver||i().ResizeObserver;null===n.ResizeObserver&&(a=!1);var o=Mr({createEl:!a,reportTouchActivity:!1},n);return(r=e.call(this,t,o)||this).ResizeObserver=n.ResizeObserver||i().ResizeObserver,r.loadListener_=null,r.resizeObserver_=null,r.debouncedHandler_=function(e,t,n,r){var a;void 0===r&&(r=i());var o=function(){var i=this,o=arguments,s=function(){a=null,s=null,n||e.apply(i,o)};!a&&n&&e.apply(i,o),r.clearTimeout(a),a=r.setTimeout(s,t)};return o.cancel=function(){r.clearTimeout(a),a=null},o}((function(){r.resizeHandler()}),100,!1,(0,c.A)(r)),a?(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(){pr(this,"resize",e),pr(this,"unload",t),t=null};dr(r.el_.contentWindow,"unload",t),dr(r.el_.contentWindow,"resize",e)}},r.one("load",r.loadListener_)),r}(0,d.A)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"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}(qr);qr.registerComponent("ResizeManager",vo);var yo={trackingThreshold:20,liveTolerance:15},_o=function(e){function t(t,n){var r,i=Mr(yo,n,{createEl:!1});return(r=e.call(this,t,i)||this).handleVisibilityChange_=function(e){return r.handleVisibilityChange(e)},r.trackLiveHandler_=function(){return r.trackLive_()},r.handlePlay_=function(e){return r.handlePlay(e)},r.handleFirstTimeupdate_=function(e){return r.handleFirstTimeupdate(e)},r.handleSeeked_=function(e){return r.handleSeeked(e)},r.seekToLiveEdge_=function(e){return r.seekToLiveEdge(e)},r.reset_(),r.on(r.player_,"durationchange",(function(e){return r.handleDurationchange(e)})),r.on(r.player_,"canplay",(function(){return r.toggleTracking()})),un&&"hidden"in o()&&"visibilityState"in o()&&r.on(o(),"visibilitychange",r.handleVisibilityChange_),r}(0,d.A)(t,e);var n=t.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(o().hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(i().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(),a=this.player_.currentTime(),o=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-a)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(o=!1),o!==this.behindLiveEdge_&&(this.behindLiveEdge_=o,this.trigger("liveedgechange"))}},n.handleDurationchange=function(){this.toggleTracking()},n.toggleTracking=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.trackLiveHandler_,yr),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),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.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!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.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),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.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},n.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},n.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},n.isLive=function(){return this.isTracking()},n.atLiveEdge=function(){return!this.behindLiveEdge()},n.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},n.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},n.behindLiveEdge=function(){return this.behindLiveEdge_},n.isTracking=function(){return"number"===typeof this.trackingInterval_},n.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},n.dispose=function(){this.off(o(),"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),e.prototype.dispose.call(this)},t}(qr);qr.registerComponent("LiveTracker",_o);var bo,wo=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 a=0;a<n.length;a++){var o=n[a].src;o&&-1===r.indexOf(o)&&r.push(o)}return!!r.length&&(1===r.length&&(i=r[0]),e.triggerSourceset(i),!0)},To=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=o().createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=o().createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",i().Element.prototype.appendChild.call(this,n),this.innerHTML}}),ko=function(e,t){for(var n={},r=0;r<e.length&&!((n=Object.getOwnPropertyDescriptor(e[r],t))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},So=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},r=function(e){return ko([e.el(),i().HTMLMediaElement.prototype,i().Element.prototype,To],"innerHTML")}(e),a=function(n){return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=n.apply(t,i);return wo(e),o}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=a(n[e]))})),Object.defineProperty(t,"innerHTML",Mr(r,{set:a(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_)}},Eo=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?gi(i().Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return i().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 ko([e.el(),i().HTMLMediaElement.prototype,Eo],"src")}(e),r=t.setAttribute,a=t.load;Object.defineProperty(t,"src",Mr(n,{set:function(r){var i=n.set.call(t,r);return e.triggerSourceset(t.src),i}})),t.setAttribute=function(n,i){var a=r.call(t,n,i);return/src/i.test(n)&&e.triggerSourceset(t.src),a},t.load=function(){var n=a.call(t);return wo(e)||(e.triggerSourceset(""),So(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):wo(e)||So(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=a,t.setAttribute=r,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}},Ao=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})},a={configurable:!0,enumerable:!0,get:function(){var e=n();return i(e),e}};return r&&(a.set=i),Object.defineProperty(e,t,a)},xo=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i=t.source,a=!1;if(r.featuresVideoFrameCallback=r.featuresVideoFrameCallback&&"VIDEO"===r.el_.tagName,i&&(r.el_.currentSrc!==i.src||t.tag&&3===t.tag.initNetworkState_)?r.setSource(i):r.handleLateInit_(r.el_),t.enableSourceset&&r.setupSourcesetHandling_(),r.isScrubbing_=!1,r.el_.hasChildNodes()){for(var o=r.el_.childNodes,s=o.length,u=[];s--;){var l=o[s];"track"===l.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(l),r.remoteTextTracks().addTrack(l.track),r.textTracks().addTrack(l.track),a||r.el_.hasAttribute("crossorigin")||!yi(l.src)||(a=!0)):u.push(l))}for(var c=0;c<u.length;c++)r.el_.removeChild(u[c])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&a&&Bt.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_(),(dn||hn||nn)&&!0===t.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}(0,d.A)(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=Ci[e],r=this.el()[n.getterName],i=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var a={change:function(n){var r={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(r),"text"===e&&t[Ai.remoteText.getterName]().trigger(r)},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},o=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,a=0;a<r.length;a++)if(r[a]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=a,Object.keys(a).forEach((function(e){var n=a[e];r.addEventListener(e,n),t.on("dispose",(function(t){return r.removeEventListener(e,n)}))})),this.on("loadstart",o),this.on("dispose",(function(e){return t.off("loadstart",o)}))}},n.proxyNativeTracks_=function(){var e=this;Ci.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=o().createElement("video");var r=Mr({},this.options_.tag&&On(this.options_.tag));dn&&!0===this.options_.nativeControlsForTouch||delete r.controls,In(e,Wt(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}"undefined"!==typeof this.options_.preload&&Ln(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var i=["loop","muted","playsinline","autoplay"],a=0;a<i.length;a++){var s=i[a],u=this.options_[s];"undefined"!==typeof u&&(u?Ln(e,s,s):Nn(e,s),e[s]=u)}return e},n.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")}))}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(e){this.trigger(e)}),this)}))}},n.setScrubbing=function(e){this.isScrubbing_=e},n.scrubbing=function(){return this.isScrubbing_},n.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&mn?this.el_.fastSeek(e):this.el_.currentTime=e}catch(t){Bt(t,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;if(this.el_.duration===1/0&&en&&on&&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}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!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=i().navigator&&i().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)$r(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}),0);else try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}},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.requestVideoFrameCallback=function(t){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(t):e.prototype.requestVideoFrameCallback.call(this,t)},n.cancelVideoFrameCallback=function(t){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(t):e.prototype.cancelVideoFrameCallback.call(this,t)},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=o().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"undefined"!==typeof this.el().webkitDroppedFrameCount&&"undefined"!==typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),i().performance&&"function"===typeof i().performance.now?e.creationTime=i().performance.now():i().performance&&i().performance.timing&&"number"===typeof i().performance.timing.navigationStart&&(e.creationTime=i().Date.now()-i().performance.timing.navigationStart),e},t}(Pi);Ao(xo,"TEST_VID",(function(){if(_n()){var e=o().createElement("video"),t=o().createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),xo.isSupported=function(){try{xo.TEST_VID.volume=.5}catch(e){return!1}return!(!xo.TEST_VID||!xo.TEST_VID.canPlayType)},xo.canPlayType=function(e){return xo.TEST_VID.canPlayType(e)},xo.canPlaySource=function(e,t){return xo.canPlayType(e.type)},xo.canControlVolume=function(){try{var e=xo.TEST_VID.volume;xo.TEST_VID.volume=e/2+.1;var t=e!==xo.TEST_VID.volume;return t&&fn?(i().setTimeout((function(){xo&&xo.prototype&&(xo.prototype.featuresVolumeControl=e!==xo.TEST_VID.volume)})),!1):t}catch(n){return!1}},xo.canMuteVolume=function(){try{var e=xo.TEST_VID.muted;return xo.TEST_VID.muted=!e,xo.TEST_VID.muted?Ln(xo.TEST_VID,"muted","muted"):Nn(xo.TEST_VID,"muted"),e!==xo.TEST_VID.muted}catch(t){return!1}},xo.canControlPlaybackRate=function(){if(en&&on&&sn<58)return!1;try{var e=xo.TEST_VID.playbackRate;return xo.TEST_VID.playbackRate=e/2+.1,e!==xo.TEST_VID.playbackRate}catch(t){return!1}},xo.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(o().createElement("video"),"src",{get:e,set:e}),Object.defineProperty(o().createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(o().createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(o().createElement("audio"),"innerHTML",{get:e,set:e})}catch(t){return!1}return!0},xo.supportsNativeTextTracks=function(){return mn||fn&&on},xo.supportsNativeVideoTracks=function(){return!(!xo.TEST_VID||!xo.TEST_VID.videoTracks)},xo.supportsNativeAudioTracks=function(){return!(!xo.TEST_VID||!xo.TEST_VID.audioTracks)},xo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function(e){var t=e[0],n=e[1];Ao(xo.prototype,t,(function(){return xo[n]()}),!0)})),xo.prototype.featuresVolumeControl=xo.canControlVolume(),xo.prototype.movingMediaElementInDOM=!fn,xo.prototype.featuresFullscreenResize=!0,xo.prototype.featuresProgressEvents=!0,xo.prototype.featuresTimeupdateEvents=!0,xo.prototype.featuresVideoFrameCallback=!(!xo.TEST_VID||!xo.TEST_VID.requestVideoFrameCallback),xo.patchCanPlayType=function(){tn>=4&&!rn&&!on&&(bo=xo.TEST_VID&&xo.TEST_VID.constructor.prototype.canPlayType,xo.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":bo.call(this,e)})},xo.unpatchCanPlayType=function(){var e=xo.TEST_VID.constructor.prototype.canPlayType;return bo&&(xo.TEST_VID.constructor.prototype.canPlayType=bo),e},xo.patchCanPlayType(),xo.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(t){}}()}},xo.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(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){xo.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){xo.prototype["set"+Dr(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){xo.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){xo.prototype["set"+Dr(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){xo.prototype[e]=function(){return this.el_[e]()}})),Pi.withSourceHandlers(xo),xo.nativeSourceHandler={},xo.nativeSourceHandler.canPlayType=function(e){try{return xo.TEST_VID.canPlayType(e)}catch(t){return""}},xo.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return xo.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=vi(e.src);return xo.nativeSourceHandler.canPlayType("video/"+n)}return""},xo.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},xo.nativeSourceHandler.dispose=function(){},xo.registerSourceHandler(xo.nativeSourceHandler),Pi.registerTech("Html5",xo);var Po=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Io={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Oo=["tiny","xsmall","small","medium","large","xlarge","huge"],Ro={};Oo.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Ro[e]="vjs-layout-"+t}));var Lo={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},No=function(e){function t(n,r,i){var a;if(n.id=n.id||r.id||"vjs_video_"+ir(),(r=Wt(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"===typeof n.closest){var s=n.closest("[lang]");s&&s.getAttribute&&(r.language=s.getAttribute("lang"))}else for(var u=n;u&&1===u.nodeType;){if(On(u).hasOwnProperty("lang")){r.language=u.getAttribute("lang");break}u=u.parentNode}if((a=e.call(this,null,r,i)||this).boundDocumentFullscreenChange_=function(e){return a.documentFullscreenChange_(e)},a.boundFullWindowOnEscKey_=function(e){return a.fullWindowOnEscKey(e)},a.boundUpdateStyleEl_=function(e){return a.updateStyleEl_(e)},a.boundApplyInitTime_=function(e){return a.applyInitTime_(e)},a.boundUpdateCurrentBreakpoint_=function(e){return a.updateCurrentBreakpoint_(e)},a.boundHandleTechClick_=function(e){return a.handleTechClick_(e)},a.boundHandleTechDoubleClick_=function(e){return a.handleTechDoubleClick_(e)},a.boundHandleTechTouchStart_=function(e){return a.handleTechTouchStart_(e)},a.boundHandleTechTouchMove_=function(e){return a.handleTechTouchMove_(e)},a.boundHandleTechTouchEnd_=function(e){return a.handleTechTouchEnd_(e)},a.boundHandleTechTap_=function(e){return a.handleTechTap_(e)},a.isFullscreen_=!1,a.log=qt(a.id_),a.fsApi_=Nt,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,a.debugEnabled_=!1,a.audioOnlyMode_=!1,a.audioPosterMode_=!1,a.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=n,a.tagAttributes=n&&On(n),a.language(a.options_.language),r.languages){var l={};Object.getOwnPropertyNames(r.languages).forEach((function(e){l[e.toLowerCase()]=r.languages[e]})),a.languages_=l}else a.languages_=t.prototype.options_.languages;a.resetCache_(),a.poster_=r.poster||"",a.controls_=!!r.controls,n.controls=!1,n.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],n.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),r.plugins&&Object.keys(r.plugins).forEach((function(e){if("function"!==typeof a[e])throw new Error('plugin "'+e+'" does not exist')})),a.scrubbing_=!1,a.el_=a.createEl(),Or((0,c.A)(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&(dr(o(),a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.boundUpdateStyleEl_);var d=Mr(a.options_);r.plugins&&Object.keys(r.plugins).forEach((function(e){a[e](r.plugins[e])})),r.debug&&a.debug(!0),a.options_.playerOptions=d,a.middleware_=[],a.playbackRates(r.playbackRates),a.initChildren(),a.isAudio("audio"===n.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),dn&&a.addClass("vjs-touch-enabled"),fn||a.addClass("vjs-workinghover"),t.players[a.id_]=(0,c.A)(a);var p=It.split(".")[0];return a.addClass("vjs-v"+p),a.userActive(!0),a.reportUserActivity(),a.one("play",(function(e){return a.listenForUserActivity_(e)})),a.on("stageclick",(function(e){return a.handleStageClick_(e)})),a.on("keydown",(function(e){return a.handleKeyDown(e)})),a.on("languagechange",(function(e){return a.handleLanguagechange(e)})),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a.on("ready",(function(){a.audioPosterMode(a.options_.audioPosterMode),a.audioOnlyMode(a.options_.audioOnlyMode)})),a}(0,d.A)(t,e);var n=t.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),pr(o(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),pr(o(),"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),Oi[this.id()]=null,xi.names.forEach((function(e){var t=xi[e],r=n[t.getterName]();r&&r.off&&r.off()})),e.prototype.dispose.call(this,{restoreEl:this.options_.restoreEl})},n.createEl=function(){var t,n=this.tag,r=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),a="video-js"===this.tag.tagName.toLowerCase();r?t=this.el_=n.parentNode:a||(t=this.el_=e.prototype.createEl.call(this,"div"));var s=On(n);if(a){for(t=this.el_=n,n=this.tag=o().createElement("video");t.children.length;)n.appendChild(t.firstChild);Cn(t,"video-js")||An(t,"video-js"),t.appendChild(n),r=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{n[e]=t[e]}catch(r){}}))}if(n.setAttribute("tabindex","-1"),s.tabindex="-1",(un||on&&cn)&&(n.setAttribute("role","application"),s.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach((function(e){a&&"class"===e||t.setAttribute(e,s[e]),a&&n.setAttribute(e,s[e])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==i().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=tr("vjs-styles-dimensions");var u=Xn(".vjs-styles-defaults"),l=Xn("head");l.insertBefore(this.styleEl_,u?u.nextSibling:l.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var c=n.getElementsByTagName("a"),d=0;d<c.length;d++){var p=c.item(d);An(p,"vjs-hidden"),p.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!r&&n.parentNode.insertBefore(t,n),En(n,t),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=t,t},n.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):Bt.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)?Bt.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},n.fluid=function(e){var t,n,r=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,kr(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){r.on(["playerreset","resize"],r.boundUpdateStyleEl_)},kr(t=this)?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},n.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},n.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},n.updateStyleEl_=function(){if(!0!==i().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(":"),a=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/a:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*a,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),nr(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: "+100*a+"%;\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=Dr(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(Pi.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var a=this.autoplay();("string"===typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(a=!1);var o={source:t,autoplay:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};xi.names.forEach((function(e){var t=xi[e];o[t.getterName]=n[t.privateName]})),Wt(o,this.options_[r]),Wt(o,this.options_[i]),Wt(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 s=Pi.getTech(e);if(!s)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new s(o),this.tech_.ready(_r(this,this.handleTechReady_),!0),Jr(this.textTracksJson_||[],this.tech_),Po.forEach((function(e){n.on(n.tech_,e,(function(t){return n["handleTech"+Dr(e)+"_"](t)}))})),Object.keys(Io).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Io[e]+"_"].bind(n),event:t}):n["handleTech"+Io[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",(function(e){return n.handleTechLoadStart_(e)})),this.on(this.tech_,"sourceset",(function(e){return n.handleTechSourceset_(e)})),this.on(this.tech_,"waiting",(function(e){return n.handleTechWaiting_(e)})),this.on(this.tech_,"ended",(function(e){return n.handleTechEnded_(e)})),this.on(this.tech_,"seeking",(function(e){return n.handleTechSeeking_(e)})),this.on(this.tech_,"play",(function(e){return n.handleTechPlay_(e)})),this.on(this.tech_,"firstplay",(function(e){return n.handleTechFirstPlay_(e)})),this.on(this.tech_,"pause",(function(e){return n.handleTechPause_(e)})),this.on(this.tech_,"durationchange",(function(e){return n.handleTechDurationChange_(e)})),this.on(this.tech_,"fullscreenchange",(function(e,t){return n.handleTechFullscreenChange_(e,t)})),this.on(this.tech_,"fullscreenerror",(function(e,t){return n.handleTechFullscreenError_(e,t)})),this.on(this.tech_,"enterpictureinpicture",(function(e){return n.handleTechEnterPictureInPicture_(e)})),this.on(this.tech_,"leavepictureinpicture",(function(e){return n.handleTechLeavePictureInPicture_(e)})),this.on(this.tech_,"error",(function(e){return n.handleTechError_(e)})),this.on(this.tech_,"posterchange",(function(e){return n.handleTechPosterChange_(e)})),this.on(this.tech_,"textdata",(function(e){return n.handleTechTextData_(e)})),this.on(this.tech_,"ratechange",(function(e){return n.handleTechRateChange_(e)})),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||En(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e=this;xi.names.forEach((function(t){var n=xi[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=Qr(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&&Bt.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_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},n.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},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_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":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(Kr(r))return r.catch((function(e){throw n(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(e||""))}))};if("any"!==e||this.muted()?n="muted"!==e||this.muted()?this.play():r():Kr(n=this.play())&&(n=n.catch(r)),Kr(n))return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(){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 a=r[i];if(a.type&&a.src&&a.src===t)return a.type}return qi(t)}(this,t)),this.cache_.source=Mr({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),i=[],a=this.$$("source"),o=[],s=0;s<a.length;s++){var u=On(a[s]);i.push(u),u.src&&u.src===t&&o.push(u.src)}o.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&&(Bt.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.removeClass("vjs-waiting"),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){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"===typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?$r(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.cancelable&&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=o()[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){var n=this;t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(function(){n.removeClass("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:[],playbackRates:[],volume:1}},n.techCall_=function(e,t){this.ready((function(){if(e in Mi)return function(e,t,n,r){return t[n](e.reduce(Fi(n),r))}(this.middleware_,this.tech_,e,t);if(e in Ui)return Ni(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(n){throw Bt(n),n}}),!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in Di)return function(e,t,n){return e.reduceRight(Fi(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Ui)return Ni(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw Bt("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw Bt("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw Bt(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||i().Promise;return t?new t((function(t){e.play_(t)})):this.play_()},n.play_=function(e){var t=this;void 0===e&&(e=$r),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),r=Boolean(mn||fn);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&&r&&this.load());var i=this.techGet_("play");r&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===i?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(i)},n.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},n.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||Vr(0,0)},n.scrubbing=function(e){if("undefined"===typeof e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},n.currentTime=function(e){return"undefined"!==typeof 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.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(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=Vr(0,0)),e},n.bufferedPercent=function(){return Wr(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||i().Promise;if(t){var n=this;return new t((function(t,r){function i(){n.off("fullscreenerror",o),n.off("fullscreenchange",a)}function a(){i(),t()}function o(e,t){i(),r(t)}n.one("fullscreenchange",a),n.one("fullscreenerror",o);var s=n.requestFullscreenHelper_(e);s&&(s.then(i,i),s.then(t,r))}))}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()&&!0===!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var e=this.options_.Promise||i().Promise;if(e){var t=this;return new e((function(e,n){function r(){t.off("fullscreenerror",a),t.off("fullscreenchange",i)}function i(){r(),e()}function a(e,t){r(),n(t)}t.one("fullscreenchange",i),t.one("fullscreenerror",a);var o=t.exitFullscreenHelper_();o&&(o.then(r,r),o.then(e,n))}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=o()[this.fsApi_.exitFullscreen]();return t&&$r(t.then((function(){return e.isFullscreen(!1)}))),t}this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},n.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=o().documentElement.style.overflow,dr(o(),"keydown",this.boundFullWindowOnEscKey_),o().documentElement.style.overflow="hidden",An(o().body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){l().isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,pr(o(),"keydown",this.boundFullWindowOnEscKey_),o().documentElement.style.overflow=this.docOrigOverflow,xn(o().body,"vjs-full-window"),this.trigger("exitFullWindow")},n.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},n.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},n.requestPictureInPicture=function(){if("pictureInPictureEnabled"in o()&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in o())return o().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 l().isEventKey(e,"f")}:n,i=t.muteKey,a=void 0===i?function(e){return l().isEventKey(e,"m")}:i,s=t.playPauseKey,u=void 0===s?function(e){return l().isEventKey(e,"k")||l().isEventKey(e,"Space")}:s;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();var c=qr.getComponent("FullscreenToggle");!1!==o()[this.fsApi_.fullscreenEnabled]&&c.prototype.handleClick.call(this,e)}else if(a.call(this,e)){e.preventDefault(),e.stopPropagation(),qr.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(u.call(this,e)){e.preventDefault(),e.stopPropagation(),qr.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],a=Pi.getTech(i);if(a||(a=qr.getComponent(i)),a){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else Bt.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,Pi.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(Bt.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},a=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=a,function(e,n){return t(n,e)})):i(r,e,a))||!1},n.handleSrc_=function(e,t){var n=this;if("undefined"===typeof e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var r=Hi(e);if(r.length){if(this.changingSrc_=!0,t||(this.cache_.sources=r),this.updateSourceCaches_(r[0]),Li(this,r[0],(function(e,i){var a,o;if(n.middleware_=i,t||(n.cache_.sources=r),n.updateSourceCaches_(e),n.src_(e))return r.length>1?n.handleSrc_(r.slice(1)):(n.changingSrc_=!1,n.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void n.triggerReady());a=i,o=n.tech_,a.forEach((function(e){return e.setTech&&e.setTech(o)}))})),this.options_.retryOnError&&r.length>1){var i=function(){n.error(null),n.handleSrc_(r.slice(1),!0)},a=function(){n.off("error",i)};this.one("error",i),this.one("playing",a),this.resetRetryOnError_=function(){n.off("error",i),n.off("playing",a)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)},n.src=function(e){return this.handleSrc_(e,!1)},n.src_=function(e){var t,n,r=this,i=this.selectSource([e]);return!i||(t=i.tech,n=this.techName_,Dr(t)!==Dr(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||i().Promise;this.paused()||!t?this.doReset_():$r(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_(),kr(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)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"===typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t="undefined"===typeof 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){var t=this;if(void 0===e)return this.error_||null;if(Rt("beforeerror").forEach((function(n){var r=n(t,e);Gt(r)&&!Array.isArray(r)||"string"===typeof r||"number"===typeof r||null===r?e=r:t.log.error("please return a value that MediaError expects in beforeerror hooks")})),this.options_.suppressNotSupportedError&&e&&4===e.code){var n=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],n),void this.one("loadstart",(function(){this.off(["click","touchstart"],n)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Gr(e),this.addClass("vjs-error"),Bt.error("(CODE:"+this.error_.code+" "+Gr.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),Rt("error").forEach((function(e){return e(t,t.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=_r(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 a,o=this.getChild("controlBar");!o||fn||en||(o.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),o.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(a);var e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},n.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},n.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},n.enableAudioOnlyUI_=function(){var e=this;this.addClass("vjs-audio-only-mode");var t=this.children(),n=this.getChild("ControlBar"),r=n&&n.currentHeight();t.forEach((function(t){t!==n&&t.el_&&!t.hasClass("vjs-hidden")&&(t.hide(),e.audioOnlyCache_.hiddenChildren.push(t))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(r),this.trigger("audioonlymodechange")},n.disableAudioOnlyUI_=function(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach((function(e){return e.show()})),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")},n.audioOnlyMode=function(e){var t=this;if("boolean"!==typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;this.audioOnlyMode_=e;var n=this.options_.Promise||i().Promise;if(n){if(e){var r=[];return this.isInPictureInPicture()&&r.push(this.exitPictureInPicture()),this.isFullscreen()&&r.push(this.exitFullscreen()),this.audioPosterMode()&&r.push(this.audioPosterMode(!1)),n.all(r).then((function(){return t.enableAudioOnlyUI_()}))}return n.resolve().then((function(){return t.disableAudioOnlyUI_()}))}e?(this.isInPictureInPicture()&&this.exitPictureInPicture(),this.isFullscreen()&&this.exitFullscreen(),this.enableAudioOnlyUI_()):this.disableAudioOnlyUI_()},n.enablePosterModeUI_=function(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},n.disablePosterModeUI_=function(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},n.audioPosterMode=function(e){var t=this;if("boolean"!==typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;this.audioPosterMode_=e;var n=this.options_.Promise||i().Promise;return n?e?this.audioOnlyMode()?this.audioOnlyMode(!1).then((function(){t.enablePosterModeUI_()})):n.resolve().then((function(){t.enablePosterModeUI_()})):n.resolve().then((function(){t.disablePosterModeUI_()})):e?(this.audioOnlyMode()&&this.audioOnlyMode(!1),void this.enablePosterModeUI_()):void this.disablePosterModeUI_()},n.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},n.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},n.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},n.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},n.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},n.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},n.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),kr(this)&&this.trigger("languagechange"))},n.languages=function(){return Mr(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=Mr(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];(r=Mr(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 ei(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<Oo.length;n++){var r=Oo[n];if(t<=this.breakpoints_[r]){if(e===r)return;e&&this.removeClass(Ro[e]),this.addClass(Ro[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_=Wt({},Lo,e),this.updateCurrentBreakpoint_()),Wt(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.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},n.currentBreakpoint=function(){return this.breakpoint_},n.currentBreakpointClass=function(){return Ro[this.breakpoint_]||""},n.loadMedia=function(e,t){var n=this;if(e&&"object"===typeof e){this.reset(),this.cache_.media=Mr(e);var r=this.cache_.media,i=r.artwork,a=r.poster,o=r.src,s=r.textTracks;!i&&a&&(this.cache_.media.artwork=[{src:a,type:qi(a)}]),o&&this.src(o),a&&this.poster(a),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:qi(t.poster)}]),t}return Mr(this.cache_.media)},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=On(e),r=n["data-setup"];if(Cn(e,"vjs-fill")&&(n.fill=!0),Cn(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=h()(r||"{}"),a=i[0],o=i[1];a&&Bt.error(a),Wt(n,o)}if(Wt(t,n),e.hasChildNodes())for(var s=e.childNodes,u=0,l=s.length;u<l;u++){var c=s[u],d=c.nodeName.toLowerCase();"source"===d?t.sources.push(On(c)):"track"===d&&t.tracks.push(On(c))}return t},n.flexNotSupported_=function(){var e=o().createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},n.debug=function(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},n.playbackRates=function(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((function(e){return"number"===typeof e}))&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))},t}(qr);xi.names.forEach((function(e){var t=xi[e];No.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),No.prototype.crossorigin=No.prototype.crossOrigin,No.players={};var Do=i().navigator;No.prototype.options_={techOrder:Pi.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Do&&(Do.languages&&Do.languages[0]||Do.userLanguage||Do.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){No.prototype[e]=function(){return this.techGet_(e)}})),Po.forEach((function(e){No.prototype["handleTech"+Dr(e)+"_"]=function(){return this.trigger(e)}})),qr.registerComponent("Player",No);var Mo="plugin",Uo="activePlugins_",Fo={},jo=function(e){return Fo.hasOwnProperty(e)},Bo=function(e){return jo(e)?Fo[e]:void 0},qo=function(e,t){e[Uo]=e[Uo]||{},e[Uo][t]=!0},Ho=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(){Ho(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 a=(0,y.A)(t,[this].concat(r));return this[e]=function(){return a},Ho(this,a.getEventHash()),a}},Vo=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,this.log||(this.log=this.player.log.createLogger(this.name)),Or(this),delete this.trigger,Lr(this,this.constructor.defaultState),qo(t,this.name),this.dispose=this.dispose.bind(this),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={}),hr(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[Uo][e]=!1,this.player=this.state=null,t[e]=zo(e,Fo[e])},e.isBasic=function(t){var n="string"===typeof t?Bo(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(jo(t))Bt.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(No.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 Fo[t]=n,t!==Mo&&(e.isBasic(n)?No.prototype[t]=function(e,t){var n=function(){Ho(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return qo(this,e),Ho(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):No.prototype[t]=zo(t,n)),n},e.deregisterPlugin=function(e){if(e===Mo)throw new Error("Cannot de-register base plugin.");jo(e)&&(delete Fo[e],delete No.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(Fo)),e.forEach((function(e){var n=Bo(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=Bo(e);return t&&t.VERSION||""},e}();Vo.getPlugin=Bo,Vo.BASE_PLUGIN_NAME=Mo,Vo.registerPlugin(Mo,Vo),No.prototype.usingPlugin=function(e){return!!this[Uo]&&!0===this[Uo][e]},No.prototype.hasPlugin=function(e){return!!jo(e)};var Wo=!1,Go=function(e){return 0===e.indexOf("#")?e.slice(1):e};function Xo(e,t,n){var r=Xo.getPlayer(e);if(r)return t&&Bt.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"===typeof e?Xn("#"+Go(e)):e;if(!bn(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");i.ownerDocument.defaultView&&i.ownerDocument.body.contains(i)||Bt.warn("The element supplied is not included in the DOM"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(i.parentNode&&i.parentNode.hasAttribute("data-vjs-player")?i.parentNode:i).cloneNode(!0)),Rt("beforesetup").forEach((function(e){var n=e(i,Mr(t));Gt(n)&&!Array.isArray(n)?t=Mr(t,n):Bt.error("please return an object in beforesetup hooks")}));var a=qr.getComponent("Player");return r=new a(i,t,n),Rt("setup").forEach((function(e){return e(r)})),r}if(Xo.hooks_=Ot,Xo.hooks=Rt,Xo.hook=function(e,t){Rt(e,t)},Xo.hookOnce=function(e,t){Rt(e,[].concat(t).map((function(t){return function n(){return Lt(e,n),t.apply(void 0,arguments)}})))},Xo.removeHook=Lt,!0!==i().VIDEOJS_NO_DYNAMIC_STYLE&&_n()){var Ko=Xn(".vjs-styles-defaults");if(!Ko){Ko=tr("vjs-styles-defaults");var $o=Xn("head");$o&&$o.insertBefore(Ko,$o.firstChild),nr(Ko,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: 56.25%\n }\n ")}}Jn(1,Xo),Xo.VERSION=It,Xo.options=No.prototype.options_,Xo.getPlayers=function(){return No.players},Xo.getPlayer=function(e){var t,n=No.players;if("string"===typeof e){var r=Go(e),i=n[r];if(i)return i;t=Xn("#"+r)}else t=e;if(bn(t)){var a=t,o=a.player,s=a.playerId;if(o||n[s])return o||n[s]}},Xo.getAllPlayers=function(){return Object.keys(No.players).map((function(e){return No.players[e]})).filter(Boolean)},Xo.players=No.players,Xo.getComponent=qr.getComponent,Xo.registerComponent=function(e,t){Pi.isTech(t)&&Bt.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),qr.registerComponent.call(qr,e,t)},Xo.getTech=Pi.getTech,Xo.registerTech=Pi.registerTech,Xo.use=function(e,t){Ii[e]=Ii[e]||[],Ii[e].push(t)},Object.defineProperty(Xo,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Xo.middleware,"TERMINATOR",{value:Ri,writeable:!1,enumerable:!0}),Xo.browser=gn,Xo.TOUCH_ENABLED=dn,Xo.extend=function(e,t){void 0===t&&(t={}),Wo||(Bt.warn("videojs.extend is deprecated as of Video.js 7.22.0 and will be removed in Video.js 8.0.0"),Wo=!0);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),(0,_.A)(n,e),e&&(n.super_=e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},Xo.mergeOptions=Mr,Xo.bind=_r,Xo.registerPlugin=Vo.registerPlugin,Xo.deregisterPlugin=Vo.deregisterPlugin,Xo.plugin=function(e,t){return Bt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Vo.registerPlugin(e,t)},Xo.getPlugins=Vo.getPlugins,Xo.getPlugin=Vo.getPlugin,Xo.getPluginVersion=Vo.getPluginVersion,Xo.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),Xo.options.languages=Mr(Xo.options.languages,((n={})[e]=t,n)),Xo.options.languages[e]},Xo.log=Bt,Xo.createLogger=qt,Xo.createTimeRange=Xo.createTimeRanges=Vr,Xo.formatTime=aa,Xo.setFormatTime=function(e){ia=e},Xo.resetFormatTime=function(){ia=ra},Xo.parseUrl=mi,Xo.isCrossOrigin=yi,Xo.EventTarget=wr,Xo.on=dr,Xo.one=fr,Xo.off=pr,Xo.trigger=hr,Xo.xhr=m(),Xo.TextTrack=Ti,Xo.AudioTrack=ki,Xo.VideoTrack=Si,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){Xo[e]=function(){return Bt.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),$n[e].apply(null,arguments)}})),Xo.computedStyle=Kt,Xo.dom=$n,Xo.url=_i,Xo.defineLazyProperty=Ao,Xo.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});var Yo=k,Qo=function(e,t,n){return e&&n&&n.responseURL&&t!==n.responseURL?n.responseURL:t},Jo=function(e){return Xo.log.debug?Xo.log.debug.bind(Xo,"VHS:",e+" >"):function(){}},Zo=1/30,es=.1,ts=function(e,t){var n,r=[];if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&r.push([e.start(n),e.end(n)]);return Xo.createTimeRanges(r)},ns=function(e,t){return ts(e,(function(e,n){return e-es<=t&&n+es>=t}))},rs=function(e,t){return ts(e,(function(e){return e-Zo>=t}))},is=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(", ")},as=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},os=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},ss=function(e,t){var n=0;if(!e||!e.length)return n;for(var r=0;r<e.length;r++){var i=e.start(r),a=e.end(r);t>a||(n+=t>i&&t<=a?a-t:a-i)}return n},us=Xo.createTimeRange,ls=function(e,t){if(!t.preload)return t.duration;var n=0;return(t.parts||[]).forEach((function(e){n+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(n+=e.partTargetDuration)})),n},cs=function(e){return(e.segments||[]).reduce((function(e,t,n){return t.parts?t.parts.forEach((function(r,i){e.push({duration:r.duration,segmentIndex:n,partIndex:i,part:r,segment:t})})):e.push({duration:t.duration,segmentIndex:n,partIndex:null,segment:t,part:null}),e}),[])},ds=function(e){var t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},ps=function(e){var t=e.preloadSegment;if(t){var n=t.parts,r=(t.preloadHints||[]).reduce((function(e,t){return e+("PART"===t.type?1:0)}),0);return r+=n&&n.length?n.length:0}},hs=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var n=ds(t).length>0;return n&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:n&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},fs=function(e,t,n){if("undefined"===typeof t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var r=function(e,t){var n=0,r=t-e.mediaSequence,i=e.segments[r];if(i){if("undefined"!==typeof i.start)return{result:i.start,precise:!0};if("undefined"!==typeof i.end)return{result:i.end-i.duration,precise:!0}}for(;r--;){if("undefined"!==typeof(i=e.segments[r]).end)return{result:n+i.end,precise:!0};if(n+=ls(e,i),"undefined"!==typeof i.start)return{result:n+i.start,precise:!0}}return{result:n,precise:!1}}(e,t);if(r.precise)return r.result;var i=function(e,t){for(var n,r=0,i=t-e.mediaSequence;i<e.segments.length;i++){if("undefined"!==typeof(n=e.segments[i]).start)return{result:n.start-r,precise:!0};if(r+=ls(e,n),"undefined"!==typeof n.end)return{result:n.end-r,precise:!0}}return{result:-1,precise:!1}}(e,t);return i.precise?i.result:r.result+n},ms=function(e,t,n){if(!e)return 0;if("number"!==typeof n&&(n=0),"undefined"===typeof t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return i()[1/0]}return fs(e,t,n)},gs=function(e){var t=e.defaultDuration,n=e.durationList,r=e.startIndex,i=e.endIndex,a=0;if(r>i){var o=[i,r];r=o[0],i=o[1]}if(r<0){for(var s=r;s<Math.min(0,i);s++)a+=t;r=0}for(var u=r;u<i;u++)a+=n[u].duration;return a},vs=function(e,t,n,r){if(!e||!e.segments)return null;if(e.endList)return ms(e);if(null===t)return null;t=t||0;var i=fs(e,e.mediaSequence+e.segments.length,t);return n&&(i-=r="number"===typeof r?r:hs(null,e)),Math.max(0,i)},ys=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},_s=function(e){return e.excludeUntil&&e.excludeUntil===1/0},bs=function(e){var t=ys(e);return!e.disabled&&!t},ws=function(e,t){return t.attributes&&t.attributes[e]},Ts=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!!bs(e)&&(e.attributes.BANDWIDTH||0)<n})).length},ks=function(e,t){return!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri))))},Ss=function(e,t){var n=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{},r=!1;for(var i in n){for(var a in n[i])if(r=t(n[i][a]))break;if(r)break}return!!r},Es=function(e){if(!e||!e.playlists||!e.playlists.length)return Ss(e,(function(e){return e.playlists&&e.playlists.length||e.uri}));for(var t=function(t){var n=e.playlists[t],r=n.attributes&&n.attributes.CODECS;return r&&r.split(",").every((function(e){return q(e)}))||Ss(e,(function(e){return ks(n,e)}))?"continue":{v:!1}},n=0;n<e.playlists.length;n++){var r=t(n);if("continue"!==r&&"object"===typeof r)return r.v}return!0},Cs={liveEdgeDelay:hs,duration:ms,seekable:function(e,t,n){var r=t||0,i=vs(e,t,!0,n);return null===i?us():us(r,i)},getMediaInfoForTime:function(e){for(var t=e.playlist,n=e.currentTime,r=e.startingSegmentIndex,i=e.startingPartIndex,a=e.startTime,o=e.experimentalExactManifestTimings,s=n-a,u=cs(t),l=0,c=0;c<u.length;c++){var d=u[c];if(r===d.segmentIndex&&("number"!==typeof i||"number"!==typeof d.partIndex||i===d.partIndex)){l=c;break}}if(s<0){if(l>0)for(var p=l-1;p>=0;p--){var h=u[p];if(s+=h.duration,o){if(s<0)continue}else if(s+Zo<=0)continue;return{partIndex:h.partIndex,segmentIndex:h.segmentIndex,startTime:a-gs({defaultDuration:t.targetDuration,durationList:u,startIndex:l,endIndex:p})}}return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:n}}if(l<0){for(var f=l;f<0;f++)if((s-=t.targetDuration)<0)return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:n};l=0}for(var m=l;m<u.length;m++){var g=u[m];if(s-=g.duration,o){if(s>0)continue}else if(s-Zo>=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:a+gs({defaultDuration:t.targetDuration,durationList:u,startIndex:l,endIndex:m})}}return{segmentIndex:u[u.length-1].segmentIndex,partIndex:u[u.length-1].partIndex,startTime:n}},isEnabled:bs,isDisabled:function(e){return e.disabled},isBlacklisted:ys,isIncompatible:_s,playlistEnd:vs,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:ws,estimateSegmentRequestTime:function(e,t,n,r){return void 0===r&&(r=0),ws("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*r)/t:NaN},isLowestEnabledRendition:Ts,isAudioOnly:Es,playlistMatch:ks,segmentDurationWithParts:ls},As=Xo.log,xs=function(e,t){return e+"-"+t},Ps=function(e,t,n){return"placeholder-uri-"+e+"-"+t+"-"+n},Is=function(e,t){e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((function(n){if(e.mediaGroups[n])for(var r in e.mediaGroups[n])for(var i in e.mediaGroups[n][r]){var a=e.mediaGroups[n][r][i];t(a,n,r,i)}}))},Os=function(e){var t=e.playlist,n=e.uri,r=e.id;t.id=r,t.playlistErrors_=0,n&&(t.uri=n),t.attributes=t.attributes||{}},Rs=function(e,t,n){void 0===n&&(n=Ps),e.uri=t;for(var r=0;r<e.playlists.length;r++)if(!e.playlists[r].uri){var i="placeholder-uri-"+r;e.playlists[r].uri=i}var a=Es(e);Is(e,(function(t,r,i,o){if(!t.playlists||!t.playlists.length){if(a&&"AUDIO"===r&&!t.uri)for(var u=0;u<e.playlists.length;u++){var l=e.playlists[u];if(l.attributes&&l.attributes.AUDIO&&l.attributes.AUDIO===i)return}t.playlists=[(0,s.A)({},t)]}t.playlists.forEach((function(t,a){var s=n(r,i,o,t),u=xs(a,s);t.uri?t.resolvedUri=t.resolvedUri||Yo(e.uri,t.uri):(t.uri=0===a?s:u,t.resolvedUri=t.uri),t.id=t.id||u,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];Os({playlist:n,id:xs(t,n.uri)}),n.resolvedUri=Yo(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||As.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){Is(e,(function(t){t.uri&&(t.resolvedUri=Yo(e.uri,t.uri))}))}(e)},Ls=Xo.mergeOptions,Ns=Xo.EventTarget,Ds=function(e,t){if(!e)return t;var n=Ls(e,t);if(e.preloadHints&&!t.preloadHints&&delete n.preloadHints,e.parts&&!t.parts)delete n.parts;else if(e.parts&&t.parts)for(var r=0;r<t.parts.length;r++)e.parts&&e.parts[r]&&(n.parts[r]=Ls(e.parts[r],t.parts[r]));return!e.skipped&&t.skipped&&(n.skipped=!1),e.preload&&!t.preload&&(n.preload=!1),n},Ms=function(e,t){!e.resolvedUri&&e.uri&&(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.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=Yo(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((function(e){e.resolvedUri||(e.resolvedUri=Yo(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((function(e){e.resolvedUri||(e.resolvedUri=Yo(t,e.uri))}))},Us=function(e){var t=e.segments||[],n=e.preloadSegment;if(n&&n.parts&&n.parts.length){if(n.preloadHints)for(var r=0;r<n.preloadHints.length;r++)if("MAP"===n.preloadHints[r].type)return t;n.duration=e.targetDuration,n.preload=!0,t.push(n)}return t},Fs=function(e,t){return e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment},js=function(e,t,n){void 0===n&&(n=Fs);var r=Ls(e,{}),i=r.playlists[t.id];if(!i)return null;if(n(i,t))return null;t.segments=Us(t);var a=Ls(i,t);if(a.preloadSegment&&!t.preloadSegment&&delete a.preloadSegment,i.segments){if(t.skip){t.segments=t.segments||[];for(var o=0;o<t.skip.skippedSegments;o++)t.segments.unshift({skipped:!0})}a.segments=function(e,t,n){var r=e.slice(),i=t.slice();n=n||0;for(var a,o=[],s=0;s<i.length;s++){var u=r[s+n],l=i[s];u?(a=u.map||a,o.push(Ds(u,l))):(a&&!l.map&&(l.map=a),o.push(l))}return o}(i.segments,t.segments,t.mediaSequence-i.mediaSequence)}a.segments.forEach((function(e){Ms(e,a.resolvedUri)}));for(var s=0;s<r.playlists.length;s++)r.playlists[s].id===t.id&&(r.playlists[s]=a);return r.playlists[t.id]=a,r.playlists[t.uri]=a,Is(e,(function(e,n,r,i){if(e.playlists)for(var o=0;o<e.playlists.length;o++)t.id===e.playlists[o].id&&(e.playlists[o]=a)})),r},Bs=function(e,t){var n=e.segments||[],r=n[n.length-1],i=r&&r.parts&&r.parts[r.parts.length-1],a=i&&i.duration||r&&r.duration;return t&&a?1e3*a:500*(e.partTargetDuration||e.targetDuration||10)},qs=function(e){function t(t,n,r){var i;if(void 0===r&&(r={}),i=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");i.logger_=Jo("PlaylistLoader");var a=r,o=a.withCredentials,s=void 0!==o&&o,u=a.handleManifestRedirects,l=void 0!==u&&u;i.src=t,i.vhs_=n,i.withCredentials=s,i.handleManifestRedirects=l;var d=n.options_;return i.customTagParsers=d&&d.customTagParsers||[],i.customTagMappers=d&&d.customTagMappers||[],i.experimentalLLHLS=d&&d.experimentalLLHLS||!1,Xo.browser.IE_VERSION&&(i.experimentalLLHLS=!1),i.state="HAVE_NOTHING",i.handleMediaupdatetimeout_=i.handleMediaupdatetimeout_.bind((0,c.A)(i)),i.on("mediaupdatetimeout",i.handleMediaupdatetimeout_),i}(0,d.A)(t,e);var n=t.prototype;return n.handleMediaupdatetimeout_=function(){var e=this;if("HAVE_METADATA"===this.state){var t=this.media(),n=Yo(this.master.uri,t.uri);this.experimentalLLHLS&&(n=function(e,t){if(t.endList||!t.serverControl)return e;var n={};if(t.serverControl.canBlockReload){var r=t.preloadSegment,a=t.mediaSequence+t.segments.length;if(r){var o=r.parts||[],s=ps(t)-1;s>-1&&s!==o.length-1&&(n._HLS_part=s),(s>-1||o.length)&&a--}n._HLS_msn=a}if(t.serverControl&&t.serverControl.canSkipUntil&&(n._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(n).length){var u=new(i().URL)(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){n.hasOwnProperty(e)&&u.searchParams.set(e,n[e])})),e=u.toString()}return e}(n,t)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:n,withCredentials:this.withCredentials},(function(t,n){if(e.request)return t?e.playlistRequestError(e.request,e.media(),"HAVE_METADATA"):void e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})}))}},n.playlistRequestError=function(e,t,n){var r=t.uri,i=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[i],status:e.status,message:"HLS playlist request error at URL: "+r+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},n.parseManifest_=function(e){var t=this,n=e.url;return function(e){var t=e.onwarn,n=e.oninfo,r=e.manifestString,i=e.customTagParsers,a=void 0===i?[]:i,o=e.customTagMappers,s=void 0===o?[]:o,u=e.experimentalLLHLS,l=new D;t&&l.on("warn",t),n&&l.on("info",n),a.forEach((function(e){return l.addParser(e)})),s.forEach((function(e){return l.addTagMapper(e)})),l.push(r),l.end();var c=l.manifest;if(u||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){c.hasOwnProperty(e)&&delete c[e]})),c.segments&&c.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!c.targetDuration){var d=10;c.segments&&c.segments.length&&(d=c.segments.reduce((function(e,t){return Math.max(e,t.duration)}),0)),t&&t("manifest has no targetDuration defaulting to "+d),c.targetDuration=d}var p=ds(c);if(p.length&&!c.partTargetDuration){var h=p.reduce((function(e,t){return Math.max(e,t.duration)}),0);t&&(t("manifest has no partTargetDuration defaulting to "+h),As.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),c.partTargetDuration=h}return c}({onwarn:function(e){var r=e.message;return t.logger_("m3u8-parser warn for "+n+": "+r)},oninfo:function(e){var r=e.message;return t.logger_("m3u8-parser info for "+n+": "+r)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},n.haveMetadata=function(e){var t=e.playlistString,n=e.playlistObject,r=e.url,i=e.id;this.request=null,this.state="HAVE_METADATA";var a=n||this.parseManifest_({url:r,manifestString:t});a.lastRequest=Date.now(),Os({playlist:a,uri:r,id:i});var o=js(this.master,a);this.targetDuration=a.partTargetDuration||a.targetDuration,this.pendingMedia_=null,o?(this.master=o,this.media_=this.master.playlists[i]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Bs(this.media(),!!o)),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),i().clearTimeout(this.mediaUpdateTimeout),i().clearTimeout(this.finalRenditionTimeout),this.off()},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e,t){var n=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"===typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(i().clearTimeout(this.finalRenditionTimeout),t){var r=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=i().setTimeout(this.media.bind(this,e,!1),r)}else{var a=this.state,o=!this.media_||e.id!==this.media_.id,s=this.master.playlists[e.id];if(s&&s.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(o&&(this.trigger("mediachanging"),"HAVE_MASTER"===a?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(Bs(e,!0)),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.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(function(t,r){if(n.request){if(e.lastRequest=Date.now(),e.resolvedUri=Qo(n.handleManifestRedirects,e.resolvedUri,r),t)return n.playlistRequestError(n.request,e,a);n.haveMetadata({playlistString:r.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===a?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}},n.pause=function(){this.mediaUpdateTimeout&&(i().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},n.load=function(e){var t=this;this.mediaUpdateTimeout&&(i().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var n=this.media();if(e){var r=n?(n.partTargetDuration||n.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=i().setTimeout((function(){t.mediaUpdateTimeout=null,t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.updateMediaUpdateTimeout_=function(e){var t=this;this.mediaUpdateTimeout&&(i().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=i().setTimeout((function(){t.mediaUpdateTimeout=null,t.trigger("mediaupdatetimeout"),t.updateMediaUpdateTimeout_(e)}),e))},n.start=function(){var e=this;if(this.started=!0,"object"===typeof this.src)return this.src.uri||(this.src.uri=i().location.href),this.src.resolvedUri=this.src.uri,void setTimeout((function(){e.setupInitialPlaylist(e.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=Qo(e.handleManifestRedirects,e.src,n);var r=e.parseManifest_({manifestString:n.responseText,url:e.src});e.setupInitialPlaylist(r)}}))},n.srcUri=function(){return"string"===typeof this.src?this.src:this.src.uri},n.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,Rs(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments=Us(e),e.segments.forEach((function(t){Ms(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||i().location.href;this.master=function(e,t){var n=xs(0,t),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:i().location.href,resolvedUri:i().location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return r.playlists[n]=r.playlists[0],r.playlists[t]=r.playlists[0],r}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(Ns),Hs=Xo.xhr,zs=Xo.mergeOptions,Vs=function(e,t,n,r){var i="arraybuffer"===e.responseType?e.response:e.responseText;!t&&i&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=i.byteLength||i.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(i||e.responseText)))),r(t,e)},Ws=function(){var e=function e(t,n){t=zs({timeout:45e3},t);var r=e.beforeRequest||Xo.Vhs.xhr.beforeRequest;if(r&&"function"===typeof r){var i=r(t);i&&(t=i)}var a=(!0===Xo.Vhs.xhr.original?Hs:Xo.Vhs.xhr)(t,(function(e,t){return Vs(a,e,t,n)})),o=a.abort;return a.abort=function(){return a.aborted=!0,o.apply(a,arguments)},a.uri=t.uri,a.requestTime=Date.now(),a};return e.original=!0,e},Gs=function(e){var t,n={};return e.byterange&&(n.Range="bytes="+(t=e.byterange).offset+"-"+("bigint"===typeof t.offset||"bigint"===typeof t.length?i().BigInt(t.offset)+i().BigInt(t.length)-i().BigInt(1):t.offset+t.length-1)),n},Xs=function(e,t){return e.start(t)+"-"+e.end(t)},Ks=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},$s=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Ys=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];$(r)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t},Qs=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Js=function(e){return e.resolvedUri},Zs=function(e){for(var t=Array.prototype.slice.call(e),n=16,r="",i=0;i<t.length/n;i++)r+=t.slice(i*n,i*n+n).map(Ks).join("")+" "+t.slice(i*n,i*n+n).map($s).join("")+"\n";return r},eu=Object.freeze({__proto__:null,createTransferableMessage:Ys,initSegmentId:Qs,segmentKeyId:Js,hexDump:Zs,tagDump:function(e){var t=e.bytes;return Zs(t)},textRanges:function(e){var t,n="";for(t=0;t<e.length;t++)n+=Xs(e,t)+" ";return n}}),tu=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 a=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var n,r=0,i=0;i<t.segments.length&&!(e<=(r=(n=t.segments[i]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:r+n.duration));i++);var a=t.segments[t.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>r){if(e>r+.25*a.duration)return null;n=a}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:r-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(r,t);if(!a)return i({message:"valid programTime was not found"});if("estimate"===a.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var o={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,a.segment);return s&&(o.programDateTime=s.toISOString()),i(null,o)},nu=function e(t){var n=t.programTime,r=t.playlist,i=t.retryCount,a=void 0===i?2:i,o=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("undefined"===typeof n||!r||!o)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 d=function(e,t){var n;try{n=new Date(e)}catch(l){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&&(r=t.segments[i],!(n<t.segments[i+1].dateTimeObject));i++);var a,o=t.segments[t.segments.length-1],s=o.dateTimeObject,u=o.videoTimingInfo?(a=o.videoTimingInfo).transmuxedPresentationEnd-a.transmuxedPresentationStart-a.transmuxerPrependedSeconds:o.duration+.25*o.duration;return n>new Date(s.getTime()+1e3*u)?null:(n>s&&(r=o),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:Cs.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(n,r);if(!d)return c({message:n+" was not found in the stream"});var p=d.segment,h=function(e,t){var n,r;try{n=new Date(e),r=new Date(t)}catch(a){}var i=n.getTime();return(r.getTime()-i)/1e3}(p.dateTimeObject,n);if("estimate"===d.type)return 0===a?c({message:n+" is not buffered yet. Try again"}):(o(d.estimatedStart+h),void l.one("seeked",(function(){e({programTime:n,playlist:r,retryCount:a-1,seekTo:o,pauseAfterSeek:u,tech:l,callback:c})})));var f=p.start+h;l.one("seeked",(function(){return c(null,l.currentTime())})),u&&l.pause(),o(f)},ru=function(e,t){if(4===e.readyState)return t()},iu=function(e,t,n){var r,i=[],a=!1,o=function(e,t,r,i){return t.abort(),a=!0,n(e,t,r,i)},s=function(e,t){if(!a){if(e)return o(e,t,"",i);var n=t.responseText.substring(i&&i.byteLength||0,t.responseText.length);if(i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if((t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!==typeof e}))).length<=1)return Y(t[0]);var r=t.reduce((function(e,t,n){return e+(t.byteLength||t.length)}),0),i=new Uint8Array(r),a=0;return t.forEach((function(e){e=Y(e),i.set(e,a),a+=e.byteLength})),i}(i,te(n,!0)),r=r||st(i),i.length<10||r&&i.length<r+2)return ru(t,(function(){return o(e,t,"",i)}));var s=At(i);return"ts"===s&&i.length<188||!s&&i.length<376?ru(t,(function(){return o(e,t,"",i)})):o(null,t,s,i)}},u={uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){return t.total,t.loaded,Vs(e,null,{statusCode:e.status},s)}))}},l=t(u,(function(e,t){return Vs(l,e,t,s)}));return l},au=Xo.EventTarget,ou=Xo.mergeOptions,su=function(e,t){if(!Fs(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(var n=0;n<e.segments.length;n++){var r=e.segments[n],i=t.segments[n];if(r.uri!==i.uri)return!1;if(r.byterange||i.byterange){var a=r.byterange,o=i.byterange;if(a&&!o||!a&&o)return!1;if(a.offset!==o.offset||a.length!==o.length)return!1}}return!0},uu=function(e,t,n,r){return"placeholder-uri-"+e+"-"+t+"-"+(r.attributes.NAME||n)},lu=function(e,t,n){for(var r=!0,i=ou(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts}),a=0;a<t.playlists.length;a++){var o=t.playlists[a];if(o.sidx){var s=xe(o.sidx);n&&n[s]&&n[s].sidx&&we(o,n[s].sidx,o.sidx.resolvedUri)}var u=js(i,o,su);u&&(i=u,r=!1)}return Is(t,(function(e,t,n,a){if(e.playlists&&e.playlists.length){var o=e.playlists[0].id,s=js(i,e.playlists[0],su);s&&(a in(i=s).mediaGroups[t][n]||(i.mediaGroups[t][n][a]=e),i.mediaGroups[t][n][a].playlists[0]=i.playlists[o],r=!1)}})),function(e,t){Is(e,(function(n,r,i,a){a in t.mediaGroups[r][i]||delete e.mediaGroups[r][i][a]}))}(i,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(r=!1),r?null:i},cu=function(e,t){var n,r,i={};for(var a in e){var o=e[a].sidx;if(o){var s=xe(o);if(!t[s])break;var u=t[s].sidxInfo;n=u,r=o,(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},du=function(e){function t(t,n,r,i){var a;void 0===r&&(r={}),(a=e.call(this)||this).masterPlaylistLoader_=i||(0,c.A)(a),i||(a.isMaster_=!0);var o=r,s=o.withCredentials,u=void 0!==s&&s,l=o.handleManifestRedirects,d=void 0!==l&&l;if(a.vhs_=n,a.withCredentials=u,a.handleManifestRedirects=d,!t)throw new Error("A non-empty playlist URL or object is required");return a.on("minimumUpdatePeriod",(function(){a.refreshXml_()})),a.on("mediaupdatetimeout",(function(){a.refreshMedia_(a.media().id)})),a.state="HAVE_NOTHING",a.loadedPlaylists_={},a.logger_=Jo("DashPlaylistLoader"),a.isMaster_?(a.masterPlaylistLoader_.srcUrl=t,a.masterPlaylistLoader_.sidxMapping_={}):a.childPlaylist_=t,a}(0,d.A)(t,e);var n=t.prototype;return n.requestErrored_=function(e,t,n){return!this.request||(this.request=null,e?(this.error="object"!==typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,n&&(this.state=n),this.trigger("error"),!0):void 0)},n.addSidxSegments_=function(e,t,n){var r=this,a=e.sidx&&xe(e.sidx);if(e.sidx&&a&&!this.masterPlaylistLoader_.sidxMapping_[a]){var o=Qo(this.handleManifestRedirects,e.sidx.resolvedUri),s=function(i,o){if(!r.requestErrored_(i,o,t)){var s,u=r.masterPlaylistLoader_.sidxMapping_;try{s=at()(Y(o.response).subarray(8))}catch(l){return void r.requestErrored_(l,o,t)}return u[a]={sidxInfo:e.sidx,sidx:s},we(e,s,e.sidx.resolvedUri),n(!0)}};this.request=iu(o,this.vhs_.xhr,(function(t,n,i,a){if(t)return s(t,n);if(!i||"mp4"!==i)return s({status:n.status,message:"Unsupported "+(i||"unknown")+" container type for sidx segment at URL: "+o,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},n);var u=e.sidx.byterange,l=u.offset,c=u.length;if(a.length>=c+l)return s(t,{response:a.subarray(l,l+c),status:n.status,uri:n.uri});r.request=r.vhs_.xhr({uri:o,responseType:"arraybuffer",headers:Gs({byterange:e.sidx.byterange})},s)}))}else this.mediaRequest_=i().setTimeout((function(){return n(!1)}),0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},i().clearTimeout(this.minimumUpdatePeriodTimeout_),i().clearTimeout(this.mediaRequest_),i().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},n.hasPendingRequest=function(){return this.request||this.mediaRequest_},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"===typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,(function(r){t.haveMetadata({startingState:n,playlist:e})})))},n.haveMetadata=function(e){var t=e.startingState,n=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,this.mediaRequest_=null,this.refreshMedia_(n.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},n.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),i().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(i().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(e){var t=this;i().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=i().setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_((function(t,n){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=i().setTimeout((function(){return e.haveMaster_()}),0)},n.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(n,r){if(!t.requestErrored_(n,r)){var i=r.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=r.responseText,r.responseHeaders&&r.responseHeaders.date?t.masterLoaded_=Date.parse(r.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=Qo(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,r),i?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(r,i)}))):e(r,i)}"HAVE_NOTHING"===t.state&&(t.started=!1)}))},n.syncClientServerClock_=function(e){var t=this,n=rt(this.masterPlaylistLoader_.masterXml_);return null===n?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===n.method?(this.masterPlaylistLoader_.clientOffset_=n.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Yo(this.masterPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},(function(r,i){if(t.request){if(r)return t.masterPlaylistLoader_.clientOffset_=t.masterLoaded_-Date.now(),e();var a;a="HEAD"===n.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):t.masterLoaded_:Date.parse(i.responseText),t.masterPlaylistLoader_.clientOffset_=a-Date.now(),e()}})))},n.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},n.handleMaster_=function(){this.mediaRequest_=null;var e=this.masterPlaylistLoader_.master,t=function(e){var t=e.masterXml,n=e.srcUrl,r=e.clientOffset,i=e.sidxMapping,a=e.previousManifest,o=nt(t,{manifestUri:n,clientOffset:r,sidxMapping:i,previousManifest:a});return Rs(o,n,uu),o}({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(t=lu(e,t,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=t||e;var n=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return n&&n!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=n),(!e||t&&t.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(t)},n.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(i().clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var t=e.master&&e.master.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!==typeof t||t<=0?t<0&&this.logger_("found invalid minimumUpdatePeriod of "+t+", not setting a timeout"):this.createMUPTimeout_(t)},n.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=i().setTimeout((function(){t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)},n.refreshXml_=function(){var e=this;this.requestMaster_((function(t,n){n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=function(e,t){var n=cu(e.playlists,t);return Is(e,(function(e,r,i,a){if(e.playlists&&e.playlists.length){var o=e.playlists;n=ou(n,cu(o,t))}})),n}(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.sidxMapping_),e.addSidxSegments_(e.media(),e.state,(function(t){e.refreshMedia_(e.media().id)})))}))},n.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var n=this.masterPlaylistLoader_.master.playlists,r=!this.media_||this.media_!==n[e];if(r?this.media_=n[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){!function e(){t.media().endList||(t.mediaUpdateTimeout=i().setTimeout((function(){t.trigger("mediaupdatetimeout"),e()}),Bs(t.media(),Boolean(r))))}()}this.trigger("loadedplaylist")},t}(au),pu={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},hu=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},fu=function(e){return function(){var t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(n){var t=new BlobBuilder;return t.append(e),URL.createObjectURL(t.getBlob())}}(e),n=hu(new Worker(t));n.objURL=t;var r=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(t),r.call(this)},n}},mu=function(e){return"var browserWorkerPolyFill = "+hu.toString()+";\nbrowserWorkerPolyFill(self);\n"+e},gu=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},vu=mu(gu((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,a;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(a=[],r=arguments.length,r=1;r<arguments.length;++r)a.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,a)}},this.dispose=function(){e={}}}};e.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},e.prototype.push=function(e){this.trigger("data",e)},e.prototype.flush=function(e){this.trigger("done",e)},e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},e.prototype.reset=function(e){this.trigger("reset",e)};var t,r,i,a,o,s,u,l,c,d,p,h,f,m,g,v,y,_,b,w,T,k,S,E,C,A,x,P,I,O,R,L,N,D,M,U,F=e,j=Math.pow(2,32),B={getUint64:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.getBigUint64?(t=n.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:n.getUint32(0)*j+n.getUint32(4)},MAX_UINT32:j},q=B.MAX_UINT32;!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)]),A=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),C=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]),P=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:x,audio:P},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]),N=new Uint8Array([0,0,0,0,0,0,0,0]),D=N,M=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),U=N,O=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]))},a=function(){return t(S.ftyp,E,C,E,A)},v=function(e){return t(S.hdlr,I[e])},o=function(e){return t(S.mdat,e)},g=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)},m=function(e){return t(S.mdia,g(e),v(e.type),u(e))},s=function(e){return t(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},u=function(e){return t(S.minf,"video"===e.type?t(S.vmhd,O):t(S.smhd,R),r(),_(e))},l=function(e,n){for(var r=[],i=n.length;i--;)r[i]=w(n[i]);return t.apply(null,[S.moof,s(e)].concat(r))},c=function(e){for(var n=e.length,r=[];n--;)r[n]=h(e[n]);return t.apply(null,[S.moov,p(4294967295)].concat(r).concat(d(e)))},d=function(e){for(var n=e.length,r=[];n--;)r[n]=T(e[n]);return t.apply(null,[S.mvex].concat(r))},p=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)},y=function(e){var n,r,i=e.samples||[],a=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,a[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t(S.sdtp,a)},_=function(e){return t(S.stbl,b(e),t(S.stts,U),t(S.stsc,D),t(S.stsz,M),t(S.stco,N))},function(){var e,n;b=function(r){return t(S.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===r.type?e(r):n(r))},e=function(e){var n,r,i=e.sps||[],a=e.pps||[],o=[],s=[];for(n=0;n<i.length;n++)o.push((65280&i[n].byteLength)>>>8),o.push(255&i[n].byteLength),o=o.concat(Array.prototype.slice.call(i[n]));for(n=0;n<a.length;n++)s.push((65280&a[n].byteLength)>>>8),s.push(255&a[n].byteLength),s=s.concat(Array.prototype.slice.call(a[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],o,[a.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)},n=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))}}(),f=function(e){var n=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return t(S.tkhd,n)},w=function(e){var n,r,i,a,o,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])),o=Math.floor(e.baseMediaDecodeTime/q),s=Math.floor(e.baseMediaDecodeTime%q),r=t(S.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),"audio"===e.type?(i=k(e,92),t(S.traf,n,r,i)):(a=y(e),i=k(e,a.length+92),t(S.traf,n,r,i,a))},h=function(e){return e.duration=e.duration||4294967295,t(S.trak,f(e),m(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)},function(){var e,n,r;r=function(e,t){var n=0,r=0,i=0,a=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&&(a=8)),[0,0,n|r|i|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},n=function(e,n){var i,a,o,s,u,l;for(n+=20+16*(s=e.samples||[]).length,o=r(s,n),(a=new Uint8Array(o.length+16*s.length)).set(o),i=o.length,l=0;l<s.length;l++)u=s[l],a[i++]=(4278190080&u.duration)>>>24,a[i++]=(16711680&u.duration)>>>16,a[i++]=(65280&u.duration)>>>8,a[i++]=255&u.duration,a[i++]=(4278190080&u.size)>>>24,a[i++]=(16711680&u.size)>>>16,a[i++]=(65280&u.size)>>>8,a[i++]=255&u.size,a[i++]=u.flags.isLeading<<2|u.flags.dependsOn,a[i++]=u.flags.isDependedOn<<6|u.flags.hasRedundancy<<4|u.flags.paddingValue<<1|u.flags.isNonSyncSample,a[i++]=61440&u.flags.degradationPriority,a[i++]=15&u.flags.degradationPriority,a[i++]=(4278190080&u.compositionTimeOffset)>>>24,a[i++]=(16711680&u.compositionTimeOffset)>>>16,a[i++]=(65280&u.compositionTimeOffset)>>>8,a[i++]=255&u.compositionTimeOffset;return t(S.trun,a)},e=function(e,n){var i,a,o,s,u,l;for(n+=20+8*(s=e.samples||[]).length,o=r(s,n),(i=new Uint8Array(o.length+8*s.length)).set(o),a=o.length,l=0;l<s.length;l++)u=s[l],i[a++]=(4278190080&u.duration)>>>24,i[a++]=(16711680&u.duration)>>>16,i[a++]=(65280&u.duration)>>>8,i[a++]=255&u.duration,i[a++]=(4278190080&u.size)>>>24,i[a++]=(16711680&u.size)>>>16,i[a++]=(65280&u.size)>>>8,i[a++]=255&u.size;return t(S.trun,i)},k=function(t,r){return"audio"===t.type?e(t,r):n(t,r)}}();var H,z,V,W,G,X,K,$,Y=o,Q=l,J=function(e){var t,n=a(),r=c(e);return(t=new Uint8Array(n.byteLength+r.byteLength)).set(n),t.set(r,n.byteLength),t},Z=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},ee=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},te=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},ne=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},re=function(e,t){var n,r,i,a,o,s=t||0,u=[];for(n=0;n<e.length;n++)for(a=e[n],r=0;r<a.length;r++)o=a[r],s+=(i=Z(o,s)).size,u.push(i);return u},ie=function(e){var t,n,r,i,a,o,s=0,u=e.byteLength,l=e.nalCount,c=new Uint8Array(u+4*l),d=new DataView(c.buffer);for(t=0;t<e.length;t++)for(i=e[t],n=0;n<i.length;n++)for(a=i[n],r=0;r<a.length;r++)o=a[r],d.setUint32(s,o.data.byteLength),s+=4,c.set(o.data,s),s+=o.data.byteLength;return c},ae=[33,16,5,32,164,27],oe=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],se=function(e){for(var t=[];e--;)t.push(0);return t},ue=function(){if(!H){var e={96e3:[ae,[227,64],se(154),[56]],88200:[ae,[231],se(170),[56]],64e3:[ae,[248,192],se(240),[56]],48e3:[ae,[255,192],se(268),[55,148,128],se(54),[112]],44100:[ae,[255,192],se(268),[55,163,128],se(84),[112]],32e3:[ae,[255,192],se(268),[55,234],se(226),[112]],24e3:[ae,[255,192],se(268),[55,255,128],se(268),[111,112],se(126),[224]],16e3:[ae,[255,192],se(268),[55,255,128],se(268),[111,255],se(269),[223,108],se(195),[1,192]],12e3:[oe,se(268),[3,127,248],se(268),[6,255,240],se(268),[13,255,224],se(268),[27,253,128],se(259),[56]],11025:[oe,se(268),[3,127,248],se(268),[6,255,240],se(268),[13,255,224],se(268),[27,255,192],se(268),[55,175,128],se(108),[112]],8e3:[oe,se(268),[3,121,16],se(47),[7]]};t=e,H=Object.keys(t).reduce((function(e,n){return e[n]=new Uint8Array(t[n].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return H},le=9e4;X=function(e,t){return z(G(e,t))},K=function(e,t){return V(W(e),t)},$=function(e,t,n){return W(n?e:e-t)};var ce=le,de=z=function(e){return e*le},pe=(V=function(e,t){return e*t},W=function(e){return e/le}),he=(G=function(e,t){return e/t},X),fe=K,me=$,ge=function(e,t,n,r){var i,a,o,s,u,l=0,c=0,d=0;if(t.length&&(i=he(e.baseMediaDecodeTime,e.samplerate),a=Math.ceil(ce/(e.samplerate/1024)),n&&r&&(l=i-Math.max(n,r),d=(c=Math.floor(l/a))*a),!(c<1||d>ce/2))){for((o=ue()[e.samplerate])||(o=t[0].data),s=0;s<c;s++)u=t[0],t.splice(0,0,{data:o,dts:u.dts-a,pts:u.pts-a});return e.baseMediaDecodeTime-=Math.floor(fe(d,e.samplerate)),d}},ve=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)})))},ye=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},_e=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},be=ce,we=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},Te=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/be,n=Math.floor(n)),n},ke=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))},Se=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},r=0,i=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)i+=255,t++;if(i+=e[t++],!n.payload&&4===r){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){n.payloadType=r,n.payloadSize=i,n.payload=e.subarray(t,t+i);break}n.payload=void 0}t+=i,r=0,i=0}return n},Ee=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,a,o=[];if(!(64&t[0]))return o;for(r=31&t[0],n=0;n<r;n++)a={type:3&t[(i=3*n)+2],pts:e},4&t[i+2]&&(a.ccData=t[i+3]<<8|t[i+4],o.push(a));return o},Ae=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===i[0]&&(o++,i.shift()),n[a]=e[o];return n},xe=4,Pe=function e(t){t=t||{},e.prototype.init.call(this),this.parse708captions_="boolean"!==typeof t.parse708captions||t.parse708captions,this.captionPackets_=[],this.ccStreams_=[new je(0,0),new je(0,1),new je(1,0),new je(1,1)],this.parse708captions_&&(this.cc708Stream_=new Ne({captionServices:t.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};(Pe.prototype=new F).push=function(e){var t,n,r;if("sei_rbsp"===e.nalUnitType&&(t=Se(e.escapedRBSP)).payload&&t.payloadType===xe&&(n=Ee(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}},Pe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},Pe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},Pe.prototype.flush=function(){return this.flushStream("flush")},Pe.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Pe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},Pe.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)},Pe.prototype.setsChannel1Active=function(e){return 4096===(30720&e.ccData)},Pe.prototype.setsChannel2Active=function(e){return 6144===(30720&e.ccData)},Pe.prototype.setsTextOrXDSActive=function(e){return 256===(28928&e.ccData)||4138===(30974&e.ccData)||6186===(30974&e.ccData)},Pe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var Ie={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Oe=function(e){return 32<=e&&e<=127||160<=e&&e<=255},Re=function(e){this.windowNum=e,this.reset()};Re.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Re.prototype.getText=function(){return this.rows.join("\n")},Re.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Re.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"===typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Re.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Re.prototype.addText=function(e){this.rows[this.rowIdx]+=e},Re.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Le=function(e,t,n){this.serviceNum=e,this.text="",this.currentWindow=new Re(-1),this.windows=[],this.stream=n,"string"===typeof t&&this.createTextDecoder(t)};Le.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new Re(n),"function"===typeof t&&(this.windows[n].beforeRowOverflow=t)},Le.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},Le.prototype.createTextDecoder=function(e){if("undefined"===typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var Ne=function e(t){t=t||{},e.prototype.init.call(this);var n,r=this,i=t.captionServices||{},a={};Object.keys(i).forEach((function(e){n=i[e],/^SERVICE/.test(e)&&(a[e]=n.encoding)})),this.serviceEncodings=a,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(r.new708Packet(),r.add708Bytes(e)):(null===r.current708Packet&&r.new708Packet(),r.add708Bytes(e))}};Ne.prototype=new F,Ne.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Ne.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,r=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(r)},Ne.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,r=null,i=0,a=t[i++];for(e.seq=a>>6,e.sizeCode=63&a;i<t.length;i++)r=31&(a=t[i++]),7===(n=a>>5)&&r>0&&(n=a=t[i++]),this.pushServiceBlock(n,i,r),r>0&&(i+=r-1)},Ne.prototype.pushServiceBlock=function(e,t,n){var r,i=t,a=this.current708Packet.data,o=this.services[e];for(o||(o=this.initService(e,i));i<t+n&&i<a.length;i++)r=a[i],Oe(r)?i=this.handleText(i,o):24===r?i=this.multiByteCharacter(i,o):16===r?i=this.extendedCommands(i,o):128<=r&&r<=135?i=this.setCurrentWindow(i,o):152<=r&&r<=159?i=this.defineWindow(i,o):136===r?i=this.clearWindows(i,o):140===r?i=this.deleteWindows(i,o):137===r?i=this.displayWindows(i,o):138===r?i=this.hideWindows(i,o):139===r?i=this.toggleWindows(i,o):151===r?i=this.setWindowAttributes(i,o):144===r?i=this.setPenAttributes(i,o):145===r?i=this.setPenColor(i,o):146===r?i=this.setPenLocation(i,o):143===r?o=this.reset(i,o):8===r?o.currentWindow.backspace():12===r?o.currentWindow.clearText():13===r?o.currentWindow.pendingNewLine=!0:14===r?o.currentWindow.clearText():141===r&&i++},Ne.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return Oe(n)&&(e=this.handleText(e,t,{isExtended:!0})),e},Ne.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Ne.prototype.initService=function(e,t){var n,r,i=this;return(n="SERVICE"+e)in this.serviceEncodings&&(r=this.serviceEncodings[n]),this.services[e]=new Le(e,r,i),this.services[e].init(this.getPts(t),(function(t){i.flushDisplayed(t,i.services[e])})),this.services[e]},Ne.prototype.handleText=function(e,t,n){var r,i,a=n&&n.isExtended,o=n&&n.isMultiByte,s=this.current708Packet.data,u=a?4096:0,l=s[e],c=s[e+1],d=t.currentWindow;return t.textDecoder_&&!a?(o?(i=[l,c],e++):i=[l],r=t.textDecoder_.decode(new Uint8Array(i))):r=function(e){var t=Ie[e]||e;return 4096&e&&e===t?"":String.fromCharCode(t)}(u|l),d.pendingNewLine&&!d.isEmpty()&&d.newLine(this.getPts(e)),d.pendingNewLine=!1,d.addText(r),e},Ne.prototype.multiByteCharacter=function(e,t){var n=this.current708Packet.data,r=n[e+1],i=n[e+2];return Oe(r)&&Oe(i)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Ne.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},Ne.prototype.defineWindow=function(e,t){var n=this.current708Packet.data,r=n[e],i=7&r;t.setCurrentWindow(i);var a=t.currentWindow;return r=n[++e],a.visible=(32&r)>>5,a.rowLock=(16&r)>>4,a.columnLock=(8&r)>>3,a.priority=7&r,r=n[++e],a.relativePositioning=(128&r)>>7,a.anchorVertical=127&r,r=n[++e],a.anchorHorizontal=r,r=n[++e],a.anchorPoint=(240&r)>>4,a.rowCount=15&r,r=n[++e],a.columnCount=63&r,r=n[++e],a.windowStyle=(56&r)>>3,a.penStyle=7&r,a.virtualRowCount=a.rowCount+1,e},Ne.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.winAttr;return r=n[++e],i.fillOpacity=(192&r)>>6,i.fillRed=(48&r)>>4,i.fillGreen=(12&r)>>2,i.fillBlue=3&r,r=n[++e],i.borderType=(192&r)>>6,i.borderRed=(48&r)>>4,i.borderGreen=(12&r)>>2,i.borderBlue=3&r,r=n[++e],i.borderType+=(128&r)>>5,i.wordWrap=(64&r)>>6,i.printDirection=(48&r)>>4,i.scrollDirection=(12&r)>>2,i.justify=3&r,r=n[++e],i.effectSpeed=(240&r)>>4,i.effectDirection=(12&r)>>2,i.displayEffect=3&r,e},Ne.prototype.flushDisplayed=function(e,t){for(var n=[],r=0;r<8;r++)t.windows[r].visible&&!t.windows[r].isEmpty()&&n.push(t.windows[r].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},Ne.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Ne.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=1);return e},Ne.prototype.hideWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=0);return e},Ne.prototype.toggleWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible^=1);return e},Ne.prototype.clearWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].clearText();return e},Ne.prototype.deleteWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].reset();return e},Ne.prototype.setPenAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penAttr;return r=n[++e],i.textTag=(240&r)>>4,i.offset=(12&r)>>2,i.penSize=3&r,r=n[++e],i.italics=(128&r)>>7,i.underline=(64&r)>>6,i.edgeType=(56&r)>>3,i.fontStyle=7&r,e},Ne.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penColor;return r=n[++e],i.fgOpacity=(192&r)>>6,i.fgRed=(48&r)>>4,i.fgGreen=(12&r)>>2,i.fgBlue=3&r,r=n[++e],i.bgOpacity=(192&r)>>6,i.bgRed=(48&r)>>4,i.bgGreen=(12&r)>>2,i.bgBlue=3&r,r=n[++e],i.edgeRed=(48&r)>>4,i.edgeGreen=(12&r)>>2,i.edgeBlue=3&r,e},Ne.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,r=n[++e],i.row=15&r,r=n[++e],i.column=63&r,e},Ne.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var De={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},Me=function(e){return null===e?"":(e=De[e]||e,String.fromCharCode(e))},Ue=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Fe=function(){for(var e=[],t=15;t--;)e.push("");return e},je=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,a;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_=Fe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Fe();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Fe()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,i))a=Me((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),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),a=Me((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),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 o=Ue.indexOf(7968&t);"rollUp"===this.mode_&&(o-this.rollUpRows_+1<0&&(o=this.rollUpRows_-1),this.setRollUp(e.pts,o)),o!==this.row_&&(this.clearFormatting(e.pts),this.row_=o),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),a=Me(r),a+=Me(i),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};je.prototype=new F,je.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e,t){try{return e.trim()}catch(n){return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+t+"."}),""}}),this).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},je.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Fe(),this.nonDisplayed_=Fe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},je.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_},je.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},je.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},je.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},je.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},je.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},je.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},je.prototype.isNormalChar=function(e){return e>=32&&e<=127},je.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Fe(),this.displayed_=Fe()),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},je.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)},je.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)}},je.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},je.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},je.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_]=""},je.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var Be={CaptionStream:Pe,Cea608Stream:je,Cea708Stream:Ne},qe={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},He="shared",ze=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Ve=function e(t){var n,r;e.prototype.init.call(this),this.type_=t||He,this.push=function(e){this.type_!==He&&e.type!==this.type_||(void 0===r&&(r=e.dts),e.dts=ze(e.dts,r),e.pts=ze(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")}};Ve.prototype=new F;var We,Ge=Ve,Xe=ze,Ke=function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i},$e=function(e,t,n){return decodeURIComponent(Ke(e,t,n))},Ye=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Qe={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=$e(e.data,1,t),e.value=$e(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=$e(e.data,1,t),e.url=$e(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,n;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(n=e.data,unescape(Ke(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};We=function(e){var t,n={descriptor:e&&e.descriptor},r=0,i=[],a=0;if(We.prototype.init.call(this),this.dispatchType=qe.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,n,o,s,u;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(a=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)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(i.push(e),a+=e.data.byteLength,1===i.length&&(r=Ye(e.data.subarray(6,10)),r+=10),!(a<r)){for(t={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},u=0;u<r;)t.data.set(i[0].data.subarray(0,r-u),u),u+=i[0].data.byteLength,a-=i[0].data.byteLength,i.shift();n=10,64&t.data[5]&&(n+=4,n+=Ye(t.data.subarray(10,14)),r-=Ye(t.data.subarray(16,20)));do{if((o=Ye(t.data.subarray(n+4,n+8)))<1)return void this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});if((s={id:String.fromCharCode(t.data[n],t.data[n+1],t.data[n+2],t.data[n+3]),data:t.data.subarray(n+10,n+o+10)}).key=s.id,Qe[s.id]&&(Qe[s.id](s),"com.apple.streaming.transportStreamTimestamp"===s.owner)){var l=s.data,c=(1&l[3])<<30|l[4]<<22|l[5]<<14|l[6]<<6|l[7]>>>2;c*=4,c+=3&l[7],s.timeStamp=c,void 0===t.pts&&void 0===t.dts&&(t.pts=s.timeStamp,t.dts=s.timeStamp),this.trigger("timestamp",s)}t.frames.push(s),n+=10,n+=o}while(n<r);this.trigger("data",t)}}},We.prototype=new F;var Je,Ze,et,tt=We,nt=Ge,rt=188;(Je=function(){var e=new Uint8Array(rt),t=0;Je.prototype.init.call(this),this.push=function(n){var r,i=0,a=rt;for(t?((r=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),r.set(n,t),t=0):r=n;a<r.byteLength;)71!==r[i]||71!==r[a]?(i++,a++):(this.trigger("data",r.subarray(i,a)),i+=rt,a+=rt);i<r.byteLength&&(e.set(r.subarray(i),0),t=r.byteLength-i)},this.flush=function(){t===rt&&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 F,Ze=function(){var e,t,n,r;Ze.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 a=e[i],o=(31&e[i+1])<<8|e[i+2];a===qe.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=o:a===qe.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=o:a===qe.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][o]=a),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=qe.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=qe.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}},Ze.prototype=new F,Ze.STREAM_TYPES={h264:27,adts:15},et=function(){var e,t=this,n=!1,r={data:[],size:0},i={data:[],size:0},a={data:[],size:0},o=function(e,n,r){var i,a,o=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++)a=e.data[u],o.set(a.data,l),l+=a.data.byteLength;!function(e,t){var n,r=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===r&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!==(4&e[6]),192&(n=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&n&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(o,s),i="video"===n||s.packetLength<=e.size,(r||i)&&(e.size=0,e.data.length=0),i&&t.trigger("data",s)}};et.prototype.init.call(this),this.push=function(s){({pat:function(){},pes:function(){var e,t;switch(s.streamType){case qe.H264_STREAM_TYPE:e=r,t="video";break;case qe.ADTS_STREAM_TYPE:e=i,t="audio";break;case qe.METADATA_STREAM_TYPE:e=a,t="timed-metadata";break;default:return}s.payloadUnitStartIndicator&&o(e,t,!0),e.data.push(s),e.size+=s.data.byteLength},pmt:function(){var r={type:"metadata",tracks:[]};null!==(e=s.programMapTable).video&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),n=!0,t.trigger("data",r)}})[s.type]()},this.reset=function(){r.size=0,r.data.length=0,i.size=0,i.data.length=0,this.trigger("reset")},this.flushStreams_=function(){o(r,"video"),o(i,"audio"),o(a,"timed-metadata")},this.flush=function(){if(!n&&e){var r={type:"metadata",tracks:[]};null!==e.video&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",r)}n=!1,this.flushStreams_(),this.trigger("done")}},et.prototype=new F;var it={PAT_PID:0,MP2T_PACKET_LENGTH:rt,TransportPacketStream:Je,TransportParseStream:Ze,ElementaryStream:et,TimestampRolloverStream:nt,CaptionStream:Be.CaptionStream,Cea608Stream:Be.Cea608Stream,Cea708Stream:Be.Cea708Stream,MetadataStream:tt};for(var at in qe)qe.hasOwnProperty(at)&&(it[at]=qe[at]);var ot,st=it,ut=ce,lt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];ot=function(e){var t,n=0;ot.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:"adts skiping bytes "+e+" to "+t+" in frame "+n+" outside syncword"})},this.push=function(r){var i,a,o,s,u,l=0;if(e||(n=0),"audio"===r.type){var c;for(t&&t.length?(o=t,(t=new Uint8Array(o.byteLength+r.data.byteLength)).set(o),t.set(r.data,o.byteLength)):t=r.data;l+7<t.length;)if(255===t[l]&&240===(246&t[l+1])){if("number"===typeof c&&(this.skipWarn_(c,l),c=null),a=2*(1&~t[l+1]),i=(3&t[l+3])<<11|t[l+4]<<3|(224&t[l+5])>>5,u=(s=1024*(1+(3&t[l+6])))*ut/lt[(60&t[l+2])>>>2],t.byteLength-l<i)break;this.trigger("data",{pts:r.pts+n*u,dts:r.dts+n*u,sampleCount:s,audioobjecttype:1+(t[l+2]>>>6&3),channelcount:(1&t[l+2])<<2|(192&t[l+3])>>>6,samplerate:lt[(60&t[l+2])>>>2],samplingfrequencyindex:(60&t[l+2])>>>2,samplesize:16,data:t.subarray(l+7+a,l+i)}),n++,l+=i}else"number"!==typeof c&&(c=l),l++;"number"===typeof c&&(this.skipWarn_(c,l),c=null),t=t.subarray(l)}},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}},ot.prototype=new F;var ct,dt,pt,ht=ot,ft=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,a=new Uint8Array(4),o=Math.min(4,t);if(0===o)throw new Error("no bytes available");a.set(e.subarray(i,i+o)),n=new DataView(a.buffer).getUint32(0),r=8*o,t-=o},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),a=n>>>32-i;return(r-=i)>0?n<<=i:t>0&&this.loadWord(),(i=e-i)>0?a<<i|this.readBits(i):a},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()};dt=function(){var e,t,n=0;dt.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 a=t.byteLength;n<a-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<a;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<a);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.reset=function(){t=null,n=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},dt.prototype=new F,pt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ct=function(){var e,t,n,r,i,a,o,s=new dt;ct.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(o){var s={trackId:t,pts:n,dts:r,data:o,nalUnitTypeCode:31&o[0]};switch(s.nalUnitTypeCode){case 5:s.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:s.nalUnitType="sei_rbsp",s.escapedRBSP=i(o.subarray(1));break;case 7:s.nalUnitType="seq_parameter_set_rbsp",s.escapedRBSP=i(o.subarray(1)),s.config=a(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()},o=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=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===i[0]&&(o++,i.shift()),n[a]=e[o];return n},a=function(e){var t,n,r,i,a,s,u,l,c,d,p,h,f=0,m=0,g=0,v=0,y=[1,1];if(n=(t=new ft(e)).readUnsignedByte(),i=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),pt[n]&&(3===(a=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(p=3!==a?8:12,h=0;h<p;h++)t.readBoolean()&&o(h<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(),h=0;h<u;h++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(d=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(f=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:y=[1,1];break;case 2:y=[12,11];break;case 3:y=[10,11];break;case 4:y=[16,11];break;case 5:y=[40,33];break;case 6:y=[24,11];break;case 7:y=[20,11];break;case 8:y=[32,11];break;case 9:y=[80,33];break;case 10:y=[18,11];break;case 11:y=[15,11];break;case 12:y=[64,33];break;case 13:y=[160,99];break;case 14:y=[4,3];break;case 15:y=[3,2];break;case 16:y=[2,1];break;case 255:y=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}y&&(y[0],y[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:16*(l+1)-2*f-2*m,height:(2-d)*(c+1)*16-2*g-2*v,sarRatio:y}}},ct.prototype=new F;var mt,gt={H264Stream:ct,NalByteStream:dt},vt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yt=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},_t=function e(t,n){return t.length-n<10||t[n]!=="I".charCodeAt(0)||t[n+1]!=="D".charCodeAt(0)||t[n+2]!=="3".charCodeAt(0)?n:e(t,n+=yt(t,n))},bt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},wt={isLikelyAacData:function(e){var t=_t(e,0);return e.length>=t+2&&255===(255&e[t])&&240===(240&e[t+1])&&16===(22&e[t+1])},parseId3TagSize:yt,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 vt[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=bt(e.subarray(10,14)));do{if((n=bt(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){var a=unescape(function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(r,0,i));if("com.apple.streaming.transportStreamTimestamp"===a){var o=r.subarray(i+1),s=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return s*=4,s+=3&o[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}};(mt=function(){var e=new Uint8Array,t=0;mt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var r,i,a,o,s=0,u=0;for(e.length?(o=e.length,(e=new Uint8Array(n.byteLength+o)).set(e.subarray(0,o)),e.set(n,o)):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=wt.parseAdtsSize(e,u))>e.length)break;a={type:"audio",data:e.subarray(u,u+s),pts:t,dts:t},this.trigger("data",a),u+=s}else{if(e.length-u<10)break;if(u+(s=wt.parseId3TagSize(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 F;var Tt,kt,St,Et,Ct=mt,At=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],xt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Pt=gt.H264Stream,It=wt.isLikelyAacData,Ot=ce,Rt=function(e,t){t.stream=e,this.trigger("log",t)},Lt=function(e,t){for(var n=Object.keys(t),r=0;r<n.length;r++){var i=n[r];"headOfPipeline"!==i&&t[i].on&&t[i].on("log",Rt.bind(e,i))}},Nt=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},Dt=function(e,t,n,r,i,a){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(r-t),pts:e+(i-n)},prependedContentDuration:a,baseMediaDecodeTime:e}};kt=function(e,t){var n,r=[],i=0,a=0,o=1/0;n=(t=t||{}).firstSequenceNumber||0,kt.prototype.init.call(this),this.push=function(t){ke(e,t),e&&At.forEach((function(n){e[n]=t[n]})),r.push(t)},this.setEarliestDts=function(e){i=e},this.setVideoBaseMediaDecodeTime=function(e){o=e},this.setAudioAppendStart=function(e){a=e},this.flush=function(){var s,u,l,c,d,p,h;0!==r.length?(s=ve(r,e,i),e.baseMediaDecodeTime=Te(e,t.keepOriginalTimestamps),h=ge(e,s,a,o),e.samples=ye(s),l=Y(_e(s)),r=[],u=Q(n,[e]),c=new Uint8Array(u.byteLength+l.byteLength),n++,c.set(u),c.set(l,u.byteLength),we(e),d=Math.ceil(1024*Ot/e.samplerate),s.length&&(p=s.length*d,this.trigger("segmentTimingInfo",Dt(he(e.baseMediaDecodeTime,e.samplerate),s[0].dts,s[0].pts,s[0].dts+p,s[0].pts+p,h||0)),this.trigger("timingInfo",{start:s[0].pts,end:s[0].pts+p})),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){we(e),r=[],this.trigger("reset")}},kt.prototype=new F,Tt=function(e,t){var n,r,i,a=[],o=[];n=(t=t||{}).firstSequenceNumber||0,Tt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){ke(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.config,e.sps=[t.data],xt.forEach((function(t){e[t]=r[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.data,e.pps=[t.data]),a.push(t)},this.flush=function(){for(var r,i,s,u,l,c,d,p,h=0;a.length&&"access_unit_delimiter_rbsp"!==a[0].nalUnitType;)a.shift();if(0===a.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(r=ee(a),(s=te(r))[0][0].keyFrame||((i=this.getGopForFusion_(a[0],e))?(h=i.duration,s.unshift(i),s.byteLength+=i.byteLength,s.nalCount+=i.nalCount,s.pts=i.pts,s.dts=i.dts,s.duration+=i.duration):s=ne(s)),o.length){var f;if(!(f=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),a=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");we(e),s=f}ke(e,s),e.samples=re(s),l=Y(ie(s)),e.baseMediaDecodeTime=Te(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",s.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),d=s[0],p=s[s.length-1],this.trigger("segmentTimingInfo",Dt(e.baseMediaDecodeTime,d.dts,d.pts,p.dts+p.duration,p.pts+p.duration,h)),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),a=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=Q(n,[e]),c=new Uint8Array(u.byteLength+l.byteLength),n++,c.set(u),c.set(l,u.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),a=[],this.gopCache_.length=0,o.length=0,this.trigger("reset")},this.resetStream_=function(){we(e),r=void 0,i=void 0},this.getGopForFusion_=function(t){var n,r,i,a,o,s=1/0;for(o=0;o<this.gopCache_.length;o++)i=(a=this.gopCache_[o]).gop,e.pps&&Nt(e.pps[0],a.pps[0])&&e.sps&&Nt(e.sps[0],a.sps[0])&&(i.dts<e.timelineStartInfo.dts||(n=t.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||s>n)&&(r=a,s=n));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,n,r,i,a,s,u,l;for(a=e.byteLength,s=e.nalCount,u=e.duration,t=n=0;t<o.length&&n<e.length&&(r=o[t],i=e[n],r.pts!==i.pts);)i.pts>r.pts?t++:(n++,a-=i.byteLength,s-=i.nalCount,u-=i.duration);return 0===n?e:n===e.length?null:((l=e.slice(n)).byteLength=a,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,a,s,u;for(t=o.length-1,n=e.length-1,a=null,s=!1;t>=0&&n>=0;){if(r=o[t],i=e[n],r.pts===i.pts){s=!0;break}r.pts>i.pts?t--:(t===o.length-1&&(a=n),n--)}if(!s&&null===a)return null;if(0===(u=s?n:a))return e;var l=e.slice(u),c=l.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){o=e}},Tt.prototype=new F,Et=function(e,t){this.numberOfTracks=0,this.metadataStream=t,"undefined"!==typeof(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,Et.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))))}},Et.prototype=new F,Et.prototype.flush=function(e){var t,n,r,i,a=0,o={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,xt.forEach((function(e){o.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,At.forEach((function(e){o.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?o.type=this.pendingTracks[0].type:o.type="combined",this.emittedTracks+=this.pendingTracks.length,r=J(this.pendingTracks),o.initSegment=new Uint8Array(r.byteLength),o.initSegment.set(r),o.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)o.data.set(this.pendingBoxes[i],a),a+=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),o.captionStreams[t.stream]=!0,o.captions.push(t);for(i=0;i<this.pendingMetadata.length;i++)(n=this.pendingMetadata[i]).cueTime=me(n.pts,s,this.keepOriginalTimestamps),o.metadata.push(n);for(o.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",o),i=0;i<o.captions.length;i++)t=o.captions[i],this.trigger("caption",t);for(i=0;i<o.metadata.length;i++)n=o.metadata[i],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Et.prototype.setRemux=function(e){this.remuxTracks=e},St=function(e){var t,n,r=this,i=!0;St.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="aac",i.metadataStream=new st.MetadataStream,i.aacStream=new Ct,i.audioTimestampRolloverStream=new st.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new st.TimestampRolloverStream("timed-metadata"),i.adtsStream=new ht,i.coalesceStream=new Et(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(a){"timed-metadata"!==a.type&&"audio"!==a.type||i.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new kt(n,e),i.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),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")),Lt(this,i)},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new st.MetadataStream,i.packetStream=new st.TransportPacketStream,i.parseStream=new st.TransportParseStream,i.elementaryStream=new st.ElementaryStream,i.timestampRolloverStream=new st.TimestampRolloverStream,i.adtsStream=new ht,i.h264Stream=new Pt,i.captionStream=new st.CaptionStream(e),i.coalesceStream=new Et(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(a){var o;if("metadata"===a.type){for(o=a.tracks.length;o--;)t||"video"!==a.tracks[o].type?n||"audio"!==a.tracks[o].type||((n=a.tracks[o]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=a.tracks[o]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new Tt(t,e),i.videoSegmentStream.on("log",r.getLogTrigger_("videoSegmentStream")),i.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts-r.baseMediaDecodeTime))})),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),i.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new kt(n,e),i.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",(function(e){e.dispatchType=i.metadataStream.dispatchType,r.trigger("id3Frame",e)})),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done")),Lt(this,i)},this.setBaseMediaDecodeTime=function(r){var i=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,we(n),i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity()),t&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,we(t),i.captionStream.reset()),i.timestampRolloverStream&&i.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(n){n.stream=e,t.trigger("log",n)}},this.push=function(e){if(i){var t=It(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()}},St.prototype=new F;var Mt,Ut,Ft,jt={Transmuxer:St,VideoSegmentStream:Tt,AudioSegmentStream:kt,AUDIO_PROPERTIES:At,VIDEO_PROPERTIES:xt,generateSegmentTimingInfo:Dt},Bt=function(e){return e>>>0},qt=function(e){return("00"+e.toString(16)).slice(-2)},Ht=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])},zt=Bt,Vt=function e(t,n){var r,i,a,o,s,u=[];if(!n.length)return null;for(r=0;r<t.byteLength;)i=zt(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]),a=Ht(t.subarray(r+4,r+8)),o=i>1?r+i:t.byteLength,a===n[0]&&(1===n.length?u.push(t.subarray(r+8,o)):(s=e(t.subarray(r+8,o),n.slice(1))).length&&(u=u.concat(s))),r=o;return u},Wt=Bt,Gt=B.getUint64,Xt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=Gt(e.subarray(4)):t.baseMediaDecodeTime=Wt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},Kt=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]}},$t=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],a=4&n.flags[2],o=1&n.flags[1],s=2&n.flags[1],u=4&n.flags[1],l=8&n.flags[1],c=r.getUint32(4),d=8;for(i&&(n.dataOffset=r.getInt32(d),d+=4),a&&c&&(t={flags:Kt(e.subarray(d,d+4))},d+=4,o&&(t.duration=r.getUint32(d),d+=4),s&&(t.size=r.getUint32(d),d+=4),l&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t),c--);c--;)t={},o&&(t.duration=r.getUint32(d),d+=4),s&&(t.size=r.getUint32(d),d+=4),u&&(t.flags=Kt(e.subarray(d,d+4)),d+=4),l&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t);return n},Yt=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],a=2&r.flags[2],o=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),a&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),o&&(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},Qt="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self?self:{},Jt="undefined"!==typeof window?window:"undefined"!==typeof Qt?Qt:"undefined"!==typeof self?self:{},Zt=Ae,en=Be.CaptionStream,tn=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},nn=function(e,t){var n=Vt(e,["moof","traf"]),r=Vt(e,["mdat"]),i={},a=[];return r.forEach((function(e,t){var r=n[t];a.push({mdat:e,traf:r})})),a.forEach((function(e){var n,r,a=e.mdat,o=e.traf,s=Vt(o,["tfhd"]),u=Yt(s[0]),l=u.trackId,c=Vt(o,["tfdt"]),d=c.length>0?Xt(c[0]).baseMediaDecodeTime:0,p=Vt(o,["trun"]);t===l&&p.length>0&&(n=function(e,t,n){var r=t,i=n.defaultSampleDuration||0,a=n.defaultSampleSize||0,o=n.trackId,s=[];return e.forEach((function(e){var t=$t(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=i),void 0===e.size&&(e.size=a),e.trackId=o,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"===typeof r?(e.pts=r+Jt.BigInt(e.compositionTimeOffset),r+=Jt.BigInt(e.duration)):(e.pts=r+e.compositionTimeOffset,r+=e.duration)})),s=s.concat(t)})),s}(p,d,u),r=function(e,t,n){var r,i,a,o,s=new DataView(e.buffer,e.byteOffset,e.byteLength),u={logs:[],seiNals:[]};for(i=0;i+4<e.length;i+=a)if(a=s.getUint32(i),i+=4,!(a<=0))switch(31&e[i]){case 6:var l=e.subarray(i+1,i+1+a),c=tn(i,t);if(r={nalUnitType:"sei_rbsp",size:a,data:l,escapedRBSP:Zt(l),trackId:n},c)r.pts=c.pts,r.dts=c.dts,o=c;else{if(!o){u.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+i+" for trackId "+n+". See mux.js#223."});break}r.pts=o.pts,r.dts=o.dts}u.seiNals.push(r)}return u}(a,n,l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(r.seiNals),i[l].logs=i[l].logs.concat(r.logs))})),i},rn=function(){var e,t,n,r,i,a,o=!1;this.isInitialized=function(){return o},this.init=function(t){e=new en,o=!0,a=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,i.captions.push(e),i.captionStreams[e.stream]=!0})),e.on("log",(function(e){i.logs.push(e)}))},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,a,o){var s;if(!this.isInitialized())return null;if(!a||!o)return null;if(this.isNewInit(a,o))n=a[0],r=o[n];else if(null===n||!r)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,a,o)}return s=function(e,t,n){if(null===t)return null;var r=nn(e,t)[t]||{};return{seiNals:r.seiNals,logs:r.logs,timescale:n}}(e,n,r),s&&s.logs&&(i.logs=i.logs.concat(s.logs)),null!==s&&s.seiNals?(this.pushNals(s.seiNals),this.flushStream(),i):i.logs.length?{logs:i.logs,captions:[],captionStreams:[]}: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(){i.captions=[],i.captionStreams={},i.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,r=null,i?this.clearParsedCaptions():i={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},an=Bt,on=qt,sn=B.getUint64;Mt=function(e,t){var n=Vt(t,["moof","traf"]).reduce((function(t,n){var r,i,a=Vt(n,["tfhd"])[0],o=an(a[4]<<24|a[5]<<16|a[6]<<8|a[7]),s=e[o]||9e4,u=Vt(n,["tfdt"])[0],l=new DataView(u.buffer,u.byteOffset,u.byteLength);return"bigint"===typeof(r=1===u[0]?sn(u.subarray(4,12)):l.getUint32(4))?i=r/Jt.BigInt(s):"number"!==typeof r||isNaN(r)||(i=r/s),i<Number.MAX_SAFE_INTEGER&&(i=Number(i)),i<t&&(t=i),t}),1/0);return"bigint"===typeof n||isFinite(n)?n:0},Ft=function(e){var t=0===e[0]?12:20;return an(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Ut=function(e){var t=Vt(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,r,i={},a=Vt(e,["tkhd"])[0];a&&(r=(t=new DataView(a.buffer,a.byteOffset,a.byteLength)).getUint8(0),i.id=0===r?t.getUint32(12):t.getUint32(20));var o=Vt(e,["mdia","hdlr"])[0];if(o){var s=Ht(o.subarray(8,12));i.type="vide"===s?"video":"soun"===s?"audio":s}var u=Vt(e,["mdia","minf","stbl","stsd"])[0];if(u){var l=u.subarray(8);i.codec=Ht(l.subarray(4,8));var c,d=Vt(l,[i.codec])[0];d&&(/^[asm]vc[1-9]$/i.test(i.codec)?(c=d.subarray(78),"avcC"===Ht(c.subarray(4,8))&&c.length>11?(i.codec+=".",i.codec+=on(c[9]),i.codec+=on(c[10]),i.codec+=on(c[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)?(c=d.subarray(28),"esds"===Ht(c.subarray(4,8))&&c.length>20&&0!==c[19]?(i.codec+="."+on(c[19]),i.codec+="."+on(c[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase())}var p=Vt(e,["mdia","mdhd"])[0];p&&(i.timescale=Ft(p)),n.push(i)})),n};var un=Mt,ln=Ut,cn=function(e){var t=31&e[1];return t<<=8,t|=e[2]},dn=function(e){return!!(64&e[1])},pn=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},hn=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}},fn={parseType:function(e,t){var n=cn(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=dn(e),n=4+pn(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=dn(e),r=4+pn(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 a=12+((15&e[r+10])<<8|e[r+11]);a<i;){var o=r+a;t[(31&e[o+1])<<8|e[o+2]]=e[o],a+=5+((15&e[o+3])<<8|e[o+4])}return t}},parsePayloadUnitStartIndicator:dn,parsePesType:function(e,t){switch(t[cn(e)]){case qe.H264_STREAM_TYPE:return"video";case qe.ADTS_STREAM_TYPE:return"audio";case qe.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!dn(e))return null;var t=4+pn(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+pn(e),n=e.subarray(t),r=0,i=0,a=!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"===hn(31&n[i+3])&&(a=!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"===hn(31&n[i+3])&&(a=!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"===hn(31&n[i+3])&&(a=!0),a}},mn=Xe,gn={};gn.ts=fn,gn.aac=wt;var vn=ce,yn=188,_n=71,bn=function(e,t,n){for(var r,i,a,o,s=0,u=yn,l=!1;u<=e.byteLength;)if(e[s]!==_n||e[u]!==_n&&u!==e.byteLength)s++,u++;else{if(r=e.subarray(s,u),"pes"===gn.ts.parseType(r,t.pid))i=gn.ts.parsePesType(r,t.table),a=gn.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(o=gn.ts.parsePesTime(r))&&(o.type="audio",n.audio.push(o),l=!0);if(l)break;s+=yn,u+=yn}for(s=(u=e.byteLength)-yn,l=!1;s>=0;)if(e[s]!==_n||e[u]!==_n&&u!==e.byteLength)s--,u--;else{if(r=e.subarray(s,u),"pes"===gn.ts.parseType(r,t.pid))i=gn.ts.parsePesType(r,t.table),a=gn.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(o=gn.ts.parsePesTime(r))&&(o.type="audio",n.audio.push(o),l=!0);if(l)break;s-=yn,u-=yn}},wn=function(e,t,n){for(var r,i,a,o,s,u,l,c=0,d=yn,p=!1,h={data:[],size:0};d<e.byteLength;)if(e[c]!==_n||e[d]!==_n)c++,d++;else{if(r=e.subarray(c,d),"pes"===gn.ts.parseType(r,t.pid))if(i=gn.ts.parsePesType(r,t.table),a=gn.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!p&&(o=gn.ts.parsePesTime(r))&&(o.type="video",n.video.push(o),p=!0),!n.firstKeyFrame)){if(a&&0!==h.size){for(s=new Uint8Array(h.size),u=0;h.data.length;)l=h.data.shift(),s.set(l,u),u+=l.byteLength;if(gn.ts.videoPacketContainsKeyFrame(s)){var f=gn.ts.parsePesTime(s);f?(n.firstKeyFrame=f,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.")}h.size=0}h.data.push(r),h.size+=r.byteLength}if(p&&n.firstKeyFrame)break;c+=yn,d+=yn}for(c=(d=e.byteLength)-yn,p=!1;c>=0;)if(e[c]!==_n||e[d]!==_n)c--,d--;else{if(r=e.subarray(c,d),"pes"===gn.ts.parseType(r,t.pid))i=gn.ts.parsePesType(r,t.table),a=gn.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(o=gn.ts.parsePesTime(r))&&(o.type="video",n.video.push(o),p=!0);if(p)break;c-=yn,d-=yn}},Tn=function(e){var t={pid:null,table:null},n={};for(var r in function(e,t){for(var n,r=0,i=yn;i<e.byteLength;)if(e[r]!==_n||e[i]!==_n)r++,i++;else{switch(n=e.subarray(r,i),gn.ts.parseType(n,t.pid)){case"pat":t.pid=gn.ts.parsePat(n);break;case"pmt":var a=gn.ts.parsePmt(n);t.table=t.table||{},Object.keys(a).forEach((function(e){t.table[e]=a[e]}))}r+=yn,i+=yn}}(e,t),t.table){if(t.table.hasOwnProperty(r))switch(t.table[r]){case qe.H264_STREAM_TYPE:n.video=[],wn(e,t,n),0===n.video.length&&delete n.video;break;case qe.ADTS_STREAM_TYPE:n.audio=[],bn(e,t,n),0===n.audio.length&&delete n.audio}}return n},kn=function(e,t){var n;return n=gn.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,a=null,o=0,s=0;e.length-s>=3;){switch(gn.aac.parseType(e,s)){case"timed-metadata":if(e.length-s<10){n=!0;break}if((o=gn.aac.parseId3TagSize(e,s))>e.length){n=!0;break}null===a&&(t=e.subarray(s,s+o),a=gn.aac.parseAacTimestamp(t)),s+=o;break;case"audio":if(e.length-s<7){n=!0;break}if((o=gn.aac.parseAdtsSize(e,s))>e.length){n=!0;break}null===i&&(t=e.subarray(s,s+o),i=gn.aac.parseSampleRate(t)),r++,s+=o;break;default:s++}if(n)return null}if(null===i||null===a)return null;var u=vn/i;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*r*u,pts:a+1024*r*u}]}}(e):Tn(e),n&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;("undefined"===typeof n||isNaN(n))&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=mn(e.dts,n),e.pts=mn(e.pts,n),e.dtsTime=e.dts/vn,e.ptsTime=e.pts/vn}))}if(e.video&&e.video.length){var r=t;if(("undefined"===typeof r||isNaN(r))&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=mn(e.dts,r),e.pts=mn(e.pts,r),e.dtsTime=e.dts/vn,e.ptsTime=e.pts/vn})),e.firstKeyFrame){var i=e.firstKeyFrame;i.dts=mn(i.dts,r),i.pts=mn(i.pts,r),i.dtsTime=i.dts/vn,i.ptsTime=i.pts/vn}}}(n,t),n):null},Sn=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new jt.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.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){var n={start:{decode:pe(t.start.dts),presentation:pe(t.start.pts)},end:{decode:pe(t.end.dts),presentation:pe(t.end.pts)},baseMediaDecodeTime:pe(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=pe(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){var n={start:{decode:pe(t.start.dts),presentation:pe(t.start.pts)},end:{decode:pe(t.end.dts),presentation:pe(t.end.pts)},baseMediaDecodeTime:pe(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=pe(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:pe(t.start),end:pe(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:pe(t.start),end:pe(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new rn,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],logs:n&&n.logs||[],data:t.buffer},[t.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,n=e.data,r=un(t,n);this.self.postMessage({action:"probeMp4StartTime",startTime:r,data:n},[n.buffer])},t.probeMp4Tracks=function(e){var t=e.data,n=ln(t);this.self.postMessage({action:"probeMp4Tracks",tracks:n,data:t},[t.buffer])},t.probeTs=function(e){var t=e.data,n=e.baseStartTime,r="number"!==typeof n||isNaN(n)?void 0:n*ce,i=kn(t,r),a=null;i&&((a={hasVideo:i.video&&2===i.video.length||!1,hasAudio:i.audio&&2===i.audio.length||!1}).hasVideo&&(a.videoStart=i.video[0].ptsTime),a.hasAudio&&(a.audioStart=i.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:a,data:t},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(de(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(de(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new Sn(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new Sn(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}))),yu=fu(vu),_u=function(e){var t=e.transmuxer,n=e.bytes,r=e.audioAppendStart,i=e.gopsToAlignWith,a=e.remux,o=e.onData,s=e.onTrackInfo,u=e.onAudioTimingInfo,l=e.onVideoTimingInfo,c=e.onVideoSegmentTimingInfo,d=e.onAudioSegmentTimingInfo,p=e.onId3,h=e.onCaptions,f=e.onDone,m=e.onEndedTimeline,g=e.onTransmuxerLog,v=e.isEndOfTimeline,y={buffer:[]},_=v;if(t.onmessage=function(n){t.currentTransmux===e&&("data"===n.data.action&&function(e,t,n){var r=e.data.segment,i=r.type,a=r.initSegment,o=r.captions,s=r.captionStreams,u=r.metadata,l=r.videoFrameDtsTime,c=r.videoFramePtsTime;t.buffer.push({captions:o,captionStreams:s,metadata:u});var d=e.data.segment.boxes||{data:e.data.segment.data},p={type:i,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};"undefined"!==typeof l&&(p.videoFrameDtsTime=l),"undefined"!==typeof c&&(p.videoFramePtsTime=c),n(p)}(n,y,o),"trackinfo"===n.data.action&&s(n.data.trackInfo),"gopInfo"===n.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(n,y),"audioTimingInfo"===n.data.action&&u(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&l(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&c(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&d(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&p([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&h(n.data.caption),"endedtimeline"===n.data.action&&(_=!1,m()),"log"===n.data.action&&g(n.data.log),"transmuxed"===n.data.type&&(_||(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:y,callback:f}),bu(t))))},r&&t.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(i)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:i}),"undefined"!==typeof a&&t.postMessage({action:"setRemux",remux:a}),n.byteLength){var b=n instanceof ArrayBuffer?n:n.buffer,w=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:b,byteOffset:w,byteLength:n.byteLength},[b])}v&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},bu=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"===typeof e.currentTransmux?e.currentTransmux():_u(e.currentTransmux))},wu=function(e,t){e.postMessage({action:t}),bu(e)},Tu=function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void wu(t,e);t.transmuxQueue.push(wu.bind(null,t,e))},ku=function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void _u(e);e.transmuxer.transmuxQueue.push(e)},Su=function(e){Tu("reset",e)},Eu=function(e){var t=new yu;t.currentTransmux=null,t.transmuxQueue=[];var n=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,n.call(t)},t.postMessage({action:"init",options:e}),t},Cu=function(e){var t=e.transmuxer,n=e.endAction||e.action,r=e.callback,i=(0,s.A)({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",(function i(a){a.data.action===n&&(t.removeEventListener("message",i),a.data.data&&(a.data.data=new Uint8Array(a.data.data,e.byteOffset||0,e.byteLength||a.data.data.byteLength),e.data&&(e.data=a.data.data)),r(a.data))})),e.data){var a=e.data instanceof ArrayBuffer;i.byteOffset=a?0:e.data.byteOffset,i.byteLength=e.data.byteLength;var o=[a?e.data:e.data.buffer];t.postMessage(i,o)}else t.postMessage(i)},Au=2,xu=-101,Pu=-102,Iu=function(e){e.forEach((function(e){e.abort()}))},Ou=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:xu,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Pu,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Au,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:Au,xhr:t}:null},Ru=function(e,t,n){return function(r,i){var a=i.response,o=Ou(r,i);if(o)return n(o,e);if(16!==a.byteLength)return n({status:i.status,message:"Invalid HLS key at URL: "+i.uri,code:Au,xhr:i},e);for(var s=new DataView(a),u=new Uint32Array([s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)]),l=0;l<t.length;l++)t[l].bytes=u;return n(null,e)}},Lu=function(e,t){var n=At(e.map.bytes);if("mp4"!==n){var r=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:"Found unsupported "+(n||"unknown")+" container for initialization segment at URL: "+r,code:Au})}Cu({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:function(n){var r=n.tracks,i=n.data;return e.map.bytes=i,r.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"===typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale))})),t(null)}})},Nu=function(e){var t=e.segment,n=e.finishProcessingFn,r=e.responseType;return function(e,i){var a=Ou(e,i);if(a)return n(a,t);var o="arraybuffer"!==r&&i.responseText?function(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}(i.responseText.substring(t.lastReachedChar||0)):i.response;return t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(i),t.key?t.encryptedBytes=new Uint8Array(o):t.bytes=new Uint8Array(o),n(null,t)}},Du=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,p=e.doneFn,h=e.onTransmuxerLog,f=t.map&&t.map.tracks||{},m=Boolean(f.audio&&f.video),g=i.bind(null,t,"audio","start"),v=i.bind(null,t,"audio","end"),y=i.bind(null,t,"video","start"),_=i.bind(null,t,"video","end");Cu({action:"probeTs",transmuxer:t.transmuxer,data:n,baseStartTime:t.baseStartTime,callback:function(e){t.bytes=n=e.data;var i=e.result;i&&(r(t,{hasAudio:i.hasAudio,hasVideo:i.hasVideo,isMuxed:m}),r=null,i.hasAudio&&!m&&g(i.audioStart),i.hasVideo&&y(i.videoStart),g=null,y=null),ku({bytes:n,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:m,onData:function(e){e.type="combined"===e.type?"video":e.type,d(t,e)},onTrackInfo:function(e){r&&(m&&(e.isMuxed=!0),r(t,e))},onAudioTimingInfo:function(e){g&&"undefined"!==typeof e.start&&(g(e.start),g=null),v&&"undefined"!==typeof e.end&&v(e.end)},onVideoTimingInfo:function(e){y&&"undefined"!==typeof e.start&&(y(e.start),y=null),_&&"undefined"!==typeof e.end&&_(e.end)},onVideoSegmentTimingInfo:function(e){a(e)},onAudioSegmentTimingInfo:function(e){o(e)},onId3:function(e,n){s(t,e,n)},onCaptions:function(e){u(t,[e])},isEndOfTimeline:l,onEndedTimeline:function(){c()},onTransmuxerLog:h,onDone:function(e){p&&(e.type="combined"===e.type?"video":e.type,p(null,t,e))}})}})},Mu=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,p=e.doneFn,h=e.onTransmuxerLog,f=new Uint8Array(n);if(function(e){return ct(e,["moof"]).length>0}(f)){t.isFmp4=!0;var m=t.map.tracks,g={isFmp4:!0,hasVideo:!!m.video,hasAudio:!!m.audio};m.audio&&m.audio.codec&&"enca"!==m.audio.codec&&(g.audioCodec=m.audio.codec),m.video&&m.video.codec&&"encv"!==m.video.codec&&(g.videoCodec=m.video.codec),m.video&&m.audio&&(g.isMuxed=!0),r(t,g);var v=function(e){d(t,{data:f,type:g.hasAudio&&!g.isMuxed?"audio":"video"}),e&&e.length&&u(t,e),p(null,t,{})};Cu({action:"probeMp4StartTime",timescales:t.map.timescales,data:f,transmuxer:t.transmuxer,callback:function(e){var r=e.data,a=e.startTime;n=r.buffer,t.bytes=f=r,g.hasAudio&&!g.isMuxed&&i(t,"audio","start",a),g.hasVideo&&i(t,"video","start",a),m.video&&r.byteLength&&t.transmuxer?Cu({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:f,timescales:t.map.timescales,trackIds:[m.video.id],callback:function(e){n=e.data.buffer,t.bytes=f=e.data,e.logs.forEach((function(e){h(Xo.mergeOptions(e,{stream:"mp4CaptionParser"}))})),v(e.captions)}}):v()}})}else if(t.transmuxer){if("undefined"===typeof t.container&&(t.container=At(f)),"ts"!==t.container&&"aac"!==t.container)return r(t,{hasAudio:!1,hasVideo:!1}),void p(null,t,{});Du({segment:t,bytes:n,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:p,onTransmuxerLog:h})}else p(null,t,{})},Uu=function(e,t){var n,r=e.id,i=e.key,a=e.encryptedBytes,o=e.decryptionWorker;o.addEventListener("message",(function e(n){if(n.data.source===r){o.removeEventListener("message",e);var i=n.data.decrypted;t(new Uint8Array(i.bytes,i.byteOffset,i.byteLength))}})),n=i.bytes.slice?i.bytes.slice():new Uint32Array(Array.prototype.slice.call(i.bytes)),o.postMessage(Ys({source:r,encrypted:a,key:n,iv:i.iv}),[a.buffer,n.buffer])},Fu=function(e){var t=e.activeXhrs,n=e.decryptionWorker,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,p=e.doneFn,h=e.onTransmuxerLog,f=0,m=!1;return function(e,g){if(!m){if(e)return m=!0,Iu(t),p(e,g);if((f+=1)===t.length){var v=function(){if(g.encryptedBytes)return function(e){var t=e.decryptionWorker,n=e.segment,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,s=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,p=e.doneFn,h=e.onTransmuxerLog;Uu({id:n.requestId,key:n.key,encryptedBytes:n.encryptedBytes,decryptionWorker:t},(function(e){n.bytes=e,Mu({segment:n,bytes:n.bytes,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:p,onTransmuxerLog:h})}))}({decryptionWorker:n,segment:g,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:p,onTransmuxerLog:h});Mu({segment:g,bytes:g.bytes,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:s,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:p,onTransmuxerLog:h})};if(g.endOfAllRequests=Date.now(),g.map&&g.map.encryptedBytes&&!g.map.bytes)return Uu({decryptionWorker:n,id:g.requestId+"-init",encryptedBytes:g.map.encryptedBytes,key:g.map.key},(function(e){g.map.bytes=e,Lu(g,(function(e){if(e)return Iu(t),p(e,g);v()}))}));v()}}}},ju=function(e){var t=e.segment,n=e.progressFn;return e.trackInfoFn,e.timingInfoFn,e.videoSegmentTimingInfoFn,e.audioSegmentTimingInfoFn,e.id3Fn,e.captionsFn,e.isEndOfTimeline,e.endedTimelineFn,e.dataFn,function(e){if(!e.target.aborted)return t.stats=Xo.mergeOptions(t.stats,function(e){var t=e.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n}(e)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),n(e,t)}},Bu=function(e){var t=e.xhr,n=e.xhrOptions,r=e.decryptionWorker,i=e.segment,a=e.abortFn,o=e.progressFn,s=e.trackInfoFn,u=e.timingInfoFn,l=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,d=e.id3Fn,p=e.captionsFn,h=e.isEndOfTimeline,f=e.endedTimelineFn,m=e.dataFn,g=e.doneFn,v=e.onTransmuxerLog,y=[],_=Fu({activeXhrs:y,decryptionWorker:r,trackInfoFn:s,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:p,isEndOfTimeline:h,endedTimelineFn:f,dataFn:m,doneFn:g,onTransmuxerLog:v});if(i.key&&!i.key.bytes){var b=[i.key];i.map&&!i.map.bytes&&i.map.key&&i.map.key.resolvedUri===i.key.resolvedUri&&b.push(i.map.key);var w=t(Xo.mergeOptions(n,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),Ru(i,b,_));y.push(w)}if(i.map&&!i.map.bytes){if(i.map.key&&(!i.key||i.key.resolvedUri!==i.map.key.resolvedUri)){var T=t(Xo.mergeOptions(n,{uri:i.map.key.resolvedUri,responseType:"arraybuffer"}),Ru(i,[i.map.key],_));y.push(T)}var k=Xo.mergeOptions(n,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:Gs(i.map)}),S=function(e){var t=e.segment,n=e.finishProcessingFn;return function(e,r){var i=Ou(e,r);if(i)return n(i,t);var a=new Uint8Array(r.response);if(t.map.key)return t.map.encryptedBytes=a,n(null,t);t.map.bytes=a,Lu(t,(function(e){if(e)return e.xhr=r,e.status=r.status,n(e,t);n(null,t)}))}}({segment:i,finishProcessingFn:_}),E=t(k,S);y.push(E)}var C=Xo.mergeOptions(n,{uri:i.part&&i.part.resolvedUri||i.resolvedUri,responseType:"arraybuffer",headers:Gs(i)}),A=t(C,Nu({segment:i,finishProcessingFn:_,responseType:C.responseType}));A.addEventListener("progress",ju({segment:i,progressFn:o,trackInfoFn:s,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:p,isEndOfTimeline:h,endedTimelineFn:f,dataFn:m})),y.push(A);var x={};return y.forEach((function(e){e.addEventListener("loadend",function(e){var t=e.loadendState,n=e.abortFn;return function(e){e.target.aborted&&n&&!t.calledAbortFn&&(n(),t.calledAbortFn=!0)}}({loadendState:x,abortFn:a}))})),function(){return Iu(y)}},qu=Jo("CodecUtils"),Hu=function(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},zu=function(e){var t={};return e.forEach((function(e){var n=e.mediaType,r=e.type,i=e.details;t[n]=t[n]||[],t[n].push(j(""+r+i))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return qu("multiple "+e+" codecs found as attributes: "+t[e].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[e]=null);t[e]=t[e][0]})),t},Vu=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},Wu=function(e,t){var n=t.attributes||{},r=zu(function(e){var t=e.attributes||{};if(t.CODECS)return B(t.CODECS)}(t)||[]);if(Hu(e,t)&&!r.audio&&!function(e,t){if(!Hu(e,t))return!0;var n=t.attributes||{},r=e.mediaGroups.AUDIO[n.AUDIO];for(var i in r)if(!r[i].uri&&!r[i].playlists)return!0;return!1}(e,t)){var i=zu(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 B(i.playlists[0].attributes.CODECS)}return null}(e,n.AUDIO)||[]);i.audio&&(r.audio=i.audio)}return r},Gu=Jo("PlaylistSelector"),Xu=function(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}},Ku=function(e,t){if(!e)return"";var n=i().getComputedStyle(e);return n?n[t]:""},$u=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}))},Yu=function(e,t){var n,r;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||i().Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),n-(r=r||i().Number.MAX_VALUE)},Qu=function(e,t,n,r,a,o){if(e){var s={bandwidth:t,width:n,height:r,limitRenditionByPlayerDimensions:a},u=e.playlists;Cs.isAudioOnly(e)&&(u=o.getAudioTrackPlaylists_(),s.audioOnly=!0);var l=u.map((function(e){var t=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes&&e.attributes.BANDWIDTH||i().Number.MAX_VALUE,width:t,height:n,playlist:e}}));$u(l,(function(e,t){return e.bandwidth-t.bandwidth}));var c=(l=l.filter((function(e){return!Cs.isIncompatible(e.playlist)}))).filter((function(e){return Cs.isEnabled(e.playlist)}));c.length||(c=l.filter((function(e){return!Cs.isDisabled(e.playlist)})));var d=c.filter((function(e){return e.bandwidth*pu.BANDWIDTH_VARIANCE<t})),p=d[d.length-1],h=d.filter((function(e){return e.bandwidth===p.bandwidth}))[0];if(!1===a){var f=h||c[0]||l[0];if(f&&f.playlist){var m="sortedPlaylistReps";return h&&(m="bandwidthBestRep"),c[0]&&(m="enabledPlaylistReps"),Gu("choosing "+Xu(f)+" using "+m+" with options",s),f.playlist}return Gu("could not choose a playlist with options",s),null}var g=d.filter((function(e){return e.width&&e.height}));$u(g,(function(e,t){return e.width-t.width}));var v=g.filter((function(e){return e.width===n&&e.height===r}));p=v[v.length-1];var y,_,b,w,T=v.filter((function(e){return e.bandwidth===p.bandwidth}))[0];if(T||(_=(y=g.filter((function(e){return e.width>n||e.height>r}))).filter((function(e){return e.width===y[0].width&&e.height===y[0].height})),p=_[_.length-1],b=_.filter((function(e){return e.bandwidth===p.bandwidth}))[0]),o.experimentalLeastPixelDiffSelector){var k=g.map((function(e){return e.pixelDiff=Math.abs(e.width-n)+Math.abs(e.height-r),e}));$u(k,(function(e,t){return e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff})),w=k[0]}var S=w||b||T||h||c[0]||l[0];if(S&&S.playlist){var E="sortedPlaylistReps";return w?E="leastPixelDiffRep":b?E="resolutionPlusOneRep":T?E="resolutionBestRep":h?E="bandwidthBestRep":c[0]&&(E="enabledPlaylistReps"),Gu("choosing "+Xu(S)+" using "+E+" with options",s),S.playlist}return Gu("could not choose a playlist with options",s),null}},Ju=function(){var e=this.useDevicePixelRatio&&i().devicePixelRatio||1;return Qu(this.playlists.master,this.systemBandwidth,parseInt(Ku(this.tech_.el(),"width"),10)*e,parseInt(Ku(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},Zu=function(e){var t=e.inbandTextTracks,n=e.metadataArray,r=e.timestampOffset,a=e.videoDuration;if(n){var o=i().WebKitDataCue||i().VTTCue,s=t.metadataTrack_;if(s&&(n.forEach((function(e){var t=e.cueTime+r;!("number"!==typeof t||i().isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var n=new o(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Xo.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Xo.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Xo.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),s.addCue(n)}))})),s.cues&&s.cues.length)){for(var u=s.cues,l=[],c=0;c<u.length;c++)u[c]&&l.push(u[c]);var d=l.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),p=Object.keys(d).sort((function(e,t){return Number(e)-Number(t)}));p.forEach((function(e,t){var n=d[e],r=Number(p[t+1])||a;n.forEach((function(e){e.endTime=r}))}))}}},el=function(e,t,n){var r,i;if(n&&n.cues)for(r=n.cues.length;r--;)(i=n.cues[r]).startTime>=e&&i.endTime<=t&&n.removeCue(i)},tl=function(e){return"number"===typeof e&&isFinite(e)},nl=1/60,rl=function(e){var t=e.startOfSegment,n=e.duration,r=e.segment,i=e.part,a=e.playlist,o=a.mediaSequence,s=a.id,u=a.segments,l=void 0===u?[]:u,c=e.mediaIndex,d=e.partIndex,p=e.timeline,h=l.length-1,f="mediaIndex/partIndex increment";e.getMediaInfoForTime?f="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(f="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(f+=" with independent "+e.independent);var m="number"===typeof d,g=e.segment.uri?"segment":"pre-segment",v=m?ps({preloadSegment:r})-1:0;return g+" ["+(o+c)+"/"+(o+h)+"]"+(m?" part ["+d+"/"+v+"]":"")+" segment start/end ["+r.start+" => "+r.end+"]"+(m?" part start/end ["+i.start+" => "+i.end+"]":"")+" startOfSegment ["+t+"] duration ["+n+"] timeline ["+p+"] selected by ["+f+"] playlist ["+s+"]"},il=function(e){return e+"TimingInfo"},al=function(e){var t=e.timelineChangeController,n=e.currentTimeline,r=e.segmentTimeline,i=e.loaderType,a=e.audioDisabled;if(n===r)return!1;if("audio"===i){var o=t.lastTimelineChange({type:"main"});return!o||o.to!==r}if("main"===i&&a){var s=t.pendingTimelineChange({type:"audio"});return!s||s.to!==r}return!1},ol=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+Zo},sl=function(e,t){if("hls"!==t)return null;var n=function(e){var t=0;return["video","audio"].forEach((function(n){var r=e[n+"TimingInfo"];if(r){var a,o=r.start,s=r.end;"bigint"===typeof o||"bigint"===typeof s?a=i().BigInt(s)-i().BigInt(o):"number"===typeof o&&"number"===typeof s&&(a=s-o),"undefined"!==typeof a&&a>t&&(t=a)}})),"bigint"===typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t}({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!n)return null;var r=e.playlist.targetDuration,a=ol({segmentDuration:n,maxDuration:2*r}),o=ol({segmentDuration:n,maxDuration:r}),s="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+n+" when the reported duration is "+e.duration+" and the target duration is "+r+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return a||o?{severity:a?"warn":"info",message:s}:null},ul=function(e){function t(t,n){var r;if(r=e.call(this)||this,!t)throw new TypeError("Initialization settings are required");if("function"!==typeof t.currentTime)throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");return r.bandwidth=t.bandwidth,r.throughput={rate:0,count:0},r.roundTrip=NaN,r.resetStats_(),r.mediaIndex=null,r.partIndex=null,r.hasPlayed_=t.hasPlayed,r.currentTime_=t.currentTime,r.seekable_=t.seekable,r.seeking_=t.seeking,r.duration_=t.duration,r.mediaSource_=t.mediaSource,r.vhs_=t.vhs,r.loaderType_=t.loaderType,r.currentMediaInfo_=void 0,r.startingMediaInfo_=void 0,r.segmentMetadataTrack_=t.segmentMetadataTrack,r.goalBufferLength_=t.goalBufferLength,r.sourceType_=t.sourceType,r.sourceUpdater_=t.sourceUpdater,r.inbandTextTracks_=t.inbandTextTracks,r.state_="INIT",r.timelineChangeController_=t.timelineChangeController,r.shouldSaveSegmentTimingInfo_=!0,r.parse708captions_=t.parse708captions,r.useDtsForTimestampOffset_=t.useDtsForTimestampOffset,r.captionServices_=t.captionServices,r.experimentalExactManifestTimings=t.experimentalExactManifestTimings,r.checkBufferTimeout_=null,r.error_=void 0,r.currentTimeline_=-1,r.pendingSegment_=null,r.xhrOptions_=null,r.pendingSegments_=[],r.audioDisabled_=!1,r.isPendingTimestampOffset_=!1,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=Xo.browser.IE_VERSION>=11,r.appendInitSegment_={audio:!0,video:!0},r.playlistOfLastInitSegment_={audio:null,video:null},r.callQueue_=[],r.loadQueue_=[],r.metadataQueue_={id3:[],caption:[]},r.waitingOnRemove_=!1,r.quotaExceededErrorRetryTimeout_=null,r.activeInitSegmentId_=null,r.initSegments_={},r.cacheEncryptionKeys_=t.cacheEncryptionKeys,r.keyCache_={},r.decrypter_=t.decrypter,r.syncController_=t.syncController,r.syncPoint_={segmentIndex:0,time:0},r.transmuxer_=r.createTransmuxer_(),r.triggerSyncInfoUpdate_=function(){return r.trigger("syncinfoupdate")},r.syncController_.on("syncinfoupdate",r.triggerSyncInfoUpdate_),r.mediaSource_.addEventListener("sourceopen",(function(){r.isEndOfStream_()||(r.ended_=!1)})),r.fetchAtBuffer_=!1,r.logger_=Jo("SegmentLoader["+r.loaderType_+"]"),Object.defineProperty((0,c.A)(r),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),r.sourceUpdater_.on("ready",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"main"===r.loaderType_&&r.timelineChangeController_.on("pendingtimelinechange",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"audio"===r.loaderType_&&r.timelineChangeController_.on("timelinechange",(function(){r.hasEnoughInfoToLoad_()&&r.processLoadQueue_(),r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),r}(0,d.A)(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return Eu({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},n.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},n.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&i().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},n.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},n.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},n.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,i().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},n.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},n.error=function(e){return"undefined"!==typeof e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Su(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Xo.createTimeRanges();if("main"===this.loaderType_){var t=e.hasAudio,n=e.hasVideo,r=e.isMuxed;if(n&&t&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Qs(e),r=this.initSegments_[n];return t&&!r&&e.bytes&&(this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Js(e),r=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[n]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});var i={resolvedUri:(r||e).resolvedUri};return r&&(i.bytes=r.bytes),i},n.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},n.load=function(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.playlist=function(e,t){if(void 0===t&&(t={}),e){var n=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var i=null;if(n&&(n.id?i=n.id:n.uri&&(i=n.uri)),this.logger_("playlist update ["+i+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var a=e.mediaSequence-n.mediaSequence;if(this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex)if(this.mediaIndex-=a,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var o=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!o.parts||!o.parts.length||!o.parts[this.partIndex])){var s=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=s}}r&&(r.mediaIndex-=a,r.mediaIndex<0?(r.mediaIndex=null,r.partIndex=null):(r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex]),r.partIndex>=0&&r.segment.parts&&(r.part=r.segment.parts[r.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e)}},n.pause=function(){this.checkBufferTimeout_&&(i().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},n.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},n.resyncLoader=function(){this.transmuxer_&&Su(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},n.remove=function(e,t,n,r){if(void 0===n&&(n=function(){}),void 0===r&&(r=!1),t===1/0&&(t=this.duration_()),t<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var i=1,a=function(){0===--i&&n()};for(var o in!r&&this.audioDisabled_||(i++,this.sourceUpdater_.removeAudio(e,t,a)),(r||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,n,r){for(var i=Math.ceil((t-r)*xt.ONE_SECOND_IN_TS),a=Math.ceil((n-r)*xt.ONE_SECOND_IN_TS),o=e.slice(),s=e.length;s--&&!(e[s].pts<=a););if(-1===s)return o;for(var u=s+1;u--&&!(e[u].pts<=i););return u=Math.max(u,0),o.splice(u,s-u+1),o}(this.gopBuffer_,e,t,this.timeMapping_),i++,this.sourceUpdater_.removeVideo(e,t,a)),this.inbandTextTracks_)el(e,t,this.inbandTextTracks_[o]);el(e,t,this.segmentMetadataTrack_),a()}else this.logger_("skipping remove because no source updater or starting media info")},n.monitorBuffer_=function(){this.checkBufferTimeout_&&i().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=i().setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&i().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=i().setTimeout(this.monitorBufferTick_.bind(this),500)},n.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();e&&("number"===typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},n.isEndOfStream_=function(e,t,n){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),void 0===n&&(n=this.partIndex),!t||!this.mediaSource_)return!1;var r="number"===typeof e&&t.segments[e],i=e+1===t.segments.length,a=!r||!r.parts||n+1===r.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&i&&a},n.chooseNextRequest_=function(){var e=this.buffered_(),t=os(e)||0,n=ss(e,this.currentTime_()),r=!this.hasPlayed_()&&n>=1,i=n>=this.goalBufferLength_(),a=this.playlist_.segments;if(!a.length||r||i)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var o={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(o.isSyncRequest)o.mediaIndex=function(e,t,n){t=t||[];for(var r=[],i=0,a=0;a<t.length;a++){var o=t[a];if(e===o.timeline&&(r.push(a),(i+=o.duration)>n))return a}return 0===r.length?0:r[r.length-1]}(this.currentTimeline_,a,t);else if(null!==this.mediaIndex){var s=a[this.mediaIndex],u="number"===typeof this.partIndex?this.partIndex:-1;o.startOfSegment=s.end?s.end:t,s.parts&&s.parts[u+1]?(o.mediaIndex=this.mediaIndex,o.partIndex=u+1):o.mediaIndex=this.mediaIndex+1}else{var l=Cs.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),c=l.segmentIndex,d=l.startTime,p=l.partIndex;o.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),o.mediaIndex=c,o.startOfSegment=d,o.partIndex=p}var h=a[o.mediaIndex],f=h&&"number"===typeof o.partIndex&&h.parts&&h.parts[o.partIndex];if(!h||"number"===typeof o.partIndex&&!f)return null;if("number"!==typeof o.partIndex&&h.parts&&(o.partIndex=0,f=h.parts[0]),!n&&f&&!f.independent)if(0===o.partIndex){var m=a[o.mediaIndex-1],g=m.parts&&m.parts.length&&m.parts[m.parts.length-1];g&&g.independent&&(o.mediaIndex-=1,o.partIndex=m.parts.length-1,o.independent="previous segment")}else h.parts[o.partIndex-1].independent&&(o.partIndex-=1,o.independent="previous part");var v=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return o.mediaIndex>=a.length-1&&v&&!this.seeking_()?null:this.generateSegmentInfo_(o)},n.generateSegmentInfo_=function(e){var t=e.independent,n=e.playlist,r=e.mediaIndex,i=e.startOfSegment,a=e.isSyncRequest,o=e.partIndex,s=e.forceTimestampOffset,u=e.getMediaInfoForTime,l=n.segments[r],c="number"===typeof o&&l.parts[o],d={requestId:"segment-loader-"+Math.random(),uri:c&&c.resolvedUri||l.resolvedUri,mediaIndex:r,partIndex:c?o:null,isSyncRequest:a,startOfSegment:i,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:l.timeline,duration:c&&c.duration||l.duration,segment:l,part:c,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:u,independent:t},p="undefined"!==typeof s?s:this.isPendingTimestampOffset_;d.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:l.timeline,currentTimeline:this.currentTimeline_,startOfSegment:i,buffered:this.buffered_(),overrideCheck:p});var h=os(this.sourceUpdater_.audioBuffered());return"number"===typeof h&&(d.audioAppendStart=h-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(d.gopsToAlignWith=function(e,t,n){if("undefined"===typeof t||null===t||!e.length)return[];var r,i=Math.ceil((t-n+3)*xt.ONE_SECOND_IN_TS);for(r=0;r<e.length&&!(e[r].pts>i);r++);return e.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),d},n.timestampOffsetForSegment_=function(e){return function(e){var t=e.segmentTimeline,n=e.currentTimeline,r=e.startOfSegment,i=e.buffered;return e.overrideCheck||t!==n?t<n?r:i.length?i.end(i.length-1):r:null}(e)},n.earlyAbortWhenNeeded_=function(e){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t=this.currentTime_(),n=e.bandwidth,r=this.pendingSegment_.duration,i=Cs.estimateSegmentRequestTime(r,n,this.playlist_,e.bytesReceived),a=function(e,t,n){return void 0===n&&(n=1),((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(i<=a)){var o=function(e){var t=e.master,n=e.currentTime,r=e.bandwidth,i=e.duration,a=e.segmentDuration,o=e.timeUntilRebuffer,s=e.currentTimeline,u=e.syncController,l=t.playlists.filter((function(e){return!Cs.isIncompatible(e)})),c=l.filter(Cs.isEnabled);c.length||(c=l.filter((function(e){return!Cs.isDisabled(e)})));var d=c.filter(Cs.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var t=u.getSyncPoint(e,i,s,n)?1:2;return{playlist:e,rebufferingImpact:Cs.estimateSegmentRequestTime(a,r,e)*t-o}})),p=d.filter((function(e){return e.rebufferingImpact<=0}));return $u(p,(function(e,t){return Yu(t.playlist,e.playlist)})),p.length?p[0]:($u(d,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),d[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(o){var s=i-a-o.rebufferingImpact,u=.5;a<=Zo&&(u=1),!o.playlist||o.playlist.uri===this.playlist_.uri||s<u||(this.bandwidth=o.playlist.attributes.BANDWIDTH*pu.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},n.handleAbort_=function(e){this.logger_("Aborting "+rl(e)),this.mediaRequestsAborted+=1},n.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},n.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++){var a=n[i];if(a!==r[i])return!1;if(e[a]!==t[a])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},n.handleTimingInfo_=function(e,t,n,r){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var i=this.pendingSegment_,a=il(t);i[a]=i[a]||{},i[a][n]=r,this.logger_("timinginfo: "+t+" - "+n+" - "+r),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},n.handleCaptions_=function(e,t){var n=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),a={};t.forEach((function(e){a[e.stream]=a[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=a[e.stream];t.startTime=Math.min(t.startTime,e.startTime+r),t.endTime=Math.max(t.endTime,e.endTime+r),t.captions.push(e)})),Object.keys(a).forEach((function(e){var t=a[e],o=t.startTime,s=t.endTime,u=t.captions,l=n.inbandTextTracks_;n.logger_("adding cues from "+o+" -> "+s+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var r=n;/^cc708_/.test(n)&&(r="SERVICE"+n.split("_")[1]);var i=t.textTracks().getTrackById(r);if(i)e[n]=i;else{var a=n,o=n,s=!1,u=(t.options_.vhs&&t.options_.vhs.captionServices||{})[r];u&&(a=u.label,o=u.language,s=u.default),e[n]=t.addRemoteTextTrack({kind:"captions",id:r,default:s,label:a,language:o},!1).track}}}(l,n.vhs_.tech_,e),el(o,s,l[e]),function(e){var t=e.inbandTextTracks,n=e.captionArray,r=e.timestampOffset;if(n){var a=i().WebKitDataCue||i().VTTCue;n.forEach((function(e){var n=e.stream;t[n].addCue(new a(e.startTime+r,e.endTime+r,e.text))}))}}({captionArray:u,inbandTextTracks:l,timestampOffset:r})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_("SegmentLoader received no captions from a caption event")},n.handleId3_=function(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,n){e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,n,this.vhs_.tech_),Zu({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:r,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))},n.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(e){return e()})),this.metadataQueue_.caption.forEach((function(e){return e()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},n.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach((function(e){return e()}))},n.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach((function(e){return e()}))},n.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!al({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.getCurrentMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),e&&e.trackInfo||this.currentMediaInfo_},n.getMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),this.getCurrentMediaInfo_(e)||this.startingMediaInfo_},n.getPendingSegmentPlaylist=function(){return this.pendingSegment_?this.pendingSegment_.playlist:null},n.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;var n=t.hasAudio,r=t.hasVideo,i=t.isMuxed;return!(r&&!e.videoTimingInfo)&&(!(n&&!this.audioDisabled_&&!i&&!e.audioTimingInfo)&&!al({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.part||n.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[il(t.type)].start;else{var r,i=this.getCurrentMediaInfo_(),a="main"===this.loaderType_&&i&&i.hasVideo;a&&(r=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:a,firstVideoFrameTimeForData:r,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.isSyncRequest){this.updateTimingInfoEnd_(n),this.syncController_.saveSegmentTimingInfo({segmentInfo:n,shouldSaveTimelineMapping:"main"===this.loaderType_});var o=this.chooseNextRequest_();if(o.mediaIndex!==n.mediaIndex||o.partIndex!==n.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},n.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!==typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},n.getInitSegmentAndUpdateState_=function(e){var t=e.type,n=e.initSegment,r=e.map,i=e.playlist;if(r){var a=Qs(r);if(this.activeInitSegmentId_===a)return null;n=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=a}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=i,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,n):null},n.handleQuotaExceededError_=function(e,t){var n=this,r=e.segmentInfo,a=e.type,o=e.bytes,s=this.sourceUpdater_.audioBuffered(),u=this.sourceUpdater_.videoBuffered();s.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+as(s).join(", ")),u.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+as(u).join(", "));var l=s.length?s.start(0):0,c=s.length?s.end(s.length-1):0,d=u.length?u.start(0):0,p=u.length?u.end(u.length-1):0;if(c-l<=1&&p-d<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+o.byteLength+", audio buffer: "+as(s).join(", ")+", video buffer: "+as(u).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:r,type:a,bytes:o}));var h=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+h),this.remove(0,h,(function(){n.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=i().setTimeout((function(){n.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),n.quotaExceededErrorRetryTimeout_=null,n.processCallQueue_()}),1e3)}),!0)},n.handleAppendError_=function(e,t){var n=e.segmentInfo,r=e.type,i=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(r+" append of "+i.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:n,type:r,bytes:i}))},n.appendToSourceBuffer_=function(e){var t=e.segmentInfo,n=e.type,r=e.initSegment,i=e.data,a=e.bytes;if(!a){var o=[i],s=i.byteLength;r&&(o.unshift(r),s+=r.byteLength),a=function(e){var t,n=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((function(e){t.set(e,n),n+=e.byteLength}))),t}({bytes:s,segments:o})}this.sourceUpdater_.appendBuffer({segmentInfo:t,type:n,bytes:a},this.handleAppendError_.bind(this,{segmentInfo:t,type:n,bytes:a}))},n.handleSegmentTimingInfo_=function(e,t,n){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var r=this.pendingSegment_.segment,i=e+"TimingInfo";r[i]||(r[i]={}),r[i].transmuxerPrependedSeconds=n.prependedContentDuration||0,r[i].transmuxedPresentationStart=n.start.presentation,r[i].transmuxedDecodeStart=n.start.decode,r[i].transmuxedPresentationEnd=n.end.presentation,r[i].transmuxedDecodeEnd=n.end.decode,r[i].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(e,t){var n=t.type,r=t.data;if(r&&r.byteLength&&("audio"!==n||!this.audioDisabled_)){var i=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:i,data:r})}},n.loadSegment_=function(e){var t=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"===typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push((function(){var n=(0,s.A)({},e,{forceTimestampOffset:!0});(0,s.A)(e,t.generateSegmentInfo_(n)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)}))},n.updateTransmuxerAndRequestSegment_=function(e){var t=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var n=this.createSimplifiedSegmentObj_(e),r=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),i=null!==this.mediaIndex,a=e.timeline!==this.currentTimeline_&&e.timeline>0,o=r||i&&a;this.logger_("Requesting "+rl(e)),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Bu({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:n,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:o,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(n){var r=n.message,i=n.level,a=n.stream;t.logger_(rl(e)+" logged from transmuxer stream "+a+" as a "+i+": "+r)}})},n.trimBackBuffer_=function(e){var t=function(e,t,n){var r=t-pu.BACK_BUFFER_LENGTH;e.length&&(r=Math.max(r,e.start(0)));var i=t-n;return Math.min(i,r)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},n.createSimplifiedSegmentObj_=function(e){var t=e.segment,n=e.part,r={resolvedUri:n?n.resolvedUri:t.resolvedUri,byterange:n?n.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},i=e.playlist.segments[e.mediaIndex-1];if(i&&i.timeline===t.timeline&&(i.videoTimingInfo?r.baseStartTime=i.videoTimingInfo.transmuxedDecodeEnd:i.audioTimingInfo&&(r.baseStartTime=i.audioTimingInfo.transmuxedDecodeEnd)),t.key){var a=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=a}return t.map&&(r.map=this.initSegmentForMap(t.map)),r},n.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},n.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<nl?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+nl):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")},n.segmentRequestFinished_=function(e,t,n){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Pu)return;return this.pause(),e.code===xu?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),r.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var r=t[0].pts,i=0;i<e.length&&!(e[i].pts>=r);i++);return e.slice(0,i).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(r)}},n.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},n.updateMediaSecondsLoaded_=function(e){"number"===typeof e.start&&"number"===typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},n.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},n.trueSegmentStart_=function(e){var t=e.currentStart,n=e.playlist,r=e.mediaIndex,i=e.firstVideoFrameTimeForData,a=e.currentVideoTimestampOffset,o=e.useVideoTimingInfo,s=e.videoTimingInfo,u=e.audioTimingInfo;if("undefined"!==typeof t)return t;if(!o)return u.start;var l=n.segments[r-1];return 0!==r&&l&&"undefined"!==typeof l.start&&l.end===i+a?s.start:i},n.waitForAppendsToComplete_=function(e){var t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var n=t.hasAudio,r=t.hasVideo,i=t.isMuxed,a="main"===this.loaderType_&&r,o=!this.audioDisabled_&&n&&!i;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!==typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);a&&e.waitingOnAppends++,o&&e.waitingOnAppends++,a&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),o&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},n.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},n.checkForIllegalMediaSwitch=function(e){var t=function(e,t,n){return"main"===e&&t&&n?n.hasAudio||n.hasVideo?t.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0)},n.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"===typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}},n.getSegmentStartTimeForTimestampOffsetCalculation_=function(e){var t=e.videoTimingInfo,n=e.audioTimingInfo,r=e.timingInfo;return this.useDtsForTimestampOffset_?t&&"number"===typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:n&&"number"===typeof n.transmuxedDecodeStart?n.transmuxedDecodeStart:r.start:r.start},n.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t=this.getMediaInfo_(),n="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;n&&(e.timingInfo.end="number"===typeof n.end?n.end:n.start+e.duration)},n.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});var t=sl(e,this.sourceType_);if(t&&("warn"===t.severity?Xo.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",!e.isSyncRequest||(this.trigger("syncinfoupdate"),e.hasAppendedData_)){this.logger_("Appended "+rl(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var n=e.segment,r=e.part,i=n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration,a=r&&r.end&&this.currentTime_()-r.end>3*e.playlist.partTargetDuration;if(i||a)return this.logger_("bad "+(i?"segment":"part")+" "+rl(e)),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}else this.logger_("Throwing away un-appended sync request "+rl(e))},n.recordThroughput_=function(e){if(e.duration<nl)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+nl);else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,r=t.end;if(tl(n)&&tl(r)){el(n,r,this.segmentMetadataTrack_);var a=i().WebKitDataCue||i().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 a(n,r,JSON.stringify(o));s.value=o,this.segmentMetadataTrack_.addCue(s)}}},t}(Xo.EventTarget);function ll(){}var cl,dl=function(e){return"string"!==typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},pl=["video","audio"],hl=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},fl=function e(t,n){if(0!==n.queue.length){var r=0,i=n.queue[r];if("mediaSource"!==i.type){if("mediaSource"!==t&&n.ready()&&"closed"!==n.mediaSource.readyState&&!hl(t,n)){if(i.type!==t){if(r=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("mediaSource"===r.type)return null;if(r.type===e)return n}return null}(t,n.queue),null===r)return;i=n.queue[r]}return n.queue.splice(r,1),n.queuePending[t]=i,i.action(t,n),i.doneFn?void 0:(n.queuePending[t]=null,void e(t,n))}}else n.updating()||"closed"===n.mediaSource.readyState||(n.queue.shift(),i.action(n),i.doneFn&&i.doneFn(),e("audio",n),e("video",n))}},ml=function(e,t){var n=t[e+"Buffer"],r=dl(e);n&&(n.removeEventListener("updateend",t["on"+r+"UpdateEnd_"]),n.removeEventListener("error",t["on"+r+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},gl=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},vl=function(e,t,n){return function(r,i){var a=i[r+"Buffer"];if(gl(i.mediaSource,a)){i.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+r+"Buffer");try{a.appendBuffer(e)}catch(o){i.logger_("Error with code "+o.code+" "+(22===o.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+t.mediaIndex+" to "+r+"Buffer"),i.queuePending[r]=null,n(o)}}}},yl=function(e,t){return function(n,r){var i=r[n+"Buffer"];if(gl(r.mediaSource,i)){r.logger_("Removing "+e+" to "+t+" from "+n+"Buffer");try{i.remove(e,t)}catch(a){r.logger_("Remove "+e+" to "+t+" from "+n+"Buffer failed")}}}},_l=function(e){return function(t,n){var r=n[t+"Buffer"];gl(n.mediaSource,r)&&(n.logger_("Setting "+t+"timestampOffset to "+e),r.timestampOffset=e)}},bl=function(e){return function(t,n){e()}},wl=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(n){Xo.log.warn("Failed to call media source endOfStream",n)}}}},Tl=function(e){return function(t){t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(n){Xo.log.warn("Failed to set media source duration",n)}}},kl=function(){return function(e,t){if("open"===t.mediaSource.readyState){var n=t[e+"Buffer"];if(gl(t.mediaSource,n)){t.logger_("calling abort on "+e+"Buffer");try{n.abort()}catch(r){Xo.log.warn("Failed to abort on "+e+"Buffer",r)}}}}},Sl=function(e,t){return function(n){var r=dl(e),i=H(t);n.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var a=n.mediaSource.addSourceBuffer(i);a.addEventListener("updateend",n["on"+r+"UpdateEnd_"]),a.addEventListener("error",n["on"+r+"Error_"]),n.codecs[e]=t,n[e+"Buffer"]=a}},El=function(e){return function(t){var n=t[e+"Buffer"];if(ml(e,t),gl(t.mediaSource,n)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(n)}catch(r){Xo.log.warn("Failed to removeSourceBuffer "+e+"Buffer",r)}}}},Cl=function(e){return function(t,n){var r=n[t+"Buffer"],i=H(e);if(gl(n.mediaSource,r)&&n.codecs[t]!==e){n.logger_("changing "+t+"Buffer codec from "+n.codecs[t]+" to "+e);try{r.changeType(i),n.codecs[t]=e}catch(a){Xo.log.warn("Failed to changeType on "+t+"Buffer",a)}}}},Al=function(e){var t=e.type,n=e.sourceUpdater,r=e.action,i=e.doneFn,a=e.name;n.queue.push({type:t,action:r,doneFn:i,name:a}),fl(t,n)},xl=function(e,t){return function(n){if(t.queuePending[e]){var r=t.queuePending[e].doneFn;t.queuePending[e]=null,r&&r(t[e+"Error_"])}fl(e,t)}},Pl=function(e){function t(t){var n;return(n=e.call(this)||this).mediaSource=t,n.sourceopenListener_=function(){return fl("mediaSource",(0,c.A)(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=Jo("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null},n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=xl("video",(0,c.A)(n)),n.onAudioUpdateEnd_=xl("audio",(0,c.A)(n)),n.onVideoError_=function(e){n.videoError_=e},n.onAudioError_=function(e){n.audioError_=e},n.createdSourceBuffers_=!1,n.initializedEme_=!1,n.triggeredReady_=!1,n}(0,d.A)(t,e);var n=t.prototype;return n.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},n.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},n.hasInitializedAnyEme=function(){return this.initializedEme_},n.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},n.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},n.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},n.addSourceBuffer=function(e,t){Al({type:"mediaSource",sourceUpdater:this,action:Sl(e,t),name:"addSourceBuffer"})},n.abort=function(e){Al({type:e,sourceUpdater:this,action:kl(e),name:"abort"})},n.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?Al({type:"mediaSource",sourceUpdater:this,action:El(e),name:"removeSourceBuffer"}):Xo.log.error("removeSourceBuffer is not supported!")},n.canRemoveSourceBuffer=function(){return!Xo.browser.IE_VERSION&&!Xo.browser.IS_FIREFOX&&i().MediaSource&&i().MediaSource.prototype&&"function"===typeof i().MediaSource.prototype.removeSourceBuffer},t.canChangeType=function(){return i().SourceBuffer&&i().SourceBuffer.prototype&&"function"===typeof i().SourceBuffer.prototype.changeType},n.canChangeType=function(){return this.constructor.canChangeType()},n.changeType=function(e,t){this.canChangeType()?Al({type:e,sourceUpdater:this,action:Cl(t),name:"changeType"}):Xo.log.error("changeType is not supported!")},n.addOrChangeSourceBuffers=function(e){var t=this;if(!e||"object"!==typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((function(n){var r=e[n];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(n,r);t.canChangeType()&&t.changeType(n,r)}))},n.appendBuffer=function(e,t){var n=this,r=e.segmentInfo,i=e.type,a=e.bytes;if(this.processedAppend_=!0,"audio"===i&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+a.length+" until video append");if(Al({type:i,sourceUpdater:this,action:vl(a,r||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===i){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var o=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+o.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,o.forEach((function(e){n.appendBuffer.apply(n,e)}))}},n.audioBuffered=function(){return gl(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Xo.createTimeRange()},n.videoBuffered=function(){return gl(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Xo.createTimeRange()},n.buffered=function(){var e=gl(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=gl(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var n=null,r=null,i=0,a=[],o=[];if(!e||!e.length||!t||!t.length)return Xo.createTimeRange();for(var s=e.length;s--;)a.push({time:e.start(s),type:"start"}),a.push({time:e.end(s),type:"end"});for(s=t.length;s--;)a.push({time:t.start(s),type:"start"}),a.push({time:t.end(s),type:"end"});for(a.sort((function(e,t){return e.time-t.time})),s=0;s<a.length;s++)"start"===a[s].type?2===++i&&(n=a[s].time):"end"===a[s].type&&1===--i&&(r=a[s].time),null!==n&&null!==r&&(o.push([n,r]),n=null,r=null);return Xo.createTimeRanges(o)}(this.audioBuffered(),this.videoBuffered())},n.setDuration=function(e,t){void 0===t&&(t=ll),Al({type:"mediaSource",sourceUpdater:this,action:Tl(e),name:"duration",doneFn:t})},n.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=ll),"string"!==typeof e&&(e=void 0),Al({type:"mediaSource",sourceUpdater:this,action:wl(e),name:"endOfStream",doneFn:t})},n.removeAudio=function(e,t,n){void 0===n&&(n=ll),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?Al({type:"audio",sourceUpdater:this,action:yl(e,t),doneFn:n,name:"remove"}):n()},n.removeVideo=function(e,t,n){void 0===n&&(n=ll),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?Al({type:"video",sourceUpdater:this,action:yl(e,t),doneFn:n,name:"remove"}):n()},n.updating=function(){return!(!hl("audio",this)&&!hl("video",this))},n.audioTimestampOffset=function(e){return"undefined"!==typeof e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Al({type:"audio",sourceUpdater:this,action:_l(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},n.videoTimestampOffset=function(e){return"undefined"!==typeof e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(Al({type:"video",sourceUpdater:this,action:_l(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},n.audioQueueCallback=function(e){this.audioBuffer&&Al({type:"audio",sourceUpdater:this,action:bl(e),name:"callback"})},n.videoQueueCallback=function(e){this.videoBuffer&&Al({type:"video",sourceUpdater:this,action:bl(e),name:"callback"})},n.dispose=function(){var e=this;this.trigger("dispose"),pl.forEach((function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"]((function(){return ml(t,e)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},t}(Xo.EventTarget),Il=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},Ol=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),Rl=function(e){function t(){return e.call(this,"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")||this}return(0,d.A)(t,e),t}((0,Pt.A)(Error)),Ll=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).mediaSource_=null,r.subtitlesTrack_=null,r.loaderType_="subtitle",r.featuresNativeTextTracks_=t.featuresNativeTextTracks,r.loadVttJs=t.loadVttJs,r.shouldSaveSegmentTimingInfo_=!1,r}(0,d.A)(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return null},n.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Xo.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Xo.createTimeRanges([[t,n]])},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Qs(e),r=this.initSegments_[n];if(t&&!r&&e.bytes){var i=Ol.byteLength+e.bytes.byteLength,a=new Uint8Array(i);a.set(e.bytes),a.set(Ol,e.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return r||e},n.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.track=function(e){return"undefined"===typeof e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},n.remove=function(e,t){el(e,t,this.subtitlesTrack_)},n.fillBuffer_=function(){var e=this,t=this.chooseNextRequest_();if(t){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){return this.syncController_.one("timestampoffset",(function(){e.state="READY",e.paused()||e.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}},n.timestampOffsetForSegment_=function(){return null},n.chooseNextRequest_=function(){return this.skipEmptySegments_(e.prototype.chooseNextRequest_.call(this))},n.skipEmptySegments_=function(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},n.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},n.segmentRequestFinished_=function(e,t,n){var r=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===xu&&this.handleTimeout_(),e.code===Pu?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var a=this.pendingSegment_;this.saveBandwidthRelatedStats_(a.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");var o=a.segment;if(o.map&&(o.map.bytes=t.map.bytes),a.bytes=t.bytes,"function"!==typeof i().WebVTT&&"function"===typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then((function(){return r.segmentRequestFinished_(e,t,n)}),(function(){return r.stopForError({message:"Error loading vtt.js"})}));o.requested=!0;try{this.parseVTTCues_(a)}catch(s){return void this.stopForError({message:s.message})}if(this.updateTimeMapping_(a,this.syncController_.timelines[a.timeline],this.playlist_),a.cues.length?a.timingInfo={start:a.cues[0].startTime,end:a.cues[a.cues.length-1].endTime}:a.timingInfo={start:a.startOfSegment,end:a.startOfSegment+a.duration},a.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");a.byteLength=a.bytes.byteLength,this.mediaSecondsLoaded+=o.duration,a.cues.forEach((function(e){r.subtitlesTrack_.addCue(r.featuresNativeTextTracks_?new(i().VTTCue)(e.startTime,e.endTime,e.text):e)})),function(e){var t=e.cues;if(t)for(var n=0;n<t.length;n++){for(var r=[],i=0,a=0;a<t.length;a++)t[n].startTime===t[a].startTime&&t[n].endTime===t[a].endTime&&t[n].text===t[a].text&&++i>1&&r.push(t[a]);r.length&&r.forEach((function(t){return e.removeCue(t)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},n.handleData_=function(){},n.updateTimingInfoEnd_=function(){},n.parseVTTCues_=function(e){var t,n=!1;if("function"!==typeof i().WebVTT)throw new Rl;"function"===typeof i().TextDecoder?t=new(i().TextDecoder)("utf8"):(t=i().WebVTT.StringDecoder(),n=!0);var r=new(i().WebVTT.Parser)(i(),i().vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=function(t){e.timestampmap=t},r.onparsingerror=function(e){Xo.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var a=e.segment.map.bytes;n&&(a=Il(a)),r.parse(a)}var o=e.bytes;n&&(o=Il(o)),r.parse(o),r.flush()},n.updateTimeMapping_=function(e,t,n){var r=e.segment;if(t)if(e.cues.length){var i=e.timestampmap,a=i.MPEGTS/xt.ONE_SECOND_IN_TS-i.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=a,e.endTime+=a})),!n.syncInfo){var o=e.cues[0].startTime,s=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(o,s-r.duration)}}}else r.empty=!0},t}(ul),Nl=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},Dl=[{name:"VOD",run:function(e,t,n,r,i){if(n!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:"ProgramDateTime",run:function(e,t,n,r,i){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var a=null,o=null,s=cs(t);i=i||0;for(var u=0;u<s.length;u++){var l=s[t.endList||0===i?u:s.length-(u+1)],c=l.segment,d=e.timelineToDatetimeMappings[c.timeline];if(d&&c.dateTimeObject){var p=c.dateTimeObject.getTime()/1e3+d;if(c.parts&&"number"===typeof l.partIndex)for(var h=0;h<l.partIndex;h++)p+=c.parts[h].duration;var f=Math.abs(i-p);if(null!==o&&(0===f||o<f))break;o=f,a={time:p,segmentIndex:l.segmentIndex,partIndex:l.partIndex}}}return a}},{name:"Segment",run:function(e,t,n,r,i){var a=null,o=null;i=i||0;for(var s=cs(t),u=0;u<s.length;u++){var l=s[t.endList||0===i?u:s.length-(u+1)],c=l.segment,d=l.part&&l.part.start||c&&c.start;if(c.timeline===r&&"undefined"!==typeof d){var p=Math.abs(i-d);if(null!==o&&o<p)break;(!a||null===o||o>=p)&&(o=p,a={time:d,segmentIndex:l.segmentIndex,partIndex:l.partIndex})}}return a}},{name:"Discontinuity",run:function(e,t,n,r,i){var a=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var o=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 d=Math.abs(i-c.time);if(null!==o&&o<d)break;(!a||null===o||o>=d)&&(o=d,a={time:c.time,segmentIndex:u,partIndex:null})}}return a}},{name:"Playlist",run:function(e,t,n,r,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],Ml=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.timelineToDatetimeMappings={},n.logger_=Jo("SyncController"),n}(0,d.A)(t,e);var n=t.prototype;return n.getSyncPoint=function(e,t,n,r){var i=this.runStrategies_(e,t,n,r);return i.length?this.selectSyncPoint_(i,{key:"time",value:r}):null},n.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+gs({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:r.segmentIndex,endIndex:0}))},n.runStrategies_=function(e,t,n,r){for(var i=[],a=0;a<Dl.length;a++){var o=Dl[a],s=o.run(this,e,t,n,r);s&&(s.strategy=o.name,i.push({strategy:o.name,syncPoint:s}))}return i},n.selectSyncPoint_=function(e,t){for(var n=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),i=e[0].strategy,a=1;a<e.length;a++){var o=Math.abs(e[a].syncPoint[t.key]-t.value);o<r&&(r=o,n=e[a].syncPoint,i=e[a].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+i+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+("number"===typeof n.partIndex?",partIndex:"+n.partIndex:"")+"]"),n},n.saveExpiredSegmentInfo=function(e,t){var n=t.mediaSequence-e.mediaSequence;if(n>86400)Xo.log.warn("Not saving expired segment info. Media sequence gap "+n+" is too large.");else for(var r=n-1;r>=0;r--){var i=e.segments[r];if(i&&"undefined"!==typeof i.start){t.syncInfo={mediaSequence:e.mediaSequence+r,time:i.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},n.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}},n.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,n=e.shouldSaveTimelineMapping,r=this.calculateSegmentTimeMapping_(t,t.timingInfo,n),i=t.segment;r&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:i.start}));var a=i.dateTimeObject;i.discontinuity&&n&&a&&(this.timelineToDatetimeMappings[i.timeline]=-a.getTime()/1e3)},n.timestampOffsetForTimeline=function(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].time},n.mappingForTimeline=function(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].mapping},n.calculateSegmentTimeMapping_=function(e,t,n){var r,i,a=e.segment,o=e.part,s=this.timelines[e.timeline];if("number"===typeof e.timestampOffset)s={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=s,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+s.time+"] [mapping: "+s.mapping+"]")),r=e.startOfSegment,i=t.end+s.mapping;else{if(!s)return!1;r=t.start+s.mapping,i=t.end+s.mapping}return o&&(o.start=r,o.end=i),(!a.start||r<a.start)&&(a.start=r),a.end=i,!0},n.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var r=0;r<t.discontinuityStarts.length;r++){var i=t.discontinuityStarts[r],a=t.discontinuitySequence+r+1,o=i-e.mediaIndex,s=Math.abs(o);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>s){var u=void 0;u=o<0?n.start-gs({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:i}):n.end+gs({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:i}),this.discontinuities[a]={time:u,accuracy:s}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(Xo.EventTarget),Ul=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}(0,d.A)(t,e);var n=t.prototype;return n.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},n.pendingTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"===typeof n&&"number"===typeof r&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},n.lastTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"===typeof n&&"number"===typeof r&&(this.lastTimelineChanges_[t]={type:t,from:n,to:r},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(Xo.EventTarget),Fl=mu(gu((function(){var e="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self?self:{};function t(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===t||null===t)&&n.path)}},n.exports),n.exports}var r=t((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0})),i=t((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),a=t((function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,i(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),o=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),a=t.length,o=0;o<a;++o)t[o].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();var s,u=null,l=function(){function e(e){var t,n,r;u||(u=function(){var e,t,n,r,i,a,o,s,u=[[[],[],[],[],[]],[[],[],[],[],[]]],l=u[0],c=u[1],d=l[4],p=c[4],h=[],f=[];for(e=0;e<256;e++)f[(h[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!d[t];t^=r||1,n=f[n]||1)for(a=(a=n^n<<1^n<<2^n<<3^n<<4)>>8^255&a^99,d[t]=a,p[a]=t,s=16843009*h[i=h[r=h[t]]]^65537*i^257*r^16843008*t,o=257*h[a]^16843008*a,e=0;e<4;e++)l[e][t]=o=o<<24^o>>>8,c[e][a]=s=s<<24^s>>>8;for(e=0;e<5;e++)l[e]=l[e].slice(0),c[e]=c[e].slice(0);return u}()),this._tables=[[u[0][0].slice(),u[0][1].slice(),u[0][2].slice(),u[0][3].slice(),u[0][4].slice()],[u[1][0].slice(),u[1][1].slice(),u[1][2].slice(),u[1][3].slice(),u[1][4].slice()]];var i=this._tables[0][4],a=this._tables[1],o=e.length,s=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");var l=e.slice(0),c=[];for(this._key=[l,c],t=o;t<4*o+28;t++)r=l[t-1],(t%o===0||8===o&&t%o===4)&&(r=i[r>>>24]<<24^i[r>>16&255]<<16^i[r>>8&255]<<8^i[255&r],t%o===0&&(r=r<<8^r>>>24^s<<24,s=s<<1^283*(s>>7))),l[t]=l[t-o]^r;for(n=0;t;n++,t--)r=l[3&n?t:t-4],c[n]=t<=4||n<4?r:a[0][i[r>>>24]]^a[1][i[r>>16&255]]^a[2][i[r>>8&255]]^a[3][i[255&r]]}return e.prototype.decrypt=function(e,t,n,r,i,a){var o,s,u,l,c=this._key[1],d=e^c[0],p=r^c[1],h=n^c[2],f=t^c[3],m=c.length/4-2,g=4,v=this._tables[1],y=v[0],_=v[1],b=v[2],w=v[3],T=v[4];for(l=0;l<m;l++)o=y[d>>>24]^_[p>>16&255]^b[h>>8&255]^w[255&f]^c[g],s=y[p>>>24]^_[h>>16&255]^b[f>>8&255]^w[255&d]^c[g+1],u=y[h>>>24]^_[f>>16&255]^b[d>>8&255]^w[255&p]^c[g+2],f=y[f>>>24]^_[d>>16&255]^b[p>>8&255]^w[255&h]^c[g+3],g+=4,d=o,p=s,h=u;for(l=0;l<4;l++)i[(3&-l)+a]=T[d>>>24]<<24^T[p>>16&255]<<16^T[h>>8&255]<<8^T[255&f]^c[g++],o=d,d=p,p=h,h=f,f=o},e}(),c=function(e){function t(){var t;return(t=e.call(this,o)||this).jobs=[],t.delay=1,t.timeout_=null,t}a(t,e);var n=t.prototype;return n.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},n.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(o),d=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},p=function(){function e(t,n,r,i){var a=e.STEP,o=new Int32Array(t.buffer),s=new Uint8Array(t.byteLength),u=0;for(this.asyncStream_=new c,this.asyncStream_.push(this.decryptChunk_(o.subarray(u,u+a),n,r,s)),u=a;u<o.length;u+=a)r=new Uint32Array([d(o[u-4]),d(o[u-3]),d(o[u-2]),d(o[u-1])]),this.asyncStream_.push(this.decryptChunk_(o.subarray(u,u+a),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=function(e,t,n){var r,i,a,o,s,u,c,p,h,f=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),m=new l(Array.prototype.slice.call(t)),g=new Uint8Array(e.byteLength),v=new Int32Array(g.buffer);for(r=n[0],i=n[1],a=n[2],o=n[3],h=0;h<f.length;h+=4)s=d(f[h]),u=d(f[h+1]),c=d(f[h+2]),p=d(f[h+3]),m.decrypt(s,u,c,p,v,h),v[h]=d(v[h]^r),v[h+1]=d(v[h+1]^i),v[h+2]=d(v[h+2]^a),v[h+3]=d(v[h+3]^o),r=s,i=u,a=c,o=p;return g}(e,t,n);r.set(i,e.byteOffset)}},r(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();s="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{};var h=s.BigInt||Number;h("0x1"),h("0x100"),h("0x10000"),h("0x1000000"),h("0x100000000"),h("0x10000000000"),h("0x1000000000000"),h("0x100000000000000"),h("0x10000000000000000");var f=function(e){var t={};return Object.keys(e).forEach((function(n){var r,i=e[n];r=i,("function"===ArrayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer)?t[n]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:t[n]=i})),t};self.onmessage=function(e){var t=e.data,n=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),r=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),i=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new p(n,r,i,(function(e,n){self.postMessage(f({source:t.source,decrypted:n}),[n.buffer])}))}}))),jl=fu(Fl),Bl=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},ql=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Hl=function(e,t){t.activePlaylistLoader=e,e.load()},zl={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],i=t.blacklistCurrentPlaylist;ql(n,r);var a=r.activeTrack(),o=r.activeGroup(),s=(o.filter((function(e){return e.default}))[0]||o[0]).id,u=r.tracks[s];if(a!==u){for(var l in Xo.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];Xo.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),ql(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},Vl={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",zl[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e],o=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),a.track(o.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",zl[e](e,n))}},Wl={AUDIO:function(e,t){var n=t.vhs,r=t.sourceType,i=t.segmentLoaders[e],a=t.requestOptions,o=t.master.mediaGroups,s=t.mediaTypes[e],u=s.groups,l=s.tracks,c=s.logger_,d=t.masterPlaylistLoader,p=Es(d.master);for(var h in o[e]&&0!==Object.keys(o[e]).length||(o[e]={main:{default:{default:!0}}},p&&(o[e].main.default.playlists=d.master.playlists)),o[e])for(var f in u[h]||(u[h]=[]),o[e][h]){var m=o[e][h][f],g=void 0;if(p?(c("AUDIO group '"+h+"' label '"+f+"' is a master playlist"),m.isMasterPlaylist=!0,g=null):g="vhs-json"===r&&m.playlists?new qs(m.playlists[0],n,a):m.resolvedUri?new qs(m.resolvedUri,n,a):m.playlists&&"dash"===r?new du(m.playlists[0],n,a,d):null,m=Xo.mergeOptions({id:f,playlistLoader:g},m),Vl[e](e,m.playlistLoader,t),u[h].push(m),"undefined"===typeof l[f]){var v=new Xo.AudioTrack({id:f,kind:Bl(m),enabled:!1,language:m.language,default:m.default,label:f});l[f]=v}}i.on("error",zl[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.vhs,i=t.sourceType,a=t.segmentLoaders[e],o=t.requestOptions,s=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,d=t.masterPlaylistLoader;for(var p in s[e])for(var h in l[p]||(l[p]=[]),s[e][p])if(!s[e][p][h].forced){var f=s[e][p][h],m=void 0;if("hls"===i)m=new qs(f.resolvedUri,r,o);else if("dash"===i){if(!f.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;m=new du(f.playlists[0],r,o,d)}else"vhs-json"===i&&(m=new qs(f.playlists?f.playlists[0]:f.resolvedUri,r,o));if(f=Xo.mergeOptions({id:h,playlistLoader:m},f),Vl[e](e,f.playlistLoader,t),l[p].push(f),"undefined"===typeof c[h]){var g=n.addRemoteTextTrack({id:h,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:h},!1).track;c[h]=g}}a.on("error",zl[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,i=t.mediaTypes[e],a=i.groups,o=i.tracks;for(var s in r[e])for(var u in a[s]||(a[s]=[]),r[e][s]){var l=r[e][s][u];if(/^(?:CC|SERVICE)/.test(l.instreamId)){var c=n.options_.vhs&&n.options_.vhs.captionServices||{},d={label:u,language:l.language,instreamId:l.instreamId,default:l.default&&l.autoselect};if(c[d.instreamId]&&(d=Xo.mergeOptions(d,c[d.instreamId])),void 0===d.default&&delete d.default,a[s].push(Xo.mergeOptions({id:u},l)),"undefined"===typeof o[u]){var p=n.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;o[u]=p}}}}},Gl=function e(t,n){for(var r=0;r<t.length;r++){if(ks(n,t[r]))return!0;if(t[r].playlists&&e(t[r].playlists,n))return!0}return!1},Xl={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}}},Kl=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){Wl[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,i=e.vhs,a=e.segmentLoaders,o=a.AUDIO,s=a.main;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var r=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,a=r.media();if(!a)return null;var o=null;a.attributes[e]&&(o=i[a.attributes[e]]);var s=Object.keys(i);if(!o)if("AUDIO"===e&&s.length>1&&Es(t.master))for(var u=0;u<s.length;u++){var l=i[s[u]];if(Gl(l,a)){o=l;break}}else i.main?o=i.main:1===s.length&&(o=i[s[0]]);return"undefined"===typeof n?o:null!==n&&o&&o.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=Xl[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,a=t.mediaTypes[e],o=a.activeTrack(),s=a.getActiveGroup(),u=a.activePlaylistLoader,l=a.lastGroup_;s&&l&&s.id===l.id||(a.lastGroup_=s,a.lastTrack_=o,ql(r,a),s&&!s.isMasterPlaylist&&(s.playlistLoader?(r.resyncLoader(),Hl(s.playlistLoader,a)):u&&i.resetEverything()))}}(n,e),t[n].onGroupChanging=function(e,t){return function(){var n=t.segmentLoaders[e];t.mediaTypes[e].lastGroup_=null,n.abort(),n.pause()}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.masterPlaylistLoader,r=t.segmentLoaders,i=r[e],a=r.main,o=t.mediaTypes[e],s=o.activeTrack(),u=o.getActiveGroup(),l=o.activePlaylistLoader,c=o.lastTrack_;if((!c||!s||c.id!==s.id)&&(o.lastGroup_=u,o.lastTrack_=s,ql(i,o),u)){if(u.isMasterPlaylist){if(!s||!c||s.id===c.id)return;var d=t.vhs.masterPlaylistController_,p=d.selectPlaylist();if(d.media()===p)return;return o.logger_("track change. Switching master audio from "+c.id+" to "+s.id),n.pause(),a.resetEverything(),void d.fastQualityChange_(p)}if("AUDIO"===e){if(!u.playlistLoader)return a.setAudio(!0),void a.resetEverything();i.setAudio(!0),a.setAudio(!1)}l!==u.playlistLoader?(i.track&&i.track(s),i.resetEverything(),Hl(u.playlistLoader,o)):Hl(u.playlistLoader,o)}}}(n,e),t[n].getActiveGroup=function(e,t){var n=t.mediaTypes;return function(){var t=n[e].activeTrack();return t?n[e].activeGroup(t):null}}(n,e)}));var u=t.AUDIO.activeGroup();if(u){var l=(u.filter((function(e){return e.default}))[0]||u[0]).id;t.AUDIO.tracks[l].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(s.setAudio(!1),o.setAudio(!0)):s.setAudio(!0)}n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))})),n.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanging()}))}));var c=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"}),r.trigger({type:"usage",name:"hls-audio-change"})};for(var d in r.audioTracks().addEventListener("change",c),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",(function(){r.audioTracks().removeEventListener("change",c),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[d])},$l=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Yl=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},Ql=function(e){function t(t){var n;n=e.call(this)||this;var r=t.src,a=t.handleManifestRedirects,o=t.withCredentials,s=t.tech,u=t.bandwidth,l=t.externVhs,d=t.useCueTags,p=t.blacklistDuration,h=t.enableLowInitialPlaylist,f=t.sourceType,m=t.cacheEncryptionKeys,g=t.experimentalBufferBasedABR,v=t.experimentalLeastPixelDiffSelector,y=t.captionServices;if(!r)throw new Error("A non-empty playlist URL or JSON manifest string is required");var _=t.maxPlaylistRetries;null!==_&&"undefined"!==typeof _||(_=1/0),cl=l,n.experimentalBufferBasedABR=Boolean(g),n.experimentalLeastPixelDiffSelector=Boolean(v),n.withCredentials=o,n.tech_=s,n.vhs_=s.vhs,n.sourceType_=f,n.useCueTags_=d,n.blacklistDuration=p,n.maxPlaylistRetries=_,n.enableLowInitialPlaylist=h,n.useCueTags_&&(n.cueTagsTrack_=n.tech_.addTextTrack("metadata","ad-cues"),n.cueTagsTrack_.inBandMetadataTrackDispatchType=""),n.requestOptions_={withCredentials:o,handleManifestRedirects:a,maxPlaylistRetries:_,timeout:null},n.on("error",n.pauseLoading),n.mediaTypes_=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:ll,activeTrack:ll,getActiveGroup:ll,onGroupChanged:ll,onTrackChanged:ll,lastTrack_:null,logger_:Jo("MediaGroups["+t+"]")}})),e}(),n.mediaSource=new(i().MediaSource),n.handleDurationChange_=n.handleDurationChange_.bind((0,c.A)(n)),n.handleSourceOpen_=n.handleSourceOpen_.bind((0,c.A)(n)),n.handleSourceEnded_=n.handleSourceEnded_.bind((0,c.A)(n)),n.mediaSource.addEventListener("durationchange",n.handleDurationChange_),n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_),n.mediaSource.addEventListener("sourceended",n.handleSourceEnded_),n.seekable_=Xo.createTimeRanges(),n.hasPlayed_=!1,n.syncController_=new Ml(t),n.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new jl,n.sourceUpdater_=new Pl(n.mediaSource),n.inbandTextTracks_={},n.timelineChangeController_=new Ul;var b={vhs:n.vhs_,parse708captions:t.parse708captions,useDtsForTimestampOffset:t.useDtsForTimestampOffset,captionServices:y,mediaSource:n.mediaSource,currentTime:n.tech_.currentTime.bind(n.tech_),seekable:function(){return n.seekable()},seeking:function(){return n.tech_.seeking()},duration:function(){return n.duration()},hasPlayed:function(){return n.hasPlayed_},goalBufferLength:function(){return n.goalBufferLength()},bandwidth:u,syncController:n.syncController_,decrypter:n.decrypter_,sourceType:n.sourceType_,inbandTextTracks:n.inbandTextTracks_,cacheEncryptionKeys:m,sourceUpdater:n.sourceUpdater_,timelineChangeController:n.timelineChangeController_,experimentalExactManifestTimings:t.experimentalExactManifestTimings};n.masterPlaylistLoader_="dash"===n.sourceType_?new du(r,n.vhs_,n.requestOptions_):new qs(r,n.vhs_,n.requestOptions_),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new ul(Xo.mergeOptions(b,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),t),n.audioSegmentLoader_=new ul(Xo.mergeOptions(b,{loaderType:"audio"}),t),n.subtitleSegmentLoader_=new Ll(Xo.mergeOptions(b,{loaderType:"vtt",featuresNativeTextTracks:n.tech_.featuresNativeTextTracks,loadVttJs:function(){return new Promise((function(e,t){function n(){s.off("vttjserror",r),e()}function r(){s.off("vttjsloaded",n),t()}s.one("vttjsloaded",n),s.one("vttjserror",r),s.addWebVttScript_()}))}}),t),n.setupSegmentLoaderListeners_(),n.experimentalBufferBasedABR&&(n.masterPlaylistLoader_.one("loadedplaylist",(function(){return n.startABRTimer_()})),n.tech_.on("pause",(function(){return n.stopABRTimer_()})),n.tech_.on("play",(function(){return n.startABRTimer_()}))),$l.forEach((function(e){n[e+"_"]=Yl.bind((0,c.A)(n),e)})),n.logger_=Jo("MPC"),n.triggeredFmp4Usage=!1,"none"===n.tech_.preload()?(n.loadOnPlay_=function(){n.loadOnPlay_=null,n.masterPlaylistLoader_.load()},n.tech_.one("play",n.loadOnPlay_)):n.masterPlaylistLoader_.load(),n.timeToLoadedData__=-1,n.mainAppendsToLoadedData__=-1,n.audioAppendsToLoadedData__=-1;var w="none"===n.tech_.preload()?"play":"loadstart";return n.tech_.one(w,(function(){var e=Date.now();n.tech_.one("loadeddata",(function(){n.timeToLoadedData__=Date.now()-e,n.mainAppendsToLoadedData__=n.mainSegmentLoader_.mediaAppends,n.audioAppendsToLoadedData__=n.audioSegmentLoader_.mediaAppends}))})),n}(0,d.A)(t,e);var n=t.prototype;return n.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},n.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},n.appendsToLoadedData_=function(){var e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t},n.timeToLoadedData_=function(){return this.timeToLoadedData__},n.checkABR_=function(e){void 0===e&&(e="abr");var t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)},n.switchMedia_=function(e,t,n){var r=this.media(),i=r&&(r.id||r.uri),a=e.id||e.uri;i&&i!==a&&(this.logger_("switch media "+i+" -> "+a+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,n)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=i().setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(i().clearInterval(this.abrTimer_),this.abrTimer_=null)},n.getAudioTrackPlaylists_=function(){var e=this.master(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;var n,r=e.mediaGroups.AUDIO,i=Object.keys(r);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{var a=r.main||i.length&&r[i[0]];for(var o in a)if(a[o].default){n={label:o};break}}if(!n)return t;var s=[];for(var u in r)if(r[u][n.label]){var l=r[u][n.label];if(l.playlists&&l.playlists.length)s.push.apply(s,l.playlists);else if(l.uri)s.push(l);else if(e.playlists.length)for(var c=0;c<e.playlists.length;c++){var d=e.playlists[c];d.attributes&&d.attributes.AUDIO&&d.attributes.AUDIO===u&&s.push(d)}}return s.length?s:t},n.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Ts(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()),Kl({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(function(){e.trigger("selectedinitialmedia")}))})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var t=e.masterPlaylistLoader_.media();if(!t){var n;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),!n||!e.shouldSwitchToMedia_(n))return;if(e.initialMedia_=n,e.switchMedia_(e.initialMedia_,"initial"),!("vhs-json"===e.sourceType_&&e.initialMedia_.segments))return;t=e.initialMedia_}e.handleUpdatedMediaPlaylist(t)})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Ts(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.masterPlaylistLoader_.load(),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();"playlist-unchanged"!==t.lastExcludeReason_&&(e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),e.tech_.trigger("playliststuck")))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))},n.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},n.triggerPresenceUsage_=function(e,t){var n=e.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var a in n.AUDIO)for(var o in n.AUDIO[a]){n.AUDIO[a][o].uri||(r=!1)}r&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(n.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),cl.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),i.length&&Object.keys(n.AUDIO[i[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},n.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,n=this.tech_.currentTime(),r=this.bufferLowWaterLine(),i=this.bufferHighWaterLine();return function(e){var t=e.currentPlaylist,n=e.buffered,r=e.currentTime,i=e.nextPlaylist,a=e.bufferLowWaterLine,o=e.bufferHighWaterLine,s=e.duration,u=e.experimentalBufferBasedABR,l=e.log;if(!i)return Xo.log.warn("We received no playlist to switch to. Please check your stream."),!1;var c="allowing switch "+(t&&t.id||"null")+" -> "+i.id;if(!t)return l(c+" as current playlist is not set"),!0;if(i.id===t.id)return!1;var d=Boolean(ns(n,r).length);if(!t.endList)return d||"number"!==typeof t.partTargetDuration?(l(c+" as current playlist is live"),!0):(l("not "+c+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var p=ss(n,r),h=u?pu.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:pu.MAX_BUFFER_LOW_WATER_LINE;if(s<h)return l(c+" as duration < max low water line ("+s+" < "+h+")"),!0;var f=i.attributes.BANDWIDTH,m=t.attributes.BANDWIDTH;if(f<m&&(!u||p<o)){var g=c+" as next bandwidth < current bandwidth ("+f+" < "+m+")";return u&&(g+=" and forwardBuffer < bufferHighWaterLine ("+p+" < "+o+")"),l(g),!0}if((!u||f>m)&&p>=a){var v=c+" as forwardBuffer >= bufferLowWaterLine ("+p+" >= "+a+")";return u&&(v+=" and next bandwidth > current bandwidth ("+f+" > "+m+")"),l(v),!0}return l("not "+c+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:n,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:r,bufferHighWaterLine:i,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",(function(){e.checkABR_("bandwidthupdate"),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("timeout",(function(){e.experimentalBufferBasedABR&&e.mainSegmentLoader_.load()})),this.experimentalBufferBasedABR||this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")})),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("appenderror",(function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("ended",(function(){e.logger_("main segment loader ended"),e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))}));var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()}))},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},n.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything((function(){Xo.browser.IE_VERSION||Xo.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())}))):this.logger_("skipping fastQualityChange because new media is same as old")},n.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},n.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var n=this.seekable();if(!n.length)return!1;if(Xo.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(n.end(0)),e.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(n.end(0))}return this.hasPlayed_=!0,this.load(),!0},n.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();"undefined"!==typeof e&&"function"===typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")},n.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(e&&e.length){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},n.handleDurationChange_=function(){this.tech_.trigger("durationchange")},n.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){var t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},n.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var n=cl.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=es;var a=i.end(i.length-1);return a-r<=es&&n-a<=es},n.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var n=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!n)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));n.playlistErrors_++;var r,i=this.masterPlaylistLoader_.master.playlists,a=i.filter(bs),o=1===a.length&&a[0]===n;if(1===i.length&&t!==1/0)return Xo.log.warn("Problem encountered with playlist "+n.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(o);if(o){var s=!1;i.forEach((function(e){if(e!==n){var t=e.excludeUntil;"undefined"!==typeof t&&t!==1/0&&(s=!0,delete e.excludeUntil)}})),s&&(Xo.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}r=n.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*t,n.excludeUntil=r,e.reason&&(n.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var u=this.selectPlaylist();if(!u)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var l=e.internal?this.logger_:Xo.log.warn,c=e.message?" "+e.message:"";l((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+c+" Switching to playlist "+u.id+"."),u.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),u.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var d=u.targetDuration/2*1e3||5e3,p="number"===typeof u.lastRequest&&Date.now()-u.lastRequest<=d;return this.switchMedia_(u,"exclude",o||p)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n=this,r=[],i="all"===e;(i||"main"===e)&&r.push(this.masterPlaylistLoader_);var a=[];(i||"audio"===e)&&a.push("AUDIO"),(i||"subtitle"===e)&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach((function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&r.push(t)})),["main","audio","subtitle"].forEach((function(t){var i=n[t+"SegmentLoader_"];!i||e!==t&&"all"!==e||r.push(i)})),r.forEach((function(e){return t.forEach((function(t){"function"===typeof e[t]&&e[t]()}))}))},n.setCurrentTime=function(e){var t=ns(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:cl.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.duration());if(null!==n){var r=this.masterPlaylistLoader_.master,i=cl.Playlist.seekable(t,n,cl.Playlist.liveEdgeDelay(r,t));if(0!==i.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=cl.Playlist.seekable(t,n,cl.Playlist.liveEdgeDelay(r,t))).length)return}var a,o;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),o=this.seekable_.start(0)),e?e.start(0)>i.end(0)||i.start(0)>e.end(0)?this.seekable_=i:this.seekable_=Xo.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)===a&&this.seekable_.start(0)===o||(this.logger_("seekable updated ["+is(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},n.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var n=this.tech_.buffered(),r=cl.Playlist.duration(this.masterPlaylistLoader_.media());n.length>0&&(r=Math.max(r,n.end(n.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}},n.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var r in n)n[r].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),n=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!n)},n.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},n=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();t.video=t.main;var r=Wu(this.master(),n),i={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(i.video=r.video||t.main.videoCodec||"avc1.4d400d"),t.main.isMuxed&&(i.video+=","+(r.audio||t.main.audioCodec||W)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||a)&&(i.audio=r.audio||t.main.audioCodec||t.audio.audioCodec||W,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),i.audio||i.video){var o,s={};if(["video","audio"].forEach((function(e){if(i.hasOwnProperty(e)&&(r=t[e].isFmp4,a=i[e],!(r?z(a):V(a)))){var n=t[e].isFmp4?"browser":"muxer";s[n]=s[n]||[],s[n].push(i[e]),"audio"===e&&(o=n)}var r,a})),a&&o&&n.attributes.AUDIO){var u=n.attributes.AUDIO;this.master().playlists.forEach((function(e){(e.attributes&&e.attributes.AUDIO)===u&&e!==n&&(e.excludeUntil=1/0)})),this.logger_("excluding audio group "+u+" as "+o+' does not support codec(s): "'+i.audio+'"')}if(!Object.keys(s).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var l=[];if(["video","audio"].forEach((function(t){var n=(B(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,r=(B(i[t]||"")[0]||{}).type;n&&r&&n.toLowerCase()!==r.toLowerCase()&&l.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+i[t]+'"')})),l.length)return void this.blacklistCurrentPlaylist({playlist:n,message:"Codec switching not supported: "+l.join(", ")+".",blacklistDuration:1/0,internal:!0})}return i}var c=Object.keys(s).reduce((function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+s[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:n,internal:!0,message:c,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:n,message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach((function(r){var i=t[r];if(-1===n.indexOf(i.id)){n.push(i.id);var a=Wu(e.master,i),o=[];!a.audio||V(a.audio)||z(a.audio)||o.push("audio codec "+a.audio),!a.video||V(a.video)||z(a.video)||o.push("video codec "+a.video),a.text&&"stpp.ttml.im1t"===a.text&&o.push("text codec "+a.text),o.length&&(i.excludeUntil=1/0,e.logger_("excluding "+i.id+" for unsupported: "+o.join(", ")))}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=[],r=this.master().playlists,i=zu(B(e)),a=Vu(i),o=i.video&&B(i.video)[0]||null,s=i.audio&&B(i.audio)[0]||null;Object.keys(r).forEach((function(e){var i=r[e];if(-1===n.indexOf(i.id)&&i.excludeUntil!==1/0){n.push(i.id);var u=[],l=Wu(t.masterPlaylistLoader_.master,i),c=Vu(l);if(l.audio||l.video){if(c!==a&&u.push('codec count "'+c+'" !== "'+a+'"'),!t.sourceUpdater_.canChangeType()){var d=l.video&&B(l.video)[0]||null,p=l.audio&&B(l.audio)[0]||null;d&&o&&d.type.toLowerCase()!==o.type.toLowerCase()&&u.push('video codec "'+d.type+'" !== "'+o.type+'"'),p&&s&&p.type.toLowerCase()!==s.type.toLowerCase()&&u.push('audio codec "'+p.type+'" !== "'+s.type+'"')}u.length&&(i.excludeUntil=1/0,t.logger_("blacklisting "+i.id+": "+u.join(" && ")))}}}))},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t,n){if(void 0===n&&(n=0),e.segments)for(var r,a=n,o=0;o<e.segments.length;o++){var s=e.segments[o];if(r||(r=Nl(t,a+s.duration/2)),r){if("cueIn"in s){r.endTime=a,r.adEndTime=a,a+=s.duration,r=null;continue}if(a<r.endTime){a+=s.duration;continue}r.endTime+=s.duration}else if("cueOut"in s&&((r=new(i().VTTCue)(a,a+s.duration,s.cueOut)).adStartTime=a,r.adEndTime=a+parseFloat(s.cueOut),t.addCue(r)),"cueOutCont"in s){var u=s.cueOutCont.split("/").map(parseFloat),l=u[0],c=u[1];(r=new(i().VTTCue)(a,a+s.duration,"")).adStartTime=a-l,r.adEndTime=r.adStartTime+c,t.addCue(r)}a+=s.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var e=this.tech_.currentTime(),t=pu.GOAL_BUFFER_LENGTH,n=pu.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,pu.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)},n.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=pu.BUFFER_LOW_WATER_LINE,n=pu.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,pu.MAX_BUFFER_LOW_WATER_LINE),i=Math.max(t,pu.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?i:r)},n.bufferHighWaterLine=function(){return pu.BUFFER_HIGH_WATER_LINE},t}(Xo.EventTarget),Jl=function(e,t,n){var r,i,a,o=e.masterPlaylistController_,s=o[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(o);if(t.attributes){var u=t.attributes.RESOLUTION;this.width=u&&u.width,this.height=u&&u.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=Wu(o.master(),t),this.playlist=t,this.id=n,this.enabled=(r=e.playlists,i=t.id,a=s,function(e){var t=r.master.playlists[i],n=_s(t),o=bs(t);return"undefined"===typeof e?o:(e?delete t.disabled:t.disabled=!0,e===o||n||(a(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},Zl=["seeking","seeked","pause","playing","error"],ec=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Jo("PlaybackWatcher"),this.logger_("initialize");var n=function(){return t.monitorCurrentTime_()},r=function(){return t.monitorCurrentTime_()},a=function(){return t.techWaiting_()},o=function(){return t.cancelTimer_()},s=this.masterPlaylistController_,u=["main","subtitle","audio"],l={};u.forEach((function(e){l[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},s[e+"SegmentLoader_"].on("appendsdone",l[e].updateend),s[e+"SegmentLoader_"].on("playlistupdate",l[e].reset),t.tech_.on(["seeked","seeking"],l[e].reset)}));var c=function(e){["main","audio"].forEach((function(n){s[n+"SegmentLoader_"][e]("appended",t.seekingAppendCheck_)}))};this.seekingAppendCheck_=function(){t.fixesBadSeeks_()&&(t.consecutiveUpdates=0,t.lastRecordedTime=t.tech_.currentTime(),c("off"))},this.clearSeekingAppendCheck_=function(){return c("off")},this.watchForBadSeeking_=function(){t.clearSeekingAppendCheck_(),c("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",a),this.tech_.on(Zl,o),this.tech_.on("canplay",r),this.tech_.one("play",n),this.dispose=function(){t.clearSeekingAppendCheck_(),t.logger_("dispose"),t.tech_.off("waiting",a),t.tech_.off(Zl,o),t.tech_.off("canplay",r),t.tech_.off("play",n),t.tech_.off("seeking",t.watchForBadSeeking_),t.tech_.off("seeked",t.clearSeekingAppendCheck_),u.forEach((function(e){s[e+"SegmentLoader_"].off("appendsdone",l[e].updateend),s[e+"SegmentLoader_"].off("playlistupdate",l[e].reset),t.tech_.off(["seeked","seeking"],l[e].reset)})),t.checkCurrentTimeTimeout_&&i().clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&i().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=i().setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,n=t[e+"SegmentLoader_"],r=n.buffered_(),i=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this[e+"Buffered_"],r);this[e+"Buffered_"]=r,i?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:n.playlist_&&n.playlist_.id,buffered:as(r)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&t.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+es>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),n=this.tech_.currentTime();this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,n)){var r=t.start(0);e=r+(r===t.end(0)?0:es)}if("undefined"!==typeof e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+is(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;for(var i=this.masterPlaylistController_.sourceUpdater_,a=this.tech_.buffered(),o=i.audioBuffer?i.audioBuffered():null,s=i.videoBuffer?i.videoBuffered():null,u=this.media(),l=u.partTargetDuration?u.partTargetDuration:2*(u.targetDuration-Zo),c=[o,s],d=0;d<c.length;d++){if(c[d])if(ss(c[d],n)<l)return!1}var p=rs(a,n);return 0!==p.length&&(e=p.start(0)+es,this.logger_("Buffered region starts ("+p.start(0)+") just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=ns(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+n.start(0)+" -> "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var a=rs(i,t);if(a.length>0){var o=a.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+o+", seeking to "+a.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*o,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,r){if(void 0===r&&(r=!1),!e.length)return!1;var i=e.end(e.length-1)+es;return!n.endList&&r&&(i=e.end(e.length-1)+3*n.targetDuration),t>i},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t=e.videoBuffered,n=e.audioBuffered,r=e.currentTime;if(t){var i;if(t.length&&n.length){var a=ns(t,r-3),o=ns(t,r),s=ns(n,r);s.length&&!o.length&&a.length&&(i={start:a.end(0),end:s.end(0)})}else{rs(t,r).length||(i=this.gapFromVideoUnderflow_(t,r))}return!!i&&(this.logger_("Encountered a gap in video from "+i.start+" to "+i.end+". Seeking to current time "+r),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=rs(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)+Zo),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},t.gapFromVideoUnderflow_=function(e,t){for(var n=function(e){if(e.length<2)return Xo.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 Xo.createTimeRanges(t)}(e),r=0;r<n.length;r++){var i=n.start(r),a=n.end(r);if(t-i<4&&t-i>2)return{start:i,end:a}}return null},e}(),tc={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},nc=function e(t,n){var r=0,i=0,a=Xo.mergeOptions(tc,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var o=function(){i&&t.currentTime(i)},s=function(e){null!==e&&void 0!==e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",o),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){return Date.now()-r<1e3*a.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):a.getSource&&"function"===typeof a.getSource?(r=Date.now(),a.getSource.call(t,s)):void Xo.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},l=function e(){t.off("loadedmetadata",o),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=function(n){l(),e(t,n)}},rc="2.16.3",ic={PlaylistLoader:qs,Playlist:Cs,utils:eu,STANDARD_PLAYLIST_SELECTOR:Ju,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(Cs.isEnabled);return $u(t,(function(e,t){return Yu(e,t)})),t.filter((function(t){return!!Wu(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:Ju,movingAverageBandwidthSelector:function(e){var t=-1,n=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var r=this.useDevicePixelRatio&&i().devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,n=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==n&&(t=e*this.systemBandwidth+(1-e)*t,n=this.systemBandwidth),Qu(this.playlists.master,t,parseInt(Ku(this.tech_.el(),"width"),10)*r,parseInt(Ku(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:Yu,comparePlaylistResolution:function(e,t){var n,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||i().Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),n===(r=r||i().Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-r},xhr:Ws()};Object.keys(pu).forEach((function(e){Object.defineProperty(ic,e,{get:function(){return Xo.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),pu[e]},set:function(t){Xo.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!==typeof t||t<0?Xo.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):pu[e]=t}})}));var ac="videojs-vhs",oc=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"})};ic.canPlaySource=function(){return Xo.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var sc=function(e){var t=e.player,n=e.sourceKeySystems,r=e.audioMedia,i=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var a=function(e,t){return e.reduce((function(e,n){if(!n.contentProtection)return e;var r=t.reduce((function(e,t){var r=n.contentProtection[t];return r&&r.pssh&&(e[t]={pssh:r.pssh}),e}),{});return Object.keys(r).length&&e.push(r),e}),[])}(r?i.concat([r]):i,Object.keys(n)),o=[],s=[];return a.forEach((function(e){s.push(new Promise((function(e,n){t.tech_.one("keysessioncreated",e)}))),o.push(new Promise((function(n,r){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?r(e):n()}))})))})),Promise.race([Promise.all(o),Promise.race(s)])},uc=function(e){var t=e.player,n=function(e,t,n){if(!e)return e;var r={};t&&t.attributes&&t.attributes.CODECS&&(r=zu(B(t.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(r.audio=n.attributes.CODECS);var i=H(r.video),a=H(r.audio),o={};for(var s in e)o[s]={},a&&(o[s].audioContentType=a),i&&(o[s].videoContentType=i),t.contentProtection&&t.contentProtection[s]&&t.contentProtection[s].pssh&&(o[s].pssh=t.contentProtection[s].pssh),"string"===typeof e[s]&&(o[s].url=e[s]);return Xo.mergeOptions(e,o)}(e.sourceKeySystems,e.media,e.audioMedia);return!!n&&(t.currentSource().keySystems=n,!(n&&!t.eme)||(Xo.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},lc=function(){if(!i().localStorage)return null;var e=i().localStorage.getItem(ac);if(!e)return null;try{return JSON.parse(e)}catch(t){return null}};ic.supportsNativeHls=function(){if(!o()||!o().createElement)return!1;var e=o().createElement("video");if(!Xo.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))}))}(),ic.supportsNativeDash=!!(o()&&o().createElement&&Xo.getTech("Html5").isSupported())&&/maybe|probably/i.test(o().createElement("video").canPlayType("application/dash+xml")),ic.supportsTypeNatively=function(e){return"hls"===e?ic.supportsNativeHls:"dash"===e&&ic.supportsNativeDash},ic.isSupported=function(){return Xo.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var cc=function(e){function t(t,n,r){var i;if(i=e.call(this,n,Xo.mergeOptions(r.hls,r.vhs))||this,r.hls&&Object.keys(r.hls).length&&Xo.log.warn("Using hls options is deprecated. Please rename `hls` to `vhs` in your options object."),"number"===typeof r.initialBandwidth&&(i.options_.bandwidth=r.initialBandwidth),i.logger_=Jo("VhsHandler"),n.options_&&n.options_.playerId){var a=Xo(n.options_.playerId);a.hasOwnProperty("hls")||Object.defineProperty(a,"hls",{get:function(){return Xo.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"hls-player-access"}),(0,c.A)(i)},configurable:!0}),a.hasOwnProperty("vhs")||Object.defineProperty(a,"vhs",{get:function(){return Xo.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"vhs-player-access"}),(0,c.A)(i)},configurable:!0}),a.hasOwnProperty("dash")||Object.defineProperty(a,"dash",{get:function(){return Xo.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),(0,c.A)(i)},configurable:!0}),i.player_=a}if(i.tech_=n,i.source_=t,i.stats={},i.ignoreNextSeekingEvent_=!1,i.setOptions_(),i.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(i.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return i.on(o(),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=o().fullscreenElement||o().webkitFullscreenElement||o().mozFullScreenElement||o().msFullscreenElement;t&&t.contains(i.tech_.el())?i.masterPlaylistController_.fastQualityChange_():i.masterPlaylistController_.checkABR_()})),i.on(i.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),i.on(i.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),i.on(i.tech_,"play",i.play),i}(0,d.A)(t,e);var n=t.prototype;return n.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage="undefined"!==typeof this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!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=lc();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!==typeof this.options_.bandwidth&&(this.options_.bandwidth=pu.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===pu.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","useDtsForTimestampOffset","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach((function(t){"undefined"!==typeof e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},n.src=function(e,t){var n=this;if(e){var r;this.setOptions_(),this.options_.src=0===(r=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(r.substring(r.indexOf(",")+1)):r,this.options_.tech=this.tech_,this.options_.externVhs=ic,this.options_.sourceType=K(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.options_.smoothQualityChange&&Xo.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new Ql(this.options_);var a=Xo.mergeOptions({liveRangeSafeTimeDelta:es},this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new ec(a),this.masterPlaylistController_.on("error",(function(){var e=Xo.players[n.tech_.options_.playerId],t=n.masterPlaylistController_.error;"object"!==typeof t||t.code?"string"===typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var o=this.options_.experimentalBufferBasedABR?ic.movingAverageBandwidthSelector(.55):ic.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):o.bind(this),this.masterPlaylistController_.selectInitialPlaylist=ic.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(){var e=this.masterPlaylistController_.mainSegmentLoader_.bandwidth,t=i().navigator.connection||i().navigator.mozConnection||i().navigator.webkitConnection,n=1e7;if(this.options_.useNetworkInformationApi&&t){var r=1e3*t.downlink*1e3;e=r>=n&&e>=n?Math.max(e,r):r}return e},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){Xo.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},mediaAppends:{get:function(){return n.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return n.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return n.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return n.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return n.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return as(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 as(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(!i().localStorage)return!1;var t=lc();t=t?Xo.mergeOptions(t,e):e;try{i().localStorage.setItem(ac,JSON.stringify(t))}catch(n){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e;(e=n).representations=function(){var t=e.masterPlaylistController_.master(),n=Es(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return n?n.filter((function(e){return!_s(e)})).map((function(t,n){return new Jl(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){n.setupEme_()})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=i().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.createKeySessions_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),sc({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(t){e.logger_("error while creating EME key session",t),e.player_.error({message:"Failed to initialize media keys for EME",code:3})}))},n.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},n.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=uc({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});this.player_.tech_.on("keystatuschange",(function(t){if("output-restricted"===t.status){var n=e.masterPlaylistController_.master();if(n&&n.playlists){var r,i=[];if(n.playlists.forEach((function(e){e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height>=720&&(!e.excludeUntil||e.excludeUntil<1/0)&&(e.excludeUntil=1/0,i.push(e))})),i.length)(r=Xo.log).warn.apply(r,['DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(i)),e.masterPlaylistController_.fastQualityChange_()}}})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==Xo.browser.IE_VERSION&&n?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=Xo.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)})),oc(t,n.playlists)})),this.playlists.on("mediachange",(function(){oc(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":rc,"mux.js":"6.0.1","mpd-parser":"0.22.1","m3u8-parser":"4.8.0","aes-decrypter":"3.1.3"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return Pl.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&i().URL.revokeObjectURL&&(i().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),e.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return tu({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=2),nu({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(Xo.getComponent("Component")),dc={name:"videojs-http-streaming",VERSION:rc,canHandleSource:function(e,t){void 0===t&&(t={});var n=Xo.mergeOptions(Xo.options,t);return dc.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var r=Xo.mergeOptions(Xo.options,n);return t.vhs=new cc(e,t,r),Xo.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return Xo.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=Ws(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){var n=K(e);if(!n)return"";var r=dc.getOverrideNative(t);return!ic.supportsTypeNatively(n)||r?"maybe":""},getOverrideNative:function(e){void 0===e&&(e={});var t=e,n=t.vhs,r=void 0===n?{}:n,i=t.hls,a=void 0===i?{}:i,o=!(Xo.browser.IS_ANY_SAFARI||Xo.browser.IS_IOS),s=r.overrideNative,u=void 0===s?o:s,l=a.overrideNative;return void 0!==l&&l||u}};(z("avc1.4d400d,mp4a.40.2")&&Xo.getTech("Html5").registerSourceHandler(dc,0),Xo.VhsHandler=cc,Object.defineProperty(Xo,"HlsHandler",{get:function(){return Xo.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),cc},configurable:!0}),Xo.VhsSourceHandler=dc,Object.defineProperty(Xo,"HlsSourceHandler",{get:function(){return Xo.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),dc},configurable:!0}),Xo.Vhs=ic,Object.defineProperty(Xo,"Hls",{get:function(){return Xo.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),ic},configurable:!0}),Xo.use||(Xo.registerComponent("Hls",ic),Xo.registerComponent("Vhs",ic)),Xo.options.vhs=Xo.options.vhs||{},Xo.options.hls=Xo.options.hls||{},Xo.getPlugin&&Xo.getPlugin("reloadSourceOnError"))||(Xo.registerPlugin||Xo.plugin)("reloadSourceOnError",(function(e){nc(this,e)}));var pc=Xo},37974:function(e,t,n){var r=n(77626),i=e.exports={WebVTT:n(42181),VTTCue:n(25118),VTTRegion:n(47913)};r.vttjs=i,r.WebVTT=i.WebVTT;var a=i.VTTCue,o=i.VTTRegion,s=r.VTTCue,u=r.VTTRegion;i.shim=function(){r.VTTCue=a,r.VTTRegion=o},i.restore=function(){r.VTTCue=s,r.VTTRegion=u},r.VTTCue||i.shim()},42181:function(e,t,n){var r=n(15063),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 a(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function o(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 a in i)if("string"===typeof i[a]){var o=i[a].split(n);if(2===o.length)t(o[0].trim(),o[1].trim())}}function l(e,t,n){var r=e;function i(){var t=o(e);if(null===t)throw new a(a.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 a(a.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 a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[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(i){}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(i){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(i){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)}a.prototype=i(Error.prototype),a.prototype.constructor=a,a.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&&r.createElement("textarea"),d={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},p={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)"},h={v:"title",lang:"lang"},f={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!f[t.localName]||f[t.localName]===e.localName}function i(t,n){var r=d[t];if(!r)return null;var i=e.document.createElement(r),a=h[t];return a&&n&&(i[a]=n.trim()),i}for(var a,s,u=e.document.createElement("div"),l=u,m=[];null!==(a=n());)if("<"!==a[0])l.appendChild(e.document.createTextNode((s=a,c.innerHTML=s,s=c.textContent,c.textContent="",s)));else{if("/"===a[1]){m.length&&m[m.length-1]===a.substr(2).replace(">","")&&(m.pop(),l=l.parentNode);continue}var g,v=o(a.substr(1,a.length-2));if(v){g=e.document.createProcessingInstruction("timestamp",v),l.appendChild(g);continue}var y=a.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(!(g=i(y[1],y[3])))continue;if(!r(l,g))continue;if(y[2]){var _=y[2].split(".");_.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(p.hasOwnProperty(n)){var r=t?"background-color":"color",i=p[n];g.style[r]=i}})),g.className=_.join(" ")}m.push(y[1]),l.appendChild(g),l=g}return u}var g=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function v(e){for(var t=0;t<g.length;t++){var n=g[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function y(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function 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 a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[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 a=0;a<n.length;a++)if(v(n.charCodeAt(a)))return"rtl";return"ltr"}function _(){}function b(e,t,n){_.call(this),this.cue=t,this.cueDiv=m(e,t.text);var 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:y(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(t.positionAlign){case"start":case"line-left":i=t.position;break;case"center":i=t.position-t.size/2;break;case"end":case"line-right":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 w(e){var t,n,r,i;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||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 T(e,t,n,r){var i=new w(t),a=t.cue,o=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}(a),s=[];if(a.snapToLines){var u;switch(a.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(o),d=n[u]+l,p=s[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),o<0&&(c+=""===a.vertical?n.height:n.width,s=s.reverse()),i.move(p,c)}else{var h=i.lineHeight/n.height*100;switch(a.lineAlign){case"center":o-=h/2;break;case"end":o-=h}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")})}s=["+y","-x","+x","-y"],i=new w(t)}var f=function(e,t){for(var i,a=new w(e),o=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);o>u&&(i=new w(e),o=u),e=new w(a)}return i||a}(i,s);t.move(f.toCSSCompatValues(n))}function k(){}_.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},_.prototype.formatStyle=function(e,t){return 0===e?0:e+t},b.prototype=i(_.prototype),b.prototype.constructor=b,w.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}},w.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},w.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},w.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},w.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}},w.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)},w.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}},w.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}},k.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!==typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},k.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null};k.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=[],a=w.getSimpleBoxPosition(r),o={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var n,s,u=0;u<t.length;u++)s=t[u],n=new b(e,s,o),r.appendChild(n.div),T(0,n,a,i),s.displayState=n.div,i.push(w.getSimpleBoxPosition(n))}()}else for(var s=0;s<t.length;s++)r.appendChild(t[s].displayState)},k.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=[]},k.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof a))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){if("X-TIMESTAMP-MAP"===e)!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",o(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}),/=/):u(e,(function(e,n){if("Region"===e)!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 a(a.Errors.BadSignature);t.state="HEADER"}for(var d=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(d?d=!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(h){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(h){t.reportOrThrowError(h),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var p=-1!==i.indexOf("--\x3e");if(!i||p&&(d=!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(h){t.reportOrThrowError(h),"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(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new a(a.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=k},25118:function(e){var t={"":1,lr:1,rl:1},n={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function r(e){return"string"===typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}function i(e,n,i){this.hasBeenReset=!1;var a="",o=!1,s=e,u=n,l=i,c=null,d="",p=!0,h="auto",f="start",m="auto",g="auto",v=100,y="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return a},set:function(e){a=""+e}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(e){o=!!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 d},set:function(e){var n=function(e){return"string"===typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===n)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");d=n,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return p},set:function(e){p=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return h},set:function(e){if("number"!==typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");h=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=r(e);t?(f=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return g},set:function(e){var t=r(e);t?(g=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return y},set:function(e){var t=r(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");y=t,this.hasBeenReset=!0}}}),this.displayState=void 0}i.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=i},47913:function(e){var t={"":!0,up:!0};function n(e){return"number"===typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,r=3,i=0,a=100,o=0,s=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!n(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return r},set:function(e){if("number"!==typeof e)throw new TypeError("Lines must be set to a number.");r=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!n(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!n(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!n(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(e){if(!n(e))throw new Error("ViewportAnchorX must be between 0 and 100.");o=e}},scroll:{enumerable:!0,get:function(){return u},set:function(e){var n=function(e){return"string"===typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);!1===n?console.warn("Scroll: an invalid or illegal string was specified."):u=n}}})}},47838:function(e,t){var n,r,i;r=[],n=function(){var e={},t=function(e){var t={watermark_id:"wm_div_id",watermark_prefix:"mask_div_id",watermark_txt:"\u6d4b\u8bd5\u6c34\u5370",watermark_x:20,watermark_y:20,watermark_rows:0,watermark_cols:0,watermark_x_space:100,watermark_y_space:50,watermark_font:"\u5fae\u8f6f\u96c5\u9ed1",watermark_color:"black",watermark_fontsize:"18px",watermark_alpha:.15,watermark_width:100,watermark_height:100,watermark_angle:15,watermark_parent_width:0,watermark_parent_height:0,watermark_parent_node:null};if(1===arguments.length&&"object"===typeof arguments[0]){var n=arguments[0]||{};for(key in n)n[key]&&t[key]&&n[key]===t[key]||(n[key]||0===n[key])&&(t[key]=n[key])}var r=document.getElementById(t.watermark_id);if(r){var i=r.parentNode;i&&i.removeChild(r)}var a=Math.max(document.body.scrollWidth,document.body.clientWidth)-t.watermark_width/2,o=Math.max(document.body.scrollHeight,document.body.clientHeight,document.documentElement.clientHeight)-t.watermark_height/2,s=arguments[0]||{},u=t.watermark_parent_node,l=0,c=0;s.watermark_parent_width||s.watermark_parent_height?(s.watermark_parent_width?a=s.watermark_parent_width-t.watermark_width/2:t.watermark_parent_node&&(a=u.offsetWidth-t.watermark_width/2),s.watermark_parent_height?o=s.watermark_parent_height-t.watermark_height/2:t.watermark_parent_node&&(o=Math.max(u.offsetHeight,u.scrollHeight)-t.watermark_height/2),u&&(l=u.offsetTop||0,c=u.offsetLeft||0,t.watermark_x=t.watermark_x+c,t.watermark_y=t.watermark_y+l)):u&&(l=u.offsetTop||0,c=u.offsetLeft||0,a=u.offsetWidth-t.watermark_width/2||0,o=Math.max(u.offsetHeight,u.scrollHeight)-t.watermark_height/2||0,t.watermark_x=t.watermark_x+c,t.watermark_y=t.watermark_y+l);var d,p,h=document.getElementById(t.watermark_id),f=null;if(h)h.shadowRoot&&(f=h.shadowRoot);else{(h=document.createElement("div")).id=t.watermark_id,h.style.pointerEvents="none",f="function"===typeof h.createShadowRoot?h.createShadowRoot():h;var m=document.body.children,g=Math.floor(Math.random()*(m.length-1));m[g]?document.body.insertBefore(h,m[g]):document.body.appendChild(h)}(0==t.watermark_cols||parseInt(t.watermark_x+t.watermark_width*t.watermark_cols+t.watermark_x_space*(t.watermark_cols-1))>a)&&(t.watermark_cols=parseInt((a-t.watermark_x+c)/(t.watermark_width+t.watermark_x_space)),t.watermark_x_space=parseInt((a-t.watermark_x+c-t.watermark_width*t.watermark_cols)/(t.watermark_cols-1))),(0==t.watermark_rows||parseInt(t.watermark_y+t.watermark_height*t.watermark_rows+t.watermark_y_space*(t.watermark_rows-1))>o)&&(t.watermark_rows=parseInt((o-t.watermark_y+l)/(t.watermark_height+t.watermark_y_space)),t.watermark_y_space=parseInt((o-t.watermark_y+l-t.watermark_height*t.watermark_rows)/(t.watermark_rows-1)));for(var v=0;v<t.watermark_rows;v++){p=t.watermark_y+(t.watermark_y_space+t.watermark_height)*v;for(var y=0;y<t.watermark_cols;y++){d=t.watermark_x+(t.watermark_width+t.watermark_x_space)*y;var _=document.createElement("div"),b=document.createTextNode(t.watermark_txt);_.appendChild(b),_.id=t.watermark_prefix+v+y,_.style.webkitTransform="rotate(-"+t.watermark_angle+"deg)",_.style.MozTransform="rotate(-"+t.watermark_angle+"deg)",_.style.msTransform="rotate(-"+t.watermark_angle+"deg)",_.style.OTransform="rotate(-"+t.watermark_angle+"deg)",_.style.transform="rotate(-"+t.watermark_angle+"deg)",_.style.visibility="",_.style.position="absolute",_.style.left=d+"px",_.style.top=p+"px",_.style.overflow="hidden",_.style.zIndex="9999",_.style.opacity=t.watermark_alpha,_.style.fontSize=t.watermark_fontsize,_.style.fontFamily=t.watermark_font,_.style.color=t.watermark_color,_.style.textAlign="center",_.style.width=t.watermark_width+"px",_.style.height=t.watermark_height+"px",_.style.display="block",_.style["-ms-user-select"]="none",f.appendChild(_)}}};return e.init=function(e){window.addEventListener("load",(function(){t(e)})),window.addEventListener("resize",(function(){t(e)})),window.addEventListener("DOMContentLoaded",(function(){t(e)}))},e.load=function(e){t(e)},e}(),void 0===(i="function"===typeof n?n.apply(t,r):n)||(e.exports=i)},37253:function(){},21936:function(){},80542:function(){},12475:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},18336:function(e,t,n){var r=n(63072),i=n(27550),a=n(28452);e.exports=function(e,t,n){return t=r(t),a(e,i()?Reflect.construct(t,n||[],r(e).constructor):t.apply(e,n))},e.exports.__esModule=!0,e.exports.default=e.exports},17383:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},34579:function(e,t,n){var r=n(77736);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}e.exports=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},72253:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},63072:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},29511:function(e,t,n){var r=n(95636);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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},24994:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},27550:function(e){function t(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(n){}return(e.exports=t=function(){return!!n},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},28452:function(e,t,n){var r=n(73738).default,i=n(12475);e.exports=function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},95636:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},89045:function(e,t,n){var r=n(73738).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},77736:function(e,t,n){var r=n(73738).default,i=n(89045);e.exports=function(e){var t=i(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},73738:function(e){function t(n){return e.exports=t="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.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},48738:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=o(e,a(n)))}return e}function a(e){if("string"===typeof e||"number"===typeof e)return e;if("object"!==typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=o(t,n));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},43145:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{A:function(){return r}})},96369:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{A:function(){return r}})},9417:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:function(){return r}})},10467:function(e,t,n){"use strict";function r(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var o=e.apply(t,n);function s(e){r(o,i,a,s,u,"next",e)}function u(e){r(o,i,a,s,u,"throw",e)}s(void 0)}))}}n.d(t,{A:function(){return i}})},39874:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});var r=n(53954),i=n(52176),a=n(56822);function o(e,t,n){return t=(0,r.A)(t),(0,a.A)(e,(0,i.A)()?Reflect.construct(t,n||[],(0,r.A)(e).constructor):t.apply(e,n))}},23029:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:function(){return r}})},36324:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=n(52176),i=n(63662);function a(e,t,n){if((0,r.A)())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,t);var o=new(e.bind.apply(e,a));return n&&(0,i.A)(o,n.prototype),o}},92901:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=n(20816);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,r.A)(i.key),i)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},24765:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(27800);function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,r.A)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}},64467:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(20816);function i(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},58168:function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:function(){return r}})},53954:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{A:function(){return r}})},85501:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(63662);function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.A)(e,t)}},77387:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(63662);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.A)(e,t)}},52176:function(e,t,n){"use strict";function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}n.d(t,{A:function(){return r}})},73893:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{A:function(){return r}})},76562:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:function(){return r}})},89379:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=n(64467);function i(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 a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},80045:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(98587);function i(e,t){if(null==e)return{};var n,i,a=(0,r.A)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},98587:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}n.d(t,{A:function(){return r}})},56822:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=n(82284),i=n(9417);function a(e,t){if(t&&("object"==(0,r.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.A)(e)}},90675:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(82284);function i(){i=function(){return t};var e,t={},n=Object.prototype,a=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var i=t&&t.prototype instanceof _?t:_,a=Object.create(i.prototype),s=new R(r||[]);return o(a,"_invoke",{value:x(e,n,s)}),a}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var f="suspendedStart",m="suspendedYield",g="executing",v="completed",y={};function _(){}function b(){}function w(){}var T={};d(T,u,(function(){return this}));var k=Object.getPrototypeOf,S=k&&k(k(L([])));S&&S!==n&&a.call(S,u)&&(T=S);var E=w.prototype=_.prototype=Object.create(T);function C(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(i,o,s,u){var l=h(e[i],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==(0,r.A)(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(a,a):a()}})}function x(t,n,r){var i=f;return function(a,o){if(i===g)throw Error("Generator is already running");if(i===v){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var u=P(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var l=h(t,n,r);if("normal"===l.type){if(i=r.done?v:m,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function P(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,P(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=h(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function I(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 O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(a.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError((0,r.A)(t)+" is not iterable")}return b.prototype=w,o(E,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:b,configurable:!0}),b.displayName=d(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,d(e,c,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},C(A.prototype),d(A.prototype,l,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new A(p(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(E),d(E,c,"Generator"),d(E,u,(function(){return this})),d(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&a.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(u&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},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),y},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),O(n),y}},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;O(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}},63662:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:function(){return r}})},5544:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});var r=n(96369);var i=n(27800),a=n(76562);function o(e,t){return(0,r.A)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||(0,i.A)(e,t)||(0,a.A)()}},87695:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var r=n(96369),i=n(73893),a=n(27800),o=n(76562);function s(e){return(0,r.A)(e)||(0,i.A)(e)||(0,a.A)(e)||(0,o.A)()}},60436:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});var r=n(43145);var i=n(73893),a=n(27800);function o(e){return function(e){if(Array.isArray(e))return(0,r.A)(e)}(e)||(0,i.A)(e)||(0,a.A)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},20816:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(82284);function i(e){var t=function(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=(0,r.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.A)(t)?t:t+""}},82284:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:function(){return r}})},27800:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(43145);function i(e,t){if(e){if("string"==typeof e)return(0,r.A)(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(e,t):void 0}}},50531:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});var r=n(53954),i=n(63662);var a=n(36324);function o(e){var t="function"==typeof Map?new Map:void 0;return o=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;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,n)}function n(){return(0,a.A)(e,arguments,(0,r.A)(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.A)(n,e)},o(e)}},26910:function(e,t,n){"use strict";n.d(t,{A:function(){return zt}});var r={};n.r(r),n.d(r,{hasBrowserEnv:function(){return _e},hasStandardBrowserEnv:function(){return we},hasStandardBrowserWebWorkerEnv:function(){return Te},navigator:function(){return be},origin:function(){return ke}});var i=n(5544);function a(e,t){return function(){return e.apply(t,arguments)}}var o,s=n(85224),u=Object.prototype.toString,l=Object.getPrototypeOf,c=(o=Object.create(null),function(e){var t=u.call(e);return o[t]||(o[t]=t.slice(8,-1).toLowerCase())}),d=function(e){return e=e.toLowerCase(),function(t){return c(t)===e}},p=function(e){return function(t){return typeof t===e}},h=Array.isArray,f=p("undefined");var m=d("ArrayBuffer");var g=p("string"),v=p("function"),y=p("number"),_=function(e){return null!==e&&"object"===typeof e},b=function(e){if("object"!==c(e))return!1;var t=l(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},w=d("Date"),T=d("File"),k=d("Blob"),S=d("FileList"),E=d("URLSearchParams"),C=["ReadableStream","Request","Response","Headers"].map(d),A=(0,i.A)(C,4),x=A[0],P=A[1],I=A[2],O=A[3];function R(e,t){var n,r,i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,a=void 0!==i&&i;if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),h(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{var o,s=a?Object.getOwnPropertyNames(e):Object.keys(e),u=s.length;for(n=0;n<u;n++)o=s[n],t.call(null,e[o],o,e)}}function L(e,t){t=t.toLowerCase();for(var n,r=Object.keys(e),i=r.length;i-- >0;)if(t===(n=r[i]).toLowerCase())return n;return null}var N="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,D=function(e){return!f(e)&&e!==N};var M,U=(M="undefined"!==typeof Uint8Array&&l(Uint8Array),function(e){return M&&e instanceof M}),F=d("HTMLFormElement"),j=function(){var e=Object.prototype.hasOwnProperty;return function(t,n){return e.call(t,n)}}(),B=d("RegExp"),q=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};R(n,(function(n,i){var a;!1!==(a=t(n,i,e))&&(r[i]=a||n)})),Object.defineProperties(e,r)},H="abcdefghijklmnopqrstuvwxyz",z="0123456789",V={DIGIT:z,ALPHA:H,ALPHA_DIGIT:H+H.toUpperCase()+z};var W=d("AsyncFunction"),G=function(e,t){return e?setImmediate:t?(n="axios@".concat(Math.random()),r=[],N.addEventListener("message",(function(e){var t=e.source,i=e.data;t===N&&i===n&&r.length&&r.shift()()}),!1),function(e){r.push(e),N.postMessage(n,"*")}):function(e){return setTimeout(e)};var n,r}("function"===typeof setImmediate,v(N.postMessage)),X="undefined"!==typeof queueMicrotask?queueMicrotask.bind(N):"undefined"!==typeof s&&s.nextTick||G,K={isArray:h,isArrayBuffer:m,isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&v(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"===typeof FormData&&e instanceof FormData||v(e.append)&&("formdata"===(t=c(e))||"object"===t&&v(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer)},isString:g,isNumber:y,isBoolean:function(e){return!0===e||!1===e},isObject:_,isPlainObject:b,isReadableStream:x,isRequest:P,isResponse:I,isHeaders:O,isUndefined:f,isDate:w,isFile:T,isBlob:k,isRegExp:B,isFunction:v,isStream:function(e){return _(e)&&v(e.pipe)},isURLSearchParams:E,isTypedArray:U,isFileList:S,forEach:R,merge:function e(){for(var t=(D(this)&&this||{}).caseless,n={},r=function(r,i){var a=t&&L(n,i)||i;b(n[a])&&b(r)?n[a]=e(n[a],r):b(r)?n[a]=e({},r):h(r)?n[a]=r.slice():n[a]=r},i=0,a=arguments.length;i<a;i++)arguments[i]&&R(arguments[i],r);return n},extend:function(e,t,n){return R(t,(function(t,r){n&&v(t)?e[r]=a(t,n):e[r]=t}),{allOwnKeys:(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var i,a,o,s={};if(t=t||{},null==e)return t;do{for(a=(i=Object.getOwnPropertyNames(e)).length;a-- >0;)o=i[a],r&&!r(o,e,t)||s[o]||(t[o]=e[o],s[o]=!0);e=!1!==n&&l(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:d,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(h(e))return e;var t=e.length;if(!y(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[Symbol.iterator]).call(e);(n=r.next())&&!n.done;){var i=n.value;t.call(e,i[0],i[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:F,hasOwnProperty:j,hasOwnProp:j,reduceDescriptors:q,freezeMethods:function(e){q(e,(function(t,n){if(v(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];v(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:function(e,t){var n={},r=function(e){e.forEach((function(e){n[e]=!0}))};return h(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:L,global:N,isContextDefined:D,ALPHABET:V,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:V.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&v(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10),n=function(e,r){if(_(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;var i=h(e)?[]:{};return R(e,(function(e,t){var a=n(e,r+1);!f(a)&&(i[t]=a)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:W,isThenable:function(e){return e&&(_(e)||v(e))&&v(e.then)&&v(e.catch)},setImmediate:G,asap:X},$=n(90675),Y=n(10467),Q=n(23029),J=n(92901);function Z(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}K.inherits(Z,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});var ee=Z.prototype,te={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){te[e]={value:e}})),Object.defineProperties(Z,te),Object.defineProperty(ee,"isAxiosError",{value:!0}),Z.from=function(e,t,n,r,i,a){var o=Object.create(ee);return K.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),Z.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};var ne=Z,re=n(93325).hp;function ie(e){return K.isPlainObject(e)||K.isArray(e)}function ae(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function oe(e,t,n){return e?e.concat(t).map((function(e,t){return e=ae(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var se=K.toFlatObject(K,{},null,(function(e){return/^is[A-Z]/.test(e)}));var ue=function(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!K.isUndefined(t[e])}))).metaTokens,i=n.visitor||l,a=n.dots,o=n.indexes,s=(n.Blob||"undefined"!==typeof Blob&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(i))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(!s&&K.isBlob(e))throw new ne("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?s&&"function"===typeof Blob?new Blob([e]):re.from(e):e}function l(e,n,i){var s=e;if(e&&!i&&"object"===typeof e)if(K.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&function(e){return K.isArray(e)&&!e.some(ie)}(e)||(K.isFileList(e)||K.endsWith(n,"[]"))&&(s=K.toArray(e)))return n=ae(n),s.forEach((function(e,r){!K.isUndefined(e)&&null!==e&&t.append(!0===o?oe([n],r,a):null===o?n:n+"[]",u(e))})),!1;return!!ie(e)||(t.append(oe(i,n,a),u(e)),!1)}var c=[],d=Object.assign(se,{defaultVisitor:l,convertValue:u,isVisitable:ie});if(!K.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!K.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),K.forEach(n,(function(n,a){!0===(!(K.isUndefined(n)||null===n)&&i.call(t,n,K.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])})),c.pop()}}(e),t};function le(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ce(e,t){this._pairs=[],e&&ue(e,this,t)}var de=ce.prototype;de.append=function(e,t){this._pairs.push([e,t])},de.toString=function(e){var t=e?function(t){return e.call(this,t,le)}:le;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var pe=ce;function he(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function fe(e,t,n){if(!t)return e;var r,i=n&&n.encode||he,a=n&&n.serialize;if(r=a?a(t,n):K.isURLSearchParams(t)?t.toString():new pe(t,n).toString(i)){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}var me=function(){return(0,J.A)((function e(){(0,Q.A)(this,e),this.handlers=[]}),[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){K.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}])}(),ge={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ve=n(89379),ye={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:pe,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},_e="undefined"!==typeof window&&"undefined"!==typeof document,be="object"===typeof navigator&&navigator||void 0,we=_e&&(!be||["ReactNative","NativeScript","NS"].indexOf(be.product)<0),Te="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,ke=_e&&window.location.href||"http://localhost",Se=(0,ve.A)((0,ve.A)({},r),ye);var Ee=function(e){function t(e,n,r,i){var a=e[i++];if("__proto__"===a)return!0;var o=Number.isFinite(+a),s=i>=e.length;return a=!a&&K.isArray(r)?r.length:a,s?(K.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o):(r[a]&&K.isObject(r[a])||(r[a]=[]),t(e,n,r[a],i)&&K.isArray(r[a])&&(r[a]=function(e){var t,n,r={},i=Object.keys(e),a=i.length;for(t=0;t<a;t++)r[n=i[t]]=e[n];return r}(r[a])),!o)}if(K.isFormData(e)&&K.isFunction(e.entries)){var n={};return K.forEachEntry(e,(function(e,r){t(function(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),r,n,0)})),n}return null};var Ce={transitional:ge,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){var n,r=t.getContentType()||"",i=r.indexOf("application/json")>-1,a=K.isObject(e);if(a&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return i?JSON.stringify(Ee(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ue(e,new Se.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Se.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=K.isFileList(e))||r.indexOf("multipart/form-data")>-1){var o=this.env&&this.env.FormData;return ue(n?{"files[]":e}:e,o&&new o,this.formSerializer)}}return a||i?(t.setContentType("application/json",!1),function(e,t,n){if(K.isString(e))try{return(t||JSON.parse)(e),K.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Ce.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.isString(e)&&(n&&!this.responseType||r)){var i=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(a){if(i){if("SyntaxError"===a.name)throw ne.from(a,ne.ERR_BAD_RESPONSE,this,null,this.response);throw a}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Se.classes.FormData,Blob:Se.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],(function(e){Ce.headers[e]={}}));var Ae=Ce,xe=n(24765),Pe=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ie=Symbol("internals");function Oe(e){return e&&String(e).trim().toLowerCase()}function Re(e){return!1===e||null==e?e:K.isArray(e)?e.map(Re):String(e)}function Le(e,t,n,r,i){return K.isFunction(r)?r.call(this,t,n):(i&&(t=n),K.isString(t)?K.isString(r)?-1!==t.indexOf(r):K.isRegExp(r)?r.test(t):void 0:void 0)}var Ne=function(){return(0,J.A)((function e(t){(0,Q.A)(this,e),t&&this.set(t)}),[{key:"set",value:function(e,t,n){var r=this;function a(e,t,n){var i=Oe(t);if(!i)throw new Error("header name must be a non-empty string");var a=K.findKey(r,i);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=Re(e))}var o=function(e,t){return K.forEach(e,(function(e,n){return a(e,n,t)}))};if(K.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(K.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o(function(e){var t,n,r,i={};return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||i[t]&&Pe[t]||("set-cookie"===t?i[t]?i[t].push(n):i[t]=[n]:i[t]=i[t]?i[t]+", "+n:n)})),i}(e),t);else if(K.isHeaders(e)){var s,u=(0,xe.A)(e.entries());try{for(u.s();!(s=u.n()).done;){var l=(0,i.A)(s.value,2),c=l[0];a(l[1],c,n)}}catch(d){u.e(d)}finally{u.f()}}else null!=e&&a(t,e,n);return this}},{key:"get",value:function(e,t){if(e=Oe(e)){var n=K.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(K.isFunction(t))return t.call(this,r,n);if(K.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Oe(e)){var n=K.findKey(this,e);return!(!n||void 0===this[n]||t&&!Le(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function i(e){if(e=Oe(e)){var i=K.findKey(n,e);!i||t&&!Le(0,n[i],i,t)||(delete n[i],r=!0)}}return K.isArray(e)?e.forEach(i):i(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var i=t[n];e&&!Le(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return K.forEach(this,(function(r,i){var a=K.findKey(n,i);if(a)return t[a]=Re(r),void delete t[i];var o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))}(i):String(i).trim();o!==i&&delete t[i],t[o]=Re(r),n[o]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.constructor).concat.apply(e,[this].concat(n))}},{key:"toJSON",value:function(e){var t=Object.create(null);return K.forEach(this,(function(n,r){null!=n&&!1!==n&&(t[r]=e&&K.isArray(n)?n.join(", "):n)})),t}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map((function(e){var t=(0,i.A)(e,2);return t[0]+": "+t[1]})).join("\n")}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.forEach((function(e){return t.set(e)})),t}},{key:"accessor",value:function(e){var t=(this[Ie]=this[Ie]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=Oe(e);t[r]||(!function(e,t){var n=K.toCamelCase(" "+t);["get","set","has"].forEach((function(r){Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return K.isArray(e)?e.forEach(r):r(e),this}}])}();Ne.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(Ne.prototype,(function(e,t){var n=e.value,r=t[0].toUpperCase()+t.slice(1);return{get:function(){return n},set:function(e){this[r]=e}}})),K.freezeMethods(Ne);var De=Ne;function Me(e,t){var n=this||Ae,r=t||n,i=De.from(r.headers),a=r.data;return K.forEach(e,(function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)})),i.normalize(),a}function Ue(e){return!(!e||!e.__CANCEL__)}function Fe(e,t,n){ne.call(this,null==e?"canceled":e,ne.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(Fe,ne,{__CANCEL__:!0});var je=Fe;function Be(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new ne("Request failed with status code "+n.status,[ne.ERR_BAD_REQUEST,ne.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}var qe=n(64467);var He=function(e,t){e=e||10;var n,r=new Array(e),i=new Array(e),a=0,o=0;return t=void 0!==t?t:1e3,function(s){var u=Date.now(),l=i[o];n||(n=u),r[a]=s,i[a]=u;for(var c=o,d=0;c!==a;)d+=r[c++],c%=e;if((a=(a+1)%e)===o&&(o=(o+1)%e),!(u-n<t)){var p=l&&u-l;return p?Math.round(1e3*d/p):void 0}}};var ze=function(e,t){var n,r,i=0,a=1e3/t,o=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();i=a,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[function(){for(var e=Date.now(),t=e-i,s=arguments.length,u=new Array(s),l=0;l<s;l++)u[l]=arguments[l];t>=a?o(u,e):(n=u,r||(r=setTimeout((function(){r=null,o(n)}),a-t)))},function(){return n&&o(n)}]},Ve=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0,i=He(50,250);return ze((function(n){var a=n.loaded,o=n.lengthComputable?n.total:void 0,s=a-r,u=i(s),l=a<=o;r=a;var c=(0,qe.default)({loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:u||void 0,estimated:u&&o&&l?(o-a)/u:void 0,event:n,lengthComputable:null!=o},t?"download":"upload",!0);e(c)}),n)},We=function(e,t){var n=null!=e;return[function(r){return t[0]({lengthComputable:n,total:e,loaded:r})},t[1]]},Ge=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return K.asap((function(){return e.apply(void 0,n)}))}},Xe=n(60436),Ke=n(87695),$e=Se.hasStandardBrowserEnv?function(){var e,t=Se.navigator&&/(msie|trident)/i.test(Se.navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=K.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},Ye=Se.hasStandardBrowserEnv?{write:function(e,t,n,r,i,a){var o=[e+"="+encodeURIComponent(t)];K.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),K.isString(r)&&o.push("path="+r),K.isString(i)&&o.push("domain="+i),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Qe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Je=function(e){return e instanceof De?(0,ve.A)({},e):e};function Ze(e,t){t=t||{};var n={};function r(e,t,n){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:n},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function i(e,t,n){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!K.isUndefined(t))return r(void 0,t)}function o(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,a){return a in t?r(n,i):a in e?r(void 0,n):void 0}var u={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:function(e,t){return i(Je(e),Je(t),!0)}};return K.forEach(Object.keys(Object.assign({},e,t)),(function(r){var a=u[r]||i,o=a(e[r],t[r],r);K.isUndefined(o)&&a!==s||(n[r]=o)})),n}var et=function(e){var t,n=Ze({},e),r=n.data,i=n.withXSRFToken,a=n.xsrfHeaderName,o=n.xsrfCookieName,s=n.headers,u=n.auth;if(n.headers=s=De.from(s),n.url=fe(Qe(n.baseURL,n.url),e.params,e.paramsSerializer),u&&s.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),K.isFormData(r))if(Se.hasStandardBrowserEnv||Se.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(t=s.getContentType())){var l=t?t.split(";").map((function(e){return e.trim()})).filter(Boolean):[],c=(0,Ke.A)(l),d=c[0],p=c.slice(1);s.setContentType([d||"multipart/form-data"].concat((0,Xe.A)(p)).join("; "))}if(Se.hasStandardBrowserEnv&&(i&&K.isFunction(i)&&(i=i(n)),i||!1!==i&&$e(n.url))){var h=a&&o&&Ye.read(o);h&&s.set(a,h)}return n},tt="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){var r,a,o,s,u,l=et(e),c=l.data,d=De.from(l.headers).normalize(),p=l.responseType,h=l.onUploadProgress,f=l.onDownloadProgress;function m(){s&&s(),u&&u(),l.cancelToken&&l.cancelToken.unsubscribe(r),l.signal&&l.signal.removeEventListener("abort",r)}var g=new XMLHttpRequest;function v(){if(g){var r=De.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Be((function(e){t(e),m()}),(function(e){n(e),m()}),{data:p&&"text"!==p&&"json"!==p?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}}if(g.open(l.method.toUpperCase(),l.url,!0),g.timeout=l.timeout,"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(v)},g.onabort=function(){g&&(n(new ne("Request aborted",ne.ECONNABORTED,e,g)),g=null)},g.onerror=function(){n(new ne("Network Error",ne.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){var t=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",r=l.transitional||ge;l.timeoutErrorMessage&&(t=l.timeoutErrorMessage),n(new ne(t,r.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,e,g)),g=null},void 0===c&&d.setContentType(null),"setRequestHeader"in g&&K.forEach(d.toJSON(),(function(e,t){g.setRequestHeader(t,e)})),K.isUndefined(l.withCredentials)||(g.withCredentials=!!l.withCredentials),p&&"json"!==p&&(g.responseType=l.responseType),f){var y=Ve(f,!0),_=(0,i.A)(y,2);o=_[0],u=_[1],g.addEventListener("progress",o)}if(h&&g.upload){var b=Ve(h),w=(0,i.A)(b,2);a=w[0],s=w[1],g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",s)}(l.cancelToken||l.signal)&&(r=function(t){g&&(n(!t||t.type?new je(null,e,g):t),g.abort(),g=null)},l.cancelToken&&l.cancelToken.subscribe(r),l.signal&&(l.signal.aborted?r():l.signal.addEventListener("abort",r)));var T=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(l.url);T&&-1===Se.protocols.indexOf(T)?n(new ne("Unsupported protocol "+T+":",ne.ERR_BAD_REQUEST,e)):g.send(c||null)}))},nt=function(e,t){var n=(e=e?e.filter(Boolean):[]).length;if(t||n){var r,i=new AbortController,a=function(e){if(!r){r=!0,s();var t=e instanceof Error?e:this.reason;i.abort(t instanceof ne?t:new je(t instanceof Error?t.message:t))}},o=t&&setTimeout((function(){o=null,a(new ne("timeout ".concat(t," of ms exceeded"),ne.ETIMEDOUT))}),t),s=function(){e&&(o&&clearTimeout(o),o=null,e.forEach((function(e){e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)})),e=null)};e.forEach((function(e){return e.addEventListener("abort",a)}));var u=i.signal;return u.unsubscribe=function(){return K.asap(s)},u}};function rt(e,t){this.v=e,this.k=t}function it(e){return function(){return new at(e.apply(this,arguments))}}function at(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof rt;Promise.resolve(s?o.v:o).then((function(n){if(s){var u="return"===t?"return":"next";if(!o.k||n.done)return r(u,n);n=e[u](n).value}i(a.done?"return":"normal",n)}),(function(e){r("throw",e)}))}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise((function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function ot(e){return new rt(e,0)}function st(e){var t={},n=!1;function r(t,r){return n=!0,r=new Promise((function(n){n(e[t](r))})),{done:!1,value:new rt(r,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):r("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return r("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):r("return",e)}),t}function ut(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new lt(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function lt(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return lt=function(e){this.s=e,this.n=e.next},lt.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new lt(e)}at.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},at.prototype.next=function(e){return this._invoke("next",e)},at.prototype.throw=function(e){return this._invoke("throw",e)},at.prototype.return=function(e){return this._invoke("return",e)};var ct,dt,pt=(0,$.A)().mark((function e(t,n){var r,i,a;return(0,$.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.byteLength,n&&!(r<n)){e.next=5;break}return e.next=4,t;case 4:return e.abrupt("return");case 5:i=0;case 6:if(!(i<r)){e.next=13;break}return a=i+n,e.next=10,t.slice(i,a);case 10:i=a,e.next=6;break;case 13:case"end":return e.stop()}}),e)})),ht=function(){var e=it((0,$.A)().mark((function e(t,n){var r,i,a,o,s,u;return(0,$.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!1,i=!1,e.prev=2,o=ut(ft(t));case 4:return e.next=6,ot(o.next());case 6:if(!(r=!(s=e.sent).done)){e.next=12;break}return u=s.value,e.delegateYield(st(ut(pt(u,n))),"t0",9);case 9:r=!1,e.next=4;break;case 12:e.next=18;break;case 14:e.prev=14,e.t1=e.catch(2),i=!0,a=e.t1;case 18:if(e.prev=18,e.prev=19,!r||null==o.return){e.next=23;break}return e.next=23,ot(o.return());case 23:if(e.prev=23,!i){e.next=26;break}throw a;case 26:return e.finish(23);case 27:return e.finish(18);case 28:case"end":return e.stop()}}),e,null,[[2,14,18,28],[19,,23,27]])})));return function(t,n){return e.apply(this,arguments)}}(),ft=function(){var e=it((0,$.A)().mark((function e(t){var n,r,i,a;return(0,$.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t[Symbol.asyncIterator]){e.next=3;break}return e.delegateYield(st(ut(t)),"t0",2);case 2:return e.abrupt("return");case 3:n=t.getReader(),e.prev=4;case 5:return e.next=7,ot(n.read());case 7:if(r=e.sent,i=r.done,a=r.value,!i){e.next=12;break}return e.abrupt("break",16);case 12:return e.next=14,a;case 14:e.next=5;break;case 16:return e.prev=16,e.next=19,ot(n.cancel());case 19:return e.finish(16);case 20:case"end":return e.stop()}}),e,null,[[4,,16,20]])})));return function(t){return e.apply(this,arguments)}}(),mt=function(e,t,n,r){var i,a=ht(e,t),o=0,s=function(e){i||(i=!0,r&&r(e))};return new ReadableStream({pull:function(e){return(0,Y.A)((0,$.A)().mark((function t(){var r,i,u,l,c;return(0,$.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.next();case 3:if(r=t.sent,i=r.done,u=r.value,!i){t.next=10;break}return s(),e.close(),t.abrupt("return");case 10:l=u.byteLength,n&&(c=o+=l,n(c)),e.enqueue(new Uint8Array(u)),t.next=19;break;case 15:throw t.prev=15,t.t0=t.catch(0),s(t.t0),t.t0;case 19:case"end":return t.stop()}}),t,null,[[0,15]])})))()},cancel:function(e){return s(e),a.return()}},{highWaterMark:2})},gt="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,vt=gt&&"function"===typeof ReadableStream,yt=gt&&("function"===typeof TextEncoder?(ct=new TextEncoder,function(e){return ct.encode(e)}):function(){var e=(0,Y.A)((0,$.A)().mark((function e(t){return(0,$.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Uint8Array,e.next=3,new Response(t).arrayBuffer();case 3:return e.t1=e.sent,e.abrupt("return",new e.t0(e.t1));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),_t=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return!!e.apply(void 0,n)}catch(i){return!1}},bt=vt&&_t((function(){var e=!1,t=new Request(Se.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),wt=vt&&_t((function(){return K.isReadableStream(new Response("").body)})),Tt={stream:wt&&function(e){return e.body}};gt&&(dt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((function(e){!Tt[e]&&(Tt[e]=K.isFunction(dt[e])?function(t){return t[e]()}:function(t,n){throw new ne("Response type '".concat(e,"' is not supported"),ne.ERR_NOT_SUPPORT,n)})})));var kt=function(){var e=(0,Y.A)((0,$.A)().mark((function e(t){var n;return(0,$.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=2;break}return e.abrupt("return",0);case 2:if(!K.isBlob(t)){e.next=4;break}return e.abrupt("return",t.size);case 4:if(!K.isSpecCompliantForm(t)){e.next=9;break}return n=new Request(Se.origin,{method:"POST",body:t}),e.next=8,n.arrayBuffer();case 8:case 15:return e.abrupt("return",e.sent.byteLength);case 9:if(!K.isArrayBufferView(t)&&!K.isArrayBuffer(t)){e.next=11;break}return e.abrupt("return",t.byteLength);case 11:if(K.isURLSearchParams(t)&&(t+=""),!K.isString(t)){e.next=16;break}return e.next=15,yt(t);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),St=function(){var e=(0,Y.A)((0,$.A)().mark((function e(t,n){var r;return(0,$.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=K.toFiniteNumber(t.getContentLength()),e.abrupt("return",null==r?kt(n):r);case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Et=gt&&function(){var e=(0,Y.A)((0,$.A)().mark((function e(t){var n,r,a,o,s,u,l,c,d,p,h,f,m,g,v,y,_,b,w,T,k,S,E,C,A,x,P,I,O,R,L,N,D,M;return(0,$.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=et(t),r=n.url,a=n.method,o=n.data,s=n.signal,u=n.cancelToken,l=n.timeout,c=n.onDownloadProgress,d=n.onUploadProgress,p=n.responseType,h=n.headers,f=n.withCredentials,m=void 0===f?"same-origin":f,g=n.fetchOptions,p=p?(p+"").toLowerCase():"text",v=nt([s,u&&u.toAbortSignal()],l),_=v&&v.unsubscribe&&function(){v.unsubscribe()},e.prev=4,e.t0=d&&bt&&"get"!==a&&"head"!==a,!e.t0){e.next=11;break}return e.next=9,St(h,o);case 9:e.t1=b=e.sent,e.t0=0!==e.t1;case 11:if(!e.t0){e.next=15;break}w=new Request(r,{method:"POST",body:o,duplex:"half"}),K.isFormData(o)&&(T=w.headers.get("content-type"))&&h.setContentType(T),w.body&&(k=We(b,Ve(Ge(d))),S=(0,i.A)(k,2),E=S[0],C=S[1],o=mt(w.body,65536,E,C));case 15:return K.isString(m)||(m=m?"include":"omit"),A="credentials"in Request.prototype,y=new Request(r,(0,ve.A)((0,ve.A)({},g),{},{signal:v,method:a.toUpperCase(),headers:h.normalize().toJSON(),body:o,duplex:"half",credentials:A?m:void 0})),e.next=20,fetch(y);case 20:return x=e.sent,P=wt&&("stream"===p||"response"===p),wt&&(c||P&&_)&&(I={},["status","statusText","headers"].forEach((function(e){I[e]=x[e]})),O=K.toFiniteNumber(x.headers.get("content-length")),R=c&&We(O,Ve(Ge(c),!0))||[],L=(0,i.A)(R,2),N=L[0],D=L[1],x=new Response(mt(x.body,65536,N,(function(){D&&D(),_&&_()})),I)),p=p||"text",e.next=26,Tt[K.findKey(Tt,p)||"text"](x,t);case 26:return M=e.sent,!P&&_&&_(),e.next=30,new Promise((function(e,n){Be(e,n,{data:M,headers:De.from(x.headers),status:x.status,statusText:x.statusText,config:t,request:y})}));case 30:return e.abrupt("return",e.sent);case 33:if(e.prev=33,e.t2=e.catch(4),_&&_(),!e.t2||"TypeError"!==e.t2.name||!/fetch/i.test(e.t2.message)){e.next=38;break}throw Object.assign(new ne("Network Error",ne.ERR_NETWORK,t,y),{cause:e.t2.cause||e.t2});case 38:throw ne.from(e.t2,e.t2&&e.t2.code,t,y);case 39:case"end":return e.stop()}}),e,null,[[4,33]])})));return function(t){return e.apply(this,arguments)}}(),Ct={http:null,xhr:tt,fetch:Et};K.forEach(Ct,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));var At=function(e){return"- ".concat(e)},xt=function(e){return K.isFunction(e)||null===e||!1===e},Pt=function(e){for(var t,n,r=(e=K.isArray(e)?e:[e]).length,a={},o=0;o<r;o++){var s=void 0;if(n=t=e[o],!xt(t)&&void 0===(n=Ct[(s=String(t)).toLowerCase()]))throw new ne("Unknown adapter '".concat(s,"'"));if(n)break;a[s||"#"+o]=n}if(!n){var u=Object.entries(a).map((function(e){var t=(0,i.A)(e,2),n=t[0],r=t[1];return"adapter ".concat(n," ")+(!1===r?"is not supported by the environment":"is not available in the build")})),l=r?u.length>1?"since :\n"+u.map(At).join("\n"):" "+At(u[0]):"as no adapter specified";throw new ne("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return n};function It(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new je(null,e)}function Ot(e){return It(e),e.headers=De.from(e.headers),e.data=Me.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pt(e.adapter||Ae.adapter)(e).then((function(t){return It(e),t.data=Me.call(e,e.transformResponse,t),t.headers=De.from(t.headers),t}),(function(t){return Ue(t)||(It(e),t&&t.response&&(t.response.data=Me.call(e,e.transformResponse,t.response),t.response.headers=De.from(t.response.headers))),Promise.reject(t)}))}var Rt="1.7.7",Lt={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Lt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var Nt={};Lt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,a){if(!1===e)throw new ne(r(i," has been removed"+(t?" in "+t:"")),ne.ERR_DEPRECATED);return t&&!Nt[i]&&(Nt[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,a)}};var Dt={assertOptions:function(e,t,n){if("object"!==typeof e)throw new ne("options must be an object",ne.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),i=r.length;i-- >0;){var a=r[i],o=t[a];if(o){var s=e[a],u=void 0===s||o(s,a,e);if(!0!==u)throw new ne("option "+a+" must be "+u,ne.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ne("Unknown option "+a,ne.ERR_BAD_OPTION)}},validators:Lt},Mt=Dt.validators,Ut=function(){return(0,J.A)((function e(t){(0,Q.A)(this,e),this.defaults=t,this.interceptors={request:new me,response:new me}}),[{key:"request",value:function(){var e=(0,Y.A)((0,$.A)().mark((function e(t,n){var r,i;return(0,$.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._request(t,n);case 3:return e.abrupt("return",e.sent);case 6:if(e.prev=6,e.t0=e.catch(0),e.t0 instanceof Error){Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error,i=r.stack?r.stack.replace(/^.+\n/,""):"";try{e.t0.stack?i&&!String(e.t0.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(e.t0.stack+="\n"+i):e.t0.stack=i}catch(a){}}throw e.t0;case 10:case"end":return e.stop()}}),e,this,[[0,6]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_request",value:function(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{};var n=t=Ze(this.defaults,t),r=n.transitional,i=n.paramsSerializer,a=n.headers;void 0!==r&&Dt.assertOptions(r,{silentJSONParsing:Mt.transitional(Mt.boolean),forcedJSONParsing:Mt.transitional(Mt.boolean),clarifyTimeoutError:Mt.transitional(Mt.boolean)},!1),null!=i&&(K.isFunction(i)?t.paramsSerializer={serialize:i}:Dt.assertOptions(i,{encode:Mt.function,serialize:Mt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();var o=a&&K.merge(a.common,a[t.method]);a&&K.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete a[e]})),t.headers=De.concat(o,a);var s=[],u=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(u=u&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));var l,c=[];this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));var d,p=0;if(!u){var h=[Ot.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),d=h.length,l=Promise.resolve(t);p<d;)l=l.then(h[p++],h[p++]);return l}d=s.length;var f=t;for(p=0;p<d;){var m=s[p++],g=s[p++];try{f=m(f)}catch(v){g.call(this,v);break}}try{l=Ot.call(this,f)}catch(v){return Promise.reject(v)}for(p=0,d=c.length;p<d;)l=l.then(c[p++],c[p++]);return l}},{key:"getUri",value:function(e){return fe(Qe((e=Ze(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}])}();K.forEach(["delete","get","head","options"],(function(e){Ut.prototype[e]=function(t,n){return this.request(Ze(n||{},{method:e,url:t,data:(n||{}).data}))}})),K.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(Ze(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ut.prototype[e]=t(),Ut.prototype[e+"Form"]=t(!0)}));var Ft=Ut,jt=function(){function e(t){if((0,Q.A)(this,e),"function"!==typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},t((function(e,t,i){r.reason||(r.reason=new je(e,t,i),n(r.reason))}))}return(0,J.A)(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,n=function(e){t.abort(e)};return this.subscribe(n),t.signal.unsubscribe=function(){return e.unsubscribe(n)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e((function(e){t=e})),cancel:t}}}])}();var Bt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Bt).forEach((function(e){var t=(0,i.A)(e,2),n=t[0],r=t[1];Bt[r]=n}));var qt=Bt;var Ht=function e(t){var n=new Ft(t),r=a(Ft.prototype.request,n);return K.extend(r,Ft.prototype,n,{allOwnKeys:!0}),K.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ze(t,n))},r}(Ae);Ht.Axios=Ft,Ht.CanceledError=je,Ht.CancelToken=jt,Ht.isCancel=Ue,Ht.VERSION=Rt,Ht.toFormData=ue,Ht.AxiosError=ne,Ht.Cancel=Ht.CanceledError,Ht.all=function(e){return Promise.all(e)},Ht.spread=function(e){return function(t){return e.apply(null,t)}},Ht.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},Ht.mergeConfig=Ze,Ht.AxiosHeaders=De,Ht.formToJSON=function(e){return Ee(K.isHTMLForm(e)?new FormData(e):e)},Ht.getAdapter=Pt,Ht.HttpStatusCode=qt,Ht.default=Ht;var zt=Ht}},function(e){var t;t=91,e(e.s=t)}]);