You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Question__Index.fab2aced...

394 lines
1.0 MiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[213,5,7,8,10,13],{"+92d":function(Ge,Re,F){Ge.exports=F.p+"static/b1.8d46544a.svg"},"+GGh":function(Ge,Re){Ge.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAAA4CAYAAAAB3jHPAAAAAXNSR0IArs4c6QAAIABJREFUeF7VXQm4VVXZfvc+5yKzMqiAgpggqGihoBI4Zz+iQA7VX2Fa+GeFmjnmjAZmDlnmDGaDY5KzJmmWAiKIoCihmAN/ySTDvRcF4e691v+s4VvrW2vvcwFB8r/lcy/n7LP32nu9+/3e7/2+tU+CLfwjpaw0NmJfIcRBSYK+Uoq+QNIdEu0AtJMSLaSUABJzZPWn+iUlEiRQb6l37MvsfbOdfs+9qf5htnav6ffsvoP9+mPSsej4+iM0Jr5vPR4aIF0o9po6ziccPx1GnbWQZvzqNfef/rd9j7+uXhPmIqn36XN6H+rf+n/+dTV+2o/6kNq/39YfT72m3le7Vj/Cnq76tx4TGx9tS2Olz5RByc/EZgBNSlm3enU+TAiMkhJHSshtHULchKkrok5WnUY8SQxwNNf2hAmMRWD5ARMG9H4tWAxQ/XHoPQ5kt4cAVBZrHgF2Mw/kePwBYC2ozUDo+OoTFosMr24y7eTpCbY3SzzBZvLN9TMAor/55DMAWYAawHkwanAkBkgejAROvy8POPOe+r/+DL8R2N+14LNZAJNStmpoEGcikWdLKTvpiTbjt0zkJ5z4J5hgDjhiEY01zwyOXAL2spNtZ8GAx5wtAdgxEk14xJh6v3qGOdvFLGlhwW4SN/4YyHRw4lkGWn8DEPsyINkhqG2ILYhBPBNZkEjzOQNcYiILngCYFoAJ387MhQZm8Lq5ERzg1DW078cMZdjPMxyBrTlu+kQAU2GwYXV+shS4HJA7xUwQhjB+J9vwVRIiOZB8fCSgxmGxVriii2+ugmeamD1jINn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yYCrRSFRseKhUdbUjilAYQt2AqcBRuDhyEunEmg22PzCfR/M8DZG0n7Xny1kOuI8N/XGDrxJUCyxjB5bKGdUe6BGZvjswYvrrA3YWza8V+anyzz5HIJuZMX4xGQ7IUOrA57W9I6SnObcn1kB1X21ES7HW/pdnVJe+c7fchqp56Frd/L2CHUV/wxTNED4aLnpjbbgOj67X3rs7YaeFYYfWmoL1KzgnWUKRJhUxh2hqtXJJswi1tn082qcKoC+YrF4kzI5GwhTatPmbCn9Y/mlLxnRdiKs8TAlmB1OKJcl60ycFIVwLxEYbYo7F3csZPtPKc4q3PPzOJLz7jeKa6q5mHQCfvIjCVPzGSUZqy+Bah8nzGg4vAZ9IluHdxs9FE2C2CeGWTdikUYJmR+YiKTL0lg29AyiA7jMsNIcFO9O8j+yNWNDFq2AolAEyxKYUzpFrMwg1gzCmeyWo+5dNmlLYAHX9VCvhfvnbflo9jzYiHUM5H1x+w4wkyRHHuzDWfaoKOWNyFv9LRvvQ23CMD4cFX4XLEE+8lcDIHEHlLKPkDaXUrZDkjaSSlaGJ4jozNkmbJw6r6ElAGPVweIGXmo5fZGWTHbuevMniAjM+jnonbnuMmwpExEwAn6vwrmKhP2hcdXhv1cpKvCLzEtbrP14LLpR/o/JBqhquSiLD0AAAAASUVORK5CYII="},"+ua5":function(Ge,Re,F){},"5A5F":function(Ge,Re,F){Ge.exports={flex_box_center:"flex_box_center___3fvo9",flex_space_between:"flex_space_between___2dIWe",flex_box_vertical_center:"flex_box_vertical_center___213Et",flex_box_center_end:"flex_box_center_end___1GXlY",flex_box_column:"flex_box_column___2XTWO",wrap:"wrap___1JbzU",addQuestion:"addQuestion___3n7jZ",content:"content___2Crhb",left:"left___12ObT",filterPoint:"filterPoint___1wSyY",filterType:"filterType___32Vjx",btnWarp:"btnWarp___XLUgV",btn:"btn___33IXa",count:"count___2zHIG",btnActive:"btnActive___2vIUq",fold:"fold___26POp",action:"action___m_eZE",filterOrigin:"filterOrigin___OKol4",control:"control___1SAJX",search:"search___2AvaM",searchIcon:"searchIcon___2TozR",table:"table___1Q9AI",tabWarp:"tabWarp___3884f",customTable:"customTable___6Ubut","btn-style-1":"btn-style-1___m4kGi","btn-style-2":"btn-style-2___2uJ8s","btn-style-3":"btn-style-3___3kuYl",right:"right___Ie2u1",statistics:"statistics___TecQK",title:"title___1uK2v",statisticItem:"statisticItem___oBHb3",rate:"rate___15q55",dataName:"dataName___1uxmm",sort:"sort___1hyjY",rankHeader:"rankHeader___3MEZr",rankIcon:"rankIcon___t_Ggc",li:"li___3lR-W",myRecord:"myRecord___3MQJH",recordPrefix:"recordPrefix___3rIwK",mine:"mine___1LgRJ",avatar:"avatar___2X3bF",nickname:"nickname___3uP5f",myRank:"myRank___3GS-w",questionNumber:"questionNumber___3kBy-",titleWarp:"titleWarp___t0Zdh",hov:"hov___30B5q",statusText:"statusText___3pFTN",hovBtn:"hovBtn___3ciGX",tag:"tag___hllWE",problemsclose:"problemsclose___1X9HB",imgsrc:"imgsrc___3koep",sendModal:"sendModal___1P3qc",bottom:"bottom___1gmim",line:"line___psQHn",del:"del___1Qufp"}},"5VLF":function(Ge,Re,F){"use strict";var ie,L;function I(j,C,w){var H=function(U,R){return j.js_beautify(U,R)};return H.js=j.js_beautify,H.css=C.css_beautify,H.html=w.html_beautify,H.js_beautify=j.js_beautify,H.css_beautify=C.css_beautify,H.html_beautify=w.html_beautify,H}!(ie=[F("6UM0"),F("TXwP"),F("psGv")],L=function(j,C,w){return I(j,C,w)}.apply(Re,ie),L!==void 0&&(Ge.exports=L))},"6+eU":function(Ge,Re,F){"use strict";F.d(Re,"a",function(){return m});var ie=F("wx14"),L=F("rePB"),I=F("VTBJ"),j=F("1OyB"),C=F("vuIU"),w=F("Ji7U"),H=F("LK+K"),U=F("cDcd"),R=F.n(U),S=F("TSYQ"),y=F.n(S),v=function(g){var h,u="".concat(g.rootPrefixCls,"-item"),r=y()(u,"".concat(u,"-").concat(g.page),(h={},Object(L.a)(h,"".concat(u,"-active"),g.active),Object(L.a)(h,g.className,!!g.className),Object(L.a)(h,"".concat(u,"-disabled"),!g.page),h)),l=function(){g.onClick(g.page)},f=function(x){g.onKeyPress(x,g.onClick,g.page)};return R.a.createElement("li",{title:g.showTitle?g.page:null,className:r,onClick:l,onKeyPress:f,tabIndex:"0"},g.itemRender(g.page,"page",R.a.createElement("a",{rel:"nofollow"},g.page)))},d=v,o={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},n=function(E){Object(w.a)(h,E);var g=Object(H.a)(h);function h(){var u;Object(j.a)(this,h);for(var r=arguments.length,l=new Array(r),f=0;f<r;f++)l[f]=arguments[f];return u=g.call.apply(g,[this].concat(l)),u.state={goInputText:""},u.buildOptionText=function(c){return"".concat(c," ").concat(u.props.locale.items_per_page)},u.changeSize=function(c){u.props.changeSize(Number(c))},u.handleChange=function(c){u.setState({goInputText:c.target.value})},u.handleBlur=function(c){var x=u.props,D=x.goButton,A=x.quickGo,B=x.rootPrefixCls,O=u.state.goInputText;if(D||O==="")return;if(c.relatedTarget&&(c.relatedTarget.className.indexOf("".concat(B,"-prev"))>=0||c.relatedTarget.className.indexOf("".concat(B,"-next"))>=0))return;u.setState({goInputText:""}),A(u.getValidValue())},u.go=function(c){var x=u.state.goInputText;if(x==="")return;(c.keyCode===o.ENTER||c.type==="click")&&(u.setState({goInputText:""}),u.props.quickGo(u.getValidValue()))},u}return Object(C.a)(h,[{key:"getValidValue",value:function(){var r=this.state,l=r.goInputText,f=r.current;return!l||isNaN(l)?f:Number(l)}},{key:"getPageSizeOptions",value:function(){var r=this.props,l=r.pageSize,f=r.pageSizeOptions;return f.some(function(c){return c.toString()===l.toString()})?f:f.concat([l.toString()]).sort(function(c,x){var D=isNaN(Number(c))?0:Number(c),A=isNaN(Number(x))?0:Number(x);return D-A})}},{key:"render",value:function(){var r=this,l=this.props,f=l.pageSize,c=l.locale,x=l.rootPrefixCls,D=l.changeSize,A=l.quickGo,B=l.goButton,O=l.selectComponentClass,W=l.buildOptionText,P=l.selectPrefixCls,G=l.disabled,Q=this.state.goInputText,re="".concat(x,"-options"),le=O,Ee=null,_e=null,ne=null;if(!D&&!A)return null;var Te=this.getPageSizeOptions();if(D&&le){var Ae=Te.map(function(fe,J){return R.a.createElement(le.Option,{key:J,value:fe.toString()},(W||r.buildOptionText)(fe))});Ee=R.a.createElement(le,{disabled:G,prefixCls:P,showSearch:!1,className:"".concat(re,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(f||Te[0]).toString(),onChange:this.changeSize,getPopupContainer:function(J){return J.parentNode}},Ae)}return A&&(B&&(ne=typeof B=="boolean"?R.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:G,className:"".concat(re,"-quick-jumper-button")},c.jump_to_confirm):R.a.createElement("span",{onClick:this.go,onKeyUp:this.go},B)),_e=R.a.createElement("div",{className:"".concat(re,"-quick-jumper")},c.jump_to,R.a.createElement("input",{disabled:G,type:"text",value:Q,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),c.page,ne)),R.a.createElement("li",{className:"".concat(re)},Ee,_e)}}]),h}(R.a.Component);n.defaultProps={pageSizeOptions:["10","20","50","100"]};var a=n,s=F("N2Kk");function e(){}function t(E){return typeof E=="number"&&isFinite(E)&&Math.floor(E)===E}function i(E,g,h){return h}function T(E,g,h){var u=typeof E=="undefined"?g.pageSize:E;return Math.floor((h.total-1)/u)+1}var _=function(E){Object(w.a)(h,E);var g=Object(H.a)(h);function h(u){var r;Object(j.a)(this,h),r=g.call(this,u),r.getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(T(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(D,A){var B=r.props.prefixCls,O=D||R.a.createElement("button",{type:"button","aria-label":A,className:"".concat(B,"-item-link")});return typeof D=="function"&&(O=R.a.createElement(D,Object(I.a)({},r.props))),O},r.savePaginationNode=function(D){r.paginationNode=D},r.isValid=function(D){return t(D)&&D!==r.state.current},r.shouldDisplayQuickJumper=function(){var D=r.props,A=D.showQuickJumper,B=D.pageSize,O=D.total;return O<=B?!1:A},r.handleKeyDown=function(D){(D.keyCode===o.ARROW_UP||D.keyCode===o.ARROW_DOWN)&&D.preventDefault()},r.handleKeyUp=function(D){var A=r.getValidValue(D),B=r.state.currentInputValue;A!==B&&r.setState({currentInputValue:A}),D.keyCode===o.ENTER?r.handleChange(A):D.keyCode===o.ARROW_UP?r.handleChange(A-1):D.keyCode===o.ARROW_DOWN&&r.handleChange(A+1)},r.changePageSize=function(D){var A=r.state.current,B=T(D,r.state,r.props);A=A>B?B:A,B===0&&(A=r.state.current),typeof D=="number"&&("pageSize"in r.props||r.setState({pageSize:D}),"current"in r.props||r.setState({current:A,currentInputValue:A})),r.props.onShowSizeChange(A,D),"onChange"in r.props&&r.props.onChange&&r.props.onChange(A,D)},r.handleChange=function(D){var A=r.props.disabled,B=D;if(r.isValid(B)&&!A){var O=T(void 0,r.state,r.props);B>O?B=O:B<1&&(B=1),"current"in r.props||r.setState({current:B,currentInputValue:B});var W=r.state.pageSize;return r.props.onChange(B,W),B}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current<T(void 0,r.state,r.props)},r.runIfEnter=function(D,A){if(D.key==="Enter"||D.charCode===13){for(var B=arguments.length,O=new Array(B>2?B-2:0),W=2;W<B;W++)O[W-2]=arguments[W];A.apply(void 0,O)}},r.runIfEnterPrev=function(D){r.runIfEnter(D,r.prev)},r.runIfEnterNext=function(D){r.runIfEnter(D,r.next)},r.runIfEnterJumpPrev=function(D){r.runIfEnter(D,r.jumpPrev)},r.runIfEnterJumpNext=function(D){r.runIfEnter(D,r.jumpNext)},r.handleGoTO=function(D){(D.keyCode===o.ENTER||D.type==="click")&&r.handleChange(r.state.currentInputValue)};var l=u.onChange!==e,f="current"in u;f&&!l&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var c=u.defaultCurrent;"current"in u&&(c=u.current);var x=u.defaultPageSize;return"pageSize"in u&&(x=u.pageSize),c=Math.min(c,T(x,void 0,u)),r.state={current:c,currentInputValue:c,pageSize:x},r}return Object(C.a)(h,[{key:"componentDidUpdate",value:function(r,l){var f=this.props.prefixCls;if(l.current!==this.state.current&&this.paginationNode){var c=this.paginationNode.querySelector(".".concat(f,"-item-").concat(l.current));c&&document.activeElement===c&&c.blur()}}},{key:"getValidValue",value:function(r){var l=r.target.value,f=T(void 0,this.state,this.props),c=this.state.currentInputValue,x;return l===""?x=l:isNaN(Number(l))?x=c:l>=f?x=f:x=Number(l),x}},{key:"getShowSizeChanger",value:function(){var r=this.props,l=r.showSizeChanger,f=r.total,c=r.totalBoundaryShowSizeChanger;return typeof l!="undefined"?l:f>c}},{key:"renderPrev",value:function(r){var l=this.props,f=l.prevIcon,c=l.itemRender,x=c(r,"prev",this.getItemIcon(f,"prev page")),D=!this.hasPrev();return Object(U.isValidElement)(x)?Object(U.cloneElement)(x,{disabled:D}):x}},{key:"renderNext",value:function(r){var l=this.props,f=l.nextIcon,c=l.itemRender,x=c(r,"next",this.getItemIcon(f,"next page")),D=!this.hasNext();return Object(U.isValidElement)(x)?Object(U.cloneElement)(x,{disabled:D}):x}},{key:"render",value:function(){var r=this,l=this.props,f=l.prefixCls,c=l.className,x=l.style,D=l.disabled,A=l.hideOnSinglePage,B=l.total,O=l.locale,W=l.showQuickJumper,P=l.showLessItems,G=l.showTitle,Q=l.showTotal,re=l.simple,le=l.itemRender,Ee=l.showPrevNextJumpers,_e=l.jumpPrevIcon,ne=l.jumpNextIcon,Te=l.selectComponentClass,Ae=l.selectPrefixCls,fe=l.pageSizeOptions,J=this.state,Ie=J.current,it=J.pageSize,et=J.currentInputValue;if(A===!0&&B<=it)return null;var Qe=T(void 0,this.state,this.props),nt=[],Me=null,ze=null,Je=null,$e=null,Xe=null,Fe=W&&W.goButton,We=P?1:2,yt=Ie-1>0?Ie-1:0,ft=Ie+1<Qe?Ie+1:Qe,ut=Object.keys(this.props).reduce(function(V,X){return(X.substr(0,5)==="data-"||X.substr(0,5)==="aria-"||X==="role")&&(V[X]=r.props[X]),V},{});if(re)return Fe&&(typeof Fe=="boolean"?Xe=R.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},O.jump_to_confirm):Xe=R.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Fe),Xe=R.a.createElement("li",{title:G?"".concat(O.jump_to).concat(Ie,"/").concat(Qe):null,className:"".concat(f,"-simple-pager")},Xe)),R.a.createElement("ul",Object(ie.a)({className:y()(f,"".concat(f,"-simple"),Object(L.a)({},"".concat(f,"-disabled"),D),c),style:x,ref:this.savePaginationNode},ut),R.a.createElement("li",{title:G?O.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:y()("".concat(f,"-prev"),Object(L.a)({},"".concat(f,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(yt)),R.a.createElement("li",{title:G?"".concat(Ie,"/").concat(Qe):null,className:"".concat(f,"-simple-pager")},R.a.createElement("input",{type:"text",value:et,disabled:D,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),R.a.createElement("span",{className:"".concat(f,"-slash")},"/"),Qe),R.a.createElement("li",{title:G?O.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:y()("".concat(f,"-next"),Object(L.a)({},"".concat(f,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(ft)),Xe);if(Qe<=3+We*2){var rt={locale:O,rootPrefixCls:f,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:G,itemRender:le};Qe||nt.push(R.a.createElement(d,Object(ie.a)({},rt,{key:"noPager",page:Qe,className:"".concat(f,"-disabled")})));for(var Tt=1;Tt<=Qe;Tt+=1){var _t=Ie===Tt;nt.push(R.a.createElement(d,Object(ie.a)({},rt,{key:Tt,page:Tt,active:_t})))}}else{var me=P?O.prev_3:O.prev_5,xe=P?O.next_3:O.next_5;Ee&&(Me=R.a.createElement("li",{title:G?me:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:y()("".concat(f,"-jump-prev"),Object(L.a)({},"".concat(f,"-jump-prev-custom-icon"),!!_e))},le(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(_e,"prev page"))),ze=R.a.createElement("li",{title:G?xe:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:y()("".concat(f,"-jump-next"),Object(L.a)({},"".concat(f,"-jump-next-custom-icon"),!!ne))},le(this.getJumpNextPage(),"jump-next",this.getItemIcon(ne,"next page")))),$e=R.a.createElement(d,{locale:O,last:!0,rootPrefixCls:f,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Qe,page:Qe,active:!1,showTitle:G,itemRender:le}),Je=R.a.createElement(d,{locale:O,rootPrefixCls:f,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:G,itemRender:le});var De=Math.max(1,Ie-We),ke=Math.min(Ie+We,Qe);Ie-1<=We&&(ke=1+We*2),Qe-Ie<=We&&(De=Qe-We*2);for(var be=De;be<=ke;be+=1){var Le=Ie===be;nt.push(R.a.createElement(d,{locale:O,rootPrefixCls:f,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:be,page:be,active:Le,showTitle:G,itemRender:le}))}Ie-1>=We*2&&Ie!==1+2&&(nt[0]=Object(U.cloneElement)(nt[0],{className:"".concat(f,"-item-after-jump-prev")}),nt.unshift(Me)),Qe-Ie>=We*2&&Ie!==Qe-2&&(nt[nt.length-1]=Object(U.cloneElement)(nt[nt.length-1],{className:"".concat(f,"-item-before-jump-next")}),nt.push(ze)),De!==1&&nt.unshift(Je),ke!==Qe&&nt.push($e)}var ce=null;Q&&(ce=R.a.createElement("li",{className:"".concat(f,"-total-text")},Q(B,[B===0?0:(Ie-1)*it+1,Ie*it>B?B:Ie*it])));var ee=!this.hasPrev()||!Qe,te=!this.hasNext()||!Qe;return R.a.createElement("ul",Object(ie.a)({className:y()(f,c,Object(L.a)({},"".concat(f,"-disabled"),D)),style:x,unselectable:"unselectable",ref:this.savePaginationNode},ut),ce,R.a.createElement("li",{title:G?O.prev_page:null,onClick:this.prev,tabIndex:ee?null:0,onKeyPress:this.runIfEnterPrev,className:y()("".concat(f,"-prev"),Object(L.a)({},"".concat(f,"-disabled"),ee)),"aria-disabled":ee},this.renderPrev(yt)),nt,R.a.createElement("li",{title:G?O.next_page:null,onClick:this.next,tabIndex:te?null:0,onKeyPress:this.runIfEnterNext,className:y()("".concat(f,"-next"),Object(L.a)({},"".concat(f,"-disabled"),te)),"aria-disabled":te},this.renderNext(ft)),R.a.createElement(a,{disabled:D,locale:O,rootPrefixCls:f,selectComponentClass:Te,selectPrefixCls:Ae,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Ie,pageSize:it,pageSizeOptions:fe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Fe}))}}],[{key:"getDerivedStateFromProps",value:function(r,l){var f={};if("current"in r&&(f.current=r.current,r.current!==l.current&&(f.currentInputValue=f.current)),"pageSize"in r&&r.pageSize!==l.pageSize){var c=l.current,x=T(r.pageSize,l,r);c=c>x?x:c,"current"in r||(f.current=c,f.currentInputValue=c),f.pageSize=r.pageSize}return f}}]),h}(R.a.Component);_.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:e,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:e,locale:s.a,style:{},itemRender:i,totalBoundaryShowSizeChanger:50};var m=_},"6RRn":function(Ge,Re,F){"use strict";var ie=F("wCXF"),L=F("n6Qo");F.d(Re,"b",function(){return L.a});var I=F("IBYe"),j=F("6eGT"),C=F("hW8S");F.d(Re,"a",function(){return C.a}),Re.c=ie.b},"6UM0":function(Ge,Re,F){var ie,L;(function(){var I;(function(){"use strict";var C=[function(R,S,y){var v=y(1).Beautifier,d=y(5).Options;function o(n,a){var s=new v(n,a);return s.beautify()}R.exports=o,R.exports.defaultOptions=function(){return new d}},function(R,S,y){var v=y(2).Output,d=y(3).Token,o=y(4),n=y(5).Options,a=y(7).Tokenizer,s=y(7).line_starters,e=y(7).positionable_operators,t=y(7).TOKEN;function i(P,G){return G.indexOf(P)!==-1}function T(P){return P.replace(/^\s+/g,"")}function _(P){for(var G={},Q=0;Q<P.length;Q++)G[P[Q].replace(/-/g,"_")]=P[Q];return G}function m(P,G){return P&&P.type===t.RESERVED&&P.text===G}function E(P,G){return P&&P.type===t.RESERVED&&i(P.text,G)}var g=["case","return","do","if","throw","else","await","break","continue","async"],h=["before-newline","after-newline","preserve-newline"],u=_(h),r=[u.before_newline,u.preserve_newline],l={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function f(P,G){if(G.multiline_frame||G.mode===l.ForInitializer||G.mode===l.Conditional)return;P.remove_indent(G.start_line_index)}function c(P){P=P.replace(o.allLineBreaks,`
`);for(var G=[],Q=P.indexOf(`
`);Q!==-1;)G.push(P.substring(0,Q)),P=P.substring(Q+1),Q=P.indexOf(`
`);return P.length&&G.push(P),G}function x(P){return P===l.ArrayLiteral}function D(P){return i(P,[l.Expression,l.ForInitializer,l.Conditional])}function A(P,G){for(var Q=0;Q<P.length;Q++){var re=P[Q].trim();if(re.charAt(0)!==G)return!1}return!0}function B(P,G){for(var Q=0,re=P.length,le;Q<re;Q++)if(le=P[Q],le&&le.indexOf(G)!==0)return!1;return!0}function O(P,G){G=G||{},this._source_text=P||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new n(G)}O.prototype.create_flags=function(P,G){var Q=0;P&&(Q=P.indentation_level,!this._output.just_added_newline()&&P.line_indent_level>Q&&(Q=P.line_indent_level));var re={mode:G,parent:P,last_token:P?P.last_token:new d(t.START_BLOCK,""),last_word:P?P.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:Q,alignment:0,line_indent_level:P?P.line_indent_level:Q,start_line_index:this._output.get_line_number(),ternary_depth:0};return re},O.prototype._reset=function(P){var G=P.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new v(this._options,G),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(l.BlockStatement);var Q=new a(P,this._options);return this._tokens=Q.tokenize(),P},O.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var P,G=this._reset(this._source_text),Q=this._options.eol;this._options.eol==="auto"&&(Q=`
`,G&&o.lineBreak.test(G||"")&&(Q=G.match(o.lineBreak)[0]));for(var re=this._tokens.next();re;)this.handle_token(re),this._last_last_text=this._flags.last_token.text,this._flags.last_token=re,re=this._tokens.next();return P=this._output.get_code(Q),P},O.prototype.handle_token=function(P,G){P.type===t.START_EXPR?this.handle_start_expr(P):P.type===t.END_EXPR?this.handle_end_expr(P):P.type===t.START_BLOCK?this.handle_start_block(P):P.type===t.END_BLOCK?this.handle_end_block(P):P.type===t.WORD?this.handle_word(P):P.type===t.RESERVED?this.handle_word(P):P.type===t.SEMICOLON?this.handle_semicolon(P):P.type===t.STRING?this.handle_string(P):P.type===t.EQUALS?this.handle_equals(P):P.type===t.OPERATOR?this.handle_operator(P):P.type===t.COMMA?this.handle_comma(P):P.type===t.BLOCK_COMMENT?this.handle_block_comment(P,G):P.type===t.COMMENT?this.handle_comment(P,G):P.type===t.DOT?this.handle_dot(P):P.type===t.EOF?this.handle_eof(P):P.type===t.UNKNOWN?this.handle_unknown(P,G):this.handle_unknown(P,G)},O.prototype.handle_whitespace_and_comments=function(P,G){var Q=P.newlines,re=this._options.keep_array_indentation&&x(this._flags.mode);if(P.comments_before)for(var le=P.comments_before.next();le;)this.handle_whitespace_and_comments(le,G),this.handle_token(le,G),le=P.comments_before.next();if(re)for(var Ee=0;Ee<Q;Ee+=1)this.print_newline(Ee>0,G);else if(this._options.max_preserve_newlines&&Q>this._options.max_preserve_newlines&&(Q=this._options.max_preserve_newlines),this._options.preserve_newlines&&Q>1){this.print_newline(!1,G);for(var _e=1;_e<Q;_e+=1)this.print_newline(!0,G)}};var W=["async","break","continue","return","throw","yield"];O.prototype.allow_wrap_or_preserved_newline=function(P,G){if(G=G===void 0?!1:G,this._output.just_added_newline())return;var Q=this._options.preserve_newlines&&P.newlines||G,re=i(this._flags.last_token.text,e)||i(P.text,e);if(re){var le=i(this._flags.last_token.text,e)&&i(this._options.operator_position,r)||i(P.text,e);Q=Q&&le}if(Q)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(E(this._flags.last_token,W))return;this._output.set_wrap_point()}},O.prototype.print_newline=function(P,G){if(!G&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==t.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var Q=this._tokens.peek();this._flags.mode===l.Statement&&!(this._flags.if_block&&m(Q,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(P)&&(this._flags.multiline_frame=!0)},O.prototype.print_token_line_indentation=function(P){this._output.just_added_newline()&&(this._options.keep_array_indentation&&P.newlines&&(P.text==="["||x(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(P.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},O.prototype.print_token=function(P){if(this._output.raw){this._output.add_raw_token(P);return}if(this._options.comma_first&&P.previous&&P.previous.type===t.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var G=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(G),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(P),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(P),this._output.non_breaking_space=!0,this._output.add_token(P.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},O.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},O.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},O.prototype.set_mode=function(P){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,P),this._flags=this.create_flags(this._previous_flags,P),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},O.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===l.Statement&&f(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},O.prototype.start_of_object_property=function(){return this._flags.parent.mode===l.ObjectLiteral&&this._flags.mode===l.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||E(this._flags.last_token,["get","set"]))},O.prototype.start_of_statement=function(P){var G=!1;return G=G||E(this._flags.last_token,["var","let","const"])&&P.type===t.WORD,G=G||m(this._flags.last_token,"do"),G=G||!(this._flags.parent.mode===l.ObjectLiteral&&this._flags.mode===l.Statement)&&E(this._flags.last_token,W)&&!P.newlines,G=G||m(this._flags.last_token,"else")&&!(m(P,"if")&&!P.comments_before),G=G||this._flags.last_token.type===t.END_EXPR&&(this._previous_flags.mode===l.ForInitializer||this._previous_flags.mode===l.Conditional),G=G||this._flags.last_token.type===t.WORD&&this._flags.mode===l.BlockStatement&&!this._flags.in_case&&!(P.text==="--"||P.text==="++")&&this._last_last_text!=="function"&&P.type!==t.WORD&&P.type!==t.RESERVED,G=G||this._flags.mode===l.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||E(this._flags.last_token,["get","set"])),G?(this.set_mode(l.Statement),this.indent(),this.handle_whitespace_and_comments(P,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P,E(P,["do","for","if","while"])),!0):!1},O.prototype.handle_start_expr=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P);var G=l.Expression;if(P.text==="["){if(this._flags.last_token.type===t.WORD||this._flags.last_token.text===")"){E(this._flags.last_token,s)&&(this._output.space_before_token=!0),this.print_token(P),this.set_mode(G),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}G=l.ArrayLiteral,x(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),i(this._flags.last_token.type,[t.START_EXPR,t.END_EXPR,t.WORD,t.OPERATOR,t.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===t.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,G=l.ForInitializer):i(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,G=l.Conditional):i(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&P.whitespace_before===""?this._output.space_before_token=!1:(i(this._flags.last_token.text,s)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===t.EQUALS||this._flags.last_token.type===t.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P);else if(this._flags.last_token.type===t.WORD){this._output.space_before_token=!1;var Q=this._tokens.peek(-3);if(this._options.space_after_named_function&&Q){var re=this._tokens.peek(-4);E(Q,["async","function"])||Q.text==="*"&&E(re,["async","function"])?this._output.space_before_token=!0:this._flags.mode===l.ObjectLiteral?(Q.text==="{"||Q.text===","||Q.text==="*"&&(re.text==="{"||re.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(P);(this._flags.last_token.type===t.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(i(this._last_last_text,["function","yield"])||this._flags.mode===l.ObjectLiteral&&i(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===t.START_BLOCK?this.print_newline():(this._flags.last_token.type===t.END_EXPR||this._flags.last_token.type===t.START_EXPR||this._flags.last_token.type===t.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===t.COMMA)&&this.allow_wrap_or_preserved_newline(P,P.newlines),this.print_token(P),this.set_mode(G),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},O.prototype.handle_end_expr=function(P){for(;this._flags.mode===l.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(P,P.text==="]"&&x(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===t.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(P),this.restore_mode(),f(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===l.Conditional&&(this._previous_flags.mode=l.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},O.prototype.handle_start_block=function(P){this.handle_whitespace_and_comments(P);var G=this._tokens.peek(),Q=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===t.END_EXPR?(this.set_mode(l.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(l.BlockStatement):Q&&(i(Q.text,[":",","])&&i(G.type,[t.STRING,t.WORD,t.RESERVED])||i(G.text,["get","set","..."])&&i(Q.type,[t.WORD,t.RESERVED]))?i(this._last_last_text,["class","interface"])&&!i(Q.text,[":",","])?this.set_mode(l.BlockStatement):this.set_mode(l.ObjectLiteral):this._flags.last_token.type===t.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(l.BlockStatement):i(this._flags.last_token.type,[t.EQUALS,t.START_EXPR,t.COMMA,t.OPERATOR])||E(this._flags.last_token,["return","throw","import","default"])?this.set_mode(l.ObjectLiteral):this.set_mode(l.BlockStatement),this._flags.last_token&&(E(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var re=!G.comments_before&&G.text==="}",le=re&&this._flags.last_word==="function"&&this._flags.last_token.type===t.END_EXPR;if(this._options.brace_preserve_inline){var Ee=0,_e=null;this._flags.inline_frame=!0;do if(Ee+=1,_e=this._tokens.peek(Ee-1),_e.newlines){this._flags.inline_frame=!1;break}while(_e.type!==t.EOF&&!(_e.type===t.END_BLOCK&&_e.opened===P))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&P.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==t.OPERATOR&&(le||this._flags.last_token.type===t.EQUALS||E(this._flags.last_token,g)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(x(this._previous_flags.mode)&&(this._flags.last_token.type===t.START_EXPR||this._flags.last_token.type===t.COMMA)&&((this._flags.last_token.type===t.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===t.COMMA||this._flags.last_token.type===t.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(P),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==t.OPERATOR&&this._flags.last_token.type!==t.START_EXPR&&(this._flags.last_token.type===t.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(P),this.indent(),!re&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},O.prototype.handle_end_block=function(P){for(this.handle_whitespace_and_comments(P);this._flags.mode===l.Statement;)this.restore_mode();var G=this._flags.last_token.type===t.START_BLOCK;this._flags.inline_frame&&!G?this._output.space_before_token=!0:this._options.brace_style==="expand"?G||this.print_newline():G||(x(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(P)},O.prototype.handle_word=function(P){if(P.type===t.RESERVED){if(i(P.text,["set","get"])&&this._flags.mode!==l.ObjectLiteral)P.type=t.WORD;else if(P.text==="import"&&i(this._tokens.peek().text,["(","."]))P.type=t.WORD;else if(i(P.text,["as","from"])&&!this._flags.import_block)P.type=t.WORD;else if(this._flags.mode===l.ObjectLiteral){var G=this._tokens.peek();G.text===":"&&(P.type=t.WORD)}}if(this.start_of_statement(P)?E(this._flags.last_token,["var","let","const"])&&P.type===t.WORD&&(this._flags.declaration_statement=!0):P.newlines&&!D(this._flags.mode)&&(this._flags.last_token.type!==t.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==t.EQUALS&&(this._options.preserve_newlines||!E(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(P),this.print_newline()):this.handle_whitespace_and_comments(P),this._flags.do_block&&!this._flags.do_while)if(m(P,"while")){this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&m(P,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===l.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&E(P,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(P),this._flags.in_case=!0;return}if((this._flags.last_token.type===t.COMMA||this._flags.last_token.type===t.START_EXPR||this._flags.last_token.type===t.EQUALS||this._flags.last_token.type===t.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P)),m(P,"function")){(i(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(i(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===t.OPERATOR))&&(!this._output.just_added_blankline()&&!P.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===t.RESERVED||this._flags.last_token.type===t.WORD?E(this._flags.last_token,["get","set","new","export"])||E(this._flags.last_token,W)?this._output.space_before_token=!0:m(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===t.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(D(this._flags.mode)||x(this._flags.mode))||this.print_newline(),this.print_token(P),this._flags.last_word=P.text;return}var Q="NONE";if(this._flags.last_token.type===t.END_BLOCK?this._previous_flags.inline_frame?Q="SPACE":E(P,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&P.newlines?Q="NEWLINE":(Q="SPACE",this._output.space_before_token=!0):Q="NEWLINE":this._flags.last_token.type===t.SEMICOLON&&this._flags.mode===l.BlockStatement?Q="NEWLINE":this._flags.last_token.type===t.SEMICOLON&&D(this._flags.mode)?Q="SPACE":this._flags.last_token.type===t.STRING?Q="NEWLINE":this._flags.last_token.type===t.RESERVED||this._flags.last_token.type===t.WORD||this._flags.last_token.text==="*"&&(i(this._last_last_text,["function","yield"])||this._flags.mode===l.ObjectLiteral&&i(this._last_last_text,["{",","]))?Q="SPACE":this._flags.last_token.type===t.START_BLOCK?this._flags.inline_frame?Q="SPACE":Q="NEWLINE":this._flags.last_token.type===t.END_EXPR&&(this._output.space_before_token=!0,Q="NEWLINE"),E(P,s)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Q="SPACE":Q="NEWLINE"),E(P,["else","catch","finally"]))if((!(this._flags.last_token.type===t.END_BLOCK&&this._previous_flags.mode===l.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&P.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var re=this._output.current_line;re.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Q==="NEWLINE"?E(this._flags.last_token,g)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&E(P,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==t.END_EXPR?(this._flags.last_token.type!==t.START_EXPR||!E(P,["var","let","const"]))&&this._flags.last_token.text!==":"&&(m(P,"if")&&m(P.previous,"else")?this._output.space_before_token=!0:this.print_newline()):E(P,s)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&x(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Q==="SPACE"&&(this._output.space_before_token=!0);P.previous&&(P.previous.type===t.WORD||P.previous.type===t.RESERVED)&&(this._output.space_before_token=!0),this.print_token(P),this._flags.last_word=P.text,P.type===t.RESERVED&&(P.text==="do"?this._flags.do_block=!0:P.text==="if"?this._flags.if_block=!0:P.text==="import"?this._flags.import_block=!0:this._flags.import_block&&m(P,"from")&&(this._flags.import_block=!1))},O.prototype.handle_semicolon=function(P){this.start_of_statement(P)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(P);for(var G=this._tokens.peek();this._flags.mode===l.Statement&&!(this._flags.if_block&&m(G,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(P)},O.prototype.handle_string=function(P){P.text.startsWith("`")&&P.newlines===0&&P.whitespace_before===""&&(P.previous.text===")"||this._flags.last_token.type===t.WORD)||(this.start_of_statement(P)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(P),this._flags.last_token.type===t.RESERVED||this._flags.last_token.type===t.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===t.COMMA||this._flags.last_token.type===t.START_EXPR||this._flags.last_token.type===t.EQUALS||this._flags.last_token.type===t.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P):P.text.startsWith("`")&&this._flags.last_token.type===t.END_EXPR&&(P.previous.text==="]"||P.previous.text===")")&&P.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(P)},O.prototype.handle_equals=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0},O.prototype.handle_comma=function(P){this.handle_whitespace_and_comments(P,!0),this.print_token(P),this._output.space_before_token=!0,this._flags.declaration_statement?(D(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(P)):this._flags.mode===l.ObjectLiteral||this._flags.mode===l.Statement&&this._flags.parent.mode===l.ObjectLiteral?(this._flags.mode===l.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(P)},O.prototype.handle_operator=function(P){var G=P.text==="*"&&(E(this._flags.last_token,["function","yield"])||i(this._flags.last_token.type,[t.START_BLOCK,t.COMMA,t.END_BLOCK,t.SEMICOLON])),Q=i(P.text,["-","+"])&&(i(this._flags.last_token.type,[t.START_BLOCK,t.START_EXPR,t.EQUALS,t.OPERATOR])||i(this._flags.last_token.text,s)||this._flags.last_token.text===",");if(!this.start_of_statement(P)){var re=!G;this.handle_whitespace_and_comments(P,re)}if(P.text==="*"&&this._flags.last_token.type===t.DOT){this.print_token(P);return}if(P.text==="::"){this.print_token(P);return}if(this._flags.last_token.type===t.OPERATOR&&i(this._options.operator_position,r)&&this.allow_wrap_or_preserved_newline(P),P.text===":"&&this._flags.in_case){this.print_token(P),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==t.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var le=!0,Ee=!0,_e=!1;if(P.text===":"?this._flags.ternary_depth===0?le=!1:(this._flags.ternary_depth-=1,_e=!0):P.text==="?"&&(this._flags.ternary_depth+=1),!Q&&!G&&this._options.preserve_newlines&&i(P.text,e)){var ne=P.text===":",Te=ne&&_e,Ae=ne&&!_e;switch(this._options.operator_position){case u.before_newline:this._output.space_before_token=!Ae,this.print_token(P),(!ne||Te)&&this.allow_wrap_or_preserved_newline(P),this._output.space_before_token=!0;return;case u.after_newline:this._output.space_before_token=!0,!ne||Te?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(P):this._output.space_before_token=!1,this.print_token(P),this._output.space_before_token=!0;return;case u.preserve_newline:Ae||this.allow_wrap_or_preserved_newline(P),le=!(this._output.just_added_newline()||Ae),this._output.space_before_token=le,this.print_token(P),this._output.space_before_token=!0;return}}if(G){this.allow_wrap_or_preserved_newline(P),le=!1;var fe=this._tokens.peek();Ee=fe&&i(fe.type,[t.WORD,t.RESERVED])}else if(P.text==="...")this.allow_wrap_or_preserved_newline(P),le=this._flags.last_token.type===t.START_BLOCK,Ee=!1;else if(i(P.text,["--","++","!","~"])||Q){if((this._flags.last_token.type===t.COMMA||this._flags.last_token.type===t.START_EXPR)&&this.allow_wrap_or_preserved_newline(P),le=!1,Ee=!1,P.newlines&&(P.text==="--"||P.text==="++"||P.text==="~")){var J=E(this._flags.last_token,g)&&P.newlines;J&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(J,!0)}this._flags.last_token.text===";"&&D(this._flags.mode)&&(le=!0),this._flags.last_token.type===t.RESERVED?le=!0:this._flags.last_token.type===t.END_EXPR?le=!(this._flags.last_token.text==="]"&&(P.text==="--"||P.text==="++")):this._flags.last_token.type===t.OPERATOR&&(le=i(P.text,["--","-","++","+"])&&i(this._flags.last_token.text,["--","-","++","+"]),i(P.text,["+","-"])&&i(this._flags.last_token.text,["--","++"])&&(Ee=!0)),(this._flags.mode===l.BlockStatement&&!this._flags.inline_frame||this._flags.mode===l.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||le,this.print_token(P),this._output.space_before_token=Ee},O.prototype.handle_block_comment=function(P,G){if(this._output.raw){this._output.add_raw_token(P),P.directives&&P.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(P.directives){this.print_newline(!1,G),this.print_token(P),P.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!o.newline.test(P.text)&&!P.newlines){this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0;return}else this.print_block_commment(P,G)},O.prototype.print_block_commment=function(P,G){var Q=c(P.text),re,le=!1,Ee=!1,_e=P.whitespace_before,ne=_e.length;if(this.print_newline(!1,G),this.print_token_line_indentation(P),this._output.add_token(Q[0]),this.print_newline(!1,G),Q.length>1){for(Q=Q.slice(1),le=A(Q,"*"),Ee=B(Q,_e),le&&(this._flags.alignment=1),re=0;re<Q.length;re++)le?(this.print_token_line_indentation(P),this._output.add_token(T(Q[re]))):Ee&&Q[re]?(this.print_token_line_indentation(P),this._output.add_token(Q[re].substring(ne))):(this._output.current_line.set_indent(-1),this._output.add_token(Q[re])),this.print_newline(!1,G);this._flags.alignment=0}},O.prototype.handle_comment=function(P,G){P.newlines?this.print_newline(!1,G):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(P),this.print_newline(!1,G)},O.prototype.handle_dot=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),E(this._flags.last_token,g)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(P,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(P)},O.prototype.handle_unknown=function(P,G){this.print_token(P),P.text[P.text.length-1]===`
`&&this.print_newline(!1,G)},O.prototype.handle_eof=function(P){for(;this._flags.mode===l.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P)},R.exports.Beautifier=O},function(R){function S(d){this.__parent=d,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}S.prototype.clone_empty=function(){var d=new S(this.__parent);return d.set_indent(this.__indent_count,this.__alignment_count),d},S.prototype.item=function(d){return d<0?this.__items[this.__items.length+d]:this.__items[d]},S.prototype.has_match=function(d){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(d))return!0;return!1},S.prototype.set_indent=function(d,o){this.is_empty()&&(this.__indent_count=d||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},S.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},S.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},S.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var d=this.__parent.current_line;return d.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),d.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),d.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,d.__items[0]===" "&&(d.__items.splice(0,1),d.__character_count-=1),!0}return!1},S.prototype.is_empty=function(){return this.__items.length===0},S.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},S.prototype.push=function(d){this.__items.push(d);var o=d.lastIndexOf(`
`);o!==-1?this.__character_count=d.length-o:this.__character_count+=d.length},S.prototype.pop=function(){var d=null;return this.is_empty()||(d=this.__items.pop(),this.__character_count-=d.length),d},S.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},S.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},S.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},S.prototype.toString=function(){var d="";return this.is_empty()?this.__parent.indent_empty_lines&&(d=this.__parent.get_indent_string(this.__indent_count)):(d=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),d+=this.__items.join("")),d};function y(d,o){this.__cache=[""],this.__indent_size=d.indent_size,this.__indent_string=d.indent_char,d.indent_with_tabs||(this.__indent_string=new Array(d.indent_size+1).join(d.indent_char)),o=o||"",d.indent_level>0&&(o=new Array(d.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}y.prototype.get_indent_size=function(d,o){var n=this.__base_string_length;return o=o||0,d<0&&(n=0),n+=d*this.__indent_size,n+=o,n},y.prototype.get_indent_string=function(d,o){var n=this.__base_string;return o=o||0,d<0&&(d=0,n=""),o+=d*this.__indent_size,this.__ensure_cache(o),n+=this.__cache[o],n},y.prototype.__ensure_cache=function(d){for(;d>=this.__cache.length;)this.__add_column()},y.prototype.__add_column=function(){var d=this.__cache.length,o=0,n="";this.__indent_size&&d>=this.__indent_size&&(o=Math.floor(d/this.__indent_size),d-=o*this.__indent_size,n=new Array(o+1).join(this.__indent_string)),d&&(n+=new Array(d+1).join(" ")),this.__cache.push(n)};function v(d,o){this.__indent_cache=new y(d,o),this.raw=!1,this._end_with_newline=d.end_with_newline,this.indent_size=d.indent_size,this.wrap_line_length=d.wrap_line_length,this.indent_empty_lines=d.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new S(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}v.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},v.prototype.get_line_number=function(){return this.__lines.length},v.prototype.get_indent_string=function(d,o){return this.__indent_cache.get_indent_string(d,o)},v.prototype.get_indent_size=function(d,o){return this.__indent_cache.get_indent_size(d,o)},v.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},v.prototype.add_new_line=function(d){return this.is_empty()||!d&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},v.prototype.get_code=function(d){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===`
`&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join(`
`);return d!==`
`&&(n=n.replace(/[\n]/g,d)),n},v.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},v.prototype.set_indent=function(d,o){return d=d||0,o=o||0,this.next_line.set_indent(d,o),this.__lines.length>1?(this.current_line.set_indent(d,o),!0):(this.current_line.set_indent(),!1)},v.prototype.add_raw_token=function(d){for(var o=0;o<d.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(d.whitespace_before),this.current_line.push(d.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},v.prototype.add_token=function(d){this.__add_space_before_token(),this.current_line.push(d),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},v.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},v.prototype.remove_indent=function(d){for(var o=this.__lines.length;d<o;)this.__lines[d]._remove_indent(),d++;this.current_line._remove_wrap_indent()},v.prototype.trim=function(d){for(d=d===void 0?!1:d,this.current_line.trim();d&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},v.prototype.just_added_newline=function(){return this.current_line.is_empty()},v.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},v.prototype.ensure_empty_line_above=function(d,o){for(var n=this.__lines.length-2;n>=0;){var a=this.__lines[n];if(a.is_empty())break;if(a.item(0).indexOf(d)!==0&&a.item(-1)!==o){this.__lines.splice(n+1,0,new S(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},R.exports.Output=v},function(R){function S(y,v,d,o){this.type=y,this.text=v,this.comments_before=null,this.newlines=d||0,this.whitespace_before=o||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}R.exports.Token=S},function(R,S){var y="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",v="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",d="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",o="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",n="(?:\\\\u[0-9a-fA-F]{4}|["+y+d+"])",a="(?:\\\\u[0-9a-fA-F]{4}|["+v+d+o+"])*";S.identifier=new RegExp(n+a,"g"),S.identifierStart=new RegExp(n),S.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+v+d+o+"])+");var s=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;S.newline=/[\n\r\u2028\u2029]/,S.lineBreak=new RegExp(`\r
|`+S.newline.source),S.allLineBreaks=new RegExp(S.lineBreak.source,"g")},function(R,S,y){var v=y(6).Options,d=["before-newline","after-newline","preserve-newline"];function o(n){v.call(this,n,"js");var a=this.raw_options.brace_style||null;a==="expand-strict"?this.raw_options.brace_style="expand":a==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var e=0;e<s.length;e++)s[e]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=s[e];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",d),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}o.prototype=new v,R.exports.Options=o},function(R){function S(d,o){this.raw_options=y(d,o),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}S.prototype._get_array=function(d,o){var n=this.raw_options[d],a=o||[];return typeof n=="object"?n!==null&&typeof n.concat=="function"&&(a=n.concat()):typeof n=="string"&&(a=n.split(/[^a-zA-Z0-9_\/\-]+/)),a},S.prototype._get_boolean=function(d,o){var n=this.raw_options[d],a=n===void 0?!!o:!!n;return a},S.prototype._get_characters=function(d,o){var n=this.raw_options[d],a=o||"";return typeof n=="string"&&(a=n.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),a},S.prototype._get_number=function(d,o){var n=this.raw_options[d];o=parseInt(o,10),isNaN(o)&&(o=0);var a=parseInt(n,10);return isNaN(a)&&(a=o),a},S.prototype._get_selection=function(d,o,n){var a=this._get_selection_list(d,o,n);if(a.length!==1)throw new Error("Invalid Option Value: The option '"+d+`' can only be one of the following values:
`+o+`
You passed in: '`+this.raw_options[d]+"'");return a[0]},S.prototype._get_selection_list=function(d,o,n){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(n=n||[o[0]],!this._is_valid_selection(n,o))throw new Error("Invalid Default Value!");var a=this._get_array(d,n);if(!this._is_valid_selection(a,o))throw new Error("Invalid Option Value: The option '"+d+`' can contain only the following values:
`+o+`
You passed in: '`+this.raw_options[d]+"'");return a},S.prototype._is_valid_selection=function(d,o){return d.length&&o.length&&!d.some(function(n){return o.indexOf(n)===-1})};function y(d,o){var n={};d=v(d);var a;for(a in d)a!==o&&(n[a]=d[a]);if(o&&d[o])for(a in d[o])n[a]=d[o][a];return n}function v(d){var o={},n;for(n in d){var a=n.replace(/-/g,"_");o[a]=d[n]}return o}R.exports.Options=S,R.exports.normalizeOpts=v,R.exports.mergeOpts=y},function(R,S,y){var v=y(8).InputScanner,d=y(9).Tokenizer,o=y(9).TOKEN,n=y(13).Directives,a=y(4),s=y(12).Pattern,e=y(14).TemplatablePattern;function t(A,B){return B.indexOf(A)!==-1}var i={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},T=new n(/\/\*/,/\*\//),_=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,m=/[0-9]/,E=/[^\d\.]/,g=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),h=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";h=h.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),h="\\?\\.(?!\\d) "+h,h=h.replace(/ /g,"|");var u=new RegExp(h),r="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),l=r.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),f=new RegExp("^(?:"+l.join("|")+")$"),c,x=function(A,B){d.call(this,A,B),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var O=new s(this._input),W=new e(this._input).read_options(this._options);this.__patterns={template:W,identifier:W.starting_with(a.identifier).matching(a.identifierMatch),number:O.matching(_),punct:O.matching(u),comment:O.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:O.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:O.matching(/<!--/),html_comment_end:O.matching(/-->/),include:O.starting_with(/#include/).until_after(a.lineBreak),shebang:O.starting_with(/#!/).until_after(a.lineBreak),xml:O.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:W.until(/['\\\n\r\u2028\u2029]/),double_quote:W.until(/["\\\n\r\u2028\u2029]/),template_text:W.until(/[`\\$]/),template_expression:W.until(/[`}\\]/)}};x.prototype=new d,x.prototype._is_comment=function(A){return A.type===i.COMMENT||A.type===i.BLOCK_COMMENT||A.type===i.UNKNOWN},x.prototype._is_opening=function(A){return A.type===i.START_BLOCK||A.type===i.START_EXPR},x.prototype._is_closing=function(A,B){return(A.type===i.END_BLOCK||A.type===i.END_EXPR)&&B&&(A.text==="]"&&B.text==="["||A.text===")"&&B.text==="("||A.text==="}"&&B.text==="{")},x.prototype._reset=function(){c=!1},x.prototype._get_next_token=function(A,B){var O=null;this._readWhitespace();var W=this._input.peek();return W===null?this._create_token(i.EOF,""):(O=O||this._read_non_javascript(W),O=O||this._read_string(W),O=O||this._read_word(A),O=O||this._read_singles(W),O=O||this._read_comment(W),O=O||this._read_regexp(W,A),O=O||this._read_xml(W,A),O=O||this._read_punctuation(),O=O||this._create_token(i.UNKNOWN,this._input.next()),O)},x.prototype._read_word=function(A){var B;if(B=this.__patterns.identifier.read(),B!=="")return B=B.replace(a.allLineBreaks,`
`),!(A.type===i.DOT||A.type===i.RESERVED&&(A.text==="set"||A.text==="get"))&&f.test(B)?(B==="in"||B==="of")&&(A.type===i.WORD||A.type===i.STRING)?this._create_token(i.OPERATOR,B):this._create_token(i.RESERVED,B):this._create_token(i.WORD,B);if(B=this.__patterns.number.read(),B!=="")return this._create_token(i.WORD,B)},x.prototype._read_singles=function(A){var B=null;return A==="("||A==="["?B=this._create_token(i.START_EXPR,A):A===")"||A==="]"?B=this._create_token(i.END_EXPR,A):A==="{"?B=this._create_token(i.START_BLOCK,A):A==="}"?B=this._create_token(i.END_BLOCK,A):A===";"?B=this._create_token(i.SEMICOLON,A):A==="."&&E.test(this._input.peek(1))?B=this._create_token(i.DOT,A):A===","&&(B=this._create_token(i.COMMA,A)),B&&this._input.next(),B},x.prototype._read_punctuation=function(){var A=this.__patterns.punct.read();if(A!=="")return A==="="?this._create_token(i.EQUALS,A):A==="?."?this._create_token(i.DOT,A):this._create_token(i.OPERATOR,A)},x.prototype._read_non_javascript=function(A){var B="";if(A==="#"){if(this._is_first_token()&&(B=this.__patterns.shebang.read(),B))return this._create_token(i.UNKNOWN,B.trim()+`
`);if(B=this.__patterns.include.read(),B)return this._create_token(i.UNKNOWN,B.trim()+`
`);A=this._input.next();var O="#";if(this._input.hasNext()&&this._input.testChar(m)){do A=this._input.next(),O+=A;while(this._input.hasNext()&&A!=="#"&&A!=="=");return A==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(O+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(O+="{}",this._input.next(),this._input.next())),this._create_token(i.WORD,O)}this._input.back()}else if(A==="<"&&this._is_first_token()){if(B=this.__patterns.html_comment_start.read(),B){for(;this._input.hasNext()&&!this._input.testChar(a.newline);)B+=this._input.next();return c=!0,this._create_token(i.COMMENT,B)}}else if(c&&A==="-"&&(B=this.__patterns.html_comment_end.read(),B))return c=!1,this._create_token(i.COMMENT,B);return null},x.prototype._read_comment=function(A){var B=null;if(A==="/"){var O="";if(this._input.peek(1)==="*"){O=this.__patterns.block_comment.read();var W=T.get_directives(O);W&&W.ignore==="start"&&(O+=T.readIgnored(this._input)),O=O.replace(a.allLineBreaks,`
`),B=this._create_token(i.BLOCK_COMMENT,O),B.directives=W}else this._input.peek(1)==="/"&&(O=this.__patterns.comment.read(),B=this._create_token(i.COMMENT,O))}return B},x.prototype._read_string=function(A){if(A==="`"||A==="'"||A==='"'){var B=this._input.next();return this.has_char_escapes=!1,A==="`"?B+=this._read_string_recursive("`",!0,"${"):B+=this._read_string_recursive(A),this.has_char_escapes&&this._options.unescape_strings&&(B=D(B)),this._input.peek()===A&&(B+=this._input.next()),B=B.replace(a.allLineBreaks,`
`),this._create_token(i.STRING,B)}return null},x.prototype._allow_regexp_or_xml=function(A){return A.type===i.RESERVED&&t(A.text,["return","case","throw","else","do","typeof","yield"])||A.type===i.END_EXPR&&A.text===")"&&A.opened.previous.type===i.RESERVED&&t(A.opened.previous.text,["if","while","for"])||t(A.type,[i.COMMENT,i.START_EXPR,i.START_BLOCK,i.START,i.END_BLOCK,i.OPERATOR,i.EQUALS,i.EOF,i.SEMICOLON,i.COMMA])},x.prototype._read_regexp=function(A,B){if(A==="/"&&this._allow_regexp_or_xml(B)){for(var O=this._input.next(),W=!1,P=!1;this._input.hasNext()&&(W||P||this._input.peek()!==A)&&!this._input.testChar(a.newline);)O+=this._input.peek(),W?W=!1:(W=this._input.peek()==="\\",this._input.peek()==="["?P=!0:this._input.peek()==="]"&&(P=!1)),this._input.next();return this._input.peek()===A&&(O+=this._input.next(),O+=this._input.read(a.identifier)),this._create_token(i.STRING,O)}return null},x.prototype._read_xml=function(A,B){if(this._options.e4x&&A==="<"&&this._allow_regexp_or_xml(B)){var O="",W=this.__patterns.xml.read_match();if(W){for(var P=W[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),G=P.indexOf("{")===0,Q=0;W;){var re=!!W[1],le=W[2],Ee=!!W[W.length-1]||le.slice(0,8)==="![CDATA[";if(!Ee&&(le===P||G&&le.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(re?--Q:++Q),O+=W[0],Q<=0)break;W=this.__patterns.xml.read_match()}return W||(O+=this._input.match(/[\s\S]*/g)[0]),O=O.replace(a.allLineBreaks,`
`),this._create_token(i.STRING,O)}}return null};function D(A){for(var B="",O=0,W=new v(A),P=null;W.hasNext();)if(P=W.match(/([\s]|[^\\]|\\\\)+/g),P&&(B+=P[0]),W.peek()==="\\"){if(W.next(),W.peek()==="x")P=W.match(/x([0-9A-Fa-f]{2})/g);else if(W.peek()==="u")P=W.match(/u([0-9A-Fa-f]{4})/g);else{B+="\\",W.hasNext()&&(B+=W.next());continue}if(!P)return A;if(O=parseInt(P[1],16),O>126&&O<=255&&P[0].indexOf("x")===0)return A;if(O>=0&&O<32){B+="\\"+P[0];continue}else O===34||O===39||O===92?B+="\\"+String.fromCharCode(O):B+=String.fromCharCode(O)}return B}x.prototype._read_string_recursive=function(A,B,O){var W,P;A==="'"?P=this.__patterns.single_quote:A==='"'?P=this.__patterns.double_quote:A==="`"?P=this.__patterns.template_text:A==="}"&&(P=this.__patterns.template_expression);for(var G=P.read(),Q="";this._input.hasNext();){if(Q=this._input.next(),Q===A||!B&&a.newline.test(Q)){this._input.back();break}else Q==="\\"&&this._input.hasNext()?(W=this._input.peek(),W==="x"||W==="u"?this.has_char_escapes=!0:W==="\r"&&this._input.peek(1)===`
`&&this._input.next(),Q+=this._input.next()):O&&(O==="${"&&Q==="$"&&this._input.peek()==="{"&&(Q+=this._input.next()),O===Q&&(A==="`"?Q+=this._read_string_recursive("}",B,"`"):Q+=this._read_string_recursive("`",B,"${"),this._input.hasNext()&&(Q+=this._input.next())));Q+=P.read(),G+=Q}return G},R.exports.Tokenizer=x,R.exports.TOKEN=i,R.exports.positionable_operators=g.slice(),R.exports.line_starters=r.slice()},function(R){var S=RegExp.prototype.hasOwnProperty("sticky");function y(v){this.__input=v||"",this.__input_length=this.__input.length,this.__position=0}y.prototype.restart=function(){this.__position=0},y.prototype.back=function(){this.__position>0&&(this.__position-=1)},y.prototype.hasNext=function(){return this.__position<this.__input_length},y.prototype.next=function(){var v=null;return this.hasNext()&&(v=this.__input.charAt(this.__position),this.__position+=1),v},y.prototype.peek=function(v){var d=null;return v=v||0,v+=this.__position,v>=0&&v<this.__input_length&&(d=this.__input.charAt(v)),d},y.prototype.__match=function(v,d){v.lastIndex=d;var o=v.exec(this.__input);return o&&!(S&&v.sticky)&&(o.index!==d&&(o=null)),o},y.prototype.test=function(v,d){return d=d||0,d+=this.__position,d>=0&&d<this.__input_length?!!this.__match(v,d):!1},y.prototype.testChar=function(v,d){var o=this.peek(d);return v.lastIndex=0,o!==null&&v.test(o)},y.prototype.match=function(v){var d=this.__match(v,this.__position);return d?this.__position+=d[0].length:d=null,d},y.prototype.read=function(v,d,o){var n="",a;return v&&(a=this.match(v),a&&(n+=a[0])),d&&(a||!v)&&(n+=this.readUntil(d,o)),n},y.prototype.readUntil=function(v,d){var o="",n=this.__position;v.lastIndex=this.__position;var a=v.exec(this.__input);return a?(n=a.index,d&&(n+=a[0].length)):n=this.__input_length,o=this.__input.substring(this.__position,n),this.__position=n,o},y.prototype.readUntilAfter=function(v){return this.readUntil(v,!0)},y.prototype.get_regexp=function(v,d){var o=null,n="g";return d&&S&&(n="y"),typeof v=="string"&&v!==""?o=new RegExp(v,n):v&&(o=new RegExp(v.source,n)),o},y.prototype.get_literal_regexp=function(v){return RegExp(v.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},y.prototype.peekUntilAfter=function(v){var d=this.__position,o=this.readUntilAfter(v);return this.__position=d,o},y.prototype.lookBack=function(v){var d=this.__position-1;return d>=v.length&&this.__input.substring(d-v.length,d).toLowerCase()===v},R.exports.InputScanner=y},function(R,S,y){var v=y(8).InputScanner,d=y(3).Token,o=y(10).TokenStream,n=y(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(e,t){this._input=new v(e),this._options=t||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new n(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new o,this._reset();for(var e,t=new d(a.START,""),i=null,T=[],_=new o;t.type!==a.EOF;){for(e=this._get_next_token(t,i);this._is_comment(e);)_.add(e),e=this._get_next_token(t,i);_.isEmpty()||(e.comments_before=_,_=new o),e.parent=i,this._is_opening(e)?(T.push(i),i=e):i&&this._is_closing(e,i)&&(e.opened=i,i.closed=e,i=T.pop(),e.parent=i),e.previous=t,t.next=e,this.__tokens.add(e),t=e}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(e,t){this._readWhitespace();var i=this._input.read(/.+/g);return i?this._create_token(a.RAW,i):this._create_token(a.EOF,"")},s.prototype._is_comment=function(e){return!1},s.prototype._is_opening=function(e){return!1},s.prototype._is_closing=function(e,t){return!1},s.prototype._create_token=function(e,t){var i=new d(e,t,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return i},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},R.exports.Tokenizer=s,R.exports.TOKEN=a},function(R){function S(y){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=y}S.prototype.restart=function(){this.__position=0},S.prototype.isEmpty=function(){return this.__tokens_length===0},S.prototype.hasNext=function(){return this.__position<this.__tokens_length},S.prototype.next=function(){var y=null;return this.hasNext()&&(y=this.__tokens[this.__position],this.__position+=1),y},S.prototype.peek=function(y){var v=null;return y=y||0,y+=this.__position,y>=0&&y<this.__tokens_length&&(v=this.__tokens[y]),v},S.prototype.add=function(y){this.__parent_token&&(y.parent=this.__parent_token),this.__tokens.push(y),this.__tokens_length+=1},R.exports.TokenStream=S},function(R,S,y){var v=y(12).Pattern;function d(o,n){v.call(this,o,n),n?this._line_regexp=this._input.get_regexp(n._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}d.prototype=new v,d.prototype.__set_whitespace_patterns=function(o,n){o+="\\t ",n+="\\n\\r",this._match_pattern=this._input.get_regexp("["+o+n+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+n+"]")},d.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var o=this._input.read(this._match_pattern);if(o===" ")this.whitespace_before_token=" ";else if(o){var n=this.__split(this._newline_regexp,o);this.newline_count=n.length-1,this.whitespace_before_token=n[this.newline_count]}return o},d.prototype.matching=function(o,n){var a=this._create();return a.__set_whitespace_patterns(o,n),a._update(),a},d.prototype._create=function(){return new d(this._input,this)},d.prototype.__split=function(o,n){o.lastIndex=0;for(var a=0,s=[],e=o.exec(n);e;)s.push(n.substring(a,e.index)),a=e.index+e[0].length,e=o.exec(n);return a<n.length?s.push(n.substring(a,n.length)):s.push(""),s},R.exports.WhitespacePattern=d},function(R){function S(y,v){this._input=y,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,v&&(this._starting_pattern=this._input.get_regexp(v._starting_pattern,!0),this._match_pattern=this._input.get_regexp(v._match_pattern,!0),this._until_pattern=this._input.get_regexp(v._until_pattern),this._until_after=v._until_after)}S.prototype.read=function(){var y=this._input.read(this._starting_pattern);return(!this._starting_pattern||y)&&(y+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),y},S.prototype.read_match=function(){return this._input.match(this._match_pattern)},S.prototype.until_after=function(y){var v=this._create();return v._until_after=!0,v._until_pattern=this._input.get_regexp(y),v._update(),v},S.prototype.until=function(y){var v=this._create();return v._until_after=!1,v._until_pattern=this._input.get_regexp(y),v._update(),v},S.prototype.starting_with=function(y){var v=this._create();return v._starting_pattern=this._input.get_regexp(y,!0),v._update(),v},S.prototype.matching=function(y){var v=this._create();return v._match_pattern=this._input.get_regexp(y,!0),v._update(),v},S.prototype._create=function(){return new S(this._input,this)},S.prototype._update=function(){},R.exports.Pattern=S},function(R){function S(y,v){y=typeof y=="string"?y:y.source,v=typeof v=="string"?v:v.source,this.__directives_block_pattern=new RegExp(y+/ beautify( \w+[:]\w+)+ /.source+v,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(y+/\sbeautify\signore:end\s/.source+v,"g")}S.prototype.get_directives=function(y){if(!y.match(this.__directives_block_pattern))return null;var v={};this.__directive_pattern.lastIndex=0;for(var d=this.__directive_pattern.exec(y);d;)v[d[1]]=d[2],d=this.__directive_pattern.exec(y);return v},S.prototype.readIgnored=function(y){return y.readUntilAfter(this.__directives_end_ignore_pattern)},R.exports.Directives=S},function(R,S,y){var v=y(12).Pattern,d={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function o(n,a){v.call(this,n,a),this.__template_pattern=null,this._disabled=Object.assign({},d),this._excluded=Object.assign({},d),a&&(this.__template_pattern=this._input.get_regexp(a.__template_pattern),this._excluded=Object.assign(this._excluded,a._excluded),this._disabled=Object.assign(this._disabled,a._disabled));var s=new v(n);this.__patterns={handlebars_comment:s.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:s.starting_with(/{{{/).until_after(/}}}/),handlebars:s.starting_with(/{{/).until_after(/}}/),php:s.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}o.prototype=new v,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(n){var a=this._create();return a._disabled[n]=!0,a._update(),a},o.prototype.read_options=function(n){var a=this._create();for(var s in d)a._disabled[s]=n.templating.indexOf(s)===-1;return a._update(),a},o.prototype.exclude=function(n){var a=this._create();return a._excluded[n]=!0,a._update(),a},o.prototype.read=function(){var n="";this._match_pattern?n=this._input.read(this._starting_pattern):n=this._input.read(this._starting_pattern,this.__template_pattern);for(var a=this._read_template();a;)this._match_pattern?a+=this._input.read(this._match_pattern):a+=this._input.readUntil(this.__template_pattern),n+=a,a=this._read_template();return this._until_after&&(n+=this._input.readUntilAfter(this._until_pattern)),n},o.prototype.__set_templated_pattern=function(){var n=[];this._disabled.php||n.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||n.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||n.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(n.push(this.__patterns.django._starting_pattern.source),n.push(this.__patterns.django_value._starting_pattern.source),n.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||n.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&n.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+n.join("|")+")")},o.prototype._read_template=function(){var n="",a=this._input.peek();if(a==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(n=n||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(n=n||this.__patterns.erb.read())}else a==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(n=n||this.__patterns.handlebars_comment.read(),n=n||this.__patterns.handlebars_unescaped.read(),n=n||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(n=n||this.__patterns.django_value.read()),this._excluded.django||(n=n||this.__patterns.django_comment.read(),n=n||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(n=n||this.__patterns.smarty_comment.read(),n=n||this.__patterns.smarty_literal.read(),n=n||this.__patterns.smarty.read()));return n},R.exports.TemplatablePattern=o}],w={};function H(R){var S=w[R];if(S!==void 0)return S.exports;var y=w[R]={exports:{}};return C[R](y,y.exports,H),y.exports}var U=H(0);I=U})();var j=I;!(ie=[],L=function(){return{js_beautify:j}}.apply(Re,ie),L!==void 0&&(Ge.exports=L))})()},"6eGT":function(Ge,Re,F){"use strict";function ie(L){return null}Re.a=ie},"6nfa":function(Ge,Re,F){Ge.exports={flex_box_center:"flex_box_center___24EuS",flex_space_between:"flex_space_between___H0sq_",flex_box_vertical_center:"flex_box_vertical_center___lroQv",flex_box_center_end:"flex_box_center_end___2zqAg",flex_box_column:"flex_box_column___1sePp",row:"row___FQAuJ",title:"title___1l3-g",tagsWrap:"tagsWrap___18FE-",action:"action___asdVT",bar:"bar___M_nl0",name:"name___BKyJY",active:"active___1eybt",tagsBorderWrap:"tagsBorderWrap___1NzgL"}},"815F":function(Ge,Re,F){"use strict";F.d(Re,"e",function(){return H}),F.d(Re,"c",function(){return R}),F.d(Re,"d",function(){return S}),F.d(Re,"a",function(){return v}),F.d(Re,"f",function(){return d}),F.d(Re,"b",function(){return o});var ie=F("KQm4"),L=F("VTBJ"),I=F("Ff2n"),j=F("Zm9Q"),C=F("Kwbf"),w=F("OZM5");function H(n,a){return n!=null?n:a}function U(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=new Map;function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(e||[]).forEach(function(i){var T=i.key,_=i.children;Object(C.a)(T!=null,"Tree node must have a certain key: [".concat(t).concat(T,"]"));var m=String(T);Object(C.a)(!a.has(m)||T===null||T===void 0,"Same 'key' exist in the Tree: ".concat(m)),a.set(m,!0),s(_,"".concat(t).concat(m," > "))})}s(n)}function R(n){function a(s){var e=Object(j.a)(s);return e.map(function(t){if(!Object(w.i)(t))return Object(C.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var i=t.key,T=t.props,_=T.children,m=Object(I.a)(T,["children"]),E=Object(L.a)({key:i},m),g=a(_);return g.length&&(E.children=g),E}).filter(function(t){return t})}return a(n)}function S(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=new Set(a===!0?[]:a),e=[];function t(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return i.map(function(_,m){var E=Object(w.h)(T?T.pos:"0",m),g=H(_.key,E),h=Object(L.a)(Object(L.a)({},_),{},{parent:T,pos:E,children:null,data:_,isStart:[].concat(Object(ie.a)(T?T.isStart:[]),[m===0]),isEnd:[].concat(Object(ie.a)(T?T.isEnd:[]),[m===i.length-1])});return e.push(h),a===!0||s.has(g)?h.children=t(_.children||[],h):h.children=[],h})}return t(n),e}function y(n,a,s){var e;s?typeof s=="string"?e=function(T){return T[s]}:typeof s=="function"&&(e=function(T){return s(T)}):e=function(T,_){return H(T.key,_)};function t(i,T,_){var m=i?i.children:n,E=i?Object(w.h)(_.pos,T):"0";if(i){var g=e(i,E),h={node:i,index:T,pos:E,key:g,parentPos:_.node?_.pos:null,level:_.level+1};a(h)}m&&m.forEach(function(u,r){t(u,r,{node:i,pos:E,level:_?_.level+1:-1})})}t(null)}function v(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.initWrapper,e=a.processEntity,t=a.onProcessFinished,i=arguments.length>2?arguments[2]:void 0,T={},_={},m={posEntities:T,keyEntities:_};return s&&(m=s(m)||m),y(n,function(E){var g=E.node,h=E.index,u=E.pos,r=E.key,l=E.parentPos,f=E.level,c={node:g,index:h,key:r,pos:u,level:f},x=H(r,u);T[u]=c,_[x]=c,c.parent=T[l],c.parent&&(c.parent.children=c.parent.children||[],c.parent.children.push(c)),e&&e(c,m)},i),t&&t(m),m}function d(n,a){var s=a.expandedKeys,e=a.selectedKeys,t=a.loadedKeys,i=a.loadingKeys,T=a.checkedKeys,_=a.halfCheckedKeys,m=a.dragOverNodeKey,E=a.dropPosition,g=a.keyEntities,h=g[n],u={eventKey:n,expanded:s.indexOf(n)!==-1,selected:e.indexOf(n)!==-1,loaded:t.indexOf(n)!==-1,loading:i.indexOf(n)!==-1,checked:T.indexOf(n)!==-1,halfChecked:_.indexOf(n)!==-1,pos:String(h?h.pos:""),dragOver:m===n&&E===0,dragOverGapTop:m===n&&E===-1,dragOverGapBottom:m===n&&E===1};return u}function o(n){var a=n.data,s=n.expanded,e=n.selected,t=n.checked,i=n.loaded,T=n.loading,_=n.halfChecked,m=n.dragOver,E=n.dragOverGapTop,g=n.dragOverGapBottom,h=n.pos,u=n.active,r=Object(L.a)(Object(L.a)({},a),{},{expanded:s,selected:e,checked:t,loaded:i,loading:T,halfChecked:_,dragOver:m,dragOverGapTop:E,dragOverGapBottom:g,pos:h,active:u});return"props"in r||Object.defineProperty(r,"props",{get:function(){return Object(C.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),n}}),r}},"8WcF":function(Ge,Re,F){Ge.exports={flex_box_center:"flex_box_center___2fahw",flex_space_between:"flex_space_between___1h4HM",flex_box_vertical_center:"flex_box_vertical_center___2kxeE",flex_box_center_end:"flex_box_center_end___OjPB4",flex_box_column:"flex_box_column___3zY1h",orderWrap:"orderWrap___VQuq1",orderIconWrap:"orderIconWrap___18q7W",orderAsc:"orderAsc___3WBGg",orderDesc:"orderDesc____ipxK",active:"active___3EMfI",cursorPointer:"cursorPointer___3og_L",orderTextWrap:"orderTextWrap___XQlmv"}},"8hTe":function(Ge,Re,F){Ge.exports={button:"button___1wy9m"}},"8mKB":function(Ge,Re,F){"use strict";var ie=F("rePB"),L=F("1OyB"),I=F("vuIU"),j=F("Ji7U"),C=F("md7G"),w=F("foSv"),H=F("cDcd"),U=F.n(H),R=F("m+aA"),S=F("TSYQ"),y=F.n(S),v=F("4IlW");function d(u){var r=u.pageXOffset,l="scrollLeft";if(typeof r!="number"){var f=u.document;r=f.documentElement[l],typeof r!="number"&&(r=f.body[l])}return r}function o(u){var r,l,f=u.ownerDocument,c=f.body,x=f&&f.documentElement,D=u.getBoundingClientRect();return r=D.left,l=D.top,r-=x.clientLeft||c.clientLeft||0,l-=x.clientTop||c.clientTop||0,{left:r,top:l}}function n(u){var r=o(u),l=u.ownerDocument,f=l.defaultView||l.parentWindow;return r.left+=d(f),r.left}function a(u){var r=s();return function(){var f=Object(w.a)(u),c;if(r){var x=Object(w.a)(this).constructor;c=Reflect.construct(f,arguments,x)}else c=f.apply(this,arguments);return Object(C.a)(this,c)}}function s(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(u){return!1}}var e=function(u){Object(j.a)(l,u);var r=a(l);function l(){var f;return Object(L.a)(this,l),f=r.apply(this,arguments),f.onHover=function(c){var x=f.props,D=x.onHover,A=x.index;D(c,A)},f.onClick=function(c){var x=f.props,D=x.onClick,A=x.index;D(c,A)},f.onKeyDown=function(c){var x=f.props,D=x.onClick,A=x.index;c.keyCode===13&&D(c,A)},f}return Object(I.a)(l,[{key:"getClassName",value:function(){var c=this.props,x=c.prefixCls,D=c.index,A=c.value,B=c.allowHalf,O=c.focused,W=D+1,P=x;return A===0&&D===0&&O?P+=" ".concat(x,"-focused"):B&&A+.5>=W&&A<W?(P+=" ".concat(x,"-half ").concat(x,"-active"),O&&(P+=" ".concat(x,"-focused"))):(P+=W<=A?" ".concat(x,"-full"):" ".concat(x,"-zero"),W===A&&O&&(P+=" ".concat(x,"-focused"))),P}},{key:"render",value:function(){var c=this.onHover,x=this.onClick,D=this.onKeyDown,A=this.props,B=A.disabled,O=A.prefixCls,W=A.character,P=A.characterRender,G=A.index,Q=A.count,re=A.value,le=typeof W=="function"?W(this.props):W,Ee=U.a.createElement("li",{className:this.getClassName()},U.a.createElement("div",{onClick:B?null:x,onKeyDown:B?null:D,onMouseMove:B?null:c,role:"radio","aria-checked":re>G?"true":"false","aria-posinset":G+1,"aria-setsize":Q,tabIndex:B?-1:0},U.a.createElement("div",{className:"".concat(O,"-first")},le),U.a.createElement("div",{className:"".concat(O,"-second")},le)));return P&&(Ee=P(Ee,this.props)),Ee}}]),l}(U.a.Component);function t(u,r){var l=Object.keys(u);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(u);r&&(f=f.filter(function(c){return Object.getOwnPropertyDescriptor(u,c).enumerable})),l.push.apply(l,f)}return l}function i(u){for(var r=1;r<arguments.length;r++){var l=arguments[r]!=null?arguments[r]:{};r%2?t(Object(l),!0).forEach(function(f){Object(ie.a)(u,f,l[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(l)):t(Object(l)).forEach(function(f){Object.defineProperty(u,f,Object.getOwnPropertyDescriptor(l,f))})}return u}function T(u){var r=_();return function(){var f=Object(w.a)(u),c;if(r){var x=Object(w.a)(this).constructor;c=Reflect.construct(f,arguments,x)}else c=f.apply(this,arguments);return Object(C.a)(this,c)}}function _(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(u){return!1}}function m(){}var E=function(u){Object(j.a)(l,u);var r=T(l);function l(f){var c;Object(L.a)(this,l),c=r.call(this,f),c.onHover=function(D,A){var B=c.props.onHoverChange,O=c.getStarValue(A,D.pageX),W=c.state.cleanedValue;O!==W&&c.setState({hoverValue:O,cleanedValue:null}),B(O)},c.onMouseLeave=function(){var D=c.props.onHoverChange;c.setState({hoverValue:void 0,cleanedValue:null}),D(void 0)},c.onClick=function(D,A){var B=c.props.allowClear,O=c.state.value,W=c.getStarValue(A,D.pageX),P=!1;B&&(P=W===O),c.onMouseLeave(),c.changeValue(P?0:W),c.setState({cleanedValue:P?W:null})},c.onFocus=function(){var D=c.props.onFocus;c.setState({focused:!0}),D&&D()},c.onBlur=function(){var D=c.props.onBlur;c.setState({focused:!1}),D&&D()},c.onKeyDown=function(D){var A=D.keyCode,B=c.props,O=B.count,W=B.allowHalf,P=B.onKeyDown,G=B.direction,Q=G==="rtl",re=c.state.value;A===v.a.RIGHT&&re<O&&!Q?(W?re+=.5:re+=1,c.changeValue(re),D.preventDefault()):A===v.a.LEFT&&re>0&&!Q||A===v.a.RIGHT&&re>0&&Q?(W?re-=.5:re-=1,c.changeValue(re),D.preventDefault()):A===v.a.LEFT&&re<O&&Q&&(W?re+=.5:re+=1,c.changeValue(re),D.preventDefault()),P&&P(D)},c.saveRef=function(D){return function(A){c.stars[D]=A}},c.saveRate=function(D){c.rate=D};var x=f.value;return x===void 0&&(x=f.defaultValue),c.stars={},c.state={value:x,focused:!1,cleanedValue:null},c}return Object(I.a)(l,[{key:"componentDidMount",value:function(){var c=this.props,x=c.autoFocus,D=c.disabled;x&&!D&&this.focus()}},{key:"getStarDOM",value:function(c){return Object(R.a)(this.stars[c])}},{key:"getStarValue",value:function(c,x){var D=this.props,A=D.allowHalf,B=D.direction,O=B==="rtl",W=c+1;if(A){var P=this.getStarDOM(c),G=n(P),Q=P.clientWidth;(O&&x-G>Q/2||!O&&x-G<Q/2)&&(W-=.5)}return W}},{key:"focus",value:function(){var c=this.props.disabled;c||this.rate.focus()}},{key:"blur",value:function(){var c=this.props.disabled;c||this.rate.blur()}},{key:"changeValue",value:function(c){var x=this.props.onChange;"value"in this.props||this.setState({value:c}),x(c)}},{key:"render",value:function(){for(var c=this.props,x=c.count,D=c.allowHalf,A=c.style,B=c.prefixCls,O=c.disabled,W=c.className,P=c.character,G=c.characterRender,Q=c.tabIndex,re=c.direction,le=this.state,Ee=le.value,_e=le.hoverValue,ne=le.focused,Te=[],Ae=O?"".concat(B,"-disabled"):"",fe=0;fe<x;fe+=1)Te.push(U.a.createElement(e,{ref:this.saveRef(fe),index:fe,count:x,disabled:O,prefixCls:"".concat(B,"-star"),allowHalf:D,value:_e===void 0?Ee:_e,onClick:this.onClick,onHover:this.onHover,key:fe,character:P,characterRender:G,focused:ne}));var J=y()(B,Ae,W,Object(ie.a)({},"".concat(B,"-rtl"),re==="rtl"));return U.a.createElement("ul",{className:J,style:A,onMouseLeave:O?null:this.onMouseLeave,tabIndex:O?-1:Q,onFocus:O?null:this.onFocus,onBlur:O?null:this.onBlur,onKeyDown:O?null:this.onKeyDown,ref:this.saveRate,role:"radiogroup"},Te)}}],[{key:"getDerivedStateFromProps",value:function(c,x){return"value"in c&&c.value!==void 0?i(i({},x),{},{value:c.value}):x}}]),l}(U.a.Component);E.defaultProps={defaultValue:0,count:5,allowHalf:!1,allowClear:!0,style:{},prefixCls:"rc-rate",onChange:m,character:"\u2605",onHoverChange:m,tabIndex:0,direction:"ltr"};var g=E,h=Re.a=g},"9Bee":function(Ge,Re,F){"use strict";var ie=F("DYRE"),L=F("zeV3"),I=F("+L6B"),j=F("2/Rp"),C=F("k1fw"),w=F("9og8"),H=F("tJVT"),U=F("WmNS"),R=F.n(U),S=F("cDcd"),y=F.n(S),v=F("vg9a"),d=F("DlQD"),o=F.n(d),n=F("rUJ1");function a(N,p){var b=N.match(/^(\s+)(?:```)/);if(b===null)return p;var M=b[1];return p.split(`
`).map(function(K){var k=K.match(/^\s+/);if(k===null)return K;var he=Object(H.a)(k,1),He=he[0];return He.length>=M.length?K.slice(M.length):K}).join(`
`)}var s=[],e=["<ul>"],t=new o.a.Renderer,i=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function T(){s.length=0,e=["<ul>"]}var _={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function m(N,p,b,M){if(p>=N.length||N[p].level<=b)return p;var K=N[p];M.push("<li><a href='#"+K.anchor+"'>"+K.text+"</a>"),p++;var k=[];return p=m(N,p,K.level,k),k.length>0&&(M.push("<ul>"),k.forEach(function(he){M.push(he)}),M.push("</ul>")),M.push("</li>"),p=m(N,p,b,M),p}function E(){return m(s,0,0,e),e.push("</ul>"),e.join("")}var g={heading:function(p){var b=i.exec(p);if(b)return{type:"heading",raw:b[0],depth:b[1].length,text:b[2]}},fences:function(p){var b=this.rules.block.fences.exec(p);if(b){var M=b[0],K=a(M,b[3]||""),k=b[2]?b[2].trim():b[2];if(["latex","katex","math"].indexOf(k)>=0){var he=r(),He=K;K=he,l[he]={type:"block",expression:He}}return{type:"code",raw:M,lang:k,text:K}}}},h=/(?:\${2})([^\n`]+?)(?:\${2})/gi,u=0,r=function(){return"__special_katext_id_".concat(u++,"__")},l={};function f(){return l}function c(){u=0,l={}}function x(N){return N=N.replace(h,function(p,b){var M=r();return l[M]={type:"inline",expression:b},M}),N}var D=t.listitem;t.listitem=function(N){return D(x(N))};var A=t.paragraph;t.paragraph=function(N){return A(x(N))};var B=t.tablecell;t.tablecell=function(N,p){return B(x(N),p)},t.code=function(N,p,b){var M=(p||"").match(/\S*/)[0];return M?["latex","katex","math"].indexOf(M)>=0?"<p class='editormd-tex'>".concat(N,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(p,'">').concat(b?N:Object(n.escape)(N,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(b?N:Object(n.escape)(N,!0))+"</code></pre>"},t.heading=function(N,p,b){var M=this.options.headerPrefix+b.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:M,level:p,text:N}),"<h"+p+' id="'+M+'">'+N+"</h"+p+">"},o.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),o.a.use({tokenizer:g,renderer:t});var O=o.a,W=F("SJMd"),P=F("ulZh"),G=F.n(P),Q=F("m3rI"),re=F("Oy/b"),le=F("p5ED"),Ee=F("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var _e=function(N,p){return(_e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,M){b.__proto__=M}||function(b,M){for(var K in M)Object.prototype.hasOwnProperty.call(M,K)&&(b[K]=M[K])})(N,p)};function ne(N,p){function b(){this.constructor=N}_e(N,p),N.prototype=p===null?Object.create(p):(b.prototype=p.prototype,new b)}function Te(N,p,b,M){return new(b||(b=Promise))(function(K,k){function he(Et){try{lt(M.next(Et))}catch(Ke){k(Ke)}}function He(Et){try{lt(M.throw(Et))}catch(Ke){k(Ke)}}function lt(Et){var Ke;Et.done?K(Et.value):(Ke=Et.value,Ke instanceof b?Ke:new b(function(It){It(Ke)})).then(he,He)}lt((M=M.apply(N,p||[])).next())})}function Ae(N,p){var b,M,K,k,he={label:0,sent:function(){if(1&K[0])throw K[1];return K[1]},trys:[],ops:[]};return k={next:He(0),throw:He(1),return:He(2)},typeof Symbol=="function"&&(k[Symbol.iterator]=function(){return this}),k;function He(lt){return function(Et){return function(Ke){if(b)throw new TypeError("Generator is already executing.");for(;he;)try{if(b=1,M&&(K=2&Ke[0]?M.return:Ke[0]?M.throw||((K=M.return)&&K.call(M),0):M.next)&&!(K=K.call(M,Ke[1])).done)return K;switch(M=0,K&&(Ke=[2&Ke[0],K.value]),Ke[0]){case 0:case 1:K=Ke;break;case 4:return he.label++,{value:Ke[1],done:!1};case 5:he.label++,M=Ke[1],Ke=[0];continue;case 7:Ke=he.ops.pop(),he.trys.pop();continue;default:if(!(K=he.trys,(K=K.length>0&&K[K.length-1])||Ke[0]!==6&&Ke[0]!==2)){he=0;continue}if(Ke[0]===3&&(!K||Ke[1]>K[0]&&Ke[1]<K[3])){he.label=Ke[1];break}if(Ke[0]===6&&he.label<K[1]){he.label=K[1],K=Ke;break}if(K&&he.label<K[2]){he.label=K[2],he.ops.push(Ke);break}K[2]&&he.ops.pop(),he.trys.pop();continue}Ke=p.call(N,he)}catch(It){Ke=[6,It],M=0}finally{b=K=0}if(5&Ke[0])throw Ke[1];return{value:Ke[0]?Ke[1]:void 0,done:!0}}([lt,Et])}}}function fe(){for(var N=0,p=0,b=arguments.length;p<b;p++)N+=arguments[p].length;var M=Array(N),K=0;for(p=0;p<b;p++)for(var k=arguments[p],he=0,He=k.length;he<He;he++,K++)M[K]=k[he];return M}var J=function(){function N(){}return N.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},N.setAttributes=function(p,b){for(var M=0,K=b;M<K.length;M++){var k=K[M],he=k[0],He=k[1];p.setAttribute(he,He)}},N.createRect=function(p,b,M){var K=document.createElementNS("http://www.w3.org/2000/svg","rect");return K.setAttribute("width",p.toString()),K.setAttribute("height",b.toString()),M&&N.setAttributes(K,M),K},N.createLine=function(p,b,M,K,k){var he=document.createElementNS("http://www.w3.org/2000/svg","line");return he.setAttribute("x1",p.toString()),he.setAttribute("y1",b.toString()),he.setAttribute("x2",M.toString()),he.setAttribute("y2",K.toString()),k&&N.setAttributes(he,k),he},N.createPolygon=function(p,b){var M=document.createElementNS("http://www.w3.org/2000/svg","polygon");return M.setAttribute("points",p),b&&N.setAttributes(M,b),M},N.createCircle=function(p,b){var M=document.createElementNS("http://www.w3.org/2000/svg","circle");return M.setAttribute("cx",(p/2).toString()),M.setAttribute("cy",(p/2).toString()),M.setAttribute("r",p.toString()),b&&N.setAttributes(M,b),M},N.createEllipse=function(p,b,M){var K=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return K.setAttribute("cx",(p/2).toString()),K.setAttribute("cy",(b/2).toString()),K.setAttribute("rx",(p/2).toString()),K.setAttribute("ry",(b/2).toString()),M&&N.setAttributes(K,M),K},N.createGroup=function(p){var b=document.createElementNS("http://www.w3.org/2000/svg","g");return p&&N.setAttributes(b,p),b},N.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},N.createMarker=function(p,b,M,K,k,he,He){var lt=document.createElementNS("http://www.w3.org/2000/svg","marker");return N.setAttributes(lt,[["id",p],["orient",b],["markerWidth",M.toString()],["markerHeight",K.toString()],["refX",k.toString()],["refY",he.toString()]]),lt.appendChild(He),lt},N.createText=function(p){var b=document.createElementNS("http://www.w3.org/2000/svg","text");return b.setAttribute("x","0"),b.setAttribute("y","0"),p&&N.setAttributes(b,p),b},N.createTSpan=function(p,b){var M=document.createElementNS("http://www.w3.org/2000/svg","tspan");return M.textContent=p,b&&N.setAttributes(M,b),M},N.createImage=function(p){var b=document.createElementNS("http://www.w3.org/2000/svg","image");return p&&N.setAttributes(b,p),b},N.createPoint=function(p,b){var M=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return M.x=p,M.y=b,M},N.createPath=function(p,b){var M=document.createElementNS("http://www.w3.org/2000/svg","path");return M.setAttribute("d",p),b&&N.setAttributes(M,b),M},N}(),Ie=function(){function N(){}return N.addKey=function(p){N.key=p},Object.defineProperty(N,"isLicensed",{get:function(){return!!N.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(N.key)},enumerable:!1,configurable:!0}),N}(),it=function(){function N(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return N.prototype.rasterize=function(p,b,M){var K=this;return new Promise(function(k){var he=M!==void 0?M:document.createElement("canvas");p===null&&(K.markersOnly=!0,K.naturalSize=!1);var He=document.createElementNS("http://www.w3.org/2000/svg","svg");He.setAttribute("xmlns","http://www.w3.org/2000/svg"),He.setAttribute("width",b.width.baseVal.valueAsString),He.setAttribute("height",b.height.baseVal.valueAsString),He.setAttribute("viewBox","0 0 "+b.viewBox.baseVal.width.toString()+" "+b.viewBox.baseVal.height.toString()),He.innerHTML=b.innerHTML,K.naturalSize===!0?(He.width.baseVal.value=p.naturalWidth,He.height.baseVal.value=p.naturalHeight):K.width!==void 0&&K.height!==void 0&&(He.width.baseVal.value=K.width,He.height.baseVal.value=K.height),he.width=He.width.baseVal.value,he.height=He.height.baseVal.value;var lt=He.outerHTML,Et=he.getContext("2d");K.markersOnly!==!0&&Et.drawImage(p,0,0,he.width,he.height);var Ke=window.URL,It=new Image(he.width,he.height);It.setAttribute("crossOrigin","anonymous");var Nt=new Blob([lt],{type:"image/svg+xml"}),on=Ke.createObjectURL(Nt);It.onload=function(){Et.drawImage(It,0,0),Ke.revokeObjectURL(on);var Nn=he.toDataURL(K.imageType,K.imageQuality);k(Nn)},It.src=on})},N}(),et=function(){},Qe=function(){function N(p){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+p+"_"}return Object.defineProperty(N.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),N.prototype.addClass=function(p){return this.styleSheet===void 0&&this.addStyleSheet(),p.name=""+this.classNamePrefix+p.localName,this.classes.push(p),this.styleSheet.sheet.insertRule("."+p.name+" {"+p.style+"}",this.styleSheet.sheet.cssRules.length),p},N.prototype.addRule=function(p){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(p),this.styleSheet.sheet.insertRule(p.selector+" {"+p.style+"}",this.styleSheet.sheet.cssRules.length)},N.prototype.addStyleSheet=function(){var p;this.styleSheet=document.createElement("style"),((p=this.styleSheetRoot)!==null&&p!==void 0?p:document.head).appendChild(this.styleSheet),this.addRule(new nt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new nt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new nt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Me("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Me("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},N.prototype.removeStyleSheet=function(){var p;this.styleSheet&&(((p=this.styleSheetRoot)!==null&&p!==void 0?p:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},N}(),nt=function(N,p){this.selector=N,this.style=p},Me=function(N,p){this.localName=N,this.style=p},ze=function(){function N(p,b,M,K,k){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=p,this.displayMode=b,this.markerItems=M,this.uiStyleSettings=K,this.styles=k,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return N.prototype.show=function(p){var b=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=p,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var M=document.createElement("div");M.className=this.toolbarBlockStyleClass.name,M.style.whiteSpace="nowrap",this.uiContainer.appendChild(M),this.addActionButton(M,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(M,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(M,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(M,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(M,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(M,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(M,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(M,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(k){var he=document.createElement("div");he.className=""+b.toolbarButtonStyleClass.name,he.setAttribute("data-type-name",k.typeName),he.innerHTML=k.icon,he.addEventListener("click",function(){b.markerToolbarButtonClicked(he,k)}),b.buttons.push(he),b.markerButtons.push(he)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var K=document.createElement("div");K.className=this.toolbarBlockStyleClass.name,K.style.whiteSpace="nowrap",K.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(K),this.addActionButton(K,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(K,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},N.prototype.addButtonClickListener=function(p){this.buttonClickListeners.push(p)},N.prototype.removeButtonClickListener=function(p){this.buttonClickListeners.indexOf(p)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(p),1)},N.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},N.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var p=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var b=0;b<this.markerButtons.length;b++)b<p||b===p&&this.markerButtons.length-1===p?this.markerButtonBlock.appendChild(this.markerButtons[b]):(b===p&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[b]))}},N.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},N.prototype.resetButtonStyles=function(){var p=this;this.buttons.forEach(function(b){b.className=b.className.replace(p.uiStyleSettings.toolbarButtonStyleColorsClassName?p.uiStyleSettings.toolbarButtonStyleColorsClassName:p.toolbarButtonStyleColorsClass.name,"").trim(),b.className=b.className.replace(p.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?p.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:p.toolbarActiveButtonStyleColorsClass.name,"").trim(),b.className+=" "+(p.uiStyleSettings.toolbarButtonStyleColorsClassName?p.uiStyleSettings.toolbarButtonStyleColorsClassName:p.toolbarButtonStyleColorsClass.name)})},N.prototype.addActionButton=function(p,b,M){var K=this,k=document.createElement("div");switch(k.className=""+this.toolbarButtonStyleClass.name,k.innerHTML=b,k.setAttribute("data-action",M),k.addEventListener("click",function(){K.actionToolbarButtonClicked(k,M)}),M){case"select":k.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":k.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":k.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":k.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":k.style.fill=this.uiStyleSettings.closeButtonColor}p.appendChild(k),this.buttons.push(k)},N.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Me("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Me("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Me("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Me("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new Me("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var p=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Me("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*p)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*p)+`px;
padding: `+p+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Me("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Me("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new nt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new nt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},N.prototype.markerToolbarButtonClicked=function(p,b){this.setActiveButton(p),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(M){return M("marker",b)}),this.markerButtonOverflowBlock.style.display="none"},N.prototype.actionToolbarButtonClicked=function(p,b){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(M){return M("action",b)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},N.prototype.setActiveButton=function(p){this.resetButtonStyles(),p.className=p.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),p.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},N.prototype.setActiveMarkerButton=function(p){var b=this.markerButtons.find(function(M){return M.getAttribute("data-type-name")===p});b&&this.setActiveButton(b)},N.prototype.setCurrentMarker=function(p){var b=this;this.currentMarker=p,this.buttons.filter(function(M){return/delete|notes/.test(M.getAttribute("data-action"))}).forEach(function(M){b.currentMarker===void 0?(M.style.fillOpacity="0.4",M.style.pointerEvents="none"):(M.style.fillOpacity="1",M.style.pointerEvents="all")})},N}(),Je=function(){function N(p,b,M,K){this.panels=[],this.panelButtons=[],this.markerjsContainer=p,this.displayMode=b,this.uiStyleSettings=M,this.styles=K,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return N.prototype.addStyles=function(){var p;this.toolboxStyleClass=this.styles.addClass(new Me("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Me("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var b=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Me("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Me("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Me("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Me("toolbox-panel-row_colors",`
background-color: `+((p=this.uiStyleSettings.toolboxBackgroundColor)!==null&&p!==void 0?p:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Me("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*b)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*b)+`px;
padding: `+b+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Me("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Me("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new nt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new nt("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},N.prototype.show=function(p){var b;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=p,this.uiContainer.className=this.toolboxStyleClass.name+" "+((b=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&b!==void 0?b:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},N.prototype.setPanelButtons=function(p){var b,M,K=this;this.panels=p,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((b=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&b!==void 0?b:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((M=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&M!==void 0?M:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(k){var he;k.uiStyleSettings=K.uiStyleSettings;var He=document.createElement("div");He.className=K.toolboxButtonStyleClass.name+" "+((he=K.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&he!==void 0?he:K.toolboxButtonStyleColorsClass.name),He.innerHTML=k.icon,He.title=k.title,He.addEventListener("click",function(){K.panelButtonClick(k)}),K.panelButtons.push(He),K.buttonRow.appendChild(He)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},N.prototype.panelButtonClick=function(p){var b=this,M=-1;if(p!==this.activePanel){M=this.panels.indexOf(p),this.panelRow.innerHTML="";var K=p.getUi();K.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(K),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=p}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){b.displayMode==="inline"?b.panelRow.style.display="none":b.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(k,he){var He,lt;k.className=b.toolboxButtonStyleClass.name+" "+(he===M?""+((He=b.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&He!==void 0?He:b.toolboxActiveButtonStyleColorsClass.name):""+((lt=b.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&lt!==void 0?lt:b.toolboxButtonStyleColorsClass.name))})},N}(),$e=function(N,p){this.title=N,this.icon=p},Xe=function(N){function p(b,M,K,k){var he=N.call(this,b,k||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return he.colors=[],he.addTransparent=!1,he.colorBoxes=[],he.colors=M,he.currentColor=K,he.setCurrentColor=he.setCurrentColor.bind(he),he.getColorBox=he.getColorBox.bind(he),he}return ne(p,N),p.prototype.getUi=function(){var b=this,M=document.createElement("div");return M.style.overflow="hidden",M.style.whiteSpace="nowrap",this.colors.forEach(function(K){var k=b.getColorBox(K);M.appendChild(k),b.colorBoxes.push(k)}),M},p.prototype.getColorBox=function(b){var M=this,K=this.uiStyleSettings.toolbarHeight/4,k=this.uiStyleSettings.toolbarHeight-K,he=document.createElement("div");he.style.display="inline-block",he.style.boxSizing="content-box",he.style.width=k-2+"px",he.style.height=k-2+"px",he.style.padding="1px",he.style.marginRight="2px",he.style.marginBottom="2px",he.style.borderWidth="2px",he.style.borderStyle="solid",he.style.borderRadius=(k+2)/2+"px",he.style.borderColor=b===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",he.addEventListener("click",function(){M.setCurrentColor(b,he)});var He=document.createElement("div");return He.style.display="inline-block",He.style.width=k-2+"px",He.style.height=k-2+"px",He.style.backgroundColor=b,He.style.borderRadius=k/2+"px",b==="transparent"&&(He.style.fill=this.uiStyleSettings.toolboxAccentColor,He.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),he.appendChild(He),he},p.prototype.setCurrentColor=function(b,M){var K=this;this.currentColor=b,this.colorBoxes.forEach(function(k){k.style.borderColor=k===M?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(b)},p}($e),Fe=function(){function N(p,b,M){this._state="new",this._isSelected=!1,this._container=p,this._overlayContainer=b,this.globalSettings=M,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(N.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),N.prototype.ownsTarget=function(p){return!1},Object.defineProperty(N.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),N.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},N.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},N.prototype.pointerDown=function(p,b){},N.prototype.dblClick=function(p,b){},N.prototype.manipulate=function(p){},N.prototype.pointerUp=function(p){this.stateChanged()},N.prototype.dispose=function(){},N.prototype.addMarkerVisualToContainer=function(p){this.container.childNodes.length>0?this.container.insertBefore(p,this.container.childNodes[0]):this.container.appendChild(p)},N.prototype.getState=function(){return{typeName:N.typeName,state:this.state,notes:this.notes}},N.prototype.restoreState=function(p){this._state=p.state,this.notes=p.notes},N.prototype.scale=function(p,b){},N.prototype.colorChanged=function(p){this.onColorChanged&&this.onColorChanged(p),this.stateChanged()},N.prototype.fillColorChanged=function(p){this.onFillColorChanged&&this.onFillColorChanged(p),this.stateChanged()},N.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var p=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),p.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(p)&&this.onStateChanged(this)}},N.typeName="MarkerBase",N}(),We=function(){function N(){this.findGripByVisual=this.findGripByVisual.bind(this)}return N.prototype.findGripByVisual=function(p){return this.topLeft.ownsTarget(p)?this.topLeft:this.topCenter.ownsTarget(p)?this.topCenter:this.topRight.ownsTarget(p)?this.topRight:this.centerLeft.ownsTarget(p)?this.centerLeft:this.centerRight.ownsTarget(p)?this.centerRight:this.bottomLeft.ownsTarget(p)?this.bottomLeft:this.bottomCenter.ownsTarget(p)?this.bottomCenter:this.bottomRight.ownsTarget(p)?this.bottomRight:void 0},N}(),yt=function(){function N(){this.GRIP_SIZE=10,this.visual=J.createGroup(),this.visual.appendChild(J.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(J.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return N.prototype.ownsTarget=function(p){return p===this.visual||p===this.visual.childNodes[0]||p===this.visual.childNodes[1]},N}(),ft=function(){function N(){}return N.toITransformMatrix=function(p){return{a:p.a,b:p.b,c:p.c,d:p.d,e:p.e,f:p.f}},N.toSVGMatrix=function(p,b){return p.a=b.a,p.b=b.b,p.c=b.c,p.d=b.d,p.e=b.e,p.f=b.f,p},N}(),ut=function(N){function p(b,M,K){var k=N.call(this,b,M,K)||this;return k.left=0,k.top=0,k.width=0,k.height=0,k.defaultSize={x:50,y:20},k.offsetX=0,k.offsetY=0,k.rotationAngle=0,k.CB_DISTANCE=10,k._suppressMarkerCreateEvent=!1,k.container.transform.baseVal.appendItem(J.createTransform()),k.setupControlBox(),k}return ne(p,N),Object.defineProperty(p.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"visual",{get:function(){return this._visual},set:function(b){this._visual=b;var M=J.createTransform();this._visual.transform.baseVal.appendItem(M)},enumerable:!1,configurable:!0}),p.prototype.ownsTarget=function(b){return!!N.prototype.ownsTarget.call(this,b)||!!(this.controlGrips.findGripByVisual(b)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(b))},p.prototype.pointerDown=function(b,M){N.prototype.pointerDown.call(this,b,M),this.state==="new"&&(this.left=b.x,this.top=b.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var K=this.unrotatePoint(b);if(this.manipulationStartX=K.x,this.manipulationStartY=K.y,this.offsetX=K.x-this.left,this.offsetY=K.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(M),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(M)){this.activeGrip=this.rotatorGrip;var k=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=k.x-this.width/2,this.top=k.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var he=this.container.transform.baseVal.getItem(0);he.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(he,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},p.prototype.pointerUp=function(b){var M=this.state;N.prototype.pointerUp.call(this,b),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(b),this._state="select",M==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},p.prototype.moveVisual=function(b){this.visual.style.transform="translate("+b.x+"px, "+b.y+"px)"},p.prototype.manipulate=function(b){var M=this.unrotatePoint(b);this.state==="creating"?this.resize(b):this.state==="move"?(this.left=this.manipulationStartLeft+(M.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(M.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(M):this.state==="rotate"&&this.rotate(b)},p.prototype.resize=function(b){var M=this.manipulationStartLeft,K=this.manipulationStartWidth,k=this.manipulationStartTop,he=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:M=this.manipulationStartLeft+b.x-this.manipulationStartX,K=this.manipulationStartWidth+this.manipulationStartLeft-M;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:K=this.manipulationStartWidth+b.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:k=this.manipulationStartTop+b.y-this.manipulationStartY,he=this.manipulationStartHeight+this.manipulationStartTop-k;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:he=this.manipulationStartHeight+b.y-this.manipulationStartY}K>=0?(this.left=M,this.width=K):(this.left=M+K,this.width=-K),he>=0?(this.top=k,this.height=he):(this.top=k+he,this.height=-he),this.setSize()},p.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},p.prototype.rotate=function(b){if(Math.abs(b.x-this.centerX)>.1){var M=Math.sign(b.x-this.centerX);this.rotationAngle=180*Math.atan((b.y-this.centerY)/(b.x-this.centerX))/Math.PI+90*M,this.applyRotation()}},p.prototype.applyRotation=function(){var b=this.container.transform.baseVal.getItem(0);b.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(b,0)},p.prototype.rotatePoint=function(b){if(this.rotationAngle===0)return b;var M=this.container.getCTM(),K=J.createPoint(b.x,b.y);return{x:(K=K.matrixTransform(M)).x,y:K.y}},p.prototype.unrotatePoint=function(b){if(this.rotationAngle===0)return b;var M=this.container.getCTM();M=M.inverse();var K=J.createPoint(b.x,b.y);return{x:(K=K.matrixTransform(M)).x,y:K.y}},p.prototype.select=function(){N.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},p.prototype.deselect=function(){N.prototype.deselect.call(this),this.controlBox.style.display="none"},p.prototype.setupControlBox=function(){this.controlBox=J.createGroup();var b=J.createTransform();b.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(b),this.container.appendChild(this.controlBox),this.controlRect=J.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=J.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new We,this.addControlGrips(),this.controlBox.style.display="none"},p.prototype.adjustControlBox=function(){var b=this.controlBox.transform.baseVal.getItem(0);b.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(b,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},p.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},p.prototype.createGrip=function(){var b=new yt;return b.visual.transform.baseVal.appendItem(J.createTransform()),this.controlBox.appendChild(b.visual),b},p.prototype.positionGrips=function(){var b=this.controlGrips.topLeft.GRIP_SIZE,M=-b/2,K=M,k=(this.width+this.CB_DISTANCE)/2-b/2,he=(this.height+this.CB_DISTANCE)/2-b/2,He=this.height+this.CB_DISTANCE-b/2,lt=this.width+this.CB_DISTANCE-b/2;this.positionGrip(this.controlGrips.topLeft.visual,M,K),this.positionGrip(this.controlGrips.topCenter.visual,k,K),this.positionGrip(this.controlGrips.topRight.visual,lt,K),this.positionGrip(this.controlGrips.centerLeft.visual,M,he),this.positionGrip(this.controlGrips.centerRight.visual,lt,he),this.positionGrip(this.controlGrips.bottomLeft.visual,M,He),this.positionGrip(this.controlGrips.bottomCenter.visual,k,He),this.positionGrip(this.controlGrips.bottomRight.visual,lt,He),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,k,K-3*this.CB_DISTANCE)},p.prototype.positionGrip=function(b,M,K){var k=b.transform.baseVal.getItem(0);k.setTranslate(M,K),b.transform.baseVal.replaceItem(k,0)},p.prototype.hideControlBox=function(){this.controlBox.style.display="none"},p.prototype.showControlBox=function(){this.controlBox.style.display=""},p.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ft.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ft.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},N.prototype.getState.call(this))},p.prototype.restoreState=function(b){N.prototype.restoreState.call(this,b);var M=b;this.left=M.left,this.top=M.top,this.width=M.width,this.height=M.height,this.rotationAngle=M.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ft.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,M.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ft.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,M.containerTransformMatrix))},p.prototype.scale=function(b,M){N.prototype.scale.call(this,b,M);var K=this.rotatePoint({x:this.left,y:this.top}),k=this.unrotatePoint({x:K.x*b,y:K.y*M});this.left=k.x,this.top=k.y,this.width=this.width*b,this.height=this.height*M,this.adjustControlBox()},p}(Fe),rt=function(N){function p(b,M,K){var k=N.call(this,b,M,K)||this;return k.fillColor="transparent",k.strokeColor="transparent",k.strokeWidth=0,k.strokeDasharray="",k.opacity=1,k.setStrokeColor=k.setStrokeColor.bind(k),k.setFillColor=k.setFillColor.bind(k),k.setStrokeWidth=k.setStrokeWidth.bind(k),k.setStrokeDasharray=k.setStrokeDasharray.bind(k),k.createVisual=k.createVisual.bind(k),k}return ne(p,N),p.prototype.ownsTarget=function(b){return!(!N.prototype.ownsTarget.call(this,b)&&b!==this.visual)},p.prototype.createVisual=function(){this.visual=J.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},p.prototype.pointerDown=function(b,M){N.prototype.pointerDown.call(this,b,M),this.state==="new"&&(this.createVisual(),this.moveVisual(b),this._state="creating")},p.prototype.manipulate=function(b){N.prototype.manipulate.call(this,b)},p.prototype.resize=function(b){N.prototype.resize.call(this,b),this.setSize()},p.prototype.setSize=function(){N.prototype.setSize.call(this),J.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},p.prototype.pointerUp=function(b){N.prototype.pointerUp.call(this,b),this.setSize()},p.prototype.setStrokeColor=function(b){this.strokeColor=b,this.visual&&J.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(b),this.stateChanged()},p.prototype.setFillColor=function(b){this.fillColor=b,this.visual&&J.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},p.prototype.setStrokeWidth=function(b){this.strokeWidth=b,this.visual&&J.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},p.prototype.setStrokeDasharray=function(b){this.strokeDasharray=b,this.visual&&J.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},p.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},N.prototype.getState.call(this))},p.prototype.restoreState=function(b){var M=b;this.fillColor=M.fillColor,this.strokeColor=M.strokeColor,this.strokeWidth=M.strokeWidth,this.strokeDasharray=M.strokeDasharray,this.opacity=M.opacity,this.createVisual(),N.prototype.restoreState.call(this,b),this.setSize()},p.prototype.scale=function(b,M){N.prototype.scale.call(this,b,M),this.setSize()},p.title="Rectangle marker",p}(ut),Tt=function(N){function p(b,M,K,k){var he=N.call(this,b,k||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return he.widths=[],he.widthBoxes=[],he.widths=M,he.currentWidth=K,he.setCurrentWidth=he.setCurrentWidth.bind(he),he}return ne(p,N),p.prototype.getUi=function(){var b=this,M=document.createElement("div");return M.style.display="flex",M.style.overflow="hidden",M.style.flexGrow="2",this.widths.forEach(function(K){var k=document.createElement("div");k.style.display="flex",k.style.flexGrow="2",k.style.alignItems="center",k.style.justifyContent="space-between",k.style.padding="5px",k.style.borderWidth="2px",k.style.borderStyle="solid",k.style.borderColor=K===b.currentWidth?b.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){b.setCurrentWidth(K,k)}),M.appendChild(k);var he=document.createElement("div");he.innerText=K.toString(),he.style.marginRight="5px",k.appendChild(he);var He=document.createElement("div");He.style.minHeight="20px",He.style.flexGrow="2",He.style.display="flex",He.style.alignItems="center";var lt=document.createElement("hr");lt.style.minWidth="20px",lt.style.border="0px",lt.style.borderTop=K+"px solid "+b.uiStyleSettings.toolboxColor,lt.style.flexGrow="2",He.appendChild(lt),k.appendChild(He),b.widthBoxes.push(k)}),M},p.prototype.setCurrentWidth=function(b,M){var K=this;this.currentWidth=b,this.widthBoxes.forEach(function(k){k.style.borderColor=k===M?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},p}($e),_t=function(N){function p(b,M,K,k){var he=N.call(this,b,k||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return he.styles=[],he.styleBoxes=[],he.styles=M,he.currentStyle=K,he.setCurrentStyle=he.setCurrentStyle.bind(he),he}return ne(p,N),p.prototype.getUi=function(){var b=this,M=document.createElement("div");return M.style.display="flex",M.style.overflow="hidden",M.style.flexGrow="2",this.styles.forEach(function(K){var k=document.createElement("div");k.style.display="flex",k.style.alignItems="center",k.style.justifyContent="space-between",k.style.padding="5px",k.style.borderWidth="2px",k.style.borderStyle="solid",k.style.overflow="hidden",k.style.maxWidth=100/b.styles.length-5+"%",k.style.borderColor=K===b.currentStyle?b.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){b.setCurrentStyle(K,k)}),M.appendChild(k);var he=document.createElement("div");he.style.minHeight="20px",he.style.flexGrow="2",he.style.overflow="hidden";var He=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+b.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(K!==""?'stroke-dasharray="'+K+'"':"")+` />
</svg>`;he.innerHTML=He,k.appendChild(he),b.styleBoxes.push(k)}),M},p.prototype.setCurrentStyle=function(b,M){var K=this;this.currentStyle=b,this.styleBoxes.forEach(function(k){k.style.borderColor=k===M?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},p}($e),me=function(N){function p(b,M,K){var k=N.call(this,b,M,K)||this;return k.strokeColor=K.defaultColor,k.strokeWidth=K.defaultStrokeWidth,k.strokeDasharray=K.defaultStrokeDasharray,k.strokePanel=new Xe("Line color",K.defaultColorSet,K.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.strokeWidthPanel=new Tt("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new _t("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k}return ne(p,N),Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var b=N.prototype.getState.call(this);return b.typeName=p.typeName,b},p.typeName="FrameMarker",p.title="Frame marker",p.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',p}(rt),xe=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},De=function(N){function p(b,M,K){var k=N.call(this,b,M,K)||this;return k.x1=0,k.y1=0,k.x2=0,k.y2=0,k.defaultLength=50,k.manipulationStartX=0,k.manipulationStartY=0,k.manipulationStartX1=0,k.manipulationStartY1=0,k.manipulationStartX2=0,k.manipulationStartY2=0,k.setupControlBox(),k}return ne(p,N),p.prototype.ownsTarget=function(b){return!!N.prototype.ownsTarget.call(this,b)||!(!this.grip1.ownsTarget(b)&&!this.grip2.ownsTarget(b))},p.prototype.pointerDown=function(b,M){N.prototype.pointerDown.call(this,b,M),this.manipulationStartX=b.x,this.manipulationStartY=b.y,this.state==="new"&&(this.x1=b.x,this.y1=b.y,this.x2=b.x,this.y2=b.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(M)?this.activeGrip=this.grip1:this.grip2.ownsTarget(M)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},p.prototype.pointerUp=function(b){var M=this.state;N.prototype.pointerUp.call(this,b),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(b),this._state="select",M==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},p.prototype.adjustVisual=function(){},p.prototype.manipulate=function(b){this.state==="creating"?this.resize(b):this.state==="move"?(this.x1=this.manipulationStartX1+b.x-this.manipulationStartX,this.y1=this.manipulationStartY1+b.y-this.manipulationStartY,this.x2=this.manipulationStartX2+b.x-this.manipulationStartX,this.y2=this.manipulationStartY2+b.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(b)},p.prototype.resize=function(b){switch(this.activeGrip){case this.grip1:this.x1=b.x,this.y1=b.y;break;case this.grip2:case void 0:this.x2=b.x,this.y2=b.y}this.adjustVisual(),this.adjustControlBox()},p.prototype.select=function(){N.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},p.prototype.deselect=function(){N.prototype.deselect.call(this),this.controlBox.style.display="none"},p.prototype.setupControlBox=function(){this.controlBox=J.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},p.prototype.adjustControlBox=function(){this.positionGrips()},p.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},p.prototype.createGrip=function(){var b=new yt;return b.visual.transform.baseVal.appendItem(J.createTransform()),this.controlBox.appendChild(b.visual),b},p.prototype.positionGrips=function(){var b=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-b/2,this.y1-b/2),this.positionGrip(this.grip2.visual,this.x2-b/2,this.y2-b/2)},p.prototype.positionGrip=function(b,M,K){var k=b.transform.baseVal.getItem(0);k.setTranslate(M,K),b.transform.baseVal.replaceItem(k,0)},p.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},N.prototype.getState.call(this))},p.prototype.restoreState=function(b){N.prototype.restoreState.call(this,b);var M=b;this.x1=M.x1,this.y1=M.y1,this.x2=M.x2,this.y2=M.y2},p.prototype.scale=function(b,M){N.prototype.scale.call(this,b,M),this.x1=this.x1*b,this.y1=this.y1*M,this.x2=this.x2*b,this.y2=this.y2*M,this.adjustVisual(),this.adjustControlBox()},p}(Fe),ke=function(N){function p(b,M,K){var k=N.call(this,b,M,K)||this;return k.strokeColor="transparent",k.strokeWidth=0,k.strokeDasharray="",k.setStrokeColor=k.setStrokeColor.bind(k),k.setStrokeWidth=k.setStrokeWidth.bind(k),k.setStrokeDasharray=k.setStrokeDasharray.bind(k),k.strokeColor=K.defaultColor,k.strokeWidth=K.defaultStrokeWidth,k.strokeDasharray=K.defaultStrokeDasharray,k.strokePanel=new Xe("Line color",K.defaultColorSet,K.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.strokeWidthPanel=new Tt("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new _t("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k}return ne(p,N),p.prototype.ownsTarget=function(b){return!(!N.prototype.ownsTarget.call(this,b)&&b!==this.visual&&b!==this.selectorLine&&b!==this.visibleLine)},p.prototype.createVisual=function(){this.visual=J.createGroup(),this.selectorLine=J.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=J.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},p.prototype.pointerDown=function(b,M){N.prototype.pointerDown.call(this,b,M),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},p.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),J.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),J.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),J.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},p.prototype.setStrokeColor=function(b){this.strokeColor=b,this.adjustVisual(),this.colorChanged(b)},p.prototype.setStrokeWidth=function(b){this.strokeWidth=b,this.adjustVisual()},p.prototype.setStrokeDasharray=function(b){this.strokeDasharray=b,this.adjustVisual(),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var b=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},N.prototype.getState.call(this));return b.typeName=p.typeName,b},p.prototype.restoreState=function(b){N.prototype.restoreState.call(this,b);var M=b;this.strokeColor=M.strokeColor,this.strokeWidth=M.strokeWidth,this.strokeDasharray=M.strokeDasharray,this.createVisual(),this.adjustVisual()},p.typeName="LineMarker",p.title="Line marker",p.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',p}(De),be=function(N){function p(b,M,K,k){var he=N.call(this,b,k||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return he.fonts=[],he.fontBoxes=[],he.fonts=M,he.currentFont=K,he.setCurrentFont=he.setCurrentFont.bind(he),he}return ne(p,N),p.prototype.getUi=function(){var b=this,M=document.createElement("div");return M.style.overflow="hidden",M.style.flexGrow="2",this.fonts.forEach(function(K){var k=document.createElement("div");k.style.display="inline-block",k.style.alignItems="center",k.style.justifyContent="space-between",k.style.padding="5px",k.style.borderWidth="2px",k.style.borderStyle="solid",k.style.overflow="hidden",k.style.maxWidth=100/b.fonts.length-5+"%",k.style.borderColor=K===b.currentFont?b.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){b.setCurrentFont(K,k)}),M.appendChild(k);var he=document.createElement("div");he.style.display="flex",he.style.minHeight="20px",he.style.flexGrow="2",he.style.fontFamily=K,he.style.overflow="hidden";var He=document.createElement("div");He.style.whiteSpace="nowrap",He.style.overflow="hidden",He.style.textOverflow="ellipsis",He.innerHTML="The quick brown fox jumps over the lazy dog",he.appendChild(He),k.appendChild(he),b.fontBoxes.push(k)}),M},p.prototype.setCurrentFont=function(b,M){var K=this;this.currentFont=b,this.fontBoxes.forEach(function(k){k.style.borderColor=k===M?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},p}($e),Le=function(N){function p(b,M,K){var k=N.call(this,b,M,K)||this;return k.color="transparent",k.padding=5,k.DEFAULT_TEXT="your text here",k.text=k.DEFAULT_TEXT,k.isMoved=!1,k.color=K.defaultColor,k.fontFamily=K.defaultFontFamily,k.defaultSize={x:100,y:30},k.setColor=k.setColor.bind(k),k.setFont=k.setFont.bind(k),k.renderText=k.renderText.bind(k),k.sizeText=k.sizeText.bind(k),k.textEditDivClicked=k.textEditDivClicked.bind(k),k.showTextEditor=k.showTextEditor.bind(k),k.setSize=k.setSize.bind(k),k.positionTextEditor=k.positionTextEditor.bind(k),k.colorPanel=new Xe("Color",K.defaultColorSet,K.defaultColor),k.colorPanel.onColorChanged=k.setColor,k.fontFamilyPanel=new be("Font",K.defaultFontFamilies,K.defaultFontFamily),k.fontFamilyPanel.onFontChanged=k.setFont,k}return ne(p,N),p.prototype.ownsTarget=function(b){if(N.prototype.ownsTarget.call(this,b)||b===this.visual||b===this.textElement||b===this.bgRectangle)return!0;var M=!1;return this.textElement.childNodes.forEach(function(K){K===b&&(M=!0)}),M},p.prototype.createVisual=function(){this.visual=J.createGroup(),this.bgRectangle=J.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=J.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(J.createTransform()),this.textElement.transform.baseVal.appendItem(J.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},p.prototype.pointerDown=function(b,M){N.prototype.pointerDown.call(this,b,M),this.isMoved=!1,this.pointerDownPoint=b,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(b),this._state="creating")},p.prototype.renderText=function(){var b=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(M){b.textElement.appendChild(J.createTSpan(M.trim()===""?" ":M.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},p.prototype.getTextScale=function(){var b=this.textElement.getBBox(),M=1;if(b.width>0&&b.height>0){var K=(1*this.width-this.width*this.padding*2/100)/b.width,k=(1*this.height-this.height*this.padding*2/100)/b.height;M=Math.min(K,k)}return M},p.prototype.getTextPosition=function(b){var M=this.textElement.getBBox(),K=0,k=0;return M.width>0&&M.height>0&&(K=(this.width-M.width*b)/2,k=this.height/2-M.height*b/2),{x:K,y:k}},p.prototype.sizeText=function(){var b=this.textElement.getBBox(),M=this.getTextScale(),K=this.getTextPosition(M);K.y-=b.y*M,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+K.x+"px, "+K.y+"px) scale("+M+", "+M+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(K.x,K.y),this.textElement.transform.baseVal.getItem(1).setScale(M,M))},p.prototype.manipulate=function(b){N.prototype.manipulate.call(this,b),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(b.x-this.pointerDownPoint.x)>5||Math.abs(b.y-this.pointerDownPoint.y)>5)},p.prototype.resize=function(b){N.prototype.resize.call(this,b),this.isMoved=!0,this.setSize(),this.sizeText()},p.prototype.setSize=function(){N.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(J.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),J.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},p.prototype.pointerUp=function(b){var M=this.state;M==="creating"&&(this._suppressMarkerCreateEvent=!0),N.prototype.pointerUp.call(this,b),this.setSize(),(M==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},p.prototype.showTextEditor=function(){var b=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(M){M.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var M=Number.parseFloat(b.textEditor.style.fontSize);b.textEditor.clientWidth>=Number.parseInt(b.textEditor.style.maxWidth)&&M>.9;)M-=.1,b.textEditor.style.fontSize=Math.max(M,.9)+"em"}),this.textEditor.addEventListener("keyup",function(M){M.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(M){if(M.clipboardData){var K=M.clipboardData.getData("text"),k=window.getSelection();if(!k.rangeCount)return!1;k.deleteFromDocument(),k.getRangeAt(0).insertNode(document.createTextNode(K)),M.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){b.textEditDivClicked(b.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},p.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var b=this.getTextScale(),M=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),K=this.textElement.getBBox(),k={x:K.width*b,y:K.height*b};M.x-=k.x/2,M.y-=k.y/2,this.textEditor.style.top=M.y+"px",this.textEditor.style.left=M.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-M.x+"px",this.textEditor.style.fontSize=Math.max(16*b,12)+"px",this.textElement.style.display="none"}},p.prototype.textEditDivClicked=function(b){this.text=b.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},p.prototype.select=function(){N.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},p.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),N.prototype.deselect.call(this)},p.prototype.dblClick=function(b,M){N.prototype.dblClick.call(this,b,M),this.showTextEditor()},p.prototype.setColor=function(b){this.textElement&&J.setAttributes(this.textElement,[["fill",b]]),this.color=b,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(b)},p.prototype.setFont=function(b){this.textElement&&J.setAttributes(this.textElement,[["font-family",b]]),this.fontFamily=b,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},p.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},p.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var b=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},N.prototype.getState.call(this));return b.typeName=p.typeName,b},p.prototype.restoreState=function(b){var M=b;this.color=M.color,this.fontFamily=M.fontFamily,this.padding=M.padding,this.text=M.text,this.createVisual(),N.prototype.restoreState.call(this,b),this.setSize()},p.prototype.scale=function(b,M){N.prototype.scale.call(this,b,M),this.setSize(),this.sizeText(),this.positionTextEditor()},p.typeName="TextMarker",p.title="Text marker",p.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',p}(ut),ce=function(N){function p(b,M,K){var k=N.call(this,b,M,K)||this;return k.color="transparent",k.lineWidth=3,k.drawing=!1,k.pixelRatio=1,k.color=K.defaultColor,k.lineWidth=K.defaultStrokeWidth,k.pixelRatio=K.freehandPixelRatio,k.setColor=k.setColor.bind(k),k.addCanvas=k.addCanvas.bind(k),k.finishCreation=k.finishCreation.bind(k),k.setLineWidth=k.setLineWidth.bind(k),k.colorPanel=new Xe("Color",K.defaultColorSet,K.defaultColor),k.colorPanel.onColorChanged=k.setColor,k.lineWidthPanel=new Tt("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),k.lineWidthPanel.onWidthChanged=k.setLineWidth,k}return ne(p,N),p.prototype.ownsTarget=function(b){return!(!N.prototype.ownsTarget.call(this,b)&&b!==this.visual&&b!==this.drawingImage)},p.prototype.createVisual=function(){this.visual=J.createGroup(),this.drawingImage=J.createImage(),this.visual.appendChild(this.drawingImage);var b=J.createTransform();this.visual.transform.baseVal.appendItem(b),this.addMarkerVisualToContainer(this.visual)},p.prototype.pointerDown=function(b,M){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(b.x,b.y),this.drawing=!0):N.prototype.pointerDown.call(this,b,M)},p.prototype.manipulate=function(b){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(b.x,b.y),this.canvasContext.stroke()):N.prototype.manipulate.call(this,b)},p.prototype.resize=function(b){N.prototype.resize.call(this,b),J.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),J.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},p.prototype.pointerUp=function(b){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):N.prototype.pointerUp.call(this,b)},p.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},p.prototype.select=function(){this.state==="creating"&&this.finishCreation(),N.prototype.select.call(this)},p.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),N.prototype.deselect.call(this)},p.prototype.finishCreation=function(){for(var b=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),M=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],K=M[0],k=M[1],he=M[2],He=M[3],lt=!1,Et=0;Et<this.canvasElement.height;Et++)for(var Ke=0;Ke<this.canvasElement.width;Ke++)b.data[Et*this.canvasElement.width*4+4*Ke+3]>0&&(lt=!0,Et<k&&(k=Et),Ke<K&&(K=Ke),Et>He&&(He=Et),Ke>he&&(he=Ke));if(lt){this.left=K/this.pixelRatio,this.top=k/this.pixelRatio,this.width=(he-K)/this.pixelRatio,this.height=(He-k)/this.pixelRatio;var It=document.createElement("canvas");It.width=he-K,It.height=He-k,It.getContext("2d").putImageData(this.canvasContext.getImageData(K,k,he-K,He-k),0,0),this.drawingImgUrl=It.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},p.prototype.setDrawingImage=function(){J.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),J.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},p.prototype.setColor=function(b){this.color=b,this.colorChanged(b)},p.prototype.setLineWidth=function(b){this.lineWidth=b},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var b=Object.assign({drawingImgUrl:this.drawingImgUrl},N.prototype.getState.call(this));return b.typeName=p.typeName,b},p.prototype.restoreState=function(b){this.createVisual(),N.prototype.restoreState.call(this,b),this.drawingImgUrl=b.drawingImgUrl,this.setDrawingImage()},p.prototype.scale=function(b,M){N.prototype.scale.call(this,b,M),this.setDrawingImage()},p.typeName="FreehandMarker",p.title="Freehand marker",p.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',p}(ut),ee=function(N){function p(b,M,K){var k=N.call(this,b,K||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return k.typeBoxes=[],k.currentType=M,k.setCurrentType=k.setCurrentType.bind(k),k}return ne(p,N),p.prototype.getUi=function(){var b=this,M=document.createElement("div");M.style.display="flex",M.style.overflow="hidden",M.style.flexGrow="2";for(var K=function(He){var lt="both";switch(He){case 0:lt="both";break;case 1:lt="start";break;case 2:lt="end";break;case 3:lt="none"}var Et=document.createElement("div");if(Et.style.display="flex",Et.style.flexGrow="2",Et.style.alignItems="center",Et.style.justifyContent="space-between",Et.style.padding="5px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.borderColor=lt===k.currentType?k.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){b.setCurrentType(lt,Et)}),M.appendChild(Et),lt==="both"||lt==="start"){var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.alignItems="center",Ke.style.minHeight="20px",Ke.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(k.uiStyleSettings!==void 0?k.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Ke.style.marginLeft="5px",Et.appendChild(Ke)}var It=document.createElement("div");It.style.display="flex",It.style.alignItems="center",It.style.minHeight="20px",It.style.flexGrow="2";var Nt=document.createElement("hr");if(Nt.style.minWidth="20px",Nt.style.border="0px",Nt.style.borderTop="3px solid "+(k.uiStyleSettings!==void 0?k.uiStyleSettings.toolboxColor:"#eeeeee"),Nt.style.flexGrow="2",It.appendChild(Nt),Et.appendChild(It),lt==="both"||lt==="end"){var on=document.createElement("div");on.style.display="flex",on.style.alignItems="center",on.style.minHeight="20px",on.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(k.uiStyleSettings!==void 0?k.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,on.style.marginRight="5px",Et.appendChild(on)}k.typeBoxes.push(Et)},k=this,he=0;he<4;he++)K(he);return M},p.prototype.setCurrentType=function(b,M){var K=this;this.currentType=b,this.typeBoxes.forEach(function(k){k.style.borderColor=k===M?K.uiStyleSettings!==void 0?K.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},p}($e),te=function(N){function p(b,M,K){var k=N.call(this,b,M,K)||this;return k.arrowType="end",k.arrowBaseHeight=10,k.arrowBaseWidth=10,k.getArrowPoints=k.getArrowPoints.bind(k),k.setArrowType=k.setArrowType.bind(k),k.arrowTypePanel=new ee("Arrow type","end"),k.arrowTypePanel.onArrowTypeChanged=k.setArrowType,k}return ne(p,N),p.prototype.ownsTarget=function(b){return!(!N.prototype.ownsTarget.call(this,b)&&b!==this.arrow1&&b!==this.arrow2)},p.prototype.getArrowPoints=function(b,M){var K=this.arrowBaseWidth+2*this.strokeWidth,k=this.arrowBaseHeight+2*this.strokeWidth;return b-K/2+","+(M+k/2)+" "+b+","+(M-k/2)+" "+(b+K/2)+","+(M+k/2)},p.prototype.createTips=function(){this.arrow1=J.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(J.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=J.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(J.createTransform()),this.visual.appendChild(this.arrow2)},p.prototype.pointerDown=function(b,M){N.prototype.pointerDown.call(this,b,M),this.state==="creating"&&this.createTips()},p.prototype.adjustVisual=function(){if(N.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",J.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),J.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var b=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),M=this.arrow1.transform.baseVal.getItem(0);M.setRotate(b,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(M,0);var K=this.arrow2.transform.baseVal.getItem(0);K.setRotate(b+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(K,0)}},p.prototype.setArrowType=function(b){this.arrowType=b,this.adjustVisual(),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var b=Object.assign({arrowType:this.arrowType},N.prototype.getState.call(this));return b.typeName=p.typeName,b},p.prototype.restoreState=function(b){N.prototype.restoreState.call(this,b);var M=b;this.arrowType=M.arrowType,this.createTips(),this.adjustVisual()},p.typeName="ArrowMarker",p.title="Arrow marker",p.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',p}(ke),V=function(N){function p(b,M,K){var k=N.call(this,b,M,K)||this;return k.fillColor=K.defaultFillColor,k.strokeWidth=0,k.fillPanel=new Xe("Color",K.defaultColorSet,K.defaultFillColor),k.fillPanel.onColorChanged=k.setFillColor,k}return ne(p,N),Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var b=N.prototype.getState.call(this);return b.typeName=p.typeName,b},p.typeName="CoverMarker",p.title="Cover marker",p.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',p}(rt),X=function(N){function p(b,M,K,k){var he=N.call(this,b,k||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return he.opacities=[],he.opacityBoxes=[],he.opacities=M,he.currentOpacity=K,he.setCurrentOpacity=he.setCurrentOpacity.bind(he),he}return ne(p,N),p.prototype.getUi=function(){var b=this,M=document.createElement("div");return M.style.display="flex",M.style.overflow="hidden",M.style.flexGrow="2",M.style.justifyContent="space-between",this.opacities.forEach(function(K){var k=document.createElement("div");k.style.display="flex",k.style.alignItems="center",k.style.justifyContent="center",k.style.padding="5px",k.style.borderWidth="2px",k.style.borderStyle="solid",k.style.borderColor=K===b.currentOpacity?b.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){b.setCurrentOpacity(K,k)}),M.appendChild(k);var he=document.createElement("div");he.innerText=100*K+"%",k.appendChild(he),b.opacityBoxes.push(k)}),M},p.prototype.setCurrentOpacity=function(b,M){var K=this;this.currentOpacity=b,this.opacityBoxes.forEach(function(k){k.style.borderColor=k===M?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},p}($e),q=function(N){function p(b,M,K){var k=N.call(this,b,M,K)||this;return k.setOpacity=k.setOpacity.bind(k),k.fillColor=K.defaultHighlightColor,k.strokeWidth=0,k.opacity=K.defaultHighlightOpacity,k.fillPanel=new Xe("Color",K.defaultColorSet,k.fillColor),k.fillPanel.onColorChanged=k.setFillColor,k.opacityPanel=new X("Opacity",K.defaultOpacitySteps,k.opacity),k.opacityPanel.onOpacityChanged=k.setOpacity,k}return ne(p,N),p.prototype.setOpacity=function(b){this.opacity=b,this.visual&&J.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var b=N.prototype.getState.call(this);return b.typeName=p.typeName,b},p.typeName="HighlightMarker",p.title="Highlight marker",p.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',p}(V),ae='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',ge=function(N){function p(b,M,K){var k=N.call(this,b,M,K)||this;return k.bgColor="transparent",k.tipPosition={x:0,y:0},k.tipBase1Position={x:0,y:0},k.tipBase2Position={x:0,y:0},k.tipMoving=!1,k.color=K.defaultStrokeColor,k.bgColor=K.defaultFillColor,k.fontFamily=K.defaultFontFamily,k.defaultSize={x:100,y:30},k.setBgColor=k.setBgColor.bind(k),k.getTipPoints=k.getTipPoints.bind(k),k.positionTip=k.positionTip.bind(k),k.setTipPoints=k.setTipPoints.bind(k),k.colorPanel=new Xe("Text color",K.defaultColorSet,k.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),k.colorPanel.onColorChanged=k.setColor,k.bgColorPanel=new Xe("Fill color",K.defaultColorSet,k.bgColor,ae),k.bgColorPanel.onColorChanged=k.setBgColor,k.fontFamilyPanel=new be("Font",K.defaultFontFamilies,K.defaultFontFamily),k.fontFamilyPanel.onFontChanged=k.setFont,k.tipGrip=new yt,k.tipGrip.visual.transform.baseVal.appendItem(J.createTransform()),k.controlBox.appendChild(k.tipGrip.visual),k}return ne(p,N),p.prototype.ownsTarget=function(b){return N.prototype.ownsTarget.call(this,b)||this.tipGrip.ownsTarget(b)||this.tip===b},p.prototype.createTip=function(){J.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=J.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},p.prototype.pointerDown=function(b,M){this.state==="new"&&N.prototype.pointerDown.call(this,b,M),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(M)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):N.prototype.pointerDown.call(this,b,M)},p.prototype.pointerUp=function(b){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,N.prototype.pointerUp.call(this,b);else{var M=this.state==="creating";N.prototype.pointerUp.call(this,b),this.setTipPoints(M),this.positionTip()}},p.prototype.manipulate=function(b){if(this.tipMoving){var M=this.unrotatePoint(b);this.tipPosition={x:M.x-this.manipulationStartLeft,y:M.y-this.manipulationStartTop},this.positionTip()}else N.prototype.manipulate.call(this,b)},p.prototype.setBgColor=function(b){this.bgRectangle&&this.tip&&(J.setAttributes(this.bgRectangle,[["fill",b]]),J.setAttributes(this.tip,[["fill",b]])),this.bgColor=b,this.fillColorChanged(b)},p.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},p.prototype.setTipPoints=function(b){b===void 0&&(b=!1);var M=Math.min(this.height/2,15),K=this.height/5;b&&(this.tipPosition={x:M+K/2,y:this.height+20});var k=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?k<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(K=this.width/5,M=Math.min(this.width/2,15),this.tipBase1Position={x:M,y:0},this.tipBase2Position={x:M+K,y:0}):(this.tipBase1Position={x:0,y:M},this.tipBase2Position={x:0,y:M+K}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?k<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(K=this.width/5,M=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-M-K,y:0},this.tipBase2Position={x:this.width-M,y:0}):(this.tipBase1Position={x:this.width,y:M},this.tipBase2Position={x:this.width,y:M+K}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?k<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(K=this.width/5,M=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-M-K,y:this.height},this.tipBase2Position={x:this.width-M,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-M-K},this.tipBase2Position={x:this.width,y:this.height-M}):k<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(K=this.width/5,M=Math.min(this.width/2,15),this.tipBase1Position={x:M,y:this.height},this.tipBase2Position={x:M+K,y:this.height}):(this.tipBase1Position={x:0,y:this.height-M},this.tipBase2Position={x:0,y:this.height-M-K})},p.prototype.resize=function(b){N.prototype.resize.call(this,b),this.positionTip()},p.prototype.positionTip=function(){J.setAttributes(this.tip,[["points",this.getTipPoints()]]);var b=this.tipGrip.visual.transform.baseVal.getItem(0);b.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(b,0)},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),p.prototype.select=function(){this.positionTip(),N.prototype.select.call(this)},p.prototype.getState=function(){var b=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},N.prototype.getState.call(this));return b.typeName=p.typeName,b},p.prototype.restoreState=function(b){var M=b;this.bgColor=M.bgColor,this.tipPosition=M.tipPosition,N.prototype.restoreState.call(this,b),this.createTip(),this.setTipPoints()},p.prototype.scale=function(b,M){N.prototype.scale.call(this,b,M),this.tipPosition={x:this.tipPosition.x*b,y:this.tipPosition.y*M},this.positionTip()},p.typeName="CalloutMarker",p.title="Callout marker",p.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',p}(Le),we=function(N){function p(b,M,K){var k=N.call(this,b,M,K)||this;return k.fillColor="transparent",k.strokeColor="transparent",k.strokeWidth=0,k.strokeDasharray="",k.opacity=1,k.strokeColor=K.defaultColor,k.strokeWidth=K.defaultStrokeWidth,k.strokeDasharray=K.defaultStrokeDasharray,k.fillColor=K.defaultFillColor,k.setStrokeColor=k.setStrokeColor.bind(k),k.setFillColor=k.setFillColor.bind(k),k.setStrokeWidth=k.setStrokeWidth.bind(k),k.setStrokeDasharray=k.setStrokeDasharray.bind(k),k.setOpacity=k.setOpacity.bind(k),k.createVisual=k.createVisual.bind(k),k.strokePanel=new Xe("Line color",fe(K.defaultColorSet,["transparent"]),K.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.fillPanel=new Xe("Fill color",fe(K.defaultColorSet,["transparent"]),k.fillColor,ae),k.fillPanel.onColorChanged=k.setFillColor,k.strokeWidthPanel=new Tt("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new _t("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k.opacityPanel=new X("Opacity",K.defaultOpacitySteps,k.opacity),k.opacityPanel.onOpacityChanged=k.setOpacity,k}return ne(p,N),p.prototype.ownsTarget=function(b){return!(!N.prototype.ownsTarget.call(this,b)&&b!==this.visual)},p.prototype.createVisual=function(){this.visual=J.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},p.prototype.pointerDown=function(b,M){N.prototype.pointerDown.call(this,b,M),this.state==="new"&&(this.createVisual(),this.moveVisual(b),this._state="creating")},p.prototype.manipulate=function(b){N.prototype.manipulate.call(this,b)},p.prototype.resize=function(b){N.prototype.resize.call(this,b),this.setSize()},p.prototype.setSize=function(){N.prototype.setSize.call(this),J.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},p.prototype.pointerUp=function(b){N.prototype.pointerUp.call(this,b),this.setSize()},p.prototype.setStrokeColor=function(b){this.strokeColor=b,this.visual&&J.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(b),this.stateChanged()},p.prototype.setFillColor=function(b){this.fillColor=b,this.visual&&J.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(b),this.stateChanged()},p.prototype.setStrokeWidth=function(b){this.strokeWidth=b,this.visual&&J.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},p.prototype.setStrokeDasharray=function(b){this.strokeDasharray=b,this.visual&&J.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},p.prototype.setOpacity=function(b){this.opacity=b,this.visual&&J.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var b=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},N.prototype.getState.call(this));return b.typeName=p.typeName,b},p.prototype.restoreState=function(b){var M=b;this.fillColor=M.fillColor,this.strokeColor=M.strokeColor,this.strokeWidth=M.strokeWidth,this.strokeDasharray=M.strokeDasharray,this.opacity=M.opacity,this.createVisual(),N.prototype.restoreState.call(this,b),this.setSize()},p.prototype.scale=function(b,M){N.prototype.scale.call(this,b,M),this.setSize()},p.typeName="EllipseMarker",p.title="Ellipse marker",p.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',p}(ut),je=function(N){function p(b,M,K){return N.call(this,b,M,K)||this}return ne(p,N),Object.defineProperty(p.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),p.prototype.ownsTarget=function(b){return!(!N.prototype.ownsTarget.call(this,b)&&b!==this.tip1&&b!==this.tip2)},p.prototype.createTips=function(){this.tip1=J.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(J.createTransform()),this.visual.appendChild(this.tip1),this.tip2=J.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(J.createTransform()),this.visual.appendChild(this.tip2)},p.prototype.pointerDown=function(b,M){N.prototype.pointerDown.call(this,b,M),this.state==="creating"&&this.createTips()},p.prototype.adjustVisual=function(){if(N.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(J.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),J.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var b=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),M=this.tip1.transform.baseVal.getItem(0);M.setRotate(b,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(M,0);var K=this.tip2.transform.baseVal.getItem(0);K.setRotate(b+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(K,0)}},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var b=N.prototype.getState.call(this);return b.typeName=p.typeName,b},p.prototype.restoreState=function(b){N.prototype.restoreState.call(this,b),this.createTips(),this.adjustVisual()},p.typeName="MeasurementMarker",p.title="Measurement marker",p.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',p}(ke),at=function(N){function p(b,M,K){var k=N.call(this,b,M,K)||this;return k.strokePanel.colors=K.defaultColorSet,k.fillColor="transparent",k}return ne(p,N),Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var b=N.prototype.getState.call(this);return b.typeName=p.typeName,b},p.typeName="EllipseFrameMarker",p.title="Ellipse frame marker",p.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',p}(we),ot=function(){function N(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(N.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),N.prototype.addUndoStep=function(p){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(p)||(this.undoStack.push(p),JSON.stringify(this.lastRedoStep)!==JSON.stringify(p)&&this.redoStack.splice(0,this.redoStack.length))},N.prototype.replaceLastUndoStep=function(p){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=p)},N.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},N.prototype.undo=function(){if(this.undoStack.length>1){var p=this.undoStack.pop();return p!==void 0&&this.redoStack.push(p),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},N.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},N}(),Se=function(N){function p(b,M,K){var k=N.call(this,b,M,K)||this;return k.strokeColor="transparent",k.strokeWidth=0,k.strokeDasharray="",k.curveX=0,k.curveY=0,k.manipulationStartCurveX=0,k.manipulationStartCurveY=0,k.setStrokeColor=k.setStrokeColor.bind(k),k.setStrokeWidth=k.setStrokeWidth.bind(k),k.setStrokeDasharray=k.setStrokeDasharray.bind(k),k.positionGrips=k.positionGrips.bind(k),k.addControlGrips=k.addControlGrips.bind(k),k.adjustVisual=k.adjustVisual.bind(k),k.setupControlBox=k.setupControlBox.bind(k),k.resize=k.resize.bind(k),k.strokeColor=K.defaultColor,k.strokeWidth=K.defaultStrokeWidth,k.strokeDasharray=K.defaultStrokeDasharray,k.strokePanel=new Xe("Line color",K.defaultColorSet,K.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.strokeWidthPanel=new Tt("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new _t("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k}return ne(p,N),p.prototype.ownsTarget=function(b){return!(!N.prototype.ownsTarget.call(this,b)&&b!==this.visual&&b!==this.selectorCurve&&b!==this.visibleCurve&&!this.curveGrip.ownsTarget(b))},p.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},p.prototype.createVisual=function(){this.visual=J.createGroup(),this.selectorCurve=J.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=J.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},p.prototype.pointerDown=function(b,M){N.prototype.pointerDown.call(this,b,M),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=b.x,this.curveY=b.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(M)&&(this.activeGrip=this.curveGrip,this._state="resize")},p.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),J.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),J.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),J.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},p.prototype.setupControlBox=function(){N.prototype.setupControlBox.call(this),this.curveControlLine1=J.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=J.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},p.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,N.prototype.addControlGrips.call(this)},p.prototype.positionGrips=function(){N.prototype.positionGrips.call(this);var b=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-b/2,this.curveY-b/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},p.prototype.manipulate=function(b){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+b.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+b.y-this.manipulationStartY),N.prototype.manipulate.call(this,b)},p.prototype.resize=function(b){this.activeGrip===this.curveGrip&&(this.curveX=b.x,this.curveY=b.y),N.prototype.resize.call(this,b),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},p.prototype.setStrokeColor=function(b){this.strokeColor=b,this.adjustVisual(),this.colorChanged(b)},p.prototype.setStrokeWidth=function(b){this.strokeWidth=b,this.adjustVisual()},p.prototype.setStrokeDasharray=function(b){this.strokeDasharray=b,this.adjustVisual()},p.prototype.scale=function(b,M){this.curveX=this.curveX*b,this.curveY=this.curveY*M,N.prototype.scale.call(this,b,M)},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var b=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},N.prototype.getState.call(this));return b.typeName=p.typeName,b},p.prototype.restoreState=function(b){N.prototype.restoreState.call(this,b);var M=b;this.strokeColor=M.strokeColor,this.strokeWidth=M.strokeWidth,this.strokeDasharray=M.strokeDasharray,this.curveX=M.curveX,this.curveY=M.curveY,this.createVisual(),this.adjustVisual()},p.typeName="CurveMarker",p.title="Curve marker",p.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',p}(De),st=function(){function N(p,b){b===void 0&&(b=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=p,this.cancelable=b}return Object.defineProperty(N.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),N.prototype.preventDefault=function(){this._defaultPrevented=!0},N}(),tt=function(N){function p(b,M,K){var k=N.call(this,b,!1)||this;return k.dataUrl=M,k.state=K,k}return ne(p,N),p}(st),Ye=function(N){function p(b,M,K){K===void 0&&(K=!1);var k=N.call(this,b,K)||this;return k.marker=M,k}return ne(p,N),p}(st),mt=function(){function N(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return N.prototype.addEventListener=function(p,b){this[p].push(b)},N.prototype.removeEventListener=function(p,b){var M=this[p].indexOf(b);M>-1&&this[p].splice(M,1)},N}(),bt=function(){function N(p){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new xe,this._isOpen=!1,this.undoRedoManager=new ot,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new mt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=N.instanceCounter++,this.styles=new Qe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=p,this.targetRoot=document.body,this.width=p.clientWidth,this.height=p.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(N.prototype,"ALL_MARKER_TYPES",{get:function(){return[me,ce,te,Le,at,we,q,ge,je,V,ke,Se]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[me,ce,te,Le,we,q,ge]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"BASIC_MARKER_TYPES",{get:function(){return[me,ce,te,Le,q]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(p){var b=this;this._availableMarkerTypes.splice(0),p.forEach(function(M){if(typeof M=="string"){var K=b.ALL_MARKER_TYPES.find(function(k){return k.typeName===M});K!==void 0&&b._availableMarkerTypes.push(K)}else b._availableMarkerTypes.push(M)})},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(p){this._zoomLevel=p,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),N.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ie.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},N.prototype.show=function(){var p=this;this.styles.styleSheetRoot===void 0&&et.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=et.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(b){return b(new st(p))})},N.prototype.render=function(){return Te(this,void 0,void 0,function(){var p;return Ae(this,function(b){switch(b.label){case 0:return this.setCurrentMarker(),(p=new it).naturalSize=this.renderAtNaturalSize,p.imageType=this.renderImageType,p.imageQuality=this.renderImageQuality,p.markersOnly=this.renderMarkersOnly,p.width=this.renderWidth,p.height=this.renderHeight,[4,p.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return b.sent(),[4,p.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,b.sent()]}})})},N.prototype.close=function(p){var b=this;if(p===void 0&&(p=!1),this.isOpen){var M=!1;p||this.eventListeners.beforeclose.forEach(function(K){var k=new st(b,!0);K(k),k.defaultPrevented&&(M=!0)}),M||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(K){return K(new st(b))}),this.detachEvents(),this._isOpen=!1)}},N.prototype.addMarkersToToolbar=function(){for(var p,b=[],M=0;M<arguments.length;M++)b[M]=arguments[M];(p=this._availableMarkerTypes).push.apply(p,b)},N.prototype.addRenderEventListener=function(p){this.addEventListener("render",function(b){p(b.dataUrl,b.state)})},N.prototype.removeRenderEventListener=function(p){},N.prototype.addCloseEventListener=function(p){this.addEventListener("close",function(){p()})},N.prototype.removeCloseEventListener=function(p){},N.prototype.setupResizeObserver=function(){var p=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){p.resize(p.target.clientWidth,p.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return p.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},N.prototype.onPopupTargetResize=function(){var p=1*this.target.clientWidth/this.target.clientHeight,b=this.editorCanvas.clientWidth/p>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*p:this.editorCanvas.clientWidth,M=b<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/p;this.resize(b,M)},N.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},N.prototype.resize=function(p,b){this._isResizing=!0;var M=p/this.imageWidth,K=b/this.imageHeight;this.imageWidth=Math.round(p),this.imageHeight=Math.round(b),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(M,K),this._isResizing=!1},N.prototype.scaleMarkers=function(p,b){var M,K=this;this._currentMarker&&this._currentMarker instanceof Le?this._currentMarker.scale(p,b):(M=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(k){k!==K._currentMarker&&k.scale(p,b)}),M!==void 0&&this.setCurrentMarker(M)},N.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},N.prototype.setTopLeft=function(){var p=this.editingTarget.getBoundingClientRect(),b=this.editorCanvas.getBoundingClientRect();this.left=p.left-b.left,this.top=p.top-b.top},N.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},N.prototype.addDefs=function(){for(var p,b=[],M=0;M<arguments.length;M++)b[M]=arguments[M];this.defs=J.createDefs(),this.addDefsToImage(),(p=this.defs).append.apply(p,b)},N.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},N.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},N.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},N.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},N.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},N.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},N.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},N.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var p=document.createElement("a");p.href="https://markerjs.com/",p.target="_blank",p.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',p.title="Powered by marker.js",p.style.display="grid",p.style.alignItems="center",p.style.justifyItems="center",p.style.padding="3px",p.style.width="20px",p.style.height="20px",this.logoUI.appendChild(p),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},N.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},N.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},N.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},N.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var p=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=p+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new ze(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Je(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},N.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},N.prototype.removeMarker=function(p){this.markerImage.removeChild(p.container),this.markers.indexOf(p)>-1&&this.markers.splice(this.markers.indexOf(p),1),p.dispose()},N.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},N.prototype.toolbarButtonClicked=function(p,b){if(p==="marker"&&b!==void 0)this.createNewMarker(b);else if(p==="action")switch(b){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},N.prototype.deleteSelectedMarker=function(){var p=this;if(this._currentMarker!==void 0){var b=!1;if(this.eventListeners.markerbeforedelete.forEach(function(K){var k=new Ye(p,p._currentMarker,!0);K(k),k.defaultPrevented&&(b=!0)}),!b){var M=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(K){return K(new Ye(p,M))})}}},N.prototype.clear=function(){var p=this,b=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(he){var He=new Ye(p,void 0,!0);he(He),He.defaultPrevented&&(b=!0)}),!b)){this.setCurrentMarker();for(var M=function(he){var He=K.markers[he];K.setCurrentMarker(K.markers[he]),K._currentMarker.dispose(),K.markerImage.removeChild(K._currentMarker.container),K.markers.splice(K.markers.indexOf(K._currentMarker),1),K.eventListeners.markerdelete.forEach(function(lt){return lt(new Ye(p,He))})},K=this,k=this.markers.length-1;k>=0;k--)M(k);this.addUndoStep()}},Object.defineProperty(N.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),N.prototype.showNotesEditor=function(){var p;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(p=this._currentMarker.notes)!==null&&p!==void 0?p:"",this.overlayContainer.appendChild(this.notesArea))},N.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},N.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},N.prototype.addUndoStep=function(){var p=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var b=this.getState(),M=this.undoRedoManager.getLastUndoStep();if(!M||M.width===b.width&&M.height===b.height){var K=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(b),K<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(k){return k(new st(p))})}else this.undoRedoManager.replaceLastUndoStep(b),this.eventListeners.statechange.forEach(function(k){return k(new st(p))})}},N.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},N.prototype.undoStep=function(){var p=this,b=this.undoRedoManager.undo();b!==void 0&&(this.restoreState(b),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(M){return M(new st(p))}))},N.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},N.prototype.redoStep=function(){var p=this,b=this.undoRedoManager.redo();b!==void 0&&(this.restoreState(b),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(M){return M(new st(p))}))},N.prototype.stepZoom=function(){var p=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=p<this.zoomSteps.length-1?this.zoomSteps[p+1]:this.zoomSteps[0]},N.prototype.panTo=function(p){this.contentDiv.scrollBy({left:this.prevPanPoint.x-p.x,top:this.prevPanPoint.y-p.y}),this.prevPanPoint=p},N.prototype.startRenderAndClose=function(){return Te(this,void 0,void 0,function(){var p,b,M=this;return Ae(this,function(K){switch(K.label){case 0:return[4,this.render()];case 1:return p=K.sent(),b=this.getState(),this.eventListeners.render.forEach(function(k){return k(new tt(M,p,b))}),this.close(!0),[2]}})})},N.prototype.getState=function(p){p===!0&&this.setCurrentMarker();var b={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(M){return b.markers.push(M.getState())}),b},N.prototype.restoreState=function(p){var b=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);p.markers.forEach(function(M){var K=b._availableMarkerTypes.find(function(he){return he.typeName===M.typeName});if(K!==void 0){var k=b.addNewMarker(K);k.restoreState(M),b.markers.push(k)}}),p.width&&p.height&&(p.width!==this.imageWidth||p.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/p.width,this.imageHeight/p.height),this.eventListeners.restorestate.forEach(function(M){return M(new st(b))})},N.prototype.addNewMarker=function(p){var b=J.createGroup();return this.markerImage.appendChild(b),new p(b,this.overlayContainer,this.settings)},N.prototype.createNewMarker=function(p){var b,M=this;(b=typeof p=="string"?this._availableMarkerTypes.find(function(K){return K.typeName===p}):p)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(b),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(b.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(K){return K(new Ye(M,M._currentMarker))}))},N.prototype.markerCreated=function(p){var b=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(p),this.setCurrentMarker(p),p instanceof ce&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ce):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(M){return M(new Ye(b,b._currentMarker))})},N.prototype.colorChanged=function(p){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=p,this.settings.defaultStrokeColor=p)},N.prototype.fillColorChanged=function(p){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=p)},N.prototype.markerStateChanged=function(p){var b=this;this.eventListeners.markerchange.forEach(function(M){return M(new Ye(b,p))})},N.prototype.setCurrentMarker=function(p){var b=this;this._currentMarker!==p&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(M){return M(new Ye(b,b._currentMarker))})),this._currentMarker=p,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(M){return M(new Ye(b,b._currentMarker))}))},N.prototype.onPointerDown=function(p){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||p.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var b=this.markers.find(function(M){return M.ownsTarget(p.target)});b!==void 0?(this.setCurrentMarker(b),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(p.clientX,p.clientY),p.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:p.clientX,y:p.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(p.clientX,p.clientY))},N.prototype.onDblClick=function(p){if(this._isFocused||this.focus(),this.mode==="select"){var b=this.markers.find(function(M){return M.ownsTarget(p.target)});b!==void 0&&b!==this._currentMarker&&this.setCurrentMarker(b),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(p.clientX,p.clientY),p.target):this.setCurrentMarker()}},N.prototype.onPointerMove=function(p){this.touchPoints!==1&&p.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||p.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(p.clientX,p.clientY)):this.zoomLevel>1&&this.panTo({x:p.clientX,y:p.clientY}))},N.prototype.onPointerUp=function(p){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(p.clientX,p.clientY)),this.isDragging=!1,this.addUndoStep()},N.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},N.prototype.onKeyUp=function(p){this._currentMarker===void 0||this.notesArea!==void 0||p.key!=="Delete"&&p.key!=="Backspace"||this.deleteSelectedMarker()},N.prototype.clientToLocalCoordinates=function(p,b){var M=this.markerImage.getBoundingClientRect();return{x:(p-M.left)/this.zoomLevel,y:(b-M.top)/this.zoomLevel}},N.prototype.onWindowResize=function(){this.positionUI()},N.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var p=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=p+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},N.prototype.addLicenseKey=function(p){Ie.addKey(p)},N.prototype.addEventListener=function(p,b){this.eventListeners.addEventListener(p,b)},N.prototype.removeEventListener=function(p,b){this.eventListeners.removeEventListener(p,b)},N.prototype.renderState=function(p){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(p),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(N.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),N.prototype.focus=function(){var p=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(b){return b(new st(p))}))},N.prototype.blur=function(){var p=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(b){return b(new st(p))}))},N.instanceCounter=0,N}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var gt=function(N,p){return(gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,M){b.__proto__=M}||function(b,M){for(var K in M)Object.prototype.hasOwnProperty.call(M,K)&&(b[K]=M[K])})(N,p)};function At(N,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function b(){this.constructor=N}gt(N,p),N.prototype=p===null?Object.create(p):(b.prototype=p.prototype,new b)}function ht(N,p,b,M){return new(b||(b=Promise))(function(K,k){function he(Et){try{lt(M.next(Et))}catch(Ke){k(Ke)}}function He(Et){try{lt(M.throw(Et))}catch(Ke){k(Ke)}}function lt(Et){var Ke;Et.done?K(Et.value):(Ke=Et.value,Ke instanceof b?Ke:new b(function(It){It(Ke)})).then(he,He)}lt((M=M.apply(N,p||[])).next())})}function vt(N,p){var b,M,K,k,he={label:0,sent:function(){if(1&K[0])throw K[1];return K[1]},trys:[],ops:[]};return k={next:He(0),throw:He(1),return:He(2)},typeof Symbol=="function"&&(k[Symbol.iterator]=function(){return this}),k;function He(lt){return function(Et){return function(Ke){if(b)throw new TypeError("Generator is already executing.");for(;he;)try{if(b=1,M&&(K=2&Ke[0]?M.return:Ke[0]?M.throw||((K=M.return)&&K.call(M),0):M.next)&&!(K=K.call(M,Ke[1])).done)return K;switch(M=0,K&&(Ke=[2&Ke[0],K.value]),Ke[0]){case 0:case 1:K=Ke;break;case 4:return he.label++,{value:Ke[1],done:!1};case 5:he.label++,M=Ke[1],Ke=[0];continue;case 7:Ke=he.ops.pop(),he.trys.pop();continue;default:if(!(K=he.trys,(K=K.length>0&&K[K.length-1])||Ke[0]!==6&&Ke[0]!==2)){he=0;continue}if(Ke[0]===3&&(!K||Ke[1]>K[0]&&Ke[1]<K[3])){he.label=Ke[1];break}if(Ke[0]===6&&he.label<K[1]){he.label=K[1],K=Ke;break}if(K&&he.label<K[2]){he.label=K[2],he.ops.push(Ke);break}K[2]&&he.ops.pop(),he.trys.pop();continue}Ke=p.call(N,he)}catch(It){Ke=[6,It],M=0}finally{b=K=0}if(5&Ke[0])throw Ke[1];return{value:Ke[0]?Ke[1]:void 0,done:!0}}([lt,Et])}}}var Ot=function(){function N(){}return N.addKey=function(p){N.key=p},Object.defineProperty(N,"isLicensed",{get:function(){return!!N.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(N.key)},enumerable:!1,configurable:!0}),N}(),Pe=function(){function N(){}return N.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},N.setAttributes=function(p,b){for(var M=0,K=b;M<K.length;M++){var k=K[M],he=k[0],He=k[1];p.setAttribute(he,He)}},N.createRect=function(p,b,M){var K=document.createElementNS("http://www.w3.org/2000/svg","rect");return K.setAttribute("width",p.toString()),K.setAttribute("height",b.toString()),M&&N.setAttributes(K,M),K},N.createLine=function(p,b,M,K,k){var he=document.createElementNS("http://www.w3.org/2000/svg","line");return he.setAttribute("x1",p.toString()),he.setAttribute("y1",b.toString()),he.setAttribute("x2",M.toString()),he.setAttribute("y2",K.toString()),k&&N.setAttributes(he,k),he},N.createPolygon=function(p,b){var M=document.createElementNS("http://www.w3.org/2000/svg","polygon");return M.setAttribute("points",p),b&&N.setAttributes(M,b),M},N.createCircle=function(p,b){var M=document.createElementNS("http://www.w3.org/2000/svg","circle");return M.setAttribute("cx",(p/2).toString()),M.setAttribute("cy",(p/2).toString()),M.setAttribute("r",p.toString()),b&&N.setAttributes(M,b),M},N.createEllipse=function(p,b,M){var K=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return K.setAttribute("cx",(p/2).toString()),K.setAttribute("cy",(b/2).toString()),K.setAttribute("rx",(p/2).toString()),K.setAttribute("ry",(b/2).toString()),M&&N.setAttributes(K,M),K},N.createGroup=function(p){var b=document.createElementNS("http://www.w3.org/2000/svg","g");return p&&N.setAttributes(b,p),b},N.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},N.createMarker=function(p,b,M,K,k,he,He){var lt=document.createElementNS("http://www.w3.org/2000/svg","marker");return N.setAttributes(lt,[["id",p],["orient",b],["markerWidth",M.toString()],["markerHeight",K.toString()],["refX",k.toString()],["refY",he.toString()]]),lt.appendChild(He),lt},N.createText=function(p){var b=document.createElementNS("http://www.w3.org/2000/svg","text");return b.setAttribute("x","0"),b.setAttribute("y","0"),p&&N.setAttributes(b,p),b},N.createTSpan=function(p,b){var M=document.createElementNS("http://www.w3.org/2000/svg","tspan");return M.textContent=p,b&&N.setAttributes(M,b),M},N.createImage=function(p){var b=document.createElementNS("http://www.w3.org/2000/svg","image");return p&&N.setAttributes(b,p),b},N.createPoint=function(p,b){var M=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return M.x=p,M.y=b,M},N.createPath=function(p,b){var M=document.createElementNS("http://www.w3.org/2000/svg","path");return M.setAttribute("d",p),b&&N.setAttributes(M,b),M},N.createElement=function(p,b){var M=document.createElementNS("http://www.w3.org/2000/svg",p);return b&&N.setAttributes(M,b),M},N.getHollowRectanglePath=function(p,b,M,K,k,he,He,lt){return"M"+p+","+b+"V"+(b+K)+"H"+(p+M)+"V"+b+"H"+k+"V"+he+"H"+(k+He)+"V"+(he+lt)+"H"+k+"V"+b+"Z"},N}(),pt=function(){function N(p){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+p+"_"}return Object.defineProperty(N.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),N.prototype.addClass=function(p){return this.styleSheet===void 0&&this.addStyleSheet(),p.name=""+this.classNamePrefix+p.localName,this.classes.push(p),this.styleSheet.sheet.insertRule("."+p.name+" {"+p.style+"}",this.styleSheet.sheet.cssRules.length),p},N.prototype.addRule=function(p){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(p),this.styleSheet.sheet.insertRule(p.selector+" {"+p.style+"}",this.styleSheet.sheet.cssRules.length)},N.prototype.addStyleSheet=function(){var p;this.styleSheet=document.createElement("style"),((p=this.styleSheetRoot)!==null&&p!==void 0?p:document.head).appendChild(this.styleSheet),this.addRule(new St("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new St("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new St("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Ct("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Ct("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},N.prototype.removeStyleSheet=function(){var p;this.styleSheet&&(((p=this.styleSheetRoot)!==null&&p!==void 0?p:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},N}(),St=function(N,p){this.selector=N,this.style=p},Ct=function(N,p){this.localName=N,this.style=p},Mt=function(){function N(){this.blocks=[],this.display=""}return N.prototype.addButtonBlock=function(p){p.className=this.blockClassName,p.buttonClassName=this.buttonClassName,p.buttonColorsClassName=this.buttonColorsClassName,p.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(p)},N.prototype.addElementBlock=function(p){p.className===void 0&&(p.className=this.blockClassName),this.blocks.push(p)},N.prototype.getUI=function(){var p=document.createElement("div");return p.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,p.style.display=this.display,this.blocks.forEach(function(b){return p.appendChild(b.getUI())}),p},N}(),xt=function(){function N(){}return N.prototype.getUI=function(){var p=document.createElement("div");if(p.className=this.className,this.minWidth!==void 0&&(p.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":p.style.justifyContent="flex-start";break;case"center":p.style.justifyContent="center";break;case"end":p.style.justifyContent="flex-end"}return p.style.whiteSpace="nowrap",p},N}(),mn=function(N){function p(){var b=N!==null&&N.apply(this,arguments)||this;return b.buttons=[],b}return At(p,N),p.prototype.addButton=function(b){b.className=this.buttonClassName,b.colorsClassName=this.buttonColorsClassName,b.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(b)},p.prototype.getUI=function(){var b=N.prototype.getUI.call(this);return this.buttons.forEach(function(M){return b.appendChild(M.getUI())}),b},p}(xt),$t=function(){function N(p,b){this._isActive=!1,this._isHidden=!1,this._icon=p,this.title=b,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(N.prototype,"icon",{get:function(){return this._icon},set:function(p){this._icon=p,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isActive",{get:function(){return this._isActive},set:function(p){this._isActive=p,this.adjustClassName()},enumerable:!1,configurable:!0}),N.prototype.getUI=function(){var p=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return p.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},N.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},N.prototype.hide=function(){this._isHidden=!0},N}(),hn=function(N){function p(){var b=N!==null&&N.apply(this,arguments)||this;return b.elements=[],b}return At(p,N),p.prototype.addElement=function(b){this.elements.push(b)},p.prototype.getUI=function(){var b=N.prototype.getUI.call(this);return this.elements.forEach(function(M){return b.appendChild(M)}),b},p}(xt),zt=function(){function N(p,b){this.horizontal=p,this.vertical=b}return Object.defineProperty(N.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),N.prototype.getVerticalLength=function(p){return p/this.ratio},N.prototype.getHorizontalLength=function(p){return p*this.ratio},N}(),Bt=function(){function N(){}return N.getIcon=function(p,b){if(p>0&&b>0){var M=new zt(p,b),K=M.ratio>=1?20:M.getHorizontalLength(20),k=M.ratio<1?20:M.getVerticalLength(20),he=document.createElementNS("http://www.w3.org/2000/svg","svg");he.setAttribute("xmlns","http://www.w3.org/2000/svg"),he.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(he);var He=Pe.createDefs();he.appendChild(He);var lt=Pe.createElement("clipPath",[["id","text-bg-clip"]]);He.appendChild(lt);var Et=Pe.createPath(Pe.getHollowRectanglePath((24-K)/2,(24-k)/2,K,k,(24-K)/2+2,(24-k)/2+2,K-4,k-4));he.appendChild(Et);var Ke=Pe.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ke.appendChild(Pe.createTSpan(p+":"+b)),he.appendChild(Ke);var It=Ke.getBBox();Pe.setAttributes(Ke,[["x",((24-It.width)/2).toString()],["y",((24-It.height)/2-It.y).toString()]]);var Nt=Pe.createPath(Pe.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(It.width))/2,(24-Math.ceil(It.height))/2,Math.ceil(It.width),Math.ceil(It.height)));return lt.appendChild(Nt),Pe.setAttributes(Et,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(he),he.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},N}(),tn=function(N){function p(b,M,K){var k=N.call(this,b,M)||this;return k.isDropdownOpen=!1,k.onClick=k.dropdownButtonClicked,k.dropdownButtons=K,k}return At(p,N),p.prototype.setupDropdown=function(){var b=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(M){M.className=b.className,M.colorsClassName=b.colorsClassName,b.dropdownBlock.appendChild(M.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},p.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},p.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},p.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},p.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},p.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},p}($t),gn=function(){function N(p,b){this.GRIP_SIZE=10,this.color=p,this.fillColor=b,this.visual=Pe.createGroup(),this.visual.appendChild(Pe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Pe.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return N.prototype.ownsTarget=function(p){return p===this.visual||p===this.visual.childNodes[0]||p===this.visual.childNodes[1]},N.prototype.setCenter=function(p,b){this.visual.childNodes.forEach(function(M){return Pe.setAttributes(M,[["cx",p.toString()],["cy",b.toString()]])})},N}(),_n=function(){function N(p,b,M,K){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=p,this.canvasHeight=b,this.margin=M,this.container=K,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(N.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(p){this._aspectRatio=p,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(p){this._isGridVisible=p,this.gridContainer&&Pe.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(p){this._zoomFactor=p,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),N.prototype.open=function(){var p=this;this.cropShadeElement=Pe.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Pe.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var b=0;b<this.numberOfGridLines;b++)this.horizontalGridLines.push(Pe.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Pe.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(M){return p.gridContainer.appendChild(M)}),this.verticalGridLines.forEach(function(M){return p.gridContainer.appendChild(M)}),this.cropRectElement=Pe.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new gn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new gn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new gn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new gn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},N.prototype.setCropRectangle=function(p){this.cropRect=p;var b=Object.assign({},this.cropRect);this.zoomFactor!==1&&(b.width=this.cropRect.width*this.zoomFactor,b.height=this.cropRect.height*this.zoomFactor,b.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-b.width/2,b.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-b.height/2),Pe.setAttributes(this.cropRectElement,[["x",b.x.toString()],["y",b.y.toString()],["width",b.width.toString()],["height",b.height.toString()]]);var M=b.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(k,he){var He=b.y+M*(he+1);Pe.setAttributes(k,[["x1",""+b.x],["y1",""+He],["x2",""+(b.x+b.width)],["y2",""+He]])});var K=b.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(k,he){var He=b.x+K*(he+1);Pe.setAttributes(k,[["x1",""+He],["y1",""+b.y],["x2",""+He],["y2",""+(b.y+b.height)]])}),Pe.setAttributes(this.cropShadeElement,[["d",Pe.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,b.x,b.y,b.width,b.height)]]),this.topLeftGrip.setCenter(b.x,b.y),this.topRightGrip.setCenter(b.x+b.width,b.y),this.bottomLeftGrip.setCenter(b.x,b.y+b.height),this.bottomRightGrip.setCenter(b.x+b.width,b.y+b.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},N.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},N.prototype.clientToLocalCoordinates=function(p,b){var M=this.container.getBoundingClientRect();return{x:p-M.left+this.margin,y:b-M.top+this.margin}},N.prototype.onPointerDown=function(p){this.container.setPointerCapture(p.pointerId),this.previousPoint=this.clientToLocalCoordinates(p.clientX,p.clientY),this.cropRectElement===p.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(p.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(p.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(p.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(p.target)&&(this.activeGrip=this.bottomRightGrip)},N.prototype.onPointerMove=function(p){if(this.isMoving)this.move(this.clientToLocalCoordinates(p.clientX,p.clientY));else if(this.activeGrip){var b=this.clientToLocalCoordinates(p.clientX,p.clientY);this.resize(b)}p.preventDefault()},N.prototype.onPointerUp=function(p){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(p.pointerId)},N.prototype.move=function(p){var b=p.x-this.previousPoint.x,M=p.y-this.previousPoint.y;this.zoomFactor!==1&&(b=-b/this.zoomFactor,M=-M/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+b),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+M),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=p},N.prototype.resize=function(p){var b=Object.assign({},this.cropRect),M=p.x-this.previousPoint.x,K=p.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:b.x+M<this.margin&&(M=this.margin-b.x),b.x+=M,b.width=this.cropRect.x+this.cropRect.width-b.x;break;case this.bottomRightGrip:case this.topRightGrip:b.width+M>this.canvasWidth*this.zoomFactor&&(M=this.canvasWidth*this.zoomFactor-b.width),b.width+=M}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(b.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(M),b.height=this.aspectRatio.getVerticalLength(b.width)):(b.y+=K,b.height=this.cropRect.y+this.cropRect.height-b.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?b.height=this.aspectRatio.getVerticalLength(b.width):b.height+=K}b.width<10&&(b.x=this.cropRect.x,b.width=10),b.height<10&&(b.y=this.cropRect.y,b.height=10),this.previousPoint=p,b.x>=this.margin&&b.y>=this.margin&&b.x-this.margin+b.width<=this.canvasWidth&&b.y-this.margin+b.height<=this.canvasHeight&&(this.cropRect=b,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},N.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var p=this.cropRect.x+this.cropRect.width/2,b=this.cropRect.y+this.cropRect.height/2,M=this.aspectRatio.getHorizontalLength(this.cropRect.height),K=this.aspectRatio.getVerticalLength(this.cropRect.width);M/this.canvasWidth<K/this.canvasHeight?this.cropRect.width=M:this.cropRect.height=K,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=p-this.cropRect.width/2,this.cropRect.y=b-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},N.prototype.getRescaledRect=function(p,b,M,K,k,he){var He=M/p,lt=K/b;return{x:(k.x-he)*He+he,y:(k.y-he)*lt+he,width:k.width*He,height:k.height*lt}},N.prototype.scaleCanvas=function(p,b){var M=this.getRescaledRect(this.canvasWidth,this.canvasHeight,p,b,this.cropRect,this.margin);this.canvasWidth=p,this.canvasHeight=b,this.onCropChange&&this.onCropChange(M),this.setCropRectangle(M)},N}(),Pn=function(){function N(p){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=p,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(N.prototype,"angle",{get:function(){return this._angle},set:function(p){this._angle=p,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),N.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},N.prototype.onPointerDown=function(p){this.controlContainer.setPointerCapture(p.pointerId),this.isDragging=!0,this.previousPoint={x:p.clientX,y:p.clientY}},N.prototype.onPointerMove=function(p){this.isDragging&&(this.onAngleChange&&this.onAngleChange((p.clientX-this.previousPoint.x)/5),this.previousPoint.x=p.clientX)},N.prototype.onPointerUp=function(p){this.isDragging&&this.onAngleChange&&this.onAngleChange((p.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(p.pointerId)},N.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var p=this.angleLabelText.getBBox();Pe.setAttributes(this.angleLabelElement,[["x",((this.width-p.width)/2).toString()],["y",(this.height/2).toString()]])}},N.prototype.positionScaleShape=function(){if(this.scaleShape){var p=this.scaleShape.transform.baseVal.getItem(0);p.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(p,0)}},N.prototype.getVisual=function(){var p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("xmlns","http://www.w3.org/2000/svg"),p.setAttribute("width",this.width+"px"),p.setAttribute("height",this.height+"px"),p.setAttribute("viewBox","0 0 "+this.width+" "+this.height),p.style.flexShrink="0",document.body.appendChild(p);for(var b="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,M=1;M<=this.width/5+10;M++){var K=M%5==0?this.height/3:this.height/6;b+="h4v"+-K+"h1v"+K}b+="v1H0Z",this.scaleShape=Pe.createPath(b);var k=Pe.createTransform();this.scaleShape.transform.baseVal.appendItem(k),p.appendChild(this.scaleShape),this.angleLabelElement=Pe.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Pe.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var he=Pe.createTSpan("");return he.innerHTML="&deg;",this.angleLabelElement.appendChild(he),p.appendChild(this.angleLabelElement),document.body.removeChild(p),p},N}(),Wn=function(){function N(){this.naturalSize=!1,this.imageType="image/png"}return N.prototype.rasterize=function(p,b,M,K,k,he,He){var lt=this;return new Promise(function(Et){var Ke=document.createElement("canvas");Ke.width=p.width.baseVal.value-2*K,Ke.height=p.height.baseVal.value-2*K;var It=1,Nt=1;lt.naturalSize===!0?(It=b.naturalWidth/(p.width.baseVal.value-2*K)/he,Nt=b.naturalHeight/(p.height.baseVal.value-2*K)/He,Ke.width=b.naturalWidth/he,Ke.height=b.naturalHeight/He):lt.width!==void 0&&lt.height!==void 0&&(It=lt.width/M.width,Nt=lt.height/M.height,Ke.width*=It,Ke.height*=Nt);var on=Ke.getContext("2d");on.translate(Ke.width/2,Ke.height/2),on.rotate(k*Math.PI/180),on.scale(he,He),on.translate(-Ke.width/2,-Ke.height/2),on.drawImage(b,0,0,Ke.width,Ke.height);var Nn=document.createElement("canvas");Nn.width=M.width*It,Nn.height=M.height*Nt,Nn.getContext("2d").putImageData(on.getImageData((M.x-K)*It,(M.y-K)*Nt,M.width*It,M.height*Nt),0,0),Et(Nn.toDataURL(lt.imageType,lt.imageQuality))})},N}(),oi=function(){function N(p){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=N.instanceCounter++,this.styles=new pt(this.instanceNo),this.target=p,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(N.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(p){this._zoomToCropEnabled=p,p?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(p){this._isGridVisible=p,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"gridLines",{get:function(){return this._gridLines},set:function(p){this._gridLines=p,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(p){this._rotationAngle=p,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"aspectRatio",{get:function(){var p;return(p=this._aspectRatio)!==null&&p!==void 0?p:this.aspectRatios[0]},set:function(p){this._aspectRatio=p},enumerable:!1,configurable:!0}),N.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},N.prototype.show=function(){this.showUI(),this.open()},N.prototype.close=function(p){p===void 0&&(p=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),p||this.closeEventListeners.forEach(function(b){return b()}),this._isOpen=!1)},N.prototype.addRenderEventListener=function(p){this.renderEventListeners.push(p)},N.prototype.removeRenderEventListener=function(p){this.renderEventListeners.indexOf(p)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(p),1)},N.prototype.addCloseEventListener=function(p){this.closeEventListeners.push(p)},N.prototype.removeCloseEventListener=function(p){this.closeEventListeners.indexOf(p)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(p),1)},N.prototype.setupResizeObserver=function(){var p=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){p.resize(p.target.clientWidth,p.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},N.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var p=1*this.target.clientWidth/this.target.clientHeight,b=this.contentDiv.clientWidth/p>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*p:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,M=b+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/p;this.resize(b,M)}},N.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},N.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",Pe.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},N.prototype.resize=function(p,b){this.imageWidth=Math.round(p),this.imageHeight=Math.round(b),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},N.prototype.setEditingTarget=function(){var p=document.createElement("canvas");p.width=this.target.naturalWidth,p.height=this.target.naturalHeight,p.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var b=p.toDataURL();Pe.setAttributes(this.editingTarget,[["href",b]]),this.setEditingTargetSize()},N.prototype.setTopLeft=function(){var p=this.target.getBoundingClientRect(),b=this.editorCanvas.getBoundingClientRect();this.left=p.left-b.left-this.CANVAS_MARGIN,this.top=p.top-b.top-this.CANVAS_MARGIN},N.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=Pe.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Pe.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Pe.createGroup(),this.editingTargetRotationScaleContainer=Pe.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var p=Pe.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(p);var b=Pe.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(b),this.editingTargetContainer=Pe.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},N.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},N.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Pe.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new _n(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},N.prototype.zoomToCrop=function(){if(this.cropRect){var p=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,b=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=p+"px "+b+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-p+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-b+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},N.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},N.prototype.cropRectChanged=function(p){this.cropRect=p,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},N.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},N.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},N.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},N.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var p=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,b=this.target.offsetTop>p+this.CANVAS_MARGIN?this.target.offsetTop-(p+this.CANVAS_MARGIN):0;this.coverDiv.style.top=b+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},N.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},N.prototype.addTopToolbar=function(){var p=this;this.topToolbar=new Mt,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var b=new mn;b.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(b);var M=[];this.aspectRatios.forEach(function(Nt){var on=new $t(Bt.getIcon(Nt.horizontal,Nt.vertical),Nt.horizontal===0&&Nt.vertical===0?"FREE":Nt.horizontal+":"+Nt.vertical);on.onClick=function(){return p.ratioButtonClicked(Nt)},M.push(on)}),this.aspectRatioButton=new tn(Bt.getIcon(0,0),"Aspect ratio",M),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,b.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var K=new $t('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");K.isActive=this.isGridVisible,K.onClick=function(){p.isGridVisible=!p.isGridVisible,K.isActive=p.isGridVisible},b.addButton(K);var k=new $t('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(k.isActive=this.zoomToCropEnabled,k.onClick=function(){p.zoomToCropEnabled=!p.zoomToCropEnabled,k.isActive=p.zoomToCropEnabled},b.addButton(k),!Ot.isLicensed){var he=new hn;this.topToolbar.addElementBlock(he);var He=document.createElement("div");He.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var lt=document.createElement("a");lt.style.color="currentColor",lt.href="https://markerjs.com/products/cropro",lt.target="_blank",lt.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',He.appendChild(lt),he.addElement(He)}var Et=new mn;Et.minWidth=3*this.toolbarHeight+"px",Et.contentAlign="end",this.topToolbar.addButtonBlock(Et);var Ke=new $t('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");Ke.onClick=this.startRenderAndClose,Et.addButton(Ke),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ke.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var It=new $t('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");It.onClick=this.close,Et.addButton(It),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(It.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},N.prototype.addBottomToolbar=function(){var p=this;this.bottomToolbar=new Mt,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var b=new mn;b.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(b);var M=new $t('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");M.onClick=this.rotateLeftButtonClicked,b.addButton(M);var K=new $t('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");K.onClick=this.rotateRightButtonClicked,b.addButton(K);var k=new hn;k.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(k),this.straightener=new Pn("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(Et){p.rotateBy(Et),p.straightener.angle=p.rotationAngle},k.addElement(this.straightener.getUI());var he=new mn;he.minWidth=2*this.toolbarHeight+"px",he.contentAlign="end",this.bottomToolbar.addButtonBlock(he);var He=new $t('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");He.onClick=this.flipHorizontallyButtonClicked,he.addButton(He);var lt=new $t('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");lt.onClick=this.flipVerticallyButtonClicked,he.addButton(lt)},N.prototype.ratioButtonClicked=function(p){this.aspectRatio=p,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},N.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Bt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},N.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new zt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},N.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},N.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},N.prototype.restoreState=function(p){if(p){var b=this.cropLayer.getRescaledRect(p.width,p.height,this.imageWidth,this.imageHeight,p.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(b),this.cropRectChanged(b),this.flippedHorizontally=p.flippedHorizontally,this.flippedVertically=p.flippedVertically,this.applyFlip(),this.rotationAngle=p.rotationAngle,this.applyRotation()}},N.prototype.clientToLocalCoordinates=function(p,b){var M=this.cropImage.getBoundingClientRect();return{x:p-M.left,y:b-M.top}},N.prototype.onWindowResize=function(){this.positionUI()},N.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var p=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=p+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},N.prototype.rotateLeftButtonClicked=function(){var p=this.rotationAngle-90;this.rotationAngle%90!=0&&(p+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(p)},N.prototype.rotateRightButtonClicked=function(){var p=this.rotationAngle+90;this.rotationAngle%90!=0&&(p-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(p)},N.prototype.rotateTo=function(p){p=(p=p>180?p-360:p)<=-180?p+360:p,this.rotationAngle=p,this.applyRotation()},N.prototype.rotateBy=function(p){this.rotateTo((this.rotationAngle+p)%360)},N.prototype.applyRotation=function(){var p=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var b=this.editingTargetRotationContainer.transform.baseVal.getItem(0);b.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(b,0);var M=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/M.width,this.imageHeight/M.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=p},N.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},N.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},N.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},N.prototype.startRenderAndClose=function(){return ht(this,void 0,void 0,function(){var p,b;return vt(this,function(M){switch(M.label){case 0:return[4,this.render()];case 1:return p=M.sent(),b=this.getState(),this.renderEventListeners.forEach(function(K){return K(p,b)}),this.close(!0),[2]}})})},N.prototype.render=function(){return ht(this,void 0,void 0,function(){var p;return vt(this,function(b){switch(b.label){case 0:return(p=new Wn).naturalSize=this.renderAtNaturalSize,p.imageType=this.renderImageType,p.imageQuality=this.renderImageQuality,p.width=this.renderWidth,p.height=this.renderHeight,this.unzoomFromCrop(),Pe.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,p.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return b.sent(),[4,p.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,b.sent()]}})})},N.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ct("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Ct("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ct("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var p=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ct("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*p)+`px;
height: `+(this.toolbarHeight-2*p)+`px;
padding: `+p+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ct("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ct("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new St("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new St("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Ct("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Ct("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ct("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new Ct("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*p)+`px;
padding: `+p+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ct("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},N.instanceCounter=0,N}(),Vn=F("8hTe"),Ut=F.n(Vn),Zn=/<pre[^>]*>/g;function fi(N){var p=document.createElement("div");return p.innerHTML=N,p.childNodes.length===0?"":p.childNodes[0].nodeValue}var qn=Re.a=function(N){var p=N.value,b=p===void 0?"":p,M=N.edit,K=M===void 0?!1:M,k=N.className,he=N.showTextOnly,He=N.showLines,lt=N.replaces,Et=N.zoomImg,Ke=N.hasMask,It=N.style,Nt=It===void 0?{}:It,on=N.stylesPrev,Nn=on===void 0?{}:on,Yn=String(b),Oe=Object(S.useRef)(),In=Object(S.useRef)(),si=Object(S.useState)(""),Xn=Object(H.a)(si,2),pi=Xn[0],$n=Xn[1],Cn=Object(S.useState)("office"),Kn=Object(H.a)(Cn,2),li=Kn[0],mi=Kn[1],Ti=function(){var Ft=new oi(In.current);Ft.displayMode="popup",Ft.addRenderEventListener(function(){var vn=Object(w.a)(R.a.mark(function Qt(An){var sn;return R.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return Oe.current.style.display="none",On.next=3,Object(Ee.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:An}});case 3:sn=On.sent,sn!=null&&sn.id&&lt(In.current.getAttribute("src").replace(Q.a.API_SERVER,""),"/api/attachments/".concat(sn==null?void 0:sn.id,"?type=").concat(sn.content_type));case 5:case"end":return On.stop()}},Qt)}));return function(Qt){return vn.apply(this,arguments)}}()),Ft.show()},Ni=function(){var Ft=new bt(In.current);Ft.settings.displayMode="popup",Ft.addEventListener("render",function(){var vn=Object(w.a)(R.a.mark(function Qt(An){var sn;return R.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:if(Oe.current.style.display="none",!In.current){On.next=6;break}return On.next=4,Object(Ee.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:An.dataUrl}});case 4:sn=On.sent,sn!=null&&sn.id&&lt(In.current.getAttribute("src").replace(Q.a.API_SERVER,""),"/api/attachments/".concat(sn==null?void 0:sn.id,"?type=").concat(sn.content_type));case 6:case"end":return On.stop()}},Qt)}));return function(Qt){return vn.apply(this,arguments)}}()),Ft.show(),window.markerArea=Ft},ui=Object(S.useMemo)(function(){Oe.current&&(Oe.current.style.zIndex=-1);try{var ln=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ft=/\"\/api\/attachments\/|\"\/attachments\/download\//g,vn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Yn=Yn.replace(ln,"("+Q.a.API_SERVER+"/api/attachments/").replace(Ft,'"'+Q.a.API_SERVER+"/api/attachments/").replace(vn,'"'+Q.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(vi){}var Qt=O(Yn),An=f();if(Yn.match(/\[TOC\]/)&&(Qt=Qt.replace("<p>[TOC]</p>",E()),T()),Qt=Qt.replace(/(__special_katext_id_\d+__)/g,function(vi,On){var xi=An[On],yi=xi.type,_i=xi.expression;return Object(re.renderToString)(fi(_i)||"",{displayMode:yi==="block",throwOnError:!1,output:"html"})}),Qt=Qt.replace(/▁/g,"\u2581\u2581\u2581"),c(),he){var sn=document.createElement("div");return sn.innerHTML=Qt,sn.innerText}return setTimeout(function(){return Ri()},500),Qt},[Yn]),Dn=Object(S.useRef)();_.WebkitLineClamp=He,He&&(Nt=Object(C.a)(Object(C.a)({},Nt),_));function ei(ln){var Ft=ln.target;if(Ft.tagName.toUpperCase()==="IMG"){if(Et){var vn=Ft.getAttribute("src");$n(vn),mi("image")}}else if(Ft.tagName.toUpperCase()==="A"){var Qt=Ft.getAttribute("href");if(Qt.indexOf("office")>-1)ln.preventDefault(),$n(Qt),mi("office");else if(Qt.indexOf("application/pdf")>-1)ln.preventDefault(),$n(Qt),mi("pdf");else if(Qt.indexOf("text/html")>-1)ln.preventDefault(),$n(Qt),mi("html");else if(Qt.startsWith("#")){ln.preventDefault();var An=document.getElementById(Qt.replace("#",""));An&&An.scrollIntoView(!0)}}}var Ri=function(){var Ft,vn=(Ft=Dn.current)===null||Ft===void 0?void 0:Ft.querySelectorAll("video");vn==null||vn.forEach(function(Qt){if(Qt.oncontextmenu=function(){return!1},Qt.src.indexOf(".m3u8")>-1&&!Qt.canPlayType("application/vnd.apple.mpegurl")){if(G.a.isSupported()){var An=new G.a;An.loadSource(Qt.src),An.attachMedia(Qt)}}})};Object(S.useEffect)(function(){if(Dn.current&&ui&&(ui.match(Zn)&&window.PR.prettyPrint()),Dn.current)return Dn.current.addEventListener("click",ei),function(){Dn.current.removeEventListener("click",ei),c(),T()}},[ui,Dn.current,ei]);var gi=function(Ft){if(!K)return;Ft.target.nodeName==="IMG"?(Oe.current.style.zIndex=1,Oe.current.style.display="flex",Oe.current.style.width=Ft.target.clientWidth+"px",Oe.current.style.height=Ft.target.clientHeight+"px",Oe.current.style.top=Ft.target.offsetTop+"px",Oe.current.style.left=Ft.target.offsetLeft+"px",In.current.src=Ft.target.getAttribute("src")):Oe.current.style.display="none"};return y.a.createElement("div",{style:{position:"relative"}},y.a.createElement("div",{ref:Dn,style:Object(C.a)({},Nt),className:"".concat(k||""," markdown-body ").concat(Ut.a.mdBody),onMouseOver:gi,dangerouslySetInnerHTML:{__html:ui}}),y.a.createElement("div",{ref:Oe,className:Ut.a.button},y.a.createElement(L.a,null,y.a.createElement(j.a,{onClick:function(){return Ti()}},"\u88C1\u526A"),y.a.createElement(j.a,{onClick:function(){return Ni()}},"\u7F16\u8F91"))),y.a.createElement("img",{ref:In,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),y.a.createElement(le.a,{close:!0,data:pi,type:pi!=null&&pi.length?li:"",style:Object(C.a)({},Nn),onClose:function(){return $n("")}}))}},"9JIy":function(Ge,Re,F){Ge.exports={flex_box_center:"flex_box_center___Hq8-r",flex_space_between:"flex_space_between___3Nl1U",flex_box_vertical_center:"flex_box_vertical_center___1hgum",flex_box_center_end:"flex_box_center_end___i5ldC",flex_box_column:"flex_box_column____1u-K",table:"table___2yPMl"}},BJfS:function(Ge,Re){var F=function(ie){return ie.replace(/[A-Z]/g,function(L){return"-"+L.toLowerCase()}).toLowerCase()};Ge.exports=F},BU3w:function(Ge,Re,F){"use strict";F.d(Re,"a",function(){return w});var ie=F("MNnm"),L="rc-util-key";function I(H){if(H.attachTo)return H.attachTo;var U=document.querySelector("head");return U||document.body}function j(H){var U,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ie.a)())return null;var S=document.createElement("style");if((U=R.csp)===null||U===void 0?void 0:U.nonce){var y;S.nonce=(y=R.csp)===null||y===void 0?void 0:y.nonce}S.innerHTML=H;var v=I(R),d=v.firstChild;return R.prepend&&v.prepend?v.prepend(S):R.prepend&&d?v.insertBefore(S,d):v.appendChild(S),S}var C=new Map;function w(H,U){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},S=I(R);if(!C.has(S)){var y=j("",R),v=y.parentNode;C.set(S,v),v.removeChild(y)}var d=Array.from(C.get(S).children).find(function(e){return e.tagName==="STYLE"&&e[L]===U});if(d){var o,n;if(((o=R.csp)===null||o===void 0?void 0:o.nonce)&&d.nonce!==((n=R.csp)===null||n===void 0?void 0:n.nonce)){var a;d.nonce=(a=R.csp)===null||a===void 0?void 0:a.nonce}return d.innerHTML!==H&&(d.innerHTML=H),d}var s=j(H,R);return s[L]=U,s}},BdwD:function(Ge,Re,F){"use strict";var ie=F("+L6B"),L=F("2/Rp"),I=F("0Owb"),j=F("k1fw"),C=F("cDcd"),w=F.n(C),H=F("FOrL"),U=F.n(H),R=function(y){var v=y.buttonProps,d=v===void 0?{}:v,o=y.styles,n=o===void 0?{}:o,a=y.customText,s=y.ButtonText,e=y.ButtonClick,t=y.Buttonclass,i=y.ButtonTwo;return w.a.createElement("section",{className:"tc animated fadeIn",style:Object(j.a)(Object(j.a)({},{color:"#999",margin:"200px auto"}),n)},w.a.createElement("img",{src:U.a}),w.a.createElement("p",{className:"mt20 font14"},a||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),s&&w.a.createElement(L.a,Object(I.a)({className:t,onClick:e},d),s),i&&i)};Re.a=R},Bq7L:function(Ge,Re){Ge.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANQAAAA8CAYAAAAeyZT3AAAAAXNSR0IArs4c6QAAEpJJREFUeF7tXQeYFdUV/mcbS1F6UUEsoLC7IGKNJWpERbEgSoxGo7HEQFDRWCAGgdASNBbEhglqsC1rAxVBNGg0qNgLsJRddmFhe3vby3uT7393ZmfeezOv7M57W3LP9/EtM3Pn3DPn3n/uvf85c58CKdID0gOOeUBxTJNUJD0gPQAJKNkJpAcc9EALoNRpCaqt3rh4QIkDvH/jxV/zuZZjrVy8uRzvSzDd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o9LbWHe79tHFIigACaXJOH/VUrXB1mMuxTbne1j+nqSltjZY235NX5UFFiGlfJDR69AHV5keOUEEkb+9wVHMac/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},DlQD:function(Ge,Re,F){(function(ie,L){Ge.exports=L()})(this,function(){"use strict";function ie(ce,ee){for(var te=0;te<ee.length;te++){var V=ee[te];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(ce,V.key,V)}}function L(ce,ee,te){return ee&&ie(ce.prototype,ee),te&&ie(ce,te),ce}function I(ce,ee){if(!ce)return;if(typeof ce=="string")return j(ce,ee);var te=Object.prototype.toString.call(ce).slice(8,-1);if(te==="Object"&&ce.constructor&&(te=ce.constructor.name),te==="Map"||te==="Set")return Array.from(ce);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return j(ce,ee)}function j(ce,ee){(ee==null||ee>ce.length)&&(ee=ce.length);for(var te=0,V=new Array(ee);te<ee;te++)V[te]=ce[te];return V}function C(ce,ee){var te;if(typeof Symbol=="undefined"||ce[Symbol.iterator]==null){if(Array.isArray(ce)||(te=I(ce))||ee&&ce&&typeof ce.length=="number"){te&&(ce=te);var V=0;return function(){return V>=ce.length?{done:!0}:{done:!1,value:ce[V++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return te=ce[Symbol.iterator](),te.next.bind(te)}function w(ce,ee){return ee={exports:{}},ce(ee,ee.exports),ee.exports}var H=w(function(ce){function ee(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function te(V){ce.exports.defaults=V}ce.exports={defaults:ee(),getDefaults:ee,changeDefaults:te}}),U=H.defaults,R=H.getDefaults,S=H.changeDefaults,y=/[&<>"']/,v=/[&<>"']/g,d=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},a=function(ee){return n[ee]};function s(ce,ee){if(ee){if(y.test(ce))return ce.replace(v,a)}else if(d.test(ce))return ce.replace(o,a);return ce}var e=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function t(ce){return ce.replace(e,function(ee,te){return te=te.toLowerCase(),te==="colon"?":":te.charAt(0)==="#"?te.charAt(1)==="x"?String.fromCharCode(parseInt(te.substring(2),16)):String.fromCharCode(+te.substring(1)):""})}var i=/(^|[^\[])\^/g;function T(ce,ee){ce=ce.source||ce,ee=ee||"";var te={replace:function(X,q){return q=q.source||q,q=q.replace(i,"$1"),ce=ce.replace(X,q),te},getRegex:function(){return new RegExp(ce,ee)}};return te}var _=/[^\w:]/g,m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(ce,ee,te){if(ce){var V;try{V=decodeURIComponent(t(te)).replace(_,"").toLowerCase()}catch(X){return null}if(V.indexOf("javascript:")===0||V.indexOf("vbscript:")===0||V.indexOf("data:")===0)return null}ee&&!m.test(te)&&(te=l(ee,te));try{te=encodeURI(te).replace(/%25/g,"%")}catch(X){return null}return te}var g={},h=/^[^:]+:\/*[^/]*$/,u=/^([^:]+:)[\s\S]*$/,r=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(ce,ee){g[" "+ce]||(h.test(ce)?g[" "+ce]=ce+"/":g[" "+ce]=D(ce,"/",!0)),ce=g[" "+ce];var te=ce.indexOf(":")===-1;return ee.substring(0,2)==="//"?te?ee:ce.replace(u,"$1")+ee:ee.charAt(0)==="/"?te?ee:ce.replace(r,"$1")+ee:ce+ee}var f={exec:function(){}};function c(ce){for(var ee=1,te,V;ee<arguments.length;ee++){te=arguments[ee];for(V in te)Object.prototype.hasOwnProperty.call(te,V)&&(ce[V]=te[V])}return ce}function x(ce,ee){var te=ce.replace(/\|/g,function(q,ae,ge){for(var we=!1,je=ae;--je>=0&&ge[je]==="\\";)we=!we;return we?"|":" |"}),V=te.split(/ \|/),X=0;if(V.length>ee)V.splice(ee);else for(;V.length<ee;)V.push("");for(;X<V.length;X++)V[X]=V[X].trim().replace(/\\\|/g,"|");return V}function D(ce,ee,te){var V=ce.length;if(V===0)return"";for(var X=0;X<V;){var q=ce.charAt(V-X-1);if(q===ee&&!te)X++;else if(q!==ee&&te)X++;else break}return ce.substr(0,V-X)}function A(ce,ee){if(ce.indexOf(ee[1])===-1)return-1;for(var te=ce.length,V=0,X=0;X<te;X++)if(ce[X]==="\\")X++;else if(ce[X]===ee[0])V++;else if(ce[X]===ee[1]&&(V--,V<0))return X;return-1}function B(ce){ce&&ce.sanitize&&!ce.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var O={escape:s,unescape:t,edit:T,cleanUrl:E,resolveUrl:l,noopTest:f,merge:c,splitCells:x,rtrim:D,findClosingBracket:A,checkSanitizeDeprecation:B},W=H.defaults,P=O.rtrim,G=O.splitCells,Q=O.escape,re=O.findClosingBracket;function le(ce,ee,te){var V=ee.href,X=ee.title?Q(ee.title):null,q=ce[1].replace(/\\([\[\]])/g,"$1");return ce[0].charAt(0)!=="!"?{type:"link",raw:te,href:V,title:X,text:q}:{type:"image",raw:te,href:V,title:X,text:Q(q)}}function Ee(ce,ee){var te=ce.match(/^(\s+)(?:```)/);if(te===null)return ee;var V=te[1];return ee.split(`
`).map(function(X){var q=X.match(/^\s+/);if(q===null)return X;var ae=q[0];return ae.length>=V.length?X.slice(V.length):X}).join(`
`)}var _e=function(){function ce(te){this.options=te||W}var ee=ce.prototype;return ee.space=function(V){var X=this.rules.block.newline.exec(V);if(X)return X[0].length>1?{type:"space",raw:X[0]}:{raw:`
`}},ee.code=function(V,X){var q=this.rules.block.code.exec(V);if(q){var ae=X[X.length-1];if(ae&&ae.type==="paragraph")return{raw:q[0],text:q[0].trimRight()};var ge=q[0].replace(/^ {4}/gm,"");return{type:"code",raw:q[0],codeBlockStyle:"indented",text:this.options.pedantic?ge:P(ge,`
`)}}},ee.fences=function(V){var X=this.rules.block.fences.exec(V);if(X){var q=X[0],ae=Ee(q,X[3]||"");return{type:"code",raw:q,lang:X[2]?X[2].trim():X[2],text:ae}}},ee.heading=function(V){var X=this.rules.block.heading.exec(V);if(X)return{type:"heading",raw:X[0],depth:X[1].length,text:X[2]}},ee.nptable=function(V){var X=this.rules.block.nptable.exec(V);if(X){var q={type:"table",header:G(X[1].replace(/^ *| *\| *$/g,"")),align:X[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:X[3]?X[3].replace(/\n$/,"").split(`
`):[],raw:X[0]};if(q.header.length===q.align.length){var ae=q.align.length,ge;for(ge=0;ge<ae;ge++)/^ *-+: *$/.test(q.align[ge])?q.align[ge]="right":/^ *:-+: *$/.test(q.align[ge])?q.align[ge]="center":/^ *:-+ *$/.test(q.align[ge])?q.align[ge]="left":q.align[ge]=null;for(ae=q.cells.length,ge=0;ge<ae;ge++)q.cells[ge]=G(q.cells[ge],q.header.length);return q}}},ee.hr=function(V){var X=this.rules.block.hr.exec(V);if(X)return{type:"hr",raw:X[0]}},ee.blockquote=function(V){var X=this.rules.block.blockquote.exec(V);if(X){var q=X[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:X[0],text:q}}},ee.list=function(V){var X=this.rules.block.list.exec(V);if(X){for(var q=X[0],ae=X[2],ge=ae.length>1,we=ae[ae.length-1]===")",je={type:"list",raw:q,ordered:ge,start:ge?+ae.slice(0,-1):"",loose:!1,items:[]},at=X[0].match(this.rules.block.item),ot=!1,Se,st,tt,Ye,mt,bt,gt,At=at.length,ht=0;ht<At;ht++)Se=at[ht],q=Se,st=Se.length,Se=Se.replace(/^ *([*+-]|\d+[.)]) */,""),~Se.indexOf(`
`)&&(st-=Se.length,Se=this.options.pedantic?Se.replace(/^ {1,4}/gm,""):Se.replace(new RegExp("^ {1,"+st+"}","gm"),"")),ht!==At-1&&(tt=this.rules.block.bullet.exec(at[ht+1])[0],(ge?tt.length===1||!we&&tt[tt.length-1]===")":tt.length>1||this.options.smartLists&&tt!==ae)&&(Ye=at.slice(ht+1).join(`
`),je.raw=je.raw.substring(0,je.raw.length-Ye.length),ht=At-1)),mt=ot||/\n\n(?!\s*$)/.test(Se),ht!==At-1&&(ot=Se.charAt(Se.length-1)===`
`,mt||(mt=ot)),mt&&(je.loose=!0),bt=/^\[[ xX]\] /.test(Se),gt=void 0,bt&&(gt=Se[1]!==" ",Se=Se.replace(/^\[[ xX]\] +/,"")),je.items.push({type:"list_item",raw:q,task:bt,checked:gt,loose:mt,text:Se});return je}},ee.html=function(V){var X=this.rules.block.html.exec(V);if(X)return{type:this.options.sanitize?"paragraph":"html",raw:X[0],pre:!this.options.sanitizer&&(X[1]==="pre"||X[1]==="script"||X[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(X[0]):Q(X[0]):X[0]}},ee.def=function(V){var X=this.rules.block.def.exec(V);if(X){X[3]&&(X[3]=X[3].substring(1,X[3].length-1));var q=X[1].toLowerCase().replace(/\s+/g," ");return{tag:q,raw:X[0],href:X[2],title:X[3]}}},ee.table=function(V){var X=this.rules.block.table.exec(V);if(X){var q={type:"table",header:G(X[1].replace(/^ *| *\| *$/g,"")),align:X[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:X[3]?X[3].replace(/\n$/,"").split(`
`):[]};if(q.header.length===q.align.length){q.raw=X[0];var ae=q.align.length,ge;for(ge=0;ge<ae;ge++)/^ *-+: *$/.test(q.align[ge])?q.align[ge]="right":/^ *:-+: *$/.test(q.align[ge])?q.align[ge]="center":/^ *:-+ *$/.test(q.align[ge])?q.align[ge]="left":q.align[ge]=null;for(ae=q.cells.length,ge=0;ge<ae;ge++)q.cells[ge]=G(q.cells[ge].replace(/^ *\| *| *\| *$/g,""),q.header.length);return q}}},ee.lheading=function(V){var X=this.rules.block.lheading.exec(V);if(X)return{type:"heading",raw:X[0],depth:X[2].charAt(0)==="="?1:2,text:X[1]}},ee.paragraph=function(V){var X=this.rules.block.paragraph.exec(V);if(X)return{type:"paragraph",raw:X[0],text:X[1].charAt(X[1].length-1)===`
`?X[1].slice(0,-1):X[1]}},ee.text=function(V,X){var q=this.rules.block.text.exec(V);if(q){var ae=X[X.length-1];return ae&&ae.type==="text"?{raw:q[0],text:q[0]}:{type:"text",raw:q[0],text:q[0]}}},ee.escape=function(V){var X=this.rules.inline.escape.exec(V);if(X)return{type:"escape",raw:X[0],text:Q(X[1])}},ee.tag=function(V,X,q){var ae=this.rules.inline.tag.exec(V);if(ae)return!X&&/^<a /i.test(ae[0])?X=!0:X&&/^<\/a>/i.test(ae[0])&&(X=!1),!q&&/^<(pre|code|kbd|script)(\s|>)/i.test(ae[0])?q=!0:q&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ae[0])&&(q=!1),{type:this.options.sanitize?"text":"html",raw:ae[0],inLink:X,inRawBlock:q,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ae[0]):Q(ae[0]):ae[0]}},ee.link=function(V){var X=this.rules.inline.link.exec(V);if(X){var q=re(X[2],"()");if(q>-1){var ae=X[0].indexOf("!")===0?5:4,ge=ae+X[1].length+q;X[2]=X[2].substring(0,q),X[0]=X[0].substring(0,ge).trim(),X[3]=""}var we=X[2],je="";if(this.options.pedantic){var at=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(we);at?(we=at[1],je=at[3]):je=""}else je=X[3]?X[3].slice(1,-1):"";we=we.trim().replace(/^<([\s\S]*)>$/,"$1");var ot=le(X,{href:we&&we.replace(this.rules.inline._escapes,"$1"),title:je&&je.replace(this.rules.inline._escapes,"$1")},X[0]);return ot}},ee.reflink=function(V,X){var q;if((q=this.rules.inline.reflink.exec(V))||(q=this.rules.inline.nolink.exec(V))){var ae=(q[2]||q[1]).replace(/\s+/g," ");if(ae=X[ae.toLowerCase()],!ae||!ae.href){var ge=q[0].charAt(0);return{type:"text",raw:ge,text:ge}}var we=le(q,ae,q[0]);return we}},ee.strong=function(V,X,q){q===void 0&&(q="");var ae=this.rules.inline.strong.start.exec(V);if(ae&&(!ae[1]||ae[1]&&(q===""||this.rules.inline.punctuation.exec(q)))){X=X.slice(-1*V.length);var ge=ae[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ge.lastIndex=0;for(var we;(ae=ge.exec(X))!=null;)if(we=this.rules.inline.strong.middle.exec(X.slice(0,ae.index+3)),we)return{type:"strong",raw:V.slice(0,we[0].length),text:V.slice(2,we[0].length-2)}}},ee.em=function(V,X,q){q===void 0&&(q="");var ae=this.rules.inline.em.start.exec(V);if(ae&&(!ae[1]||ae[1]&&(q===""||this.rules.inline.punctuation.exec(q)))){X=X.slice(-1*V.length);var ge=ae[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ge.lastIndex=0;for(var we;(ae=ge.exec(X))!=null;)if(we=this.rules.inline.em.middle.exec(X.slice(0,ae.index+2)),we)return{type:"em",raw:V.slice(0,we[0].length),text:V.slice(1,we[0].length-1)}}},ee.codespan=function(V){var X=this.rules.inline.code.exec(V);if(X){var q=X[2].replace(/\n/g," "),ae=/[^ ]/.test(q),ge=q.startsWith(" ")&&q.endsWith(" ");return ae&&ge&&(q=q.substring(1,q.length-1)),q=Q(q,!0),{type:"codespan",raw:X[0],text:q}}},ee.br=function(V){var X=this.rules.inline.br.exec(V);if(X)return{type:"br",raw:X[0]}},ee.del=function(V){var X=this.rules.inline.del.exec(V);if(X)return{type:"del",raw:X[0],text:X[1]}},ee.autolink=function(V,X){var q=this.rules.inline.autolink.exec(V);if(q){var ae,ge;return q[2]==="@"?(ae=Q(this.options.mangle?X(q[1]):q[1]),ge="mailto:"+ae):(ae=Q(q[1]),ge=ae),{type:"link",raw:q[0],text:ae,href:ge,tokens:[{type:"text",raw:ae,text:ae}]}}},ee.url=function(V,X){var q;if(q=this.rules.inline.url.exec(V)){var ae,ge;if(q[2]==="@")ae=Q(this.options.mangle?X(q[0]):q[0]),ge="mailto:"+ae;else{var we;do we=q[0],q[0]=this.rules.inline._backpedal.exec(q[0])[0];while(we!==q[0]);ae=Q(q[0]),q[1]==="www."?ge="http://"+ae:ge=ae}return{type:"link",raw:q[0],text:ae,href:ge,tokens:[{type:"text",raw:ae,text:ae}]}}},ee.inlineText=function(V,X,q){var ae=this.rules.inline.text.exec(V);if(ae){var ge;return X?ge=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ae[0]):Q(ae[0]):ae[0]:ge=Q(this.options.smartypants?q(ae[0]):ae[0]),{type:"text",raw:ae[0],text:ge}}},ce}(),ne=O.noopTest,Te=O.edit,Ae=O.merge,fe={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ne,table:ne,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};fe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,fe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,fe.def=Te(fe.def).replace("label",fe._label).replace("title",fe._title).getRegex(),fe.bullet=/(?:[*+-]|\d{1,9}[.)])/,fe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,fe.item=Te(fe.item,"gm").replace(/bull/g,fe.bullet).getRegex(),fe.list=Te(fe.list).replace(/bull/g,fe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+fe.def.source+")").getRegex(),fe._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",fe._comment=/<!--(?!-?>)[\s\S]*?-->/,fe.html=Te(fe.html,"i").replace("comment",fe._comment).replace("tag",fe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fe.paragraph=Te(fe._paragraph).replace("hr",fe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",fe._tag).getRegex(),fe.blockquote=Te(fe.blockquote).replace("paragraph",fe.paragraph).getRegex(),fe.normal=Ae({},fe),fe.gfm=Ae({},fe.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),fe.gfm.nptable=Te(fe.gfm.nptable).replace("hr",fe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",fe._tag).getRegex(),fe.gfm.table=Te(fe.gfm.table).replace("hr",fe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",fe._tag).getRegex(),fe.pedantic=Ae({},fe.normal,{html:Te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",fe._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ne,paragraph:Te(fe.normal._paragraph).replace("hr",fe.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",fe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var J={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ne,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ne,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};J._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",J.punctuation=Te(J.punctuation).replace(/punctuation/g,J._punctuation).getRegex(),J._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",J._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",J.em.start=Te(J.em.start).replace(/punctuation/g,J._punctuation).getRegex(),J.em.middle=Te(J.em.middle).replace(/punctuation/g,J._punctuation).replace(/overlapSkip/g,J._overlapSkip).getRegex(),J.em.endAst=Te(J.em.endAst,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.em.endUnd=Te(J.em.endUnd,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.strong.start=Te(J.strong.start).replace(/punctuation/g,J._punctuation).getRegex(),J.strong.middle=Te(J.strong.middle).replace(/punctuation/g,J._punctuation).replace(/blockSkip/g,J._blockSkip).getRegex(),J.strong.endAst=Te(J.strong.endAst,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.strong.endUnd=Te(J.strong.endUnd,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.blockSkip=Te(J._blockSkip,"g").getRegex(),J.overlapSkip=Te(J._overlapSkip,"g").getRegex(),J._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,J._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,J._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,J.autolink=Te(J.autolink).replace("scheme",J._scheme).replace("email",J._email).getRegex(),J._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,J.tag=Te(J.tag).replace("comment",fe._comment).replace("attribute",J._attribute).getRegex(),J._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,J._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,J._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,J.link=Te(J.link).replace("label",J._label).replace("href",J._href).replace("title",J._title).getRegex(),J.reflink=Te(J.reflink).replace("label",J._label).getRegex(),J.reflinkSearch=Te(J.reflinkSearch,"g").replace("reflink",J.reflink).replace("nolink",J.nolink).getRegex(),J.normal=Ae({},J),J.pedantic=Ae({},J.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",J._label).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",J._label).getRegex()}),J.gfm=Ae({},J.normal,{escape:Te(J.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),J.gfm.url=Te(J.gfm.url,"i").replace("email",J.gfm._extended_email).getRegex(),J.breaks=Ae({},J.gfm,{br:Te(J.br).replace("{2,}","*").getRegex(),text:Te(J.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Ie={block:fe,inline:J},it=H.defaults,et=Ie.block,Qe=Ie.inline;function nt(ce){return ce.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Me(ce){var ee="",te,V,X=ce.length;for(te=0;te<X;te++)V=ce.charCodeAt(te),Math.random()>.5&&(V="x"+V.toString(16)),ee+="&#"+V+";";return ee}var ze=function(){function ce(te){this.tokens=[],this.tokens.links=Object.create(null),this.options=te||it,this.options.tokenizer=this.options.tokenizer||new _e,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var V={block:et.normal,inline:Qe.normal};this.options.pedantic?(V.block=et.pedantic,V.inline=Qe.pedantic):this.options.gfm&&(V.block=et.gfm,this.options.breaks?V.inline=Qe.breaks:V.inline=Qe.gfm),this.tokenizer.rules=V}ce.lex=function(V,X){var q=new ce(X);return q.lex(V)};var ee=ce.prototype;return ee.lex=function(V){return V=V.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(V,this.tokens,!0),this.inline(this.tokens),this.tokens},ee.blockTokens=function(V,X,q){X===void 0&&(X=[]),q===void 0&&(q=!0),V=V.replace(/^ +$/gm,"");for(var ae,ge,we,je;V;){if(ae=this.tokenizer.space(V)){V=V.substring(ae.raw.length),ae.type&&X.push(ae);continue}if(ae=this.tokenizer.code(V,X)){V=V.substring(ae.raw.length),ae.type?X.push(ae):(je=X[X.length-1],je.raw+=`
`+ae.raw,je.text+=`
`+ae.text);continue}if(ae=this.tokenizer.fences(V)){V=V.substring(ae.raw.length),X.push(ae);continue}if(ae=this.tokenizer.heading(V)){V=V.substring(ae.raw.length),X.push(ae);continue}if(ae=this.tokenizer.nptable(V)){V=V.substring(ae.raw.length),X.push(ae);continue}if(ae=this.tokenizer.hr(V)){V=V.substring(ae.raw.length),X.push(ae);continue}if(ae=this.tokenizer.blockquote(V)){V=V.substring(ae.raw.length),ae.tokens=this.blockTokens(ae.text,[],q),X.push(ae);continue}if(ae=this.tokenizer.list(V)){for(V=V.substring(ae.raw.length),we=ae.items.length,ge=0;ge<we;ge++)ae.items[ge].tokens=this.blockTokens(ae.items[ge].text,[],!1);X.push(ae);continue}if(ae=this.tokenizer.html(V)){V=V.substring(ae.raw.length),X.push(ae);continue}if(q&&(ae=this.tokenizer.def(V))){V=V.substring(ae.raw.length),this.tokens.links[ae.tag]||(this.tokens.links[ae.tag]={href:ae.href,title:ae.title});continue}if(ae=this.tokenizer.table(V)){V=V.substring(ae.raw.length),X.push(ae);continue}if(ae=this.tokenizer.lheading(V)){V=V.substring(ae.raw.length),X.push(ae);continue}if(q&&(ae=this.tokenizer.paragraph(V))){V=V.substring(ae.raw.length),X.push(ae);continue}if(ae=this.tokenizer.text(V,X)){V=V.substring(ae.raw.length),ae.type?X.push(ae):(je=X[X.length-1],je.raw+=`
`+ae.raw,je.text+=`
`+ae.text);continue}if(V){var at="Infinite loop on byte: "+V.charCodeAt(0);if(this.options.silent){console.error(at);break}else throw new Error(at)}}return X},ee.inline=function(V){var X,q,ae,ge,we,je,at=V.length;for(X=0;X<at;X++){je=V[X];switch(je.type){case"paragraph":case"text":case"heading":{je.tokens=[],this.inlineTokens(je.text,je.tokens);break}case"table":{for(je.tokens={header:[],cells:[]},ge=je.header.length,q=0;q<ge;q++)je.tokens.header[q]=[],this.inlineTokens(je.header[q],je.tokens.header[q]);for(ge=je.cells.length,q=0;q<ge;q++)for(we=je.cells[q],je.tokens.cells[q]=[],ae=0;ae<we.length;ae++)je.tokens.cells[q][ae]=[],this.inlineTokens(we[ae],je.tokens.cells[q][ae]);break}case"blockquote":{this.inline(je.tokens);break}case"list":{for(ge=je.items.length,q=0;q<ge;q++)this.inline(je.items[q].tokens);break}}}return V},ee.inlineTokens=function(V,X,q,ae,ge){X===void 0&&(X=[]),q===void 0&&(q=!1),ae===void 0&&(ae=!1),ge===void 0&&(ge="");var we,je=V,at;if(this.tokens.links){var ot=Object.keys(this.tokens.links);if(ot.length>0)for(;(at=this.tokenizer.rules.inline.reflinkSearch.exec(je))!=null;)ot.includes(at[0].slice(at[0].lastIndexOf("[")+1,-1))&&(je=je.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+je.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(at=this.tokenizer.rules.inline.blockSkip.exec(je))!=null;)je=je.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+je.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;V;){if(we=this.tokenizer.escape(V)){V=V.substring(we.raw.length),X.push(we);continue}if(we=this.tokenizer.tag(V,q,ae)){V=V.substring(we.raw.length),q=we.inLink,ae=we.inRawBlock,X.push(we);continue}if(we=this.tokenizer.link(V)){V=V.substring(we.raw.length),we.type==="link"&&(we.tokens=this.inlineTokens(we.text,[],!0,ae)),X.push(we);continue}if(we=this.tokenizer.reflink(V,this.tokens.links)){V=V.substring(we.raw.length),we.type==="link"&&(we.tokens=this.inlineTokens(we.text,[],!0,ae)),X.push(we);continue}if(we=this.tokenizer.strong(V,je,ge)){V=V.substring(we.raw.length),we.tokens=this.inlineTokens(we.text,[],q,ae),X.push(we);continue}if(we=this.tokenizer.em(V,je,ge)){V=V.substring(we.raw.length),we.tokens=this.inlineTokens(we.text,[],q,ae),X.push(we);continue}if(we=this.tokenizer.codespan(V)){V=V.substring(we.raw.length),X.push(we);continue}if(we=this.tokenizer.br(V)){V=V.substring(we.raw.length),X.push(we);continue}if(we=this.tokenizer.del(V)){V=V.substring(we.raw.length),we.tokens=this.inlineTokens(we.text,[],q,ae),X.push(we);continue}if(we=this.tokenizer.autolink(V,Me)){V=V.substring(we.raw.length),X.push(we);continue}if(!q&&(we=this.tokenizer.url(V,Me))){V=V.substring(we.raw.length),X.push(we);continue}if(we=this.tokenizer.inlineText(V,ae,nt)){V=V.substring(we.raw.length),ge=we.raw.slice(-1),X.push(we);continue}if(V){var Se="Infinite loop on byte: "+V.charCodeAt(0);if(this.options.silent){console.error(Se);break}else throw new Error(Se)}}return X},L(ce,null,[{key:"rules",get:function(){return{block:et,inline:Qe}}}]),ce}(),Je=H.defaults,$e=O.cleanUrl,Xe=O.escape,Fe=function(){function ce(te){this.options=te||Je}var ee=ce.prototype;return ee.code=function(V,X,q){var ae=(X||"").match(/\S*/)[0];if(this.options.highlight){var ge=this.options.highlight(V,ae);ge!=null&&ge!==V&&(q=!0,V=ge)}return ae?'<pre><code class="'+this.options.langPrefix+Xe(ae,!0)+'">'+(q?V:Xe(V,!0))+`</code></pre>
`:"<pre><code>"+(q?V:Xe(V,!0))+`</code></pre>
`},ee.blockquote=function(V){return`<blockquote>
`+V+`</blockquote>
`},ee.html=function(V){return V},ee.heading=function(V,X,q,ae){return this.options.headerIds?"<h"+X+' id="'+this.options.headerPrefix+ae.slug(q)+'">'+V+"</h"+X+`>
`:"<h"+X+">"+V+"</h"+X+`>
`},ee.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},ee.list=function(V,X,q){var ae=X?"ol":"ul",ge=X&&q!==1?' start="'+q+'"':"";return"<"+ae+ge+`>
`+V+"</"+ae+`>
`},ee.listitem=function(V){return"<li>"+V+`</li>
`},ee.checkbox=function(V){return"<input "+(V?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ee.paragraph=function(V){return"<p>"+V+`</p>
`},ee.table=function(V,X){return X&&(X="<tbody>"+X+"</tbody>"),`<table>
<thead>
`+V+`</thead>
`+X+`</table>
`},ee.tablerow=function(V){return`<tr>
`+V+`</tr>
`},ee.tablecell=function(V,X){var q=X.header?"th":"td",ae=X.align?"<"+q+' align="'+X.align+'">':"<"+q+">";return ae+V+"</"+q+`>
`},ee.strong=function(V){return"<strong>"+V+"</strong>"},ee.em=function(V){return"<em>"+V+"</em>"},ee.codespan=function(V){return"<code>"+V+"</code>"},ee.br=function(){return this.options.xhtml?"<br/>":"<br>"},ee.del=function(V){return"<del>"+V+"</del>"},ee.link=function(V,X,q){if(V=$e(this.options.sanitize,this.options.baseUrl,V),V===null)return q;var ae='<a href="'+Xe(V)+'"';return X&&(ae+=' title="'+X+'"'),ae+=">"+q+"</a>",ae},ee.image=function(V,X,q){if(V=$e(this.options.sanitize,this.options.baseUrl,V),V===null)return q;var ae='<img src="'+V+'" alt="'+q+'"';return X&&(ae+=' title="'+X+'"'),ae+=this.options.xhtml?"/>":">",ae},ee.text=function(V){return V},ce}(),We=function(){function ce(){}var ee=ce.prototype;return ee.strong=function(V){return V},ee.em=function(V){return V},ee.codespan=function(V){return V},ee.del=function(V){return V},ee.html=function(V){return V},ee.text=function(V){return V},ee.link=function(V,X,q){return""+q},ee.image=function(V,X,q){return""+q},ee.br=function(){return""},ce}(),yt=function(){function ce(){this.seen={}}var ee=ce.prototype;return ee.slug=function(V){var X=V.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(X)){var q=X;do this.seen[q]++,X=q+"-"+this.seen[q];while(this.seen.hasOwnProperty(X))}return this.seen[X]=0,X},ce}(),ft=H.defaults,ut=O.unescape,rt=function(){function ce(te){this.options=te||ft,this.options.renderer=this.options.renderer||new Fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new We,this.slugger=new yt}ce.parse=function(V,X){var q=new ce(X);return q.parse(V)};var ee=ce.prototype;return ee.parse=function(V,X){X===void 0&&(X=!0);var q="",ae,ge,we,je,at,ot,Se,st,tt,Ye,mt,bt,gt,At,ht,vt,Ot,Pe,pt=V.length;for(ae=0;ae<pt;ae++){Ye=V[ae];switch(Ye.type){case"space":continue;case"hr":{q+=this.renderer.hr();continue}case"heading":{q+=this.renderer.heading(this.parseInline(Ye.tokens),Ye.depth,ut(this.parseInline(Ye.tokens,this.textRenderer)),this.slugger);continue}case"code":{q+=this.renderer.code(Ye.text,Ye.lang,Ye.escaped);continue}case"table":{for(st="",Se="",je=Ye.header.length,ge=0;ge<je;ge++)Se+=this.renderer.tablecell(this.parseInline(Ye.tokens.header[ge]),{header:!0,align:Ye.align[ge]});for(st+=this.renderer.tablerow(Se),tt="",je=Ye.cells.length,ge=0;ge<je;ge++){for(ot=Ye.tokens.cells[ge],Se="",at=ot.length,we=0;we<at;we++)Se+=this.renderer.tablecell(this.parseInline(ot[we]),{header:!1,align:Ye.align[we]});tt+=this.renderer.tablerow(Se)}q+=this.renderer.table(st,tt);continue}case"blockquote":{tt=this.parse(Ye.tokens),q+=this.renderer.blockquote(tt);continue}case"list":{for(mt=Ye.ordered,bt=Ye.start,gt=Ye.loose,je=Ye.items.length,tt="",ge=0;ge<je;ge++)ht=Ye.items[ge],vt=ht.checked,Ot=ht.task,At="",ht.task&&(Pe=this.renderer.checkbox(vt),gt?ht.tokens.length>0&&ht.tokens[0].type==="text"?(ht.tokens[0].text=Pe+" "+ht.tokens[0].text,ht.tokens[0].tokens&&ht.tokens[0].tokens.length>0&&ht.tokens[0].tokens[0].type==="text"&&(ht.tokens[0].tokens[0].text=Pe+" "+ht.tokens[0].tokens[0].text)):ht.tokens.unshift({type:"text",text:Pe}):At+=Pe),At+=this.parse(ht.tokens,gt),tt+=this.renderer.listitem(At,Ot,vt);q+=this.renderer.list(tt,mt,bt);continue}case"html":{q+=this.renderer.html(Ye.text);continue}case"paragraph":{q+=this.renderer.paragraph(this.parseInline(Ye.tokens));continue}case"text":{for(tt=Ye.tokens?this.parseInline(Ye.tokens):Ye.text;ae+1<pt&&V[ae+1].type==="text";)Ye=V[++ae],tt+=`
`+(Ye.tokens?this.parseInline(Ye.tokens):Ye.text);q+=X?this.renderer.paragraph(tt):tt;continue}default:{var St='Token with "'+Ye.type+'" type was not found.';if(this.options.silent){console.error(St);return}else throw new Error(St)}}}return q},ee.parseInline=function(V,X){X=X||this.renderer;var q="",ae,ge,we=V.length;for(ae=0;ae<we;ae++){ge=V[ae];switch(ge.type){case"escape":{q+=X.text(ge.text);break}case"html":{q+=X.html(ge.text);break}case"link":{q+=X.link(ge.href,ge.title,this.parseInline(ge.tokens,X));break}case"image":{q+=X.image(ge.href,ge.title,ge.text);break}case"strong":{q+=X.strong(this.parseInline(ge.tokens,X));break}case"em":{q+=X.em(this.parseInline(ge.tokens,X));break}case"codespan":{q+=X.codespan(ge.text);break}case"br":{q+=X.br();break}case"del":{q+=X.del(this.parseInline(ge.tokens,X));break}case"text":{q+=X.text(ge.text);break}default:{var je='Token with "'+ge.type+'" type was not found.';if(this.options.silent){console.error(je);return}else throw new Error(je)}}}return q},ce}(),Tt=O.merge,_t=O.checkSanitizeDeprecation,me=O.escape,xe=H.getDefaults,De=H.changeDefaults,ke=H.defaults;function be(ce,ee,te){if(typeof ce=="undefined"||ce===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ce!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ce)+", string expected");if(typeof ee=="function"&&(te=ee,ee=null),ee=Tt({},be.defaults,ee||{}),_t(ee),te){var V=ee.highlight,X;try{X=ze.lex(ce,ee)}catch(we){return te(we)}var q=function(je){var at;if(!je)try{at=rt.parse(X,ee)}catch(ot){je=ot}return ee.highlight=V,je?te(je):te(null,at)};if(!V||V.length<3)return q();if(delete ee.highlight,!X.length)return q();var ae=0;be.walkTokens(X,function(we){we.type==="code"&&(ae++,setTimeout(function(){V(we.text,we.lang,function(je,at){if(je)return q(je);at!=null&&at!==we.text&&(we.text=at,we.escaped=!0),ae--,ae===0&&q()})},0))}),ae===0&&q();return}try{var ge=ze.lex(ce,ee);return ee.walkTokens&&be.walkTokens(ge,ee.walkTokens),rt.parse(ge,ee)}catch(we){if(we.message+=`
Please report this to https://github.com/markedjs/marked.`,ee.silent)return"<p>An error occurred:</p><pre>"+me(we.message+"",!0)+"</pre>";throw we}}be.options=be.setOptions=function(ce){return Tt(be.defaults,ce),De(be.defaults),be},be.getDefaults=xe,be.defaults=ke,be.use=function(ce){var ee=Tt({},ce);if(ce.renderer&&function(){var V=be.defaults.renderer||new Fe,X=function(ge){var we=V[ge];V[ge]=function(){for(var je=arguments.length,at=new Array(je),ot=0;ot<je;ot++)at[ot]=arguments[ot];var Se=ce.renderer[ge].apply(V,at);return Se===!1&&(Se=we.apply(V,at)),Se}};for(var q in ce.renderer)X(q);ee.renderer=V}(),ce.tokenizer&&function(){var V=be.defaults.tokenizer||new _e,X=function(ge){var we=V[ge];V[ge]=function(){for(var je=arguments.length,at=new Array(je),ot=0;ot<je;ot++)at[ot]=arguments[ot];var Se=ce.tokenizer[ge].apply(V,at);return Se===!1&&(Se=we.apply(V,at)),Se}};for(var q in ce.tokenizer)X(q);ee.tokenizer=V}(),ce.walkTokens){var te=be.defaults.walkTokens;ee.walkTokens=function(V){ce.walkTokens(V),te&&te(V)}}be.setOptions(ee)},be.walkTokens=function(ce,ee){for(var te=C(ce),V;!(V=te()).done;){var X=V.value;ee(X);switch(X.type){case"table":{for(var q=C(X.tokens.header),ae;!(ae=q()).done;){var ge=ae.value;be.walkTokens(ge,ee)}for(var we=C(X.tokens.cells),je;!(je=we()).done;)for(var at=je.value,ot=C(at),Se;!(Se=ot()).done;){var st=Se.value;be.walkTokens(st,ee)}break}case"list":{be.walkTokens(X.items,ee);break}default:X.tokens&&be.walkTokens(X.tokens,ee)}}},be.Parser=rt,be.parser=rt.parse,be.Renderer=Fe,be.TextRenderer=We,be.Lexer=ze,be.lexer=ze.lex,be.Tokenizer=_e,be.Slugger=yt,be.parse=be;var Le=be;return Le})},FOrL:function(Ge,Re,F){Ge.exports=F.p+"static/nodata.a6b3f948.png"},IBYe:function(Ge,Re,F){"use strict";function ie(L){return null}Re.a=ie},JAbv:function(Ge,Re){Ge.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAA8CAYAAADogBFvAAAAAXNSR0IArs4c6QAADzxJREFUeF7tnQl4VcUVx3/3JSEBARFEFllcQAMJuKDUD7FqtVbFtUqtS6ufS1soxaW1Si0KBaFVWy2ittqqdQ9xpYq4tLgVFWUThYQlJIEkkJXs63u333lzL+/mrfeF9/KSeM/35Xv3zZw5c+bM/83MOTN3ouGQY4EuZAGtC+niqOJYAAeQDgi6lAU0fUayHqCR5gJXEriS/T6TICkZNOMzIN/gFx7/8vvLiFxDtpfP4G2Xb5Ej6SaPKddav6mPtb5g9e/PF9nSvmTVlpD1S36Sr63WOj1ukD/d+PR+b1NpAekmj5Gve8Dd5lc2ivK4G2lzV4K7Eo/8eSrQ3ZW424rw6J/ST1utTb2jtkuhLAplwgDS7BDj09txdgFqgsjCbwVOKMCYAPH+IAzABIDf8qPYz+OygMus0+8HFQDmYDpaypj1mp+m/qKbgMoKQO+zxwIyCzhNPhOIQQFrAas/uK3l5dlt/SEY9bbn0ZsrS1obynfXNJQXFTeUbPugua5utQZrM7PZHgU2EsIaHJAJUcWp1JYFklKgVx/fX0oqpPSBgw6BASOh/xAlxgC+u6WJqh0bqdi2nrb66gI0sjQXL2W8xHpb9XUykwPITjZ43KuTpcnBw2HA4TBwFBw81Dt66+42aoq2U7FjAw0Ve8R52KxpLB6v86KWjTvuetmswAGkTUN1W7aDBsHIieiHjkVDlhpuavbkU7ThE9wtjQL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dtcXD8TgM5gLRtaofRjgWa3LC9yl5M0jtK+p0GcgBpx8oOT1QWyKt209Aa2ds2hbpczM7Iwrvr4AAyKlM7zHYsEKVz0+5uIAeQdizs8Ni2gIyL8icxSbeNnZv9go0wkANI26Z2GKOxwJ56D+VRODdmGMgBZDRWdnhtW6C6WWeX/Zjk/jDQ/wHkSLPJ/mcrgQAAAABJRU5ErkJggg=="},KOXS:function(Ge,Re,F){Ge.exports={flex_box_center:"flex_box_center___4BHX-",flex_space_between:"flex_space_between___fH2oM",flex_box_vertical_center:"flex_box_vertical_center___TgSS9",flex_box_center_end:"flex_box_center_end___1vKaD",flex_box_column:"flex_box_column___1kCgI",input:"input___2mV-b",dropdown:"dropdown___1QKW2",menu:"menu___37CBn",text:"text___159fF",b1:"b1___2uGyF",b2:"b2___2DXw1"}},LdHM:function(Ge,Re,F){"use strict";F.d(Re,"b",function(){return i}),F.d(Re,"a",function(){return _});var ie=F("1OyB"),L=F("vuIU"),I=F("Ji7U"),j=F("LK+K"),C=F("cDcd"),w=F("rePB"),H=F("Ff2n"),U=F("ODXe"),R=F("4IlW"),S=F("bX4T"),y=F("YrtM"),v=F("TSYQ"),d=F.n(v),o=F("+nKL"),n=F("8OUc"),a=function(G,Q){var re=G.prefixCls,le=G.id,Ee=G.flattenOptions,_e=G.childrenAsData,ne=G.values,Te=G.searchValue,Ae=G.multiple,fe=G.defaultActiveFirstOption,J=G.height,Ie=G.itemHeight,it=G.notFoundContent,et=G.open,Qe=G.menuItemSelectedIcon,nt=G.virtual,Me=G.onSelect,ze=G.onToggleOpen,Je=G.onActiveValue,$e=G.onScroll,Xe=G.onMouseEnter,Fe="".concat(re,"-item"),We=Object(y.a)(function(){return Ee},[et,Ee],function(Le,ce){return ce[0]&&Le[1]!==ce[1]}),yt=C.useRef(null),ft=function(ce){ce.preventDefault()},ut=function(ce){yt.current&&yt.current.scrollTo({index:ce})},rt=function(ce){for(var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,te=We.length,V=0;V<te;V+=1){var X=(ce+V*ee+te)%te,q=We[X],ae=q.group,ge=q.data;if(!ae&&!ge.disabled)return X}return-1},Tt=C.useState(function(){return rt(0)}),_t=Object(U.a)(Tt,2),me=_t[0],xe=_t[1],De=function(ce){xe(ce);var ee=We[ce];if(!ee){Je(null,-1);return}Je(ee.data.value,ce)};C.useEffect(function(){De(fe!==!1?rt(0):-1)},[We.length,Te]),C.useEffect(function(){var Le=setTimeout(function(){if(!Ae&&et&&ne.size===1){var ce=Array.from(ne)[0],ee=We.findIndex(function(te){var V=te.data;return V.value===ce});De(ee),ut(ee)}});return function(){return clearTimeout(Le)}},[et]);var ke=function(ce){ce!==void 0&&Me(ce,{selected:!ne.has(ce)}),Ae||ze(!1)};if(C.useImperativeHandle(Q,function(){return{onKeyDown:function(ce){var ee=ce.which;switch(ee){case R.a.UP:case R.a.DOWN:{var te=0;if(ee===R.a.UP?te=-1:ee===R.a.DOWN&&(te=1),te!==0){var V=rt(me+te,te);ut(V),De(V)}break}case R.a.ENTER:{var X=We[me];X&&!X.data.disabled?ke(X.data.value):ke(void 0),et&&ce.preventDefault();break}case R.a.ESC:ze(!1)}},onKeyUp:function(){},scrollTo:function(ce){ut(ce)}}}),We.length===0)return C.createElement("div",{role:"listbox",id:"".concat(le,"_list"),className:"".concat(Fe,"-empty"),onMouseDown:ft},it);function be(Le){var ce=We[Le];if(!ce)return null;var ee=ce.data||{},te=ee.value,V=ee.label,X=ee.children,q=Object(S.a)(ee,!0),ae=_e?X:V;return ce?C.createElement("div",Object.assign({"aria-label":typeof ae=="string"?ae:null},q,{key:Le,role:"option",id:"".concat(le,"_list_").concat(Le),"aria-selected":ne.has(te)}),te):null}return C.createElement(C.Fragment,null,C.createElement("div",{role:"listbox",id:"".concat(le,"_list"),style:{height:0,width:0,overflow:"hidden"}},be(me-1),be(me),be(me+1)),C.createElement(o.a,{itemKey:"key",ref:yt,data:We,height:J,itemHeight:Ie,fullHeight:!1,onMouseDown:ft,onScroll:$e,virtual:nt,onMouseEnter:Xe},function(Le,ce){var ee,te=Le.group,V=Le.groupOption,X=Le.data,q=X.label,ae=X.key;if(te)return C.createElement("div",{className:d()(Fe,"".concat(Fe,"-group"))},q!==void 0?q:ae);var ge=X.disabled,we=X.value,je=X.title,at=X.children,ot=X.style,Se=X.className,st=Object(H.a)(X,["disabled","value","title","children","style","className"]),tt=ne.has(we),Ye="".concat(Fe,"-option"),mt=d()(Fe,Ye,Se,(ee={},Object(w.a)(ee,"".concat(Ye,"-grouped"),V),Object(w.a)(ee,"".concat(Ye,"-active"),me===ce&&!ge),Object(w.a)(ee,"".concat(Ye,"-disabled"),ge),Object(w.a)(ee,"".concat(Ye,"-selected"),tt),ee)),bt=_e?at:q,gt=!Qe||typeof Qe=="function"||tt;return C.createElement("div",Object.assign({},st,{"aria-selected":tt,className:mt,title:je,onMouseMove:function(){if(me===ce||ge)return;De(ce)},onClick:function(){ge||ke(we)},style:ot}),C.createElement("div",{className:"".concat(Ye,"-content")},bt||we),C.isValidElement(Qe)||tt,gt&&C.createElement(n.a,{className:"".concat(Fe,"-option-state"),customizeIcon:Qe,customizeIconProps:{isSelected:tt}},tt?"\u2713":null))}))},s=C.forwardRef(a);s.displayName="OptionList";var e=s,t=function(){return null};t.isSelectOption=!0;var i=t,T=function(){return null};T.isSelectOptGroup=!0;var _=T,m=F("VTBJ"),E=F("Zm9Q");function g(P){var G=P.key,Q=P.props,re=Q.children,le=Q.value,Ee=Object(H.a)(Q,["children","value"]);return Object(m.a)({key:G,value:le!==void 0?le:G,children:re},Ee)}function h(P){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(E.a)(P).map(function(Q,re){if(!C.isValidElement(Q)||!Q.type)return null;var le=Q.type.isSelectOptGroup,Ee=Q.key,_e=Q.props,ne=_e.children,Te=Object(H.a)(_e,["children"]);return G||!le?g(Q):Object(m.a)(Object(m.a)({key:"__RC_SELECT_GRP__".concat(Ee===null?re:Ee,"__"),label:Ee},Te),{},{options:h(ne)})}).filter(function(Q){return Q})}var u=F("2Qr1"),r=F("qNPg"),l=F("U8pU"),f=F("Kwbf"),c=F("WKfj");function x(P){var G=P.mode,Q=P.options,re=P.children,le=P.backfill,Ee=P.allowClear,_e=P.placeholder,ne=P.getInputElement,Te=P.showSearch,Ae=P.onSearch,fe=P.defaultOpen,J=P.autoFocus,Ie=P.labelInValue,it=P.value,et=P.inputValue,Qe=P.optionLabelProp,nt=G==="multiple"||G==="tags",Me=Te!==void 0?Te:nt||G==="combobox",ze=Q||h(re);if(Object(f.a)(G!=="tags"||ze.every(function(Fe){return!Fe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),G==="tags"||G==="combobox"){var Je=ze.some(function(Fe){return Fe.options?Fe.options.some(function(We){return typeof("value"in We?We.value:We.key)=="number"}):typeof("value"in Fe?Fe.value:Fe.key)=="number"});Object(f.a)(!Je,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(f.a)(G!=="combobox"||!Qe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(f.a)(G==="combobox"||!le,"`backfill` only works with `combobox` mode."),Object(f.a)(G==="combobox"||!ne,"`getInputElement` only work with `combobox` mode."),Object(f.b)(G!=="combobox"||!ne||!Ee||!_e,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ae&&!Me&&G!=="combobox"&&G!=="tags"&&Object(f.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(f.b)(!fe||J,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),it!=null){var $e=Object(c.d)(it);Object(f.a)(!Ie||$e.every(function(Fe){return Object(l.a)(Fe)==="object"&&("key"in Fe||"value"in Fe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(f.a)(!nt||Array.isArray(it),"`value` should be array when `mode` is `multiple` or `tags`")}if(re){var Xe=null;Object(E.a)(re).some(function(Fe){if(!C.isValidElement(Fe)||!Fe.type)return!1;var We=Fe.type;if(We.isSelectOption)return!1;if(We.isSelectOptGroup){var yt=Object(E.a)(Fe.props.children).every(function(ft){return!C.isValidElement(ft)||!Fe.type||ft.type.isSelectOption?!0:(Xe=ft.type,!1)});return!yt}return Xe=We,!0}),Xe&&Object(f.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Xe.displayName||Xe.name||Xe,"`.")),Object(f.a)(et===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var D=x,A=Object(r.a)({prefixCls:"rc-select",components:{optionList:e},convertChildrenToData:h,flattenOptions:u.d,getLabeledValue:u.e,filterOptions:u.b,isValueDisabled:u.g,findValueOption:u.c,warningProps:D,fillOptionsWithMissingValue:u.a}),B=function(P){Object(I.a)(Q,P);var G=Object(j.a)(Q);function Q(){var re;return Object(ie.a)(this,Q),re=G.apply(this,arguments),re.selectRef=C.createRef(),re.focus=function(){re.selectRef.current.focus()},re.blur=function(){re.selectRef.current.blur()},re}return Object(L.a)(Q,[{key:"render",value:function(){return C.createElement(A,Object.assign({ref:this.selectRef},this.props))}}]),Q}(C.Component);B.Option=i,B.OptGroup=_;var O=B,W=Re.c=O},MEgm:function(Ge,Re){Ge.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdB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/AzX70/fxN4ToYFL0XdBk3rJBThvy/rnzMhT62TNyahTpMtFhsO1OF9aEfsYgHKFTfoeVDh8PbuHANJCJj4ewC0QIGOQgEMvh6i+IKw609hIpxv8+mAWp0O0+ZftanLo0hOKRyUYrBl4aG5mvKOWo6ojtRY+72x+z3+Lz8egOhrofOxhXpUd8+h+tc9oS7g9EAF0EYvwJLNJc6n/qQOW3bb0SVS3XhTyYK5LjUL6vlUXJNSaLixlOrSnHZ55MeSaU5fE1pjrEilPNOiqkMtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},NQs2:function(Ge,Re,F){Ge.exports={flex_box_center:"flex_box_center___3K14R",flex_space_between:"flex_space_between___1KE7t",flex_box_vertical_center:"flex_box_vertical_center___3Yslx",flex_box_center_end:"flex_box_center_end___2RmV-",flex_box_column:"flex_box_column___3k3IQ",banner:"banner___3caau",content:"content___fxe_p",btns:"btns___Vv-WB"}},Nf5h:function(Ge,Re,F){"use strict";F.d(Re,"a",function(){return U}),F.d(Re,"h",function(){return n}),F.d(Re,"l",function(){return t}),F.d(Re,"e",function(){return g}),F.d(Re,"i",function(){return l}),F.d(Re,"j",function(){return fe}),F.d(Re,"c",function(){return $e}),F.d(Re,"b",function(){return ft}),F.d(Re,"g",function(){return _t}),F.d(Re,"f",function(){return ke}),F.d(Re,"k",function(){return ae}),F.d(Re,"d",function(){return at});var ie=F("cDcd"),L=F.n(ie),I=F("NQs2"),j=F.n(I),C=F("ygoZ"),w=F.n(C),H=function(Se){var st=Se.dataSource,tt=st===void 0?[]:st,Ye=Se.img,mt=Se.imgWidth,bt=mt===void 0?346:mt,gt=Se.title,At=Se.sunTitle,ht=Se.bannerExtraContent;return L.a.createElement("div",{className:j.a.banner},L.a.createElement("div",{className:j.a.content},L.a.createElement("aside",null,L.a.createElement("p",null,L.a.createElement("b",null,gt),L.a.createElement("span",null,At)),tt.length>0&&L.a.createElement("div",{className:j.a.btns},tt.map(function(vt,Ot){return L.a.createElement("div",{key:Ot,onClick:vt.click},vt.name,vt.sign?L.a.createElement("img",{src:w.a,width:39}):null)})),ht),L.a.createElement("img",{style:{marginTop:33,marginRight:38},src:Ye,width:bt})))},U=H,R=F("tJVT"),S=F("6nfa"),y=F.n(S),v=F("TSYQ"),d=F.n(v),o=function(Se){var st=Se.dataSource,tt=st===void 0?[]:st,Ye=Se.value,mt=Se.onChange,bt=Se.className,gt=Se.title,At=Se.titleWidth,ht=At===void 0?41:At,vt=Se.style,Ot=vt===void 0?{}:vt,Pe=Se.fontColor,pt=Pe===void 0?"#6A7283":Pe,St=Object(ie.useState)(0),Ct=Object(R.a)(St,2),Mt=Ct[0],xt=Ct[1],mn=Object(ie.useState)(!1),$t=Object(R.a)(mn,2),hn=$t[0],zt=$t[1],Bt=Object(ie.useRef)(null);return Object(ie.useEffect)(function(){if(tt.length!==0){var tn;(Bt==null||((tn=Bt.current)===null||tn===void 0)?void 0:tn.clientHeight)>92?xt(1):xt(0)}tt.length===0&&xt(0)},[tt]),L.a.createElement("div",{className:d()(y.a.row,bt),style:Ot},L.a.createElement("div",{style:{width:ht,marginTop:hn?12:4},className:y.a.title},gt),L.a.createElement("div",{className:hn?"".concat(y.a.tagsWrap," ").concat(y.a.tagsBorderWrap):y.a.tagsWrap},L.a.createElement("div",{className:y.a.bar,style:Mt>0?{height:Mt===1?92:"auto",overflow:Mt===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},L.a.createElement("div",{className:y.a.name,ref:Bt},tt==null?void 0:tt.map(function(tn){return L.a.createElement("span",{onClick:function(){return mt(tn.id)},key:tn.id,title:tn.name,style:{color:pt},className:Ye===tn.id?y.a.active:""},tn.name)}))),!!Mt&&L.a.createElement(ie.Fragment,null,Mt===1?L.a.createElement("div",{onClick:function(){var gn;xt(2),(Bt==null||((gn=Bt.current)===null||gn===void 0)?void 0:gn.clientHeight)>205?zt(!0):zt(!1)},className:y.a.action},"\u5C55\u5F00",L.a.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):L.a.createElement("div",{onClick:function(){xt(1),zt(!1)},className:y.a.action},"\u6536\u8D77",L.a.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},n=o,a=F("cz0n"),s=F.n(a),e=function(Se){var st=Se.dataSource,tt=st===void 0?[]:st,Ye=Se.value,mt=Se.onChange,bt=Se.className;return L.a.createElement("div",{className:d()(s.a.tabs,bt)},tt.map(function(gt){return L.a.createElement("span",{onClick:function(){return mt(gt.id)},className:Ye===gt.id?s.a.active:"",key:gt.id},gt.name)}))},t=e,i=F("5NDa"),T=F("5rEg"),_=F("KOXS"),m=F.n(_),E=function(Se){var st,tt=Se.dataSource,Ye=tt===void 0?[]:tt,mt=Se.value,bt=Se.onChange,gt=Se.className,At=Se.style,ht=At===void 0?{}:At,vt=Se.placeholder,Ot=Object(ie.useState)(""),Pe=Object(R.a)(Ot,2),pt=Pe[0],St=Pe[1],Ct=Object(ie.useState)(""),Mt=Object(R.a)(Ct,2),xt=Mt[0],mn=Mt[1];Object(ie.useEffect)(function(){var zt;(zt=JSON.stringify(mt))!==null&&zt!==void 0&&zt.includes("{")?(St(mt.id),mn(mt.value)):mn(mt)},[mt]);var $t=function(){bt(xt,pt||null)},hn=function(Bt){if(Bt===pt)return;St(Bt),bt(xt,Bt)};return L.a.createElement("div",{className:d()(m.a.input,gt),style:ht},!!Ye.length&&L.a.createElement("div",{className:m.a.dropdown},L.a.createElement("div",{className:m.a.text},(st=Ye.find(function(zt){return zt.id===pt}))===null||st===void 0?void 0:st.name,L.a.createElement("i",{className:"iconfont icon-zhankai4"}),L.a.createElement("b",{className:m.a.b1}),L.a.createElement("b",{className:m.a.b2})),L.a.createElement("div",{className:m.a.menu},Ye.map(function(zt,Bt){return L.a.createElement("div",{key:Bt,onClick:function(){return hn(zt.id)}},zt.name)}))),L.a.createElement(T.a,{onPressEnter:$t,value:xt,onChange:function(Bt){return mn(Bt.target.value)},bordered:!1,placeholder:vt}),L.a.createElement("i",{onClick:$t,className:"iconfont icon-sousuo9 font14 pl10 current"}))},g=E,h=F("f9pc"),u=F.n(h),r=function(Se){var st=Se.value,tt=Se.onChange,Ye=Se.className,mt=Se.total,bt=Se.pageSize,gt=Se.style,At=gt===void 0?{}:gt,ht=st<2,vt=st>=Math.ceil(mt/bt);return mt<=bt?L.a.createElement(L.a.Fragment,null):L.a.createElement("div",{className:d()(u.a.quickPager,Ye),style:At},L.a.createElement("div",{onClick:function(){ht||tt(st-1,"prev")},className:ht?u.a.disabled:""},"\u4E0A\u4E00\u9875"),L.a.createElement("div",{onClick:function(){vt||tt(st+1,"next")},className:vt?u.a.disabled:""},"\u4E0B\u4E00\u9875"))},l=r,f=F("T2oS"),c=F("W9HT"),x=F("pC0b"),D=F("GzdX"),A=F("5Dmo"),B=F("3S7+"),O=F("Oe0F"),W=F.n(O),P=F("m3rI"),G=F("1vsH"),Q=F("JAbv"),re=F.n(Q),le=F("Bq7L"),Ee=F.n(le),_e=F("MEgm"),ne=F.n(_e),Te=F("BdwD"),Ae=function(Se){var st=Se.className,tt=Se.dataSource,Ye=tt===void 0?[]:tt,mt=Se.col,bt=mt===void 0?4:mt,gt=Se.right,At=Se.bottom,ht=At===void 0?23:At,vt=Se.precision,Ot=vt===void 0?0:vt,Pe=Se.wrapWidth,pt=Pe===void 0?1200:Pe,St=Se.trackEventItems,Ct=Se.loading,Mt=Math.floor((pt-(bt-1)*gt)/bt);return L.a.createElement(c.a,{spinning:Ct},L.a.createElement("div",{className:d()(W.a.list,st)},!!Ye.length&&Ye.map(function(xt,mn){var $t=xt.name,hn=xt.id,zt=xt.identifier,Bt=xt.power,tn=xt.cover_image_id,gn=xt.pic;return L.a.createElement("div",{className:W.a.wrap,key:hn,style:{width:Mt,marginRight:(1+mn)%bt===0?0:gt+Ot,marginBottom:ht}},L.a.createElement("a",{target:"_blank",href:"/shixuns/".concat(zt,"/challenges"),className:W.a.li,onClick:function(Pn){Pn.preventDefault(),St&&Object(G.eb)([St]),Bt&&Object(G.U)("/shixuns/".concat(zt,"/challenges"))}},L.a.createElement("div",{className:W.a.img},L.a.createElement("img",{className:W.a.cover,src:tn?"".concat(P.a.API_SERVER,"/api/attachments/").concat(tn):"".concat(P.a.IMG_SERVER,"/").concat(gn)}),xt.is_jupyter&&L.a.createElement("img",{className:W.a.sign,src:re.a}),xt.is_jupyter_lab&&L.a.createElement("img",{className:W.a.sign,src:Ee.a}),xt.is_unity_3d&&L.a.createElement("img",{className:W.a.sign,src:ne.a})),L.a.createElement("div",{className:W.a.name},L.a.createElement(B.a,{title:$t||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},L.a.createElement("span",{className:W.a.e},$t||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),L.a.createElement("div",{className:W.a.tags},L.a.createElement(B.a,{placement:"bottom",title:"\u5173\u5361\u6570"},L.a.createElement("span",null,L.a.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr3"}),L.a.createElement("span",null,xt.challenges_count))),!!xt.myshixuns_count&&L.a.createElement(B.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},L.a.createElement("span",null,L.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),L.a.createElement("span",null,xt.myshixuns_count))),L.a.createElement(B.a,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},L.a.createElement("span",null,L.a.createElement("span",null,xt.level))),L.a.createElement("div",{className:W.a.rate},L.a.createElement(D.a,{allowHalf:!0,disabled:!0,defaultValue:xt.score_info}),L.a.createElement("span",null,"\xA0",xt.score_info?"".concat(xt.score_info,"\u5206"):"5\u5206")))),!Bt&&L.a.createElement("div",{className:W.a.lockWrap},L.a.createElement("img",{src:"".concat(P.a.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),L.a.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Ye.length&&L.a.createElement(Te.a,null)))},fe=Ae,J=F("ZJlW"),Ie=F.n(J),it=F("z4EP"),et=F.n(it),Qe=F("+GGh"),nt=F.n(Qe),Me=F("cFMs"),ze=F.n(Me),Je=function(Se){var st=Se.className,tt=Se.dataSource,Ye=tt===void 0?[]:tt,mt=Se.col,bt=mt===void 0?4:mt,gt=Se.right,At=Se.bottom,ht=At===void 0?23:At,vt=Se.precision,Ot=vt===void 0?0:vt,Pe=Se.wrapWidth,pt=Pe===void 0?1200:Pe,St=Se.trackEventItems,Ct=Se.loading,Mt=Math.floor((pt-(bt-1)*gt)/bt);return L.a.createElement(c.a,{spinning:Ct},L.a.createElement("div",{className:d()(Ie.a.list,st)},!!Ye.length&&Ye.map(function(xt,mn){var $t=xt.name,hn=xt.id,zt=xt.identifier,Bt=xt.featured,tn=xt.school_name,gn=xt.image_url,_n=xt.excellent;return L.a.createElement("div",{key:hn,className:Ie.a.wrap,style:{width:Mt,marginRight:(1+mn)%bt===0?0:gt+Ot,marginBottom:ht}},L.a.createElement("a",{target:"_blank",href:"/paths/".concat(zt),className:Ie.a.li,onClick:function(Wn){Wn.preventDefault(),St&&Object(G.eb)([St]),Object(G.U)("/paths/".concat(zt))}},L.a.createElement("div",{className:Ie.a.img},L.a.createElement("img",{className:Ie.a.cover,src:"".concat(P.a.IMG_SERVER,"/").concat(gn)}),Bt===1&&L.a.createElement("img",{className:Ie.a.sign,src:et.a}),Bt===2&&L.a.createElement("img",{className:Ie.a.sign,src:""}),Bt===3&&L.a.createElement("img",{className:Ie.a.sign,src:nt.a}),Bt===4&&L.a.createElement("img",{className:Ie.a.sign,src:""}),Bt===5&&L.a.createElement("img",{className:Ie.a.sign,src:ze.a})),L.a.createElement("div",{className:Ie.a.name},L.a.createElement(B.a,{title:$t},L.a.createElement("span",{className:Ie.a.e},$t))),L.a.createElement(B.a,{title:"\u53D1\u5E03\u5355\u4F4D\uFF1A".concat(tn)},L.a.createElement("div",{className:Ie.a.unit},L.a.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),tn)),L.a.createElement("div",{className:Ie.a.tags},L.a.createElement(B.a,{placement:"bottom",title:"\u7AE0\u8282\u6570"},L.a.createElement("span",null,L.a.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),L.a.createElement("span",null,xt.stages_count))),L.a.createElement(B.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},L.a.createElement("span",null,L.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),L.a.createElement("span",null,xt.members_count))),_n&&L.a.createElement("div",{className:Ie.a.tag},"\u5F00\u653E\u8BFE\u7A0B"))))}),!Ye.length&&L.a.createElement(Te.a,null)))},$e=Je,Xe=F("iL++"),Fe=F.n(Xe),We=F("xiVL"),yt=function(Se){var st=Se.className,tt=Se.dataSource,Ye=tt===void 0?[]:tt,mt=Se.col,bt=mt===void 0?4:mt,gt=Se.right,At=Se.bottom,ht=At===void 0?23:At,vt=Se.precision,Ot=vt===void 0?0:vt,Pe=Se.wrapWidth,pt=Pe===void 0?1200:Pe,St=Se.trackEventItems,Ct=Se.loading,Mt=Math.floor((pt-(bt-1)*gt)/bt);return L.a.createElement(c.a,{spinning:Ct},L.a.createElement("div",{className:d()(Fe.a.list,st)},!!Ye.length&&Ye.map(function(xt,mn){var $t=xt.subject_identifier,hn=xt.id,zt=xt.identifier,Bt=xt.power,tn=xt.is_public!=0&&xt.is_public;return L.a.createElement("div",{className:Fe.a.wrap,key:hn,style:{width:Mt,marginRight:(1+mn)%bt===0?0:gt+Ot,marginBottom:ht}},L.a.createElement("a",{className:Fe.a.li,onClick:function(_n){_n.preventDefault()}},L.a.createElement("div",{className:Fe.a.top},L.a.createElement(B.a,{title:xt.name},L.a.createElement("div",{className:Fe.a.name},xt.name)),L.a.createElement("img",{className:Fe.a.img,src:P.a.IMG_SERVER+"/images/"+xt.avatar_url}),L.a.createElement("div",{className:Fe.a.text},xt.creator),$t&&L.a.createElement("div",{className:Fe.a.btns},L.a.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),L.a.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),tn&&L.a.createElement("div",{className:Fe.a.sign},"\u516C\u5F00")),L.a.createElement("div",{className:Fe.a.bottom},xt.visits>0&&L.a.createElement(B.a,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},L.a.createElement("span",null,L.a.createElement("i",{className:"iconfont icon-liulanyan"}),L.a.createElement("span",null,xt.visits))),xt.course_members_count>0&&L.a.createElement(B.a,{title:"\u6210\u5458",placement:"bottom"},L.a.createElement("span",null,L.a.createElement("i",{className:"iconfont icon-chengyuan"}),xt.course_members_count)),xt.tasks_count>0&&L.a.createElement(B.a,{title:"\u4F5C\u4E1A",placement:"bottom"},L.a.createElement("span",null,L.a.createElement("i",{className:"iconfont icon-zuoye"}),xt.tasks_count)),xt.is_end?L.a.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):L.a.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),L.a.createElement("div",{className:Fe.a.lockWrap},xt.is_accessible?L.a.createElement(L.a.Fragment,null,$t&&L.a.createElement("div",{onClick:function(){return Object(G.U)("/paths/".concat($t))}},"\u8FDB\u5165\u5B9E\u8DF5\u8BFE\u7A0B"),L.a.createElement("div",{onClick:function(_n){St&&Object(G.eb)([St]),Object(G.U)(xt.first_category_url)}},"\u8FDB\u5165\u6559\u5B66\u8BFE\u5802")):L.a.createElement(L.a.Fragment,null,L.a.createElement("img",{src:"".concat(P.a.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),L.a.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165"))))}),!Ye.length&&L.a.createElement(Te.a,null)))},ft=yt,ut=F("f0W+"),rt=F.n(ut),Tt=function(Se){var st=Se.dataSource,tt=st===void 0?[]:st,Ye=Se.value,mt=Se.onChange,bt=Se.className,gt=Se.style,At=gt===void 0?{}:gt,ht=Se.tabBarExtraContent;return L.a.createElement("div",{className:d()(rt.a.tabs,bt),style:At},L.a.createElement("div",{className:rt.a.tabsWrap},tt.map(function(vt,Ot){return L.a.createElement("div",{onClick:function(){return mt(vt.id)},className:Ye===vt.id?rt.a.active:"",key:Ot},vt.name)})),L.a.createElement("div",{className:rt.a.tabBar},ht))},_t=Tt,me=F("9JIy"),xe=F.n(me),De=function(Se){var st=Se.className,tt=Se.style,Ye=tt===void 0?{}:tt,mt=Se.children;return L.a.createElement("div",{className:d()(xe.a.table,st),style:Ye},mt)},ke=De,be=F("qVdP"),Le=F("jsC+"),ce=F("lUTK"),ee=F("BvKs"),te=F("8WcF"),V=F.n(te),X=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}],q=function(Se){var st,tt=Se.sortValue,Ye=Se.dropValue,mt=Se.className,bt=Se.onSort,gt=Se.onDrop,At=Se.dataSource,ht=At===void 0?X:At;return L.a.createElement("div",{className:d()(V.a.orderWrap,mt)},L.a.createElement(Le.a,{overlay:L.a.createElement(ee.a,null,ht.map(function(vt,Ot){return L.a.createElement(ee.a.Item,{key:Ot,onClick:function(){return gt(vt.id)}},vt.name)}))},L.a.createElement("span",{className:V.a.orderTextWrap},(st=ht.find(function(vt){return Ye===vt.id}))===null||st===void 0?void 0:st.name)),L.a.createElement("span",{className:V.a.orderIconWrap},L.a.createElement("span",{className:V.a.orderAsc},L.a.createElement("i",{className:tt==="asc"?"iconfont icon-sanjiaoxing-up font12 ".concat(V.a.cursorPointer," ").concat(V.a.active):"iconfont icon-sanjiaoxing-up font12 ".concat(V.a.cursorPointer),onClick:function(){return bt(tt==="asc"?"desc":"asc")}})),L.a.createElement("span",{className:V.a.orderDesc},L.a.createElement("i",{className:tt==="desc"?"iconfont icon-sanjiaoxing-down font12 ".concat(V.a.cursorPointer," ").concat(V.a.active):"iconfont icon-sanjiaoxing-down font12 ".concat(V.a.cursorPointer),onClick:function(){return bt(tt==="asc"?"desc":"asc")}}))))},ae=q,ge=F("siWv"),we=F.n(ge),je=function(Se){var st=Se.className,tt=Se.style,Ye=Se.children,mt=Se.onClick;return L.a.createElement("div",{onClick:mt,className:d()(we.a.btn,st),style:tt},Ye)},at=je},NvD2:function(Ge,Re,F){"use strict";F.d(Re,"a",function(){return w});var ie=F("Kwbf");function L(H,U){var R=new Set;return H.forEach(function(S){U.has(S)||R.add(S)}),R}function I(H){var U=H||{},R=U.disabled,S=U.disableCheckbox,y=U.checkable;return!!(R||S)||y===!1}function j(H,U,R,S){for(var y=new Set(H),v=new Set,d=0;d<=R;d+=1){var o=U.get(d)||new Set;o.forEach(function(e){var t=e.key,i=e.node,T=e.children,_=T===void 0?[]:T;y.has(t)&&!S(i)&&_.filter(function(m){return!S(m.node)}).forEach(function(m){y.add(m.key)})})}for(var n=new Set,a=R;a>=0;a-=1){var s=U.get(a)||new Set;s.forEach(function(e){var t=e.parent,i=e.node;if(S(i)||!e.parent||n.has(e.parent.key))return;if(S(e.parent.node)){n.add(t.key);return}var T=!0,_=!1;(t.children||[]).filter(function(m){return!S(m.node)}).forEach(function(m){var E=m.key,g=y.has(E);T&&!g&&(T=!1),!_&&(g||v.has(E))&&(_=!0)}),T&&y.add(t.key),_&&v.add(t.key),n.add(t.key)})}return{checkedKeys:Array.from(y),halfCheckedKeys:Array.from(L(v,y))}}function C(H,U,R,S,y){for(var v=new Set(H),d=new Set(U),o=0;o<=S;o+=1){var n=R.get(o)||new Set;n.forEach(function(t){var i=t.key,T=t.node,_=t.children,m=_===void 0?[]:_;!v.has(i)&&!d.has(i)&&!y(T)&&m.filter(function(E){return!y(E.node)}).forEach(function(E){v.delete(E.key)})})}d=new Set;for(var a=new Set,s=S;s>=0;s-=1){var e=R.get(s)||new Set;e.forEach(function(t){var i=t.parent,T=t.node;if(y(T)||!t.parent||a.has(t.parent.key))return;if(y(t.parent.node)){a.add(i.key);return}var _=!0,m=!1;(i.children||[]).filter(function(E){return!y(E.node)}).forEach(function(E){var g=E.key,h=v.has(g);_&&!h&&(_=!1),!m&&(h||d.has(g))&&(m=!0)}),_||v.delete(i.key),m&&d.add(i.key),a.add(i.key)})}return{checkedKeys:Array.from(v),halfCheckedKeys:Array.from(L(d,v))}}function w(H,U,R,S){var y=[],v;S?v=S:v=I;var d=new Set(H.filter(function(s){var e=!!R[s];return e||y.push(s),e})),o=new Map,n=0;Object.keys(R).forEach(function(s){var e=R[s],t=e.level,i=o.get(t);i||(i=new Set,o.set(t,i)),i.add(e),n=Math.max(n,t)}),Object(ie.a)(!y.length,"Tree missing follow keys: ".concat(y.slice(0,100).map(function(s){return"'".concat(s,"'")}).join(", ")));var a;return U===!0?a=j(d,o,n,v):a=C(d,U.halfCheckedKeys,o,n,v),a}},OZM5:function(Ge,Re,F){"use strict";F.d(Re,"b",function(){return S}),F.d(Re,"a",function(){return y}),F.d(Re,"k",function(){return v}),F.d(Re,"h",function(){return d}),F.d(Re,"i",function(){return o}),F.d(Re,"g",function(){return n}),F.d(Re,"c",function(){return a}),F.d(Re,"d",function(){return s}),F.d(Re,"j",function(){return i}),F.d(Re,"e",function(){return T}),F.d(Re,"f",function(){return _});var ie=F("KQm4"),L=F("U8pU"),I=F("Ff2n"),j=F("cDcd"),C=F.n(j),w=F("Kwbf"),H=F("WaYH"),U=.25,R=2;function S(m,E){var g=m.slice(),h=g.indexOf(E);return h>=0&&g.splice(h,1),g}function y(m,E){var g=m.slice();return g.indexOf(E)===-1&&g.push(E),g}function v(m){return m.split("-")}function d(m,E){return"".concat(m,"-").concat(E)}function o(m){return m&&m.type&&m.type.isTreeNode}function n(m,E){var g=[m],h=E[m];function u(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];r.forEach(function(l){var f=l.key,c=l.children;g.push(f),u(c)})}return u(h.children),g}function a(m,E){var g=m.clientY,h=E.selectHandle.getBoundingClientRect(),u=h.top,r=h.bottom,l=h.height,f=Math.max(l*U,R);return g<=u+f?-1:g>=r-f?1:0}function s(m,E){if(!m)return;var g=E.multiple;return g?m.slice():m.length?[m[0]]:m}var e=function(E){return E};function t(m,E){if(!m)return[];var g=E||{},h=g.processProps,u=h===void 0?e:h,r=Array.isArray(m)?m:[m];return r.map(function(l){var f=l.children,c=Object(I.a)(l,["children"]),x=t(f,E);return C.a.createElement(H.a,Object.assign({},u(c)),x)})}function i(m){if(!m)return null;var E;if(Array.isArray(m))E={checkedKeys:m,halfCheckedKeys:void 0};else if(Object(L.a)(m)==="object")E={checkedKeys:m.checked||void 0,halfCheckedKeys:m.halfChecked||void 0};else return Object(w.a)(!1,"`checkedKeys` is not an array or an object"),null;return E}function T(m,E){var g=new Set;function h(u){if(g.has(u))return;var r=E[u];if(!r)return;g.add(u);var l=r.parent,f=r.node;if(f.disabled)return;l&&h(l.key)}return(m||[]).forEach(function(u){h(u)}),Object(ie.a)(g)}function _(m){var E={};return Object.keys(m).forEach(function(g){(g.startsWith("data-")||g.startsWith("aria-"))&&(E[g]=m[g])}),E}},Oe0F:function(Ge,Re,F){Ge.exports={flex_box_center:"flex_box_center___1lU21",flex_space_between:"flex_space_between___3CfJd",flex_box_vertical_center:"flex_box_vertical_center___20q2h",flex_box_center_end:"flex_box_center_end___1jeZT",flex_box_column:"flex_box_column___2EyZF",list:"list___3Kz8E",wrap:"wrap___12_X7",lockWrap:"lockWrap___9zL4z",li:"li___2bcH1",cover:"cover___1j6mq",img:"img___3itdG",sign:"sign___1Bm21",name:"name___3H1zU",e:"e___1W7k4",tags:"tags___G1tID",rate:"rate___aZiJa"}},"SA+Z":function(Ge,Re,F){var ie=F("wTVA"),L=F("EbDI"),I=F("ZhPi"),j=F("wkBT");function C(w){return ie(w)||L(w)||I(w)||j()}Ge.exports=C,Ge.exports.__esModule=!0,Ge.exports.default=Ge.exports},SJMd:function(Ge,Re){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var F,ie,L,I=!1,j,C;window.PR_SHOULD_USE_CONTINUATION=!0;var w,H;(function(){var U=window,R=["break,continue,do,else,for,if,return,while"],S=[R,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],y=[S,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],v=[y,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],d=[y,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],o=[y,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],n="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",a=[y,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",e=[R,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],t=[R,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],i=[R,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],T=[v,o,d,a,s,e,t,i],_=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,m="str",E="kwd",g="com",h="typ",u="lit",r="pun",l="pln",f="tag",c="dec",x="src",D="atn",A="atv",B="nocode",O="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function W(Me){for(var ze=0,Je=!1,$e=!1,Xe=0,Fe=Me.length;Xe<Fe;++Xe){var We=Me[Xe];if(We.ignoreCase)$e=!0;else if(/[a-z]/i.test(We.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Je=!0,$e=!1;break}}var yt={b:8,t:9,n:10,v:11,f:12,r:13};function ft(me){var xe=me.charCodeAt(0);if(xe!==92)return xe;var De=me.charAt(1);return xe=yt[De],xe||("0"<=De&&De<="7"?parseInt(me.substring(1),8):De==="u"||De==="x"?parseInt(me.substring(2),16):me.charCodeAt(1))}function ut(me){if(me<32)return(me<16?"\\x0":"\\x")+me.toString(16);var xe=String.fromCharCode(me);return xe==="\\"||xe==="-"||xe==="]"||xe==="^"?"\\"+xe:xe}function rt(me){var xe=me.substring(1,me.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),De=[],ke=xe[0]==="^",be=["["];ke&&be.push("^");for(var Le=ke?1:0,ce=xe.length;Le<ce;++Le){var ee=xe[Le];if(/\\[bdsw]/i.test(ee))be.push(ee);else{var te=ft(ee),V;Le+2<ce&&xe[Le+1]==="-"?(V=ft(xe[Le+2]),Le+=2):V=te,De.push([te,V]),V<65||te>122||(V<65||te>90||De.push([Math.max(65,te)|32,Math.min(V,90)|32]),V<97||te>122||De.push([Math.max(97,te)&~32,Math.min(V,122)&~32]))}}De.sort(function(ge,we){return ge[0]-we[0]||we[1]-ge[1]});for(var X=[],q=[],Le=0;Le<De.length;++Le){var ae=De[Le];ae[0]<=q[1]+1?q[1]=Math.max(q[1],ae[1]):X.push(q=ae)}for(var Le=0;Le<X.length;++Le){var ae=X[Le];be.push(ut(ae[0])),ae[1]>ae[0]&&(ae[1]+1>ae[0]&&be.push("-"),be.push(ut(ae[1])))}return be.push("]"),be.join("")}function Tt(me){for(var xe=me.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),De=xe.length,ke=[],be=0,Le=0;be<De;++be){var ce=xe[be];if(ce==="(")++Le;else if(ce.charAt(0)==="\\"){var ee=+ce.substring(1);ee&&(ee<=Le?ke[ee]=-1:xe[be]=ut(ee))}}for(var be=1;be<ke.length;++be)ke[be]===-1&&(ke[be]=++ze);for(var be=0,Le=0;be<De;++be){var ce=xe[be];if(ce==="(")++Le,ke[Le]||(xe[be]="(?:");else if(ce.charAt(0)==="\\"){var ee=+ce.substring(1);ee&&ee<=Le&&(xe[be]="\\"+ke[ee])}}for(var be=0;be<De;++be)xe[be]==="^"&&xe[be+1]!=="^"&&(xe[be]="");if(me.ignoreCase&&Je)for(var be=0;be<De;++be){var ce=xe[be],te=ce.charAt(0);ce.length>=2&&te==="["?xe[be]=rt(ce):te!=="\\"&&(xe[be]=ce.replace(/[a-zA-Z]/g,function(q){var ae=q.charCodeAt(0);return"["+String.fromCharCode(ae&~32,ae|32)+"]"}))}return xe.join("")}for(var _t=[],Xe=0,Fe=Me.length;Xe<Fe;++Xe){var We=Me[Xe];if(We.global||We.multiline)throw new Error(""+We);_t.push("(?:"+Tt(We)+")")}return new RegExp(_t.join("|"),$e?"gi":"g")}function P(Me,ze){var Je=/(?:^|\s)nocode(?:\s|$)/,$e=[],Xe=0,Fe=[],We=0;function yt(ft){var ut=ft.nodeType;if(ut==1){if(Je.test(ft.className))return;for(var rt=ft.firstChild;rt;rt=rt.nextSibling)yt(rt);var Tt=ft.nodeName.toLowerCase();(Tt==="br"||Tt==="li")&&($e[We]=`
`,Fe[We<<1]=Xe++,Fe[We++<<1|1]=ft)}else if(ut==3||ut==4){var _t=ft.nodeValue;_t.length&&(ze?_t=_t.replace(/\r\n?/g,`
`):_t=_t.replace(/[ \t\r\n]+/g," "),$e[We]=_t,Fe[We<<1]=Xe,Xe+=_t.length,Fe[We++<<1|1]=ft)}}return yt(Me),{sourceCode:$e.join("").replace(/\n$/,""),spans:Fe}}function G(Me,ze,Je,$e,Xe){if(!Je)return;var Fe={sourceNode:Me,pre:1,langExtension:null,numberLines:null,sourceCode:Je,spans:null,basePos:ze,decorations:null};$e(Fe),Xe.push.apply(Xe,Fe.decorations)}var Q=/\S/;function re(Me){for(var ze=void 0,Je=Me.firstChild;Je;Je=Je.nextSibling){var $e=Je.nodeType;ze=$e===1?ze?Me:Je:$e===3&&Q.test(Je.nodeValue)?Me:ze}return ze===Me?void 0:ze}function le(Me,ze){var Je={},$e;(function(){for(var We=Me.concat(ze),yt=[],ft={},ut=0,rt=We.length;ut<rt;++ut){var Tt=We[ut],_t=Tt[3];if(_t)for(var me=_t.length;--me>=0;)Je[_t.charAt(me)]=Tt;var xe=Tt[1],De=""+xe;ft.hasOwnProperty(De)||(yt.push(xe),ft[De]=null)}yt.push(/[\0-\uffff]/),$e=W(yt)})();var Xe=ze.length,Fe=function(We){for(var yt=We.sourceCode,ft=We.basePos,ut=We.sourceNode,rt=[ft,l],Tt=0,_t=yt.match($e)||[],me={},xe=0,De=_t.length;xe<De;++xe){var ke=_t[xe],be=me[ke],Le=void 0,ce;if(typeof be=="string")ce=!1;else{var ee=Je[ke.charAt(0)];if(ee)Le=ke.match(ee[1]),be=ee[0];else{for(var te=0;te<Xe;++te)if(ee=ze[te],Le=ke.match(ee[1]),Le){be=ee[0];break}Le||(be=l)}ce=be.length>=5&&be.substring(0,5)==="lang-",ce&&!(Le&&typeof Le[1]=="string")&&(ce=!1,be=x),ce||(me[ke]=be)}var V=Tt;if(Tt+=ke.length,!ce)rt.push(ft+V,be);else{var X=Le[1],q=ke.indexOf(X),ae=q+X.length;Le[2]&&(ae=ke.length-Le[2].length,q=ae-X.length);var ge=be.substring(5);G(ut,ft+V,ke.substring(0,q),Fe,rt),G(ut,ft+V+q,X,J(ge,X),rt),G(ut,ft+V+ae,ke.substring(ae),Fe,rt)}}We.decorations=rt};return Fe}function Ee(Me){var ze=[],Je=[];Me.tripleQuotedStrings?ze.push([m,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Me.multiLineStrings?ze.push([m,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ze.push([m,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Me.verbatimStrings&&Je.push([m,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $e=Me.hashComments;$e&&(Me.cStyleComments?($e>1?ze.push([g,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ze.push([g,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Je.push([m,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ze.push([g,/^#[^\r\n]*/,null,"#"])),Me.cStyleComments&&(Je.push([g,/^\/\/[^\r\n]*/,null]),Je.push([g,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Xe=Me.regexLiterals;if(Xe){var Fe=Xe>1?"":`
\r`,We=Fe?".":"[\\S\\s]",yt="/(?=[^/*"+Fe+"])(?:[^/\\x5B\\x5C"+Fe+"]|\\x5C"+We+"|\\x5B(?:[^\\x5C\\x5D"+Fe+"]|\\x5C"+We+")*(?:\\x5D|$))+/";Je.push(["lang-regex",RegExp("^"+O+"("+yt+")")])}var ft=Me.types;ft&&Je.push([h,ft]);var ut=(""+Me.keywords).replace(/^ | $/g,"");ut.length&&Je.push([E,new RegExp("^(?:"+ut.replace(/[\s,]+/g,"|")+")\\b"),null]),ze.push([l,/^\s+/,null,` \r
\xA0`]);var rt="^.[^\\s\\w.$@'\"`/\\\\]*";return Me.regexLiterals&&(rt+="(?!s*/)"),Je.push([u,/^@[a-z_$][a-z_$@0-9]*/i,null],[h,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[l,/^[a-z_$][a-z_$@0-9]*/i,null],[u,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[l,/^\\[\s\S]?/,null],[r,new RegExp(rt),null]),le(ze,Je)}var _e=Ee({keywords:T,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ne(Me,ze,Je){for(var $e=/(?:^|\s)nocode(?:\s|$)/,Xe=/\r\n?|\n/,Fe=Me.ownerDocument,We=Fe.createElement("li");Me.firstChild;)We.appendChild(Me.firstChild);var yt=[We];function ft(xe){var De=xe.nodeType;if(De==1&&!$e.test(xe.className))if(xe.nodeName==="br")ut(xe),xe.parentNode&&xe.parentNode.removeChild(xe);else for(var ke=xe.firstChild;ke;ke=ke.nextSibling)ft(ke);else if((De==3||De==4)&&Je){var be=xe.nodeValue,Le=be.match(Xe);if(Le){var ce=be.substring(0,Le.index);xe.nodeValue=ce;var ee=be.substring(Le.index+Le[0].length);if(ee){var te=xe.parentNode;te.insertBefore(Fe.createTextNode(ee),xe.nextSibling)}ut(xe),ce||xe.parentNode.removeChild(xe)}}}function ut(xe){for(;!xe.nextSibling;)if(xe=xe.parentNode,!xe)return;function De(Le,ce){var ee=ce?Le.cloneNode(!1):Le,te=Le.parentNode;if(te){var V=De(te,1),X=Le.nextSibling;V.appendChild(ee);for(var q=X;q;q=X)X=q.nextSibling,V.appendChild(q)}return ee}for(var ke=De(xe.nextSibling,0),be;(be=ke.parentNode)&&be.nodeType===1;)ke=be;yt.push(ke)}for(var rt=0;rt<yt.length;++rt)ft(yt[rt]);ze===(ze|0)&&yt[0].setAttribute("value",ze);var Tt=Fe.createElement("ol");Tt.className="linenums";for(var _t=Math.max(0,ze-1|0)||0,rt=0,me=yt.length;rt<me;++rt)We=yt[rt],We.className="L"+(rt+_t)%10,We.firstChild||We.appendChild(Fe.createTextNode("\xA0")),Tt.appendChild(We);Me.appendChild(Tt)}function Te(Me){var ze=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ze=ze&&+ze[1]<=8;var Je=/\n/g,$e=Me.sourceCode,Xe=$e.length,Fe=0,We=Me.spans,yt=We.length,ft=0,ut=Me.decorations,rt=ut.length,Tt=0;ut[rt]=Xe;var _t,me;for(me=_t=0;me<rt;)ut[me]!==ut[me+2]?(ut[_t++]=ut[me++],ut[_t++]=ut[me++]):me+=2;for(rt=_t,me=_t=0;me<rt;){for(var xe=ut[me],De=ut[me+1],ke=me+2;ke+2<=rt&&ut[ke+1]===De;)ke+=2;ut[_t++]=xe,ut[_t++]=De,me=ke}rt=ut.length=_t;var be=Me.sourceNode,Le="";be&&(Le=be.style.display,be.style.display="none");try{for(var ce=null;ft<yt;){var ee=We[ft],te=We[ft+2]||Xe,V=ut[Tt+2]||Xe,ke=Math.min(te,V),X=We[ft+1],q;if(X.nodeType!==1&&(q=$e.substring(Fe,ke))){ze&&(q=q.replace(Je,"\r")),X.nodeValue=q;var ae=X.ownerDocument,ge=ae.createElement("span");ge.className=ut[Tt+1];var we=X.parentNode;we.replaceChild(ge,X),ge.appendChild(X),Fe<te&&(We[ft+1]=X=ae.createTextNode($e.substring(ke,te)),we.insertBefore(X,ge.nextSibling))}Fe=ke,Fe>=te&&(ft+=2),Fe>=V&&(Tt+=2)}}finally{be&&(be.style.display=Le)}}var Ae={};function fe(Me,ze){for(var Je=ze.length;--Je>=0;){var $e=ze[Je];Ae.hasOwnProperty($e)?U.console&&console.warn("cannot override language handler %s",$e):Ae[$e]=Me}}function J(Me,ze){return Me&&Ae.hasOwnProperty(Me)||(Me=/^\s*</.test(ze)?"default-markup":"default-code"),Ae[Me]}fe(_e,["default-code"]),fe(le([],[[l,/^[^<?]+/],[c,/^<!\w[^>]*(?:>|$)/],[g,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[r,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),fe(le([[l,/^[\s]+/,null,` \r
`],[A,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[f,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[D,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[r,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),fe(le([],[[A,/^[\s\S]+/]]),["uq.val"]),fe(Ee({keywords:v,hashComments:!0,cStyleComments:!0,types:_}),["c","cc","cpp","cxx","cyc","m"]),fe(Ee({keywords:"null,true,false"}),["json"]),fe(Ee({keywords:o,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:_}),["cs"]),fe(Ee({keywords:d,cStyleComments:!0}),["java"]),fe(Ee({keywords:i,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),fe(Ee({keywords:e,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),fe(Ee({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),fe(Ee({keywords:t,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),fe(Ee({keywords:a,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),fe(Ee({keywords:n,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),fe(le([],[[m,/^[\s\S]+/]]),["regex"]);function Ie(Me){var ze=Me.langExtension;try{var Je=P(Me.sourceNode,Me.pre),$e=Je.sourceCode;Me.sourceCode=$e,Me.spans=Je.spans,Me.basePos=0,J(ze,$e)(Me),Te(Me)}catch(Xe){U.console&&console.log(Xe&&Xe.stack||Xe)}}function it(Me,ze,Je){var $e=Je||!1,Xe=ze||null,Fe=document.createElement("div");Fe.innerHTML="<pre>"+Me+"</pre>",Fe=Fe.firstChild,$e&&ne(Fe,$e,!0);var We={langExtension:Xe,numberLines:$e,sourceNode:Fe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Ie(We),Fe.innerHTML}function et(Me,ze){var Je=ze||document.body,$e=Je.ownerDocument||document;function Xe(ee){return Je.getElementsByTagName(ee)}for(var Fe=[Xe("pre"),Xe("code"),Xe("xmp")],We=[],yt=0;yt<Fe.length;++yt)for(var ft=0,ut=Fe[yt].length;ft<ut;++ft)We.push(Fe[yt][ft]);Fe=null;var rt=Date;rt.now||(rt={now:function(){return+new Date}});var Tt=0,_t=/\blang(?:uage)?-([\w.]+)(?!\S)/,me=/\bprettyprint\b/,xe=/\bprettyprinted\b/,De=/pre|xmp/i,ke=/^code$/i,be=/^(?:pre|code|xmp)$/i,Le={};function ce(){for(var ee=U.PR_SHOULD_USE_CONTINUATION?rt.now()+250:Infinity;Tt<We.length&&rt.now()<ee;Tt++){for(var te=We[Tt],V=Le,X=te;X=X.previousSibling;){var q=X.nodeType,ae=(q===7||q===8)&&X.nodeValue;if(ae?!/^\??prettify\b/.test(ae):q!==3||/\S/.test(X.nodeValue))break;if(ae){V={},ae.replace(/\b(\w+)=([\w:.%+-]+)/g,function(At,ht,vt){V[ht]=vt});break}}var ge=te.className;if((V!==Le||me.test(ge))&&!xe.test(ge)){for(var we=!1,je=te.parentNode;je;je=je.parentNode){var at=je.tagName;if(be.test(at)&&je.className&&me.test(je.className)){we=!0;break}}if(!we){te.className+=" prettyprinted";var ot=V.lang;if(!ot){ot=ge.match(_t);var Se;!ot&&(Se=re(te))&&ke.test(Se.tagName)&&(ot=Se.className.match(_t)),ot&&(ot=ot[1])}var st;if(De.test(te.tagName))st=1;else{var tt=te.currentStyle,Ye=$e.defaultView,mt=tt?tt.whiteSpace:Ye&&Ye.getComputedStyle?Ye.getComputedStyle(te,null).getPropertyValue("white-space"):0;st=mt&&mt.substring(0,3)==="pre"}var bt=V.linenums;(bt=bt==="true"||+bt)||(bt=ge.match(/\blinenums\b(?::(\d+))?/),bt=bt?bt[1]&&bt[1].length?+bt[1]:!0:!1),bt&&ne(te,bt,st);var gt={langExtension:ot,sourceNode:te,numberLines:bt,pre:st,sourceCode:null,basePos:null,spans:null,decorations:null};Ie(gt)}}}Tt<We.length?U.setTimeout(ce,250):typeof Me=="function"&&Me()}ce()}var Qe=U.PR={createSimpleLexer:le,registerLangHandler:fe,sourceDecorator:Ee,PR_ATTRIB_NAME:D,PR_ATTRIB_VALUE:A,PR_COMMENT:g,PR_DECLARATION:c,PR_KEYWORD:E,PR_LITERAL:u,PR_NOCODE:B,PR_PLAIN:l,PR_PUNCTUATION:r,PR_SOURCE:x,PR_STRING:m,PR_TAG:f,PR_TYPE:h,prettyPrintOne:I?U.prettyPrintOne=it:w=it,prettyPrint:H=I?U.prettyPrint=et:H=et},nt=U.define;typeof nt=="function"&&nt.amd&&nt("google-code-prettify",[],function(){return Qe})})()},TXwP:function(Ge,Re,F){var ie,L;(function(){var I;(function(){"use strict";var C=[,,function(R){function S(d){this.__parent=d,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}S.prototype.clone_empty=function(){var d=new S(this.__parent);return d.set_indent(this.__indent_count,this.__alignment_count),d},S.prototype.item=function(d){return d<0?this.__items[this.__items.length+d]:this.__items[d]},S.prototype.has_match=function(d){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(d))return!0;return!1},S.prototype.set_indent=function(d,o){this.is_empty()&&(this.__indent_count=d||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},S.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},S.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},S.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var d=this.__parent.current_line;return d.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),d.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),d.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,d.__items[0]===" "&&(d.__items.splice(0,1),d.__character_count-=1),!0}return!1},S.prototype.is_empty=function(){return this.__items.length===0},S.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},S.prototype.push=function(d){this.__items.push(d);var o=d.lastIndexOf(`
`);o!==-1?this.__character_count=d.length-o:this.__character_count+=d.length},S.prototype.pop=function(){var d=null;return this.is_empty()||(d=this.__items.pop(),this.__character_count-=d.length),d},S.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},S.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},S.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},S.prototype.toString=function(){var d="";return this.is_empty()?this.__parent.indent_empty_lines&&(d=this.__parent.get_indent_string(this.__indent_count)):(d=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),d+=this.__items.join("")),d};function y(d,o){this.__cache=[""],this.__indent_size=d.indent_size,this.__indent_string=d.indent_char,d.indent_with_tabs||(this.__indent_string=new Array(d.indent_size+1).join(d.indent_char)),o=o||"",d.indent_level>0&&(o=new Array(d.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}y.prototype.get_indent_size=function(d,o){var n=this.__base_string_length;return o=o||0,d<0&&(n=0),n+=d*this.__indent_size,n+=o,n},y.prototype.get_indent_string=function(d,o){var n=this.__base_string;return o=o||0,d<0&&(d=0,n=""),o+=d*this.__indent_size,this.__ensure_cache(o),n+=this.__cache[o],n},y.prototype.__ensure_cache=function(d){for(;d>=this.__cache.length;)this.__add_column()},y.prototype.__add_column=function(){var d=this.__cache.length,o=0,n="";this.__indent_size&&d>=this.__indent_size&&(o=Math.floor(d/this.__indent_size),d-=o*this.__indent_size,n=new Array(o+1).join(this.__indent_string)),d&&(n+=new Array(d+1).join(" ")),this.__cache.push(n)};function v(d,o){this.__indent_cache=new y(d,o),this.raw=!1,this._end_with_newline=d.end_with_newline,this.indent_size=d.indent_size,this.wrap_line_length=d.wrap_line_length,this.indent_empty_lines=d.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new S(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}v.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},v.prototype.get_line_number=function(){return this.__lines.length},v.prototype.get_indent_string=function(d,o){return this.__indent_cache.get_indent_string(d,o)},v.prototype.get_indent_size=function(d,o){return this.__indent_cache.get_indent_size(d,o)},v.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},v.prototype.add_new_line=function(d){return this.is_empty()||!d&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},v.prototype.get_code=function(d){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===`
`&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join(`
`);return d!==`
`&&(n=n.replace(/[\n]/g,d)),n},v.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},v.prototype.set_indent=function(d,o){return d=d||0,o=o||0,this.next_line.set_indent(d,o),this.__lines.length>1?(this.current_line.set_indent(d,o),!0):(this.current_line.set_indent(),!1)},v.prototype.add_raw_token=function(d){for(var o=0;o<d.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(d.whitespace_before),this.current_line.push(d.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},v.prototype.add_token=function(d){this.__add_space_before_token(),this.current_line.push(d),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},v.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},v.prototype.remove_indent=function(d){for(var o=this.__lines.length;d<o;)this.__lines[d]._remove_indent(),d++;this.current_line._remove_wrap_indent()},v.prototype.trim=function(d){for(d=d===void 0?!1:d,this.current_line.trim();d&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},v.prototype.just_added_newline=function(){return this.current_line.is_empty()},v.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},v.prototype.ensure_empty_line_above=function(d,o){for(var n=this.__lines.length-2;n>=0;){var a=this.__lines[n];if(a.is_empty())break;if(a.item(0).indexOf(d)!==0&&a.item(-1)!==o){this.__lines.splice(n+1,0,new S(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},R.exports.Output=v},,,,function(R){function S(d,o){this.raw_options=y(d,o),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}S.prototype._get_array=function(d,o){var n=this.raw_options[d],a=o||[];return typeof n=="object"?n!==null&&typeof n.concat=="function"&&(a=n.concat()):typeof n=="string"&&(a=n.split(/[^a-zA-Z0-9_\/\-]+/)),a},S.prototype._get_boolean=function(d,o){var n=this.raw_options[d],a=n===void 0?!!o:!!n;return a},S.prototype._get_characters=function(d,o){var n=this.raw_options[d],a=o||"";return typeof n=="string"&&(a=n.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),a},S.prototype._get_number=function(d,o){var n=this.raw_options[d];o=parseInt(o,10),isNaN(o)&&(o=0);var a=parseInt(n,10);return isNaN(a)&&(a=o),a},S.prototype._get_selection=function(d,o,n){var a=this._get_selection_list(d,o,n);if(a.length!==1)throw new Error("Invalid Option Value: The option '"+d+`' can only be one of the following values:
`+o+`
You passed in: '`+this.raw_options[d]+"'");return a[0]},S.prototype._get_selection_list=function(d,o,n){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(n=n||[o[0]],!this._is_valid_selection(n,o))throw new Error("Invalid Default Value!");var a=this._get_array(d,n);if(!this._is_valid_selection(a,o))throw new Error("Invalid Option Value: The option '"+d+`' can contain only the following values:
`+o+`
You passed in: '`+this.raw_options[d]+"'");return a},S.prototype._is_valid_selection=function(d,o){return d.length&&o.length&&!d.some(function(n){return o.indexOf(n)===-1})};function y(d,o){var n={};d=v(d);var a;for(a in d)a!==o&&(n[a]=d[a]);if(o&&d[o])for(a in d[o])n[a]=d[o][a];return n}function v(d){var o={},n;for(n in d){var a=n.replace(/-/g,"_");o[a]=d[n]}return o}R.exports.Options=S,R.exports.normalizeOpts=v,R.exports.mergeOpts=y},,function(R){var S=RegExp.prototype.hasOwnProperty("sticky");function y(v){this.__input=v||"",this.__input_length=this.__input.length,this.__position=0}y.prototype.restart=function(){this.__position=0},y.prototype.back=function(){this.__position>0&&(this.__position-=1)},y.prototype.hasNext=function(){return this.__position<this.__input_length},y.prototype.next=function(){var v=null;return this.hasNext()&&(v=this.__input.charAt(this.__position),this.__position+=1),v},y.prototype.peek=function(v){var d=null;return v=v||0,v+=this.__position,v>=0&&v<this.__input_length&&(d=this.__input.charAt(v)),d},y.prototype.__match=function(v,d){v.lastIndex=d;var o=v.exec(this.__input);return o&&!(S&&v.sticky)&&(o.index!==d&&(o=null)),o},y.prototype.test=function(v,d){return d=d||0,d+=this.__position,d>=0&&d<this.__input_length?!!this.__match(v,d):!1},y.prototype.testChar=function(v,d){var o=this.peek(d);return v.lastIndex=0,o!==null&&v.test(o)},y.prototype.match=function(v){var d=this.__match(v,this.__position);return d?this.__position+=d[0].length:d=null,d},y.prototype.read=function(v,d,o){var n="",a;return v&&(a=this.match(v),a&&(n+=a[0])),d&&(a||!v)&&(n+=this.readUntil(d,o)),n},y.prototype.readUntil=function(v,d){var o="",n=this.__position;v.lastIndex=this.__position;var a=v.exec(this.__input);return a?(n=a.index,d&&(n+=a[0].length)):n=this.__input_length,o=this.__input.substring(this.__position,n),this.__position=n,o},y.prototype.readUntilAfter=function(v){return this.readUntil(v,!0)},y.prototype.get_regexp=function(v,d){var o=null,n="g";return d&&S&&(n="y"),typeof v=="string"&&v!==""?o=new RegExp(v,n):v&&(o=new RegExp(v.source,n)),o},y.prototype.get_literal_regexp=function(v){return RegExp(v.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},y.prototype.peekUntilAfter=function(v){var d=this.__position,o=this.readUntilAfter(v);return this.__position=d,o},y.prototype.lookBack=function(v){var d=this.__position-1;return d>=v.length&&this.__input.substring(d-v.length,d).toLowerCase()===v},R.exports.InputScanner=y},,,,,function(R){function S(y,v){y=typeof y=="string"?y:y.source,v=typeof v=="string"?v:v.source,this.__directives_block_pattern=new RegExp(y+/ beautify( \w+[:]\w+)+ /.source+v,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(y+/\sbeautify\signore:end\s/.source+v,"g")}S.prototype.get_directives=function(y){if(!y.match(this.__directives_block_pattern))return null;var v={};this.__directive_pattern.lastIndex=0;for(var d=this.__directive_pattern.exec(y);d;)v[d[1]]=d[2],d=this.__directive_pattern.exec(y);return v},S.prototype.readIgnored=function(y){return y.readUntilAfter(this.__directives_end_ignore_pattern)},R.exports.Directives=S},,function(R,S,y){var v=y(16).Beautifier,d=y(17).Options;function o(n,a){var s=new v(n,a);return s.beautify()}R.exports=o,R.exports.defaultOptions=function(){return new d}},function(R,S,y){var v=y(17).Options,d=y(2).Output,o=y(8).InputScanner,n=y(13).Directives,a=new n(/\/\*/,/\*\//),s=/\r\n|[\r\n]/,e=/\r\n|[\r\n]/g,t=/\s/,i=/(?:\s|\n)+/g,T=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,_=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function m(E,g){this._source_text=E||"",this._options=new v(g),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}m.prototype.eatString=function(E){var g="";for(this._ch=this._input.next();this._ch;){if(g+=this._ch,this._ch==="\\")g+=this._input.next();else if(E.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return g},m.prototype.eatWhitespace=function(E){for(var g=t.test(this._input.peek()),h=0;t.test(this._input.peek());)this._ch=this._input.next(),E&&this._ch===`
`&&((h===0||h<this._options.max_preserve_newlines)&&(h++,this._output.add_new_line(!0)));return g},m.prototype.foundNestedPseudoClass=function(){for(var E=0,g=1,h=this._input.peek(g);h;){if(h==="{")return!0;if(h==="(")E+=1;else if(h===")"){if(E===0)return!1;E-=1}else if(h===";"||h==="}")return!1;g++,h=this._input.peek(g)}return!1},m.prototype.print_string=function(E){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(E)},m.prototype.preserveSingleSpace=function(E){E&&(this._output.space_before_token=!0)},m.prototype.indent=function(){this._indentLevel++},m.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},m.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var E=this._source_text,g=this._options.eol;g==="auto"&&(g=`
`,E&&s.test(E||"")&&(g=E.match(s)[0])),E=E.replace(e,`
`);var h=E.match(/^[\t ]*/)[0];this._output=new d(this._options,h),this._input=new o(E),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var u=0,r=!1,l=!1,f=!1,c=!1,x=!1,D=!1,A=this._ch,B=!1,O,W,P;O=this._input.read(i),W=O!=="",P=A,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),A=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var G=this._input.read(T),Q=a.get_directives(G);Q&&Q.ignore==="start"&&(G+=a.readIgnored(this._input)),this.print_string(G),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(_)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(W),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var re=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);re.match(/[ :]$/)&&(re=this.eatString(": ").replace(/\s$/,""),this.print_string(re),this._output.space_before_token=!0),re=re.replace(/\s$/,""),re==="extend"?c=!0:re==="import"&&(x=!0),re in this.NESTED_AT_RULE?(this._nestedLevel+=1,re in this.CONDITIONAL_GROUP_RULE&&(f=!0)):!r&&u===0&&re.indexOf(":")!==-1&&(l=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(W),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")l&&(l=!1,this.outdent()),f?(f=!1,r=this._indentLevel>=this._nestedLevel):r=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&r&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(P==="("?this._output.space_before_token=!1:P!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),P==="{"&&this._output.trim(!0),x=!1,c=!1,l&&(this.outdent(),l=!1),this.print_string(this._ch),r=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var le=0;le<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;le++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[le])){B=!0;break}(r||f)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!c&&u===0?(this.print_string(":"),l||(l=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Ee=P==='"'||P==="'";this.preserveSingleSpace(Ee||W),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")B=!1,u===0?(l&&(this.outdent(),l=!1),c=!1,x=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),u++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),u&&(u--,this.outdent()));else{var _e=!1;this._input.lookBack("with")&&(_e=!0),this.preserveSingleSpace(W||_e),this.print_string(this._ch),l&&P==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),D=!0):(this.eatWhitespace(),u++,this.indent())}else if(this._ch===")")u&&(u--,this.outdent()),D&&this._input.peek()===";"&&this._options.selector_separator_newline&&(D=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!l||D)&&u===0&&!x&&!c?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!l&&u===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&t.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(W),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),t.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var ne=P==='"'||P==="'";this.preserveSingleSpace(ne||W),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&B&&this._output.add_new_line()}var Te=this._output.get_code(g);return Te},R.exports.Beautifier=m},function(R,S,y){var v=y(6).Options;function d(o){v.call(this,o,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var n=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||n;var a=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var s=0;s<a.length;s++)a[s]!=="expand"?this.brace_style="collapse":this.brace_style=a[s]}d.prototype=new v,R.exports.Options=d}],w={};function H(R){var S=w[R];if(S!==void 0)return S.exports;var y=w[R]={exports:{}};return C[R](y,y.exports,H),y.exports}var U=H(15);I=U})();var j=I;!(ie=[],L=function(){return{css_beautify:j}}.apply(Re,ie),L!==void 0&&(Ge.exports=L))})()},WaYH:function(Ge,Re,F){"use strict";var ie=F("rePB"),L=F("Ff2n"),I=F("VTBJ"),j=F("1OyB"),C=F("vuIU"),w=F("JX7q"),H=F("Ji7U"),U=F("LK+K"),R=F("cDcd"),S=F("TSYQ"),y=F.n(S),v=F("sboe"),d=F("OZM5"),o=function(E){var g=E.prefixCls,h=E.level,u=E.isStart,r=E.isEnd;if(!h)return null;for(var l="".concat(g,"-indent-unit"),f=[],c=0;c<h;c+=1){var x;f.push(R.createElement("span",{key:c,className:y()(l,(x={},Object(ie.a)(x,"".concat(l,"-start"),u[c+1]),Object(ie.a)(x,"".concat(l,"-end"),r[c+1]),Object(ie.a)(x,"".concat(l,"-end-first-level"),!c&&r[0]),x))}))}return R.createElement("span",{"aria-hidden":"true",className:"".concat(g,"-indent")},f)},n=o,a=F("815F"),s="open",e="close",t="---",i=function(m){Object(H.a)(g,m);var E=Object(U.a)(g);function g(){var h;return Object(j.a)(this,g),h=E.apply(this,arguments),h.state={dragNodeHighlight:!1},h.onSelectorClick=function(u){var r=h.props.context.onNodeClick;r(u,Object(a.b)(h.props)),h.isSelectable()?h.onSelect(u):h.onCheck(u)},h.onSelectorDoubleClick=function(u){var r=h.props.context.onNodeDoubleClick;r(u,Object(a.b)(h.props))},h.onSelect=function(u){if(h.isDisabled())return;var r=h.props.context.onNodeSelect;u.preventDefault(),r(u,Object(a.b)(h.props))},h.onCheck=function(u){if(h.isDisabled())return;var r=h.props,l=r.disableCheckbox,f=r.checked,c=h.props.context.onNodeCheck;if(!h.isCheckable()||l)return;u.preventDefault();var x=!f;c(u,Object(a.b)(h.props),x)},h.onMouseEnter=function(u){var r=h.props.context.onNodeMouseEnter;r(u,Object(a.b)(h.props))},h.onMouseLeave=function(u){var r=h.props.context.onNodeMouseLeave;r(u,Object(a.b)(h.props))},h.onContextMenu=function(u){var r=h.props.context.onNodeContextMenu;r(u,Object(a.b)(h.props))},h.onDragStart=function(u){var r=h.props.context.onNodeDragStart;u.stopPropagation(),h.setState({dragNodeHighlight:!0}),r(u,Object(w.a)(h));try{u.dataTransfer.setData("text/plain","")}catch(l){}},h.onDragEnter=function(u){var r=h.props.context.onNodeDragEnter;u.preventDefault(),u.stopPropagation(),r(u,Object(w.a)(h))},h.onDragOver=function(u){var r=h.props.context.onNodeDragOver;u.preventDefault(),u.stopPropagation(),r(u,Object(w.a)(h))},h.onDragLeave=function(u){var r=h.props.context.onNodeDragLeave;u.stopPropagation(),r(u,Object(w.a)(h))},h.onDragEnd=function(u){var r=h.props.context.onNodeDragEnd;u.stopPropagation(),h.setState({dragNodeHighlight:!1}),r(u,Object(w.a)(h))},h.onDrop=function(u){var r=h.props.context.onNodeDrop;u.preventDefault(),u.stopPropagation(),h.setState({dragNodeHighlight:!1}),r(u,Object(w.a)(h))},h.onExpand=function(u){var r=h.props.context.onNodeExpand;r(u,Object(a.b)(h.props))},h.setSelectHandle=function(u){h.selectHandle=u},h.getNodeState=function(){var u=h.props.expanded;return h.isLeaf()?null:u?s:e},h.hasChildren=function(){var u=h.props.eventKey,r=h.props.context.keyEntities,l=r[u]||{},f=l.children;return!!(f||[]).length},h.isLeaf=function(){var u=h.props,r=u.isLeaf,l=u.loaded,f=h.props.context.loadData,c=h.hasChildren();return r===!1?!1:r||!f&&!c||f&&l&&!c},h.isDisabled=function(){var u=h.props.disabled,r=h.props.context.disabled;return!!(r||u)},h.isCheckable=function(){var u=h.props.checkable,r=h.props.context.checkable;return!r||u===!1?!1:r},h.syncLoadData=function(u){var r=u.expanded,l=u.loading,f=u.loaded,c=h.props.context,x=c.loadData,D=c.onNodeLoad;if(l)return;x&&r&&!h.isLeaf()&&(!h.hasChildren()&&!f&&D(Object(a.b)(h.props)))},h.renderSwitcher=function(){var u=h.props,r=u.expanded,l=u.switcherIcon,f=h.props.context,c=f.prefixCls,x=f.switcherIcon,D=l||x;if(h.isLeaf())return R.createElement("span",{className:y()("".concat(c,"-switcher"),"".concat(c,"-switcher-noop"))},typeof D=="function"?D(Object(I.a)(Object(I.a)({},h.props),{},{isLeaf:!0})):D);var A=y()("".concat(c,"-switcher"),"".concat(c,"-switcher_").concat(r?s:e));return R.createElement("span",{onClick:h.onExpand,className:A},typeof D=="function"?D(Object(I.a)(Object(I.a)({},h.props),{},{isLeaf:!1})):D)},h.renderCheckbox=function(){var u=h.props,r=u.checked,l=u.halfChecked,f=u.disableCheckbox,c=h.props.context.prefixCls,x=h.isDisabled(),D=h.isCheckable();if(!D)return null;var A=typeof D!="boolean"?D:null;return R.createElement("span",{className:y()("".concat(c,"-checkbox"),r&&"".concat(c,"-checkbox-checked"),!r&&l&&"".concat(c,"-checkbox-indeterminate"),(x||f)&&"".concat(c,"-checkbox-disabled")),onClick:h.onCheck},A)},h.renderIcon=function(){var u=h.props.loading,r=h.props.context.prefixCls;return R.createElement("span",{className:y()("".concat(r,"-iconEle"),"".concat(r,"-icon__").concat(h.getNodeState()||"docu"),u&&"".concat(r,"-icon_loading"))})},h.renderSelector=function(){var u=h.state.dragNodeHighlight,r=h.props,l=r.title,f=r.selected,c=r.icon,x=r.loading,D=r.data,A=h.props.context,B=A.prefixCls,O=A.showIcon,W=A.icon,P=A.draggable,G=A.loadData,Q=A.titleRender,re=h.isDisabled(),le="".concat(B,"-node-content-wrapper"),Ee;if(O){var _e=c||W;Ee=_e?R.createElement("span",{className:y()("".concat(B,"-iconEle"),"".concat(B,"-icon__customize"))},typeof _e=="function"?_e(h.props):_e):h.renderIcon()}else G&&x&&(Ee=h.renderIcon());var ne;typeof l=="function"?ne=l(D):Q?ne=Q(D):ne=l;var Te=R.createElement("span",{className:"".concat(B,"-title")},ne);return R.createElement("span",{ref:h.setSelectHandle,title:typeof l=="string"?l:"",className:y()("".concat(le),"".concat(le,"-").concat(h.getNodeState()||"normal"),!re&&(f||u)&&"".concat(B,"-node-selected"),!re&&P&&"draggable"),draggable:!re&&P||void 0,"aria-grabbed":!re&&P||void 0,onMouseEnter:h.onMouseEnter,onMouseLeave:h.onMouseLeave,onContextMenu:h.onContextMenu,onClick:h.onSelectorClick,onDoubleClick:h.onSelectorDoubleClick,onDragStart:P?h.onDragStart:void 0},Ee,Te)},h}return Object(C.a)(g,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var u=this.props.selectable,r=this.props.context.selectable;return typeof u=="boolean"?u:r}},{key:"render",value:function(){var u,r=this.props,l=r.eventKey,f=r.className,c=r.style,x=r.dragOver,D=r.dragOverGapTop,A=r.dragOverGapBottom,B=r.isLeaf,O=r.isStart,W=r.isEnd,P=r.expanded,G=r.selected,Q=r.checked,re=r.halfChecked,le=r.loading,Ee=r.domRef,_e=r.active,ne=r.onMouseMove,Te=Object(L.a)(r,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Ae=this.props.context,fe=Ae.prefixCls,J=Ae.filterTreeNode,Ie=Ae.draggable,it=Ae.keyEntities,et=this.isDisabled(),Qe=Object(d.f)(Te),nt=it[l]||{},Me=nt.level,ze=W[W.length-1];return R.createElement("div",Object.assign({ref:Ee,className:y()(f,"".concat(fe,"-treenode"),(u={},Object(ie.a)(u,"".concat(fe,"-treenode-disabled"),et),Object(ie.a)(u,"".concat(fe,"-treenode-switcher-").concat(P?"open":"close"),!B),Object(ie.a)(u,"".concat(fe,"-treenode-checkbox-checked"),Q),Object(ie.a)(u,"".concat(fe,"-treenode-checkbox-indeterminate"),re),Object(ie.a)(u,"".concat(fe,"-treenode-selected"),G),Object(ie.a)(u,"".concat(fe,"-treenode-loading"),le),Object(ie.a)(u,"".concat(fe,"-treenode-active"),_e),Object(ie.a)(u,"".concat(fe,"-treenode-leaf-last"),ze),Object(ie.a)(u,"drag-over",!et&&x),Object(ie.a)(u,"drag-over-gap-top",!et&&D),Object(ie.a)(u,"drag-over-gap-bottom",!et&&A),Object(ie.a)(u,"filter-node",J&&J(Object(a.b)(this.props))),u)),style:c,onDragEnter:Ie?this.onDragEnter:void 0,onDragOver:Ie?this.onDragOver:void 0,onDragLeave:Ie?this.onDragLeave:void 0,onDrop:Ie?this.onDrop:void 0,onDragEnd:Ie?this.onDragEnd:void 0,onMouseMove:ne},Qe),R.createElement(n,{prefixCls:fe,level:Me,isStart:O,isEnd:W}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),g}(R.Component),T=function(E){return R.createElement(v.a.Consumer,null,function(g){return R.createElement(i,Object.assign({},E,{context:g}))})};T.displayName="TreeNode",T.defaultProps={title:t},T.isTreeNode=1;var _=Re.a=T},Y1PL:function(Ge,Re,F){"use strict";F.r(Re),F.d(Re,"ResizableTextArea",function(){return re});var ie=F("wx14"),L=F("1OyB"),I=F("vuIU"),j=F("Ji7U"),C=F("LK+K"),w=F("cDcd"),H=F("VTBJ"),U=F("rePB"),R=F("Zm9Q"),S=F("Kwbf"),y=F("c+Xe"),v=F("m+aA"),d=F("bdgK"),o=new Map;function n(_e){_e.forEach(function(ne){var Te,Ae=ne.target;(Te=o.get(Ae))===null||Te===void 0||Te.forEach(function(fe){return fe(Ae)})})}var a=new d.default(n),s=null,e=null;function t(_e,ne){o.has(_e)||(o.set(_e,new Set),a.observe(_e)),o.get(_e).add(ne)}function i(_e,ne){o.has(_e)&&(o.get(_e).delete(ne),o.get(_e).size||(a.unobserve(_e),o.delete(_e)))}var T=function(_e){Object(j.a)(Te,_e);var ne=Object(C.a)(Te);function Te(){return Object(L.a)(this,Te),ne.apply(this,arguments)}return Object(I.a)(Te,[{key:"render",value:function(){return this.props.children}}]),Te}(w.Component),_=w.createContext(null);function m(_e){var ne=_e.children,Te=_e.onBatchResize,Ae=w.useRef(0),fe=w.useRef([]),J=w.useContext(_),Ie=w.useCallback(function(it,et,Qe){Ae.current+=1;var nt=Ae.current;fe.current.push({size:it,element:et,data:Qe}),Promise.resolve().then(function(){nt===Ae.current&&(Te==null||Te(fe.current),fe.current=[])}),J==null||J(it,et,Qe)},[Te,J]);return w.createElement(_.Provider,{value:Ie},ne)}function E(_e){var ne=_e.children,Te=_e.disabled,Ae=w.useRef(null),fe=w.useRef(null),J=w.useContext(_),Ie=w.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),it=w.isValidElement(ne)&&Object(y.c)(ne),et=it?ne.ref:null,Qe=w.useMemo(function(){return Object(y.a)(et,Ae)},[et,Ae]),nt=w.useRef(_e);nt.current=_e;var Me=w.useCallback(function(ze){var Je=nt.current,$e=Je.onResize,Xe=Je.data,Fe=ze.getBoundingClientRect(),We=Fe.width,yt=Fe.height,ft=ze.offsetWidth,ut=ze.offsetHeight,rt=Math.floor(We),Tt=Math.floor(yt);if(Ie.current.width!==rt||Ie.current.height!==Tt||Ie.current.offsetWidth!==ft||Ie.current.offsetHeight!==ut){var _t={width:rt,height:Tt,offsetWidth:ft,offsetHeight:ut};Ie.current=_t;var me=ft===Math.round(We)?We:ft,xe=ut===Math.round(yt)?yt:ut,De=Object(H.a)(Object(H.a)({},_t),{},{offsetWidth:me,offsetHeight:xe});J==null||J(De,ze,Xe),$e&&Promise.resolve().then(function(){$e(De,ze)})}},[]);return w.useEffect(function(){var ze=Object(v.a)(Ae.current)||Object(v.a)(fe.current);return ze&&!Te&&t(ze,Me),function(){return i(ze,Me)}},[Ae.current,Te]),w.createElement(T,{ref:fe},it?w.cloneElement(ne,{ref:Qe}):ne)}var g="rc-observer-key";function h(_e){var ne=_e.children,Te=Object(R.a)(ne);return Te.map(function(Ae,fe){var J=(Ae==null?void 0:Ae.key)||"".concat(g,"-").concat(fe);return w.createElement(E,Object(ie.a)({},_e,{key:J}),Ae)})}h.Collection=m;var u=h,r=F("bT9E"),l=F("TSYQ"),f=F.n(l),c=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,x=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],D={},A;function B(_e){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=_e.getAttribute("id")||_e.getAttribute("data-reactid")||_e.getAttribute("name");if(ne&&D[Te])return D[Te];var Ae=window.getComputedStyle(_e),fe=Ae.getPropertyValue("box-sizing")||Ae.getPropertyValue("-moz-box-sizing")||Ae.getPropertyValue("-webkit-box-sizing"),J=parseFloat(Ae.getPropertyValue("padding-bottom"))+parseFloat(Ae.getPropertyValue("padding-top")),Ie=parseFloat(Ae.getPropertyValue("border-bottom-width"))+parseFloat(Ae.getPropertyValue("border-top-width")),it=x.map(function(Qe){return"".concat(Qe,":").concat(Ae.getPropertyValue(Qe))}).join(";"),et={sizingStyle:it,paddingSize:J,borderSize:Ie,boxSizing:fe};return ne&&Te&&(D[Te]=et),et}function O(_e){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;A||(A=document.createElement("textarea"),A.setAttribute("tab-index","-1"),A.setAttribute("aria-hidden","true"),document.body.appendChild(A)),_e.getAttribute("wrap")?A.setAttribute("wrap",_e.getAttribute("wrap")):A.removeAttribute("wrap");var fe=B(_e,ne),J=fe.paddingSize,Ie=fe.borderSize,it=fe.boxSizing,et=fe.sizingStyle;A.setAttribute("style","".concat(et,";").concat(c)),A.value=_e.value||_e.placeholder||"";var Qe=Number.MIN_SAFE_INTEGER,nt=Number.MAX_SAFE_INTEGER,Me=A.scrollHeight,ze;if(it==="border-box"?Me+=Ie:it==="content-box"&&(Me-=J),Te!==null||Ae!==null){A.value=" ";var Je=A.scrollHeight-J;Te!==null&&(Qe=Je*Te,it==="border-box"&&(Qe=Qe+J+Ie),Me=Math.max(Qe,Me)),Ae!==null&&(nt=Je*Ae,it==="border-box"&&(nt=nt+J+Ie),ze=Me>nt?"":"hidden",Me=Math.min(nt,Me))}return{height:Me,minHeight:Qe,maxHeight:nt,overflowY:ze,resize:"none"}}var W=F("Gytx"),P=F.n(W),G;(function(_e){_e[_e.NONE=0]="NONE",_e[_e.RESIZING=1]="RESIZING",_e[_e.RESIZED=2]="RESIZED"})(G||(G={}));var Q=function(_e){Object(j.a)(Te,_e);var ne=Object(C.a)(Te);function Te(Ae){var fe;return Object(L.a)(this,Te),fe=ne.call(this,Ae),fe.nextFrameActionId=void 0,fe.resizeFrameId=void 0,fe.textArea=void 0,fe.saveTextArea=function(J){fe.textArea=J},fe.handleResize=function(J){var Ie=fe.state.resizeStatus,it=fe.props,et=it.autoSize,Qe=it.onResize;if(Ie!==G.NONE)return;typeof Qe=="function"&&Qe(J),et&&fe.resizeOnNextFrame()},fe.resizeOnNextFrame=function(){cancelAnimationFrame(fe.nextFrameActionId),fe.nextFrameActionId=requestAnimationFrame(fe.resizeTextarea)},fe.resizeTextarea=function(){var J=fe.props.autoSize;if(!J||!fe.textArea)return;var Ie=J.minRows,it=J.maxRows,et=O(fe.textArea,!1,Ie,it);fe.setState({textareaStyles:et,resizeStatus:G.RESIZING},function(){cancelAnimationFrame(fe.resizeFrameId),fe.resizeFrameId=requestAnimationFrame(function(){fe.setState({resizeStatus:G.RESIZED},function(){fe.resizeFrameId=requestAnimationFrame(function(){fe.setState({resizeStatus:G.NONE}),fe.fixFirefoxAutoScroll()})})})})},fe.renderTextArea=function(){var J=fe.props,Ie=J.prefixCls,it=Ie===void 0?"rc-textarea":Ie,et=J.autoSize,Qe=J.onResize,nt=J.className,Me=J.disabled,ze=fe.state,Je=ze.textareaStyles,$e=ze.resizeStatus,Xe=Object(r.a)(fe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Fe=f()(it,nt,Object(U.a)({},"".concat(it,"-disabled"),Me));"value"in Xe&&(Xe.value=Xe.value||"");var We=Object(H.a)(Object(H.a)(Object(H.a)({},fe.props.style),Je),$e===G.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return w.createElement(u,{onResize:fe.handleResize,disabled:!(et||Qe)},w.createElement("textarea",Object(ie.a)({},Xe,{className:Fe,style:We,ref:fe.saveTextArea})))},fe.state={textareaStyles:{},resizeStatus:G.NONE},fe}return Object(I.a)(Te,[{key:"componentDidUpdate",value:function(fe){(fe.value!==this.props.value||!P()(fe.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var fe=this.textArea.selectionStart,J=this.textArea.selectionEnd;this.textArea.setSelectionRange(fe,J)}}catch(Ie){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Te}(w.Component),re=Q,le=function(_e){Object(j.a)(Te,_e);var ne=Object(C.a)(Te);function Te(Ae){var fe;Object(L.a)(this,Te),fe=ne.call(this,Ae),fe.resizableTextArea=void 0,fe.focus=function(){fe.resizableTextArea.textArea.focus()},fe.saveTextArea=function(Ie){fe.resizableTextArea=Ie},fe.handleChange=function(Ie){var it=fe.props.onChange;fe.setValue(Ie.target.value,function(){fe.resizableTextArea.resizeTextarea()}),it&&it(Ie)},fe.handleKeyDown=function(Ie){var it=fe.props,et=it.onPressEnter,Qe=it.onKeyDown;Ie.keyCode===13&&et&&et(Ie),Qe&&Qe(Ie)};var J=typeof Ae.value=="undefined"||Ae.value===null?Ae.defaultValue:Ae.value;return fe.state={value:J},fe}return Object(I.a)(Te,[{key:"setValue",value:function(fe,J){"value"in this.props||this.setState({value:fe},J)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return w.createElement(re,Object(ie.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(fe){return"value"in fe?{value:fe.value}:null}}]),Te}(w.Component),Ee=Re.default=le},ZJlW:function(Ge,Re,F){Ge.exports={flex_box_center:"flex_box_center___XZ1Hd",flex_space_between:"flex_space_between___2oG4i",flex_box_vertical_center:"flex_box_vertical_center___1UWtb",flex_box_center_end:"flex_box_center_end___1o2xT",flex_box_column:"flex_box_column___SlAE0",list:"list___1HvWe",wrap:"wrap___10sri",lockWrap:"lockWrap___2djiu",li:"li___2W_zn",cover:"cover___2FS3L",img:"img___cyxrw",sign:"sign___1cxDK",name:"name___3tYlu",e:"e___1-orw",unit:"unit___ycOgg",tags:"tags___2FRpJ",tag:"tag___1e0XO"}},ZW9T:function(Ge,Re,F){"use strict";F.d(Re,"a",function(){return O});var ie=F("k1fw"),L=F("miYZ"),I=F("tsqr"),j=F("rAM+"),C=F("tJVT"),w=F("PpiC"),H=F("cDcd"),U=F.n(H),R=F("bdgK"),S=F("oBTY"),y=F("9og8"),v=F("WmNS"),d=F.n(v),o={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},n={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},a={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"#include",content:'include "$0"'},{label:"printf",content:"printf($0)"},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"for",content:["for( ; ; ){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
`)},{label:"#include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"#include <vector>",content:["#include <vector>"].join(`
`)},{label:"#include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"#include <string>",content:["#include <string>"].join(`
`)},{label:"#include <cmath>",content:["#include <cmath>"].join(`
`)}]},s={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},e=F("5VLF"),t=F.n(e),i={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},T=function(P,G){return G.map(function(Q){return{label:Q,kind:P.languages.CompletionItemKind.Keyword,insertText:Q}})},_=function(P){return Object.keys(i.tables).map(function(G){return{label:G,kind:P.languages.CompletionItemKind.Variable,insertText:G}})},m=function(P,G){var Q=i.tables[P];return Q?Q.map(function(re){return{label:re,kind:G.languages.CompletionItemKind.Field,insertText:re}}):[]};function E(W,P,G,Q,re){var le=P.getWordUntilPosition(G),Ee={startLineNumber:G.lineNumber,endLineNumber:G.lineNumber,startColumn:le.startColumn,endColumn:le.endColumn},_e=Q.map(function(ne){return{label:ne,kind:W.languages.CompletionItemKind.Keyword,insertText:ne,insertTextRules:W.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ee}});return re.map(function(ne){_e.push(Object(ie.a)(Object(ie.a)({},ne),{},{range:Ee}))}),_e}var g=function(W){i.languages.map(function(re){return W.languages.registerDocumentFormattingEditProvider(re,{provideDocumentFormattingEdits:function(Ee,_e,ne){return Object(y.a)(d.a.mark(function Te(){var Ae;return d.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return Ae=t()(Ee.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),J.abrupt("return",[{range:Ee.getFullModelRange(),text:Ae}]);case 2:case"end":return J.stop()}},Te)}))()}}),re});var P=a.quickKey.map(function(re){return{label:re.label,kind:W.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:W.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),G=s.quickKey.map(function(re){return{label:re.label,kind:W.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:W.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),Q=n.quickKey.map(function(re){return{label:re.label,kind:W.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:W.languages.CompletionItemInsertTextRule.InsertAsSnippet}});W.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(S.a)(a.keywords),Object(S.a)(a.quickKey.map(function(re){return re.label}))),provideCompletionItems:function(le,Ee){var _e=le.getValueInRange({startLineNumber:Ee.lineNumber,startColumn:1,endLineNumber:Ee.lineNumber,endColumn:Ee.column}),ne=_e.match(/cu/gim);console.log("match:",ne,Ee,_e,le);var Te=[],Ae=Ee.lineNumber,fe=Ee.column,J=le.getValueInRange({startLineNumber:Ae,startColumn:0,endLineNumber:Ae,endColumn:fe}),Ie=J.trim().split(/\s+/),it=Ie[Ie.length-1];if(it.endsWith(".")){var et=it.slice(0,it.length-1);Object.keys(i.tables).includes(et)&&(Te=Object(S.a)(m(et,W)))}else it==="."?Te=[]:Te=[].concat(Object(S.a)(_(W)),Object(S.a)(T(W,a.keywords)),Object(S.a)(P));return{suggestions:Te}}}),W.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(S.a)(o.keywords)),provideCompletionItems:function(le,Ee){var _e=le.getValueInRange({startLineNumber:Ee.lineNumber,startColumn:1,endLineNumber:Ee.lineNumber,endColumn:Ee.column}),ne=_e.match(/cu/gim);console.log("match:",ne,Ee,_e,le);var Te=[],Ae=Ee.lineNumber,fe=Ee.column,J=le.getValueInRange({startLineNumber:Ae,startColumn:0,endLineNumber:Ae,endColumn:fe}),Ie=J.trim().split(/\s+/),it=Ie[Ie.length-1];if(it.endsWith(".")){var et=it.slice(0,it.length-1);Object.keys(i.tables).includes(et)&&(Te=Object(S.a)(m(et,W)))}else it==="."?Te=[]:Te=[].concat(Object(S.a)(_(W)),Object(S.a)(T(W,o.keywords)));return{suggestions:Te}}}),W.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(S.a)(n.keywords)),provideCompletionItems:function(le,Ee){var _e=[],ne=Ee.lineNumber,Te=Ee.column,Ae=le.getValueInRange({startLineNumber:ne,startColumn:0,endLineNumber:ne,endColumn:Te}),fe=Ae.trim().split(/\s+/),J=fe[fe.length-1];if(J.endsWith(".")){var Ie=J.slice(0,J.length-1);Object.keys(i.tables).includes(Ie)&&(_e=Object(S.a)(m(Ie,W)))}else J==="."?_e=[]:_e=[].concat(Object(S.a)(_(W)),Object(S.a)(T(W,n.keywords)),Object(S.a)(Q));return{suggestions:_e}}}),W.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(S.a)(s.keywords)),provideCompletionItems:function(le,Ee){var _e=[],ne=Ee.lineNumber,Te=Ee.column,Ae=le.getValueInRange({startLineNumber:ne,startColumn:0,endLineNumber:ne,endColumn:Te}),fe=Ae.trim().split(/\s+/),J=fe[fe.length-1];if(J.endsWith(".")){var Ie=J.slice(0,J.length-1);Object.keys(i.tables).includes(Ie)&&(_e=Object(S.a)(m(Ie,W)))}else J==="."?_e=[]:_e=[].concat(Object(S.a)(_(W)),Object(S.a)(T(W,s.keywords)),Object(S.a)(G));return{suggestions:_e}}})},h="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",u=F("LvDl"),r=F("+ua5");function l(W){return/^\d+$/.test(W)?"".concat(W,"px"):W}function f(){}var c=!1,x={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function D(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=W;if(Array.isArray(W)){for(var G=0;G<W.length;G++){var Q=x[W[G]];if(Q)return Q}return P[0]}return x[P]||P}var A=null,B=Re.b=function(W){var P=W.width,G=P===void 0?"100%":P,Q=W.height,re=Q===void 0?"100%":Q,le=W.value,Ee=W.language,_e=Ee===void 0?"javascript":Ee,ne=W.style,Te=ne===void 0?{}:ne,Ae=W.options,fe=Ae===void 0?{}:Ae,J=W.overrideServices,Ie=J===void 0?{}:J,it=W.theme,et=it===void 0?"vs-dark":it,Qe=W.onEditBlur,nt=W.onSave,Me=W.autoHeight,ze=Me===void 0?!1:Me,Je=W.forbidCopy,$e=Je===void 0?!1:Je,Xe=W.onChange,Fe=Xe===void 0?f:Xe,We=W.editorDidMount,yt=We===void 0?f:We,ft=W.onFocus,ut=ft===void 0?f:ft,rt=W.filename,Tt=rt===void 0?"educoder.txt":rt,_t=W.errorLine,me=W.errorContent,xe=me===void 0?"":me,De=Object(w.a)(W,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),ke=Object(H.useRef)(),be=Object(H.useRef)({}),Le=Object(H.useRef)(),ce=Object(H.useRef)(!1),ee=Object(H.useRef)(),te=Object(H.useState)(!1),V=Object(C.a)(te,2),X=V[0],q=V[1];function ae(){var Pe;return ke.current&&(Pe=new R.default(function(pt){var St=Object(j.a)(pt),Ct;try{for(St.s();!(Ct=St.n()).done;){var Mt=Ct.value;(Mt.target.offsetHeight>0||Mt.target.offsetWidth>0)&&be.current.instance.layout()}}catch(xt){St.e(xt)}finally{St.f()}}),Pe.observe(ke.current)),Pe}function ge(){I.b.warn(decodeURIComponent(h))}var we=function(){var pt=be.current.instance;if(le!=null&&pt&&X){var St=pt.getModel();St&&le!==St.getValue()&&(c=!0,St.setValue(le),pt.layout(),c=!1)}};Object(H.useEffect)(function(){Le.current&&clearTimeout(Le.current),Le.current=setTimeout(function(){we()},500)},[le,X,be.current]),Object(H.useEffect)(function(){if(_t&&be.current&&be.current.instance){var Pe=be.current.instance;Pe.changeViewZones(function(St){var Ct=document.createElement("div");Ct.style.padding="10px 20px",Ct.style.width="calc(100% - 20px)",Ct.className="my-error-line-wrp",Ct.innerHTML=xe,St.addZone({afterLineNumber:_t||11,heightInLines:3,domNode:Ct})});var pt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Pe.addOverlayWidget(pt),Pe.revealPositionInCenter({lineNumber:20,column:1})}},[_t,be.current,X]);function je(){var Pe=be.current.instance;if(Pe){var pt=Pe.getSelection(),St=be.current.pastePos||{},Ct=new A.Range(St.startLineNumber||pt.endLineNumber,St.startColumn||pt.endColumn,St.endLineNumber||pt.endLineNumber,St.endColumn||pt.endColumn);setTimeout(function(){Pe.executeEdits("",[{range:Ct,text:""}])},300)}}function at(Pe){(window.navigator.platform.match("Mac")?Pe.metaKey:Pe.ctrlKey)&&Pe.keyCode==83&&(Pe.preventDefault(),nt())}var ot=function(){if(ze&&be.current.instance){var pt=be.current.instance.getContentHeight();vt(pt<re?re:pt)}else vt(re)};function Se(Pe){var pt=document.createEvent("MouseEvents");pt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Pe.dispatchEvent(pt)}function st(Pe,pt){var St=window.URL||window.webkitURL||window,Ct=new Blob([pt]),Mt=document.createElementNS("http://www.w3.org/1999/xhtml","a");Mt.href=St.createObjectURL(Ct),Mt.download=Pe,Se(Mt)}Object(H.useEffect)(function(){ot()},[ot]),Object(H.useEffect)(function(){ke.current&&!X&&F.e(27).then(F.t.bind(null,"M/lh",7)).then(function(Pe){try{A=Pe,be.current.instance=A.editor.create(ke.current,{value:le,language:D(_e),theme:et,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},Ie);var pt=be.current.instance;if(yt(pt,A),setTimeout(function(){ot(),be.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){st(Tt||"educoder.txt",pt.getValue())}})},500),be.current.subscription=pt.onDidChangeModelContent(function(Ct){ce.current?clearTimeout(ee.current):(ot(),Fe(pt.getValue(),Ct)),ee.current=setTimeout(function(){ce.current=!1},500)}),window.Monaco||g(A),$e&&(pt.addCommand(A.KeyMod.CtrlCmd|A.KeyMod.Shift|A.KeyCode.KEY_V,function(){return ge(),null}),pt.addCommand(A.KeyMod.CtrlCmd|A.KeyCode.KEY_C,function(){return ge(),null})),window.Monaco=A,Qe&&pt.onDidBlurEditorWidget(function(){Qe(pt.getValue())}),ut&&pt.onDidFocusEditorText(function(){ut(pt.getValue())}),$e){pt.addCommand(A.KeyMod.CtrlCmd|A.KeyCode.KEY_V,function(){return ge(),null}),pt.onDidPaste(function(Ct){be.current.pastePos=Ct});try{window.addEventListener("paste",je)}catch(Ct){}}var St=ae();return q(!0),function(){var Ct=be.current.instance;Ct.dispose();var Mt=Ct.getModel();Mt&&Mt.dispose(),be.current.subscription&&be.current.subscription.dispose(),$e&&window.removeEventListener("paste",je),St.unobserve(ke.current)}}catch(Ct){}})},[]),Object(H.useEffect)(function(){var Pe=be.current.instance;if(Pe&&X)return document.addEventListener("keydown",at,!1),function(){document.removeEventListener("keydown",at)}},[nt,X]),Object(H.useEffect)(function(){var Pe=be.current.instance;if(Pe&&X){var pt=D(_e);A.editor.setModelLanguage(Pe.getModel(),pt),console.log("language:",_e,Pe.getModel(),pt)}},[_e,X]),Object(H.useEffect)(function(){var Pe=be.current.instance;Pe&&X&&A.editor.setTheme(et)},[et,X]),Object(H.useEffect)(function(){var Pe=be.current.instance;Pe&&X&&(Pe.updateOptions(Object(ie.a)({},fe)),setTimeout(function(){Pe.getModel().updateOptions(Object(ie.a)({},fe))},200))},[JSON.stringify(fe),X]),Object(H.useEffect)(function(){var Pe=be.current.instance;Pe&&X&&Pe.layout()},[G,re,X]);var tt=Object(H.useState)(l(G)),Ye=Object(C.a)(tt,2),mt=Ye[0],bt=Ye[1],gt=Object(H.useState)(l(re)),At=Object(C.a)(gt,2),ht=At[0],vt=At[1],Ot=Object(ie.a)(Object(ie.a)({},Te),{},{width:mt,height:ht});return U.a.createElement("div",{className:"my-monaco-editor",ref:ke,style:Ot})};function O(W){var P=W.width,G=P===void 0?"100%":P,Q=W.height,re=Q===void 0?"100%":Q,le=W.original,Ee=W.modified,_e=W.language,ne=W.options,Te=ne===void 0?{}:ne,Ae=Object(H.useRef)(),fe=Object(H.useState)(null),J=Object(C.a)(fe,2),Ie=J[0],it=J[1];function et(ze){var Je;return Ae.current&&(Je=new R.default(function($e){var Xe=Object(j.a)($e),Fe;try{for(Xe.s();!(Fe=Xe.n()).done;){var We=Fe.value;(We.target.offsetHeight>0||We.target.offsetWidth>0)&&ze.layout()}}catch(yt){Xe.e(yt)}finally{Xe.f()}}),Je.observe(Ae.current)),Je}Object(H.useEffect)(function(){Ae.current&&F.e(27).then(F.t.bind(null,"M/lh",7)).then(function(ze){A=ze;var Je=A.editor.createDiffEditor(Ae.current,Object(ie.a)(Object(ie.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Te),{},{wordWrap:!0}));it(Je);var $e=et(Je);return function(){Je.dispose();var Xe=Je.getModel();Xe&&Xe.dispose(),$e.unobserve(Ae.current)}})},[]),Object(H.useEffect)(function(){Ie&&Ie.setModel({original:A.editor.createModel(le,_e),modified:A.editor.createModel(Ee,_e)})},[le,Ee,_e,Ie]);var Qe=l(G),nt=l(re),Me={width:Qe,height:nt};return U.a.createElement("div",{className:"my-diff-editor",ref:Ae,style:Me})}},a2OE:function(Ge,Re){Ge.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAAAkCAYAAABR/76qAAAAAXNSR0IArs4c6QAAE31JREFUeF61W3uQVcWZ/3137oxP1DE+EWIUJFlQkHkoougiz+ExvIe54COru6ZWk2xqd2OybKViWWWy1tZWLLc2q8ZH/nCYYRBkBIcBS6NRAZ2HjgiiEDQDioiAiAozc7u/re4+3afPuefeubDlqYI799zTp/v07/t970OIHbzj1gfBOAPMfWDuBWQfkBWQEAB/iSvp90QrhR3G2+dfjGPH7gCLXgC9kKIXRMd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UQVdu1gFIIRY5qtvIzTID6Aq1wgcgGJBcfXArbQEo08aQKvySjAeZ2IbjmA5gJk5KjZU2Y2UMe9NcBMWQeISkH6pZQQIKuY0Se7w+r9QBsMjAOrfuxc8wywXuLyn946DCQn4Nap6QUlzzsFbbqjk/myHX7DVTCtRyWzFwKucF+pUL3EDTTlBAFef/UAkjLDFXFJeaH4Vyo36LaFxidmQ+E4wVtESLDxhAC1wdqMJSv09BMbfRBhkb2w8jwMowSiqwwGNQSNWgzEvsd80FL5NlMH1uQC+s+AfWGYfM7GayaREA2+soeqN8xIB3DyhAtn+TvvCiQsRIgAK/XKL90JKA03bdWIM9AAMHRkdiQ8E4H0Afp1YyonHbynMpXq0nBCAyomxLLEDVSAvcQWAJyFRklNKAvqQQi0tDloJFYArsABC943m7x4gPEEZ/H0ugNvnX8p94iP//T7fDhLRnVS98cl8AHK2T6fSImFCWlUj2nfzi6OClgqTKDebj5MEUARhRPjeIgZiYBPGQULZ3Hz1OPNYBKfOTgjAAu8HalAkloNR5s2vGnkXUh2e8+fhP+FU7MenYJxdoNboem2iZFbP9vacHSzl9yNtEmDVzvU0KtvuIKJ44skI3qs3VAL9HTYZ7uynBfClUS0qmR15+fOkABxk4sCYeodKZtdl83qh3IwSZLWaKk/s+CIdXD+IC/EHmogTevOzmDiQm1ADxirtPKVwCBL1tASJ6+VGPAHGHQllLpX9uT/pNTenRLh77r9Bigkg+QkE7wFjJ1Lpl6niuU8KSSRvuu4SSPmzyDsSyrssPe23NH7zIX5xpCrbjNK/6zKg6lERXTR1d2Oxkq4FZfVZ0yHFJCM1wfsYSlSJHqOFvQU7tLkRvwG0c3IYhC/A+FyFDEhjKyTeojokvtY20Pq4EYvBWOpCa/vyZhr30kLssOO5GTdB4AGU4TZagN357suNqAJ0nfIgGAdB2AuJXUhjZ741/h9lg+MKrzmoaAAAAABJRU5ErkJggg=="},bT9E:function(Ge,Re,F){"use strict";F.d(Re,"a",function(){return L});var ie=F("VTBJ");function L(I,j){var C=Object(ie.a)({},I);return Array.isArray(j)&&j.forEach(function(w){delete C[w]}),C}},biw7:function(Ge,Re,F){"use strict";var ie=F("cDcd"),L=F.n(ie),I=ie.createContext(null);Re.a=I},cFMs:function(Ge,Re){Ge.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJgAAAA4CAYAAAAB3jHPAAAAAXNSR0IArs4c6QAAIABJREFUeF61XQl4VdW1/m9GIAlhDGEIBATB2aetvCfYwYoDqKioVZGi4vxq9VlHVNSqtCA+obaKoBat4gRiHVBQBH2aiG3VKgIhYQhhyEQIhAwkuee8b49n7X32ubkRe7+PL3c4e5999vr3v/619jqHGH7gl+/7qdhSdAI8nAJgFHx/FHwUwPdyAOQAfgZ8X55V/mWf2b8YxF/+Ir/xj+R7/V4ed6jt2blUn3ocpG91fjU+dQwdl++RmWT9qWug79Wl0WPJ5fL+AcTYG/aKyXlhf8VH4zt1jB4faWfblfZL+1LHGedVX6r+aGd6kMEYla1CWIqJIR/qy/f/kY6y9vGAdzmAcfC83BBAFGgMoBAj6AtVxrYARo2r+yJANABJjGqDIQRkBV4FYPbZ08MXb+hY1Htybn5NtH1UG8cxDEzqawUs/Vl1G5OLT9lUmk0BRYNDfS87UH0rYKohG1anHxxwMPqmA3Oghp+PXKNaE98XYH5FUVe04BYg9lv4fm8+UzYD8YsiKzaKiZSROgIA/Z1eTKg9WZr2OUNglTOvgaJWqQSfcU0EYOq6ovpTzKIRROdHAdsCDycpxVgWkCij0bUVAqYFGj5nDiDp7+n1WgxqgEP2QQ5PjJ3vyWDcDW4tvgLx2IPw/YHBSeTKDRneYgn1u3aJFkNo9xLlGhOxheNctmtzAVODgYJN9tVhe6uNa6FRluPvCbC065NLnjKaAoHxHXGXDrekCF5IDgIY7Ro5iknLKEcW5SJVU4o0N+o67SL9suKz4GMOfP9IE1jyUxRbUQMaLsW1qi33aOsx24AuQCvXRsFK+0nEpGpWlLbTFiPjss8Zs8dsu16q81y+ygE44zDLVFGAc7GSC0yU1ZwgtK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jTj2H9qofhxaebhYnS9+uIz34UOElDKGCEXJS0ig0AZSBbn6l+FDCN/qzVqNtGBAhUX2lbWy7JYC+apVe6jQQB3EuoabV0Fk2gGkDsSK8p12OD0aW7KHxsBpKfkxbth94+aYBpNvtuBXvM+Rz4sJKxNKtuswYBENVDTlZyaLdI9rMy8LYbVS4xkv1IukIZnM6p1l7B3T6h/yxU29MCiQJapGtUoIkCiUtX2d8lAlMkT5EfjItNoMui+uq4facBJtksFetWXgE//iBgPTQ42ac9O8GgDE7YRgl9Gyyu9gZ4HTcJG25bnYMgy3Zpap24XBr/LcF/KhraH9SdC2tpXFlukALSBV5jIzqB+X6geq4AWsnoMYpdcV3fC2CazdjpYOl4AAABHElEQVQGef2+WwD8Fl5c1jrTUh/rf9igUacerzJ0xH8LE3Kn7HgHQ7rcq/P/a1TAkwMwojsJGjvi0yC3/tsXDZQIkITYS/VvJ2Uj0hTUNRtgs1kvEZNEASOqTYRbDJFYcu0PCWAaaKye7Nva8fDbpsCPnQYkU36trEMBScEToZlCbs/qx45mXdEnZTI7TWCwkmubJoFeoqykJ0ftCthTbTGarc94e/sY9V0y7i8Zt/Z9+ukck/0gAKPD5Bvm371zItoxFr5/BGIeq20ugOfnIIYcePIxBQYz2WCKqG4Q/lmczsVsdjRKE7b204I0Li02sMtsFIsYwYC6ZY3sZ9Jcmcr869k168GE35A/0tOHGCsBKP8NEV+n3GGS5/9/aODhUXT7opcAAAAASUVORK5CYII="},cz0n:function(Ge,Re,F){Ge.exports={flex_box_center:"flex_box_center___G8W6i",flex_space_between:"flex_space_between___1p_ZB",flex_box_vertical_center:"flex_box_vertical_center___2wivF",flex_box_center_end:"flex_box_center_end___y5a20",flex_box_column:"flex_box_column___6oXp3",tabs:"tabs___sKski",active:"active___10xGM"}},"f0W+":function(Ge,Re,F){Ge.exports={flex_box_center:"flex_box_center___2AWuG",flex_space_between:"flex_space_between___4j1zo",flex_box_vertical_center:"flex_box_vertical_center___3dWcm",flex_box_center_end:"flex_box_center_end___qvHJi",flex_box_column:"flex_box_column___3Eier",tabs:"tabs___25WKT",tabsWrap:"tabsWrap___2lPJE",active:"active___gGp9s"}},f9pc:function(Ge,Re,F){Ge.exports={flex_box_center:"flex_box_center___fO1Sq",flex_space_between:"flex_space_between___2MANs",flex_box_vertical_center:"flex_box_vertical_center___2x-su",flex_box_center_end:"flex_box_center_end___6bZNq",flex_box_column:"flex_box_column___CGTHC",quickPager:"quickPager___2XH6F",disabled:"disabled___2gPWV"}},fyJ8:function(Ge,Re,F){"use strict";var ie=F("rePB"),L=F("VTBJ"),I=F("Ff2n"),j=F("U8pU"),C=F("cDcd"),w=F.n(C),H=F("TSYQ"),U=F.n(H),R=F("c+Xe"),S=F("sR1s");function y(a){return a&&Object(j.a)(a)==="object"&&!Array.isArray(a)&&!C.isValidElement(a)}function v(a){return typeof a=="string"?!0:Object(R.c)(a)}function d(a,s){var e,t=a.prefixCls,i=a.className,T=a.record,_=a.index,m=a.dataIndex,E=a.render,g=a.children,h=a.component,u=h===void 0?"td":h,r=a.colSpan,l=a.rowSpan,f=a.fixLeft,c=a.fixRight,x=a.firstFixLeft,D=a.lastFixLeft,A=a.firstFixRight,B=a.lastFixRight,O=a.appendNode,W=a.additionalProps,P=W===void 0?{}:W,G=a.ellipsis,Q=a.align,re=a.rowType,le=a.isSticky,Ee="".concat(t,"-cell"),_e,ne;if(g)ne=g;else{var Te=Object(S.b)(T,m);if(ne=Te,E){var Ae=E(Te,T,_);y(Ae)?(ne=Ae.children,_e=Ae.props):ne=Ae}}Object(j.a)(ne)==="object"&&!Array.isArray(ne)&&!C.isValidElement(ne)&&(ne=null),G&&(D||A)&&(ne=C.createElement("span",{className:"".concat(Ee,"-content")},ne));var fe=_e||{},J=fe.colSpan,Ie=fe.rowSpan,it=fe.style,et=fe.className,Qe=Object(I.a)(fe,["colSpan","rowSpan","style","className"]),nt=J!==void 0?J:r,Me=Ie!==void 0?Ie:l;if(nt===0||Me===0)return null;var ze={},Je=typeof f=="number",$e=typeof c=="number";Je&&(ze.position="sticky",ze.left=f),$e&&(ze.position="sticky",ze.right=c);var Xe={};Q&&(Xe.textAlign=Q);var Fe,We=G===!0?{showTitle:!0}:G;We&&(We.showTitle||re==="header")&&(typeof ne=="string"||typeof ne=="number"?Fe=ne.toString():C.isValidElement(ne)&&typeof ne.props.children=="string"&&(Fe=ne.props.children));var yt=Object(L.a)(Object(L.a)(Object(L.a)({title:Fe},Qe),P),{},{colSpan:nt&&nt!==1?nt:null,rowSpan:Me&&Me!==1?Me:null,className:U()(Ee,i,(e={},Object(ie.a)(e,"".concat(Ee,"-fix-left"),Je),Object(ie.a)(e,"".concat(Ee,"-fix-left-first"),x),Object(ie.a)(e,"".concat(Ee,"-fix-left-last"),D),Object(ie.a)(e,"".concat(Ee,"-fix-right"),$e),Object(ie.a)(e,"".concat(Ee,"-fix-right-first"),A),Object(ie.a)(e,"".concat(Ee,"-fix-right-last"),B),Object(ie.a)(e,"".concat(Ee,"-ellipsis"),G),Object(ie.a)(e,"".concat(Ee,"-with-append"),O),Object(ie.a)(e,"".concat(Ee,"-fix-sticky"),(Je||$e)&&le),e),P.className,et),style:Object(L.a)(Object(L.a)(Object(L.a)(Object(L.a)({},P.style),Xe),ze),it),ref:v(u)?s:null});return C.createElement(u,Object.assign({},yt),O,ne)}var o=C.forwardRef(d);o.displayName="Cell";var n=C.memo(o,function(a,s){return s.shouldCellUpdate?!s.shouldCellUpdate(s.record,a.record):!1});Re.a=n},hW8S:function(Ge,Re,F){"use strict";F.d(Re,"a",function(){return j}),F.d(Re,"c",function(){return C}),F.d(Re,"b",function(){return w});var ie=F("VTBJ"),L=F("Ff2n"),I=F("Kwbf"),j="RC_TABLE_INTERNAL_COL_DEFINE";function C(H){var U=H.expandable,R=Object(L.a)(H,["expandable"]);return"expandable"in H?Object(ie.a)(Object(ie.a)({},R),U):R}function w(H){return Object.keys(H).reduce(function(U,R){return(R.substr(0,5)==="data-"||R.substr(0,5)==="aria-")&&(U[R]=H[R]),U},{})}},"iL++":function(Ge,Re,F){Ge.exports={flex_box_center:"flex_box_center___2pHUo",flex_space_between:"flex_space_between___3Bfes",flex_box_vertical_center:"flex_box_vertical_center___1thiW",flex_box_center_end:"flex_box_center_end___3Zr7k",flex_box_column:"flex_box_column___3xe1a",list:"list___3rlGv",wrap:"wrap____oZzM",lockWrap:"lockWrap___24eY2",top:"top___3SCOc",sign:"sign____uZ_B",name:"name___2nHyM",img:"img___3Spn7",text:"text___1Pg2L",btns:"btns___Kr_Ti",bottom:"bottom___2_iOx"}},k3GJ:function(Ge,Re,F){"use strict";F.d(Re,"a",function(){return Be});var ie=F("rePB"),L=F("ODXe"),I=F("Ff2n"),j=F("VTBJ"),C=F("cDcd"),w=F("TSYQ"),H=F.n(w),U=F("Zm9Q"),R=F("6cGi"),S=F("KQm4"),y=F("xEkU"),v=F.n(y),d=F("t23M");function o($){var de=Object(C.useRef)(),ve=Object(C.useRef)(!1);function oe(){for(var z=arguments.length,Z=new Array(z),Y=0;Y<z;Y++)Z[Y]=arguments[Y];ve.current||(v.a.cancel(de.current),de.current=v()(function(){$.apply(void 0,Z)}))}return Object(C.useEffect)(function(){return function(){ve.current=!0,v.a.cancel(de.current)}},[]),oe}function n($){var de=Object(C.useRef)([]),ve=Object(C.useState)({}),oe=Object(L.a)(ve,2),z=oe[1],Z=Object(C.useRef)(typeof $=="function"?$():$),Y=o(function(){var ue=Z.current;de.current.forEach(function(ye){ue=ye(ue)}),de.current=[],Z.current=ue,z({})});function se(ue){de.current.push(ue),Y()}return[Z.current,se]}var a=F("4IlW");function s($,de){var ve,oe=$.prefixCls,z=$.id,Z=$.active,Y=$.rtl,se=$.tab,ue=se.key,ye=se.tab,pe=se.disabled,Ce=se.closeIcon,Ne=$.tabBarGutter,qe=$.tabPosition,Ze=$.closable,ct=$.renderWrapper,kt=$.removeAriaLabel,Kt=$.editable,jt=$.onClick,Yt=$.onRemove,Gt=$.onFocus,Ht="".concat(oe,"-tab");C.useEffect(function(){return Yt},[]);var Wt={};qe==="top"||qe==="bottom"?Wt[Y?"marginLeft":"marginRight"]=Ne:Wt.marginBottom=Ne;var nn=Kt&&Ze!==!1&&!pe;function Xt(Pt){if(pe)return;jt(Pt)}function wn(Pt){Pt.preventDefault(),Pt.stopPropagation(),Kt.onEdit("remove",{key:ue,event:Pt})}var cn=C.createElement("div",{key:ue,ref:de,className:H()(Ht,(ve={},Object(ie.a)(ve,"".concat(Ht,"-with-remove"),nn),Object(ie.a)(ve,"".concat(Ht,"-active"),Z),Object(ie.a)(ve,"".concat(Ht,"-disabled"),pe),ve)),style:Wt,onClick:Xt},C.createElement("div",{role:"tab","aria-selected":Z,id:z&&"".concat(z,"-tab-").concat(ue),className:"".concat(Ht,"-btn"),"aria-controls":z&&"".concat(z,"-panel-").concat(ue),"aria-disabled":pe,tabIndex:pe?null:0,onClick:function(Dt){Dt.stopPropagation(),Xt(Dt)},onKeyDown:function(Dt){[a.a.SPACE,a.a.ENTER].includes(Dt.which)&&(Dt.preventDefault(),Xt(Dt))},onFocus:Gt},ye),nn&&C.createElement("button",{type:"button","aria-label":kt||"remove",tabIndex:0,className:"".concat(Ht,"-remove"),onClick:function(Dt){Dt.stopPropagation(),wn(Dt)}},Ce||Kt.removeIcon||"\xD7"));return ct&&(cn=ct(cn)),cn}var e=C.forwardRef(s),t={width:0,height:0,left:0,top:0};function i($,de,ve){return Object(C.useMemo)(function(){for(var oe,z=new Map,Z=de.get((oe=$[0])===null||oe===void 0?void 0:oe.key)||t,Y=Z.left+Z.width,se=0;se<$.length;se+=1){var ue=$[se].key,ye=de.get(ue);if(!ye){var pe;ye=de.get((pe=$[se-1])===null||pe===void 0?void 0:pe.key)||t}var Ce=z.get(ue)||Object(j.a)({},ye);Ce.right=Y-Ce.left-Ce.width,z.set(ue,Ce)}return z},[$.map(function(oe){return oe.key}).join("_"),de,ve])}var T={width:0,height:0,left:0,top:0,right:0};function _($,de,ve,oe,z){var Z=z.tabs,Y=z.tabPosition,se=z.rtl,ue,ye,pe;["top","bottom"].includes(Y)?(ue="width",ye=se?"right":"left",pe=Math.abs(de.left)):(ue="height",ye="top",pe=-de.top);var Ce=de[ue],Ne=ve[ue],qe=oe[ue],Ze=Ce;return Ne+qe>Ce&&(Ze=Ce-qe),Object(C.useMemo)(function(){if(!Z.length)return[0,0];for(var ct=Z.length,kt=ct,Kt=0;Kt<ct;Kt+=1){var jt=$.get(Z[Kt].key)||T;if(jt[ye]+jt[ue]>pe+Ze){kt=Kt-1;break}}for(var Yt=0,Gt=ct-1;Gt>=0;Gt-=1){var Ht=$.get(Z[Gt].key)||T;if(Ht[ye]<pe){Yt=Gt+1;break}}return[Yt,kt]},[$,pe,Ze,Y,Z.map(function(ct){return ct.key}).join("_"),se])}var m=F("wx14"),E=F("1OyB"),g=F("vuIU"),h=F("JX7q"),u=F("Ji7U"),r=F("LK+K"),l=F("I8Z2"),f=F("bT9E"),c=F("2GS6"),x=F("Gytx"),D=F.n(x),A=F("U8pU"),B=/iPhone/i,O=/iPod/i,W=/iPad/i,P=/\bAndroid(?:.+)Mobile\b/i,G=/Android/i,Q=/\bAndroid(?:.+)SD4930UR\b/i,re=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,le=/Windows Phone/i,Ee=/\bWindows(?:.+)ARM\b/i,_e=/BlackBerry/i,ne=/BB10/i,Te=/Opera Mini/i,Ae=/\b(CriOS|Chrome)(?:.+)Mobile/i,fe=/Mobile(?:.+)Firefox\b/i;function J($,de){return $.test(de)}function Ie($){var de=$||(typeof navigator!="undefined"?navigator.userAgent:""),ve=(de||"").split("[FBAN");if(typeof ve[1]!="undefined"){var oe=ve,z=Object(L.a)(oe,1);de=z[0]}if(ve=de.split("Twitter"),typeof ve[1]!="undefined"){var Z=ve,Y=Object(L.a)(Z,1);de=Y[0]}var se={apple:{phone:J(B,de)&&!J(le,de),ipod:J(O,de),tablet:!J(B,de)&&J(W,de)&&!J(le,de),device:(J(B,de)||J(O,de)||J(W,de))&&!J(le,de)},amazon:{phone:J(Q,de),tablet:!J(Q,de)&&J(re,de),device:J(Q,de)||J(re,de)},android:{phone:!J(le,de)&&J(Q,de)||!J(le,de)&&J(P,de),tablet:!J(le,de)&&!J(Q,de)&&!J(P,de)&&(J(re,de)||J(G,de)),device:!J(le,de)&&(J(Q,de)||J(re,de)||J(P,de)||J(G,de))||J(/\bokhttp\b/i,de)},windows:{phone:J(le,de),tablet:J(Ee,de),device:J(le,de)||J(Ee,de)},other:{blackberry:J(_e,de),blackberry10:J(ne,de),opera:J(Te,de),firefox:J(fe,de),chrome:J(Ae,de),device:J(_e,de)||J(ne,de)||J(Te,de)||J(fe,de)||J(Ae,de)},any:null,phone:null,tablet:null};return se.any=se.apple.device||se.android.device||se.windows.device||se.other.device,se.phone=se.apple.phone||se.android.phone||se.windows.phone,se.tablet=se.apple.tablet||se.android.tablet||se.windows.tablet,se}var it=Object(j.a)(Object(j.a)({},Ie()),{},{isMobile:Ie}),et=it;function Qe(){}function nt($,de,ve){var oe=de||"";return $.key||"".concat(oe,"item_").concat(ve)}function Me($){return"".concat($,"-menu-")}function ze($,de){var ve=-1;C.Children.forEach($,function(oe){ve+=1,oe&&oe.type&&oe.type.isMenuItemGroup?C.Children.forEach(oe.props.children,function(z){ve+=1,de(z,ve)}):de(oe,ve)})}function Je($,de,ve){if(!$||ve.find)return;C.Children.forEach($,function(oe){if(oe){var z=oe.type;if(!z||!(z.isSubMenu||z.isMenuItem||z.isMenuItemGroup))return;de.indexOf(oe.key)!==-1?ve.find=!0:oe.props.children&&Je(oe.props.children,de,ve)}})}var $e=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],Xe=function(de){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,oe=de&&typeof de.getBoundingClientRect=="function"&&de.getBoundingClientRect().width;if(oe){if(ve){var z=getComputedStyle(de),Z=z.marginLeft,Y=z.marginRight;oe+=+Z.replace("px","")+ +Y.replace("px","")}oe=+oe.toFixed(6)}return oe||0},Fe=function(de,ve,oe){de&&Object(A.a)(de.style)==="object"&&(de.style[ve]=oe)},We=function(){return et.any},yt=F("bdgK"),ft=F("faye"),ut=F.n(ft),rt=F("wgJM"),Tt=F("l4aY"),_t=F("m+aA"),me=F("c+Xe"),xe=F("zT1h"),De=F("QC+M");function ke($,de,ve){return ve?$[0]===de[0]:$[0]===de[0]&&$[1]===de[1]}function be($,de,ve){var oe=$[de]||{};return Object(j.a)(Object(j.a)({},oe),ve)}function Le($,de,ve,oe){for(var z=ve.points,Z=Object.keys($),Y=0;Y<Z.length;Y+=1){var se=Z[Y];if(ke($[se].points,z,oe))return"".concat(de,"-placement-").concat(se)}return""}var ce=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var $=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test($)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test($==null?void 0:$.substr(0,4)))},ee=F("MNnm");function te($,de){var ve={};return ve[$.toLowerCase()]=de.toLowerCase(),ve["Webkit".concat($)]="webkit".concat(de),ve["Moz".concat($)]="moz".concat(de),ve["ms".concat($)]="MS".concat(de),ve["O".concat($)]="o".concat(de.toLowerCase()),ve}function V($,de){var ve={animationend:te("Animation","AnimationEnd"),transitionend:te("Transition","TransitionEnd")};return $&&("AnimationEvent"in de||delete ve.animationend.animation,"TransitionEvent"in de||delete ve.transitionend.transition),ve}var X=V(Object(ee.a)(),typeof window!="undefined"?window:{}),q={};if(Object(ee.a)()){var ae=document.createElement("div");q=ae.style}var ge={};function we($){if(ge[$])return ge[$];var de=X[$];if(de)for(var ve=Object.keys(de),oe=ve.length,z=0;z<oe;z+=1){var Z=ve[z];if(Object.prototype.hasOwnProperty.call(de,Z)&&Z in q)return ge[$]=de[Z],ge[$]}return""}var je=we("animationend"),at=we("transitionend"),ot=!!(je&&at),Se=je||"animationend",st=at||"transitionend";function tt($,de){if(!$)return null;if(Object(A.a)($)==="object"){var ve=de.replace(/-\w/g,function(oe){return oe[1].toUpperCase()});return $[ve]}return"".concat($,"-").concat(de)}var Ye="none",mt="appear",bt="enter",gt="leave",At="none",ht="prepare",vt="start",Ot="active",Pe="end";function pt($){var de=Object(C.useRef)(!1),ve=Object(C.useState)($),oe=Object(L.a)(ve,2),z=oe[0],Z=oe[1];function Y(se){de.current||Z(se)}return Object(C.useEffect)(function(){return function(){de.current=!0}},[]),[z,Y]}var St=Object(ee.a)()?C.useLayoutEffect:C.useEffect,Ct=St,Mt=function(){var $=C.useRef(null);function de(){rt.a.cancel($.current)}function ve(oe){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;de();var Z=Object(rt.a)(function(){z<=1?oe({isCanceled:function(){return Z!==$.current}}):ve(oe,z-1)});$.current=Z}return C.useEffect(function(){return function(){de()}},[]),[ve,de]},xt=[ht,vt,Ot,Pe],mn=!1,$t=!0;function hn($){return $===Ot||$===Pe}var zt=function($,de){var ve=C.useState(At),oe=Object(L.a)(ve,2),z=oe[0],Z=oe[1],Y=Mt(),se=Object(L.a)(Y,2),ue=se[0],ye=se[1];function pe(){Z(ht)}return Ct(function(){if(z!==At&&z!==Pe){var Ce=xt.indexOf(z),Ne=xt[Ce+1],qe=de(z);qe===mn?Z(Ne):ue(function(Ze){function ct(){if(Ze.isCanceled())return;Z(Ne)}qe===!0?ct():Promise.resolve(qe).then(ct)})}},[$,z]),C.useEffect(function(){return function(){ye()}},[]),[pe,z]},Bt=function($){var de=Object(C.useRef)(),ve=Object(C.useRef)($);ve.current=$;var oe=C.useCallback(function(Y){ve.current(Y)},[]);function z(Y){Y&&(Y.removeEventListener(st,oe),Y.removeEventListener(Se,oe))}function Z(Y){de.current&&de.current!==Y&&z(de.current),Y&&Y!==de.current&&(Y.addEventListener(st,oe),Y.addEventListener(Se,oe),de.current=Y)}return C.useEffect(function(){return function(){z(de.current)}},[]),[Z,z]};function tn($,de,ve,oe){var z=oe.motionEnter,Z=z===void 0?!0:z,Y=oe.motionAppear,se=Y===void 0?!0:Y,ue=oe.motionLeave,ye=ue===void 0?!0:ue,pe=oe.motionDeadline,Ce=oe.motionLeaveImmediately,Ne=oe.onAppearPrepare,qe=oe.onEnterPrepare,Ze=oe.onLeavePrepare,ct=oe.onAppearStart,kt=oe.onEnterStart,Kt=oe.onLeaveStart,jt=oe.onAppearActive,Yt=oe.onEnterActive,Gt=oe.onLeaveActive,Ht=oe.onAppearEnd,Wt=oe.onEnterEnd,nn=oe.onLeaveEnd,Xt=oe.onVisibleChanged,wn=pt(),cn=Object(L.a)(wn,2),Pt=cn[0],Dt=cn[1],Zt=pt(Ye),en=Object(L.a)(Zt,2),wt=en[0],rn=en[1],En=pt(null),an=Object(L.a)(En,2),pn=an[0],xn=an[1],jn=Object(C.useRef)(!1),Qn=Object(C.useRef)(null),Rn=Object(C.useRef)(!1),Jn=Object(C.useRef)(null);function Ei(){var Tn=ve();return Tn||Jn.current}var ii=Object(C.useRef)(!1);function ri(Tn){var un=Ei();if(Tn&&!Tn.deadline&&Tn.target!==un)return;var Hn;wt===mt&&ii.current?Hn=Ht==null?void 0:Ht(un,Tn):wt===bt&&ii.current?Hn=Wt==null?void 0:Wt(un,Tn):wt===gt&&ii.current&&(Hn=nn==null?void 0:nn(un,Tn)),Hn!==!1&&!Rn.current&&(rn(Ye),xn(null))}var Ln=Bt(ri),zn=Object(L.a)(Ln,1),Fn=zn[0],kn=C.useMemo(function(){var Tn,un,Hn;switch(wt){case"appear":return Tn={},Object(ie.a)(Tn,ht,Ne),Object(ie.a)(Tn,vt,ct),Object(ie.a)(Tn,Ot,jt),Tn;case"enter":return un={},Object(ie.a)(un,ht,qe),Object(ie.a)(un,vt,kt),Object(ie.a)(un,Ot,Yt),un;case"leave":return Hn={},Object(ie.a)(Hn,ht,Ze),Object(ie.a)(Hn,vt,Kt),Object(ie.a)(Hn,Ot,Gt),Hn;default:return{}}},[wt]),Li=zt(wt,function(Tn){if(Tn===ht){var un=kn[ht];return un?un(Ei()):mn}if(yn in kn){var Hn;xn(((Hn=kn[yn])===null||Hn===void 0?void 0:Hn.call(kn,Ei(),null))||null)}return yn===Ot&&(Fn(Ei()),pe>0&&(clearTimeout(Qn.current),Qn.current=setTimeout(function(){ri({deadline:!0})},pe))),$t}),Pi=Object(L.a)(Li,2),Hi=Pi[0],yn=Pi[1],Oi=hn(yn);ii.current=Oi,Ct(function(){Dt(de);var Tn=jn.current;if(jn.current=!0,!$)return;var un;!Tn&&de&&se&&(un=mt),Tn&&de&&Z&&(un=bt),(Tn&&!de&&ye||!Tn&&Ce&&!de&&ye)&&(un=gt),un&&(rn(un),Hi())},[de]),Object(C.useEffect)(function(){(wt===mt&&!se||wt===bt&&!Z||wt===gt&&!ye)&&rn(Ye)},[se,Z,ye]),Object(C.useEffect)(function(){return function(){clearTimeout(Qn.current),Rn.current=!0}},[]),Object(C.useEffect)(function(){Pt!==void 0&&wt===Ye&&(Xt==null||Xt(Pt))},[Pt,wt]);var Wi=pn;return kn[ht]&&yn===vt&&(Wi=Object(j.a)({transition:"none"},Wi)),[wt,yn,Wi,Pt!=null?Pt:de]}var gn=function($){Object(u.a)(ve,$);var de=Object(r.a)(ve);function ve(){return Object(E.a)(this,ve),de.apply(this,arguments)}return Object(g.a)(ve,[{key:"render",value:function(){return this.props.children}}]),ve}(C.Component),_n=gn;function Pn($){var de=$;Object(A.a)($)==="object"&&(de=$.transitionSupport);function ve(z){return!!(z.motionName&&de)}var oe=C.forwardRef(function(z,Z){var Y=z.visible,se=Y===void 0?!0:Y,ue=z.removeOnLeave,ye=ue===void 0?!0:ue,pe=z.forceRender,Ce=z.children,Ne=z.motionName,qe=z.leavedClassName,Ze=z.eventProps,ct=ve(z),kt=Object(C.useRef)(),Kt=Object(C.useRef)();function jt(){try{return Object(_t.a)(kt.current||Kt.current)}catch(rn){return null}}var Yt=tn(ct,se,jt,z),Gt=Object(L.a)(Yt,4),Ht=Gt[0],Wt=Gt[1],nn=Gt[2],Xt=Gt[3],wn=C.useRef(Xt);Xt&&(wn.current=!0);var cn=Object(C.useRef)(Z);cn.current=Z;var Pt=C.useCallback(function(rn){kt.current=rn,Object(me.b)(cn.current,rn)},[]),Dt,Zt=Object(j.a)(Object(j.a)({},Ze),{},{visible:se});if(!Ce)Dt=null;else if(Ht===Ye||!ve(z))Xt?Dt=Ce(Object(j.a)({},Zt),Pt):!ye&&wn.current?Dt=Ce(Object(j.a)(Object(j.a)({},Zt),{},{className:qe}),Pt):pe?Dt=Ce(Object(j.a)(Object(j.a)({},Zt),{},{style:{display:"none"}}),Pt):Dt=null;else{var en,wt;Wt===ht?wt="prepare":hn(Wt)?wt="active":Wt===vt&&(wt="start"),Dt=Ce(Object(j.a)(Object(j.a)({},Zt),{},{className:H()(tt(Ne,Ht),(en={},Object(ie.a)(en,tt(Ne,"".concat(Ht,"-").concat(wt)),wt),Object(ie.a)(en,Ne,typeof Ne=="string"),en)),style:nn}),Pt)}return C.createElement(_n,{ref:Kt},Dt)});return oe.displayName="CSSMotion",oe}var Wn=Pn(ot),oi="add",Vn="keep",Ut="remove",Zn="removed";function fi($){var de;return $&&Object(A.a)($)==="object"&&"key"in $?de=$:de={key:$},Object(j.a)(Object(j.a)({},de),{},{key:String(de.key)})}function qn(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return $.map(fi)}function N(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ve=[],oe=0,z=de.length,Z=qn($),Y=qn(de);Z.forEach(function(ye){for(var pe=!1,Ce=oe;Ce<z;Ce+=1){var Ne=Y[Ce];if(Ne.key===ye.key){oe<Ce&&(ve=ve.concat(Y.slice(oe,Ce).map(function(qe){return Object(j.a)(Object(j.a)({},qe),{},{status:oi})})),oe=Ce),ve.push(Object(j.a)(Object(j.a)({},Ne),{},{status:Vn})),oe+=1,pe=!0;break}}pe||ve.push(Object(j.a)(Object(j.a)({},ye),{},{status:Ut}))}),oe<z&&(ve=ve.concat(Y.slice(oe).map(function(ye){return Object(j.a)(Object(j.a)({},ye),{},{status:oi})})));var se={};ve.forEach(function(ye){var pe=ye.key;se[pe]=(se[pe]||0)+1});var ue=Object.keys(se).filter(function(ye){return se[ye]>1});return ue.forEach(function(ye){ve=ve.filter(function(pe){var Ce=pe.key,Ne=pe.status;return Ce!==ye||Ne!==Ut}),ve.forEach(function(pe){pe.key===ye&&(pe.status=Vn)})}),ve}var p=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function b($){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Wn,ve=function(oe){Object(u.a)(Z,oe);var z=Object(r.a)(Z);function Z(){var Y;return Object(E.a)(this,Z),Y=z.apply(this,arguments),Y.state={keyEntities:[]},Y.removeKey=function(se){Y.setState(function(ue){var ye=ue.keyEntities;return{keyEntities:ye.map(function(pe){return pe.key!==se?pe:Object(j.a)(Object(j.a)({},pe),{},{status:Zn})})}})},Y}return Object(g.a)(Z,[{key:"render",value:function(){var se=this,ue=this.state.keyEntities,ye=this.props,pe=ye.component,Ce=ye.children,Ne=ye.onVisibleChanged,qe=Object(I.a)(ye,["component","children","onVisibleChanged"]),Ze=pe||C.Fragment,ct={};return p.forEach(function(kt){ct[kt]=qe[kt],delete qe[kt]}),delete qe.keys,C.createElement(Ze,qe,ue.map(function(kt){var Kt=kt.status,jt=Object(I.a)(kt,["status"]),Yt=Kt===oi||Kt===Vn;return C.createElement(de,Object(m.a)({},ct,{key:jt.key,visible:Yt,eventProps:jt,onVisibleChanged:function(Ht){Ne==null||Ne(Ht,{key:jt.key}),Ht||se.removeKey(jt.key)}}),Ce)}))}}],[{key:"getDerivedStateFromProps",value:function(se,ue){var ye=se.keys,pe=ue.keyEntities,Ce=qn(ye),Ne=N(pe,Ce);return{keyEntities:Ne.filter(function(qe){var Ze=pe.find(function(ct){var kt=ct.key;return qe.key===kt});return!(Ze&&Ze.status===Zn&&qe.status===Ut)})}}}]),Z}(C.Component);return ve.defaultProps={component:"div"},ve}var M=b(ot),K=Wn;function k($){var de=$.prefixCls,ve=$.motion,oe=$.animation,z=$.transitionName;return ve||(oe?{motionName:"".concat(de,"-").concat(oe)}:z?{motionName:z}:null)}function he($){var de=$.prefixCls,ve=$.visible,oe=$.zIndex,z=$.mask,Z=$.maskMotion,Y=$.maskAnimation,se=$.maskTransitionName;if(!z)return null;var ue={};return(Z||se||Y)&&(ue=Object(j.a)({motionAppear:!0},k({motion:Z,prefixCls:de,transitionName:se,animation:Y}))),C.createElement(K,Object(m.a)({},ue,{visible:ve,removeOnLeave:!0}),function(ye){var pe=ye.className;return C.createElement("div",{style:{zIndex:oe},className:H()("".concat(de,"-mask"),pe)})})}var He=F("9mu1"),lt=F("o0o1"),Et=F.n(lt),Ke=F("HaE+"),It=["measure","align",null,"motion"],Nt=function($,de){var ve=Object(C.useState)(null),oe=Object(L.a)(ve,2),z=oe[0],Z=oe[1],Y=Object(C.useRef)(),se=Object(C.useRef)(!1);function ue(Ce){se.current||Z(Ce)}function ye(){rt.a.cancel(Y.current)}function pe(Ce){ye(),Y.current=Object(rt.a)(function(){ue(function(Ne){switch(z){case"align":return"motion";case"motion":return"stable";default:}return Ne}),Ce==null||Ce()})}return Object(C.useEffect)(function(){ue("measure")},[$]),Object(C.useEffect)(function(){switch(z){case"measure":de();break;default:}z&&(Y.current=Object(rt.a)(Object(Ke.a)(Et.a.mark(function Ce(){var Ne,qe;return Et.a.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:Ne=It.indexOf(z),qe=It[Ne+1],qe&&Ne!==-1&&ue(qe);case 3:case"end":return ct.stop()}},Ce)}))))},[z]),Object(C.useEffect)(function(){return function(){se.current=!0,ye()}},[]),[z,pe]},on=function($){var de=C.useState({width:0,height:0}),ve=Object(L.a)(de,2),oe=ve[0],z=ve[1];function Z(se){z({width:se.offsetWidth,height:se.offsetHeight})}var Y=C.useMemo(function(){var se={};if($){var ue=oe.width,ye=oe.height;$.indexOf("height")!==-1&&ye?se.height=ye:$.indexOf("minHeight")!==-1&&ye&&(se.minHeight=ye),$.indexOf("width")!==-1&&ue?se.width=ue:$.indexOf("minWidth")!==-1&&ue&&(se.minWidth=ue)}return se},[$,oe]);return[Y,Z]},Nn=C.forwardRef(function($,de){var ve=$.visible,oe=$.prefixCls,z=$.className,Z=$.style,Y=$.children,se=$.zIndex,ue=$.stretch,ye=$.destroyPopupOnHide,pe=$.forceRender,Ce=$.align,Ne=$.point,qe=$.getRootDomNode,Ze=$.getClassNameFromAlign,ct=$.onAlign,kt=$.onMouseEnter,Kt=$.onMouseLeave,jt=$.onMouseDown,Yt=$.onTouchStart,Gt=Object(C.useRef)(),Ht=Object(C.useRef)(),Wt=Object(C.useState)(),nn=Object(L.a)(Wt,2),Xt=nn[0],wn=nn[1],cn=on(ue),Pt=Object(L.a)(cn,2),Dt=Pt[0],Zt=Pt[1];function en(){ue&&Zt(qe())}var wt=Nt(ve,en),rn=Object(L.a)(wt,2),En=rn[0],an=rn[1],pn=Object(C.useRef)();function xn(){return Ne||qe}function jn(){var Ln;(Ln=Gt.current)===null||Ln===void 0||Ln.forceAlign()}function Qn(Ln,zn){var Fn=Ze(zn);Xt!==Fn&&wn(Fn),En==="align"&&(Xt!==Fn?Promise.resolve().then(function(){jn()}):an(function(){var kn;(kn=pn.current)===null||kn===void 0||kn.call(pn)}),ct==null||ct(Ln,zn))}var Rn=Object(j.a)({},k($));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Ln){var zn=Rn[Ln];Rn[Ln]=function(Fn,kn){return an(),zn==null?void 0:zn(Fn,kn)}});function Jn(){return new Promise(function(Ln){pn.current=Ln})}C.useEffect(function(){!Rn.motionName&&En==="motion"&&an()},[Rn.motionName,En]),C.useImperativeHandle(de,function(){return{forceAlign:jn,getElement:function(){return Ht.current}}});var Ei=Object(j.a)(Object(j.a)({},Dt),{},{zIndex:se,opacity:En==="motion"||En==="stable"||!ve?void 0:0,pointerEvents:En==="stable"?void 0:"none"},Z),ii=!0;(Ce==null?void 0:Ce.points)&&(En==="align"||En==="stable")&&(ii=!1);var ri=Y;return C.Children.count(Y)>1&&(ri=C.createElement("div",{className:"".concat(oe,"-content")},Y)),C.createElement(K,Object(m.a)({visible:ve,ref:Ht,leavedClassName:"".concat(oe,"-hidden")},Rn,{onAppearPrepare:Jn,onEnterPrepare:Jn,removeOnLeave:ye,forceRender:pe}),function(Ln,zn){var Fn=Ln.className,kn=Ln.style,Li=H()(oe,z,Xt,Fn);return C.createElement(He.a,{target:xn(),key:"popup",ref:Gt,monitorWindowResize:!0,disabled:ii,align:Ce,onAlign:Qn},C.createElement("div",{ref:zn,className:Li,onMouseEnter:kt,onMouseLeave:Kt,onMouseDownCapture:jt,onTouchStartCapture:Yt,style:Object(j.a)(Object(j.a)({},kn),Ei)},ri))})});Nn.displayName="PopupInner";var Yn=Nn,Oe=C.forwardRef(function($,de){var ve=$.prefixCls,oe=$.visible,z=$.zIndex,Z=$.children,Y=$.mobile;Y=Y===void 0?{}:Y;var se=Y.popupClassName,ue=Y.popupStyle,ye=Y.popupMotion,pe=ye===void 0?{}:ye,Ce=Y.popupRender,Ne=C.useRef();C.useImperativeHandle(de,function(){return{forceAlign:function(){},getElement:function(){return Ne.current}}});var qe=Object(j.a)({zIndex:z},ue),Ze=Z;return C.Children.count(Z)>1&&(Ze=C.createElement("div",{className:"".concat(ve,"-content")},Z)),Ce&&(Ze=Ce(Ze)),C.createElement(K,Object(m.a)({visible:oe,ref:Ne,removeOnLeave:!0},pe),function(ct,kt){var Kt=ct.className,jt=ct.style,Yt=H()(ve,se,Kt);return C.createElement("div",{ref:kt,className:Yt,style:Object(j.a)(Object(j.a)({},jt),qe)},Ze)})});Oe.displayName="MobilePopupInner";var In=Oe,si=["visible","mobile"],Xn=C.forwardRef(function($,de){var ve=$.visible,oe=$.mobile,z=Object(I.a)($,si),Z=Object(C.useState)(ve),Y=Object(L.a)(Z,2),se=Y[0],ue=Y[1],ye=Object(C.useState)(!1),pe=Object(L.a)(ye,2),Ce=pe[0],Ne=pe[1],qe=Object(j.a)(Object(j.a)({},z),{},{visible:se});Object(C.useEffect)(function(){ue(ve),ve&&oe&&Ne(ce())},[ve,oe]);var Ze=Ce?C.createElement(In,Object(m.a)({},qe,{mobile:oe,ref:de})):C.createElement(Yn,Object(m.a)({},qe,{ref:de}));return C.createElement("div",null,C.createElement(he,qe),Ze)});Xn.displayName="Popup";var pi=Xn,$n=C.createContext(null),Cn=$n;function Kn(){}function li(){return""}function mi($){return $?$.ownerDocument:window.document}var Ti=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Ni($){var de=function(ve){Object(u.a)(z,ve);var oe=Object(r.a)(z);function z(Z){var Y;Object(E.a)(this,z),Y=oe.call(this,Z),Y.popupRef=C.createRef(),Y.triggerRef=C.createRef(),Y.attachId=void 0,Y.clickOutsideHandler=void 0,Y.touchOutsideHandler=void 0,Y.contextMenuOutsideHandler1=void 0,Y.contextMenuOutsideHandler2=void 0,Y.mouseDownTimeout=void 0,Y.focusTime=void 0,Y.preClickTime=void 0,Y.preTouchTime=void 0,Y.delayTimer=void 0,Y.hasPopupMouseDown=void 0,Y.onMouseEnter=function(ue){var ye=Y.props.mouseEnterDelay;Y.fireEvents("onMouseEnter",ue),Y.delaySetPopupVisible(!0,ye,ye?null:ue)},Y.onMouseMove=function(ue){Y.fireEvents("onMouseMove",ue),Y.setPoint(ue)},Y.onMouseLeave=function(ue){Y.fireEvents("onMouseLeave",ue),Y.delaySetPopupVisible(!1,Y.props.mouseLeaveDelay)},Y.onPopupMouseEnter=function(){Y.clearDelayTimer()},Y.onPopupMouseLeave=function(ue){var ye;if(ue.relatedTarget&&!ue.relatedTarget.setTimeout&&Object(Tt.a)((ye=Y.popupRef.current)===null||ye===void 0?void 0:ye.getElement(),ue.relatedTarget))return;Y.delaySetPopupVisible(!1,Y.props.mouseLeaveDelay)},Y.onFocus=function(ue){Y.fireEvents("onFocus",ue),Y.clearDelayTimer(),Y.isFocusToShow()&&(Y.focusTime=Date.now(),Y.delaySetPopupVisible(!0,Y.props.focusDelay))},Y.onMouseDown=function(ue){Y.fireEvents("onMouseDown",ue),Y.preClickTime=Date.now()},Y.onTouchStart=function(ue){Y.fireEvents("onTouchStart",ue),Y.preTouchTime=Date.now()},Y.onBlur=function(ue){Y.fireEvents("onBlur",ue),Y.clearDelayTimer(),Y.isBlurToHide()&&Y.delaySetPopupVisible(!1,Y.props.blurDelay)},Y.onContextMenu=function(ue){ue.preventDefault(),Y.fireEvents("onContextMenu",ue),Y.setPopupVisible(!0,ue)},Y.onContextMenuClose=function(){Y.isContextMenuToShow()&&Y.close()},Y.onClick=function(ue){if(Y.fireEvents("onClick",ue),Y.focusTime){var ye;if(Y.preClickTime&&Y.preTouchTime?ye=Math.min(Y.preClickTime,Y.preTouchTime):Y.preClickTime?ye=Y.preClickTime:Y.preTouchTime&&(ye=Y.preTouchTime),Math.abs(ye-Y.focusTime)<20)return;Y.focusTime=0}Y.preClickTime=0,Y.preTouchTime=0,Y.isClickToShow()&&(Y.isClickToHide()||Y.isBlurToHide())&&ue&&ue.preventDefault&&ue.preventDefault();var pe=!Y.state.popupVisible;(Y.isClickToHide()&&!pe||pe&&Y.isClickToShow())&&Y.setPopupVisible(!Y.state.popupVisible,ue)},Y.onPopupMouseDown=function(){if(Y.hasPopupMouseDown=!0,clearTimeout(Y.mouseDownTimeout),Y.mouseDownTimeout=window.setTimeout(function(){Y.hasPopupMouseDown=!1},0),Y.context){var ue;(ue=Y.context).onPopupMouseDown.apply(ue,arguments)}},Y.onDocumentClick=function(ue){if(Y.props.mask&&!Y.props.maskClosable)return;var ye=ue.target,pe=Y.getRootDomNode(),Ce=Y.getPopupDomNode();(!Object(Tt.a)(pe,ye)||Y.isContextMenuOnly())&&!Object(Tt.a)(Ce,ye)&&!Y.hasPopupMouseDown&&Y.close()},Y.getRootDomNode=function(){var ue=Y.props.getTriggerDOMNode;if(ue)return ue(Y.triggerRef.current);try{var ye=Object(_t.a)(Y.triggerRef.current);if(ye)return ye}catch(pe){}return ut.a.findDOMNode(Object(h.a)(Y))},Y.getPopupClassNameFromAlign=function(ue){var ye=[],pe=Y.props,Ce=pe.popupPlacement,Ne=pe.builtinPlacements,qe=pe.prefixCls,Ze=pe.alignPoint,ct=pe.getPopupClassNameFromAlign;return Ce&&Ne&&ye.push(Le(Ne,qe,ue,Ze)),ct&&ye.push(ct(ue)),ye.join(" ")},Y.getComponent=function(){var ue=Y.props,ye=ue.prefixCls,pe=ue.destroyPopupOnHide,Ce=ue.popupClassName,Ne=ue.onPopupAlign,qe=ue.popupMotion,Ze=ue.popupAnimation,ct=ue.popupTransitionName,kt=ue.popupStyle,Kt=ue.mask,jt=ue.maskAnimation,Yt=ue.maskTransitionName,Gt=ue.maskMotion,Ht=ue.zIndex,Wt=ue.popup,nn=ue.stretch,Xt=ue.alignPoint,wn=ue.mobile,cn=ue.forceRender,Pt=Y.state,Dt=Pt.popupVisible,Zt=Pt.point,en=Y.getPopupAlign(),wt={};return Y.isMouseEnterToShow()&&(wt.onMouseEnter=Y.onPopupMouseEnter),Y.isMouseLeaveToHide()&&(wt.onMouseLeave=Y.onPopupMouseLeave),wt.onMouseDown=Y.onPopupMouseDown,wt.onTouchStart=Y.onPopupMouseDown,C.createElement(pi,Object(m.a)({prefixCls:ye,destroyPopupOnHide:pe,visible:Dt,point:Xt&&Zt,className:Ce,align:en,onAlign:Ne,animation:Ze,getClassNameFromAlign:Y.getPopupClassNameFromAlign},wt,{stretch:nn,getRootDomNode:Y.getRootDomNode,style:kt,mask:Kt,zIndex:Ht,transitionName:ct,maskAnimation:jt,maskTransitionName:Yt,maskMotion:Gt,ref:Y.popupRef,motion:qe,mobile:wn,forceRender:cn}),typeof Wt=="function"?Wt():Wt)},Y.attachParent=function(ue){rt.a.cancel(Y.attachId);var ye=Y.props,pe=ye.getPopupContainer,Ce=ye.getDocument,Ne=Y.getRootDomNode(),qe;pe?(Ne||pe.length===0)&&(qe=pe(Ne)):qe=Ce(Y.getRootDomNode()).body,qe?qe.appendChild(ue):Y.attachId=Object(rt.a)(function(){Y.attachParent(ue)})},Y.getContainer=function(){var ue=Y.props.getDocument,ye=ue(Y.getRootDomNode()).createElement("div");return ye.style.position="absolute",ye.style.top="0",ye.style.left="0",ye.style.width="100%",Y.attachParent(ye),ye},Y.setPoint=function(ue){var ye=Y.props.alignPoint;if(!ye||!ue)return;Y.setState({point:{pageX:ue.pageX,pageY:ue.pageY}})},Y.handlePortalUpdate=function(){Y.state.prevPopupVisible!==Y.state.popupVisible&&Y.props.afterPopupVisibleChange(Y.state.popupVisible)},Y.triggerContextValue={onPopupMouseDown:Y.onPopupMouseDown};var se;return"popupVisible"in Z?se=!!Z.popupVisible:se=!!Z.defaultPopupVisible,Y.state={prevPopupVisible:se,popupVisible:se},Ti.forEach(function(ue){Y["fire".concat(ue)]=function(ye){Y.fireEvents(ue,ye)}}),Y}return Object(g.a)(z,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Y=this.props,se=this.state;if(se.popupVisible){var ue;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(ue=Y.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(xe.a)(ue,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(ue=ue||Y.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(xe.a)(ue,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(ue=ue||Y.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(xe.a)(ue,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(xe.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),rt.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var Y;return((Y=this.popupRef.current)===null||Y===void 0?void 0:Y.getElement())||null}},{key:"getPopupAlign",value:function(){var Y=this.props,se=Y.popupPlacement,ue=Y.popupAlign,ye=Y.builtinPlacements;return se&&ye?be(ye,se,ue):ue}},{key:"setPopupVisible",value:function(Y,se){var ue=this.props.alignPoint,ye=this.state.popupVisible;this.clearDelayTimer(),ye!==Y&&("popupVisible"in this.props||this.setState({popupVisible:Y,prevPopupVisible:ye}),this.props.onPopupVisibleChange(Y)),ue&&se&&Y&&this.setPoint(se)}},{key:"delaySetPopupVisible",value:function(Y,se,ue){var ye=this,pe=se*1e3;if(this.clearDelayTimer(),pe){var Ce=ue?{pageX:ue.pageX,pageY:ue.pageY}:null;this.delayTimer=window.setTimeout(function(){ye.setPopupVisible(Y,Ce),ye.clearDelayTimer()},pe)}else this.setPopupVisible(Y,ue)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(Y){var se=this.props.children.props,ue=this.props;return se[Y]&&ue[Y]?this["fire".concat(Y)]:se[Y]||ue[Y]}},{key:"isClickToShow",value:function(){var Y=this.props,se=Y.action,ue=Y.showAction;return se.indexOf("click")!==-1||ue.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var Y=this.props.action;return Y==="contextMenu"||Y.length===1&&Y[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var Y=this.props,se=Y.action,ue=Y.showAction;return se.indexOf("contextMenu")!==-1||ue.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var Y=this.props,se=Y.action,ue=Y.hideAction;return se.indexOf("click")!==-1||ue.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var Y=this.props,se=Y.action,ue=Y.showAction;return se.indexOf("hover")!==-1||ue.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var Y=this.props,se=Y.action,ue=Y.hideAction;return se.indexOf("hover")!==-1||ue.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var Y=this.props,se=Y.action,ue=Y.showAction;return se.indexOf("focus")!==-1||ue.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var Y=this.props,se=Y.action,ue=Y.hideAction;return se.indexOf("focus")!==-1||ue.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var Y;(Y=this.popupRef.current)===null||Y===void 0||Y.forceAlign()}}},{key:"fireEvents",value:function(Y,se){var ue=this.props.children.props[Y];ue&&ue(se);var ye=this.props[Y];ye&&ye(se)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var Y=this.state.popupVisible,se=this.props,ue=se.children,ye=se.forceRender,pe=se.alignPoint,Ce=se.className,Ne=se.autoDestroy,qe=C.Children.only(ue),Ze={key:"trigger"};this.isContextMenuToShow()?Ze.onContextMenu=this.onContextMenu:Ze.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(Ze.onClick=this.onClick,Ze.onMouseDown=this.onMouseDown,Ze.onTouchStart=this.onTouchStart):(Ze.onClick=this.createTwoChains("onClick"),Ze.onMouseDown=this.createTwoChains("onMouseDown"),Ze.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(Ze.onMouseEnter=this.onMouseEnter,pe&&(Ze.onMouseMove=this.onMouseMove)):Ze.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?Ze.onMouseLeave=this.onMouseLeave:Ze.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(Ze.onFocus=this.onFocus,Ze.onBlur=this.onBlur):(Ze.onFocus=this.createTwoChains("onFocus"),Ze.onBlur=this.createTwoChains("onBlur"));var ct=H()(qe&&qe.props&&qe.props.className,Ce);ct&&(Ze.className=ct);var kt=Object(j.a)({},Ze);Object(me.c)(qe)&&(kt.ref=Object(me.a)(this.triggerRef,qe.ref));var Kt=C.cloneElement(qe,kt),jt;return(Y||this.popupRef.current||ye)&&(jt=C.createElement($,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!Y&&Ne&&(jt=null),C.createElement(Cn.Provider,{value:this.triggerContextValue},Kt,jt)}}],[{key:"getDerivedStateFromProps",value:function(Y,se){var ue=Y.popupVisible,ye={};return ue!==void 0&&se.popupVisible!==ue&&(ye.popupVisible=ue,ye.prevPopupVisible=se.popupVisible),ye}}]),z}(C.Component);return de.contextType=Cn,de.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:li,getDocument:mi,onPopupVisibleChange:Kn,afterPopupVisibleChange:Kn,onPopupAlign:Kn,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},de}var ui=Ni(De.a),Dn={adjustX:1,adjustY:1},ei={topLeft:{points:["bl","tl"],overflow:Dn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Dn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Dn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Dn,offset:[4,0]}},Ri={topLeft:{points:["bl","tl"],overflow:Dn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Dn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Dn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Dn,offset:[4,0]}},gi=ei,ln=0,Ft={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},vn=function(de,ve,oe){var z=Me(ve),Z=de.getState();de.setState({defaultActiveFirst:Object(j.a)(Object(j.a)({},Z.defaultActiveFirst),{},Object(ie.a)({},z,oe))})},Qt=function($){Object(u.a)(ve,$);var de=Object(r.a)(ve);function ve(oe){var z;Object(E.a)(this,ve),z=de.call(this,oe),z.onDestroy=function(pe){z.props.onDestroy(pe)},z.onKeyDown=function(pe){var Ce=pe.keyCode,Ne=z.menuInstance,qe=z.props.store,Ze=z.getVisible();if(Ce===a.a.ENTER)return z.onTitleClick(pe),vn(qe,z.props.eventKey,!0),!0;if(Ce===a.a.RIGHT)return Ze?Ne.onKeyDown(pe):(z.triggerOpenChange(!0),vn(qe,z.props.eventKey,!0)),!0;if(Ce===a.a.LEFT){var ct;if(Ze)ct=Ne.onKeyDown(pe);else return;return ct||(z.triggerOpenChange(!1),ct=!0),ct}return Ze&&(Ce===a.a.UP||Ce===a.a.DOWN)?Ne.onKeyDown(pe):void 0},z.onOpenChange=function(pe){z.props.onOpenChange(pe)},z.onPopupVisibleChange=function(pe){z.triggerOpenChange(pe,pe?"mouseenter":"mouseleave")},z.onMouseEnter=function(pe){var Ce=z.props,Ne=Ce.eventKey,qe=Ce.onMouseEnter,Ze=Ce.store;vn(Ze,z.props.eventKey,!1),qe({key:Ne,domEvent:pe})},z.onMouseLeave=function(pe){var Ce=z.props,Ne=Ce.parentMenu,qe=Ce.eventKey,Ze=Ce.onMouseLeave;Ne.subMenuInstance=Object(h.a)(z),Ze({key:qe,domEvent:pe})},z.onTitleMouseEnter=function(pe){var Ce=z.props,Ne=Ce.eventKey,qe=Ce.onItemHover,Ze=Ce.onTitleMouseEnter;qe({key:Ne,hover:!0}),Ze({key:Ne,domEvent:pe})},z.onTitleMouseLeave=function(pe){var Ce=z.props,Ne=Ce.parentMenu,qe=Ce.eventKey,Ze=Ce.onItemHover,ct=Ce.onTitleMouseLeave;Ne.subMenuInstance=Object(h.a)(z),Ze({key:qe,hover:!1}),ct({key:qe,domEvent:pe})},z.onTitleClick=function(pe){var Ce=Object(h.a)(z),Ne=Ce.props;if(Ne.onTitleClick({key:Ne.eventKey,domEvent:pe}),Ne.triggerSubMenuAction==="hover")return;z.triggerOpenChange(!z.getVisible(),"click"),vn(Ne.store,z.props.eventKey,!1)},z.onSubMenuClick=function(pe){typeof z.props.onClick=="function"&&z.props.onClick(z.addKeyPath(pe))},z.onSelect=function(pe){z.props.onSelect(pe)},z.onDeselect=function(pe){z.props.onDeselect(pe)},z.getPrefixCls=function(){return"".concat(z.props.rootPrefixCls,"-submenu")},z.getActiveClassName=function(){return"".concat(z.getPrefixCls(),"-active")},z.getDisabledClassName=function(){return"".concat(z.getPrefixCls(),"-disabled")},z.getSelectedClassName=function(){return"".concat(z.getPrefixCls(),"-selected")},z.getOpenClassName=function(){return"".concat(z.props.rootPrefixCls,"-submenu-open")},z.getVisible=function(){return z.state.isOpen},z.getMode=function(){return z.state.mode},z.saveMenuInstance=function(pe){z.menuInstance=pe},z.addKeyPath=function(pe){return Object(j.a)(Object(j.a)({},pe),{},{keyPath:(pe.keyPath||[]).concat(z.props.eventKey)})},z.triggerOpenChange=function(pe,Ce){var Ne=z.props.eventKey,qe=function(){z.onOpenChange({key:Ne,item:Object(h.a)(z),trigger:Ce,open:pe})};Ce==="mouseenter"?z.mouseenterTimeout=setTimeout(function(){qe()},0):qe()},z.isChildrenSelected=function(){var pe={find:!1};return Je(z.props.children,z.props.selectedKeys,pe),pe.find},z.isInlineMode=function(){return z.getMode()==="inline"},z.adjustWidth=function(){if(!z.subMenuTitle||!z.menuInstance)return;var pe=ft.findDOMNode(z.menuInstance);if(pe.offsetWidth>=z.subMenuTitle.offsetWidth)return;pe.style.minWidth="".concat(z.subMenuTitle.offsetWidth,"px")},z.saveSubMenuTitle=function(pe){z.subMenuTitle=pe},z.getBaseProps=function(){var pe=Object(h.a)(z),Ce=pe.props,Ne=z.getMode();return{mode:Ne==="horizontal"?"vertical":Ne,visible:z.getVisible(),level:Ce.level+1,inlineIndent:Ce.inlineIndent,focusable:!1,onClick:z.onSubMenuClick,onSelect:z.onSelect,onDeselect:z.onDeselect,onDestroy:z.onDestroy,selectedKeys:Ce.selectedKeys,eventKey:"".concat(Ce.eventKey,"-menu-"),openKeys:Ce.openKeys,motion:Ce.motion,onOpenChange:z.onOpenChange,subMenuOpenDelay:Ce.subMenuOpenDelay,parentMenu:Object(h.a)(z),subMenuCloseDelay:Ce.subMenuCloseDelay,forceSubMenuRender:Ce.forceSubMenuRender,triggerSubMenuAction:Ce.triggerSubMenuAction,builtinPlacements:Ce.builtinPlacements,defaultActiveFirst:Ce.store.getState().defaultActiveFirst[Me(Ce.eventKey)],multiple:Ce.multiple,prefixCls:Ce.rootPrefixCls,id:z.internalMenuId,manualRef:z.saveMenuInstance,itemIcon:Ce.itemIcon,expandIcon:Ce.expandIcon,direction:Ce.direction}},z.getMotion=function(pe,Ce){var Ne=Object(h.a)(z),qe=Ne.haveRendered,Ze=z.props,ct=Ze.motion,kt=Ze.rootPrefixCls,Kt=Object(j.a)(Object(j.a)({},ct),{},{leavedClassName:"".concat(kt,"-hidden"),removeOnLeave:!1,motionAppear:qe||!Ce||pe!=="inline"});return Kt};var Z=oe.store,Y=oe.eventKey,se=Z.getState(),ue=se.defaultActiveFirst;z.isRootMenu=!1;var ye=!1;return ue&&(ye=ue[Y]),vn(Z,Y,ye),z.state={mode:oe.mode,isOpen:oe.isOpen},z}return Object(g.a)(ve,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var z=this,Z=this.props,Y=Z.mode,se=Z.parentMenu,ue=Z.manualRef,ye=Z.isOpen,pe=function(){z.setState({mode:Y,isOpen:ye})},Ce=ye!==this.state.isOpen,Ne=Y!==this.state.mode;if((Ne||Ce)&&(rt.a.cancel(this.updateStateRaf),Ne?this.updateStateRaf=Object(rt.a)(pe):pe()),ue&&ue(this),Y!=="horizontal"||!(se==null?void 0:se.isRootMenu)||!ye)return;this.minWidthTimeout=setTimeout(function(){return z.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var z=this.props,Z=z.onDestroy,Y=z.eventKey;Z&&Z(Y),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),rt.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(z,Z){var Y=this.getBaseProps();return C.createElement(Si,Object(m.a)({},Y,{id:this.internalMenuId,className:z,style:Z}),this.props.children)}},{key:"renderChildren",value:function(){var z=this,Z=this.getBaseProps(),Y=Z.mode,se=Z.visible,ue=Z.forceSubMenuRender,ye=Z.direction,pe=this.getMotion(Y,se);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||se||ue,!this.haveOpened)return C.createElement("div",null);var Ce=H()("".concat(Z.prefixCls,"-sub"),Object(ie.a)({},"".concat(Z.prefixCls,"-rtl"),ye==="rtl"));return this.isInlineMode()?C.createElement(K,Object(m.a)({visible:Z.visible,forceRender:ue},pe),function(Ne){var qe=Ne.className,Ze=Ne.style,ct=H()(Ce,qe);return z.renderPopupMenu(ct,Ze)}):this.renderPopupMenu(Ce)}},{key:"render",value:function(){var z,Z,Y,se=Object(j.a)({},this.props),ue=this.getVisible(),ye=this.getPrefixCls(),pe=this.isInlineMode(),Ce=this.getMode(),Ne=H()(ye,"".concat(ye,"-").concat(Ce),(z={},Object(ie.a)(z,se.className,!!se.className),Object(ie.a)(z,this.getOpenClassName(),ue),Object(ie.a)(z,this.getActiveClassName(),se.active||ue&&!pe),Object(ie.a)(z,this.getDisabledClassName(),se.disabled),Object(ie.a)(z,this.getSelectedClassName(),this.isChildrenSelected()),z));this.internalMenuId||(se.eventKey?this.internalMenuId="".concat(se.eventKey,"$Menu"):(ln+=1,this.internalMenuId="$__$".concat(ln,"$Menu")));var qe={},Ze={},ct={};se.disabled||(qe={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Ze={onClick:this.onTitleClick},ct={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var kt={},Kt=se.direction,jt=Kt==="rtl";pe&&(jt?kt.paddingRight=se.inlineIndent*se.level:kt.paddingLeft=se.inlineIndent*se.level);var Yt={};this.getVisible()&&(Yt={"aria-owns":this.internalMenuId});var Gt=null;Ce!=="horizontal"&&(Gt=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Gt=C.createElement(this.props.expandIcon,Object(j.a)({},this.props))));var Ht=C.createElement("div",Object(m.a)({ref:this.saveSubMenuTitle,style:kt,className:"".concat(ye,"-title"),role:"button"},ct,Ze,{"aria-expanded":ue},Yt,{"aria-haspopup":"true",title:typeof se.title=="string"?se.title:void 0}),se.title,Gt||C.createElement("i",{className:"".concat(ye,"-arrow")})),Wt=this.renderChildren(),nn=((Z=se.parentMenu)===null||Z===void 0?void 0:Z.isRootMenu)?se.parentMenu.props.getPopupContainer:function(xn){return xn.parentNode},Xt=Ft[Ce],wn=se.popupOffset?{offset:se.popupOffset}:{},cn=H()((Y={},Object(ie.a)(Y,se.popupClassName,se.popupClassName&&!pe),Object(ie.a)(Y,"".concat(ye,"-rtl"),jt),Y)),Pt=se.disabled,Dt=se.triggerSubMenuAction,Zt=se.subMenuOpenDelay,en=se.forceSubMenuRender,wt=se.subMenuCloseDelay,rn=se.builtinPlacements;$e.forEach(function(xn){return delete se[xn]}),delete se.onClick;var En=jt?Object(j.a)(Object(j.a)({},Ri),rn):Object(j.a)(Object(j.a)({},ei),rn);delete se.direction;var an=this.getBaseProps(),pn=pe?null:this.getMotion(an.mode,an.visible);return C.createElement("li",Object(m.a)({},se,qe,{className:Ne,role:"menuitem"}),C.createElement(ui,{prefixCls:ye,popupClassName:H()("".concat(ye,"-popup"),cn),getPopupContainer:nn,builtinPlacements:En,popupPlacement:Xt,popupVisible:pe?!1:ue,popupAlign:wn,popup:pe?null:Wt,action:Pt||pe?[]:[Dt],mouseEnterDelay:Zt,mouseLeaveDelay:wt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:en,popupMotion:pn},Ht),pe?Wt:null)}}]),ve}(C.Component);Qt.defaultProps={onMouseEnter:Qe,onMouseLeave:Qe,onTitleMouseEnter:Qe,onTitleMouseLeave:Qe,onTitleClick:Qe,manualRef:Qe,mode:"vertical",title:""};var An=Object(l.b)(function($,de){var ve=$.openKeys,oe=$.activeKey,z=$.selectedKeys,Z=de.eventKey,Y=de.subMenuKey;return{isOpen:ve.indexOf(Z)>-1,active:oe[Y]===Z,selectedKeys:z}})(Qt);An.isSubMenu=!0;var sn=An,vi="menuitem-overflowed",On=.5,xi=function($){Object(u.a)(ve,$);var de=Object(r.a)(ve);function ve(){var oe;return Object(E.a)(this,ve),oe=de.apply(this,arguments),oe.resizeObserver=null,oe.mutationObserver=null,oe.originalTotalWidth=0,oe.overflowedItems=[],oe.menuItemSizes=[],oe.cancelFrameId=null,oe.state={lastVisibleIndex:void 0},oe.childRef=C.createRef(),oe.getMenuItemNodes=function(){var z=oe.props.prefixCls,Z=oe.childRef.current;return Z?[].slice.call(Z.children).filter(function(Y){return Y.className.split(" ").indexOf("".concat(z,"-overflowed-submenu"))<0}):[]},oe.getOverflowedSubMenuItem=function(z,Z,Y){var se=oe.props,ue=se.overflowedIndicator,ye=se.level,pe=se.mode,Ce=se.prefixCls,Ne=se.theme;if(ye!==1||pe!=="horizontal")return null;var qe=oe.props.children[0],Ze=qe.props,ct=Ze.children,kt=Ze.title,Kt=Ze.style,jt=Object(I.a)(Ze,["children","title","style"]),Yt=Object(j.a)({},Kt),Gt="".concat(z,"-overflowed-indicator"),Ht="".concat(z,"-overflowed-indicator");Z.length===0&&Y!==!0?Yt=Object(j.a)(Object(j.a)({},Yt),{},{display:"none"}):Y&&(Yt=Object(j.a)(Object(j.a)({},Yt),{},{visibility:"hidden",position:"absolute"}),Gt="".concat(Gt,"-placeholder"),Ht="".concat(Ht,"-placeholder"));var Wt=Ne?"".concat(Ce,"-").concat(Ne):"",nn={};return $e.forEach(function(Xt){jt[Xt]!==void 0&&(nn[Xt]=jt[Xt])}),C.createElement(sn,Object(m.a)({title:ue,className:"".concat(Ce,"-overflowed-submenu"),popupClassName:Wt},nn,{key:Gt,eventKey:Ht,disabled:!1,style:Yt}),Z)},oe.setChildrenWidthAndResize=function(){if(oe.props.mode!=="horizontal")return;var z=oe.childRef.current;if(!z)return;var Z=z.children;if(!Z||Z.length===0)return;var Y=z.children[Z.length-1];Fe(Y,"display","inline-block");var se=oe.getMenuItemNodes(),ue=se.filter(function(ye){return ye.className.split(" ").indexOf(vi)>=0});ue.forEach(function(ye){Fe(ye,"display","inline-block")}),oe.menuItemSizes=se.map(function(ye){return Xe(ye,!0)}),ue.forEach(function(ye){Fe(ye,"display","none")}),oe.overflowedIndicatorWidth=Xe(z.children[z.children.length-1],!0),oe.originalTotalWidth=oe.menuItemSizes.reduce(function(ye,pe){return ye+pe},0),oe.handleResize(),Fe(Y,"display","none")},oe.handleResize=function(){if(oe.props.mode!=="horizontal")return;var z=oe.childRef.current;if(!z)return;var Z=Xe(z);oe.overflowedItems=[];var Y=0,se;oe.originalTotalWidth>Z+On&&(se=-1,oe.menuItemSizes.forEach(function(ue){Y+=ue,Y+oe.overflowedIndicatorWidth<=Z&&(se+=1)})),oe.setState({lastVisibleIndex:se})},oe}return Object(g.a)(ve,[{key:"componentDidMount",value:function(){var z=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Z=this.childRef.current;if(!Z)return;this.resizeObserver=new yt.default(function(Y){Y.forEach(function(){var se=z.cancelFrameId;cancelAnimationFrame(se),z.cancelFrameId=requestAnimationFrame(z.setChildrenWidthAndResize)})}),[].slice.call(Z.children).concat(Z).forEach(function(Y){z.resizeObserver.observe(Y)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){z.resizeObserver.disconnect(),[].slice.call(Z.children).concat(Z).forEach(function(Y){z.resizeObserver.observe(Y)}),z.setChildrenWidthAndResize()}),this.mutationObserver.observe(Z,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(z){var Z=this,Y=this.state.lastVisibleIndex;return(z||[]).reduce(function(se,ue,ye){var pe=ue;if(Z.props.mode==="horizontal"){var Ce=Z.getOverflowedSubMenuItem(ue.props.eventKey,[]);Y!==void 0&&Z.props.className.indexOf("".concat(Z.props.prefixCls,"-root"))!==-1&&(ye>Y&&(pe=C.cloneElement(ue,{style:{display:"none"},eventKey:"".concat(ue.props.eventKey,"-hidden"),className:"".concat(vi)})),ye===Y+1&&(Z.overflowedItems=z.slice(Y+1).map(function(qe){return C.cloneElement(qe,{key:qe.props.eventKey,mode:"vertical-left"})}),Ce=Z.getOverflowedSubMenuItem(ue.props.eventKey,Z.overflowedItems)));var Ne=[].concat(Object(S.a)(se),[Ce,pe]);return ye===z.length-1&&Ne.push(Z.getOverflowedSubMenuItem(ue.props.eventKey,[],!0)),Ne}return[].concat(Object(S.a)(se),[pe])},[])}},{key:"render",value:function(){var z=this.props,Z=z.visible,Y=z.prefixCls,se=z.overflowedIndicator,ue=z.mode,ye=z.level,pe=z.tag,Ce=z.children,Ne=z.theme,qe=Object(I.a)(z,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Ze=pe;return C.createElement(Ze,Object(m.a)({ref:this.childRef},qe),this.renderChildren(Ce))}}]),ve}(C.Component);xi.defaultProps={tag:"div",className:""};var yi=xi;function _i($){return $.length?$.every(function(de){return!!de.props.disabled}):!0}function ti($,de,ve){var oe=$.getState();$.setState({activeKey:Object(j.a)(Object(j.a)({},oe.activeKey),{},Object(ie.a)({},de,ve))})}function ci($){return $.eventKey||"0-menu-"}function Ci($,de){var ve=de,oe=$.children,z=$.eventKey;if(ve){var Z;if(ze(oe,function(Y,se){Y&&Y.props&&!Y.props.disabled&&ve===nt(Y,z,se)&&(Z=!0)}),Z)return ve}return ve=null,$.defaultActiveFirst&&ze(oe,function(Y,se){!ve&&Y&&!Y.props.disabled&&(ve=nt(Y,z,se))}),ve}function di($){if(!$)return;var de=this.instanceArray.indexOf($);de!==-1?this.instanceArray[de]=$:this.instanceArray.push($)}var Ki=function($){Object(u.a)(ve,$);var de=Object(r.a)(ve);function ve(oe){var z;return Object(E.a)(this,ve),z=de.call(this,oe),z.onKeyDown=function(Z,Y){var se=Z.keyCode,ue;if(z.getFlatInstanceArray().forEach(function(pe){pe&&pe.props.active&&pe.onKeyDown&&(ue=pe.onKeyDown(Z))}),ue)return 1;var ye=null;return(se===a.a.UP||se===a.a.DOWN)&&(ye=z.step(se===a.a.UP?-1:1)),ye?(Z.preventDefault(),ti(z.props.store,ci(z.props),ye.props.eventKey),typeof Y=="function"&&Y(ye),1):void 0},z.onItemHover=function(Z){var Y=Z.key,se=Z.hover;ti(z.props.store,ci(z.props),se?Y:null)},z.onDeselect=function(Z){z.props.onDeselect(Z)},z.onSelect=function(Z){z.props.onSelect(Z)},z.onClick=function(Z){z.props.onClick(Z)},z.onOpenChange=function(Z){z.props.onOpenChange(Z)},z.onDestroy=function(Z){z.props.onDestroy(Z)},z.getFlatInstanceArray=function(){return z.instanceArray},z.step=function(Z){var Y=z.getFlatInstanceArray(),se=z.props.store.getState().activeKey[ci(z.props)],ue=Y.length;if(!ue)return null;Z<0&&(Y=Y.concat().reverse());var ye=-1;if(Y.every(function(qe,Ze){return qe&&qe.props.eventKey===se?(ye=Ze,!1):!0}),!z.props.defaultActiveFirst&&ye!==-1&&_i(Y.slice(ye,ue-1)))return;var pe=(ye+1)%ue,Ce=pe;do{var Ne=Y[Ce];if(!Ne||Ne.props.disabled)Ce=(Ce+1)%ue;else return Ne}while(Ce!==pe);return null},z.renderCommonMenuItem=function(Z,Y,se){var ue=z.props.store.getState(),ye=Object(h.a)(z),pe=ye.props,Ce=nt(Z,pe.eventKey,Y),Ne=Z.props;if(!Ne||typeof Z.type=="string")return Z;var qe=Ce===ue.activeKey,Ze=Object(j.a)(Object(j.a)({mode:Ne.mode||pe.mode,level:pe.level,inlineIndent:pe.inlineIndent,renderMenuItem:z.renderMenuItem,rootPrefixCls:pe.prefixCls,index:Y,parentMenu:pe.parentMenu,manualRef:Ne.disabled?void 0:Object(c.a)(Z.ref,di.bind(Object(h.a)(z))),eventKey:Ce,active:!Ne.disabled&&qe,multiple:pe.multiple,onClick:function(kt){(Ne.onClick||Qe)(kt),z.onClick(kt)},onItemHover:z.onItemHover,motion:pe.motion,subMenuOpenDelay:pe.subMenuOpenDelay,subMenuCloseDelay:pe.subMenuCloseDelay,forceSubMenuRender:pe.forceSubMenuRender,onOpenChange:z.onOpenChange,onDeselect:z.onDeselect,onSelect:z.onSelect,builtinPlacements:pe.builtinPlacements,itemIcon:Ne.itemIcon||z.props.itemIcon,expandIcon:Ne.expandIcon||z.props.expandIcon},se),{},{direction:pe.direction});return(pe.mode==="inline"||We())&&(Ze.triggerSubMenuAction="click"),C.cloneElement(Z,Object(j.a)(Object(j.a)({},Ze),{},{key:Ce||Y}))},z.renderMenuItem=function(Z,Y,se){if(!Z)return null;var ue=z.props.store.getState(),ye={openKeys:ue.openKeys,selectedKeys:ue.selectedKeys,triggerSubMenuAction:z.props.triggerSubMenuAction,subMenuKey:se};return z.renderCommonMenuItem(Z,Y,ye)},oe.store.setState({activeKey:Object(j.a)(Object(j.a)({},oe.store.getState().activeKey),{},Object(ie.a)({},oe.eventKey,Ci(oe,oe.activeKey)))}),z.instanceArray=[],z}return Object(g.a)(ve,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(z){return this.props.visible||z.visible||this.props.className!==z.className||!D()(this.props.style,z.style)}},{key:"componentDidUpdate",value:function(z){var Z=this.props,Y="activeKey"in Z?Z.activeKey:Z.store.getState().activeKey[ci(Z)],se=Ci(Z,Y);if(se!==Y)ti(Z.store,ci(Z),se);else if("activeKey"in z){var ue=Ci(z,z.activeKey);se!==ue&&ti(Z.store,ci(Z),se)}}},{key:"render",value:function(){var z=this,Z=Object(m.a)({},this.props);this.instanceArray=[];var Y=H()(Z.prefixCls,Z.className,"".concat(Z.prefixCls,"-").concat(Z.mode)),se={className:Y,role:Z.role||"menu"};Z.id&&(se.id=Z.id),Z.focusable&&(se.tabIndex=0,se.onKeyDown=this.onKeyDown);var ue=Z.prefixCls,ye=Z.eventKey,pe=Z.visible,Ce=Z.level,Ne=Z.mode,qe=Z.overflowedIndicator,Ze=Z.theme;return $e.forEach(function(ct){return delete Z[ct]}),delete Z.onClick,C.createElement(yi,Object(m.a)({},Z,{prefixCls:ue,mode:Ne,tag:"ul",level:Ce,theme:Ze,visible:pe,overflowedIndicator:qe},se),Object(U.a)(Z.children).map(function(ct,kt){return z.renderMenuItem(ct,kt,ye||"0-menu-")}))}}]),ve}(C.Component);Ki.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:Qe};var Gi=Object(l.b)()(Ki),Si=Gi,hi=F("Kwbf");function Ii($,de,ve){var oe=$.prefixCls,z=$.motion,Z=$.defaultMotions,Y=Z===void 0?{}:Z,se=$.openAnimation,ue=$.openTransitionName,ye=de.switchingModeFromInline;if(z)return z;if(Object(A.a)(se)==="object"&&se)Object(hi.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof se=="string")return{motionName:"".concat(oe,"-open-").concat(se)};if(ue)return{motionName:ue};var pe=Y[ve];return pe||(ye?null:Y.other)}var zi=function($){Object(u.a)(ve,$);var de=Object(r.a)(ve);function ve(oe){var z;Object(E.a)(this,ve),z=de.call(this,oe),z.onSelect=function(se){var ue=Object(h.a)(z),ye=ue.props;if(ye.selectable){var pe=z.store.getState(),Ce=pe.selectedKeys,Ne=se.key;ye.multiple?Ce=Ce.concat([Ne]):Ce=[Ne],"selectedKeys"in ye||z.store.setState({selectedKeys:Ce}),ye.onSelect(Object(j.a)(Object(j.a)({},se),{},{selectedKeys:Ce}))}},z.onClick=function(se){var ue=z.getRealMenuMode(),ye=Object(h.a)(z),pe=ye.store,Ce=ye.props.onOpenChange;ue!=="inline"&&!("openKeys"in z.props)&&(pe.setState({openKeys:[]}),Ce([])),z.props.onClick(se)},z.onKeyDown=function(se,ue){z.innerMenu.getWrappedInstance().onKeyDown(se,ue)},z.onOpenChange=function(se){var ue=Object(h.a)(z),ye=ue.props,pe=z.store.getState().openKeys.concat(),Ce=!1,Ne=function(Ze){var ct=!1;if(Ze.open)ct=pe.indexOf(Ze.key)===-1,ct&&pe.push(Ze.key);else{var kt=pe.indexOf(Ze.key);ct=kt!==-1,ct&&pe.splice(kt,1)}Ce=Ce||ct};Array.isArray(se)?se.forEach(Ne):Ne(se),Ce&&("openKeys"in z.props||z.store.setState({openKeys:pe}),ye.onOpenChange(pe))},z.onDeselect=function(se){var ue=Object(h.a)(z),ye=ue.props;if(ye.selectable){var pe=z.store.getState().selectedKeys.concat(),Ce=se.key,Ne=pe.indexOf(Ce);Ne!==-1&&pe.splice(Ne,1),"selectedKeys"in ye||z.store.setState({selectedKeys:pe}),ye.onDeselect(Object(j.a)(Object(j.a)({},se),{},{selectedKeys:pe}))}},z.onMouseEnter=function(se){z.restoreModeVerticalFromInline();var ue=z.props.onMouseEnter;ue&&ue(se)},z.onTransitionEnd=function(se){var ue=se.propertyName==="width"&&se.target===se.currentTarget,ye=se.target.className,pe=Object.prototype.toString.call(ye)==="[object SVGAnimatedString]"?ye.animVal:ye,Ce=se.propertyName==="font-size"&&pe.indexOf("anticon")>=0;(ue||Ce)&&z.restoreModeVerticalFromInline()},z.setInnerMenu=function(se){z.innerMenu=se},z.isRootMenu=!0;var Z=oe.defaultSelectedKeys,Y=oe.defaultOpenKeys;return"selectedKeys"in oe&&(Z=oe.selectedKeys||[]),"openKeys"in oe&&(Y=oe.openKeys||[]),z.store=Object(l.c)({selectedKeys:Z,openKeys:Y,activeKey:{"0-menu-":Ci(oe,oe.activeKey)}}),z.state={switchingModeFromInline:!1,prevProps:oe,inlineOpenKeys:[],store:z.store},z}return Object(g.a)(ve,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(z){var Z=this.props,Y=Z.siderCollapsed,se=Z.inlineCollapsed,ue=Z.onOpenChange;(!z.inlineCollapsed&&se||!z.siderCollapsed&&Y)&&ue([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var z=this.props.collapsedWidth,Z=this.store,Y=this.prevOpenKeys,se=this.getInlineCollapsed()&&(z===0||z==="0"||z==="0px");se?(this.prevOpenKeys=Z.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Y&&(this.store.setState({openKeys:Y}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var z=this.props.mode,Z=this.state.switchingModeFromInline,Y=this.getInlineCollapsed();return Z&&Y?"inline":Y?"vertical":z}},{key:"getInlineCollapsed",value:function(){var z=this.props,Z=z.inlineCollapsed,Y=z.siderCollapsed;return Y!==void 0?Y:Z}},{key:"restoreModeVerticalFromInline",value:function(){var z=this.state.switchingModeFromInline;z&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var z=Object(j.a)({},Object(f.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Z=this.getRealMenuMode();return z.className+=" ".concat(z.prefixCls,"-root"),z.direction==="rtl"&&(z.className+=" ".concat(z.prefixCls,"-rtl")),z=Object(j.a)(Object(j.a)({},z),{},{mode:Z,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ii(this.props,this.state,Z)}),delete z.openAnimation,delete z.openTransitionName,C.createElement(l.a,{store:this.store},C.createElement(Si,Object(m.a)({},z,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(z,Z){var Y=Z.prevProps,se=Z.store,ue=se.getState(),ye={},pe={prevProps:z};return Y.mode==="inline"&&z.mode!=="inline"&&(pe.switchingModeFromInline=!0),"openKeys"in z?ye.openKeys=z.openKeys||[]:((z.inlineCollapsed&&!Y.inlineCollapsed||z.siderCollapsed&&!Y.siderCollapsed)&&(pe.switchingModeFromInline=!0,pe.inlineOpenKeys=ue.openKeys,ye.openKeys=[]),(!z.inlineCollapsed&&Y.inlineCollapsed||!z.siderCollapsed&&Y.siderCollapsed)&&(ye.openKeys=Z.inlineOpenKeys,pe.inlineOpenKeys=[])),Object.keys(ye).length&&se.setState(ye),pe}}]),ve}(C.Component);zi.defaultProps={selectable:!0,onClick:Qe,onSelect:Qe,onOpenChange:Qe,onDeselect:Qe,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:C.createElement("span",null,"\xB7\xB7\xB7")};var ki=zi,bi=function($){Object(u.a)(ve,$);var de=Object(r.a)(ve);function ve(){var oe;return Object(E.a)(this,ve),oe=de.apply(this,arguments),oe.onKeyDown=function(z){var Z=z.keyCode;return Z===a.a.ENTER?(oe.onClick(z),!0):void 0},oe.onMouseLeave=function(z){var Z=oe.props,Y=Z.eventKey,se=Z.onItemHover,ue=Z.onMouseLeave;se({key:Y,hover:!1}),ue({key:Y,domEvent:z})},oe.onMouseEnter=function(z){var Z=oe.props,Y=Z.eventKey,se=Z.onItemHover,ue=Z.onMouseEnter;se({key:Y,hover:!0}),ue({key:Y,domEvent:z})},oe.onClick=function(z){var Z=oe.props,Y=Z.eventKey,se=Z.multiple,ue=Z.onClick,ye=Z.onSelect,pe=Z.onDeselect,Ce=Z.isSelected,Ne={key:Y,keyPath:[Y],item:Object(h.a)(oe),domEvent:z};ue(Ne),se?Ce?pe(Ne):ye(Ne):Ce||ye(Ne)},oe.saveNode=function(z){oe.node=z},oe}return Object(g.a)(ve,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var z=this.props;z.onDestroy&&z.onDestroy(z.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var z,Z=Object(j.a)({},this.props),Y=H()(this.getPrefixCls(),Z.className,(z={},Object(ie.a)(z,this.getActiveClassName(),!Z.disabled&&Z.active),Object(ie.a)(z,this.getSelectedClassName(),Z.isSelected),Object(ie.a)(z,this.getDisabledClassName(),Z.disabled),z)),se=Object(j.a)(Object(j.a)({},Z.attribute),{},{title:typeof Z.title=="string"?Z.title:void 0,className:Y,role:Z.role||"menuitem","aria-disabled":Z.disabled});Z.role==="option"?se=Object(j.a)(Object(j.a)({},se),{},{role:"option","aria-selected":Z.isSelected}):(Z.role===null||Z.role==="none")&&(se.role="none");var ue={onClick:Z.disabled?null:this.onClick,onMouseLeave:Z.disabled?null:this.onMouseLeave,onMouseEnter:Z.disabled?null:this.onMouseEnter},ye=Object(j.a)({},Z.style);Z.mode==="inline"&&(Z.direction==="rtl"?ye.paddingRight=Z.inlineIndent*Z.level:ye.paddingLeft=Z.inlineIndent*Z.level),$e.forEach(function(Ce){return delete Z[Ce]}),delete Z.direction;var pe=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(pe=C.createElement(this.props.itemIcon,this.props)),C.createElement("li",Object(m.a)({},Object(f.a)(Z,["onClick","onMouseEnter","onMouseLeave","onSelect"]),se,ue,{style:ye,ref:this.saveNode}),Z.children,pe)}}]),ve}(C.Component);bi.isMenuItem=!0,bi.defaultProps={onSelect:Qe,onMouseEnter:Qe,onMouseLeave:Qe,manualRef:Qe};var wi=Object(l.b)(function($,de){var ve=$.activeKey,oe=$.selectedKeys,z=de.eventKey,Z=de.subMenuKey;return{active:ve[Z]===z,isSelected:Array.isArray(oe)?oe.indexOf(z)!==-1:oe===z}})(bi),Ui=wi,ni=function($){Object(u.a)(ve,$);var de=Object(r.a)(ve);function ve(){var oe;return Object(E.a)(this,ve),oe=de.apply(this,arguments),oe.renderInnerMenuItem=function(z){var Z=oe.props,Y=Z.renderMenuItem,se=Z.index;return Y(z,se,oe.props.subMenuKey)},oe}return Object(g.a)(ve,[{key:"render",value:function(){var z=Object(m.a)({},this.props),Z=z.className,Y=Z===void 0?"":Z,se=z.rootPrefixCls,ue="".concat(se,"-item-group-title"),ye="".concat(se,"-item-group-list"),pe=z.title,Ce=z.children;return $e.forEach(function(Ne){return delete z[Ne]}),delete z.direction,C.createElement("li",Object(m.a)({},z,{onClick:function(qe){return qe.stopPropagation()},className:"".concat(Y," ").concat(se,"-item-group")}),C.createElement("div",{className:ue,title:typeof pe=="string"?pe:void 0},pe),C.createElement("ul",{className:ye},C.Children.map(Ce,this.renderInnerMenuItem)))}}]),ve}(C.Component);ni.isMenuItemGroup=!0,ni.defaultProps={disabled:!0};var $i=ni,Bi=function(de){var ve=de.className,oe=de.rootPrefixCls,z=de.style;return C.createElement("li",{className:"".concat(ve," ").concat(oe,"-item-divider"),style:z})};Bi.defaultProps={disabled:!0,className:"",style:{}};var er=Bi,Vi=ki,ji=F("eDIo");function Gn($,de){var ve=$.prefixCls,oe=$.editable,z=$.locale,Z=$.style;return!oe||oe.showAdd===!1?null:C.createElement("button",{ref:de,type:"button",className:"".concat(ve,"-nav-add"),style:Z,"aria-label":(z==null?void 0:z.addAriaLabel)||"Add tab",onClick:function(se){oe.onEdit("add",{event:se})}},oe.addIcon||"+")}var Ai=C.forwardRef(Gn);function Yi($,de){var ve=$.prefixCls,oe=$.id,z=$.tabs,Z=$.locale,Y=$.mobile,se=$.moreIcon,ue=se===void 0?"More":se,ye=$.moreTransitionName,pe=$.style,Ce=$.className,Ne=$.editable,qe=$.tabBarGutter,Ze=$.rtl,ct=$.onTabClick,kt=Object(C.useState)(!1),Kt=Object(L.a)(kt,2),jt=Kt[0],Yt=Kt[1],Gt=Object(C.useState)(null),Ht=Object(L.a)(Gt,2),Wt=Ht[0],nn=Ht[1],Xt="".concat(oe,"-more-popup"),wn="".concat(ve,"-dropdown"),cn=Wt!==null?"".concat(Xt,"-").concat(Wt):null,Pt=Z==null?void 0:Z.dropdownAriaLabel,Dt=C.createElement(Vi,{onClick:function(pn){var xn=pn.key,jn=pn.domEvent;ct(xn,jn),Yt(!1)},id:Xt,tabIndex:-1,role:"listbox","aria-activedescendant":cn,selectedKeys:[Wt],"aria-label":Pt!==void 0?Pt:"expanded dropdown"},z.map(function(an){return C.createElement(Ui,{key:an.key,id:"".concat(Xt,"-").concat(an.key),role:"option","aria-controls":oe&&"".concat(oe,"-panel-").concat(an.key),disabled:an.disabled},an.tab)}));function Zt(an){for(var pn=z.filter(function(Jn){return!Jn.disabled}),xn=pn.findIndex(function(Jn){return Jn.key===Wt})||0,jn=pn.length,Qn=0;Qn<jn;Qn+=1){xn=(xn+an+jn)%jn;var Rn=pn[xn];if(!Rn.disabled){nn(Rn.key);return}}}function en(an){var pn=an.which;if(!jt){[a.a.DOWN,a.a.SPACE,a.a.ENTER].includes(pn)&&(Yt(!0),an.preventDefault());return}switch(pn){case a.a.UP:Zt(-1),an.preventDefault();break;case a.a.DOWN:Zt(1),an.preventDefault();break;case a.a.ESC:Yt(!1);break;case a.a.SPACE:case a.a.ENTER:Wt!==null&&ct(Wt,an);break}}Object(C.useEffect)(function(){var an=document.getElementById(cn);an&&an.scrollIntoView&&an.scrollIntoView(!1)},[Wt]),Object(C.useEffect)(function(){jt||nn(null)},[jt]);var wt=Object(ie.a)({},Ze?"marginLeft":"marginRight",qe);z.length||(wt.visibility="hidden",wt.order=1);var rn=H()(Object(ie.a)({},"".concat(wn,"-rtl"),Ze)),En=Y?null:C.createElement(ji.a,{prefixCls:wn,overlay:Dt,trigger:["hover"],visible:jt,transitionName:ye,onVisibleChange:Yt,overlayClassName:rn,mouseEnterDelay:.1,mouseLeaveDelay:.1},C.createElement("button",{type:"button",className:"".concat(ve,"-nav-more"),style:wt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Xt,id:"".concat(oe,"-more"),"aria-expanded":jt,onKeyDown:en},ue));return C.createElement("div",{className:H()("".concat(ve,"-nav-operations"),Ce),style:pe,ref:de},En,C.createElement(Ai,{prefixCls:ve,locale:Z,editable:Ne}))}var tr=C.forwardRef(Yi),Di=Object(C.createContext)(null),Vt=.1,Jt=.01,bn=20,Mn=Math.pow(.995,bn);function Bn(){var $=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test($)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test($.substr(0,4)))}function Xi($,de){var ve=Object(C.useState)(),oe=Object(L.a)(ve,2),z=oe[0],Z=oe[1],Y=Object(C.useState)(0),se=Object(L.a)(Y,2),ue=se[0],ye=se[1],pe=Object(C.useState)(0),Ce=Object(L.a)(pe,2),Ne=Ce[0],qe=Ce[1],Ze=Object(C.useState)(),ct=Object(L.a)(Ze,2),kt=ct[0],Kt=ct[1],jt=Object(C.useRef)();function Yt(Pt){var Dt=Pt.touches[0],Zt=Dt.screenX,en=Dt.screenY;Z({x:Zt,y:en}),window.clearInterval(jt.current)}function Gt(Pt){if(!z)return;Pt.preventDefault();var Dt=Pt.touches[0],Zt=Dt.screenX,en=Dt.screenY;Z({x:Zt,y:en});var wt=Zt-z.x,rn=en-z.y;de(wt,rn);var En=Date.now();ye(En),qe(En-ue),Kt({x:wt,y:rn})}function Ht(){if(!z)return;if(Z(null),Kt(null),kt){var Pt=kt.x/Ne,Dt=kt.y/Ne,Zt=Math.abs(Pt),en=Math.abs(Dt);if(Math.max(Zt,en)<Vt)return;var wt=Pt,rn=Dt;jt.current=window.setInterval(function(){if(Math.abs(wt)<Jt&&Math.abs(rn)<Jt){window.clearInterval(jt.current);return}wt*=Mn,rn*=Mn,de(wt*bn,rn*bn)},bn)}}var Wt=Object(C.useRef)(0),nn=Object(C.useRef)(!1),Xt=Object(C.useRef)();function wn(Pt){var Dt=Pt.deltaX,Zt=Pt.deltaY,en=0,wt=Math.abs(Dt),rn=Math.abs(Zt);wt===rn?en=Xt.current==="x"?Dt:Zt:wt>rn?(en=Dt,Xt.current="x"):(en=Zt,Xt.current="y");var En=Date.now();En-Wt.current>100&&(nn.current=!1),(de(-en,-en)||nn.current)&&(Pt.preventDefault(),nn.current=!0),Wt.current=En}var cn=Object(C.useRef)(null);cn.current={onTouchStart:Yt,onTouchMove:Gt,onTouchEnd:Ht,onWheel:wn},C.useEffect(function(){function Pt(wt){cn.current.onTouchStart(wt)}function Dt(wt){cn.current.onTouchMove(wt)}function Zt(wt){cn.current.onTouchEnd(wt)}function en(wt){cn.current.onWheel(wt)}return document.addEventListener("touchmove",Dt,{passive:!1}),document.addEventListener("touchend",Zt,{passive:!1}),$.current.addEventListener("touchstart",Pt,{passive:!1}),$.current.addEventListener("wheel",en),function(){document.removeEventListener("touchmove",Dt),document.removeEventListener("touchend",Zt)}},[])}function Fi(){var $=Object(C.useRef)(new Map);function de(oe){return $.current.has(oe)||$.current.set(oe,C.createRef()),$.current.get(oe)}function ve(oe){$.current.delete(oe)}return[de,ve]}function Qi($,de){var ve=C.useRef($),oe=C.useState({}),z=Object(L.a)(oe,2),Z=z[1];function Y(se){var ue=typeof se=="function"?se(ve.current):se;ue!==ve.current&&de(ue,ve.current),ve.current=ue,Z({})}return[ve.current,Y]}var Ji=function(de){var ve=de.position,oe=de.prefixCls,z=de.extra;if(!z)return null;var Z,Y=z;return ve==="right"&&(Z=Y.right||!Y.left&&Y||null),ve==="left"&&(Z=Y.left||null),Z?C.createElement("div",{className:"".concat(oe,"-extra-content")},Z):null};function nr($,de){var ve,oe=C.useContext(Di),z=oe.prefixCls,Z=oe.tabs,Y=$.className,se=$.style,ue=$.id,ye=$.animated,pe=$.activeKey,Ce=$.rtl,Ne=$.extra,qe=$.editable,Ze=$.locale,ct=$.tabPosition,kt=$.tabBarGutter,Kt=$.children,jt=$.onTabClick,Yt=$.onTabScroll,Gt=Object(C.useRef)(),Ht=Object(C.useRef)(),Wt=Object(C.useRef)(),nn=Object(C.useRef)(),Xt=Fi(),wn=Object(L.a)(Xt,2),cn=wn[0],Pt=wn[1],Dt=ct==="top"||ct==="bottom",Zt=Qi(0,function(dn,qt){Dt&&Yt&&Yt({direction:dn>qt?"left":"right"})}),en=Object(L.a)(Zt,2),wt=en[0],rn=en[1],En=Qi(0,function(dn,qt){!Dt&&Yt&&Yt({direction:dn>qt?"top":"bottom"})}),an=Object(L.a)(En,2),pn=an[0],xn=an[1],jn=Object(C.useState)(0),Qn=Object(L.a)(jn,2),Rn=Qn[0],Jn=Qn[1],Ei=Object(C.useState)(0),ii=Object(L.a)(Ei,2),ri=ii[0],Ln=ii[1],zn=Object(C.useState)(0),Fn=Object(L.a)(zn,2),kn=Fn[0],Li=Fn[1],Pi=Object(C.useState)(0),Hi=Object(L.a)(Pi,2),yn=Hi[0],Oi=Hi[1],Wi=Object(C.useState)(null),Tn=Object(L.a)(Wi,2),un=Tn[0],Hn=Tn[1],Vr=Object(C.useState)(null),Tr=Object(L.a)(Vr,2),Zi=Tr[0],Yr=Tr[1],Xr=Object(C.useState)(0),xr=Object(L.a)(Xr,2),Qr=xr[0],Jr=xr[1],Zr=Object(C.useState)(0),Cr=Object(L.a)(Zr,2),qr=Cr[0],$r=Cr[1],ea=n(new Map),Sr=Object(L.a)(ea,2),ta=Sr[0],na=Sr[1],hr=i(Z,ta,Rn),wr="".concat(z,"-nav-operations-hidden"),ir=0,rr=0;Dt?Ce?(ir=0,rr=Math.max(0,Rn-un)):(ir=Math.min(0,un-Rn),rr=0):(ir=Math.min(0,Zi-ri),rr=0);function fr(dn){return dn<ir?[ir,!1]:dn>rr?[rr,!1]:[dn,!0]}var Ar=Object(C.useRef)(),ia=Object(C.useState)(),Or=Object(L.a)(ia,2),pr=Or[0],Rr=Or[1];function mr(){Rr(Date.now())}function gr(){window.clearTimeout(Ar.current)}Xi(Gt,function(dn,qt){var Un=!1;function ai(or,sr){or(function(lr){var ur=fr(lr+sr),qi=Object(L.a)(ur,2),br=qi[0],Er=qi[1];return Un=Er,br})}if(Dt){if(un>=Rn)return Un;ai(rn,dn)}else{if(Zi>=ri)return Un;ai(xn,qt)}return gr(),mr(),Un}),Object(C.useEffect)(function(){return gr(),pr&&(Ar.current=window.setTimeout(function(){Rr(0)},100)),gr},[pr]);function Ir(){var dn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pe,qt=hr.get(dn);if(!qt)return;if(Dt){var Un=wt;Ce?qt.right<wt?Un=qt.right:qt.right+qt.width>wt+un&&(Un=qt.right+qt.width-un):qt.left<-wt?Un=-qt.left:qt.left+qt.width>-wt+un&&(Un=-(qt.left+qt.width-un)),xn(0),rn(fr(Un)[0])}else{var ai=pn;qt.top<-pn?ai=-qt.top:qt.top+qt.height>-pn+Zi&&(ai=-(qt.top+qt.height-Zi)),rn(0),xn(fr(ai)[0])}}var ra=_(hr,{width:un,height:Zi,left:wt,top:pn},{width:kn,height:yn},{width:Qr,height:qr},Object(j.a)(Object(j.a)({},$),{},{tabs:Z})),Dr=Object(L.a)(ra,2),aa=Dr[0],oa=Dr[1],sa=Z.map(function(dn){var qt=dn.key;return C.createElement(e,{id:ue,prefixCls:z,key:qt,rtl:Ce,tab:dn,closable:dn.closable,editable:qe,active:qt===pe,tabPosition:ct,tabBarGutter:kt,renderWrapper:Kt,removeAriaLabel:Ze==null?void 0:Ze.removeAriaLabel,ref:cn(qt),onClick:function(ai){jt(qt,ai)},onRemove:function(){Pt(qt)},onFocus:function(){Ir(qt),mr(),Ce||(Gt.current.scrollLeft=0),Gt.current.scrollTop=0}})}),vr=o(function(){var dn,qt,Un,ai,or,sr,lr,ur,qi,br=((dn=Gt.current)===null||dn===void 0?void 0:dn.offsetWidth)||0,Er=((qt=Gt.current)===null||qt===void 0?void 0:qt.offsetHeight)||0,jr=((Un=nn.current)===null||Un===void 0?void 0:Un.offsetWidth)||0,Fr=((ai=nn.current)===null||ai===void 0?void 0:ai.offsetHeight)||0,fa=((or=Wt.current)===null||or===void 0?void 0:or.offsetWidth)||0,pa=((sr=Wt.current)===null||sr===void 0?void 0:sr.offsetHeight)||0;Hn(br),Yr(Er),Jr(jr),$r(Fr);var Hr=(((lr=Ht.current)===null||lr===void 0?void 0:lr.offsetWidth)||0)-jr,Wr=(((ur=Ht.current)===null||ur===void 0?void 0:ur.offsetHeight)||0)-Fr;Jn(Hr),Ln(Wr);var Kr=(qi=Wt.current)===null||qi===void 0?void 0:qi.className.includes(wr);Li(Hr-(Kr?0:fa)),Oi(Wr-(Kr?0:pa)),na(function(){var Gr=new Map;return Z.forEach(function(ma){var zr=ma.key,cr=cn(zr).current;cr&&Gr.set(zr,{width:cr.offsetWidth,height:cr.offsetHeight,left:cr.offsetLeft,top:cr.offsetTop})}),Gr})}),la=Z.slice(0,aa),ua=Z.slice(oa+1),Lr=[].concat(Object(S.a)(la),Object(S.a)(ua)),ca=Object(C.useState)(),Pr=Object(L.a)(ca,2),da=Pr[0],ha=Pr[1],Mi=hr.get(pe),Mr=Object(C.useRef)();function Nr(){v.a.cancel(Mr.current)}Object(C.useEffect)(function(){var dn={};return Mi&&(Dt?(Ce?dn.right=Mi.right:dn.left=Mi.left,dn.width=Mi.width):(dn.top=Mi.top,dn.height=Mi.height)),Nr(),Mr.current=v()(function(){ha(dn)}),Nr},[Mi,Dt,Ce]),Object(C.useEffect)(function(){Ir()},[pe,Mi,hr,Dt]),Object(C.useEffect)(function(){vr()},[Ce,kt,pe,Z.map(function(dn){return dn.key}).join("_")]);var kr=!!Lr.length,ar="".concat(z,"-nav-wrap"),yr,_r,Ur,Br;return Dt?Ce?(_r=wt>0,yr=wt+un<Rn):(yr=wt<0,_r=-wt+un<Rn):(Ur=pn<0,Br=-pn+Zi<ri),C.createElement("div",{ref:de,role:"tablist",className:H()("".concat(z,"-nav"),Y),style:se,onKeyDown:function(){mr()}},C.createElement(Ji,{position:"left",extra:Ne,prefixCls:z}),C.createElement(d.a,{onResize:vr},C.createElement("div",{className:H()(ar,(ve={},Object(ie.a)(ve,"".concat(ar,"-ping-left"),yr),Object(ie.a)(ve,"".concat(ar,"-ping-right"),_r),Object(ie.a)(ve,"".concat(ar,"-ping-top"),Ur),Object(ie.a)(ve,"".concat(ar,"-ping-bottom"),Br),ve)),ref:Gt},C.createElement(d.a,{onResize:vr},C.createElement("div",{ref:Ht,className:"".concat(z,"-nav-list"),style:{transform:"translate(".concat(wt,"px, ").concat(pn,"px)"),transition:pr?"none":void 0}},sa,C.createElement(Ai,{ref:nn,prefixCls:z,locale:Ze,editable:qe,style:{visibility:kr?"hidden":null}}),C.createElement("div",{className:H()("".concat(z,"-ink-bar"),Object(ie.a)({},"".concat(z,"-ink-bar-animated"),ye.inkBar)),style:da}))))),C.createElement(tr,Object.assign({},$,{ref:Wt,prefixCls:z,tabs:Lr,className:!kr&&wr})),C.createElement(Ji,{position:"right",extra:Ne,prefixCls:z}))}var dr=C.forwardRef(nr);function Ue($){var de=$.id,ve=$.activeKey,oe=$.animated,z=$.tabPosition,Z=$.rtl,Y=$.destroyInactiveTabPane,se=C.useContext(Di),ue=se.prefixCls,ye=se.tabs,pe=oe.tabPane,Ce=ye.findIndex(function(Ne){return Ne.key===ve});return C.createElement("div",{className:H()("".concat(ue,"-content-holder"))},C.createElement("div",{className:H()("".concat(ue,"-content"),"".concat(ue,"-content-").concat(z),Object(ie.a)({},"".concat(ue,"-content-animated"),pe)),style:Ce&&pe?Object(ie.a)({},Z?"marginRight":"marginLeft","-".concat(Ce,"00%")):null},ye.map(function(Ne){return C.cloneElement(Ne.node,{key:Ne.key,prefixCls:ue,tabKey:Ne.key,id:de,animated:pe,active:Ne.key===ve,destroyInactiveTabPane:Y})})))}function Be($){var de=$.prefixCls,ve=$.forceRender,oe=$.className,z=$.style,Z=$.id,Y=$.active,se=$.animated,ue=$.destroyInactiveTabPane,ye=$.tabKey,pe=$.children,Ce=C.useState(ve),Ne=Object(L.a)(Ce,2),qe=Ne[0],Ze=Ne[1];C.useEffect(function(){Y?Ze(!0):ue&&Ze(!1)},[Y,ue]);var ct={};return Y||(se?(ct.visibility="hidden",ct.height=0,ct.overflowY="hidden"):ct.display="none"),C.createElement("div",{id:Z&&"".concat(Z,"-panel-").concat(ye),role:"tabpanel",tabIndex:Y?0:-1,"aria-labelledby":Z&&"".concat(Z,"-tab-").concat(ye),"aria-hidden":!Y,style:Object(j.a)(Object(j.a)({},ct),z),className:H()("".concat(de,"-tabpane"),Y&&"".concat(de,"-tabpane-active"),oe)},(Y||qe||ve)&&pe)}var Ve=0;function dt($){return Object(U.a)($).map(function(de){if(C.isValidElement(de)){var ve=de.key!==void 0?String(de.key):void 0;return Object(j.a)(Object(j.a)({key:ve},de.props),{},{node:de})}return null}).filter(function(de){return de})}function Lt($,de){var ve,oe=$.id,z=$.prefixCls,Z=z===void 0?"rc-tabs":z,Y=$.className,se=$.children,ue=$.direction,ye=$.activeKey,pe=$.defaultActiveKey,Ce=$.editable,Ne=$.animated,qe=$.tabPosition,Ze=qe===void 0?"top":qe,ct=$.tabBarGutter,kt=$.tabBarStyle,Kt=$.tabBarExtraContent,jt=$.locale,Yt=$.moreIcon,Gt=$.moreTransitionName,Ht=$.destroyInactiveTabPane,Wt=$.renderTabBar,nn=$.onChange,Xt=$.onTabClick,wn=$.onTabScroll,cn=Object(I.a)($,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Pt=dt(se),Dt=ue==="rtl",Zt;Ne===!1?Zt={inkBar:!1,tabPane:!1}:Zt=Object(j.a)({inkBar:!0,tabPane:!1},Ne!==!0?Ne:null);var en=Object(C.useState)(!1),wt=Object(L.a)(en,2),rn=wt[0],En=wt[1];Object(C.useEffect)(function(){En(Bn())},[]);var an=Object(R.a)(function(){var yn;return(yn=Pt[0])===null||yn===void 0?void 0:yn.key},{value:ye,defaultValue:pe}),pn=Object(L.a)(an,2),xn=pn[0],jn=pn[1],Qn=Object(C.useState)(function(){return Pt.findIndex(function(yn){return yn.key===xn})}),Rn=Object(L.a)(Qn,2),Jn=Rn[0],Ei=Rn[1];Object(C.useEffect)(function(){var yn=Pt.findIndex(function(Wi){return Wi.key===xn});if(yn===-1){var Oi;yn=Math.max(0,Math.min(Jn,Pt.length-1)),jn((Oi=Pt[yn])===null||Oi===void 0?void 0:Oi.key)}Ei(yn)},[Pt.map(function(yn){return yn.key}).join("_"),xn,Jn]);var ii=Object(R.a)(null,{value:oe}),ri=Object(L.a)(ii,2),Ln=ri[0],zn=ri[1],Fn=Ze;rn&&!["left","right"].includes(Ze)&&(Fn="top"),Object(C.useEffect)(function(){oe||(zn("rc-tabs-".concat(Ve)),Ve+=1)},[]);function kn(yn,Oi){Xt==null||Xt(yn,Oi),jn(yn),nn==null||nn(yn)}var Li={id:Ln,activeKey:xn,animated:Zt,tabPosition:Fn,rtl:Dt,mobile:rn},Pi,Hi=Object(j.a)(Object(j.a)({},Li),{},{editable:Ce,locale:jt,moreIcon:Yt,moreTransitionName:Gt,tabBarGutter:ct,onTabClick:kn,onTabScroll:wn,extra:Kt,style:kt,panes:se});return Wt?Pi=Wt(Hi,dr):Pi=C.createElement(dr,Object.assign({},Hi)),C.createElement(Di.Provider,{value:{tabs:Pt,prefixCls:Z}},C.createElement("div",Object.assign({ref:de,id:oe,className:H()(Z,"".concat(Z,"-").concat(Fn),(ve={},Object(ie.a)(ve,"".concat(Z,"-mobile"),rn),Object(ie.a)(ve,"".concat(Z,"-editable"),Ce),Object(ie.a)(ve,"".concat(Z,"-rtl"),Dt),ve),Y)},cn),Pi,C.createElement(Ue,Object.assign({destroyInactiveTabPane:Ht},Li,{animated:Zt}))))}var Rt=C.forwardRef(Lt);Rt.TabPane=Be;var fn=Rt,Sn=Re.b=fn},n6Qo:function(Ge,Re,F){"use strict";F.d(Re,"a",function(){return U});var ie=F("cDcd"),L=F("biw7"),I=F("fyJ8");function j(R){var S=R.className,y=R.index,v=R.children,d=R.colSpan,o=R.rowSpan,n=ie.useContext(L.a),a=n.prefixCls,s=n.fixedInfoList,e=s[y];return ie.createElement(I.a,Object.assign({className:S,index:y,component:"td",prefixCls:a,record:null,dataIndex:null,render:function(){return{children:v,props:{colSpan:d,rowSpan:o}}}},e))}function C(R){return ie.createElement("tr",Object.assign({},R))}function w(R){var S=R.children,y=ie.useContext(L.a),v=y.prefixCls;return ie.createElement("tfoot",{className:"".concat(v,"-summary")},S)}var H=Re.b=w,U={Cell:j,Row:C}},p5ED:function(Ge,Re,F){"use strict";var ie=F("+L6B"),L=F("2/Rp"),I=F("5Dmo"),j=F("3S7+"),C=F("k1fw"),w=F("tJVT"),H=F("cDcd"),U=F.n(H),R=F("vHTk"),S=F.n(R),y=F("yEEn"),v=F("ZW9T"),d=F("1vsH");Re.a=function(o){var n=o.name,a=o.data,s=o.theme,e=o.type,t=o.filename,i=o.monacoEditor,T=o.className,_=o.style,m=o.close,E=o.onClose,g=o.hasMask,h=Object(H.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),u=Object(w.a)(h,2),r=u[0],l=u[1],f=Object(H.useState)(""),c=Object(w.a)(f,2),x=c[0],D=c[1],A,B=1024*1024,O=10*B,W=Object(H.useRef)();e==="office"&&(A=Object(d.V)(a).filesize,A>O&&(e="other")),t&&(i.filename=t),Object(H.useEffect)(function(){var Q,re,le=(Q=document.cookie)===null||Q===void 0||((re=Q.replace(/\s/g,""))===null||re===void 0)?void 0:re.split(";");le==null||le.map(function(Ee){var _e=Ee.split("=");_e[0]==="_educoder_session"&&D(_e[1])})},[]);var P=function(){if(a.startsWith("http")||a.startsWith("/")){G();return}Object(d.z)(t||"educoder",a,t)},G=function(){Object(d.x)(t||n,a)};return console.log("data:",a,"fileanme:",t," name:",n),U.a.createElement("div",{style:Object(C.a)({},_||{}),className:"".concat(g&&S.a.bgBlack," ").concat(e?S.a.wrp:"hide")},m&&U.a.createElement("div",{className:S.a.close,ref:W},U.a.createElement(j.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return W.current}},U.a.createElement("span",{onClick:G},U.a.createElement("i",{className:"icon-quxiaozhiding"}))),U.a.createElement(j.a,{title:"\u5173\u95ED",getPopupContainer:function(){return W.current}},U.a.createElement("span",{className:"",onClick:E},U.a.createElement("i",{className:"icon-guanbi1"})))),U.a.createElement("div",{className:"".concat(S.a[T]," ").concat(T," ").concat(S.a.monaco," ").concat(e==="txt"?"show":"hide")},e==="txt"&&U.a.createElement(v.b,i)),e==="audio"&&U.a.createElement("audio",{src:"".concat(a!=null&&a.startsWith("/")||(a==null?void 0:a.indexOf("https://"))>-1?a:"data:audio/mp3;base64,").concat(a),autoPlay:!0}),e==="video"&&U.a.createElement(U.a.Fragment,null,a!=null&&a.startsWith("/")?U.a.createElement("video",{controls:!0,src:"".concat(a),autoPlay:!0}):U.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(a),autoPlay:!0})),e==="html"&&U.a.createElement("iframe",{src:a+"&disposition=inline"}),e==="pdf"&&U.a.createElement("embed",{className:S.a.embed,src:a}),e==="image"&&U.a.createElement(U.a.Fragment,null,U.a.createElement("img",{src:"".concat(a!=null&&a.startsWith("/")||(a==null?void 0:a.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(a)})),e==="other"&&U.a.createElement("div",null,U.a.createElement(L.a,{type:"primary",size:"large",onClick:P},U.a.createElement(y.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(e==="download"||e==="office")&&U.a.createElement(L.a,{type:"primary",size:"large",onClick:P},U.a.createElement(y.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},pIsd:function(Ge,Re,F){var ie=F("BJfS"),L=function(C){var w=/[height|width]$/;return w.test(C)},I=function(C){var w="",H=Object.keys(C);return H.forEach(function(U,R){var S=C[U];U=ie(U),L(U)&&typeof S=="number"&&(S=S+"px"),S===!0?w+=U:S===!1?w+="not "+U:w+="("+U+": "+S+")",R<H.length-1&&(w+=" and ")}),w},j=function(C){var w="";return typeof C=="string"?C:C instanceof Array?(C.forEach(function(H,U){w+=I(H),U<C.length-1&&(w+=", ")}),w):I(C)};Ge.exports=j},psGv:function(Ge,Re,F){var ie,L;(function(){var I;(function(){"use strict";var H=[,,function(y){function v(n){this.__parent=n,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}v.prototype.clone_empty=function(){var n=new v(this.__parent);return n.set_indent(this.__indent_count,this.__alignment_count),n},v.prototype.item=function(n){return n<0?this.__items[this.__items.length+n]:this.__items[n]},v.prototype.has_match=function(n){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(n))return!0;return!1},v.prototype.set_indent=function(n,a){this.is_empty()&&(this.__indent_count=n||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},v.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},v.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},v.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var n=this.__parent.current_line;return n.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),n.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),n.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,n.__items[0]===" "&&(n.__items.splice(0,1),n.__character_count-=1),!0}return!1},v.prototype.is_empty=function(){return this.__items.length===0},v.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},v.prototype.push=function(n){this.__items.push(n);var a=n.lastIndexOf(`
`);a!==-1?this.__character_count=n.length-a:this.__character_count+=n.length},v.prototype.pop=function(){var n=null;return this.is_empty()||(n=this.__items.pop(),this.__character_count-=n.length),n},v.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},v.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},v.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},v.prototype.toString=function(){var n="";return this.is_empty()?this.__parent.indent_empty_lines&&(n=this.__parent.get_indent_string(this.__indent_count)):(n=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),n+=this.__items.join("")),n};function d(n,a){this.__cache=[""],this.__indent_size=n.indent_size,this.__indent_string=n.indent_char,n.indent_with_tabs||(this.__indent_string=new Array(n.indent_size+1).join(n.indent_char)),a=a||"",n.indent_level>0&&(a=new Array(n.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}d.prototype.get_indent_size=function(n,a){var s=this.__base_string_length;return a=a||0,n<0&&(s=0),s+=n*this.__indent_size,s+=a,s},d.prototype.get_indent_string=function(n,a){var s=this.__base_string;return a=a||0,n<0&&(n=0,s=""),a+=n*this.__indent_size,this.__ensure_cache(a),s+=this.__cache[a],s},d.prototype.__ensure_cache=function(n){for(;n>=this.__cache.length;)this.__add_column()},d.prototype.__add_column=function(){var n=this.__cache.length,a=0,s="";this.__indent_size&&n>=this.__indent_size&&(a=Math.floor(n/this.__indent_size),n-=a*this.__indent_size,s=new Array(a+1).join(this.__indent_string)),n&&(s+=new Array(n+1).join(" ")),this.__cache.push(s)};function o(n,a){this.__indent_cache=new d(n,a),this.raw=!1,this._end_with_newline=n.end_with_newline,this.indent_size=n.indent_size,this.wrap_line_length=n.wrap_line_length,this.indent_empty_lines=n.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new v(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(n,a){return this.__indent_cache.get_indent_string(n,a)},o.prototype.get_indent_size=function(n,a){return this.__indent_cache.get_indent_size(n,a)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(n){return this.is_empty()||!n&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(n){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===`
`&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
`);return n!==`
`&&(s=s.replace(/[\n]/g,n)),s},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(n,a){return n=n||0,a=a||0,this.next_line.set_indent(n,a),this.__lines.length>1?(this.current_line.set_indent(n,a),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(n){for(var a=0;a<n.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(n.whitespace_before),this.current_line.push(n.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},o.prototype.add_token=function(n){this.__add_space_before_token(),this.current_line.push(n),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},o.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},o.prototype.remove_indent=function(n){for(var a=this.__lines.length;n<a;)this.__lines[n]._remove_indent(),n++;this.current_line._remove_wrap_indent()},o.prototype.trim=function(n){for(n=n===void 0?!1:n,this.current_line.trim();n&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(n,a){for(var s=this.__lines.length-2;s>=0;){var e=this.__lines[s];if(e.is_empty())break;if(e.item(0).indexOf(n)!==0&&e.item(-1)!==a){this.__lines.splice(s+1,0,new v(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},y.exports.Output=o},function(y){function v(d,o,n,a){this.type=d,this.text=o,this.comments_before=null,this.newlines=n||0,this.whitespace_before=a||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}y.exports.Token=v},,,function(y){function v(n,a){this.raw_options=d(n,a),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}v.prototype._get_array=function(n,a){var s=this.raw_options[n],e=a||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(e=s.concat()):typeof s=="string"&&(e=s.split(/[^a-zA-Z0-9_\/\-]+/)),e},v.prototype._get_boolean=function(n,a){var s=this.raw_options[n],e=s===void 0?!!a:!!s;return e},v.prototype._get_characters=function(n,a){var s=this.raw_options[n],e=a||"";return typeof s=="string"&&(e=s.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),e},v.prototype._get_number=function(n,a){var s=this.raw_options[n];a=parseInt(a,10),isNaN(a)&&(a=0);var e=parseInt(s,10);return isNaN(e)&&(e=a),e},v.prototype._get_selection=function(n,a,s){var e=this._get_selection_list(n,a,s);if(e.length!==1)throw new Error("Invalid Option Value: The option '"+n+`' can only be one of the following values:
`+a+`
You passed in: '`+this.raw_options[n]+"'");return e[0]},v.prototype._get_selection_list=function(n,a,s){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[a[0]],!this._is_valid_selection(s,a))throw new Error("Invalid Default Value!");var e=this._get_array(n,s);if(!this._is_valid_selection(e,a))throw new Error("Invalid Option Value: The option '"+n+`' can contain only the following values:
`+a+`
You passed in: '`+this.raw_options[n]+"'");return e},v.prototype._is_valid_selection=function(n,a){return n.length&&a.length&&!n.some(function(s){return a.indexOf(s)===-1})};function d(n,a){var s={};n=o(n);var e;for(e in n)e!==a&&(s[e]=n[e]);if(a&&n[a])for(e in n[a])s[e]=n[a][e];return s}function o(n){var a={},s;for(s in n){var e=s.replace(/-/g,"_");a[e]=n[s]}return a}y.exports.Options=v,y.exports.normalizeOpts=o,y.exports.mergeOpts=d},,function(y){var v=RegExp.prototype.hasOwnProperty("sticky");function d(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}d.prototype.restart=function(){this.__position=0},d.prototype.back=function(){this.__position>0&&(this.__position-=1)},d.prototype.hasNext=function(){return this.__position<this.__input_length},d.prototype.next=function(){var o=null;return this.hasNext()&&(o=this.__input.charAt(this.__position),this.__position+=1),o},d.prototype.peek=function(o){var n=null;return o=o||0,o+=this.__position,o>=0&&o<this.__input_length&&(n=this.__input.charAt(o)),n},d.prototype.__match=function(o,n){o.lastIndex=n;var a=o.exec(this.__input);return a&&!(v&&o.sticky)&&(a.index!==n&&(a=null)),a},d.prototype.test=function(o,n){return n=n||0,n+=this.__position,n>=0&&n<this.__input_length?!!this.__match(o,n):!1},d.prototype.testChar=function(o,n){var a=this.peek(n);return o.lastIndex=0,a!==null&&o.test(a)},d.prototype.match=function(o){var n=this.__match(o,this.__position);return n?this.__position+=n[0].length:n=null,n},d.prototype.read=function(o,n,a){var s="",e;return o&&(e=this.match(o),e&&(s+=e[0])),n&&(e||!o)&&(s+=this.readUntil(n,a)),s},d.prototype.readUntil=function(o,n){var a="",s=this.__position;o.lastIndex=this.__position;var e=o.exec(this.__input);return e?(s=e.index,n&&(s+=e[0].length)):s=this.__input_length,a=this.__input.substring(this.__position,s),this.__position=s,a},d.prototype.readUntilAfter=function(o){return this.readUntil(o,!0)},d.prototype.get_regexp=function(o,n){var a=null,s="g";return n&&v&&(s="y"),typeof o=="string"&&o!==""?a=new RegExp(o,s):o&&(a=new RegExp(o.source,s)),a},d.prototype.get_literal_regexp=function(o){return RegExp(o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},d.prototype.peekUntilAfter=function(o){var n=this.__position,a=this.readUntilAfter(o);return this.__position=n,a},d.prototype.lookBack=function(o){var n=this.__position-1;return n>=o.length&&this.__input.substring(n-o.length,n).toLowerCase()===o},y.exports.InputScanner=d},function(y,v,d){var o=d(8).InputScanner,n=d(3).Token,a=d(10).TokenStream,s=d(11).WhitespacePattern,e={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},t=function(i,T){this._input=new o(i),this._options=T||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};t.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var i,T=new n(e.START,""),_=null,m=[],E=new a;T.type!==e.EOF;){for(i=this._get_next_token(T,_);this._is_comment(i);)E.add(i),i=this._get_next_token(T,_);E.isEmpty()||(i.comments_before=E,E=new a),i.parent=_,this._is_opening(i)?(m.push(_),_=i):_&&this._is_closing(i,_)&&(i.opened=_,_.closed=i,_=m.pop(),i.parent=_),i.previous=T,T.next=i,this.__tokens.add(i),T=i}return this.__tokens},t.prototype._is_first_token=function(){return this.__tokens.isEmpty()},t.prototype._reset=function(){},t.prototype._get_next_token=function(i,T){this._readWhitespace();var _=this._input.read(/.+/g);return _?this._create_token(e.RAW,_):this._create_token(e.EOF,"")},t.prototype._is_comment=function(i){return!1},t.prototype._is_opening=function(i){return!1},t.prototype._is_closing=function(i,T){return!1},t.prototype._create_token=function(i,T){var _=new n(i,T,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return _},t.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},y.exports.Tokenizer=t,y.exports.TOKEN=e},function(y){function v(d){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=d}v.prototype.restart=function(){this.__position=0},v.prototype.isEmpty=function(){return this.__tokens_length===0},v.prototype.hasNext=function(){return this.__position<this.__tokens_length},v.prototype.next=function(){var d=null;return this.hasNext()&&(d=this.__tokens[this.__position],this.__position+=1),d},v.prototype.peek=function(d){var o=null;return d=d||0,d+=this.__position,d>=0&&d<this.__tokens_length&&(o=this.__tokens[d]),o},v.prototype.add=function(d){this.__parent_token&&(d.parent=this.__parent_token),this.__tokens.push(d),this.__tokens_length+=1},y.exports.TokenStream=v},function(y,v,d){var o=d(12).Pattern;function n(a,s){o.call(this,a,s),s?this._line_regexp=this._input.get_regexp(s._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}n.prototype=new o,n.prototype.__set_whitespace_patterns=function(a,s){a+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+a+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},n.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var a=this._input.read(this._match_pattern);if(a===" ")this.whitespace_before_token=" ";else if(a){var s=this.__split(this._newline_regexp,a);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return a},n.prototype.matching=function(a,s){var e=this._create();return e.__set_whitespace_patterns(a,s),e._update(),e},n.prototype._create=function(){return new n(this._input,this)},n.prototype.__split=function(a,s){a.lastIndex=0;for(var e=0,t=[],i=a.exec(s);i;)t.push(s.substring(e,i.index)),e=i.index+i[0].length,i=a.exec(s);return e<s.length?t.push(s.substring(e,s.length)):t.push(""),t},y.exports.WhitespacePattern=n},function(y){function v(d,o){this._input=d,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,o&&(this._starting_pattern=this._input.get_regexp(o._starting_pattern,!0),this._match_pattern=this._input.get_regexp(o._match_pattern,!0),this._until_pattern=this._input.get_regexp(o._until_pattern),this._until_after=o._until_after)}v.prototype.read=function(){var d=this._input.read(this._starting_pattern);return(!this._starting_pattern||d)&&(d+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),d},v.prototype.read_match=function(){return this._input.match(this._match_pattern)},v.prototype.until_after=function(d){var o=this._create();return o._until_after=!0,o._until_pattern=this._input.get_regexp(d),o._update(),o},v.prototype.until=function(d){var o=this._create();return o._until_after=!1,o._until_pattern=this._input.get_regexp(d),o._update(),o},v.prototype.starting_with=function(d){var o=this._create();return o._starting_pattern=this._input.get_regexp(d,!0),o._update(),o},v.prototype.matching=function(d){var o=this._create();return o._match_pattern=this._input.get_regexp(d,!0),o._update(),o},v.prototype._create=function(){return new v(this._input,this)},v.prototype._update=function(){},y.exports.Pattern=v},function(y){function v(d,o){d=typeof d=="string"?d:d.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(d+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(d+/\sbeautify\signore:end\s/.source+o,"g")}v.prototype.get_directives=function(d){if(!d.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(d);n;)o[n[1]]=n[2],n=this.__directive_pattern.exec(d);return o},v.prototype.readIgnored=function(d){return d.readUntilAfter(this.__directives_end_ignore_pattern)},y.exports.Directives=v},function(y,v,d){var o=d(12).Pattern,n={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function a(s,e){o.call(this,s,e),this.__template_pattern=null,this._disabled=Object.assign({},n),this._excluded=Object.assign({},n),e&&(this.__template_pattern=this._input.get_regexp(e.__template_pattern),this._excluded=Object.assign(this._excluded,e._excluded),this._disabled=Object.assign(this._disabled,e._disabled));var t=new o(s);this.__patterns={handlebars_comment:t.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:t.starting_with(/{{{/).until_after(/}}}/),handlebars:t.starting_with(/{{/).until_after(/}}/),php:t.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:t.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:t.starting_with(/{%/).until_after(/%}/),django_value:t.starting_with(/{{/).until_after(/}}/),django_comment:t.starting_with(/{#/).until_after(/#}/),smarty:t.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:t.starting_with(/{\*/).until_after(/\*}/),smarty_literal:t.starting_with(/{literal}/).until_after(/{\/literal}/)}}a.prototype=new o,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(s){var e=this._create();return e._disabled[s]=!0,e._update(),e},a.prototype.read_options=function(s){var e=this._create();for(var t in n)e._disabled[t]=s.templating.indexOf(t)===-1;return e._update(),e},a.prototype.exclude=function(s){var e=this._create();return e._excluded[s]=!0,e._update(),e},a.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var e=this._read_template();e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),s+=e,e=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},a.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},a.prototype._read_template=function(){var s="",e=this._input.peek();if(e==="<"){var t=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&t==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&t==="%"&&(s=s||this.__patterns.erb.read())}else e==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},y.exports.TemplatablePattern=a},,,,function(y,v,d){var o=d(19).Beautifier,n=d(20).Options;function a(s,e,t,i){var T=new o(s,e,t,i);return T.beautify()}y.exports=a,y.exports.defaultOptions=function(){return new n}},function(y,v,d){var o=d(20).Options,n=d(2).Output,a=d(21).Tokenizer,s=d(21).TOKEN,e=/\r\n|[\r\n]/,t=/\r\n|[\r\n]/g,i=function(f,c){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=f.max_preserve_newlines,this.preserve_newlines=f.preserve_newlines,this._output=new n(f,c)};i.prototype.current_line_has_match=function(f){return this._output.current_line.has_match(f)},i.prototype.set_space_before_token=function(f,c){this._output.space_before_token=f,this._output.non_breaking_space=c},i.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},i.prototype.add_raw_token=function(f){this._output.add_raw_token(f)},i.prototype.print_preserved_newlines=function(f){var c=0;f.type!==s.TEXT&&f.previous.type!==s.TEXT&&(c=f.newlines?1:0),this.preserve_newlines&&(c=f.newlines<this.max_preserve_newlines+1?f.newlines:this.max_preserve_newlines+1);for(var x=0;x<c;x++)this.print_newline(x>0);return c!==0},i.prototype.traverse_whitespace=function(f){return f.whitespace_before||f.newlines?(this.print_preserved_newlines(f)||(this._output.space_before_token=!0),!0):!1},i.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},i.prototype.print_newline=function(f){this._output.add_new_line(f)},i.prototype.print_token=function(f){f.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(f.text))},i.prototype.indent=function(){this.indent_level++},i.prototype.get_full_indent=function(f){return f=this.indent_level+(f||0),f<1?"":this._output.get_indent_string(f)};var T=function(f){for(var c=null,x=f.next;x.type!==s.EOF&&f.closed!==x;){if(x.type===s.ATTRIBUTE&&x.text==="type"){x.next&&x.next.type===s.EQUALS&&x.next.next&&x.next.next.type===s.VALUE&&(c=x.next.next.text);break}x=x.next}return c},_=function(f,c){var x=null,D=null;return c.closed?(f==="script"?x="text/javascript":f==="style"&&(x="text/css"),x=T(c)||x,x.search("text/css")>-1?D="css":x.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?D="javascript":x.search(/(text|application|dojo)\/(x-)?(html)/)>-1?D="html":x.search(/test\/null/)>-1&&(D="null"),D):null};function m(f,c){return c.indexOf(f)!==-1}function E(f,c,x){this.parent=f||null,this.tag=c?c.tag_name:"",this.indent_level=x||0,this.parser_token=c||null}function g(f){this._printer=f,this._current_frame=null}g.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},g.prototype.record_tag=function(f){var c=new E(this._current_frame,f,this._printer.indent_level);this._current_frame=c},g.prototype._try_pop_frame=function(f){var c=null;return f&&(c=f.parser_token,this._printer.indent_level=f.indent_level,this._current_frame=f.parent),c},g.prototype._get_frame=function(f,c){for(var x=this._current_frame;x&&!(f.indexOf(x.tag)!==-1);){if(c&&c.indexOf(x.tag)!==-1){x=null;break}x=x.parent}return x},g.prototype.try_pop=function(f,c){var x=this._get_frame([f],c);return this._try_pop_frame(x)},g.prototype.indent_to_tag=function(f){var c=this._get_frame(f);c&&(this._printer.indent_level=c.indent_level)};function h(f,c,x,D){this._source_text=f||"",c=c||{},this._js_beautify=x,this._css_beautify=D,this._tag_stack=null;var A=new o(c,"html");this._options=A,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}h.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var f=this._source_text,c=this._options.eol;this._options.eol==="auto"&&(c=`
`,f&&e.test(f)&&(c=f.match(e)[0])),f=f.replace(t,`
`);var x=f.match(/^[\t ]*/)[0],D={text:"",type:""},A=new u,B=new i(this._options,x),O=new a(f,this._options).tokenize();this._tag_stack=new g(B);for(var W=null,P=O.next();P.type!==s.EOF;)P.type===s.TAG_OPEN||P.type===s.COMMENT?(W=this._handle_tag_open(B,P,A,D),A=W):P.type===s.ATTRIBUTE||P.type===s.EQUALS||P.type===s.VALUE||P.type===s.TEXT&&!A.tag_complete?W=this._handle_inside_tag(B,P,A,O):P.type===s.TAG_CLOSE?W=this._handle_tag_close(B,P,A):P.type===s.TEXT?W=this._handle_text(B,P,A):B.add_raw_token(P),D=W,P=O.next();var G=B._output.get_code(c);return G},h.prototype._handle_tag_close=function(f,c,x){var D={text:c.text,type:c.type};return f.alignment_size=0,x.tag_complete=!0,f.set_space_before_token(c.newlines||c.whitespace_before!=="",!0),x.is_unformatted?f.add_raw_token(c):(x.tag_start_char==="<"&&(f.set_space_before_token(c.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&x.has_wrapped_attrs&&f.print_newline(!1)),f.print_token(c)),x.indent_content&&!(x.is_unformatted||x.is_content_unformatted)&&(f.indent(),x.indent_content=!1),!x.is_inline_element&&!(x.is_unformatted||x.is_content_unformatted)&&f.set_wrap_point(),D},h.prototype._handle_inside_tag=function(f,c,x,D){var A=x.has_wrapped_attrs,B={text:c.text,type:c.type};if(f.set_space_before_token(c.newlines||c.whitespace_before!=="",!0),x.is_unformatted)f.add_raw_token(c);else if(x.tag_start_char==="{"&&c.type===s.TEXT)f.print_preserved_newlines(c)?(c.newlines=0,f.add_raw_token(c)):f.print_token(c);else{if(c.type===s.ATTRIBUTE?(f.set_space_before_token(!0),x.attr_count+=1):(c.type===s.EQUALS||c.type===s.VALUE&&c.previous.type===s.EQUALS)&&f.set_space_before_token(!1),c.type===s.ATTRIBUTE&&x.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(f.traverse_whitespace(c),A=A||c.newlines!==0),this._is_wrap_attributes_force)){var O=x.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&x.attr_count===1){var W=!0,P=0,G;do{if(G=D.peek(P),G.type===s.ATTRIBUTE){W=!1;break}P+=1}while(P<4&&G.type!==s.EOF&&G.type!==s.TAG_CLOSE);O=!W}O&&(f.print_newline(!1),A=!0)}f.print_token(c),A=A||f.previous_token_wrapped(),x.has_wrapped_attrs=A}return B},h.prototype._handle_text=function(f,c,x){var D={text:c.text,type:"TK_CONTENT"};return x.custom_beautifier_name?this._print_custom_beatifier_text(f,c,x):x.is_unformatted||x.is_content_unformatted?f.add_raw_token(c):(f.traverse_whitespace(c),f.print_token(c)),D},h.prototype._print_custom_beatifier_text=function(f,c,x){var D=this;if(c.text!==""){var A=c.text,B,O=1,W="",P="";x.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?B=this._js_beautify:x.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?B=this._css_beautify:x.custom_beautifier_name==="html"&&(B=function(_e,ne){var Te=new h(_e,ne,D._js_beautify,D._css_beautify);return Te.beautify()}),this._options.indent_scripts==="keep"?O=0:this._options.indent_scripts==="separate"&&(O=-f.indent_level);var G=f.get_full_indent(O);if(A=A.replace(/\n[ \t]*$/,""),x.custom_beautifier_name!=="html"&&A[0]==="<"&&A.match(/^(<!--|<!\[CDATA\[)/)){var Q=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(A);if(!Q){f.add_raw_token(c);return}W=G+Q[1]+`
`,A=Q[4],Q[5]&&(P=G+Q[5]),A=A.replace(/\n[ \t]*$/,""),(Q[2]||Q[3].indexOf(`
`)!==-1)&&(Q=Q[3].match(/[ \t]+$/),Q&&(c.whitespace_before=Q[0]))}if(A)if(B){var re=function(){this.eol=`
`};re.prototype=this._options.raw_options;var le=new re;A=B(G+A,le)}else{var Ee=c.whitespace_before;Ee&&(A=A.replace(new RegExp(`
(`+Ee+")?","g"),`
`)),A=G+A.replace(/\n/g,`
`+G)}W&&(A?A=W+A+`
`+P:A=W+P),f.print_newline(!1),A&&(c.text=A,c.whitespace_before="",c.newlines=0,f.add_raw_token(c),f.print_newline(!0))}},h.prototype._handle_tag_open=function(f,c,x,D){var A=this._get_tag_open_token(c);return(x.is_unformatted||x.is_content_unformatted)&&!x.is_empty_element&&c.type===s.TAG_OPEN&&c.text.indexOf("</")===0?(f.add_raw_token(c),A.start_tag_token=this._tag_stack.try_pop(A.tag_name)):(f.traverse_whitespace(c),this._set_tag_position(f,c,A,x,D),A.is_inline_element||f.set_wrap_point(),f.print_token(c)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(A.alignment_size=c.text.length+1),!A.tag_complete&&!A.is_unformatted&&(f.alignment_size=A.alignment_size),A};var u=function(f,c){if(this.parent=f||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!c)this.tag_complete=!0;else{var x;this.tag_start_char=c.text[0],this.text=c.text,this.tag_start_char==="<"?(x=c.text.match(/^<([^\s>]*)/),this.tag_check=x?x[1]:""):(x=c.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=x?x[1]:"",(c.text.startsWith("{{#>")||c.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&c.next!==null?this.tag_check=c.next.text.split(" ")[0]:this.tag_check=c.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),c.type===s.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||c.closed&&c.closed.text==="/>";var D=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(D=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(D)))}};h.prototype._get_tag_open_token=function(f){var c=new u(this._tag_stack.get_parser_token(),f);return c.alignment_size=this._options.wrap_attributes_indent_size,c.is_end_tag=c.is_end_tag||m(c.tag_check,this._options.void_elements),c.is_empty_element=c.tag_complete||c.is_start_tag&&c.is_end_tag,c.is_unformatted=!c.tag_complete&&m(c.tag_check,this._options.unformatted),c.is_content_unformatted=!c.is_empty_element&&m(c.tag_check,this._options.content_unformatted),c.is_inline_element=m(c.tag_name,this._options.inline)||c.tag_name.includes("-")||c.tag_start_char==="{",c},h.prototype._set_tag_position=function(f,c,x,D,A){if(x.is_empty_element||(x.is_end_tag?x.start_tag_token=this._tag_stack.try_pop(x.tag_name):(this._do_optional_end_element(x)&&(x.is_inline_element||f.print_newline(!1)),this._tag_stack.record_tag(x),(x.tag_name==="script"||x.tag_name==="style")&&!(x.is_unformatted||x.is_content_unformatted)&&(x.custom_beautifier_name=_(x.tag_check,c)))),m(x.tag_check,this._options.extra_liners)&&(f.print_newline(!1),f._output.just_added_blankline()||f.print_newline(!0)),x.is_empty_element){if(x.tag_start_char==="{"&&x.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),x.indent_content=!0;var B=f.current_line_has_match(/{{#if/);B||f.print_newline(!1)}x.tag_name==="!--"&&A.type===s.TAG_CLOSE&&D.is_end_tag&&x.text.indexOf(`
`)===-1||(x.is_inline_element||x.is_unformatted||f.print_newline(!1),this._calcluate_parent_multiline(f,x))}else if(x.is_end_tag){var O=!1;O=x.start_tag_token&&x.start_tag_token.multiline_content,O=O||!x.is_inline_element&&!(D.is_inline_element||D.is_unformatted)&&!(A.type===s.TAG_CLOSE&&x.start_tag_token===D)&&A.type!=="TK_CONTENT",(x.is_content_unformatted||x.is_unformatted)&&(O=!1),O&&f.print_newline(!1)}else x.indent_content=!x.custom_beautifier_name,x.tag_start_char==="<"&&(x.tag_name==="html"?x.indent_content=this._options.indent_inner_html:x.tag_name==="head"?x.indent_content=this._options.indent_head_inner_html:x.tag_name==="body"&&(x.indent_content=this._options.indent_body_inner_html)),!(x.is_inline_element||x.is_unformatted)&&(A.type!=="TK_CONTENT"||x.is_content_unformatted)&&f.print_newline(!1),this._calcluate_parent_multiline(f,x)},h.prototype._calcluate_parent_multiline=function(f,c){c.parent&&f._output.just_added_newline()&&!((c.is_inline_element||c.is_unformatted)&&c.parent.is_inline_element)&&(c.parent.multiline_content=!0)};var r=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],l=["a","audio","del","ins","map","noscript","video"];h.prototype._do_optional_end_element=function(f){var c=null;if(f.is_empty_element||!f.is_start_tag||!f.parent)return;if(f.tag_name==="body")c=c||this._tag_stack.try_pop("head");else if(f.tag_name==="li")c=c||this._tag_stack.try_pop("li",["ol","ul"]);else if(f.tag_name==="dd"||f.tag_name==="dt")c=c||this._tag_stack.try_pop("dt",["dl"]),c=c||this._tag_stack.try_pop("dd",["dl"]);else if(f.parent.tag_name==="p"&&r.indexOf(f.tag_name)!==-1){var x=f.parent.parent;(!x||l.indexOf(x.tag_name)===-1)&&(c=c||this._tag_stack.try_pop("p"))}else f.tag_name==="rp"||f.tag_name==="rt"?(c=c||this._tag_stack.try_pop("rt",["ruby","rtc"]),c=c||this._tag_stack.try_pop("rp",["ruby","rtc"])):f.tag_name==="optgroup"?c=c||this._tag_stack.try_pop("optgroup",["select"]):f.tag_name==="option"?c=c||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):f.tag_name==="colgroup"?c=c||this._tag_stack.try_pop("caption",["table"]):f.tag_name==="thead"?(c=c||this._tag_stack.try_pop("caption",["table"]),c=c||this._tag_stack.try_pop("colgroup",["table"])):f.tag_name==="tbody"||f.tag_name==="tfoot"?(c=c||this._tag_stack.try_pop("caption",["table"]),c=c||this._tag_stack.try_pop("colgroup",["table"]),c=c||this._tag_stack.try_pop("thead",["table"]),c=c||this._tag_stack.try_pop("tbody",["table"])):f.tag_name==="tr"?(c=c||this._tag_stack.try_pop("caption",["table"]),c=c||this._tag_stack.try_pop("colgroup",["table"]),c=c||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(f.tag_name==="th"||f.tag_name==="td")&&(c=c||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),c=c||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return f.parent=this._tag_stack.get_parser_token(),c},y.exports.Beautifier=h},function(y,v,d){var o=d(6).Options;function n(a){o.call(this,a,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}n.prototype=new o,y.exports.Options=n},function(y,v,d){var o=d(9).Tokenizer,n=d(9).TOKEN,a=d(13).Directives,s=d(14).TemplatablePattern,e=d(12).Pattern,t={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:n.START,RAW:n.RAW,EOF:n.EOF},i=new a(/<\!--/,/-->/),T=function(_,m){o.call(this,_,m),this._current_tag_name="";var E=new s(this._input).read_options(this._options),g=new e(this._input);if(this.__patterns={word:E.until(/[\n\r\t <]/),single_quote:E.until_after(/'/),double_quote:E.until_after(/"/),attribute:E.until(/[\n\r\t =>]|\/>/),element_name:E.until(/[\n\r\t >\/]/),handlebars_comment:g.starting_with(/{{!--/).until_after(/--}}/),handlebars:g.starting_with(/{{/).until_after(/}}/),handlebars_open:g.until(/[\n\r\t }]/),handlebars_raw_close:g.until(/}}/),comment:g.starting_with(/<!--/).until_after(/-->/),cdata:g.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:g.starting_with(/<!\[/).until_after(/]>/),processing:g.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var h=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=g.matching(h).until_after(h)}};T.prototype=new o,T.prototype._is_comment=function(_){return!1},T.prototype._is_opening=function(_){return _.type===t.TAG_OPEN},T.prototype._is_closing=function(_,m){return _.type===t.TAG_CLOSE&&m&&((_.text===">"||_.text==="/>")&&m.text[0]==="<"||_.text==="}}"&&m.text[0]==="{"&&m.text[1]==="{")},T.prototype._reset=function(){this._current_tag_name=""},T.prototype._get_next_token=function(_,m){var E=null;this._readWhitespace();var g=this._input.peek();return g===null?this._create_token(t.EOF,""):(E=E||this._read_open_handlebars(g,m),E=E||this._read_attribute(g,_,m),E=E||this._read_close(g,m),E=E||this._read_raw_content(g,_,m),E=E||this._read_content_word(g),E=E||this._read_comment_or_cdata(g),E=E||this._read_processing(g),E=E||this._read_open(g,m),E=E||this._create_token(t.UNKNOWN,this._input.next()),E)},T.prototype._read_comment_or_cdata=function(_){var m=null,E=null,g=null;if(_==="<"){var h=this._input.peek(1);h==="!"&&(E=this.__patterns.comment.read(),E?(g=i.get_directives(E),g&&g.ignore==="start"&&(E+=i.readIgnored(this._input))):E=this.__patterns.cdata.read()),E&&(m=this._create_token(t.COMMENT,E),m.directives=g)}return m},T.prototype._read_processing=function(_){var m=null,E=null,g=null;if(_==="<"){var h=this._input.peek(1);(h==="!"||h==="?")&&(E=this.__patterns.conditional_comment.read(),E=E||this.__patterns.processing.read()),E&&(m=this._create_token(t.COMMENT,E),m.directives=g)}return m},T.prototype._read_open=function(_,m){var E=null,g=null;return m||_==="<"&&(E=this._input.next(),this._input.peek()==="/"&&(E+=this._input.next()),E+=this.__patterns.element_name.read(),g=this._create_token(t.TAG_OPEN,E)),g},T.prototype._read_open_handlebars=function(_,m){var E=null,g=null;return m||this._options.indent_handlebars&&_==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(E=this.__patterns.handlebars_comment.read(),E=E||this.__patterns.handlebars.read(),g=this._create_token(t.COMMENT,E)):(E=this.__patterns.handlebars_open.read(),g=this._create_token(t.TAG_OPEN,E))),g},T.prototype._read_close=function(_,m){var E=null,g=null;return m&&(m.text[0]==="<"&&(_===">"||_==="/"&&this._input.peek(1)===">")?(E=this._input.next(),_==="/"&&(E+=this._input.next()),g=this._create_token(t.TAG_CLOSE,E)):m.text[0]==="{"&&_==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),g=this._create_token(t.TAG_CLOSE,"}}"))),g},T.prototype._read_attribute=function(_,m,E){var g=null,h="";if(E&&E.text[0]==="<")if(_==="=")g=this._create_token(t.EQUALS,this._input.next());else if(_==='"'||_==="'"){var u=this._input.next();_==='"'?u+=this.__patterns.double_quote.read():u+=this.__patterns.single_quote.read(),g=this._create_token(t.VALUE,u)}else h=this.__patterns.attribute.read(),h&&(m.type===t.EQUALS?g=this._create_token(t.VALUE,h):g=this._create_token(t.ATTRIBUTE,h));return g},T.prototype._is_content_unformatted=function(_){return this._options.void_elements.indexOf(_)===-1&&(this._options.content_unformatted.indexOf(_)!==-1||this._options.unformatted.indexOf(_)!==-1)},T.prototype._read_raw_content=function(_,m,E){var g="";if(E&&E.text[0]==="{")g=this.__patterns.handlebars_raw_close.read();else if(m.type===t.TAG_CLOSE&&m.opened.text[0]==="<"&&m.text[0]!=="/"){var h=m.opened.text.substr(1).toLowerCase();if(h==="script"||h==="style"){var u=this._read_comment_or_cdata(_);if(u)return u.type=t.TEXT,u;g=this._input.readUntil(new RegExp("</"+h+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(h)&&(g=this._input.readUntil(new RegExp("</"+h+"[\\n\\r\\t ]*?>","ig")))}return g?this._create_token(t.TEXT,g):null},T.prototype._read_content_word=function(_){var m="";if(this._options.unformatted_content_delimiter&&(_===this._options.unformatted_content_delimiter[0]&&(m=this.__patterns.unformatted_content_delimiter.read())),m||(m=this.__patterns.word.read()),m)return this._create_token(t.TEXT,m)},y.exports.Tokenizer=T,y.exports.TOKEN=t}],U={};function R(y){var v=U[y];if(v!==void 0)return v.exports;var d=U[y]={exports:{}};return H[y](d,d.exports,R),d.exports}var S=R(18);I=S})();var j=I;if(!0)!(ie=[F,F("6UM0"),F("TXwP")],L=function(H){var U=F("6UM0"),R=F("TXwP");return{html_beautify:function(S,y){return j(S,y,U.js_beautify,R.css_beautify)}}}.apply(Re,ie),L!==void 0&&(Ge.exports=L));else var C,w})()},pxMS:function(Ge,Re,F){Ge.exports=F.p+"static/program-banner.03adba1e.png"},"rAM+":function(Ge,Re,F){"use strict";F.d(Re,"a",function(){return L});var ie=F("Qw5x");function L(I,j){var C;if(typeof Symbol=="undefined"||I[Symbol.iterator]==null){if(Array.isArray(I)||(C=Object(ie.a)(I))||j&&I&&typeof I.length=="number"){C&&(I=C);var w=0,H=function(){};return{s:H,n:function(){return w>=I.length?{done:!0}:{done:!1,value:I[w++]}},e:function(v){throw v},f:H}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var U=!0,R=!1,S;return{s:function(){C=I[Symbol.iterator]()},n:function(){var v=C.next();return U=v.done,v},e:function(v){R=!0,S=v},f:function(){try{!U&&C.return!=null&&C.return()}finally{if(R)throw S}}}}},rUJ1:function(Ge,Re){const F=/[&<>"']/,ie=/[&<>"']/g,L=/[<>"']|&(?!#?\w+;)/,I=/[<>"']|&(?!#?\w+;)/g,j={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},C=g=>j[g];function w(g,h){if(h){if(F.test(g))return g.replace(ie,C)}else if(L.test(g))return g.replace(I,C);return g}const H=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function U(g){return g.replace(H,(h,u)=>(u=u.toLowerCase(),u==="colon"?":":u.charAt(0)==="#"?u.charAt(1)==="x"?String.fromCharCode(parseInt(u.substring(2),16)):String.fromCharCode(+u.substring(1)):""))}const R=/(^|[^\[])\^/g;function S(g,h){g=g.source||g,h=h||"";const u={replace:(r,l)=>(l=l.source||l,l=l.replace(R,"$1"),g=g.replace(r,l),u),getRegex:()=>new RegExp(g,h)};return u}const y=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function d(g,h,u){if(g){let r;try{r=decodeURIComponent(U(u)).replace(y,"").toLowerCase()}catch(l){return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}h&&!v.test(u)&&(u=e(h,u));try{u=encodeURI(u).replace(/%25/g,"%")}catch(r){return null}return u}const o={},n=/^[^:]+:\/*[^/]*$/,a=/^([^:]+:)[\s\S]*$/,s=/^([^:]+:\/*[^/]*)[\s\S]*$/;function e(g,h){o[" "+g]||(n.test(g)?o[" "+g]=g+"/":o[" "+g]=_(g,"/",!0)),g=o[" "+g];const u=g.indexOf(":")===-1;return h.substring(0,2)==="//"?u?h:g.replace(a,"$1")+h:h.charAt(0)==="/"?u?h:g.replace(s,"$1")+h:g+h}const t={exec:function(){}};function i(g){let h=1,u,r;for(;h<arguments.length;h++){u=arguments[h];for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(g[r]=u[r])}return g}function T(g,h){const u=g.replace(/\|/g,(f,c,x)=>{let D=!1,A=c;for(;--A>=0&&x[A]==="\\";)D=!D;return D?"|":" |"}),r=u.split(/ \|/);let l=0;if(r.length>h)r.splice(h);else for(;r.length<h;)r.push("");for(;l<r.length;l++)r[l]=r[l].trim().replace(/\\\|/g,"|");return r}function _(g,h,u){const r=g.length;if(r===0)return"";let l=0;for(;l<r;){const f=g.charAt(r-l-1);if(f===h&&!u)l++;else if(f!==h&&u)l++;else break}return g.substr(0,r-l)}function m(g,h){if(g.indexOf(h[1])===-1)return-1;const u=g.length;let r=0,l=0;for(;l<u;l++)if(g[l]==="\\")l++;else if(g[l]===h[0])r++;else if(g[l]===h[1]&&(r--,r<0))return l;return-1}function E(g){g&&g.sanitize&&!g.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}Ge.exports={escape:w,unescape:U,edit:S,cleanUrl:d,resolveUrl:e,noopTest:t,merge:i,splitCells:T,rtrim:_,findClosingBracket:m,checkSanitizeDeprecation:E}},sR1s:function(Ge,Re,F){"use strict";F.d(Re,"b",function(){return j}),F.d(Re,"a",function(){return C}),F.d(Re,"c",function(){return w}),F.d(Re,"d",function(){return H});var ie=F("U8pU"),L="RC_TABLE_KEY";function I(U){return U==null?[]:Array.isArray(U)?U:[U]}function j(U,R){if(!R&&typeof R!="number")return U;for(var S=I(R),y=U,v=0;v<S.length;v+=1){if(!y)return null;var d=S[v];y=y[d]}return y}function C(U){var R=[],S={};return U.forEach(function(y){for(var v=y||{},d=v.key,o=v.dataIndex,n=d||I(o).join("-")||L;S[n];)n="".concat(n,"_next");S[n]=!0,R.push(n)}),R}function w(){var U={};function R(d,o){o&&Object.keys(o).forEach(function(n){var a=o[n];a&&Object(ie.a)(a)==="object"?(d[n]=d[n]||{},R(d[n],a)):d[n]=a})}for(var S=arguments.length,y=new Array(S),v=0;v<S;v++)y[v]=arguments[v];return y.forEach(function(d){R(U,d)}),U}function H(U){return U!=null}},sboe:function(Ge,Re,F){"use strict";F.d(Re,"a",function(){return I});var ie=F("cDcd"),L=F.n(ie),I=ie.createContext(null)},siWv:function(Ge,Re,F){Ge.exports={flex_box_center:"flex_box_center___3IH6S",flex_space_between:"flex_space_between___3AU-S",flex_box_vertical_center:"flex_box_vertical_center___1ykIO",flex_box_center_end:"flex_box_center_end___1aIQB",flex_box_column:"flex_box_column___2A_ra",btn:"btn___23gjd"}},t23M:function(Ge,Re,F){"use strict";var ie=F("VTBJ"),L=F("1OyB"),I=F("vuIU"),j=F("Ji7U"),C=F("LK+K"),w=F("cDcd"),H=F.n(w),U=F("m+aA"),R=F("Zm9Q"),S=F("Kwbf"),y=F("c+Xe"),v=F("bdgK"),d="rc-observer-key",o=function(n){Object(j.a)(s,n);var a=Object(C.a)(s);function s(){var e;return Object(L.a)(this,s),e=a.apply(this,arguments),e.resizeObserver=null,e.childNode=null,e.currentElement=null,e.state={width:0,height:0,offsetHeight:0,offsetWidth:0},e.onResize=function(t){var i=e.props.onResize,T=t[0].target,_=T.getBoundingClientRect(),m=_.width,E=_.height,g=T.offsetWidth,h=T.offsetHeight,u=Math.floor(m),r=Math.floor(E);if(e.state.width!==u||e.state.height!==r||e.state.offsetWidth!==g||e.state.offsetHeight!==h){var l={width:u,height:r,offsetWidth:g,offsetHeight:h};e.setState(l),i&&Promise.resolve().then(function(){i(Object(ie.a)(Object(ie.a)({},l),{},{offsetWidth:g,offsetHeight:h}))})}},e.setChildNode=function(t){e.childNode=t},e}return Object(I.a)(s,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var t=this.props.disabled;if(t){this.destroyObserver();return}var i=Object(U.a)(this.childNode||this),T=i!==this.currentElement;T&&(this.destroyObserver(),this.currentElement=i),!this.resizeObserver&&i&&(this.resizeObserver=new v.default(this.onResize),this.resizeObserver.observe(i))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var t=this.props.children,i=Object(R.a)(t);if(i.length>1)Object(S.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(i.length===0)return Object(S.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var T=i[0];if(w.isValidElement(T)&&Object(y.c)(T)){var _=T.ref;i[0]=w.cloneElement(T,{ref:Object(y.a)(_,this.setChildNode)})}return i.length===1?i[0]:i.map(function(m,E){return!w.isValidElement(m)||"key"in m&&m.key!==null?m:w.cloneElement(m,{key:"".concat(d,"-").concat(E)})})}}]),s}(w.Component);o.displayName="ResizeObserver",Re.a=o},ulZh:function(Ge,Re,F){typeof window!="undefined"&&function(L,I){Ge.exports=I()}(this,function(){return function(ie){var L={};function I(j){if(L[j])return L[j].exports;var C=L[j]={i:j,l:!1,exports:{}};return ie[j].call(C.exports,C,C.exports,I),C.l=!0,C.exports}return I.m=ie,I.c=L,I.d=function(j,C,w){I.o(j,C)||Object.defineProperty(j,C,{enumerable:!0,get:w})},I.r=function(j){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(j,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(j,"__esModule",{value:!0})},I.t=function(j,C){if(C&1&&(j=I(j)),C&8)return j;if(C&4&&typeof j=="object"&&j&&j.__esModule)return j;var w=Object.create(null);if(I.r(w),Object.defineProperty(w,"default",{enumerable:!0,value:j}),C&2&&typeof j!="string")for(var H in j)I.d(w,H,function(U){return j[U]}.bind(null,H));return w},I.n=function(j){var C=j&&j.__esModule?function(){return j.default}:function(){return j};return I.d(C,"a",C),C},I.o=function(j,C){return Object.prototype.hasOwnProperty.call(j,C)},I.p="/dist/",I(I.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ie,L,I){"use strict";var j=Object.prototype.hasOwnProperty,C="~";function w(){}Object.create&&(w.prototype=Object.create(null),new w().__proto__||(C=!1));function H(y,v,d){this.fn=y,this.context=v,this.once=d||!1}function U(y,v,d,o,n){if(typeof d!="function")throw new TypeError("The listener must be a function");var a=new H(d,o||y,n),s=C?C+v:v;return y._events[s]?y._events[s].fn?y._events[s]=[y._events[s],a]:y._events[s].push(a):(y._events[s]=a,y._eventsCount++),y}function R(y,v){--y._eventsCount===0?y._events=new w:delete y._events[v]}function S(){this._events=new w,this._eventsCount=0}S.prototype.eventNames=function(){var v=[],d,o;if(this._eventsCount===0)return v;for(o in d=this._events)j.call(d,o)&&v.push(C?o.slice(1):o);return Object.getOwnPropertySymbols?v.concat(Object.getOwnPropertySymbols(d)):v},S.prototype.listeners=function(v){var d=C?C+v:v,o=this._events[d];if(!o)return[];if(o.fn)return[o.fn];for(var n=0,a=o.length,s=new Array(a);n<a;n++)s[n]=o[n].fn;return s},S.prototype.listenerCount=function(v){var d=C?C+v:v,o=this._events[d];return o?o.fn?1:o.length:0},S.prototype.emit=function(v,d,o,n,a,s){var e=C?C+v:v;if(!this._events[e])return!1;var t=this._events[e],i=arguments.length,T,_;if(t.fn){t.once&&this.removeListener(v,t.fn,void 0,!0);switch(i){case 1:return t.fn.call(t.context),!0;case 2:return t.fn.call(t.context,d),!0;case 3:return t.fn.call(t.context,d,o),!0;case 4:return t.fn.call(t.context,d,o,n),!0;case 5:return t.fn.call(t.context,d,o,n,a),!0;case 6:return t.fn.call(t.context,d,o,n,a,s),!0}for(_=1,T=new Array(i-1);_<i;_++)T[_-1]=arguments[_];t.fn.apply(t.context,T)}else{var m=t.length,E;for(_=0;_<m;_++){t[_].once&&this.removeListener(v,t[_].fn,void 0,!0);switch(i){case 1:t[_].fn.call(t[_].context);break;case 2:t[_].fn.call(t[_].context,d);break;case 3:t[_].fn.call(t[_].context,d,o);break;case 4:t[_].fn.call(t[_].context,d,o,n);break;default:if(!T)for(E=1,T=new Array(i-1);E<i;E++)T[E-1]=arguments[E];t[_].fn.apply(t[_].context,T)}}}return!0},S.prototype.on=function(v,d,o){return U(this,v,d,o,!1)},S.prototype.once=function(v,d,o){return U(this,v,d,o,!0)},S.prototype.removeListener=function(v,d,o,n){var a=C?C+v:v;if(!this._events[a])return this;if(!d)return R(this,a),this;var s=this._events[a];if(s.fn)s.fn===d&&(!n||s.once)&&(!o||s.context===o)&&R(this,a);else{for(var e=0,t=[],i=s.length;e<i;e++)(s[e].fn!==d||n&&!s[e].once||o&&s[e].context!==o)&&t.push(s[e]);t.length?this._events[a]=t.length===1?t[0]:t:R(this,a)}return this},S.prototype.removeAllListeners=function(v){var d;return v?(d=C?C+v:v,this._events[d]&&R(this,d)):(this._events=new w,this._eventsCount=0),this},S.prototype.off=S.prototype.removeListener,S.prototype.addListener=S.prototype.on,S.prefixed=C,S.EventEmitter=S,ie.exports=S},"./node_modules/url-toolkit/src/url-toolkit.js":function(ie,L,I){(function(j){var C=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,w=/^([^\/?#]*)([^]*)$/,H=/(?:\/|^)\.(?=\/)/g,U=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,R={buildAbsoluteURL:function(S,y,v){if(v=v||{},S=S.trim(),y=y.trim(),!y){if(!v.alwaysNormalize)return S;var d=R.parseURL(S);if(!d)throw new Error("Error trying to parse base URL.");return d.path=R.normalizePath(d.path),R.buildURLFromParts(d)}var o=R.parseURL(y);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return v.alwaysNormalize?(o.path=R.normalizePath(o.path),R.buildURLFromParts(o)):y;var n=R.parseURL(S);if(!n)throw new Error("Error trying to parse base URL.");if(!n.netLoc&&n.path&&n.path[0]!=="/"){var a=w.exec(n.path);n.netLoc=a[1],n.path=a[2]}n.netLoc&&!n.path&&(n.path="/");var s={scheme:n.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(s.netLoc=n.netLoc,o.path[0]!=="/"))if(!o.path)s.path=n.path,o.params||(s.params=n.params,o.query||(s.query=n.query));else{var e=n.path,t=e.substring(0,e.lastIndexOf("/")+1)+o.path;s.path=R.normalizePath(t)}return s.path===null&&(s.path=v.alwaysNormalize?R.normalizePath(o.path):o.path),R.buildURLFromParts(s)},parseURL:function(S){var y=C.exec(S);return y?{scheme:y[1]||"",netLoc:y[2]||"",path:y[3]||"",params:y[4]||"",query:y[5]||"",fragment:y[6]||""}:null},normalizePath:function(S){for(S=S.split("").reverse().join("").replace(H,"");S.length!==(S=S.replace(U,"")).length;);return S.split("").reverse().join("")},buildURLFromParts:function(S){return S.scheme+S.netLoc+S.path+S.params+S.query+S.fragment}};ie.exports=R})(this)},"./node_modules/webworkify-webpack/index.js":function(ie,L,I){function j(v){var d={};function o(a){if(d[a])return d[a].exports;var s=d[a]={i:a,l:!1,exports:{}};return v[a].call(s.exports,s,s.exports,o),s.l=!0,s.exports}o.m=v,o.c=d,o.i=function(a){return a},o.d=function(a,s,e){o.o(a,s)||Object.defineProperty(a,s,{configurable:!1,enumerable:!0,get:e})},o.r=function(a){Object.defineProperty(a,"__esModule",{value:!0})},o.n=function(a){var s=a&&a.__esModule?function(){return a.default}:function(){return a};return o.d(s,"a",s),s},o.o=function(a,s){return Object.prototype.hasOwnProperty.call(a,s)},o.p="/",o.oe=function(a){throw console.error(a),a};var n=o(o.s=ENTRY_MODULE);return n.default||n}var C="[\\.|\\-|\\+|\\w|/|@]+",w="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+C+").*?\\)";function H(v){return(v+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function U(v){return!isNaN(1*v)}function R(v,d,o){var n={};n[o]=[];var a=d.toString(),s=a.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return n;for(var e=s[1],t=new RegExp("(\\\\n|\\W)"+H(e)+w,"g"),i;i=t.exec(a);){if(i[3]==="dll-reference")continue;n[o].push(i[3])}for(t=new RegExp("\\("+H(e)+'\\("(dll-reference\\s('+C+'))"\\)\\)'+w,"g");i=t.exec(a);)v[i[2]]||(n[o].push(i[1]),v[i[2]]=I(i[1]).m),n[i[2]]=n[i[2]]||[],n[i[2]].push(i[4]);for(var T=Object.keys(n),_=0;_<T.length;_++)for(var m=0;m<n[T[_]].length;m++)U(n[T[_]][m])&&(n[T[_]][m]=1*n[T[_]][m]);return n}function S(v){var d=Object.keys(v);return d.reduce(function(o,n){return o||v[n].length>0},!1)}function y(v,d){for(var o={main:[d]},n={main:[]},a={main:{}};S(o);)for(var s=Object.keys(o),e=0;e<s.length;e++){var t=s[e],i=o[t],T=i.pop();if(a[t]=a[t]||{},a[t][T]||!v[t][T])continue;a[t][T]=!0,n[t]=n[t]||[],n[t].push(T);for(var _=R(v,v[t][T],t),m=Object.keys(_),E=0;E<m.length;E++)o[m[E]]=o[m[E]]||[],o[m[E]]=o[m[E]].concat(_[m[E]])}return n}ie.exports=function(v,d){d=d||{};var o={main:I.m},n=d.all?{main:Object.keys(o.main)}:y(o,v),a="";Object.keys(n).filter(function(T){return T!=="main"}).forEach(function(T){for(var _=0;n[T][_];)_++;n[T].push(_),o[T][_]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",a=a+"var "+T+" = ("+j.toString().replace("ENTRY_MODULE",JSON.stringify(_))+")({"+n[T].map(function(m){return""+JSON.stringify(m)+": "+o[T][m].toString()}).join(",")+`});
`}),a=a+"new (("+j.toString().replace("ENTRY_MODULE",JSON.stringify(v))+")({"+n.main.map(function(T){return""+JSON.stringify(T)+": "+o.main[T].toString()}).join(",")+"}))(self);";var s=new window.Blob([a],{type:"text/javascript"});if(d.bare)return s;var e=window.URL||window.webkitURL||window.mozURL||window.msURL,t=e.createObjectURL(s),i=new window.Worker(t);return i.objectURL=t,i}},"./src/config.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"hlsDefaultConfig",function(){return E}),I.d(L,"mergeConfig",function(){return h}),I.d(L,"enableStreamingMode",function(){return u});var j=I("./src/controller/abr-controller.ts"),C=I("./src/controller/audio-stream-controller.ts"),w=I("./src/controller/audio-track-controller.ts"),H=I("./src/controller/subtitle-stream-controller.ts"),U=I("./src/controller/subtitle-track-controller.ts"),R=I("./src/controller/buffer-controller.ts"),S=I("./src/controller/timeline-controller.ts"),y=I("./src/controller/cap-level-controller.ts"),v=I("./src/controller/fps-controller.ts"),d=I("./src/controller/eme-controller.ts"),o=I("./src/controller/cmcd-controller.ts"),n=I("./src/utils/xhr-loader.ts"),a=I("./src/utils/fetch-loader.ts"),s=I("./src/utils/cues.ts"),e=I("./src/utils/mediakeys-helper.ts"),t=I("./src/utils/logger.ts");function i(){return i=Object.assign||function(r){for(var l=1;l<arguments.length;l++){var f=arguments[l];for(var c in f)Object.prototype.hasOwnProperty.call(f,c)&&(r[c]=f[c])}return r},i.apply(this,arguments)}function T(r,l){var f=Object.keys(r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);l&&(c=c.filter(function(x){return Object.getOwnPropertyDescriptor(r,x).enumerable})),f.push.apply(f,c)}return f}function _(r){for(var l=1;l<arguments.length;l++){var f=arguments[l]!=null?arguments[l]:{};l%2?T(Object(f),!0).forEach(function(c){m(r,c,f[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(f)):T(Object(f)).forEach(function(c){Object.defineProperty(r,c,Object.getOwnPropertyDescriptor(f,c))})}return r}function m(r,l,f){return l in r?Object.defineProperty(r,l,{value:f,enumerable:!0,configurable:!0,writable:!0}):r[l]=f,r}var E=_(_({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:n.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:j.default,bufferController:R.default,capLevelController:y.default,fpsController:v.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:e.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},g()),{},{subtitleStreamController:H.SubtitleStreamController,subtitleTrackController:U.default,timelineController:S.TimelineController,audioStreamController:C.default,audioTrackController:w.default,emeController:d.default,cmcdController:o.default});function g(){return{cueHandler:s.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function h(r,l){if((l.liveSyncDurationCount||l.liveMaxLatencyDurationCount)&&(l.liveSyncDuration||l.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(l.liveMaxLatencyDurationCount!==void 0&&(l.liveSyncDurationCount===void 0||l.liveMaxLatencyDurationCount<=l.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(l.liveMaxLatencyDuration!==void 0&&(l.liveSyncDuration===void 0||l.liveMaxLatencyDuration<=l.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return i({},r,l)}function u(r){var l=r.loader;if(l!==a.default&&l!==n.default)t.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),r.progressive=!1;else{var f=Object(a.fetchSupported)();f&&(r.loader=a.default,r.progressive=!0,r.enableSoftwareAES=!0,t.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/polyfills/number.ts"),C=I("./src/utils/ewma-bandwidth-estimator.ts"),w=I("./src/events.ts"),H=I("./src/utils/buffer-helper.ts"),U=I("./src/errors.ts"),R=I("./src/types/loader.ts"),S=I("./src/utils/logger.ts");function y(o,n){for(var a=0;a<n.length;a++){var s=n[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}function v(o,n,a){return n&&y(o.prototype,n),a&&y(o,a),o}var d=function(){function o(a){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=a;var s=a.config;this.bwEstimator=new C.default(s.abrEwmaSlowVoD,s.abrEwmaFastVoD,s.abrEwmaDefaultEstimate),this.registerListeners()}var n=o.prototype;return n.registerListeners=function(){var s=this.hls;s.on(w.Events.FRAG_LOADING,this.onFragLoading,this),s.on(w.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.on(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.on(w.Events.ERROR,this.onError,this)},n.unregisterListeners=function(){var s=this.hls;s.off(w.Events.FRAG_LOADING,this.onFragLoading,this),s.off(w.Events.FRAG_LOADED,this.onFragLoaded,this),s.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.off(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.off(w.Events.ERROR,this.onError,this)},n.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},n.onFragLoading=function(s,e){var t=e.frag;if(t.type===R.PlaylistLevelType.MAIN&&!this.timer){var i;this.fragCurrent=t,this.partCurrent=(i=e.part)!=null?i:null,this.timer=self.setInterval(this.onCheck,100)}},n.onLevelLoaded=function(s,e){var t=this.hls.config;e.details.live?this.bwEstimator.update(t.abrEwmaSlowLive,t.abrEwmaFastLive):this.bwEstimator.update(t.abrEwmaSlowVoD,t.abrEwmaFastVoD)},n._abandonRulesCheck=function(){var s=this.fragCurrent,e=this.partCurrent,t=this.hls,i=t.autoLevelEnabled,T=t.config,_=t.media;if(!s||!_)return;var m=e?e.stats:s.stats,E=e?e.duration:s.duration;if(m.aborted){S.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!i||_.paused||!_.playbackRate||!_.readyState)return;var g=performance.now()-m.loading.start,h=Math.abs(_.playbackRate);if(g<=500*E/h)return;var u=t.levels,r=t.minAutoLevel,l=u[s.level],f=m.total||Math.max(m.loaded,Math.round(E*l.maxBitrate/8)),c=Math.max(1,m.bwEstimate?m.bwEstimate/8:m.loaded*1e3/g),x=(f-m.loaded)/c,D=_.currentTime,A=(H.BufferHelper.bufferInfo(_,D,T.maxBufferHole).end-D)/h;if(A>=2*E/h||x<=A)return;var B=Number.POSITIVE_INFINITY,O;for(O=s.level-1;O>r;O--){var W=u[O].maxBitrate;if(B=E*W/(8*.8*c),B<A)break}if(B>=x)return;var P=this.bwEstimator.getEstimate();S.logger.warn("Fragment "+s.sn+(e?" part "+e.index:"")+" of level "+s.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+O+`
Current BW estimate: `+(Object(j.isFiniteNumber)(P)?(P/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+x.toFixed(3)+` s
Estimated load time for the next fragment: `+B.toFixed(3)+` s
Time to underbuffer: `+A.toFixed(3)+" s"),t.nextLoadLevel=O,this.bwEstimator.sample(g,m.loaded),this.clearTimer(),s.loader&&(this.fragCurrent=this.partCurrent=null,s.loader.abort()),t.trigger(w.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:s,part:e,stats:m})},n.onFragLoaded=function(s,e){var t=e.frag,i=e.part;if(t.type===R.PlaylistLevelType.MAIN&&Object(j.isFiniteNumber)(t.sn)){var T=i?i.stats:t.stats,_=i?i.duration:t.duration;if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var m=this.hls.levels[t.level],E=(m.loaded?m.loaded.bytes:0)+T.loaded,g=(m.loaded?m.loaded.duration:0)+_;m.loaded={bytes:E,duration:g},m.realBitrate=Math.round(8*E/g)}if(t.bitrateTest){var h={stats:T,frag:t,part:i,id:t.type};this.onFragBuffered(w.Events.FRAG_BUFFERED,h),t.bitrateTest=!1}}},n.onFragBuffered=function(s,e){var t=e.frag,i=e.part,T=i?i.stats:t.stats;if(T.aborted)return;if(t.type!==R.PlaylistLevelType.MAIN||t.sn==="initSegment")return;var _=T.parsing.end-T.loading.start;this.bwEstimator.sample(_,T.loaded),T.bwEstimate=this.bwEstimator.getEstimate(),t.bitrateTest?this.bitrateTestDelay=_/1e3:this.bitrateTestDelay=0},n.onError=function(s,e){switch(e.details){case U.ErrorDetails.FRAG_LOAD_ERROR:case U.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},n.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},n.getNextABRAutoLevel=function(){var s=this.fragCurrent,e=this.partCurrent,t=this.hls,i=t.maxAutoLevel,T=t.config,_=t.minAutoLevel,m=t.media,E=e?e.duration:s?s.duration:0,g=m?m.currentTime:0,h=m&&m.playbackRate!==0?Math.abs(m.playbackRate):1,u=this.bwEstimator?this.bwEstimator.getEstimate():T.abrEwmaDefaultEstimate,r=(H.BufferHelper.bufferInfo(m,g,T.maxBufferHole).end-g)/h,l=this.findBestLevel(u,_,i,r,T.abrBandWidthFactor,T.abrBandWidthUpFactor);if(l>=0)return l;S.logger.trace((r?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var f=E?Math.min(E,T.maxStarvationDelay):T.maxStarvationDelay,c=T.abrBandWidthFactor,x=T.abrBandWidthUpFactor;if(!r){var D=this.bitrateTestDelay;if(D){var A=E?Math.min(E,T.maxLoadingDelay):T.maxLoadingDelay;f=A-D,S.logger.trace("bitrate test took "+Math.round(1e3*D)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*f)+" ms"),c=x=1}}return l=this.findBestLevel(u,_,i,r+f,c,x),Math.max(l,0)},n.findBestLevel=function(s,e,t,i,T,_){for(var m,E=this.fragCurrent,g=this.partCurrent,h=this.lastLoadedFragLevel,u=this.hls.levels,r=u[h],l=!!(r!=null&&(m=r.details)!==null&&m!==void 0&&m.live),f=r==null?void 0:r.codecSet,c=g?g.duration:E?E.duration:0,x=t;x>=e;x--){var D=u[x];if(!D||f&&D.codecSet!==f)continue;var A=D.details,B=(g?A==null?void 0:A.partTarget:A==null?void 0:A.averagetargetduration)||c,O=void 0;x<=h?O=T*s:O=_*s;var W=u[x].maxBitrate,P=W*B/O;if(S.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+x+"/"+Math.round(O)+"/"+W+"/"+B+"/"+i+"/"+P),O>W&&(!P||l&&!this.bitrateTestDelay||P<i))return x}return-1},v(o,[{key:"nextAutoLevel",get:function(){var s=this._nextAutoLevel,e=this.bwEstimator;if(s!==-1&&(!e||!e.canEstimate()))return s;var t=this.getNextABRAutoLevel();return s!==-1&&(t=Math.min(s,t)),t},set:function(s){this._nextAutoLevel=s}}]),o}();L.default=d},"./src/controller/audio-stream-controller.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/polyfills/number.ts"),C=I("./src/controller/base-stream-controller.ts"),w=I("./src/events.ts"),H=I("./src/utils/buffer-helper.ts"),U=I("./src/controller/fragment-tracker.ts"),R=I("./src/types/level.ts"),S=I("./src/types/loader.ts"),y=I("./src/loader/fragment.ts"),v=I("./src/demux/chunk-cache.ts"),d=I("./src/demux/transmuxer-interface.ts"),o=I("./src/types/transmuxer.ts"),n=I("./src/controller/fragment-finders.ts"),a=I("./src/utils/discontinuities.ts"),s=I("./src/errors.ts"),e=I("./src/utils/logger.ts");function t(){return t=Object.assign||function(E){for(var g=1;g<arguments.length;g++){var h=arguments[g];for(var u in h)Object.prototype.hasOwnProperty.call(h,u)&&(E[u]=h[u])}return E},t.apply(this,arguments)}function i(E,g){E.prototype=Object.create(g.prototype),E.prototype.constructor=E,T(E,g)}function T(E,g){return T=Object.setPrototypeOf||function(u,r){return u.__proto__=r,u},T(E,g)}var _=100,m=function(E){i(g,E);function g(u,r){var l;return l=E.call(this,u,r,"[audio-stream-controller]")||this,l.videoBuffer=null,l.videoTrackCC=-1,l.waitingVideoCC=-1,l.audioSwitch=!1,l.trackId=-1,l.waitingData=null,l.mainDetails=null,l.bufferFlushed=!1,l._registerListeners(),l}var h=g.prototype;return h.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},h._registerListeners=function(){var r=this.hls;r.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.on(w.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),r.on(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.on(w.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),r.on(w.Events.ERROR,this.onError,this),r.on(w.Events.BUFFER_RESET,this.onBufferReset,this),r.on(w.Events.BUFFER_CREATED,this.onBufferCreated,this),r.on(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.on(w.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},h._unregisterListeners=function(){var r=this.hls;r.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.off(w.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),r.off(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.off(w.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),r.off(w.Events.ERROR,this.onError,this),r.off(w.Events.BUFFER_RESET,this.onBufferReset,this),r.off(w.Events.BUFFER_CREATED,this.onBufferCreated,this),r.off(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.off(w.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},h.onInitPtsFound=function(r,l){var f=l.frag,c=l.id,x=l.initPTS;if(c==="main"){var D=f.cc;this.initPTS[f.cc]=x,this.log("InitPTS for cc: "+D+" found from main: "+x),this.videoTrackCC=D,this.state===C.State.WAITING_INIT_PTS&&this.tick()}},h.startLoad=function(r){if(!this.levels){this.startPosition=r,this.state=C.State.STOPPED;return}var l=this.lastCurrentTime;this.stopLoad(),this.setInterval(_),this.fragLoadError=0,l>0&&r===-1?(this.log("Override startPosition with lastCurrentTime @"+l.toFixed(3)),this.state=C.State.IDLE):(this.loadedmetadata=!1,this.state=C.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=r,this.tick()},h.doTick=function(){switch(this.state){case C.State.IDLE:this.doTickIdle();break;case C.State.WAITING_TRACK:{var r,l=this.levels,f=this.trackId,c=l==null||((r=l[f])===null||r===void 0)?void 0:r.details;if(c){if(this.waitForCdnTuneIn(c))break;this.state=C.State.WAITING_INIT_PTS}break}case C.State.FRAG_LOADING_WAITING_RETRY:{var x,D=performance.now(),A=this.retryDate;(!A||D>=A||(x=this.media)!==null&&x!==void 0&&x.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=C.State.IDLE);break}case C.State.WAITING_INIT_PTS:{var B=this.waitingData;if(B){var O=B.frag,W=B.part,P=B.cache,G=B.complete;if(this.initPTS[O.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=C.State.FRAG_LOADING;var Q=P.flush(),re={frag:O,part:W,payload:Q,networkDetails:null};this._handleFragmentLoadProgress(re),G&&E.prototype._handleFragmentLoadComplete.call(this,re)}else if(this.videoTrackCC!==this.waitingVideoCC)e.logger.log("Waiting fragment cc ("+O.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var le=this.getLoadPosition(),Ee=H.BufferHelper.bufferInfo(this.mediaBuffer,le,this.config.maxBufferHole),_e=Object(n.fragmentWithinToleranceTest)(Ee.end,this.config.maxFragLookUpTolerance,O);_e<0&&(e.logger.log("Waiting fragment cc ("+O.cc+") @ "+O.start+" cancelled because another fragment at "+Ee.end+" is needed"),this.clearWaitingFragment())}}else this.state=C.State.IDLE}}this.onTickEnd()},h.clearWaitingFragment=function(){var r=this.waitingData;r&&(this.fragmentTracker.removeFragment(r.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=C.State.IDLE)},h.onTickEnd=function(){var r=this.media;if(!r||!r.readyState)return;var l=this.mediaBuffer?this.mediaBuffer:r,f=l.buffered;!this.loadedmetadata&&f.length&&(this.loadedmetadata=!0),this.lastCurrentTime=r.currentTime},h.doTickIdle=function(){var r,l,f=this.hls,c=this.levels,x=this.media,D=this.trackId,A=f.config;if(!c||!c[D])return;if(!x&&(this.startFragRequested||!A.startFragPrefetch))return;var B=c[D],O=B.details;if(!O||O.live&&this.levelLastLoaded!==D||this.waitForCdnTuneIn(O)){this.state=C.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,y.ElementaryStreamTypes.AUDIO,S.PlaylistLevelType.AUDIO));var W=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,S.PlaylistLevelType.AUDIO);if(W===null)return;var P=W.len,G=this.getMaxBufferLength(),Q=this.audioSwitch;if(P>=G&&!Q)return;if(!Q&&this._streamEnded(W,O)){f.trigger(w.Events.BUFFER_EOS,{type:"audio"}),this.state=C.State.ENDED;return}var re=O.fragments,le=re[0].start,Ee=W.end;if(Q){var _e=this.getLoadPosition();Ee=_e,O.PTSKnown&&_e<le&&((W.end>le||W.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),x.currentTime=le+.05))}var ne=this.getNextFragment(Ee,O);if(!ne){this.bufferFlushed=!0;return}((r=ne.decryptdata)===null||r===void 0?void 0:r.keyFormat)==="identity"&&!((l=ne.decryptdata)!==null&&l!==void 0&&l.key)?this.loadKey(ne,O):this.loadFragment(ne,O,Ee)},h.getMaxBufferLength=function(){var r=E.prototype.getMaxBufferLength.call(this),l=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,S.PlaylistLevelType.MAIN);return l===null?r:Math.max(r,l.len)},h.onMediaDetaching=function(){this.videoBuffer=null,E.prototype.onMediaDetaching.call(this)},h.onAudioTracksUpdated=function(r,l){var f=l.audioTracks;this.resetTransmuxer(),this.levels=f.map(function(c){return new R.Level(c)})},h.onAudioTrackSwitching=function(r,l){var f=!!l.url;this.trackId=l.id;var c=this.fragCurrent;c!=null&&c.loader&&c.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),f?this.setInterval(_):this.resetTransmuxer(),f?(this.audioSwitch=!0,this.state=C.State.IDLE):this.state=C.State.STOPPED,this.tick()},h.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},h.onLevelLoaded=function(r,l){this.mainDetails=l.details},h.onAudioTrackLoaded=function(r,l){var f,c=this.levels,x=l.details,D=l.id;if(!c){this.warn("Audio tracks were reset while loading level "+D);return}this.log("Track "+D+" loaded ["+x.startSN+","+x.endSN+"],duration:"+x.totalduration);var A=c[D],B=0;if(x.live||(f=A.details)!==null&&f!==void 0&&f.live){var O=this.mainDetails;if(x.fragments[0]||(x.deltaUpdateFailed=!0),x.deltaUpdateFailed||!O)return;!A.details&&x.hasProgramDateTime&&O.hasProgramDateTime?(Object(a.alignMediaPlaylistByPDT)(x,O),B=x.fragments[0].start):B=this.alignPlaylists(x,A.details)}A.details=x,this.levelLastLoaded=D,!this.startFragRequested&&(this.mainDetails||!x.live)&&this.setStartPosition(A.details,B),this.state===C.State.WAITING_TRACK&&!this.waitForCdnTuneIn(x)&&(this.state=C.State.IDLE),this.tick()},h._handleFragmentLoadProgress=function(r){var l,f=r.frag,c=r.part,x=r.payload,D=this.config,A=this.trackId,B=this.levels;if(!B){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+f.sn+" of level "+f.level+" will not be buffered");return}var O=B[A];console.assert(O,"Audio track is defined on fragment load progress");var W=O.details;console.assert(W,"Audio track details are defined on fragment load progress");var P=D.defaultAudioCodec||O.audioCodec||"mp4a.40.2",G=this.transmuxer;G||(G=this.transmuxer=new d.default(this.hls,S.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var Q=this.initPTS[f.cc],re=(l=f.initSegment)===null||l===void 0?void 0:l.data;if(Q!==void 0){var le=!1,Ee=c?c.index:-1,_e=Ee!==-1,ne=new o.ChunkMetadata(f.level,f.sn,f.stats.chunkCount,x.byteLength,Ee,_e);G.push(x,re,P,"",f,c,W.totalduration,le,ne,Q)}else{e.logger.log("Unknown video PTS for cc "+f.cc+", waiting for video PTS before demuxing audio frag "+f.sn+" of ["+W.startSN+" ,"+W.endSN+"],track "+A);var Te=this.waitingData=this.waitingData||{frag:f,part:c,cache:new v.default,complete:!1},Ae=Te.cache;Ae.push(new Uint8Array(x)),this.waitingVideoCC=this.videoTrackCC,this.state=C.State.WAITING_INIT_PTS}},h._handleFragmentLoadComplete=function(r){if(this.waitingData){this.waitingData.complete=!0;return}E.prototype._handleFragmentLoadComplete.call(this,r)},h.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},h.onBufferCreated=function(r,l){var f=l.tracks.audio;f&&(this.mediaBuffer=f.buffer),l.tracks.video&&(this.videoBuffer=l.tracks.video.buffer)},h.onFragBuffered=function(r,l){var f=l.frag,c=l.part;if(f.type!==S.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(f)){this.warn("Fragment "+f.sn+(c?" p: "+c.index:"")+" of level "+f.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}f.sn!=="initSegment"&&(this.fragPrevious=f,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(w.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(f,c)},h.onError=function(r,l){switch(l.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(S.PlaylistLevelType.AUDIO,l);break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==C.State.ERROR&&this.state!==C.State.STOPPED&&(this.state=l.fatal?C.State.ERROR:C.State.IDLE,this.warn(l.details+" while loading frag, switching to "+this.state+" state"));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(l.parent==="audio"&&(this.state===C.State.PARSING||this.state===C.State.PARSED)){var f=!0,c=this.getFwdBufferInfo(this.mediaBuffer,S.PlaylistLevelType.AUDIO);c&&c.len>.5&&(f=!this.reduceMaxBufferLength(c.len)),f&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,E.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},h.onBufferFlushed=function(r,l){var f=l.type;f===y.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},h._handleTransmuxComplete=function(r){var l,f="audio",c=this.hls,x=r.remuxResult,D=r.chunkMeta,A=this.getCurrentContext(D);if(!A){this.warn("The loading context changed while buffering fragment "+D.sn+" of level "+D.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(D.level);return}var B=A.frag,O=A.part,W=x.audio,P=x.text,G=x.id3,Q=x.initSegment;if(this.fragContextChanged(B))return;if(this.state=C.State.PARSING,this.audioSwitch&&W&&this.completeAudioSwitch(),Q!=null&&Q.tracks&&(this._bufferInitSegment(Q.tracks,B,D),c.trigger(w.Events.FRAG_PARSING_INIT_SEGMENT,{frag:B,id:f,tracks:Q.tracks})),W){var re=W.startPTS,le=W.endPTS,Ee=W.startDTS,_e=W.endDTS;O&&(O.elementaryStreams[y.ElementaryStreamTypes.AUDIO]={startPTS:re,endPTS:le,startDTS:Ee,endDTS:_e}),B.setElementaryStreamInfo(y.ElementaryStreamTypes.AUDIO,re,le,Ee,_e),this.bufferFragmentData(W,B,O,D)}if(G!=null&&(l=G.samples)!==null&&l!==void 0&&l.length){var ne=t({frag:B,id:f},G);c.trigger(w.Events.FRAG_PARSING_METADATA,ne)}if(P){var Te=t({frag:B,id:f},P);c.trigger(w.Events.FRAG_PARSING_USERDATA,Te)}},h._bufferInitSegment=function(r,l,f){if(this.state!==C.State.PARSING)return;r.video&&delete r.video;var c=r.audio;if(!c)return;c.levelCodec=c.codec,c.id="audio",this.log("Init audio buffer, container:"+c.container+", codecs[parsed]=["+c.codec+"]"),this.hls.trigger(w.Events.BUFFER_CODECS,r);var x=c.initSegment;if(x!=null&&x.byteLength){var D={type:"audio",frag:l,part:null,chunkMeta:f,parent:l.type,data:x};this.hls.trigger(w.Events.BUFFER_APPENDING,D)}this.tick()},h.loadFragment=function(r,l,f){var c=this.fragmentTracker.getState(r);this.fragCurrent=r,(this.audioSwitch||c===U.FragmentState.NOT_LOADED||c===U.FragmentState.PARTIAL)&&(r.sn==="initSegment"?this._loadInitSegment(r):l.live&&!Object(j.isFiniteNumber)(this.initPTS[r.cc])?(this.log("Waiting for video PTS in continuity counter "+r.cc+" of live stream before loading audio fragment "+r.sn+" of level "+this.trackId),this.state=C.State.WAITING_INIT_PTS):(this.startFragRequested=!0,E.prototype.loadFragment.call(this,r,l,f)))},h.completeAudioSwitch=function(){var r=this.hls,l=this.media,f=this.trackId;l&&(this.log("Switching audio track : flushing all audio"),E.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,r.trigger(w.Events.AUDIO_TRACK_SWITCHED,{id:f})},g}(C.default);L.default=m},"./src/controller/audio-track-controller.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/events.ts"),C=I("./src/errors.ts"),w=I("./src/controller/base-playlist-controller.ts"),H=I("./src/types/loader.ts");function U(d,o){for(var n=0;n<o.length;n++){var a=o[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}function R(d,o,n){return o&&U(d.prototype,o),n&&U(d,n),d}function S(d,o){d.prototype=Object.create(o.prototype),d.prototype.constructor=d,y(d,o)}function y(d,o){return y=Object.setPrototypeOf||function(a,s){return a.__proto__=s,a},y(d,o)}var v=function(d){S(o,d);function o(a){var s;return s=d.call(this,a,"[audio-track-controller]")||this,s.tracks=[],s.groupId=null,s.tracksInGroup=[],s.trackId=-1,s.trackName="",s.selectDefaultTrack=!0,s.registerListeners(),s}var n=o.prototype;return n.registerListeners=function(){var s=this.hls;s.on(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(j.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(j.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.on(j.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.on(j.Events.ERROR,this.onError,this)},n.unregisterListeners=function(){var s=this.hls;s.off(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(j.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(j.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.off(j.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.off(j.Events.ERROR,this.onError,this)},n.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,d.prototype.destroy.call(this)},n.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},n.onManifestParsed=function(s,e){this.tracks=e.audioTracks||[]},n.onAudioTrackLoaded=function(s,e){var t=e.id,i=e.details,T=this.tracksInGroup[t];if(!T){this.warn("Invalid audio track id "+t);return}var _=T.details;T.details=e.details,this.log("audioTrack "+t+" loaded ["+i.startSN+"-"+i.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,e,_))},n.onLevelLoading=function(s,e){this.switchLevel(e.level)},n.onLevelSwitching=function(s,e){this.switchLevel(e.level)},n.switchLevel=function(s){var e=this.hls.levels[s];if(!(e!=null&&e.audioGroupIds))return;var t=e.audioGroupIds[e.urlId];if(this.groupId!==t){this.groupId=t;var i=this.tracks.filter(function(_){return!t||_.groupId===t});this.selectDefaultTrack&&!i.some(function(_){return _.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=i;var T={audioTracks:i};this.log("Updating audio tracks, "+i.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(j.Events.AUDIO_TRACKS_UPDATED,T),this.selectInitialTrack()}},n.onError=function(s,e){if(d.prototype.onError.call(this,s,e),e.fatal||!e.context)return;e.context.type===H.PlaylistContextType.AUDIO_TRACK&&e.context.id===this.trackId&&e.context.groupId===this.groupId&&this.retryLoadingOrFail(e)},n.setAudioTrack=function(s){var e=this.tracksInGroup;if(s<0||s>=e.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var t=e[this.trackId];this.log("Now switching to audio-track index "+s);var i=e[s],T=i.id,_=i.groupId,m=_===void 0?"":_,E=i.name,g=i.type,h=i.url;if(this.trackId=s,this.trackName=E,this.selectDefaultTrack=!1,this.hls.trigger(j.Events.AUDIO_TRACK_SWITCHING,{id:T,groupId:m,name:E,type:g,url:h}),i.details&&!i.details.live)return;var u=this.switchParams(i.url,t==null?void 0:t.details);this.loadPlaylist(u)},n.selectInitialTrack=function(){var s=this.tracksInGroup;console.assert(s.length,"Initial audio track should be selected when tracks are known");var e=this.trackName,t=this.findTrackId(e)||this.findTrackId();t!==-1?this.setAudioTrack(t):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(j.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},n.findTrackId=function(s){for(var e=this.tracksInGroup,t=0;t<e.length;t++){var i=e[t];if((!this.selectDefaultTrack||i.default)&&(!s||s===i.name))return i.id}return-1},n.loadPlaylist=function(s){var e=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(e)){var t=e.id,i=e.groupId,T=e.url;if(s)try{T=s.addDirectives(T)}catch(_){this.warn("Could not construct new URL with HLS Delivery Directives: "+_)}this.log("loading audio-track playlist for id: "+t),this.clearTimer(),this.hls.trigger(j.Events.AUDIO_TRACK_LOADING,{url:T,id:t,groupId:i,deliveryDirectives:s||null})}},R(o,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(s){this.selectDefaultTrack=!1,this.setAudioTrack(s)}}]),o}(w.default);L.default=v},"./src/controller/base-playlist-controller.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return R});var j=I("./src/polyfills/number.ts"),C=I("./src/types/level.ts"),w=I("./src/controller/level-helper.ts"),H=I("./src/utils/logger.ts"),U=I("./src/errors.ts"),R=function(){function S(v,d){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=H.logger.log.bind(H.logger,d+":"),this.warn=H.logger.warn.bind(H.logger,d+":"),this.hls=v}var y=S.prototype;return y.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},y.onError=function(d,o){o.fatal&&o.type===U.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},y.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},y.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},y.stopLoad=function(){this.canLoad=!1,this.clearTimer()},y.switchParams=function(d,o){var n=o==null?void 0:o.renditionReports;if(n)for(var a=0;a<n.length;a++){var s=n[a],e=""+s.URI;if(e===d.substr(-e.length)){var t=parseInt(s["LAST-MSN"]),i=parseInt(s["LAST-PART"]);if(o&&this.hls.config.lowLatencyMode){var T=Math.min(o.age-o.partTarget,o.targetduration);i!==void 0&&T>o.partTarget&&(i+=1)}if(Object(j.isFiniteNumber)(t))return new C.HlsUrlParameters(t,Object(j.isFiniteNumber)(i)?i:void 0,C.HlsSkip.No)}}},y.loadPlaylist=function(d){},y.shouldLoadTrack=function(d){return this.canLoad&&d&&!!d.url&&(!d.details||d.details.live)},y.playlistLoaded=function(d,o,n){var a=this,s=o.details,e=o.stats,t=e.loading.end?Math.max(0,self.performance.now()-e.loading.end):0;if(s.advancedDateTime=Date.now()-t,s.live||n!=null&&n.live){if(s.reloaded(n),n&&this.log("live playlist "+d+" "+(s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:"MISSED")),n&&s.fragments.length>0&&Object(w.mergeDetails)(n,s),!this.canLoad||!s.live)return;var i,T=void 0,_=void 0;if(s.canBlockReload&&s.endSN&&s.advanced){var m=this.hls.config.lowLatencyMode,E=s.lastPartSn,g=s.endSN,h=s.lastPartIndex,u=h!==-1,r=E===g,l=m?0:h;u?(T=r?g+1:E,_=r?l:h+1):T=g+1;var f=s.age,c=f+s.ageHeader,x=Math.min(c-s.partTarget,s.targetduration*1.5);if(x>0){if(n&&x>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+x+" with playlist age: "+s.age),x=0;else{var D=Math.floor(x/s.targetduration);if(T+=D,_!==void 0){var A=Math.round(x%s.targetduration/s.partTarget);_+=A}this.log("CDN Tune-in age: "+s.ageHeader+"s last advanced "+f.toFixed(2)+"s goal: "+x+" skip sn "+D+" to part "+_)}s.tuneInGoal=x}if(i=this.getDeliveryDirectives(s,o.deliveryDirectives,T,_),m||!r){this.loadPlaylist(i);return}}else i=this.getDeliveryDirectives(s,o.deliveryDirectives,T,_);var B=Object(w.computeReloadInterval)(s,e);T!==void 0&&s.canBlockReload&&(B-=s.partTarget||1),this.log("reload live playlist "+d+" in "+Math.round(B)+" ms"),this.timer=self.setTimeout(function(){return a.loadPlaylist(i)},B)}else this.clearTimer()},y.getDeliveryDirectives=function(d,o,n,a){var s=Object(C.getSkipValue)(d,n);return o!=null&&o.skip&&d.deltaUpdateFailed&&(n=o.msn,a=o.part,s=C.HlsSkip.No),new C.HlsUrlParameters(n,a,s)},y.retryLoadingOrFail=function(d){var o=this,n=this.hls.config,a=this.retryCount<n.levelLoadingMaxRetry;if(a){var s;if(this.retryCount++,d.details.indexOf("LoadTimeOut")>-1&&(s=d.context)!==null&&s!==void 0&&s.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+d.details+'"'),this.loadPlaylist();else{var e=Math.min(Math.pow(2,this.retryCount)*n.levelLoadingRetryDelay,n.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return o.loadPlaylist()},e),this.warn("retry playlist loading #"+this.retryCount+" in "+e+' ms after "'+d.details+'"')}}else this.warn('cannot recover from error "'+d.details+'"'),this.clearTimer(),d.fatal=!0;return a},S}()},"./src/controller/base-stream-controller.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"State",function(){return g}),I.d(L,"default",function(){return h});var j=I("./src/polyfills/number.ts"),C=I("./src/task-loop.ts"),w=I("./src/controller/fragment-tracker.ts"),H=I("./src/utils/buffer-helper.ts"),U=I("./src/utils/logger.ts"),R=I("./src/events.ts"),S=I("./src/errors.ts"),y=I("./src/types/transmuxer.ts"),v=I("./src/utils/mp4-tools.ts"),d=I("./src/utils/discontinuities.ts"),o=I("./src/controller/fragment-finders.ts"),n=I("./src/controller/level-helper.ts"),a=I("./src/loader/fragment-loader.ts"),s=I("./src/crypt/decrypter.ts"),e=I("./src/utils/time-ranges.ts"),t=I("./src/types/loader.ts");function i(u,r){for(var l=0;l<r.length;l++){var f=r[l];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(u,f.key,f)}}function T(u,r,l){return r&&i(u.prototype,r),l&&i(u,l),u}function _(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function m(u,r){u.prototype=Object.create(r.prototype),u.prototype.constructor=u,E(u,r)}function E(u,r){return E=Object.setPrototypeOf||function(f,c){return f.__proto__=c,f},E(u,r)}var g={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},h=function(u){m(r,u);function r(f,c,x){var D;return D=u.call(this)||this,D.hls=void 0,D.fragPrevious=null,D.fragCurrent=null,D.fragmentTracker=void 0,D.transmuxer=null,D._state=g.STOPPED,D.media=void 0,D.mediaBuffer=void 0,D.config=void 0,D.bitrateTest=!1,D.lastCurrentTime=0,D.nextLoadPosition=0,D.startPosition=0,D.loadedmetadata=!1,D.fragLoadError=0,D.retryDate=0,D.levels=null,D.fragmentLoader=void 0,D.levelLastLoaded=null,D.startFragRequested=!1,D.decrypter=void 0,D.initPTS=[],D.onvseeking=null,D.onvended=null,D.logPrefix="",D.log=void 0,D.warn=void 0,D.logPrefix=x,D.log=U.logger.log.bind(U.logger,x+":"),D.warn=U.logger.warn.bind(U.logger,x+":"),D.hls=f,D.fragmentLoader=new a.default(f.config),D.fragmentTracker=c,D.config=f.config,D.decrypter=new s.default(f,f.config),f.on(R.Events.KEY_LOADED,D.onKeyLoaded,_(D)),D}var l=r.prototype;return l.doTick=function(){this.onTickEnd()},l.onTickEnd=function(){},l.startLoad=function(c){},l.stopLoad=function(){this.fragmentLoader.abort();var c=this.fragCurrent;c&&this.fragmentTracker.removeFragment(c),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=g.STOPPED},l._streamEnded=function(c,x){var D=this.fragCurrent,A=this.fragmentTracker;if(!x.live&&D&&D.sn===x.endSN&&!c.nextStart){var B=A.getState(D);return B===w.FragmentState.PARTIAL||B===w.FragmentState.OK}return!1},l.onMediaAttached=function(c,x){var D=this.media=this.mediaBuffer=x.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),D.addEventListener("seeking",this.onvseeking),D.addEventListener("ended",this.onvended);var A=this.config;this.levels&&A.autoStartLoad&&this.state===g.STOPPED&&this.startLoad(A.startPosition)},l.onMediaDetaching=function(){var c=this.media;c!=null&&c.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),c&&(c.removeEventListener("seeking",this.onvseeking),c.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},l.onMediaSeeking=function(){var c=this.config,x=this.fragCurrent,D=this.media,A=this.mediaBuffer,B=this.state,O=D?D.currentTime:0,W=H.BufferHelper.bufferInfo(A||D,O,c.maxBufferHole);if(this.log("media seeking to "+(Object(j.isFiniteNumber)(O)?O.toFixed(3):O)+", state: "+B),B===g.ENDED)this.resetLoadingState();else if(x&&!W.len){var P=c.maxFragLookUpTolerance,G=x.start-P,Q=x.start+x.duration+P,re=O>Q;(O<G||re)&&(re&&x.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),x.loader.abort()),this.resetLoadingState())}D&&(this.lastCurrentTime=O),!this.loadedmetadata&&!W.len&&(this.nextLoadPosition=this.startPosition=O),this.tickImmediate()},l.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},l.onKeyLoaded=function(c,x){if(this.state!==g.KEY_LOADING||x.frag!==this.fragCurrent||!this.levels)return;this.state=g.IDLE;var D=this.levels[x.frag.level].details;D&&this.loadFragment(x.frag,D,x.frag.start)},l.onHandlerDestroying=function(){this.stopLoad(),u.prototype.onHandlerDestroying.call(this)},l.onHandlerDestroyed=function(){this.state=g.STOPPED,this.hls.off(R.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,u.prototype.onHandlerDestroyed.call(this)},l.loadKey=function(c,x){this.log("Loading key for "+c.sn+" of ["+x.startSN+"-"+x.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+c.level),this.state=g.KEY_LOADING,this.fragCurrent=c,this.hls.trigger(R.Events.KEY_LOADING,{frag:c})},l.loadFragment=function(c,x,D){this._loadFragForPlayback(c,x,D)},l._loadFragForPlayback=function(c,x,D){var A=this,B=function(W){if(A.fragContextChanged(c)){A.warn("Fragment "+c.sn+(W.part?" p: "+W.part.index:"")+" of level "+c.level+" was dropped during download."),A.fragmentTracker.removeFragment(c);return}c.stats.chunkCount++,A._handleFragmentLoadProgress(W)};this._doFragLoad(c,x,D,B).then(function(O){if(!O)return;A.fragLoadError=0;var W=A.state;if(A.fragContextChanged(c)){(W===g.FRAG_LOADING||W===g.BACKTRACKING||!A.fragCurrent&&W===g.PARSING)&&(A.fragmentTracker.removeFragment(c),A.state=g.IDLE);return}if("payload"in O&&(A.log("Loaded fragment "+c.sn+" of level "+c.level),A.hls.trigger(R.Events.FRAG_LOADED,O),A.state===g.BACKTRACKING)){A.fragmentTracker.backtrack(c,O),A.resetFragmentLoading(c);return}A._handleFragmentLoadComplete(O)}).catch(function(O){A.warn(O),A.resetFragmentLoading(c)})},l.flushMainBuffer=function(c,x,D){if(D===void 0&&(D=null),!(c-x))return;var A={startOffset:c,endOffset:x,type:D};this.fragLoadError=0,this.hls.trigger(R.Events.BUFFER_FLUSHING,A)},l._loadInitSegment=function(c){var x=this;this._doFragLoad(c).then(function(D){if(!D||x.fragContextChanged(c)||!x.levels)throw new Error("init load aborted");return D}).then(function(D){var A=x.hls,B=D.payload,O=c.decryptdata;if(B&&B.byteLength>0&&O&&O.key&&O.iv&&O.method==="AES-128"){var W=self.performance.now();return x.decrypter.webCryptoDecrypt(new Uint8Array(B),O.key.buffer,O.iv.buffer).then(function(P){var G=self.performance.now();return A.trigger(R.Events.FRAG_DECRYPTED,{frag:c,payload:P,stats:{tstart:W,tdecrypt:G}}),D.payload=P,D})}return D}).then(function(D){var A=x.fragCurrent,B=x.hls,O=x.levels;if(!O)throw new Error("init load aborted, missing levels");var W=O[c.level].details;console.assert(W,"Level details are defined when init segment is loaded");var P=c.stats;x.state=g.IDLE,x.fragLoadError=0,c.data=new Uint8Array(D.payload),P.parsing.start=P.buffering.start=self.performance.now(),P.parsing.end=P.buffering.end=self.performance.now(),D.frag===A&&B.trigger(R.Events.FRAG_BUFFERED,{stats:P,frag:A,part:null,id:c.type}),x.tick()}).catch(function(D){x.warn(D),x.resetFragmentLoading(c)})},l.fragContextChanged=function(c){var x=this.fragCurrent;return!c||!x||c.level!==x.level||c.sn!==x.sn||c.urlId!==x.urlId},l.fragBufferedComplete=function(c,x){var D=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+c.type+" sn: "+c.sn+(x?" part: "+x.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+c.level+" "+e.default.toString(H.BufferHelper.getBuffered(D))),this.state=g.IDLE,this.tick()},l._handleFragmentLoadComplete=function(c){var x=this.transmuxer;if(!x)return;var D=c.frag,A=c.part,B=c.partsLoaded,O=!B||B.length===0||B.some(function(P){return!P}),W=new y.ChunkMetadata(D.level,D.sn,D.stats.chunkCount+1,0,A?A.index:-1,!O);x.flush(W)},l._handleFragmentLoadProgress=function(c){},l._doFragLoad=function(c,x,D,A){var B=this;if(D===void 0&&(D=null),!this.levels)throw new Error("frag load aborted, missing levels");if(D=Math.max(c.start,D||0),this.config.lowLatencyMode&&x){var O=x.partList;if(O&&A){D>c.end&&x.fragmentHint&&(c=x.fragmentHint);var W=this.getNextPart(O,c,D);if(W>-1){var P=O[W];return this.log("Loading part sn: "+c.sn+" p: "+P.index+" cc: "+c.cc+" of playlist ["+x.startSN+"-"+x.endSN+"] parts [0-"+W+"-"+(O.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+c.level+", target: "+parseFloat(D.toFixed(3))),this.nextLoadPosition=P.start+P.duration,this.state=g.FRAG_LOADING,this.hls.trigger(R.Events.FRAG_LOADING,{frag:c,part:O[W],targetBufferTime:D}),this.doFragPartsLoad(c,O,W,A).catch(function(G){return B.handleFragLoadError(G)})}else if(!c.url||this.loadedEndOfParts(O,D))return Promise.resolve(null)}}return this.log("Loading fragment "+c.sn+" cc: "+c.cc+" "+(x?"of ["+x.startSN+"-"+x.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+c.level+", target: "+parseFloat(D.toFixed(3))),Object(j.isFiniteNumber)(c.sn)&&!this.bitrateTest&&(this.nextLoadPosition=c.start+c.duration),this.state=g.FRAG_LOADING,this.hls.trigger(R.Events.FRAG_LOADING,{frag:c,targetBufferTime:D}),this.fragmentLoader.load(c,A).catch(function(G){return B.handleFragLoadError(G)})},l.doFragPartsLoad=function(c,x,D,A){var B=this;return new Promise(function(O,W){var P=[],G=function Q(re){var le=x[re];B.fragmentLoader.loadPart(c,le,A).then(function(Ee){P[le.index]=Ee;var _e=Ee.part;B.hls.trigger(R.Events.FRAG_LOADED,Ee);var ne=x[re+1];if(ne&&ne.fragment===c)Q(re+1);else return O({frag:c,part:_e,partsLoaded:P})}).catch(W)};G(D)})},l.handleFragLoadError=function(c){var x=c.data;return x&&x.details===S.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(x.frag,x.part):this.hls.trigger(R.Events.ERROR,x),null},l._handleTransmuxerFlush=function(c){var x=this.getCurrentContext(c);if(!x||this.state!==g.PARSING){this.fragCurrent||(this.state=g.IDLE);return}var D=x.frag,A=x.part,B=x.level,O=self.performance.now();D.stats.parsing.end=O,A&&(A.stats.parsing.end=O),this.updateLevelTiming(D,A,B,c.partial)},l.getCurrentContext=function(c){var x=this.levels,D=c.level,A=c.sn,B=c.part;if(!x||!x[D])return this.warn("Levels object was unset while buffering fragment "+A+" of level "+D+". The current chunk will not be buffered."),null;var O=x[D],W=B>-1?Object(n.getPartWith)(O,A,B):null,P=W?W.fragment:Object(n.getFragmentWithSN)(O,A,this.fragCurrent);return P?{frag:P,part:W,level:O}:null},l.bufferFragmentData=function(c,x,D,A){if(!c||this.state!==g.PARSING)return;var B=c.data1,O=c.data2,W=B;if(B&&O&&(W=Object(v.appendUint8Array)(B,O)),!W||!W.length)return;var P={type:c.type,frag:x,part:D,chunkMeta:A,parent:x.type,data:W};this.hls.trigger(R.Events.BUFFER_APPENDING,P),c.dropped&&c.independent&&!D&&this.flushBufferGap(x)},l.flushBufferGap=function(c){var x=this.media;if(!x)return;if(!H.BufferHelper.isBuffered(x,x.currentTime)){this.flushMainBuffer(0,c.start);return}var D=x.currentTime,A=H.BufferHelper.bufferInfo(x,D,0),B=c.duration,O=Math.min(this.config.maxFragLookUpTolerance*2,B*.25),W=Math.max(Math.min(c.start-O,A.end-O),D+O);c.start-W>O&&this.flushMainBuffer(W,c.start)},l.getFwdBufferInfo=function(c,x){var D=this.config,A=this.getLoadPosition();if(!Object(j.isFiniteNumber)(A))return null;var B=H.BufferHelper.bufferInfo(c,A,D.maxBufferHole);if(B.len===0&&B.nextStart!==void 0){var O=this.fragmentTracker.getBufferedFrag(A,x);if(O&&B.nextStart<O.end)return H.BufferHelper.bufferInfo(c,A,Math.max(B.nextStart,D.maxBufferHole))}return B},l.getMaxBufferLength=function(c){var x=this.config,D;return c?D=Math.max(8*x.maxBufferSize/c,x.maxBufferLength):D=x.maxBufferLength,Math.min(D,x.maxMaxBufferLength)},l.reduceMaxBufferLength=function(c){var x=this.config,D=c||x.maxBufferLength;return x.maxMaxBufferLength>=D?(x.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+x.maxMaxBufferLength+"s"),!0):!1},l.getNextFragment=function(c,x){var D,A,B=x.fragments,O=B.length;if(!O)return null;var W=this.config,P=B[0].start,G;if(x.live){var Q=W.initialLiveManifestSize;if(O<Q)return this.warn("Not enough fragments to start playback (have: "+O+", need: "+Q+")"),null;!x.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(G=this.getInitialLiveFragment(x,B),this.startPosition=G?this.hls.liveSyncPosition||G.start:c)}else c<=P&&(G=B[0]);if(!G){var re=W.lowLatencyMode?x.partEnd:x.fragmentEnd;G=this.getFragmentAtPosition(c,re,x)}return(D=G)!==null&&D!==void 0&&D.initSegment&&!((A=G)!==null&&A!==void 0&&A.initSegment.data)&&!this.bitrateTest&&(G=G.initSegment),G},l.getNextPart=function(c,x,D){for(var A=-1,B=!1,O=!0,W=0,P=c.length;W<P;W++){var G=c[W];if(O=O&&!G.independent,A>-1&&D<G.start)break;var Q=G.loaded;!Q&&(B||G.independent||O)&&G.fragment===x&&(A=W),B=Q}return A},l.loadedEndOfParts=function(c,x){var D=c[c.length-1];return D&&x>D.start&&D.loaded},l.getInitialLiveFragment=function(c,x){var D=this.fragPrevious,A=null;if(D){if(c.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+D.programDateTime),A=Object(o.findFragmentByPDT)(x,D.endProgramDateTime,this.config.maxFragLookUpTolerance)),!A){var B=D.sn+1;if(B>=c.startSN&&B<=c.endSN){var O=x[B-c.startSN];D.cc===O.cc&&(A=O,this.log("Live playlist, switching playlist, load frag with next SN: "+A.sn))}A||(A=Object(o.findFragWithCC)(x,D.cc),A&&this.log("Live playlist, switching playlist, load frag with same CC: "+A.sn))}}else{var W=this.hls.liveSyncPosition;W!==null&&(A=this.getFragmentAtPosition(W,this.bitrateTest?c.fragmentEnd:c.edge,c))}return A},l.getFragmentAtPosition=function(c,x,D){var A=this.config,B=this.fragPrevious,O=D.fragments,W=D.endSN,P=D.fragmentHint,G=A.maxFragLookUpTolerance,Q=!!(A.lowLatencyMode&&D.partList&&P);Q&&P&&!this.bitrateTest&&(O=O.concat(P),W=P.sn);var re;if(c<x){var le=c>x-G?0:G;re=Object(o.findFragmentByPTS)(B,O,c,le)}else re=O[O.length-1];if(re){var Ee=re.sn-D.startSN,_e=B&&re.level===B.level,ne=O[Ee+1],Te=this.fragmentTracker.getState(re);if(Te===w.FragmentState.BACKTRACKED){re=null;for(var Ae=Ee;O[Ae]&&this.fragmentTracker.getState(O[Ae])===w.FragmentState.BACKTRACKED;)B?re=O[Ae--]:re=O[--Ae];re||(re=ne)}else B&&re.sn===B.sn&&!Q&&(_e&&(re.sn<W&&this.fragmentTracker.getState(ne)!==w.FragmentState.OK?(this.log("SN "+re.sn+" just loaded, load next one: "+ne.sn),re=ne):re=null))}return re},l.synchronizeToLiveEdge=function(c){var x=this.config,D=this.media;if(!D)return;var A=this.hls.liveSyncPosition,B=D.currentTime,O=c.fragments[0].start,W=c.edge,P=B>=O-x.maxFragLookUpTolerance&&B<=W;if(A!==null&&D.duration>A&&(B<A||!P)){var G=x.liveMaxLatencyDuration!==void 0?x.liveMaxLatencyDuration:x.liveMaxLatencyDurationCount*c.targetduration;(!P&&D.readyState<4||B<W-G)&&(this.loadedmetadata||(this.nextLoadPosition=A),D.readyState&&(this.warn("Playback: "+B.toFixed(3)+" is located too far from the end of live sliding playlist: "+W+", reset currentTime to : "+A.toFixed(3)),D.currentTime=A))}},l.alignPlaylists=function(c,x){var D=this.levels,A=this.levelLastLoaded,B=this.fragPrevious,O=A!==null?D[A]:null,W=c.fragments.length;if(!W)return this.warn("No fragments in live playlist"),0;var P=c.fragments[0].start,G=!x,Q=c.alignedSliding&&Object(j.isFiniteNumber)(P);if(G||!Q&&!P){Object(d.alignStream)(B,O,c);var re=c.fragments[0].start;return this.log("Live playlist sliding: "+re.toFixed(2)+" start-sn: "+(x?x.startSN:"na")+"->"+c.startSN+" prev-sn: "+(B?B.sn:"na")+" fragments: "+W),re}return P},l.waitForCdnTuneIn=function(c){var x=3;return c.live&&c.canBlockReload&&c.tuneInGoal>Math.max(c.partHoldBack,c.partTarget*x)},l.setStartPosition=function(c,x){var D=this.startPosition;if(D<x&&(D=-1),D===-1||this.lastCurrentTime===-1){var A=c.startTimeOffset;Object(j.isFiniteNumber)(A)?(D=x+A,A<0&&(D+=c.totalduration),D=Math.min(Math.max(x,D),x+c.totalduration),this.log("Start time offset "+A+" found in playlist, adjust startPosition to "+D),this.startPosition=D):c.live?D=this.hls.liveSyncPosition||x:this.startPosition=D=0,this.lastCurrentTime=D}this.nextLoadPosition=D},l.getLoadPosition=function(){var c=this.media,x=0;return this.loadedmetadata&&c?x=c.currentTime:this.nextLoadPosition&&(x=this.nextLoadPosition),x},l.handleFragLoadAborted=function(c,x){this.transmuxer&&c.sn!=="initSegment"&&c.stats.aborted&&(this.warn("Fragment "+c.sn+(x?" part"+x.index:"")+" of level "+c.level+" was aborted"),this.resetFragmentLoading(c))},l.resetFragmentLoading=function(c){(!this.fragCurrent||!this.fragContextChanged(c))&&(this.state=g.IDLE)},l.onFragmentOrKeyLoadError=function(c,x){if(x.fatal)return;var D=x.frag;if(!D||D.type!==c)return;var A=this.fragCurrent;console.assert(A&&D.sn===A.sn&&D.level===A.level&&D.urlId===A.urlId,"Frag load error must match current frag to retry");var B=this.config;if(this.fragLoadError+1<=B.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(D.level))return;var O=Math.min(Math.pow(2,this.fragLoadError)*B.fragLoadingRetryDelay,B.fragLoadingMaxRetryTimeout);this.warn("Fragment "+D.sn+" of "+c+" "+D.level+" failed to load, retrying in "+O+"ms"),this.retryDate=self.performance.now()+O,this.fragLoadError++,this.state=g.FRAG_LOADING_WAITING_RETRY}else x.levelRetry?(c===t.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=g.IDLE):(U.logger.error(x.details+" reaches max retry, redispatch as fatal ..."),x.fatal=!0,this.hls.stopLoad(),this.state=g.ERROR)},l.afterBufferFlushed=function(c,x,D){if(!c)return;var A=H.BufferHelper.getBuffered(c);this.fragmentTracker.detectEvictedFragments(x,A,D),this.state===g.ENDED&&this.resetLoadingState()},l.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=g.IDLE},l.resetLiveStartWhenNotLoaded=function(c){if(!this.loadedmetadata){this.startFragRequested=!1;var x=this.levels?this.levels[c].details:null;if(x!=null&&x.live)return this.startPosition=-1,this.setStartPosition(x,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},l.updateLevelTiming=function(c,x,D,A){var B=this,O=D.details;console.assert(!!O,"level.details must be defined");var W=Object.keys(c.elementaryStreams).reduce(function(P,G){var Q=c.elementaryStreams[G];if(Q){var re=Q.endPTS-Q.startPTS;if(re<=0)return B.warn("Could not parse fragment "+c.sn+" "+G+" duration reliably ("+re+") resetting transmuxer to fallback to playlist timing"),B.resetTransmuxer(),P||!1;var le=A?0:Object(n.updateFragPTSDTS)(O,c,Q.startPTS,Q.endPTS,Q.startDTS,Q.endDTS);return B.hls.trigger(R.Events.LEVEL_PTS_UPDATED,{details:O,level:D,drift:le,type:G,frag:c,start:Q.startPTS,end:Q.endPTS}),!0}return P},!1);W?(this.state=g.PARSED,this.hls.trigger(R.Events.FRAG_PARSED,{frag:c,part:x})):this.resetLoadingState()},l.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},T(r,[{key:"state",get:function(){return this._state},set:function(c){var x=this._state;x!==c&&(this._state=c,this.log(x+"->"+c))}}]),r}(C.default)},"./src/controller/buffer-controller.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return o});var j=I("./src/polyfills/number.ts"),C=I("./src/events.ts"),w=I("./src/utils/logger.ts"),H=I("./src/errors.ts"),U=I("./src/utils/buffer-helper.ts"),R=I("./src/utils/mediasource-helper.ts"),S=I("./src/loader/fragment.ts"),y=I("./src/controller/buffer-operation-queue.ts"),v=Object(R.getMediaSource)(),d=/([ha]vc.)(?:\.[^.,]+)+/,o=function(){function n(s){var e=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var t=e.hls,i=e.media,T=e.mediaSource;w.logger.log("[buffer-controller]: Media source opened"),i&&(e.updateMediaElementDuration(),t.trigger(C.Events.MEDIA_ATTACHED,{media:i})),T&&T.removeEventListener("sourceopen",e._onMediaSourceOpen),e.checkPendingTracks()},this._onMediaSourceClose=function(){w.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){w.logger.log("[buffer-controller]: Media source ended")},this.hls=s,this._initSourceBuffer(),this.registerListeners()}var a=n.prototype;return a.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},a.destroy=function(){this.unregisterListeners(),this.details=null},a.registerListeners=function(){var e=this.hls;e.on(C.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(C.Events.BUFFER_RESET,this.onBufferReset,this),e.on(C.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.on(C.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(C.Events.BUFFER_EOS,this.onBufferEos,this),e.on(C.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(C.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(C.Events.FRAG_PARSED,this.onFragParsed,this),e.on(C.Events.FRAG_CHANGED,this.onFragChanged,this)},a.unregisterListeners=function(){var e=this.hls;e.off(C.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(C.Events.BUFFER_RESET,this.onBufferReset,this),e.off(C.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.off(C.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(C.Events.BUFFER_EOS,this.onBufferEos,this),e.off(C.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(C.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(C.Events.FRAG_PARSED,this.onFragParsed,this),e.off(C.Events.FRAG_CHANGED,this.onFragChanged,this)},a._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new y.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},a.onManifestParsed=function(e,t){var i=2;(t.audio&&!t.video||!t.altAudio)&&(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,this.details=null,w.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},a.onMediaAttaching=function(e,t){var i=this.media=t.media;if(i&&v){var T=this.mediaSource=new v;T.addEventListener("sourceopen",this._onMediaSourceOpen),T.addEventListener("sourceended",this._onMediaSourceEnded),T.addEventListener("sourceclose",this._onMediaSourceClose),i.src=self.URL.createObjectURL(T),this._objectUrl=i.src}},a.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,i=this._objectUrl;if(t){if(w.logger.log("[buffer-controller]: media source detaching"),t.readyState==="open")try{t.endOfStream()}catch(T){w.logger.warn("[buffer-controller]: onMediaDetaching: "+T.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(i&&self.URL.revokeObjectURL(i),e.src===i?(e.removeAttribute("src"),e.load()):w.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(C.Events.MEDIA_DETACHED,void 0)},a.onBufferReset=function(){var e=this;this.getSourceBufferTypes().forEach(function(t){var i=e.sourceBuffer[t];try{i&&(e.removeBufferListeners(t),e.mediaSource&&e.mediaSource.removeSourceBuffer(i),e.sourceBuffer[t]=void 0)}catch(T){w.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",T)}}),this._initSourceBuffer()},a.onBufferCodecs=function(e,t){var i=this,T=this.getSourceBufferTypes().length;if(Object.keys(t).forEach(function(_){if(T){var m=i.tracks[_];if(m&&typeof m.buffer.changeType=="function"){var E=t[_],g=E.codec,h=E.levelCodec,u=E.container,r=(m.levelCodec||m.codec).replace(d,"$1"),l=(h||g).replace(d,"$1");if(r!==l){var f=u+";codecs="+(h||g);i.appendChangeType(_,f)}}}else i.pendingTracks[_]=t[_]}),T)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},a.appendChangeType=function(e,t){var i=this,T=this.operationQueue,_={execute:function(){var E=i.sourceBuffer[e];E&&(w.logger.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),E.changeType(t)),T.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(E){w.logger.warn("[buffer-controller]: Failed to change "+e+" SourceBuffer type",E)}};T.append(_,e)},a.onBufferAppending=function(e,t){var i=this,T=this.hls,_=this.operationQueue,m=this.tracks,E=t.data,g=t.type,h=t.frag,u=t.part,r=t.chunkMeta,l=r.buffering[g],f=self.performance.now();l.start=f;var c=h.stats.buffering,x=u?u.stats.buffering:null;c.start===0&&(c.start=f),x&&x.start===0&&(x.start=f);var D=m.audio,A=g==="audio"&&r.id===1&&(D==null?void 0:D.container)==="audio/mpeg",B={execute:function(){if(l.executeStart=self.performance.now(),A){var W=i.sourceBuffer[g];if(W){var P=h.start-W.timestampOffset;Math.abs(P)>=.1&&(w.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+h.start+" (delta: "+P+") sn: "+h.sn+")"),W.timestampOffset=h.start)}}i.appendExecutor(E,g)},onStart:function(){},onComplete:function(){var W=self.performance.now();l.executeEnd=l.end=W,c.first===0&&(c.first=W),x&&x.first===0&&(x.first=W);var P=i.sourceBuffer,G={};for(var Q in P)G[Q]=U.BufferHelper.getBuffered(P[Q]);i.appendError=0,i.hls.trigger(C.Events.BUFFER_APPENDED,{type:g,frag:h,part:u,chunkMeta:r,parent:h.type,timeRanges:G})},onError:function(W){w.logger.error("[buffer-controller]: Error encountered while trying to append to the "+g+" SourceBuffer",W);var P={type:H.ErrorTypes.MEDIA_ERROR,parent:h.type,details:H.ErrorDetails.BUFFER_APPEND_ERROR,err:W,fatal:!1};W.code===DOMException.QUOTA_EXCEEDED_ERR?P.details=H.ErrorDetails.BUFFER_FULL_ERROR:(i.appendError++,P.details=H.ErrorDetails.BUFFER_APPEND_ERROR,i.appendError>T.config.appendErrorMaxRetry&&(w.logger.error("[buffer-controller]: Failed "+T.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),P.fatal=!0)),T.trigger(C.Events.ERROR,P)}};_.append(B,g)},a.onBufferFlushing=function(e,t){var i=this,T=this.operationQueue,_=function(E){return{execute:i.removeExecutor.bind(i,E,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){i.hls.trigger(C.Events.BUFFER_FLUSHED,{type:E})},onError:function(h){w.logger.warn("[buffer-controller]: Failed to remove from "+E+" SourceBuffer",h)}}};t.type?T.append(_(t.type),t.type):this.getSourceBufferTypes().forEach(function(m){T.append(_(m),m)})},a.onFragParsed=function(e,t){var i=this,T=t.frag,_=t.part,m=[],E=_?_.elementaryStreams:T.elementaryStreams;E[S.ElementaryStreamTypes.AUDIOVIDEO]?m.push("audiovideo"):(E[S.ElementaryStreamTypes.AUDIO]&&m.push("audio"),E[S.ElementaryStreamTypes.VIDEO]&&m.push("video"));var g=function(){var u=self.performance.now();T.stats.buffering.end=u,_&&(_.stats.buffering.end=u);var r=_?_.stats:T.stats;i.hls.trigger(C.Events.FRAG_BUFFERED,{frag:T,part:_,stats:r,id:T.type})};m.length===0&&w.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+T.type+" level: "+T.level+" sn: "+T.sn),this.blockBuffers(g,m)},a.onFragChanged=function(e,t){this.flushBackBuffer()},a.onBufferEos=function(e,t){var i=this,T=this.getSourceBufferTypes().reduce(function(_,m){var E=i.sourceBuffer[m];return(!t.type||t.type===m)&&(E&&!E.ended&&(E.ended=!0,w.logger.log("[buffer-controller]: "+m+" sourceBuffer now EOS"))),_&&!!(!E||E.ended)},!0);T&&this.blockBuffers(function(){var _=i.mediaSource;if(!_||_.readyState!=="open")return;_.endOfStream()})},a.onLevelUpdated=function(e,t){var i=t.details;if(!i.fragments.length)return;this.details=i,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},a.flushBackBuffer=function(){var e=this.hls,t=this.details,i=this.media,T=this.sourceBuffer;if(!i||t===null)return;var _=this.getSourceBufferTypes();if(!_.length)return;var m=t.live&&e.config.liveBackBufferLength!==null?e.config.liveBackBufferLength:e.config.backBufferLength;if(!Object(j.isFiniteNumber)(m)||m<0)return;var E=i.currentTime,g=t.levelTargetDuration,h=Math.max(m,g),u=Math.floor(E/g)*g-h;_.forEach(function(r){var l=T[r];if(l){var f=U.BufferHelper.getBuffered(l);f.length>0&&u>f.start(0)&&(e.trigger(C.Events.BACK_BUFFER_REACHED,{bufferEnd:u}),t.live&&e.trigger(C.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:u}),e.trigger(C.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:u,type:r}))}})},a.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var e=this.details,t=this.hls,i=this.media,T=this.mediaSource,_=e.fragments[0].start+e.totalduration,m=i.duration,E=Object(j.isFiniteNumber)(T.duration)?T.duration:0;e.live&&t.config.liveDurationInfinity?(w.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),T.duration=Infinity,this.updateSeekableRange(e)):(_>E&&_>m||!Object(j.isFiniteNumber)(m))&&(w.logger.log("[buffer-controller]: Updating Media Source duration to "+_.toFixed(3)),T.duration=_)},a.updateSeekableRange=function(e){var t=this.mediaSource,i=e.fragments,T=i.length;if(T&&e.live&&t!==null&&t!==void 0&&t.setLiveSeekableRange){var _=Math.max(0,i[0].start),m=Math.max(_,_+e.totalduration);t.setLiveSeekableRange(_,m)}},a.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,i=this.pendingTracks,T=Object.keys(i).length;if(T&&!e||T===2){this.createSourceBuffers(i),this.pendingTracks={};var _=this.getSourceBufferTypes();if(_.length===0){this.hls.trigger(C.Events.ERROR,{type:H.ErrorTypes.MEDIA_ERROR,details:H.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}_.forEach(function(m){t.executeNext(m)})}},a.createSourceBuffers=function(e){var t=this.sourceBuffer,i=this.mediaSource;if(!i)throw Error("createSourceBuffers called when mediaSource was null");var T=0;for(var _ in e)if(!t[_]){var m=e[_];if(!m)throw Error("source buffer exists for track "+_+", however track does not");var E=m.levelCodec||m.codec,g=m.container+";codecs="+E;w.logger.log("[buffer-controller]: creating sourceBuffer("+g+")");try{var h=t[_]=i.addSourceBuffer(g),u=_;this.addBufferListener(u,"updatestart",this._onSBUpdateStart),this.addBufferListener(u,"updateend",this._onSBUpdateEnd),this.addBufferListener(u,"error",this._onSBUpdateError),this.tracks[_]={buffer:h,codec:E,container:m.container,levelCodec:m.levelCodec,id:m.id},T++}catch(r){w.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+r.message),this.hls.trigger(C.Events.ERROR,{type:H.ErrorTypes.MEDIA_ERROR,details:H.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:r,mimeType:g})}}T&&this.hls.trigger(C.Events.BUFFER_CREATED,{tracks:this.tracks})},a._onSBUpdateStart=function(e){var t=this.operationQueue,i=t.current(e);i.onStart()},a._onSBUpdateEnd=function(e){var t=this.operationQueue,i=t.current(e);i.onComplete(),t.shiftAndExecuteNext(e)},a._onSBUpdateError=function(e,t){w.logger.error("[buffer-controller]: "+e+" SourceBuffer error",t),this.hls.trigger(C.Events.ERROR,{type:H.ErrorTypes.MEDIA_ERROR,details:H.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var i=this.operationQueue.current(e);i&&i.onError(t)},a.removeExecutor=function(e,t,i){var T=this.media,_=this.mediaSource,m=this.operationQueue,E=this.sourceBuffer,g=E[e];if(!T||!_||!g){w.logger.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),m.shiftAndExecuteNext(e);return}var h=Object(j.isFiniteNumber)(T.duration)?T.duration:Infinity,u=Object(j.isFiniteNumber)(_.duration)?_.duration:Infinity,r=Math.max(0,t),l=Math.min(i,h,u);l>r?(w.logger.log("[buffer-controller]: Removing ["+r+","+l+"] from the "+e+" SourceBuffer"),console.assert(!g.updating,e+" sourceBuffer must not be updating"),g.remove(r,l)):m.shiftAndExecuteNext(e)},a.appendExecutor=function(e,t){var i=this.operationQueue,T=this.sourceBuffer,_=T[t];if(!_){w.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),i.shiftAndExecuteNext(t);return}_.ended=!1,console.assert(!_.updating,t+" sourceBuffer must not be updating"),_.appendBuffer(e)},a.blockBuffers=function(e,t){var i=this;if(t===void 0&&(t=this.getSourceBufferTypes()),!t.length){w.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(e);return}var T=this.operationQueue,_=t.map(function(m){return T.appendBlocker(m)});Promise.all(_).then(function(){e(),t.forEach(function(m){var E=i.sourceBuffer[m];(!E||!E.updating)&&T.shiftAndExecuteNext(m)})})},a.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},a.addBufferListener=function(e,t,i){var T=this.sourceBuffer[e];if(!T)return;var _=i.bind(this,e);this.listeners[e].push({event:t,listener:_}),T.addEventListener(t,_)},a.removeBufferListeners=function(e){var t=this.sourceBuffer[e];if(!t)return;this.listeners[e].forEach(function(i){t.removeEventListener(i.event,i.listener)})},n}()},"./src/controller/buffer-operation-queue.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return C});var j=I("./src/utils/logger.ts"),C=function(){function w(U){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=U}var H=w.prototype;return H.append=function(R,S){var y=this.queues[S];y.push(R),y.length===1&&this.buffers[S]&&this.executeNext(S)},H.insertAbort=function(R,S){var y=this.queues[S];y.unshift(R),this.executeNext(S)},H.appendBlocker=function(R){var S,y=new Promise(function(d){S=d}),v={execute:S,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(v,R),y},H.executeNext=function(R){var S=this.buffers,y=this.queues,v=S[R],d=y[R];if(d.length){var o=d[0];try{o.execute()}catch(n){j.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(n),(!v||!v.updating)&&(d.shift(),this.executeNext(R))}}},H.shiftAndExecuteNext=function(R){this.queues[R].shift(),this.executeNext(R)},H.current=function(R){return this.queues[R][0]},w}()},"./src/controller/cap-level-controller.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/events.ts");function C(U,R){for(var S=0;S<R.length;S++){var y=R[S];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(U,y.key,y)}}function w(U,R,S){return R&&C(U.prototype,R),S&&C(U,S),U}var H=function(){function U(S){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=S,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var R=U.prototype;return R.setStreamController=function(y){this.streamController=y},R.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},R.registerListeners=function(){var y=this.hls;y.on(j.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),y.on(j.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),y.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),y.on(j.Events.BUFFER_CODECS,this.onBufferCodecs,this),y.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},R.unregisterListener=function(){var y=this.hls;y.off(j.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),y.off(j.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),y.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),y.off(j.Events.BUFFER_CODECS,this.onBufferCodecs,this),y.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},R.onFpsDropLevelCapping=function(y,v){U.isLevelAllowed(v.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(v.droppedLevel)},R.onMediaAttaching=function(y,v){this.media=v.media instanceof HTMLVideoElement?v.media:null},R.onManifestParsed=function(y,v){var d=this.hls;this.restrictedLevels=[],this.firstLevel=v.firstLevel,d.config.capLevelToPlayerSize&&v.video&&this.startCapping()},R.onBufferCodecs=function(y,v){var d=this.hls;d.config.capLevelToPlayerSize&&v.video&&this.startCapping()},R.onMediaDetaching=function(){this.stopCapping()},R.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var y=this.hls.levels;if(y.length){var v=this.hls;v.autoLevelCapping=this.getMaxLevel(y.length-1),v.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=v.autoLevelCapping}}},R.getMaxLevel=function(y){var v=this,d=this.hls.levels;if(!d.length)return-1;var o=d.filter(function(n,a){return U.isLevelAllowed(a,v.restrictedLevels)&&a<=y});return this.clientRect=null,U.getMaxLevelByMediaSize(o,this.mediaWidth,this.mediaHeight)},R.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},R.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},R.getDimensions=function(){if(this.clientRect)return this.clientRect;var y=this.media,v={width:0,height:0};if(y){var d=y.getBoundingClientRect();v.width=d.width,v.height=d.height,!v.width&&!v.height&&(v.width=d.right-d.left||y.width||0,v.height=d.bottom-d.top||y.height||0)}return this.clientRect=v,v},U.isLevelAllowed=function(y,v){return v===void 0&&(v=[]),v.indexOf(y)===-1},U.getMaxLevelByMediaSize=function(y,v,d){if(!y||!y.length)return-1;for(var o=function(t,i){return i?t.width!==i.width||t.height!==i.height:!0},n=y.length-1,a=0;a<y.length;a+=1){var s=y[a];if((s.width>=v||s.height>=d)&&o(s,y[a+1])){n=a;break}}return n},w(U,[{key:"mediaWidth",get:function(){return this.getDimensions().width*U.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*U.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var y=1;try{y=self.devicePixelRatio}catch(v){}return y}}]),U}();L.default=H},"./src/controller/cmcd-controller.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return o});var j=I("./src/events.ts"),C=I("./src/types/cmcd.ts"),w=I("./src/utils/buffer-helper.ts"),H=I("./src/utils/logger.ts");function U(n,a){for(var s=0;s<a.length;s++){var e=a[s];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,e.key,e)}}function R(n,a,s){return a&&U(n.prototype,a),s&&U(n,s),n}function S(n,a){var s=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(s)return(s=s.call(n)).next.bind(s);if(Array.isArray(n)||(s=y(n))||a&&n&&typeof n.length=="number"){s&&(n=s);var e=0;return function(){return e>=n.length?{done:!0}:{done:!1,value:n[e++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y(n,a){if(!n)return;if(typeof n=="string")return v(n,a);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return v(n,a)}function v(n,a){(a==null||a>n.length)&&(a=n.length);for(var s=0,e=new Array(a);s<a;s++)e[s]=n[s];return e}function d(){return d=Object.assign||function(n){for(var a=1;a<arguments.length;a++){var s=arguments[a];for(var e in s)Object.prototype.hasOwnProperty.call(s,e)&&(n[e]=s[e])}return n},d.apply(this,arguments)}var o=function(){function n(s){var e=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){e.initialized&&(e.starved=!0),e.buffering=!0},this.onPlaying=function(){e.initialized||(e.initialized=!0),e.buffering=!1},this.applyPlaylistData=function(T){try{e.apply(T,{ot:C.CMCDObjectType.MANIFEST,su:!e.initialized})}catch(_){H.logger.warn("Could not generate manifest CMCD data.",_)}},this.applyFragmentData=function(T){try{var _=T.frag,m=e.hls.levels[_.level],E=e.getObjectType(_),g={d:_.duration*1e3,ot:E};(E===C.CMCDObjectType.VIDEO||E===C.CMCDObjectType.AUDIO||E==C.CMCDObjectType.MUXED)&&(g.br=m.bitrate/1e3,g.tb=e.getTopBandwidth(E),g.bl=e.getBufferLength(E)),e.apply(T,g)}catch(h){H.logger.warn("Could not generate segment CMCD data.",h)}},this.hls=s;var t=this.config=s.config,i=t.cmcd;i!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||n.uuid(),this.cid=i.contentId,this.useHeaders=i.useHeaders===!0,this.registerListeners())}var a=n.prototype;return a.registerListeners=function(){var e=this.hls;e.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(j.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.on(j.Events.BUFFER_CREATED,this.onBufferCreated,this)},a.unregisterListeners=function(){var e=this.hls;e.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(j.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.off(j.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},a.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},a.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},a.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},a.onBufferCreated=function(e,t){var i,T;this.audioBuffer=(i=t.tracks.audio)===null||i===void 0?void 0:i.buffer,this.videoBuffer=(T=t.tracks.video)===null||T===void 0?void 0:T.buffer},a.createData=function(){var e;return{v:C.CMCDVersion,sf:C.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)===null||e===void 0?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},a.apply=function(e,t){t===void 0&&(t={}),d(t,this.createData());var i=t.ot===C.CMCDObjectType.INIT||t.ot===C.CMCDObjectType.VIDEO||t.ot===C.CMCDObjectType.MUXED;if(this.starved&&i&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering),this.useHeaders){var T=n.toHeaders(t);if(!Object.keys(T).length)return;e.headers||(e.headers={}),d(e.headers,T)}else{var _=n.toQuery(t);if(!_)return;e.url=n.appendQueryToUri(e.url,_)}},a.getObjectType=function(e){var t=e.type;return t==="subtitle"?C.CMCDObjectType.TIMED_TEXT:e.sn==="initSegment"?C.CMCDObjectType.INIT:t==="audio"?C.CMCDObjectType.AUDIO:t==="main"?this.hls.audioTracks.length?C.CMCDObjectType.VIDEO:C.CMCDObjectType.MUXED:void 0},a.getTopBandwidth=function(e){for(var t=0,i=e===C.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,T=S(i),_;!(_=T()).done;){var m=_.value;m.bitrate>t&&(t=m.bitrate)}return t>0?t:NaN},a.getBufferLength=function(e){var t=this.hls.media,i=e===C.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!i||!t)return NaN;var T=w.BufferHelper.bufferInfo(i,t.currentTime,this.config.maxBufferHole);return T.len*1e3},a.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,i=e||this.config.loader;return function(){function T(m){this.loader=void 0,this.loader=new i(m)}var _=T.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(E,g,h){t(E),this.loader.load(E,g,h)},R(T,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),T}()},a.createFragmentLoader=function(){var e=this.config.fLoader,t=this.applyFragmentData,i=e||this.config.loader;return function(){function T(m){this.loader=void 0,this.loader=new i(m)}var _=T.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(E,g,h){t(E),this.loader.load(E,g,h)},R(T,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),T}()},n.uuid=function(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)},n.serialize=function(e){for(var t=[],i=function(A){return!Number.isNaN(A)&&A!=null&&A!==""&&A!==!1},T=function(A){return Math.round(A)},_=function(A){return T(A/100)*100},m=function(A){return encodeURIComponent(A)},E={br:T,d:T,bl:_,dl:_,mtp:_,nor:m,rtp:_,tb:T},g=Object.keys(e||{}).sort(),h=S(g),u;!(u=h()).done;){var r=u.value,l=e[r];if(!i(l))continue;if(r==="v"&&l===1)continue;if(r=="pr"&&l===1)continue;var f=E[r];f&&(l=f(l));var c=typeof l,x=void 0;r==="ot"||r==="sf"||r==="st"?x=r+"="+l:c==="boolean"?x=r:c==="number"?x=r+"="+l:x=r+"="+JSON.stringify(l),t.push(x)}return t.join(",")},n.toHeaders=function(e){for(var t=Object.keys(e),i={},T=["Object","Request","Session","Status"],_=[{},{},{},{}],m={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},E=0,g=t;E<g.length;E++){var h=g[E],u=m[h]!=null?m[h]:1;_[u][h]=e[h]}for(var r=0;r<_.length;r++){var l=n.serialize(_[r]);l&&(i["CMCD-"+T[r]]=l)}return i},n.toQuery=function(e){return"CMCD="+encodeURIComponent(n.serialize(e))},n.appendQueryToUri=function(e,t){if(!t)return e;var i=e.includes("?")?"&":"?";return""+e+i+t},n}()},"./src/controller/eme-controller.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/events.ts"),C=I("./src/errors.ts"),w=I("./src/utils/logger.ts"),H=I("./src/utils/mediakeys-helper.ts");function U(o,n){for(var a=0;a<n.length;a++){var s=n[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}function R(o,n,a){return n&&U(o.prototype,n),a&&U(o,a),o}var S=3,y=function(n,a,s){var e={audioCapabilities:[],videoCapabilities:[]};return n.forEach(function(t){e.audioCapabilities.push({contentType:'audio/mp4; codecs="'+t+'"',robustness:s.audioRobustness||""})}),a.forEach(function(t){e.videoCapabilities.push({contentType:'video/mp4; codecs="'+t+'"',robustness:s.videoRobustness||""})}),[e]},v=function(n,a,s,e){switch(n){case H.KeySystems.WIDEVINE:return y(a,s,e);default:throw new Error("Unknown key-system: "+n)}},d=function(){function o(a){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=a,this._config=a.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var n=o.prototype;return n.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},n._registerListeners=function(){this.hls.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(j.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this)},n._unregisterListeners=function(){this.hls.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(j.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this)},n.getLicenseServerUrl=function(s){switch(s){case H.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+s+'"')},n._attemptKeySystemAccess=function(s,e,t){var i=this,T=v(s,e,t,this._drmSystemOptions);w.logger.log("Requesting encrypted media key-system access");var _=this.requestMediaKeySystemAccess(s,T);this.mediaKeysPromise=_.then(function(m){return i._onMediaKeySystemAccessObtained(s,m)}),_.catch(function(m){w.logger.error('Failed to obtain key-system "'+s+'" access:',m)})},n._onMediaKeySystemAccessObtained=function(s,e){var t=this;w.logger.log('Access for key-system "'+s+'" obtained');var i={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:e,mediaKeySystemDomain:s};this._mediaKeysList.push(i);var T=Promise.resolve().then(function(){return e.createMediaKeys()}).then(function(_){return i.mediaKeys=_,w.logger.log('Media-keys created for key-system "'+s+'"'),t._onMediaKeysCreated(),_});return T.catch(function(_){w.logger.error("Failed to create media-keys:",_)}),T},n._onMediaKeysCreated=function(){var s=this;this._mediaKeysList.forEach(function(e){e.mediaKeysSession||(e.mediaKeysSession=e.mediaKeys.createSession(),s._onNewMediaKeySession(e.mediaKeysSession))})},n._onNewMediaKeySession=function(s){var e=this;w.logger.log("New key-system session "+s.sessionId),s.addEventListener("message",function(t){e._onKeySessionMessage(s,t.message)},!1)},n._onKeySessionMessage=function(s,e){w.logger.log("Got EME message event, creating license request"),this._requestLicense(e,function(t){w.logger.log("Received license data (length: "+(t&&t.byteLength)+"), updating key-session"),s.update(t)})},n.onMediaEncrypted=function(s){var e=this;if(w.logger.log('Media is encrypted using "'+s.initDataType+'" init data type'),!this.mediaKeysPromise){w.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(j.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var t=function(T){if(!e._media)return;e._attemptSetMediaKeys(T),e._generateRequestWithPreferredKeySession(s.initDataType,s.initData)};this.mediaKeysPromise.then(t).catch(t)},n._attemptSetMediaKeys=function(s){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var e=this._mediaKeysList[0];if(!e||!e.mediaKeys){w.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(j.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}w.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(e.mediaKeys),this._hasSetMediaKeys=!0}},n._generateRequestWithPreferredKeySession=function(s,e){var t=this,i=this._mediaKeysList[0];if(!i){w.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(j.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(i.mediaKeysSessionInitialized){w.logger.warn("Key-Session already initialized but requested again");return}var T=i.mediaKeysSession;if(!T){w.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(j.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!e){w.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(j.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}w.logger.log('Generating key-session request for "'+s+'" init data type'),i.mediaKeysSessionInitialized=!0,T.generateRequest(s,e).then(function(){w.logger.debug("Key-session generation succeeded")}).catch(function(_){w.logger.error("Error generating key-session request:",_),t.hls.trigger(j.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},n._createLicenseXhr=function(s,e,t){var i=new XMLHttpRequest;i.responseType="arraybuffer",i.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,i,s,e,t);var T=this._licenseXhrSetup;if(T)try{T.call(this.hls,i,s),T=void 0}catch(_){w.logger.error(_)}try{i.readyState||i.open("POST",s,!0),T&&T.call(this.hls,i,s)}catch(_){throw new Error("issue setting up KeySystem license XHR "+_)}return i},n._onLicenseRequestReadyStageChange=function(s,e,t,i){switch(s.readyState){case 4:if(s.status===200){this._requestLicenseFailureCount=0,w.logger.log("License request succeeded");var T=s.response,_=this._licenseResponseCallback;if(_)try{T=_.call(this.hls,s,e)}catch(E){w.logger.error(E)}i(T)}else{if(w.logger.error("License Request XHR failed ("+e+"). Status: "+s.status+" ("+s.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>S){this.hls.trigger(j.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var m=S-this._requestLicenseFailureCount+1;w.logger.warn("Retrying license request, "+m+" attempts left"),this._requestLicense(t,i)}break}},n._generateLicenseRequestChallenge=function(s,e){switch(s.mediaKeySystemDomain){case H.KeySystems.WIDEVINE:return e}throw new Error("unsupported key-system: "+s.mediaKeySystemDomain)},n._requestLicense=function(s,e){w.logger.log("Requesting content license for key-system");var t=this._mediaKeysList[0];if(!t){w.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(j.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var i=this.getLicenseServerUrl(t.mediaKeySystemDomain),T=this._createLicenseXhr(i,s,e);w.logger.log("Sending license request to URL: "+i);var _=this._generateLicenseRequestChallenge(t,s);T.send(_)}catch(m){w.logger.error("Failure requesting DRM license: "+m),this.hls.trigger(j.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},n.onMediaAttached=function(s,e){if(!this._emeEnabled)return;var t=e.media;this._media=t,t.addEventListener("encrypted",this._onMediaEncrypted)},n.onMediaDetached=function(){var s=this._media,e=this._mediaKeysList;if(!s)return;s.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(e.map(function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch(function(){})})).then(function(){return s.setMediaKeys(null)}).catch(function(){})},n.onManifestParsed=function(s,e){if(!this._emeEnabled)return;var t=e.levels.map(function(T){return T.audioCodec}).filter(function(T){return!!T}),i=e.levels.map(function(T){return T.videoCodec}).filter(function(T){return!!T});this._attemptKeySystemAccess(H.KeySystems.WIDEVINE,t,i)},R(o,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),o}();L.default=d},"./src/controller/fps-controller.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/events.ts"),C=I("./src/utils/logger.ts"),w=function(){function H(R){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=R,this.registerListeners()}var U=H.prototype;return U.setStreamController=function(S){this.streamController=S},U.registerListeners=function(){this.hls.on(j.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},U.unregisterListeners=function(){this.hls.off(j.Events.MEDIA_ATTACHING,this.onMediaAttaching)},U.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},U.onMediaAttaching=function(S,y){var v=this.hls.config;if(v.capLevelOnFPSDrop){var d=y.media instanceof self.HTMLVideoElement?y.media:null;this.media=d,d&&typeof d.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),v.fpsDroppedMonitoringPeriod)}},U.checkFPS=function(S,y,v){var d=performance.now();if(y){if(this.lastTime){var o=d-this.lastTime,n=v-this.lastDroppedFrames,a=y-this.lastDecodedFrames,s=1e3*n/o,e=this.hls;if(e.trigger(j.Events.FPS_DROP,{currentDropped:n,currentDecoded:a,totalDroppedFrames:v}),s>0&&n>e.config.fpsDroppedMonitoringThreshold*a){var t=e.currentLevel;C.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+t),t>0&&(e.autoLevelCapping===-1||e.autoLevelCapping>=t)&&(t=t-1,e.trigger(j.Events.FPS_DROP_LEVEL_CAPPING,{level:t,droppedLevel:e.currentLevel}),e.autoLevelCapping=t,this.streamController.nextLevelSwitch())}}this.lastTime=d,this.lastDroppedFrames=v,this.lastDecodedFrames=y}},U.checkFPSInterval=function(){var S=this.media;if(S)if(this.isVideoPlaybackQualityAvailable){var y=S.getVideoPlaybackQuality();this.checkFPS(S,y.totalVideoFrames,y.droppedVideoFrames)}else this.checkFPS(S,S.webkitDecodedFrameCount,S.webkitDroppedFrameCount)},H}();L.default=w},"./src/controller/fragment-finders.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"findFragmentByPDT",function(){return w}),I.d(L,"findFragmentByPTS",function(){return H}),I.d(L,"fragmentWithinToleranceTest",function(){return U}),I.d(L,"pdtWithinToleranceTest",function(){return R}),I.d(L,"findFragWithCC",function(){return S});var j=I("./src/polyfills/number.ts"),C=I("./src/utils/binary-search.ts");function w(y,v,d){if(v===null||!Array.isArray(y)||!y.length||!Object(j.isFiniteNumber)(v))return null;var o=y[0].programDateTime;if(v<(o||0))return null;var n=y[y.length-1].endProgramDateTime;if(v>=(n||0))return null;d=d||0;for(var a=0;a<y.length;++a){var s=y[a];if(R(v,d,s))return s}return null}function H(y,v,d,o){d===void 0&&(d=0),o===void 0&&(o=0);var n=null;if(y?n=v[y.sn-v[0].sn+1]||null:d===0&&v[0].start===0&&(n=v[0]),n&&U(d,o,n)===0)return n;var a=C.default.search(v,U.bind(null,d,o));return a||n}function U(y,v,d){y===void 0&&(y=0),v===void 0&&(v=0);var o=Math.min(v,d.duration+(d.deltaPTS?d.deltaPTS:0));return d.start+d.duration-o<=y?1:d.start-o>y&&d.start?-1:0}function R(y,v,d){var o=Math.min(v,d.duration+(d.deltaPTS?d.deltaPTS:0))*1e3,n=d.endProgramDateTime||0;return n-o>y}function S(y,v){return C.default.search(y,function(d){return d.cc<v?1:d.cc>v?-1:0})}},"./src/controller/fragment-tracker.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"FragmentState",function(){return w}),I.d(L,"FragmentTracker",function(){return H});var j=I("./src/events.ts"),C=I("./src/types/loader.ts"),w;(function(S){S.NOT_LOADED="NOT_LOADED",S.BACKTRACKED="BACKTRACKED",S.APPENDING="APPENDING",S.PARTIAL="PARTIAL",S.OK="OK"})(w||(w={}));var H=function(){function S(v){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=v,this._registerListeners()}var y=S.prototype;return y._registerListeners=function(){var d=this.hls;d.on(j.Events.BUFFER_APPENDED,this.onBufferAppended,this),d.on(j.Events.FRAG_BUFFERED,this.onFragBuffered,this),d.on(j.Events.FRAG_LOADED,this.onFragLoaded,this)},y._unregisterListeners=function(){var d=this.hls;d.off(j.Events.BUFFER_APPENDED,this.onBufferAppended,this),d.off(j.Events.FRAG_BUFFERED,this.onFragBuffered,this),d.off(j.Events.FRAG_LOADED,this.onFragLoaded,this)},y.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},y.getAppendedFrag=function(d,o){if(o===C.PlaylistLevelType.MAIN){var n=this.activeFragment,a=this.activeParts;if(!n)return null;if(a)for(var s=a.length;s--;){var e=a[s],t=e?e.end:n.appendedPTS;if(e.start<=d&&t!==void 0&&d<=t)return s>9&&(this.activeParts=a.slice(s-9)),e}else if(n.start<=d&&n.appendedPTS!==void 0&&d<=n.appendedPTS)return n}return this.getBufferedFrag(d,o)},y.getBufferedFrag=function(d,o){for(var n=this.fragments,a=Object.keys(n),s=a.length;s--;){var e=n[a[s]];if((e==null?void 0:e.body.type)===o&&e.buffered){var t=e.body;if(t.start<=d&&d<=t.end)return t}}return null},y.detectEvictedFragments=function(d,o,n){var a=this;Object.keys(this.fragments).forEach(function(s){var e=a.fragments[s];if(!e)return;if(!e.buffered){e.body.type===n&&a.removeFragment(e.body);return}var t=e.range[d];if(!t)return;t.time.some(function(i){var T=!a.isTimeBuffered(i.startPTS,i.endPTS,o);return T&&a.removeFragment(e.body),T})})},y.detectPartialFragments=function(d){var o=this,n=this.timeRanges,a=d.frag,s=d.part;if(!n||a.sn==="initSegment")return;var e=R(a),t=this.fragments[e];if(!t)return;Object.keys(n).forEach(function(i){var T=a.elementaryStreams[i];if(!T)return;var _=n[i],m=s!==null||T.partial===!0;t.range[i]=o.getBufferedTimes(a,s,m,_)}),t.backtrack=t.loaded=null,Object.keys(t.range).length?t.buffered=!0:this.removeFragment(t.body)},y.fragBuffered=function(d){var o=R(d),n=this.fragments[o];n&&(n.backtrack=n.loaded=null,n.buffered=!0)},y.getBufferedTimes=function(d,o,n,a){for(var s={time:[],partial:n},e=o?o.start:d.start,t=o?o.end:d.end,i=d.minEndPTS||t,T=d.maxStartPTS||e,_=0;_<a.length;_++){var m=a.start(_)-this.bufferPadding,E=a.end(_)+this.bufferPadding;if(T>=m&&i<=E){s.time.push({startPTS:Math.max(e,a.start(_)),endPTS:Math.min(t,a.end(_))});break}else if(e<E&&t>m)s.partial=!0,s.time.push({startPTS:Math.max(e,a.start(_)),endPTS:Math.min(t,a.end(_))});else if(t<=m)break}return s},y.getPartialFragment=function(d){var o=null,n,a,s,e=0,t=this.bufferPadding,i=this.fragments;return Object.keys(i).forEach(function(T){var _=i[T];if(!_)return;U(_)&&(a=_.body.start-t,s=_.body.end+t,d>=a&&d<=s&&(n=Math.min(d-a,s-d),e<=n&&(o=_.body,e=n)))}),o},y.getState=function(d){var o=R(d),n=this.fragments[o];return n?n.buffered?U(n)?w.PARTIAL:w.OK:n.backtrack?w.BACKTRACKED:w.APPENDING:w.NOT_LOADED},y.backtrack=function(d,o){var n=R(d),a=this.fragments[n];if(!a||a.backtrack)return null;var s=a.backtrack=o||a.loaded;return a.loaded=null,s},y.getBacktrackData=function(d){var o=R(d),n=this.fragments[o];if(n){var a,s=n.backtrack;if(s!=null&&(a=s.payload)!==null&&a!==void 0&&a.byteLength)return s;this.removeFragment(d)}return null},y.isTimeBuffered=function(d,o,n){for(var a,s,e=0;e<n.length;e++){if(a=n.start(e)-this.bufferPadding,s=n.end(e)+this.bufferPadding,d>=a&&o<=s)return!0;if(o<=a)return!1}return!1},y.onFragLoaded=function(d,o){var n=o.frag,a=o.part;if(n.sn==="initSegment"||n.bitrateTest||a)return;var s=R(n);this.fragments[s]={body:n,loaded:o,backtrack:null,buffered:!1,range:Object.create(null)}},y.onBufferAppended=function(d,o){var n=this,a=o.frag,s=o.part,e=o.timeRanges;if(a.type===C.PlaylistLevelType.MAIN)if(this.activeFragment=a,s){var t=this.activeParts;t||(this.activeParts=t=[]),t.push(s)}else this.activeParts=null;this.timeRanges=e,Object.keys(e).forEach(function(i){var T=e[i];if(n.detectEvictedFragments(i,T),!s)for(var _=0;_<T.length;_++)a.appendedPTS=Math.max(T.end(_),a.appendedPTS||0)})},y.onFragBuffered=function(d,o){this.detectPartialFragments(o)},y.hasFragment=function(d){var o=R(d);return!!this.fragments[o]},y.removeFragmentsInRange=function(d,o,n){var a=this;Object.keys(this.fragments).forEach(function(s){var e=a.fragments[s];if(!e)return;if(e.buffered){var t=e.body;t.type===n&&t.start<o&&t.end>d&&a.removeFragment(t)}})},y.removeFragment=function(d){var o=R(d);d.stats.loaded=0,d.clearElementaryStreamInfo(),delete this.fragments[o]},y.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},S}();function U(S){var y,v;return S.buffered&&(((y=S.range.video)===null||y===void 0?void 0:y.partial)||((v=S.range.audio)===null||v===void 0?void 0:v.partial))}function R(S){return S.type+"_"+S.level+"_"+S.urlId+"_"+S.sn}},"./src/controller/gap-controller.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"STALL_MINIMUM_DURATION_MS",function(){return U}),I.d(L,"MAX_START_GAP_JUMP",function(){return R}),I.d(L,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return S}),I.d(L,"SKIP_BUFFER_RANGE_START",function(){return y}),I.d(L,"default",function(){return v});var j=I("./src/utils/buffer-helper.ts"),C=I("./src/errors.ts"),w=I("./src/events.ts"),H=I("./src/utils/logger.ts"),U=250,R=2,S=.1,y=.05,v=function(){function d(n,a,s,e){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=n,this.media=a,this.fragmentTracker=s,this.hls=e}var o=d.prototype;return o.destroy=function(){this.hls=this.fragmentTracker=this.media=null},o.poll=function(a){var s=this.config,e=this.media,t=this.stalled,i=e.currentTime,T=e.seeking,_=this.seeking&&!T,m=!this.seeking&&T;if(this.seeking=T,i!==a){if(this.moved=!0,t!==null){if(this.stallReported){var E=self.performance.now()-t;H.logger.warn("playback not stuck anymore @"+i+", after "+Math.round(E)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((m||_)&&(this.stalled=null),e.paused||e.ended||e.playbackRate===0||!j.BufferHelper.getBuffered(e).length)return;var g=j.BufferHelper.bufferInfo(e,i,0),h=g.len>0,u=g.nextStart||0;if(!h&&!u)return;if(T){var r=g.len>R,l=!u||u-i>R&&!this.fragmentTracker.getPartialFragment(i);if(r||l)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var f,c=Math.max(u,g.start||0)-i,x=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,D=x==null||((f=x.details)===null||f===void 0)?void 0:f.live,A=D?x.details.targetduration*2:R;if(c>0&&c<=A){this._trySkipBufferHole(null);return}}var B=self.performance.now();if(t===null){this.stalled=B;return}var O=B-t;!T&&O>=U&&this._reportStall(g.len);var W=j.BufferHelper.bufferInfo(e,i,s.maxBufferHole);this._tryFixBufferStall(W,O)},o._tryFixBufferStall=function(a,s){var e=this.config,t=this.fragmentTracker,i=this.media,T=i.currentTime,_=t.getPartialFragment(T);if(_){var m=this._trySkipBufferHole(_);if(m)return}a.len>e.maxBufferHole&&s>e.highBufferWatchdogPeriod*1e3&&(H.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},o._reportStall=function(a){var s=this.hls,e=this.media,t=this.stallReported;t||(this.stallReported=!0,H.logger.warn("Playback stalling at @"+e.currentTime+" due to low buffer (buffer="+a+")"),s.trigger(w.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:a}))},o._trySkipBufferHole=function(a){for(var s=this.config,e=this.hls,t=this.media,i=t.currentTime,T=0,_=j.BufferHelper.getBuffered(t),m=0;m<_.length;m++){var E=_.start(m);if(i+s.maxBufferHole>=T&&i<E){var g=Math.max(E+y,t.currentTime+S);return H.logger.warn("skipping hole, adjusting currentTime from "+i+" to "+g),this.moved=!0,this.stalled=null,t.currentTime=g,a&&e.trigger(w.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+i+" to "+g,frag:a}),g}T=_.end(m)}return 0},o._tryNudgeBuffer=function(){var a=this.config,s=this.hls,e=this.media,t=e.currentTime,i=(this.nudgeRetry||0)+1;if(this.nudgeRetry=i,i<a.nudgeMaxRetry){var T=t+i*a.nudgeOffset;H.logger.warn("Nudging 'currentTime' from "+t+" to "+T),e.currentTime=T,s.trigger(w.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else H.logger.error("Playhead still not moving while enough data buffered @"+t+" after "+a.nudgeMaxRetry+" nudges"),s.trigger(w.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},d}()},"./src/controller/id3-track-controller.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/events.ts"),C=I("./src/utils/texttrack-utils.ts"),w=I("./src/demux/id3.ts"),H=.25,U=function(){function R(y){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=y,this._registerListeners()}var S=R.prototype;return S.destroy=function(){this._unregisterListeners()},S._registerListeners=function(){var v=this.hls;v.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),v.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),v.on(j.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),v.on(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},S._unregisterListeners=function(){var v=this.hls;v.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),v.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),v.off(j.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),v.off(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},S.onMediaAttached=function(v,d){this.media=d.media},S.onMediaDetaching=function(){if(!this.id3Track)return;Object(C.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},S.getID3Track=function(v){if(!this.media)return;for(var d=0;d<v.length;d++){var o=v[d];if(o.kind==="metadata"&&o.label==="id3")return Object(C.sendAddTrackEvent)(o,this.media),o}return this.media.addTextTrack("metadata","id3")},S.onFragParsingMetadata=function(v,d){if(!this.media)return;var o=d.frag,n=d.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var a=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,s=0;s<n.length;s++){var e=w.getID3Frames(n[s].data);if(e){var t=n[s].pts,i=s<n.length-1?n[s+1].pts:o.end,T=i-t;T<=0&&(i=t+H);for(var _=0;_<e.length;_++){var m=e[_];if(!w.isTimeStampFrame(m)){var E=new a(t,i,"");E.value=m,this.id3Track.addCue(E)}}}}},S.onBufferFlushing=function(v,d){var o=d.startOffset,n=d.endOffset,a=d.type;if(!a||a==="audio"){var s=this.id3Track;s&&Object(C.removeCuesInRange)(s,o,n)}},R}();L.default=U},"./src/controller/latency-controller.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return R});var j=I("./src/errors.ts"),C=I("./src/events.ts"),w=I("./src/utils/logger.ts");function H(S,y){for(var v=0;v<y.length;v++){var d=y[v];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(S,d.key,d)}}function U(S,y,v){return y&&H(S.prototype,y),v&&H(S,v),S}var R=function(){function S(v){var d=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return d.timeupdate()},this.hls=v,this.config=v.config,this.registerListeners()}var y=S.prototype;return y.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},y.registerListeners=function(){this.hls.on(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(C.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(C.Events.ERROR,this.onError,this)},y.unregisterListeners=function(){this.hls.off(C.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(C.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(C.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(C.Events.ERROR,this.onError)},y.onMediaAttached=function(d,o){this.media=o.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},y.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},y.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},y.onLevelUpdated=function(d,o){var n=o.details;this.levelDetails=n,n.advanced&&this.timeupdate(),!n.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},y.onError=function(d,o){if(o.details!==j.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,w.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},y.timeupdate=function(){var d=this.media,o=this.levelDetails;if(!d||!o)return;this.currentTime=d.currentTime;var n=this.computeLatency();if(n===null)return;this._latency=n;var a=this.config,s=a.lowLatencyMode,e=a.maxLiveSyncPlaybackRate;if(!s||e===1)return;var t=this.targetLatency;if(t===null)return;var i=n-t,T=Math.min(this.maxLatency,t+o.targetduration),_=i<T;if(o.live&&_&&i>.05&&this.forwardBufferLength>1){var m=Math.min(2,Math.max(1,e)),E=Math.round(2/(1+Math.exp(-.75*i-this.edgeStalled))*20)/20;d.playbackRate=Math.min(m,Math.max(1,E))}else d.playbackRate!==1&&d.playbackRate!==0&&(d.playbackRate=1)},y.estimateLiveEdge=function(){var d=this.levelDetails;return d===null?null:d.edge+d.age},y.computeLatency=function(){var d=this.estimateLiveEdge();return d===null?null:d-this.currentTime},U(S,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var d=this.config,o=this.levelDetails;return d.liveMaxLatencyDuration!==void 0?d.liveMaxLatencyDuration:o?d.liveMaxLatencyDurationCount*o.targetduration:0}},{key:"targetLatency",get:function(){var d=this.levelDetails;if(d===null)return null;var o=d.holdBack,n=d.partHoldBack,a=d.targetduration,s=this.config,e=s.liveSyncDuration,t=s.liveSyncDurationCount,i=s.lowLatencyMode,T=this.hls.userConfig,_=i&&n||o;(T.liveSyncDuration||T.liveSyncDurationCount||_===0)&&(_=e!==void 0?e:t*a);var m=a,E=1;return _+Math.min(this.stallCount*E,m)}},{key:"liveSyncPosition",get:function(){var d=this.estimateLiveEdge(),o=this.targetLatency,n=this.levelDetails;if(d===null||o===null||n===null)return null;var a=n.edge,s=d-o-this.edgeStalled,e=a-n.totalduration,t=a-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(e,s),t)}},{key:"drift",get:function(){var d=this.levelDetails;return d===null?1:d.drift}},{key:"edgeStalled",get:function(){var d=this.levelDetails;if(d===null)return 0;var o=(this.config.lowLatencyMode&&d.partTarget||d.targetduration)*3;return Math.max(d.age-o,0)}},{key:"forwardBufferLength",get:function(){var d=this.media,o=this.levelDetails;if(!d||!o)return 0;var n=d.buffered.length;return n?d.buffered.end(n-1):o.edge-this.currentTime}}]),S}()},"./src/controller/level-controller.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return s});var j=I("./src/types/level.ts"),C=I("./src/events.ts"),w=I("./src/errors.ts"),H=I("./src/utils/codecs.ts"),U=I("./src/controller/level-helper.ts"),R=I("./src/controller/base-playlist-controller.ts"),S=I("./src/types/loader.ts");function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var T in i)Object.prototype.hasOwnProperty.call(i,T)&&(e[T]=i[T])}return e},y.apply(this,arguments)}function v(e,t){for(var i=0;i<t.length;i++){var T=t[i];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(e,T.key,T)}}function d(e,t,i){return t&&v(e.prototype,t),i&&v(e,i),e}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)}function n(e,t){return n=Object.setPrototypeOf||function(T,_){return T.__proto__=_,T},n(e,t)}var a=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),s=function(e){o(t,e);function t(T){var _;return _=e.call(this,T,"[level-controller]")||this,_._levels=[],_._firstLevel=-1,_._startLevel=void 0,_.currentLevelIndex=-1,_.manualLevelIndex=-1,_.onParsedComplete=void 0,_._registerListeners(),_}var i=t.prototype;return i._registerListeners=function(){var _=this.hls;_.on(C.Events.MANIFEST_LOADED,this.onManifestLoaded,this),_.on(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.on(C.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.on(C.Events.FRAG_LOADED,this.onFragLoaded,this),_.on(C.Events.ERROR,this.onError,this)},i._unregisterListeners=function(){var _=this.hls;_.off(C.Events.MANIFEST_LOADED,this.onManifestLoaded,this),_.off(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.off(C.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.off(C.Events.FRAG_LOADED,this.onFragLoaded,this),_.off(C.Events.ERROR,this.onError,this)},i.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,e.prototype.destroy.call(this)},i.startLoad=function(){var _=this._levels;_.forEach(function(m){m.loadError=0}),e.prototype.startLoad.call(this)},i.onManifestLoaded=function(_,m){var E=[],g=[],h=[],u,r={},l,f=!1,c=!1,x=!1;if(m.levels.forEach(function(O){var W=O.attrs;f=f||!!(O.width&&O.height),c=c||!!O.videoCodec,x=x||!!O.audioCodec,a&&O.audioCodec&&O.audioCodec.indexOf("mp4a.40.34")!==-1&&(O.audioCodec=void 0);var P=O.bitrate+"-"+O.attrs.RESOLUTION+"-"+O.attrs.CODECS;l=r[P],l?l.url.push(O.url):(l=new j.Level(O),r[P]=l,E.push(l)),W&&(W.AUDIO&&Object(U.addGroupId)(l,"audio",W.AUDIO),W.SUBTITLES&&Object(U.addGroupId)(l,"text",W.SUBTITLES))}),(f||c)&&x&&(E=E.filter(function(O){var W=O.videoCodec,P=O.width,G=O.height;return!!W||!!(P&&G)})),E=E.filter(function(O){var W=O.audioCodec,P=O.videoCodec;return(!W||Object(H.isCodecSupportedInMp4)(W,"audio"))&&(!P||Object(H.isCodecSupportedInMp4)(P,"video"))}),m.audioTracks&&(g=m.audioTracks.filter(function(O){return!O.audioCodec||Object(H.isCodecSupportedInMp4)(O.audioCodec,"audio")}),Object(U.assignTrackIdsByGroup)(g)),m.subtitles&&(h=m.subtitles,Object(U.assignTrackIdsByGroup)(h)),E.length>0){u=E[0].bitrate,E.sort(function(O,W){return O.bitrate-W.bitrate}),this._levels=E;for(var D=0;D<E.length;D++)if(E[D].bitrate===u){this._firstLevel=D,this.log("manifest loaded, "+E.length+" level(s) found, first bitrate: "+u);break}var A=x&&!c,B={levels:E,audioTracks:g,subtitleTracks:h,firstLevel:this._firstLevel,stats:m.stats,audio:x,video:c,altAudio:!A&&g.some(function(O){return!!O.url})};this.hls.trigger(C.Events.MANIFEST_PARSED,B),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(C.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:m.url,reason:"no level with compatible codecs found in manifest"})},i.onError=function(_,m){if(e.prototype.onError.call(this,_,m),m.fatal)return;var E=m.context,g=this._levels[this.currentLevelIndex];if(E&&(E.type===S.PlaylistContextType.AUDIO_TRACK&&g.audioGroupIds&&E.groupId===g.audioGroupIds[g.urlId]||E.type===S.PlaylistContextType.SUBTITLE_TRACK&&g.textGroupIds&&E.groupId===g.textGroupIds[g.urlId])){this.redundantFailover(this.currentLevelIndex);return}var h=!1,u=!0,r;switch(m.details){case w.ErrorDetails.FRAG_LOAD_ERROR:case w.ErrorDetails.FRAG_LOAD_TIMEOUT:case w.ErrorDetails.KEY_LOAD_ERROR:case w.ErrorDetails.KEY_LOAD_TIMEOUT:if(m.frag){var l=this._levels[m.frag.level];l?(l.fragmentError++,l.fragmentError>this.hls.config.fragLoadingMaxRetry&&(r=m.frag.level)):r=m.frag.level}break;case w.ErrorDetails.LEVEL_LOAD_ERROR:case w.ErrorDetails.LEVEL_LOAD_TIMEOUT:E&&(E.deliveryDirectives&&(u=!1),r=E.level),h=!0;break;case w.ErrorDetails.REMUX_ALLOC_ERROR:r=m.level,h=!0;break}r!==void 0&&this.recoverLevel(m,r,h,u)},i.recoverLevel=function(_,m,E,g){var h=_.details,u=this._levels[m];if(u.loadError++,E){var r=this.retryLoadingOrFail(_);if(r)_.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(g){var l=u.url.length;if(l>1&&u.loadError<l)_.levelRetry=!0,this.redundantFailover(m);else if(this.manualLevelIndex===-1){var f=m===0?this._levels.length-1:m-1;this.currentLevelIndex!==f&&this._levels[f].loadError===0&&(this.warn(h+": switch to "+f),_.levelRetry=!0,this.hls.nextAutoLevel=f)}}},i.redundantFailover=function(_){var m=this._levels[_],E=m.url.length;if(E>1){var g=(m.urlId+1)%E;this.warn("Switching to redundant URL-id "+g),this._levels.forEach(function(h){h.urlId=g}),this.level=_}},i.onFragLoaded=function(_,m){var E=m.frag;if(E!==void 0&&E.type===S.PlaylistLevelType.MAIN){var g=this._levels[E.level];g!==void 0&&(g.fragmentError=0,g.loadError=0)}},i.onLevelLoaded=function(_,m){var E,g=m.level,h=m.details,u=this._levels[g];if(!u){var r;this.warn("Invalid level index "+g),(r=m.deliveryDirectives)!==null&&r!==void 0&&r.skip&&(h.deltaUpdateFailed=!0);return}g===this.currentLevelIndex?(u.fragmentError===0&&(u.loadError=0,this.retryCount=0),this.playlistLoaded(g,m,u.details)):(E=m.deliveryDirectives)!==null&&E!==void 0&&E.skip&&(h.deltaUpdateFailed=!0)},i.onAudioTrackSwitched=function(_,m){var E=this.hls.levels[this.currentLevelIndex];if(!E)return;if(E.audioGroupIds){for(var g=-1,h=this.hls.audioTracks[m.id].groupId,u=0;u<E.audioGroupIds.length;u++)if(E.audioGroupIds[u]===h){g=u;break}g!==E.urlId&&(E.urlId=g,this.startLoad())}},i.loadPlaylist=function(_){var m=this.currentLevelIndex,E=this._levels[m];if(this.canLoad&&E&&E.url.length>0){var g=E.urlId,h=E.url[g];if(_)try{h=_.addDirectives(h)}catch(u){this.warn("Could not construct new URL with HLS Delivery Directives: "+u)}this.log("Attempt loading level index "+m+(_?" at sn "+_.msn+" part "+_.part:"")+" with URL-id "+g+" "+h),this.clearTimer(),this.hls.trigger(C.Events.LEVEL_LOADING,{url:h,level:m,id:g,deliveryDirectives:_||null})}},i.removeLevel=function(_,m){var E=function(u,r){return r!==m},g=this._levels.filter(function(h,u){return u!==_?!0:h.url.length>1&&m!==void 0?(h.url=h.url.filter(E),h.audioGroupIds&&(h.audioGroupIds=h.audioGroupIds.filter(E)),h.textGroupIds&&(h.textGroupIds=h.textGroupIds.filter(E)),h.urlId=0,!0):!1}).map(function(h,u){var r=h.details;return r!=null&&r.fragments&&r.fragments.forEach(function(l){l.level=u}),h});this._levels=g,this.hls.trigger(C.Events.LEVELS_UPDATED,{levels:g})},d(t,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(_){var m,E=this._levels;if(E.length===0)return;if(this.currentLevelIndex===_&&(m=E[_])!==null&&m!==void 0&&m.details)return;if(_<0||_>=E.length){var g=_<0;if(this.hls.trigger(C.Events.ERROR,{type:w.ErrorTypes.OTHER_ERROR,details:w.ErrorDetails.LEVEL_SWITCH_ERROR,level:_,fatal:g,reason:"invalid level idx"}),g)return;_=Math.min(_,E.length-1)}this.clearTimer();var h=this.currentLevelIndex,u=E[h],r=E[_];this.log("switching to level "+_+" from "+h),this.currentLevelIndex=_;var l=y({},r,{level:_,maxBitrate:r.maxBitrate,uri:r.uri,urlId:r.urlId});delete l._urlId,this.hls.trigger(C.Events.LEVEL_SWITCHING,l);var f=r.details;if(!f||f.live){var c=this.switchParams(r.uri,u==null?void 0:u.details);this.loadPlaylist(c)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(_){this.manualLevelIndex=_,this._startLevel===void 0&&(this._startLevel=_),_!==-1&&(this.level=_)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(_){this._firstLevel=_}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var _=this.hls.config.startLevel;return _!==void 0?_:this._firstLevel}else return this._startLevel},set:function(_){this._startLevel=_}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(_){this.level=_,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=_)}}]),t}(R.default)},"./src/controller/level-helper.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"addGroupId",function(){return w}),I.d(L,"assignTrackIdsByGroup",function(){return H}),I.d(L,"updatePTS",function(){return U}),I.d(L,"updateFragPTSDTS",function(){return S}),I.d(L,"mergeDetails",function(){return y}),I.d(L,"mapPartIntersection",function(){return v}),I.d(L,"mapFragmentIntersection",function(){return d}),I.d(L,"adjustSliding",function(){return o}),I.d(L,"addSliding",function(){return n}),I.d(L,"computeReloadInterval",function(){return a}),I.d(L,"getFragmentWithSN",function(){return s}),I.d(L,"getPartWith",function(){return e});var j=I("./src/polyfills/number.ts"),C=I("./src/utils/logger.ts");function w(t,i,T){switch(i){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(T);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(T);break}}function H(t){var i={};t.forEach(function(T){var _=T.groupId||"";T.id=i[_]=i[_]||0,i[_]++})}function U(t,i,T){var _=t[i],m=t[T];R(_,m)}function R(t,i){var T=i.startPTS;if(Object(j.isFiniteNumber)(T)){var _=0,m;i.sn>t.sn?(_=T-t.start,m=t):(_=t.start-T,m=i),m.duration!==_&&(m.duration=_)}else if(i.sn>t.sn){var E=t.cc===i.cc;E&&t.minEndPTS?i.start=t.start+(t.minEndPTS-t.start):i.start=t.start+t.duration}else i.start=Math.max(t.start-i.duration,0)}function S(t,i,T,_,m,E){var g=_-T;g<=0&&(C.logger.warn("Fragment should have a positive duration",i),_=T+i.duration,E=m+i.duration);var h=T,u=_,r=i.startPTS,l=i.endPTS;if(Object(j.isFiniteNumber)(r)){var f=Math.abs(r-T);Object(j.isFiniteNumber)(i.deltaPTS)?i.deltaPTS=Math.max(f,i.deltaPTS):i.deltaPTS=f,h=Math.max(T,r),T=Math.min(T,r),m=Math.min(m,i.startDTS),u=Math.min(_,l),_=Math.max(_,l),E=Math.max(E,i.endDTS)}i.duration=_-T;var c=T-i.start;i.appendedPTS=_,i.start=i.startPTS=T,i.maxStartPTS=h,i.startDTS=m,i.endPTS=_,i.minEndPTS=u,i.endDTS=E;var x=i.sn;if(!t||x<t.startSN||x>t.endSN)return 0;var D,A=x-t.startSN,B=t.fragments;for(B[A]=i,D=A;D>0;D--)R(B[D],B[D-1]);for(D=A;D<B.length-1;D++)R(B[D],B[D+1]);return t.fragmentHint&&R(B[B.length-1],t.fragmentHint),t.PTSKnown=t.alignedSliding=!0,c}function y(t,i){for(var T=null,_=t.fragments,m=_.length-1;m>=0;m--){var E=_[m].initSegment;if(E){T=E;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var g=0,h;if(d(t,i,function(D,A){D.relurl&&(g=D.cc-A.cc),Object(j.isFiniteNumber)(D.startPTS)&&Object(j.isFiniteNumber)(D.endPTS)&&(A.start=A.startPTS=D.startPTS,A.startDTS=D.startDTS,A.appendedPTS=D.appendedPTS,A.maxStartPTS=D.maxStartPTS,A.endPTS=D.endPTS,A.endDTS=D.endDTS,A.minEndPTS=D.minEndPTS,A.duration=D.endPTS-D.startPTS,A.duration&&(h=A),i.PTSKnown=i.alignedSliding=!0),A.elementaryStreams=D.elementaryStreams,A.loader=D.loader,A.stats=D.stats,A.urlId=D.urlId,D.initSegment&&(A.initSegment=D.initSegment,T=D.initSegment)}),T){var u=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments;u.forEach(function(D){var A;(!D.initSegment||D.initSegment.relurl===((A=T)===null||A===void 0?void 0:A.relurl))&&(D.initSegment=T)})}if(i.skippedSegments&&(i.deltaUpdateFailed=i.fragments.some(function(D){return!D}),i.deltaUpdateFailed)){C.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var r=i.skippedSegments;r--;)i.fragments.shift();i.startSN=i.fragments[0].sn,i.startCC=i.fragments[0].cc}var l=i.fragments;if(g){C.logger.warn("discontinuity sliding from playlist, take drift into account");for(var f=0;f<l.length;f++)l[f].cc+=g}i.skippedSegments&&(i.startCC=i.fragments[0].cc),v(t.partList,i.partList,function(D,A){A.elementaryStreams=D.elementaryStreams,A.stats=D.stats}),h?S(i,h,h.startPTS,h.endPTS,h.startDTS,h.endDTS):o(t,i),l.length&&(i.totalduration=i.edge-l[0].start),i.driftStartTime=t.driftStartTime,i.driftStart=t.driftStart;var c=i.advancedDateTime;if(i.advanced&&c){var x=i.edge;i.driftStart||(i.driftStartTime=c,i.driftStart=x),i.driftEndTime=c,i.driftEnd=x}else i.driftEndTime=t.driftEndTime,i.driftEnd=t.driftEnd,i.advancedDateTime=t.advancedDateTime}function v(t,i,T){if(t&&i)for(var _=0,m=0,E=t.length;m<=E;m++){var g=t[m],h=i[m+_];g&&h&&g.index===h.index&&g.fragment.sn===h.fragment.sn?T(g,h):_--}}function d(t,i,T){for(var _=i.skippedSegments,m=Math.max(t.startSN,i.startSN)-i.startSN,E=(t.fragmentHint?1:0)+(_?i.endSN:Math.min(t.endSN,i.endSN))-i.startSN,g=i.startSN-t.startSN,h=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments,u=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,r=m;r<=E;r++){var l=u[g+r],f=h[r];_&&!f&&r<_&&(f=i.fragments[r]=l),l&&f&&T(l,f)}}function o(t,i){var T=i.startSN+i.skippedSegments-t.startSN,_=t.fragments;if(T<0||T>=_.length)return;n(i,_[T].start)}function n(t,i){if(i){for(var T=t.fragments,_=t.skippedSegments;_<T.length;_++)T[_].start+=i;t.fragmentHint&&(t.fragmentHint.start+=i)}}function a(t,i){var T=1e3*t.levelTargetDuration,_=T/2,m=t.age,E=m>0&&m<T*3,g=i.loading.end-i.loading.start,h,u=t.availabilityDelay;if(t.updated===!1)if(E){var r=333*t.misses;h=Math.max(Math.min(_,g*2),r),t.availabilityDelay=(t.availabilityDelay||0)+h}else h=_;else E?(u=Math.min(u||T/2,m),t.availabilityDelay=u,h=u+T-m):h=T-g;return Math.round(h)}function s(t,i,T){if(!t||!t.details)return null;var _=t.details,m=_.fragments[i-_.startSN];return m||(m=_.fragmentHint,m&&m.sn===i?m:i<_.startSN&&T&&T.sn===i?T:null)}function e(t,i,T){if(!t||!t.details)return null;var _=t.details.partList;if(_)for(var m=_.length;m--;){var E=_[m];if(E.index===T&&E.fragment.sn===i)return E}return null}},"./src/controller/stream-controller.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return _});var j=I("./src/polyfills/number.ts"),C=I("./src/controller/base-stream-controller.ts"),w=I("./src/is-supported.ts"),H=I("./src/events.ts"),U=I("./src/utils/buffer-helper.ts"),R=I("./src/controller/fragment-tracker.ts"),S=I("./src/types/loader.ts"),y=I("./src/loader/fragment.ts"),v=I("./src/demux/transmuxer-interface.ts"),d=I("./src/types/transmuxer.ts"),o=I("./src/controller/gap-controller.ts"),n=I("./src/errors.ts"),a=I("./src/utils/logger.ts");function s(m,E){for(var g=0;g<E.length;g++){var h=E[g];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(m,h.key,h)}}function e(m,E,g){return E&&s(m.prototype,E),g&&s(m,g),m}function t(m,E){m.prototype=Object.create(E.prototype),m.prototype.constructor=m,i(m,E)}function i(m,E){return i=Object.setPrototypeOf||function(h,u){return h.__proto__=u,h},i(m,E)}var T=100,_=function(m){t(E,m);function E(h,u){var r;return r=m.call(this,h,u,"[stream-controller]")||this,r.audioCodecSwap=!1,r.gapController=null,r.level=-1,r._forceStartLoad=!1,r.altAudio=!1,r.audioOnly=!1,r.fragPlaying=null,r.onvplaying=null,r.onvseeked=null,r.fragLastKbps=0,r.stalled=!1,r.couldBacktrack=!1,r.audioCodecSwitch=!1,r.videoBuffer=null,r._registerListeners(),r}var g=E.prototype;return g._registerListeners=function(){var u=this.hls;u.on(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(H.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(H.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(H.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(H.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(H.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.on(H.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),u.on(H.Events.ERROR,this.onError,this),u.on(H.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),u.on(H.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),u.on(H.Events.BUFFER_CREATED,this.onBufferCreated,this),u.on(H.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),u.on(H.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),u.on(H.Events.FRAG_BUFFERED,this.onFragBuffered,this)},g._unregisterListeners=function(){var u=this.hls;u.off(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(H.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(H.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(H.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(H.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.off(H.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),u.off(H.Events.ERROR,this.onError,this),u.off(H.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),u.off(H.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),u.off(H.Events.BUFFER_CREATED,this.onBufferCreated,this),u.off(H.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),u.off(H.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),u.off(H.Events.FRAG_BUFFERED,this.onFragBuffered,this)},g.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},g.startLoad=function(u){if(this.levels){var r=this.lastCurrentTime,l=this.hls;if(this.stopLoad(),this.setInterval(T),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var f=l.startLevel;f===-1&&(l.config.testBandwidth?(f=0,this.bitrateTest=!0):f=l.nextAutoLevel),this.level=l.nextLoadLevel=f,this.loadedmetadata=!1}r>0&&u===-1&&(this.log("Override startPosition with lastCurrentTime @"+r.toFixed(3)),u=r),this.state=C.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=u,this.tick()}else this._forceStartLoad=!0,this.state=C.State.STOPPED},g.stopLoad=function(){this._forceStartLoad=!1,m.prototype.stopLoad.call(this)},g.doTick=function(){switch(this.state){case C.State.IDLE:this.doTickIdle();break;case C.State.WAITING_LEVEL:{var u,r=this.levels,l=this.level,f=r==null||((u=r[l])===null||u===void 0)?void 0:u.details;if(f&&(!f.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(f))break;this.state=C.State.IDLE;break}break}case C.State.FRAG_LOADING_WAITING_RETRY:{var c,x=self.performance.now(),D=this.retryDate;(!D||x>=D||(c=this.media)!==null&&c!==void 0&&c.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=C.State.IDLE)}break;default:break}this.onTickEnd()},g.onTickEnd=function(){m.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},g.doTickIdle=function(){var u,r,l=this.hls,f=this.levelLastLoaded,c=this.levels,x=this.media,D=l.config,A=l.nextLoadLevel;if(f===null||!x&&(this.startFragRequested||!D.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!c||!c[A])return;var B=c[A];this.level=l.nextLoadLevel=A;var O=B.details;if(!O||this.state===C.State.WAITING_LEVEL||O.live&&this.levelLastLoaded!==A){this.state=C.State.WAITING_LEVEL;return}var W=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:x,S.PlaylistLevelType.MAIN);if(W===null)return;var P=W.len,G=this.getMaxBufferLength(B.maxBitrate);if(P>=G)return;if(this._streamEnded(W,O)){var Q={};this.altAudio&&(Q.type="video"),this.hls.trigger(H.Events.BUFFER_EOS,Q),this.state=C.State.ENDED;return}var re=W.end,le=this.getNextFragment(re,O);if(this.couldBacktrack&&!this.fragPrevious&&le&&le.sn!=="initSegment"){var Ee=le.sn-O.startSN;Ee>1&&(le=O.fragments[Ee-1],this.fragmentTracker.removeFragment(le))}if(le&&this.fragmentTracker.getState(le)===R.FragmentState.OK&&this.nextLoadPosition>re){var _e=this.audioOnly&&!this.altAudio?y.ElementaryStreamTypes.AUDIO:y.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(x,_e,S.PlaylistLevelType.MAIN),le=this.getNextFragment(this.nextLoadPosition,O)}if(!le)return;le.initSegment&&!le.initSegment.data&&!this.bitrateTest&&(le=le.initSegment),((u=le.decryptdata)===null||u===void 0?void 0:u.keyFormat)==="identity"&&!((r=le.decryptdata)!==null&&r!==void 0&&r.key)?this.loadKey(le,O):this.loadFragment(le,O,re)},g.loadFragment=function(u,r,l){var f,c=this.fragmentTracker.getState(u);if(this.fragCurrent=u,c===R.FragmentState.BACKTRACKED){var x=this.fragmentTracker.getBacktrackData(u);if(x){this._handleFragmentLoadProgress(x),this._handleFragmentLoadComplete(x);return}else c=R.FragmentState.NOT_LOADED}c===R.FragmentState.NOT_LOADED||c===R.FragmentState.PARTIAL?u.sn==="initSegment"?this._loadInitSegment(u):this.bitrateTest?(u.bitrateTest=!0,this.log("Fragment "+u.sn+" of level "+u.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(u)):(this.startFragRequested=!0,m.prototype.loadFragment.call(this,u,r,l)):c===R.FragmentState.APPENDING?this.reduceMaxBufferLength(u.duration)&&this.fragmentTracker.removeFragment(u):((f=this.media)===null||f===void 0?void 0:f.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},g.getAppendedFrag=function(u){var r=this.fragmentTracker.getAppendedFrag(u,S.PlaylistLevelType.MAIN);return r&&"fragment"in r?r.fragment:r},g.getBufferedFrag=function(u){return this.fragmentTracker.getBufferedFrag(u,S.PlaylistLevelType.MAIN)},g.followingBufferedFrag=function(u){return u?this.getBufferedFrag(u.end+.5):null},g.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},g.nextLevelSwitch=function(){var u=this.levels,r=this.media;if(r!=null&&r.readyState){var l,f=this.getAppendedFrag(r.currentTime);if(f&&f.start>1&&this.flushMainBuffer(0,f.start-1),!r.paused&&u){var c=this.hls.nextLoadLevel,x=u[c],D=this.fragLastKbps;D&&this.fragCurrent?l=this.fragCurrent.duration*x.maxBitrate/(1e3*D)+1:l=0}else l=0;var A=this.getBufferedFrag(r.currentTime+l);if(A){var B=this.followingBufferedFrag(A);if(B){this.abortCurrentFrag();var O=B.maxStartPTS?B.maxStartPTS:B.start,W=B.duration,P=Math.max(A.end,O+Math.min(Math.max(W-this.config.maxFragLookUpTolerance,W*.5),W*.75));this.flushMainBuffer(P,Number.POSITIVE_INFINITY)}}}},g.abortCurrentFrag=function(){var u=this.fragCurrent;this.fragCurrent=null,u!=null&&u.loader&&u.loader.abort(),this.state===C.State.KEY_LOADING&&(this.state=C.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},g.flushMainBuffer=function(u,r){m.prototype.flushMainBuffer.call(this,u,r,this.altAudio?"video":null)},g.onMediaAttached=function(u,r){m.prototype.onMediaAttached.call(this,u,r);var l=r.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),l.addEventListener("playing",this.onvplaying),l.addEventListener("seeked",this.onvseeked),this.gapController=new o.default(this.config,l,this.fragmentTracker,this.hls)},g.onMediaDetaching=function(){var u=this.media;u&&(u.removeEventListener("playing",this.onvplaying),u.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),m.prototype.onMediaDetaching.call(this)},g.onMediaPlaying=function(){this.tick()},g.onMediaSeeked=function(){var u=this.media,r=u?u.currentTime:null;Object(j.isFiniteNumber)(r)&&this.log("Media seeked to "+r.toFixed(3)),this.tick()},g.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(H.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},g.onManifestParsed=function(u,r){var l=!1,f=!1,c;r.levels.forEach(function(x){c=x.audioCodec,c&&(c.indexOf("mp4a.40.2")!==-1&&(l=!0),c.indexOf("mp4a.40.5")!==-1&&(f=!0))}),this.audioCodecSwitch=l&&f&&!Object(w.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=r.levels,this.startFragRequested=!1},g.onLevelLoading=function(u,r){var l=this.levels;if(!l||this.state!==C.State.IDLE)return;var f=l[r.level];(!f.details||f.details.live&&this.levelLastLoaded!==r.level||this.waitForCdnTuneIn(f.details))&&(this.state=C.State.WAITING_LEVEL)},g.onLevelLoaded=function(u,r){var l,f=this.levels,c=r.level,x=r.details,D=x.totalduration;if(!f){this.warn("Levels were reset while loading level "+c);return}this.log("Level "+c+" loaded ["+x.startSN+","+x.endSN+"], cc ["+x.startCC+", "+x.endCC+"] duration:"+D);var A=this.fragCurrent;A&&(this.state===C.State.FRAG_LOADING||this.state===C.State.FRAG_LOADING_WAITING_RETRY)&&(A.level!==r.level&&A.loader&&(this.state=C.State.IDLE,A.loader.abort()));var B=f[c],O=0;if(x.live||(l=B.details)!==null&&l!==void 0&&l.live){if(x.fragments[0]||(x.deltaUpdateFailed=!0),x.deltaUpdateFailed)return;O=this.alignPlaylists(x,B.details)}if(B.details=x,this.levelLastLoaded=c,this.hls.trigger(H.Events.LEVEL_UPDATED,{details:x,level:c}),this.state===C.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(x))return;this.state=C.State.IDLE}this.startFragRequested?x.live&&this.synchronizeToLiveEdge(x):this.setStartPosition(x,O),this.tick()},g._handleFragmentLoadProgress=function(u){var r,l=u.frag,f=u.part,c=u.payload,x=this.levels;if(!x){this.warn("Levels were reset while fragment load was in progress. Fragment "+l.sn+" of level "+l.level+" will not be buffered");return}var D=x[l.level],A=D.details;if(!A){this.warn("Dropping fragment "+l.sn+" of level "+l.level+" after level details were reset");return}var B=D.videoCodec,O=A.PTSKnown||!A.live,W=(r=l.initSegment)===null||r===void 0?void 0:r.data,P=this._getAudioCodec(D),G=this.transmuxer=this.transmuxer||new v.default(this.hls,S.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),Q=f?f.index:-1,re=Q!==-1,le=new d.ChunkMetadata(l.level,l.sn,l.stats.chunkCount,c.byteLength,Q,re),Ee=this.initPTS[l.cc];G.push(c,W,P,B,l,f,A.totalduration,O,le,Ee)},g.onAudioTrackSwitching=function(u,r){var l=this.altAudio,f=!!r.url,c=r.id;if(!f){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var x=this.fragCurrent;x!=null&&x.loader&&(this.log("Switching to main audio track, cancel main fragment load"),x.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var D=this.hls;l&&D.trigger(H.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),D.trigger(H.Events.AUDIO_TRACK_SWITCHED,{id:c})}},g.onAudioTrackSwitched=function(u,r){var l=r.id,f=!!this.hls.audioTracks[l].url;if(f){var c=this.videoBuffer;c&&this.mediaBuffer!==c&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=c)}this.altAudio=f,this.tick()},g.onBufferCreated=function(u,r){var l=r.tracks,f,c,x=!1;for(var D in l){var A=l[D];if(A.id==="main"){if(c=D,f=A,D==="video"){var B=l[D];B&&(this.videoBuffer=B.buffer)}}else x=!0}x&&f?(this.log("Alternate track found, use "+c+".buffered to schedule main fragment loading"),this.mediaBuffer=f.buffer):this.mediaBuffer=this.media},g.onFragBuffered=function(u,r){var l=r.frag,f=r.part;if(l&&l.type!==S.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(l)){this.warn("Fragment "+l.sn+(f?" p: "+f.index:"")+" of level "+l.level+" finished buffering, but was aborted. state: "+this.state),this.state===C.State.PARSED&&(this.state=C.State.IDLE);return}var c=f?f.stats:l.stats;this.fragLastKbps=Math.round(8*c.total/(c.buffering.end-c.loading.first)),l.sn!=="initSegment"&&(this.fragPrevious=l),this.fragBufferedComplete(l,f)},g.onError=function(u,r){switch(r.details){case n.ErrorDetails.FRAG_LOAD_ERROR:case n.ErrorDetails.FRAG_LOAD_TIMEOUT:case n.ErrorDetails.KEY_LOAD_ERROR:case n.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(S.PlaylistLevelType.MAIN,r);break;case n.ErrorDetails.LEVEL_LOAD_ERROR:case n.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==C.State.ERROR&&(r.fatal?(this.warn(""+r.details),this.state=C.State.ERROR):!r.levelRetry&&this.state===C.State.WAITING_LEVEL&&(this.state=C.State.IDLE));break;case n.ErrorDetails.BUFFER_FULL_ERROR:if(r.parent==="main"&&(this.state===C.State.PARSING||this.state===C.State.PARSED)){var l=!0,f=this.getFwdBufferInfo(this.media,S.PlaylistLevelType.MAIN);f&&f.len>.5&&(l=!this.reduceMaxBufferLength(f.len)),l&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},g.checkBuffer=function(){var u=this.media,r=this.gapController;if(!u||!r||!u.readyState)return;var l=U.BufferHelper.getBuffered(u);!this.loadedmetadata&&l.length?(this.loadedmetadata=!0,this.seekToStartPos()):r.poll(this.lastCurrentTime),this.lastCurrentTime=u.currentTime},g.onFragLoadEmergencyAborted=function(){this.state=C.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},g.onBufferFlushed=function(u,r){var l=r.type;if(l!==y.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var f=(l===y.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(f,l,S.PlaylistLevelType.MAIN)}},g.onLevelsUpdated=function(u,r){this.levels=r.levels},g.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},g.seekToStartPos=function(){var u=this.media,r=u.currentTime,l=this.startPosition;if(l>=0&&r<l){if(u.seeking){a.logger.log("could not seek to "+l+", already seeking at "+r);return}var f=U.BufferHelper.getBuffered(u),c=f.length?f.start(0):0,x=c-l;x>0&&(x<this.config.maxBufferHole||x<this.config.maxFragLookUpTolerance)&&(a.logger.log("adjusting start position by "+x+" to match buffer start"),l+=x,this.startPosition=l),this.log("seek to target start position "+l+" from current time "+r),u.currentTime=l}},g._getAudioCodec=function(u){var r=this.config.defaultAudioCodec||u.audioCodec;return this.audioCodecSwap&&r&&(this.log("Swapping audio codec"),r.indexOf("mp4a.40.5")!==-1?r="mp4a.40.2":r="mp4a.40.5"),r},g._loadBitrateTestFrag=function(u){var r=this;this._doFragLoad(u).then(function(l){var f=r.hls;if(!l||f.nextLoadLevel||r.fragContextChanged(u))return;r.fragLoadError=0,r.state=C.State.IDLE,r.startFragRequested=!1,r.bitrateTest=!1;var c=u.stats;c.parsing.start=c.parsing.end=c.buffering.start=c.buffering.end=self.performance.now(),f.trigger(H.Events.FRAG_LOADED,l)})},g._handleTransmuxComplete=function(u){var r,l="main",f=this.hls,c=u.remuxResult,x=u.chunkMeta,D=this.getCurrentContext(x);if(!D){this.warn("The loading context changed while buffering fragment "+x.sn+" of level "+x.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(x.level);return}var A=D.frag,B=D.part,O=D.level,W=c.video,P=c.text,G=c.id3,Q=c.initSegment,re=this.altAudio?void 0:c.audio;if(this.fragContextChanged(A))return;if(this.state=C.State.PARSING,Q){Q.tracks&&(this._bufferInitSegment(O,Q.tracks,A,x),f.trigger(H.Events.FRAG_PARSING_INIT_SEGMENT,{frag:A,id:l,tracks:Q.tracks}));var le=Q.initPTS,Ee=Q.timescale;Object(j.isFiniteNumber)(le)&&(this.initPTS[A.cc]=le,f.trigger(H.Events.INIT_PTS_FOUND,{frag:A,id:l,initPTS:le,timescale:Ee}))}if(W&&c.independent!==!1){if(O.details){var _e=W.startPTS,ne=W.endPTS,Te=W.startDTS,Ae=W.endDTS;if(B)B.elementaryStreams[W.type]={startPTS:_e,endPTS:ne,startDTS:Te,endDTS:Ae};else if(W.firstKeyFrame&&W.independent&&(this.couldBacktrack=!0),W.dropped&&W.independent){var fe=this.getLoadPosition()+this.config.maxBufferHole;if(fe<_e){this.backtrack(A);return}A.setElementaryStreamInfo(W.type,A.start,ne,A.start,Ae,!0)}A.setElementaryStreamInfo(W.type,_e,ne,Te,Ae),this.bufferFragmentData(W,A,B,x)}}else if(c.independent===!1){this.backtrack(A);return}if(re){var J=re.startPTS,Ie=re.endPTS,it=re.startDTS,et=re.endDTS;B&&(B.elementaryStreams[y.ElementaryStreamTypes.AUDIO]={startPTS:J,endPTS:Ie,startDTS:it,endDTS:et}),A.setElementaryStreamInfo(y.ElementaryStreamTypes.AUDIO,J,Ie,it,et),this.bufferFragmentData(re,A,B,x)}if(G!=null&&(r=G.samples)!==null&&r!==void 0&&r.length){var Qe={frag:A,id:l,samples:G.samples};f.trigger(H.Events.FRAG_PARSING_METADATA,Qe)}if(P){var nt={frag:A,id:l,samples:P.samples};f.trigger(H.Events.FRAG_PARSING_USERDATA,nt)}},g._bufferInitSegment=function(u,r,l,f){var c=this;if(this.state!==C.State.PARSING)return;this.audioOnly=!!r.audio&&!r.video,this.altAudio&&!this.audioOnly&&delete r.audio;var x=r.audio,D=r.video,A=r.audiovideo;if(x){var B=u.audioCodec,O=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(B&&(B.indexOf("mp4a.40.5")!==-1?B="mp4a.40.2":B="mp4a.40.5"),x.metadata.channelCount!==1&&O.indexOf("firefox")===-1&&(B="mp4a.40.5")),O.indexOf("android")!==-1&&x.container!=="audio/mpeg"&&(B="mp4a.40.2",this.log("Android: force audio codec to "+B)),u.audioCodec&&u.audioCodec!==B&&this.log('Swapping manifest audio codec "'+u.audioCodec+'" for "'+B+'"'),x.levelCodec=B,x.id="main",this.log("Init audio buffer, container:"+x.container+", codecs[selected/level/parsed]=["+(B||"")+"/"+(u.audioCodec||"")+"/"+x.codec+"]")}D&&(D.levelCodec=u.videoCodec,D.id="main",this.log("Init video buffer, container:"+D.container+", codecs[level/parsed]=["+(u.videoCodec||"")+"/"+D.codec+"]")),A&&this.log("Init audiovideo buffer, container:"+A.container+", codecs[level/parsed]=["+(u.attrs.CODECS||"")+"/"+A.codec+"]"),this.hls.trigger(H.Events.BUFFER_CODECS,r),Object.keys(r).forEach(function(W){var P=r[W],G=P.initSegment;G!=null&&G.byteLength&&c.hls.trigger(H.Events.BUFFER_APPENDING,{type:W,data:G,frag:l,part:null,chunkMeta:f,parent:l.type})}),this.tick()},g.backtrack=function(u){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(u);var r=this.fragmentTracker.backtrack(u);this.fragPrevious=null,this.nextLoadPosition=u.start,r?this.resetFragmentLoading(u):this.state=C.State.BACKTRACKING},g.checkFragmentChanged=function(){var u=this.media,r=null;if(u&&u.readyState>1&&u.seeking===!1){var l=u.currentTime;if(U.BufferHelper.isBuffered(u,l)?r=this.getAppendedFrag(l):U.BufferHelper.isBuffered(u,l+.1)&&(r=this.getAppendedFrag(l+.1)),r){var f=this.fragPlaying,c=r.level;(!f||r.sn!==f.sn||f.level!==c||r.urlId!==f.urlId)&&(this.hls.trigger(H.Events.FRAG_CHANGED,{frag:r}),(!f||f.level!==c)&&this.hls.trigger(H.Events.LEVEL_SWITCHED,{level:c}),this.fragPlaying=r)}}},e(E,[{key:"nextLevel",get:function(){var u=this.nextBufferedFrag;return u?u.level:-1}},{key:"currentLevel",get:function(){var u=this.media;if(u){var r=this.getAppendedFrag(u.currentTime);if(r)return r.level}return-1}},{key:"nextBufferedFrag",get:function(){var u=this.media;if(u){var r=this.getAppendedFrag(u.currentTime);return this.followingBufferedFrag(r)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),E}(C.default)},"./src/controller/subtitle-stream-controller.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"SubtitleStreamController",function(){return t});var j=I("./src/events.ts"),C=I("./src/utils/logger.ts"),w=I("./src/utils/buffer-helper.ts"),H=I("./src/controller/fragment-finders.ts"),U=I("./src/utils/discontinuities.ts"),R=I("./src/controller/level-helper.ts"),S=I("./src/controller/fragment-tracker.ts"),y=I("./src/controller/base-stream-controller.ts"),v=I("./src/types/loader.ts"),d=I("./src/types/level.ts");function o(i,T){for(var _=0;_<T.length;_++){var m=T[_];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(i,m.key,m)}}function n(i,T,_){return T&&o(i.prototype,T),_&&o(i,_),i}function a(i,T){i.prototype=Object.create(T.prototype),i.prototype.constructor=i,s(i,T)}function s(i,T){return s=Object.setPrototypeOf||function(m,E){return m.__proto__=E,m},s(i,T)}var e=500,t=function(i){a(T,i);function T(m,E){var g;return g=i.call(this,m,E,"[subtitle-stream-controller]")||this,g.levels=[],g.currentTrackId=-1,g.tracksBuffered=[],g.mainDetails=null,g._registerListeners(),g}var _=T.prototype;return _.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},_._registerListeners=function(){var E=this.hls;E.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(j.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(j.Events.ERROR,this.onError,this),E.on(j.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),E.on(j.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),E.on(j.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),E.on(j.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),E.on(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},_._unregisterListeners=function(){var E=this.hls;E.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(j.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(j.Events.ERROR,this.onError,this),E.off(j.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),E.off(j.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),E.off(j.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),E.off(j.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),E.off(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},_.startLoad=function(){this.stopLoad(),this.state=y.State.IDLE,this.setInterval(e),this.tick()},_.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},_.onLevelLoaded=function(E,g){this.mainDetails=g.details},_.onSubtitleFragProcessed=function(E,g){var h=g.frag,u=g.success;if(this.fragPrevious=h,this.state=y.State.IDLE,!u)return;var r=this.tracksBuffered[this.currentTrackId];if(!r)return;for(var l,f=h.start,c=0;c<r.length;c++)if(f>=r[c].start&&f<=r[c].end){l=r[c];break}var x=h.start+h.duration;l?l.end=x:(l={start:f,end:x},r.push(l)),this.fragmentTracker.fragBuffered(h)},_.onBufferFlushing=function(E,g){var h=g.startOffset,u=g.endOffset;if(h===0&&u!==Number.POSITIVE_INFINITY){var r=this.currentTrackId,l=this.levels;if(!l.length||!l[r]||!l[r].details)return;var f=l[r].details,c=f.targetduration,x=u-c;if(x<=0)return;g.endOffsetSubtitles=Math.max(0,x),this.tracksBuffered.forEach(function(D){for(var A=0;A<D.length;){if(D[A].end<=x){D.shift();continue}else if(D[A].start<x)D[A].start=x;else break;A++}}),this.fragmentTracker.removeFragmentsInRange(h,x,v.PlaylistLevelType.SUBTITLE)}},_.onError=function(E,g){var h,u=g.frag;if(!u||u.type!==v.PlaylistLevelType.SUBTITLE)return;(h=this.fragCurrent)!==null&&h!==void 0&&h.loader&&this.fragCurrent.loader.abort(),this.state=y.State.IDLE},_.onSubtitleTracksUpdated=function(E,g){var h=this,u=g.subtitleTracks;this.tracksBuffered=[],this.levels=u.map(function(r){return new d.Level(r)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(r){h.tracksBuffered[r.id]=[]}),this.mediaBuffer=null},_.onSubtitleTrackSwitch=function(E,g){if(this.currentTrackId=g.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var h=this.levels[this.currentTrackId];h!=null&&h.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,h&&this.setInterval(e)},_.onSubtitleTrackLoaded=function(E,g){var h,u=g.details,r=g.id,l=this.currentTrackId,f=this.levels;if(!f.length)return;var c=f[l];if(r>=f.length||r!==l||!c)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,u.live||(h=c.details)!==null&&h!==void 0&&h.live){var x=this.mainDetails;if(u.deltaUpdateFailed||!x)return;var D=x.fragments[0];if(!c.details)u.hasProgramDateTime&&x.hasProgramDateTime?Object(U.alignMediaPlaylistByPDT)(u,x):D&&Object(R.addSliding)(u,D.start);else{var A=this.alignPlaylists(u,c.details);A===0&&D&&Object(R.addSliding)(u,D.start)}}if(c.details=u,this.levelLastLoaded=r,this.tick(),u.live&&!this.fragCurrent&&this.media&&this.state===y.State.IDLE){var B=Object(H.findFragmentByPTS)(null,u.fragments,this.media.currentTime,0);B||(this.warn("Subtitle playlist not aligned with playback"),c.details=void 0)}},_._handleFragmentLoadComplete=function(E){var g=E.frag,h=E.payload,u=g.decryptdata,r=this.hls;if(this.fragContextChanged(g))return;if(h&&h.byteLength>0&&u&&u.key&&u.iv&&u.method==="AES-128"){var l=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(h),u.key.buffer,u.iv.buffer).then(function(f){var c=performance.now();r.trigger(j.Events.FRAG_DECRYPTED,{frag:g,payload:f,stats:{tstart:l,tdecrypt:c}})})}},_.doTick=function(){if(!this.media){this.state=y.State.IDLE;return}if(this.state===y.State.IDLE){var E,g=this.currentTrackId,h=this.levels;if(!h.length||!h[g]||!h[g].details)return;var u=h[g].details,r=u.targetduration,l=this.config,f=this.media,c=w.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,f.currentTime-r,l.maxBufferHole),x=c.end,D=c.len,A=this.getMaxBufferLength()+r;if(D>A)return;console.assert(u,"Subtitle track details are defined on idle subtitle stream controller tick");var B=u.fragments,O=B.length,W=u.edge,P,G=this.fragPrevious;if(x<W){var Q=l.maxFragLookUpTolerance;G&&u.hasProgramDateTime&&(P=Object(H.findFragmentByPDT)(B,G.endProgramDateTime,Q)),P||(P=Object(H.findFragmentByPTS)(G,B,x,Q),!P&&G&&G.start<B[0].start&&(P=B[0]))}else P=B[O-1];(E=P)!==null&&E!==void 0&&E.encrypted?(C.logger.log("Loading key for "+P.sn),this.state=y.State.KEY_LOADING,this.hls.trigger(j.Events.KEY_LOADING,{frag:P})):P&&this.fragmentTracker.getState(P)===S.FragmentState.NOT_LOADED&&this.loadFragment(P,u,x)}},_.loadFragment=function(E,g,h){this.fragCurrent=E,i.prototype.loadFragment.call(this,E,g,h)},n(T,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),T}(y.default)},"./src/controller/subtitle-track-controller.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/events.ts"),C=I("./src/utils/texttrack-utils.ts"),w=I("./src/controller/base-playlist-controller.ts"),H=I("./src/types/loader.ts");function U(o,n){for(var a=0;a<n.length;a++){var s=n[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}function R(o,n,a){return n&&U(o.prototype,n),a&&U(o,a),o}function S(o,n){o.prototype=Object.create(n.prototype),o.prototype.constructor=o,y(o,n)}function y(o,n){return y=Object.setPrototypeOf||function(s,e){return s.__proto__=e,s},y(o,n)}var v=function(o){S(n,o);function n(s){var e;return e=o.call(this,s,"[subtitle-track-controller]")||this,e.media=null,e.tracks=[],e.groupId=null,e.tracksInGroup=[],e.trackId=-1,e.selectDefaultTrack=!0,e.queuedDefaultTrack=-1,e.trackChangeListener=function(){return e.onTextTracksChanged()},e.asyncPollTrackChange=function(){return e.pollTrackChange(0)},e.useTextTrackPolling=!1,e.subtitlePollingInterval=-1,e.subtitleDisplay=!0,e.registerListeners(),e}var a=n.prototype;return a.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,o.prototype.destroy.call(this)},a.registerListeners=function(){var e=this.hls;e.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(j.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(j.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(j.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(j.Events.ERROR,this.onError,this)},a.unregisterListeners=function(){var e=this.hls;e.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(j.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(j.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(j.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(j.Events.ERROR,this.onError,this)},a.onMediaAttached=function(e,t){if(this.media=t.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},a.pollTrackChange=function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},a.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var e=d(this.media.textTracks);e.forEach(function(t){Object(C.clearCurrentCues)(t)}),this.subtitleTrack=-1,this.media=null},a.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},a.onManifestParsed=function(e,t){this.tracks=t.subtitleTracks},a.onSubtitleTrackLoaded=function(e,t){var i=t.id,T=t.details,_=this.trackId,m=this.tracksInGroup[_];if(!m){this.warn("Invalid subtitle track id "+i);return}var E=m.details;m.details=t.details,this.log("subtitle track "+i+" loaded ["+T.startSN+"-"+T.endSN+"]"),i===this.trackId&&(this.retryCount=0,this.playlistLoaded(i,t,E))},a.onLevelLoading=function(e,t){this.switchLevel(t.level)},a.onLevelSwitching=function(e,t){this.switchLevel(t.level)},a.switchLevel=function(e){var t=this.hls.levels[e];if(!(t!=null&&t.textGroupIds))return;var i=t.textGroupIds[t.urlId];if(this.groupId!==i){var T=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,_=this.tracks.filter(function(g){return!i||g.groupId===i});this.tracksInGroup=_;var m=this.findTrackId(T==null?void 0:T.name)||this.findTrackId();this.groupId=i;var E={subtitleTracks:_};this.log("Updating subtitle tracks, "+_.length+' track(s) found in "'+i+'" group-id'),this.hls.trigger(j.Events.SUBTITLE_TRACKS_UPDATED,E),m!==-1&&this.setSubtitleTrack(m,T)}},a.findTrackId=function(e){for(var t=this.tracksInGroup,i=0;i<t.length;i++){var T=t[i];if((!this.selectDefaultTrack||T.default)&&(!e||e===T.name))return T.id}return-1},a.onError=function(e,t){if(o.prototype.onError.call(this,e,t),t.fatal||!t.context)return;t.context.type===H.PlaylistContextType.SUBTITLE_TRACK&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&this.retryLoadingOrFail(t)},a.loadPlaylist=function(e){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var i=t.id,T=t.groupId,_=t.url;if(e)try{_=e.addDirectives(_)}catch(m){this.warn("Could not construct new URL with HLS Delivery Directives: "+m)}this.log("Loading subtitle playlist for id "+i),this.hls.trigger(j.Events.SUBTITLE_TRACK_LOADING,{url:_,id:i,groupId:T,deliveryDirectives:e||null})}},a.toggleTrackModes=function(e){var t=this,i=this.media,T=this.subtitleDisplay,_=this.trackId;if(!i)return;var m=d(i.textTracks),E=m.filter(function(u){return u.groupId===t.groupId});if(e===-1)[].slice.call(m).forEach(function(u){u.mode="disabled"});else{var g=E[_];g&&(g.mode="disabled")}var h=E[e];h&&(h.mode=T?"showing":"hidden")},a.setSubtitleTrack=function(e,t){var i,T=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(this.trackId!==e&&this.toggleTrackModes(e),this.trackId===e&&(e===-1||(i=T[e])!==null&&i!==void 0&&i.details)||e<-1||e>=T.length)return;this.clearTimer();var _=T[e];if(this.log("Switching to subtitle track "+e),this.trackId=e,_){var m=_.id,E=_.groupId,g=E===void 0?"":E,h=_.name,u=_.type,r=_.url;this.hls.trigger(j.Events.SUBTITLE_TRACK_SWITCH,{id:m,groupId:g,name:h,type:u,url:r});var l=this.switchParams(_.url,t==null?void 0:t.details);this.loadPlaylist(l)}else this.hls.trigger(j.Events.SUBTITLE_TRACK_SWITCH,{id:e})},a.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var e=-1,t=d(this.media.textTracks),i=0;i<t.length;i++)if(t[i].mode==="hidden")e=i;else if(t[i].mode==="showing"){e=i;break}this.subtitleTrack!==e&&(this.subtitleTrack=e)},R(n,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1;var t=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(e,t)}}]),n}(w.default);function d(o){for(var n=[],a=0;a<o.length;a++){var s=o[a];s.kind==="subtitles"&&s.label&&n.push(o[a])}return n}L.default=v},"./src/controller/timeline-controller.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"TimelineController",function(){return d});var j=I("./src/polyfills/number.ts"),C=I("./src/events.ts"),w=I("./src/utils/cea-608-parser.ts"),H=I("./src/utils/output-filter.ts"),U=I("./src/utils/webvtt-parser.ts"),R=I("./src/utils/texttrack-utils.ts"),S=I("./src/utils/imsc1-ttml-parser.ts"),y=I("./src/types/loader.ts"),v=I("./src/utils/logger.ts"),d=function(){function s(t){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=a(),this.captionsProperties=void 0,this.hls=t,this.config=t.config,this.Cues=t.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var i=new H.default(this,"textTrack1"),T=new H.default(this,"textTrack2"),_=new H.default(this,"textTrack3"),m=new H.default(this,"textTrack4");this.cea608Parser1=new w.default(1,i,T),this.cea608Parser2=new w.default(3,_,m)}t.on(C.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(C.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(C.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(C.Events.FRAG_LOADING,this.onFragLoading,this),t.on(C.Events.FRAG_LOADED,this.onFragLoaded,this),t.on(C.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.on(C.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.on(C.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(C.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.on(C.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var e=s.prototype;return e.destroy=function(){var i=this.hls;i.off(C.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(C.Events.MANIFEST_LOADED,this.onManifestLoaded,this),i.off(C.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),i.off(C.Events.FRAG_LOADING,this.onFragLoading,this),i.off(C.Events.FRAG_LOADED,this.onFragLoaded,this),i.off(C.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),i.off(C.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),i.off(C.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),i.off(C.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),i.off(C.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},e.addCues=function(i,T,_,m,E){for(var g=!1,h=E.length;h--;){var u=E[h],r=n(u[0],u[1],T,_);if(r>=0&&(u[0]=Math.min(u[0],T),u[1]=Math.max(u[1],_),g=!0,r/(_-T)>.5))return}if(g||E.push([T,_]),this.config.renderTextTracksNatively){var l=this.captionsTracks[i];this.Cues.newCue(l,T,_,m)}else{var f=this.Cues.newCue(null,T,_,m);this.hls.trigger(C.Events.CUES_PARSED,{type:"captions",cues:f,track:i})}},e.onInitPtsFound=function(i,T){var _=this,m=T.frag,E=T.id,g=T.initPTS,h=T.timescale,u=this.unparsedVttFrags;E==="main"&&(this.initPTS[m.cc]=g,this.timescale[m.cc]=h),u.length&&(this.unparsedVttFrags=[],u.forEach(function(r){_.onFragLoaded(C.Events.FRAG_LOADED,r)}))},e.getExistingTrack=function(i){var T=this.media;if(T)for(var _=0;_<T.textTracks.length;_++){var m=T.textTracks[_];if(m[i])return m}return null},e.createCaptionsTrack=function(i){this.config.renderTextTracksNatively?this.createNativeTrack(i):this.createNonNativeTrack(i)},e.createNativeTrack=function(i){if(this.captionsTracks[i])return;var T=this.captionsProperties,_=this.captionsTracks,m=this.media,E=T[i],g=E.label,h=E.languageCode,u=this.getExistingTrack(i);if(u)_[i]=u,Object(R.clearCurrentCues)(_[i]),Object(R.sendAddTrackEvent)(_[i],m);else{var r=this.createTextTrack("captions",g,h);r&&(r[i]=!0,_[i]=r)}},e.createNonNativeTrack=function(i){if(this.nonNativeCaptionsTracks[i])return;var T=this.captionsProperties[i];if(!T)return;var _=T.label,m={_id:i,label:_,kind:"captions",default:T.media?!!T.media.default:!1,closedCaptions:T.media};this.nonNativeCaptionsTracks[i]=m,this.hls.trigger(C.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[m]})},e.createTextTrack=function(i,T,_){var m=this.media;return m?m.addTextTrack(i,T,_):void 0},e.onMediaAttaching=function(i,T){this.media=T.media,this._cleanTracks()},e.onMediaDetaching=function(){var i=this.captionsTracks;Object.keys(i).forEach(function(T){Object(R.clearCurrentCues)(i[T]),delete i[T]}),this.nonNativeCaptionsTracks={}},e.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=a(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},e._cleanTracks=function(){var i=this.media;if(!i)return;var T=i.textTracks;if(T)for(var _=0;_<T.length;_++)Object(R.clearCurrentCues)(T[_])},e.onSubtitleTracksUpdated=function(i,T){var _=this;this.textTracks=[];var m=T.subtitleTracks||[],E=m.some(function(r){return r.textCodec===S.IMSC1_CODEC});if(this.config.enableWebVTT||E&&this.config.enableIMSC1){var g=this.tracks&&m&&this.tracks.length===m.length;if(this.tracks=m||[],this.config.renderTextTracksNatively){var h=this.media?this.media.textTracks:[];this.tracks.forEach(function(r,l){var f;if(l<h.length){for(var c=null,x=0;x<h.length;x++)if(o(h[x],r)){c=h[x];break}c&&(f=c)}f?Object(R.clearCurrentCues)(f):(f=_.createTextTrack("subtitles",r.name,r.lang),f&&(f.mode="disabled")),f&&(f.groupId=r.groupId,_.textTracks.push(f))})}else if(!g&&this.tracks&&this.tracks.length){var u=this.tracks.map(function(r){return{label:r.name,kind:r.type.toLowerCase(),default:r.default,subtitleTrack:r}});this.hls.trigger(C.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:u})}}},e.onManifestLoaded=function(i,T){var _=this;this.config.enableCEA708Captions&&T.captions&&T.captions.forEach(function(m){var E=/(?:CC|SERVICE)([1-4])/.exec(m.instreamId);if(!E)return;var g="textTrack"+E[1],h=_.captionsProperties[g];if(!h)return;h.label=m.name,m.lang&&(h.languageCode=m.lang),h.media=m})},e.onFragLoading=function(i,T){var _=this.cea608Parser1,m=this.cea608Parser2,E=this.lastSn,g=this.lastPartIndex;if(!this.enabled||!(_&&m))return;if(T.frag.type===y.PlaylistLevelType.MAIN){var h,u,r=T.frag.sn,l=(h=T==null||((u=T.part)===null||u===void 0)?void 0:u.index)!=null?h:-1;r===E+1||r===E&&l===g+1||(_.reset(),m.reset()),this.lastSn=r,this.lastPartIndex=l}},e.onFragLoaded=function(i,T){var _=T.frag,m=T.payload,E=this.initPTS,g=this.unparsedVttFrags;if(_.type===y.PlaylistLevelType.SUBTITLE)if(m.byteLength){if(!Object(j.isFiniteNumber)(E[_.cc])){g.push(T),E.length&&this.hls.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:_,error:new Error("Missing initial subtitle PTS")});return}var h=_.decryptdata;if(h==null||h.key==null||h.method!=="AES-128"){var u=this.tracks[_.level],r=this.vttCCs;r[_.cc]||(r[_.cc]={start:_.start,prevCC:this.prevCC,new:!0},this.prevCC=_.cc),u&&u.textCodec===S.IMSC1_CODEC?this._parseIMSC1(_,m):this._parseVTTs(_,m,r)}}else this.hls.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:_,error:new Error("Empty subtitle payload")})},e._parseIMSC1=function(i,T){var _=this,m=this.hls;Object(S.parseIMSC1)(T,this.initPTS[i.cc],this.timescale[i.cc],function(E){_._appendCues(E,i.level),m.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})},function(E){v.logger.log("Failed to parse IMSC1: "+E),m.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:E})})},e._parseVTTs=function(i,T,_){var m=this,E=this.hls;Object(U.parseWebVTT)(T,this.initPTS[i.cc],this.timescale[i.cc],_,i.cc,i.start,function(g){m._appendCues(g,i.level),E.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})},function(g){m._fallbackToIMSC1(i,T),v.logger.log("Failed to parse VTT cue: "+g),E.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:g})})},e._fallbackToIMSC1=function(i,T){var _=this,m=this.tracks[i.level];m.textCodec||Object(S.parseIMSC1)(T,this.initPTS[i.cc],this.timescale[i.cc],function(){m.textCodec=S.IMSC1_CODEC,_._parseIMSC1(i,T)},function(){m.textCodec="wvtt"})},e._appendCues=function(i,T){var _=this.hls;if(this.config.renderTextTracksNatively){var m=this.textTracks[T];if(m.mode==="disabled")return;i.forEach(function(h){return Object(R.addCueToTrack)(m,h)})}else{var E=this.tracks[T],g=E.default?"default":"subtitles"+T;_.trigger(C.Events.CUES_PARSED,{type:"subtitles",cues:i,track:g})}},e.onFragDecrypted=function(i,T){var _=T.frag;if(_.type===y.PlaylistLevelType.SUBTITLE){if(!Object(j.isFiniteNumber)(this.initPTS[_.cc])){this.unparsedVttFrags.push(T);return}this.onFragLoaded(C.Events.FRAG_LOADED,T)}},e.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},e.onFragParsingUserdata=function(i,T){var _=this.cea608Parser1,m=this.cea608Parser2;if(!this.enabled||!(_&&m))return;for(var E=0;E<T.samples.length;E++){var g=T.samples[E].bytes;if(g){var h=this.extractCea608Data(g);_.addData(T.samples[E].pts,h[0]),m.addData(T.samples[E].pts,h[1])}}},e.onBufferFlushing=function(i,T){var _=T.startOffset,m=T.endOffset,E=T.endOffsetSubtitles,g=T.type,h=this.media;if(!h||h.currentTime<m)return;if(!g||g==="video"){var u=this.captionsTracks;Object.keys(u).forEach(function(l){return Object(R.removeCuesInRange)(u[l],_,m)})}if(this.config.renderTextTracksNatively&&(_===0&&E!==void 0)){var r=this.textTracks;Object.keys(r).forEach(function(l){return Object(R.removeCuesInRange)(r[l],_,E)})}},e.extractCea608Data=function(i){for(var T=i[0]&31,_=2,m=[[],[]],E=0;E<T;E++){var g=i[_++],h=127&i[_++],u=127&i[_++],r=(4&g)!==0,l=3&g;if(h===0&&u===0)continue;r&&((l===0||l===1)&&(m[l].push(h),m[l].push(u)))}return m},s}();function o(s,e){return s&&s.label===e.name&&!(s.textTrack1||s.textTrack2)}function n(s,e,t,i){return Math.min(e,i)-Math.max(s,t)}function a(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return j});var j=function(){function C(H,U){this.subtle=void 0,this.aesIV=void 0,this.subtle=H,this.aesIV=U}var w=C.prototype;return w.decrypt=function(U,R){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},R,U)},C}()},"./src/crypt/aes-decryptor.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"removePadding",function(){return C}),I.d(L,"default",function(){return w});var j=I("./src/utils/typed-array.ts");function C(H){var U=H.byteLength,R=U&&new DataView(H.buffer).getUint8(U-1);return R?Object(j.sliceUint8)(H,0,U-R):H}var w=function(){function H(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var U=H.prototype;return U.uint8ArrayToUint32Array_=function(S){for(var y=new DataView(S),v=new Uint32Array(4),d=0;d<4;d++)v[d]=y.getUint32(d*4);return v},U.initTable=function(){var S=this.sBox,y=this.invSBox,v=this.subMix,d=v[0],o=v[1],n=v[2],a=v[3],s=this.invSubMix,e=s[0],t=s[1],i=s[2],T=s[3],_=new Uint32Array(256),m=0,E=0,g=0;for(g=0;g<256;g++)g<128?_[g]=g<<1:_[g]=g<<1^283;for(g=0;g<256;g++){var h=E^E<<1^E<<2^E<<3^E<<4;h=h>>>8^h&255^99,S[m]=h,y[h]=m;var u=_[m],r=_[u],l=_[r],f=_[h]*257^h*16843008;d[m]=f<<24|f>>>8,o[m]=f<<16|f>>>16,n[m]=f<<8|f>>>24,a[m]=f,f=l*16843009^r*65537^u*257^m*16843008,e[h]=f<<24|f>>>8,t[h]=f<<16|f>>>16,i[h]=f<<8|f>>>24,T[h]=f,m?(m=u^_[_[_[l^u]]],E^=_[_[E]]):m=E=1}},U.expandKey=function(S){for(var y=this.uint8ArrayToUint32Array_(S),v=!0,d=0;d<y.length&&v;)v=y[d]===this.key[d],d++;if(v)return;this.key=y;var o=this.keySize=y.length;if(o!==4&&o!==6&&o!==8)throw new Error("Invalid aes key size="+o);var n=this.ksRows=(o+6+1)*4,a,s,e=this.keySchedule=new Uint32Array(n),t=this.invKeySchedule=new Uint32Array(n),i=this.sBox,T=this.rcon,_=this.invSubMix,m=_[0],E=_[1],g=_[2],h=_[3],u,r;for(a=0;a<n;a++){if(a<o){u=e[a]=y[a];continue}r=u,a%o===0?(r=r<<8|r>>>24,r=i[r>>>24]<<24|i[r>>>16&255]<<16|i[r>>>8&255]<<8|i[r&255],r^=T[a/o|0]<<24):o>6&&a%o===4&&(r=i[r>>>24]<<24|i[r>>>16&255]<<16|i[r>>>8&255]<<8|i[r&255]),e[a]=u=(e[a-o]^r)>>>0}for(s=0;s<n;s++)a=n-s,s&3?r=e[a]:r=e[a-4],s<4||a<=4?t[s]=r:t[s]=m[i[r>>>24]]^E[i[r>>>16&255]]^g[i[r>>>8&255]]^h[i[r&255]],t[s]=t[s]>>>0},U.networkToHostOrderSwap=function(S){return S<<24|(S&65280)<<8|(S&16711680)>>8|S>>>24},U.decrypt=function(S,y,v){for(var d=this.keySize+6,o=this.invKeySchedule,n=this.invSBox,a=this.invSubMix,s=a[0],e=a[1],t=a[2],i=a[3],T=this.uint8ArrayToUint32Array_(v),_=T[0],m=T[1],E=T[2],g=T[3],h=new Int32Array(S),u=new Int32Array(h.length),r,l,f,c,x,D,A,B,O,W,P,G,Q,re,le=this.networkToHostOrderSwap;y<h.length;){for(O=le(h[y]),W=le(h[y+1]),P=le(h[y+2]),G=le(h[y+3]),x=O^o[0],D=G^o[1],A=P^o[2],B=W^o[3],Q=4,re=1;re<d;re++)r=s[x>>>24]^e[D>>16&255]^t[A>>8&255]^i[B&255]^o[Q],l=s[D>>>24]^e[A>>16&255]^t[B>>8&255]^i[x&255]^o[Q+1],f=s[A>>>24]^e[B>>16&255]^t[x>>8&255]^i[D&255]^o[Q+2],c=s[B>>>24]^e[x>>16&255]^t[D>>8&255]^i[A&255]^o[Q+3],x=r,D=l,A=f,B=c,Q=Q+4;r=n[x>>>24]<<24^n[D>>16&255]<<16^n[A>>8&255]<<8^n[B&255]^o[Q],l=n[D>>>24]<<24^n[A>>16&255]<<16^n[B>>8&255]<<8^n[x&255]^o[Q+1],f=n[A>>>24]<<24^n[B>>16&255]<<16^n[x>>8&255]<<8^n[D&255]^o[Q+2],c=n[B>>>24]<<24^n[x>>16&255]<<16^n[D>>8&255]<<8^n[A&255]^o[Q+3],u[y]=le(r^_),u[y+1]=le(c^m),u[y+2]=le(f^E),u[y+3]=le(l^g),_=O,m=W,E=P,g=G,y=y+4}return u.buffer},H}()},"./src/crypt/decrypter.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return y});var j=I("./src/crypt/aes-crypto.ts"),C=I("./src/crypt/fast-aes-key.ts"),w=I("./src/crypt/aes-decryptor.ts"),H=I("./src/utils/logger.ts"),U=I("./src/utils/mp4-tools.ts"),R=I("./src/utils/typed-array.ts"),S=16,y=function(){function v(o,n,a){var s=a===void 0?{}:a,e=s.removePKCS7Padding,t=e===void 0?!0:e;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=o,this.config=n,this.removePKCS7Padding=t,t)try{var i=self.crypto;i&&(this.subtle=i.subtle||i.webkitSubtle)}catch(T){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var d=v.prototype;return d.destroy=function(){this.observer=null},d.isSync=function(){return this.config.enableSoftwareAES},d.flush=function(){var n=this.currentResult;if(!n){this.reset();return}var a=new Uint8Array(n);return this.reset(),this.removePKCS7Padding?Object(w.removePadding)(a):a},d.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},d.decrypt=function(n,a,s,e){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(n),a,s);var t=this.flush();t&&e(t.buffer)}else this.webCryptoDecrypt(new Uint8Array(n),a,s).then(e)},d.softwareDecrypt=function(n,a,s){var e=this.currentIV,t=this.currentResult,i=this.remainderData;this.logOnce("JS AES decrypt"),i&&(n=Object(U.appendUint8Array)(i,n),this.remainderData=null);var T=this.getValidChunk(n);if(!T.length)return null;e&&(s=e);var _=this.softwareDecrypter;_||(_=this.softwareDecrypter=new w.default),_.expandKey(a);var m=t;return this.currentResult=_.decrypt(T.buffer,0,s),this.currentIV=Object(R.sliceUint8)(T,-16).buffer,m||null},d.webCryptoDecrypt=function(n,a,s){var e=this,t=this.subtle;return(this.key!==a||!this.fastAesKey)&&(this.key=a,this.fastAesKey=new C.default(t,a)),this.fastAesKey.expandKey().then(function(i){if(!t)return Promise.reject(new Error("web crypto not initialized"));var T=new j.default(t,s);return T.decrypt(n.buffer,i)}).catch(function(i){return e.onWebCryptoError(i,n,a,s)})},d.onWebCryptoError=function(n,a,s,e){return H.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",n),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(a,s,e)},d.getValidChunk=function(n){var a=n,s=n.length-n.length%S;return s!==n.length&&(a=Object(R.sliceUint8)(n,0,s),this.remainderData=Object(R.sliceUint8)(n,s)),a},d.logOnce=function(n){if(!this.logEnabled)return;H.logger.log("[decrypter.ts]: "+n),this.logEnabled=!1},v}()},"./src/crypt/fast-aes-key.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return j});var j=function(){function C(H,U){this.subtle=void 0,this.key=void 0,this.subtle=H,this.key=U}var w=C.prototype;return w.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},C}()},"./src/demux/aacdemuxer.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/demux/base-audio-demuxer.ts"),C=I("./src/demux/adts.ts"),w=I("./src/utils/logger.ts"),H=I("./src/demux/id3.ts");function U(y,v){y.prototype=Object.create(v.prototype),y.prototype.constructor=y,R(y,v)}function R(y,v){return R=Object.setPrototypeOf||function(o,n){return o.__proto__=n,o},R(y,v)}var S=function(y){U(v,y);function v(o,n){var a;return a=y.call(this)||this,a.observer=void 0,a.config=void 0,a.observer=o,a.config=n,a}var d=v.prototype;return d.resetInitSegment=function(n,a,s){y.prototype.resetInitSegment.call(this,n,a,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:n,duration:s,inputTimeScale:9e4,dropped:0}},v.probe=function(n){if(!n)return!1;for(var a=H.getID3Data(n,0)||[],s=a.length,e=n.length;s<e;s++)if(C.probe(n,s))return w.logger.log("ADTS sync word found !"),!0;return!1},d.canParse=function(n,a){return C.canParse(n,a)},d.appendFrame=function(n,a,s){C.initTrackConfig(n,this.observer,a,s,n.manifestCodec);var e=C.appendFrame(n,a,s,this.initPTS,this.frameIndex);if(e&&e.missing===0)return e},v}(j.default);S.minProbeByteLength=9,L.default=S},"./src/demux/adts.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"getAudioConfig",function(){return H}),I.d(L,"isHeaderPattern",function(){return U}),I.d(L,"getHeaderLength",function(){return R}),I.d(L,"getFullFrameLength",function(){return S}),I.d(L,"canGetFrameLength",function(){return y}),I.d(L,"isHeader",function(){return v}),I.d(L,"canParse",function(){return d}),I.d(L,"probe",function(){return o}),I.d(L,"initTrackConfig",function(){return n}),I.d(L,"getFrameDuration",function(){return a}),I.d(L,"parseFrameHeader",function(){return s}),I.d(L,"appendFrame",function(){return e});var j=I("./src/utils/logger.ts"),C=I("./src/errors.ts"),w=I("./src/events.ts");function H(t,i,T,_){var m,E,g,h,u=navigator.userAgent.toLowerCase(),r=_,l=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];m=((i[T+2]&192)>>>6)+1;var f=(i[T+2]&60)>>>2;if(f>l.length-1){t.trigger(w.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+f});return}return g=(i[T+2]&1)<<2,g|=(i[T+3]&192)>>>6,j.logger.log("manifest codec:"+_+", ADTS type:"+m+", samplingIndex:"+f),/firefox/i.test(u)?f>=6?(m=5,h=new Array(4),E=f-3):(m=2,h=new Array(2),E=f):u.indexOf("android")!==-1?(m=2,h=new Array(2),E=f):(m=5,h=new Array(4),_&&(_.indexOf("mp4a.40.29")!==-1||_.indexOf("mp4a.40.5")!==-1)||!_&&f>=6?E=f-3:((_&&_.indexOf("mp4a.40.2")!==-1&&(f>=6&&g===1||/vivaldi/i.test(u))||!_&&g===1)&&(m=2,h=new Array(2)),E=f)),h[0]=m<<3,h[0]|=(f&14)>>1,h[1]|=(f&1)<<7,h[1]|=g<<3,m===5&&(h[1]|=(E&14)>>1,h[2]=(E&1)<<7,h[2]|=2<<2,h[3]=0),{config:h,samplerate:l[f],channelCount:g,codec:"mp4a.40."+m,manifestCodec:r}}function U(t,i){return t[i]===255&&(t[i+1]&246)===240}function R(t,i){return t[i+1]&1?7:9}function S(t,i){return(t[i+3]&3)<<11|t[i+4]<<3|(t[i+5]&224)>>>5}function y(t,i){return i+5<t.length}function v(t,i){return i+1<t.length&&U(t,i)}function d(t,i){return y(t,i)&&U(t,i)&&S(t,i)<=t.length-i}function o(t,i){if(v(t,i)){var T=R(t,i);if(i+T>=t.length)return!1;var _=S(t,i);if(_<=T)return!1;var m=i+_;return m===t.length||v(t,m)}return!1}function n(t,i,T,_,m){if(!t.samplerate){var E=H(i,T,_,m);if(!E)return;t.config=E.config,t.samplerate=E.samplerate,t.channelCount=E.channelCount,t.codec=E.codec,t.manifestCodec=E.manifestCodec,j.logger.log("parsed codec:"+t.codec+", rate:"+E.samplerate+", channels:"+E.channelCount)}}function a(t){return 1024*9e4/t}function s(t,i,T,_,m){var E=R(t,i),g=S(t,i);if(g-=E,g>0){var h=T+_*m;return{headerLength:E,frameLength:g,stamp:h}}}function e(t,i,T,_,m){var E=a(t.samplerate),g=s(i,T,_,m,E);if(g){var h=g.frameLength,u=g.headerLength,r=g.stamp,l=u+h,f=Math.max(0,T+l-i.length),c;f?(c=new Uint8Array(l-u),c.set(i.subarray(T+u,i.length),0)):c=i.subarray(T+u,T+l);var x={unit:c,pts:r};return f||t.samples.push(x),{sample:x,length:l,missing:f}}}},"./src/demux/base-audio-demuxer.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"initPTSFn",function(){return S});var j=I("./src/polyfills/number.ts"),C=I("./src/demux/id3.ts"),w=I("./src/demux/dummy-demuxed-track.ts"),H=I("./src/utils/mp4-tools.ts"),U=I("./src/utils/typed-array.ts"),R=function(){function y(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var v=y.prototype;return v.resetInitSegment=function(o,n,a){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},v.resetTimeStamp=function(){},v.resetContiguity=function(){},v.canParse=function(o,n){return!1},v.appendFrame=function(o,n,a){},v.demux=function(o,n){this.cachedData&&(o=Object(H.appendUint8Array)(this.cachedData,o),this.cachedData=null);var a=C.getID3Data(o,0),s=a?a.length:0,e,t,i=this._audioTrack,T=this._id3Track,_=a?C.getTimeStamp(a):void 0,m=o.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=S(_,n)),a&&a.length>0&&T.samples.push({pts:this.initPTS,dts:this.initPTS,data:a}),t=this.initPTS;s<m;){if(this.canParse(o,s)){var E=this.appendFrame(i,o,s);E?(this.frameIndex++,t=E.sample.pts,s+=E.length,e=s):s=m}else C.canParse(o,s)?(a=C.getID3Data(o,s),T.samples.push({pts:t,dts:t,data:a}),s+=a.length,e=s):s++;if(s===m&&e!==m){var g=Object(U.sliceUint8)(o,e);this.cachedData?this.cachedData=Object(H.appendUint8Array)(this.cachedData,g):this.cachedData=g}}return{audioTrack:i,avcTrack:Object(w.dummyTrack)(),id3Track:T,textTrack:Object(w.dummyTrack)()}},v.demuxSampleAes=function(o,n,a){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},v.flush=function(o){var n=this.cachedData;return n&&(this.cachedData=null,this.demux(n,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(w.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(w.dummyTrack)()}},v.destroy=function(){},y}(),S=function(v,d){return Object(j.isFiniteNumber)(v)?v*90:d*9e4};L.default=R},"./src/demux/chunk-cache.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return j});var j=function(){function w(){this.chunks=[],this.dataLength=0}var H=w.prototype;return H.push=function(R){this.chunks.push(R),this.dataLength+=R.length},H.flush=function(){var R=this.chunks,S=this.dataLength,y;if(R.length)R.length===1?y=R[0]:y=C(R,S);else return new Uint8Array(0);return this.reset(),y},H.reset=function(){this.chunks.length=0,this.dataLength=0},w}();function C(w,H){for(var U=new Uint8Array(H),R=0,S=0;S<w.length;S++){var y=w[S];U.set(y,R),R+=y.length}return U}},"./src/demux/dummy-demuxed-track.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"dummyTrack",function(){return j});function j(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/utils/logger.ts"),C=function(){function w(U){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=U,this.bytesAvailable=U.byteLength,this.word=0,this.bitsAvailable=0}var H=w.prototype;return H.loadWord=function(){var R=this.data,S=this.bytesAvailable,y=R.byteLength-S,v=new Uint8Array(4),d=Math.min(4,S);if(d===0)throw new Error("no bytes available");v.set(R.subarray(y,y+d)),this.word=new DataView(v.buffer).getUint32(0),this.bitsAvailable=d*8,this.bytesAvailable-=d},H.skipBits=function(R){var S;this.bitsAvailable>R?(this.word<<=R,this.bitsAvailable-=R):(R-=this.bitsAvailable,S=R>>3,R-=S>>3,this.bytesAvailable-=S,this.loadWord(),this.word<<=R,this.bitsAvailable-=R)},H.readBits=function(R){var S=Math.min(this.bitsAvailable,R),y=this.word>>>32-S;return R>32&&j.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=S,this.bitsAvailable>0?this.word<<=S:this.bytesAvailable>0&&this.loadWord(),S=R-S,S>0&&this.bitsAvailable?y<<S|this.readBits(S):y},H.skipLZ=function(){var R;for(R=0;R<this.bitsAvailable;++R)if((this.word&2147483648>>>R)!==0)return this.word<<=R,this.bitsAvailable-=R,R;return this.loadWord(),R+this.skipLZ()},H.skipUEG=function(){this.skipBits(1+this.skipLZ())},H.skipEG=function(){this.skipBits(1+this.skipLZ())},H.readUEG=function(){var R=this.skipLZ();return this.readBits(R+1)-1},H.readEG=function(){var R=this.readUEG();return 1&R?1+R>>>1:-1*(R>>>1)},H.readBoolean=function(){return this.readBits(1)===1},H.readUByte=function(){return this.readBits(8)},H.readUShort=function(){return this.readBits(16)},H.readUInt=function(){return this.readBits(32)},H.skipScalingList=function(R){for(var S=8,y=8,v,d=0;d<R;d++)y!==0&&(v=this.readEG(),y=(S+v+256)%256),S=y===0?S:y},H.readSPS=function(){var R=0,S=0,y=0,v=0,d,o,n,a=this.readUByte.bind(this),s=this.readBits.bind(this),e=this.readUEG.bind(this),t=this.readBoolean.bind(this),i=this.skipBits.bind(this),T=this.skipEG.bind(this),_=this.skipUEG.bind(this),m=this.skipScalingList.bind(this);a();var E=a();if(s(5),i(3),a(),_(),E===100||E===110||E===122||E===244||E===44||E===83||E===86||E===118||E===128){var g=e();if(g===3&&i(1),_(),_(),i(1),t())for(o=g!==3?8:12,n=0;n<o;n++)t()&&(n<6?m(16):m(64))}_();var h=e();if(h===0)e();else if(h===1)for(i(1),T(),T(),d=e(),n=0;n<d;n++)T();_(),i(1);var u=e(),r=e(),l=s(1);l===0&&i(1),i(1),t()&&(R=e(),S=e(),y=e(),v=e());var f=[1,1];if(t()&&t()){var c=a();switch(c){case 1:f=[1,1];break;case 2:f=[12,11];break;case 3:f=[10,11];break;case 4:f=[16,11];break;case 5:f=[40,33];break;case 6:f=[24,11];break;case 7:f=[20,11];break;case 8:f=[32,11];break;case 9:f=[80,33];break;case 10:f=[18,11];break;case 11:f=[15,11];break;case 12:f=[64,33];break;case 13:f=[160,99];break;case 14:f=[4,3];break;case 15:f=[3,2];break;case 16:f=[2,1];break;case 255:{f=[a()<<8|a(),a()<<8|a()];break}}}return{width:Math.ceil((u+1)*16-R*2-S*2),height:(2-l)*(r+1)*16-(l?2:4)*(y+v),pixelRatio:f}},H.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},w}();L.default=C},"./src/demux/id3.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"isHeader",function(){return j}),I.d(L,"isFooter",function(){return C}),I.d(L,"getID3Data",function(){return w}),I.d(L,"canParse",function(){return U}),I.d(L,"getTimeStamp",function(){return R}),I.d(L,"isTimeStampFrame",function(){return S}),I.d(L,"getID3Frames",function(){return v}),I.d(L,"decodeFrame",function(){return d}),I.d(L,"utf8ArrayToStr",function(){return e}),I.d(L,"testables",function(){return t});var j=function(m,E){return E+10<=m.length&&(m[E]===73&&m[E+1]===68&&m[E+2]===51&&(m[E+3]<255&&m[E+4]<255&&(m[E+6]<128&&m[E+7]<128&&m[E+8]<128&&m[E+9]<128)))},C=function(m,E){return E+10<=m.length&&(m[E]===51&&m[E+1]===68&&m[E+2]===73&&(m[E+3]<255&&m[E+4]<255&&(m[E+6]<128&&m[E+7]<128&&m[E+8]<128&&m[E+9]<128)))},w=function(m,E){for(var g=E,h=0;j(m,E);){h+=10;var u=H(m,E+6);h+=u,C(m,E+10)&&(h+=10),E+=h}return h>0?m.subarray(g,g+h):void 0},H=function(m,E){var g=0;return g=(m[E]&127)<<21,g|=(m[E+1]&127)<<14,g|=(m[E+2]&127)<<7,g|=m[E+3]&127,g},U=function(m,E){return j(m,E)&&H(m,E+6)+10<=m.length-E},R=function(m){for(var E=v(m),g=0;g<E.length;g++){var h=E[g];if(S(h))return s(h)}return},S=function(m){return m&&m.key==="PRIV"&&m.info==="com.apple.streaming.transportStreamTimestamp"},y=function(m){var E=String.fromCharCode(m[0],m[1],m[2],m[3]),g=H(m,4),h=10;return{type:E,size:g,data:m.subarray(h,h+g)}},v=function(m){for(var E=0,g=[];j(m,E);){var h=H(m,E+6);E+=10;for(var u=E+h;E+8<u;){var r=y(m.subarray(E)),l=d(r);l&&g.push(l),E+=r.size+10}C(m,E)&&(E+=10)}return g},d=function(m){return m.type==="PRIV"?o(m):m.type[0]==="W"?a(m):n(m)},o=function(m){if(m.size<2)return;var E=e(m.data,!0),g=new Uint8Array(m.data.subarray(E.length+1));return{key:m.type,info:E,data:g.buffer}},n=function(m){if(m.size<2)return;if(m.type==="TXXX"){var E=1,g=e(m.data.subarray(E),!0);E+=g.length+1;var h=e(m.data.subarray(E));return{key:m.type,info:g,data:h}}var u=e(m.data.subarray(1));return{key:m.type,data:u}},a=function(m){if(m.type==="WXXX"){if(m.size<2)return;var E=1,g=e(m.data.subarray(E),!0);E+=g.length+1;var h=e(m.data.subarray(E));return{key:m.type,info:g,data:h}}var u=e(m.data);return{key:m.type,data:u}},s=function(m){if(m.data.byteLength===8){var E=new Uint8Array(m.data),g=E[3]&1,h=(E[4]<<23)+(E[5]<<15)+(E[6]<<7)+E[7];return h/=45,g&&(h+=4772185884e-2),Math.round(h)}return},e=function(m,E){E===void 0&&(E=!1);var g=T();if(g){var h=g.decode(m);if(E){var u=h.indexOf("\0");return u!==-1?h.substring(0,u):h}return h.replace(/\0/g,"")}for(var r=m.length,l,f,c,x="",D=0;D<r;){if(l=m[D++],l===0&&E)return x;if(l===0||l===3)continue;switch(l>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:x+=String.fromCharCode(l);break;case 12:case 13:f=m[D++],x+=String.fromCharCode((l&31)<<6|f&63);break;case 14:f=m[D++],c=m[D++],x+=String.fromCharCode((l&15)<<12|(f&63)<<6|(c&63)<<0);break;default:}}return x},t={decodeTextFrame:n},i;function T(){return!i&&typeof self.TextDecoder!="undefined"&&(i=new self.TextDecoder("utf-8")),i}},"./src/demux/mp3demuxer.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/demux/base-audio-demuxer.ts"),C=I("./src/demux/id3.ts"),w=I("./src/utils/logger.ts"),H=I("./src/demux/mpegaudio.ts");function U(y,v){y.prototype=Object.create(v.prototype),y.prototype.constructor=y,R(y,v)}function R(y,v){return R=Object.setPrototypeOf||function(o,n){return o.__proto__=n,o},R(y,v)}var S=function(y){U(v,y);function v(){return y.apply(this,arguments)||this}var d=v.prototype;return d.resetInitSegment=function(n,a,s){y.prototype.resetInitSegment.call(this,n,a,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:n,duration:s,inputTimeScale:9e4,dropped:0}},v.probe=function(n){if(!n)return!1;for(var a=C.getID3Data(n,0)||[],s=a.length,e=n.length;s<e;s++)if(H.probe(n,s))return w.logger.log("MPEG Audio sync word found !"),!0;return!1},d.canParse=function(n,a){return H.canParse(n,a)},d.appendFrame=function(n,a,s){return this.initPTS===null?void 0:H.appendFrame(n,a,s,this.initPTS,this.frameIndex)},v}(j.default);S.minProbeByteLength=4,L.default=S},"./src/demux/mp4demuxer.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/utils/mp4-tools.ts"),C=I("./src/demux/dummy-demuxed-track.ts"),w=function(){function H(R,S){this.remainderData=null,this.config=void 0,this.config=S}var U=H.prototype;return U.resetTimeStamp=function(){},U.resetInitSegment=function(){},U.resetContiguity=function(){},H.probe=function(S){return Object(j.findBox)({data:S,start:0,end:Math.min(S.length,16384)},["moof"]).length>0},U.demux=function(S){var y=S,v=Object(C.dummyTrack)();if(this.config.progressive){this.remainderData&&(y=Object(j.appendUint8Array)(this.remainderData,S));var d=Object(j.segmentValidRange)(y);this.remainderData=d.remainder,v.samples=d.valid||new Uint8Array}else v.samples=y;return{audioTrack:Object(C.dummyTrack)(),avcTrack:v,id3Track:Object(C.dummyTrack)(),textTrack:Object(C.dummyTrack)()}},U.flush=function(){var S=Object(C.dummyTrack)();return S.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(C.dummyTrack)(),avcTrack:S,id3Track:Object(C.dummyTrack)(),textTrack:Object(C.dummyTrack)()}},U.demuxSampleAes=function(S,y,v){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},U.destroy=function(){},H}();w.minProbeByteLength=1024,L.default=w},"./src/demux/mpegaudio.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"appendFrame",function(){return R}),I.d(L,"parseHeader",function(){return S}),I.d(L,"isHeaderPattern",function(){return y}),I.d(L,"isHeader",function(){return v}),I.d(L,"canParse",function(){return d}),I.d(L,"probe",function(){return o});var j=null,C=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],w=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],H=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],U=[0,1,1,4];function R(n,a,s,e,t){if(s+24>a.length)return;var i=S(a,s);if(i&&s+i.frameLength<=a.length){var T=i.samplesPerFrame*9e4/i.sampleRate,_=e+t*T,m={unit:a.subarray(s,s+i.frameLength),pts:_,dts:_};return n.config=[],n.channelCount=i.channelCount,n.samplerate=i.sampleRate,n.samples.push(m),{sample:m,length:i.frameLength,missing:0}}}function S(n,a){var s=n[a+1]>>3&3,e=n[a+1]>>1&3,t=n[a+2]>>4&15,i=n[a+2]>>2&3;if(s!==1&&t!==0&&t!==15&&i!==3){var T=n[a+2]>>1&1,_=n[a+3]>>6,m=s===3?3-e:e===3?3:4,E=C[m*14+t-1]*1e3,g=s===3?0:s===2?1:2,h=w[g*3+i],u=_===3?1:2,r=H[s][e],l=U[e],f=r*8*l,c=Math.floor(r*E/h+T)*l;if(j===null){var x=navigator.userAgent||"",D=x.match(/Chrome\/(\d+)/i);j=D?parseInt(D[1]):0}var A=!!j&&j<=87;return A&&e===2&&E>=224e3&&_===0&&(n[a+3]=n[a+3]|128),{sampleRate:h,channelCount:u,frameLength:c,samplesPerFrame:f}}}function y(n,a){return n[a]===255&&(n[a+1]&224)===224&&(n[a+1]&6)!==0}function v(n,a){return a+1<n.length&&y(n,a)}function d(n,a){var s=4;return y(n,a)&&s<=n.length-a}function o(n,a){if(a+1<n.length&&y(n,a)){var s=4,e=S(n,a),t=s;e!=null&&e.frameLength&&(t=e.frameLength);var i=a+t;return i===n.length||v(n,i)}return!1}},"./src/demux/sample-aes.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/crypt/decrypter.ts"),C=I("./src/demux/tsdemuxer.ts"),w=function(){function H(R,S,y){this.keyData=void 0,this.decrypter=void 0,this.keyData=y,this.decrypter=new j.default(R,S,{removePKCS7Padding:!1})}var U=H.prototype;return U.decryptBuffer=function(S,y){this.decrypter.decrypt(S,this.keyData.key.buffer,this.keyData.iv.buffer,y)},U.decryptAacSample=function(S,y,v,d){var o=S[y].unit,n=o.subarray(16,o.length-o.length%16),a=n.buffer.slice(n.byteOffset,n.byteOffset+n.length),s=this;this.decryptBuffer(a,function(e){var t=new Uint8Array(e);o.set(t,16),d||s.decryptAacSamples(S,y+1,v)})},U.decryptAacSamples=function(S,y,v){for(;;y++){if(y>=S.length){v();return}if(S[y].unit.length<32)continue;var d=this.decrypter.isSync();if(this.decryptAacSample(S,y,v,d),!d)return}},U.getAvcEncryptedData=function(S){for(var y=Math.floor((S.length-48)/160)*16+16,v=new Int8Array(y),d=0,o=32;o<=S.length-16;o+=160,d+=16)v.set(S.subarray(o,o+16),d);return v},U.getAvcDecryptedUnit=function(S,y){for(var v=new Uint8Array(y),d=0,o=32;o<=S.length-16;o+=160,d+=16)S.set(v.subarray(d,d+16),o);return S},U.decryptAvcSample=function(S,y,v,d,o,n){var a=Object(C.discardEPB)(o.data),s=this.getAvcEncryptedData(a),e=this;this.decryptBuffer(s.buffer,function(t){o.data=e.getAvcDecryptedUnit(a,t),n||e.decryptAvcSamples(S,y,v+1,d)})},U.decryptAvcSamples=function(S,y,v,d){if(S instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;y++,v=0){if(y>=S.length){d();return}for(var o=S[y].units;!(v>=o.length);v++){var n=o[v];if(n.data.length<=48||n.type!==1&&n.type!==5)continue;var a=this.decrypter.isSync();if(this.decryptAvcSample(S,y,v,d,n,a),!a)return}}},H}();L.default=w},"./src/demux/transmuxer-interface.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return o});var j=I("./node_modules/webworkify-webpack/index.js"),C=I.n(j),w=I("./src/events.ts"),H=I("./src/demux/transmuxer.ts"),U=I("./src/utils/logger.ts"),R=I("./src/errors.ts"),S=I("./src/utils/mediasource-helper.ts"),y=I("./node_modules/eventemitter3/index.js"),v=I.n(y),d=Object(S.getMediaSource)()||{isTypeSupported:function(){return!1}},o=function(){function n(s,e,t,i){var T=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=s,this.id=e,this.onTransmuxComplete=t,this.onFlush=i;var _=s.config,m=function(r,l){l=l||{},l.frag=T.frag,l.id=T.id,s.trigger(r,l)};this.observer=new y.EventEmitter,this.observer.on(w.Events.FRAG_DECRYPTED,m),this.observer.on(w.Events.ERROR,m);var E={mp4:d.isTypeSupported("video/mp4"),mpeg:d.isTypeSupported("audio/mpeg"),mp3:d.isTypeSupported('audio/mp4; codecs="mp3"')},g=navigator.vendor;if(_.enableWorker&&typeof Worker!="undefined"){U.logger.log("demuxing in webworker");var h;try{h=this.worker=j("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),h.addEventListener("message",this.onwmsg),h.onerror=function(u){s.trigger(w.Events.ERROR,{type:R.ErrorTypes.OTHER_ERROR,details:R.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(u.message+" ("+u.filename+":"+u.lineno+")")})},h.postMessage({cmd:"init",typeSupported:E,vendor:g,id:e,config:JSON.stringify(_)})}catch(u){U.logger.warn("Error in worker:",u),U.logger.error("Error while initializing DemuxerWorker, fallback to inline"),h&&self.URL.revokeObjectURL(h.objectURL),this.transmuxer=new H.default(this.observer,E,_,g,e),this.worker=null}}else this.transmuxer=new H.default(this.observer,E,_,g,e)}var a=n.prototype;return a.destroy=function(){var e=this.worker;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.worker=null;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var i=this.observer;i&&i.removeAllListeners(),this.observer=null},a.push=function(e,t,i,T,_,m,E,g,h,u){var r=this;h.transmuxing.start=self.performance.now();var l=this.transmuxer,f=this.worker,c=m?m.start:_.start,x=_.decryptdata,D=this.frag,A=!(D&&_.cc===D.cc),B=!(D&&h.level===D.level),O=D?h.sn-D.sn:-1,W=this.part?h.part-this.part.index:1,P=!B&&(O===1||O===0&&W===1),G=self.performance.now();(B||O||_.stats.parsing.start===0)&&(_.stats.parsing.start=G),m&&(W||!P)&&(m.stats.parsing.start=G);var Q=new H.TransmuxState(A,P,g,B,c);if(!P||A){U.logger.log("[transmuxer-interface, "+_.type+"]: Starting new transmux session for sn: "+h.sn+" p: "+h.part+" level: "+h.level+" id: "+h.id+`
discontinuity: `+A+`
trackSwitch: `+B+`
contiguous: `+P+`
accurateTimeOffset: `+g+`
timeOffset: `+c);var re=new H.TransmuxConfig(i,T,t,E,u);this.configureTransmuxer(re)}if(this.frag=_,this.part=m,f)f.postMessage({cmd:"demux",data:e,decryptdata:x,chunkMeta:h,state:Q},e instanceof ArrayBuffer?[e]:[]);else if(l){var le=l.push(e,x,h,Q);Object(H.isPromise)(le)?le.then(function(Ee){r.handleTransmuxComplete(Ee)}):this.handleTransmuxComplete(le)}},a.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var i=this.transmuxer,T=this.worker;if(T)T.postMessage({cmd:"flush",chunkMeta:e});else if(i){var _=i.flush(e);Object(H.isPromise)(_)?_.then(function(m){t.handleFlushResult(m,e)}):this.handleFlushResult(_,e)}},a.handleFlushResult=function(e,t){var i=this;e.forEach(function(T){i.handleTransmuxComplete(T)}),this.onFlush(t)},a.onWorkerMessage=function(e){var t=e.data,i=this.hls;switch(t.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}default:{t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,i.trigger(t.event,t.data);break}}},a.configureTransmuxer=function(e){var t=this.worker,i=this.transmuxer;t?t.postMessage({cmd:"configure",config:e}):i&&i.configure(e)},a.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},n}()},"./src/demux/transmuxer-worker.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return R});var j=I("./src/demux/transmuxer.ts"),C=I("./src/events.ts"),w=I("./src/utils/logger.ts"),H=I("./node_modules/eventemitter3/index.js"),U=I.n(H);function R(o){var n=new H.EventEmitter,a=function(e,t){o.postMessage({event:e,data:t})};n.on(C.Events.FRAG_DECRYPTED,a),n.on(C.Events.ERROR,a),o.addEventListener("message",function(s){var e=s.data;switch(e.cmd){case"init":{var t=JSON.parse(e.config);o.transmuxer=new j.default(n,e.typeSupported,t,e.vendor,e.id),Object(w.enableLogs)(t.debug),a("init",null);break}case"configure":{o.transmuxer.configure(e.config);break}case"demux":{var i=o.transmuxer.push(e.data,e.decryptdata,e.chunkMeta,e.state);Object(j.isPromise)(i)?i.then(function(m){S(o,m)}):S(o,i);break}case"flush":{var T=e.chunkMeta,_=o.transmuxer.flush(T);Object(j.isPromise)(_)?_.then(function(m){v(o,m,T)}):v(o,_,T);break}default:break}})}function S(o,n){if(d(n.remuxResult))return;var a=[],s=n.remuxResult,e=s.audio,t=s.video;e&&y(a,e),t&&y(a,t),o.postMessage({event:"transmuxComplete",data:n},a)}function y(o,n){n.data1&&o.push(n.data1.buffer),n.data2&&o.push(n.data2.buffer)}function v(o,n,a){n.forEach(function(s){S(o,s)}),o.postMessage({event:"flush",data:a})}function d(o){return!o.audio&&!o.video&&!o.text&&!o.id3&&!o.initSegment}},"./src/demux/transmuxer.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return t}),I.d(L,"isPromise",function(){return _}),I.d(L,"TransmuxConfig",function(){return m}),I.d(L,"TransmuxState",function(){return E});var j=I("./src/events.ts"),C=I("./src/errors.ts"),w=I("./src/crypt/decrypter.ts"),H=I("./src/demux/aacdemuxer.ts"),U=I("./src/demux/mp4demuxer.ts"),R=I("./src/demux/tsdemuxer.ts"),S=I("./src/demux/mp3demuxer.ts"),y=I("./src/remux/mp4-remuxer.ts"),v=I("./src/remux/passthrough-remuxer.ts"),d=I("./src/demux/chunk-cache.ts"),o=I("./src/utils/mp4-tools.ts"),n=I("./src/utils/logger.ts"),a;try{a=self.performance.now.bind(self.performance)}catch(g){n.logger.debug("Unable to use Performance API on this environment"),a=self.Date.now}var s=[{demux:R.default,remux:y.default},{demux:U.default,remux:v.default},{demux:H.default,remux:y.default},{demux:S.default,remux:y.default}],e=1024;s.forEach(function(g){var h=g.demux;e=Math.max(e,h.minProbeByteLength)});var t=function(){function g(u,r,l,f,c){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new d.default,this.observer=u,this.typeSupported=r,this.config=l,this.vendor=f,this.id=c}var h=g.prototype;return h.configure=function(r){this.transmuxConfig=r,this.decrypter&&this.decrypter.reset()},h.push=function(r,l,f,c){var x=this,D=f.transmuxing;D.executeStart=a();var A=new Uint8Array(r),B=this.cache,O=this.config,W=this.currentTransmuxState,P=this.transmuxConfig;c&&(this.currentTransmuxState=c);var G=i(A,l);if(G&&G.method==="AES-128"){var Q=this.getDecrypter();if(O.enableSoftwareAES){var re=Q.softwareDecrypt(A,G.key.buffer,G.iv.buffer);if(!re)return D.executeEnd=a(),T(f);A=new Uint8Array(re)}else return this.decryptionPromise=Q.webCryptoDecrypt(A,G.key.buffer,G.iv.buffer).then(function(ze){var Je=x.push(ze,null,f);return x.decryptionPromise=null,Je}),this.decryptionPromise}var le=c||W,Ee=le.contiguous,_e=le.discontinuity,ne=le.trackSwitch,Te=le.accurateTimeOffset,Ae=le.timeOffset,fe=P.audioCodec,J=P.videoCodec,Ie=P.defaultInitPts,it=P.duration,et=P.initSegmentData;if((_e||ne)&&this.resetInitSegment(et,fe,J,it),_e&&this.resetInitialTimestamp(Ie),Ee||this.resetContiguity(),this.needsProbing(A,_e,ne)){if(B.dataLength){var Qe=B.flush();A=Object(o.appendUint8Array)(Qe,A)}this.configureTransmuxer(A,P)}var nt=this.transmux(A,G,Ae,Te,f),Me=this.currentTransmuxState;return Me.contiguous=!0,Me.discontinuity=!1,Me.trackSwitch=!1,D.executeEnd=a(),nt},h.flush=function(r){var l=this,f=r.transmuxing;f.executeStart=a();var c=this.decrypter,x=this.cache,D=this.currentTransmuxState,A=this.decryptionPromise;if(A)return A.then(function(){return l.flush(r)});var B=[],O=D.timeOffset;if(c){var W=c.flush();W&&B.push(this.push(W,null,r))}var P=x.dataLength;x.reset();var G=this.demuxer,Q=this.remuxer;if(!G||!Q)return P>=e&&this.observer.emit(j.Events.ERROR,j.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),f.executeEnd=a(),[T(r)];var re=G.flush(O);return _(re)?re.then(function(le){return l.flushRemux(B,le,r),B}):(this.flushRemux(B,re,r),B)},h.flushRemux=function(r,l,f){var c=l.audioTrack,x=l.avcTrack,D=l.id3Track,A=l.textTrack,B=this.currentTransmuxState,O=B.accurateTimeOffset,W=B.timeOffset;n.logger.log("[transmuxer.ts]: Flushed fragment "+f.sn+(f.part>-1?" p: "+f.part:"")+" of level "+f.level);var P=this.remuxer.remux(c,x,D,A,W,O,!0,this.id);r.push({remuxResult:P,chunkMeta:f}),f.transmuxing.executeEnd=a()},h.resetInitialTimestamp=function(r){var l=this.demuxer,f=this.remuxer;if(!l||!f)return;l.resetTimeStamp(r),f.resetTimeStamp(r)},h.resetContiguity=function(){var r=this.demuxer,l=this.remuxer;if(!r||!l)return;r.resetContiguity(),l.resetNextTimestamp()},h.resetInitSegment=function(r,l,f,c){var x=this.demuxer,D=this.remuxer;if(!x||!D)return;x.resetInitSegment(l,f,c),D.resetInitSegment(r,l,f)},h.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},h.transmux=function(r,l,f,c,x){var D;return l&&l.method==="SAMPLE-AES"?D=this.transmuxSampleAes(r,l,f,c,x):D=this.transmuxUnencrypted(r,f,c,x),D},h.transmuxUnencrypted=function(r,l,f,c){var x=this.demuxer.demux(r,l,!1,!this.config.progressive),D=x.audioTrack,A=x.avcTrack,B=x.id3Track,O=x.textTrack,W=this.remuxer.remux(D,A,B,O,l,f,!1,this.id);return{remuxResult:W,chunkMeta:c}},h.transmuxSampleAes=function(r,l,f,c,x){var D=this;return this.demuxer.demuxSampleAes(r,l,f).then(function(A){var B=D.remuxer.remux(A.audioTrack,A.avcTrack,A.id3Track,A.textTrack,f,c,!1,D.id);return{remuxResult:B,chunkMeta:x}})},h.configureTransmuxer=function(r,l){for(var f=this.config,c=this.observer,x=this.typeSupported,D=this.vendor,A=l.audioCodec,B=l.defaultInitPts,O=l.duration,W=l.initSegmentData,P=l.videoCodec,G,Q=0,re=s.length;Q<re;Q++)if(s[Q].demux.probe(r)){G=s[Q];break}G||(n.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),G={demux:U.default,remux:v.default});var le=this.demuxer,Ee=this.remuxer,_e=G.remux,ne=G.demux;(!Ee||!(Ee instanceof _e))&&(this.remuxer=new _e(c,f,x,D)),(!le||!(le instanceof ne))&&(this.demuxer=new ne(c,f,x),this.probe=ne.probe),this.resetInitSegment(W,A,P,O),this.resetInitialTimestamp(B)},h.needsProbing=function(r,l,f){return!this.demuxer||!this.remuxer||l||f},h.getDecrypter=function(){var r=this.decrypter;return r||(r=this.decrypter=new w.default(this.observer,this.config)),r},g}();function i(g,h){var u=null;return g.byteLength>0&&h!=null&&h.key!=null&&h.iv!==null&&h.method!=null&&(u=h),u}var T=function(h){return{remuxResult:{},chunkMeta:h}};function _(g){return"then"in g&&g.then instanceof Function}var m=function(h,u,r,l,f){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=h,this.videoCodec=u,this.initSegmentData=r,this.duration=l,this.defaultInitPts=f},E=function(h,u,r,l,f){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=h,this.contiguous=u,this.accurateTimeOffset=r,this.trackSwitch=l,this.timeOffset=f}},"./src/demux/tsdemuxer.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"discardEPB",function(){return T});var j=I("./src/demux/adts.ts"),C=I("./src/demux/mpegaudio.ts"),w=I("./src/demux/exp-golomb.ts"),H=I("./src/demux/id3.ts"),U=I("./src/demux/sample-aes.ts"),R=I("./src/events.ts"),S=I("./src/utils/mp4-tools.ts"),y=I("./src/utils/logger.ts"),v=I("./src/errors.ts"),d={video:1,audio:2,id3:3,text:4},o=function(){function _(E,g,h){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=E,this.config=g,this.typeSupported=h}_.probe=function(g){var h=_.syncOffset(g);return h<0?!1:(h&&y.logger.warn("MPEG2-TS detected but first sync word found @ offset "+h+", junk ahead ?"),!0)},_.syncOffset=function(g){for(var h=Math.min(1e3,g.length-3*188),u=0;u<h;){if(g[u]===71&&g[u+188]===71&&g[u+2*188]===71)return u;u++}return-1},_.createTrack=function(g,h){return{container:g==="video"||g==="audio"?"video/mp2t":void 0,type:g,id:d[g],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:g==="audio"?h:void 0}};var m=_.prototype;return m.resetInitSegment=function(g,h,u){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=_.createTrack("video",u),this._audioTrack=_.createTrack("audio",u),this._id3Track=_.createTrack("id3",u),this._txtTrack=_.createTrack("text",u),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=g,this.videoCodec=h,this._duration=u},m.resetTimeStamp=function(){},m.resetContiguity=function(){var g=this._audioTrack,h=this._avcTrack,u=this._id3Track;g&&(g.pesData=null),h&&(h.pesData=null),u&&(u.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},m.demux=function(g,h,u,r){u===void 0&&(u=!1),r===void 0&&(r=!1),u||(this.sampleAes=null);var l,f=this._avcTrack,c=this._audioTrack,x=this._id3Track,D=f.pid,A=f.pesData,B=c.pid,O=x.pid,W=c.pesData,P=x.pesData,G=!1,Q=this.pmtParsed,re=this._pmtId,le=g.length;if(this.remainderData&&(g=Object(S.appendUint8Array)(this.remainderData,g),le=g.length,this.remainderData=null),le<188&&!r)return this.remainderData=g,{audioTrack:c,avcTrack:f,id3Track:x,textTrack:this._txtTrack};var Ee=Math.max(0,_.syncOffset(g));le-=(le+Ee)%188,le<g.byteLength&&!r&&(this.remainderData=new Uint8Array(g.buffer,le,g.buffer.byteLength-le));for(var _e=Ee;_e<le;_e+=188)if(g[_e]===71){var ne=!!(g[_e+1]&64),Te=((g[_e+1]&31)<<8)+g[_e+2],Ae=(g[_e+3]&48)>>4,fe=void 0;if(Ae>1){if(fe=_e+5+g[_e+4],fe===_e+188)continue}else fe=_e+4;switch(Te){case D:ne&&(A&&(l=e(A))&&this.parseAVCPES(l,!1),A={data:[],size:0}),A&&(A.data.push(g.subarray(fe,_e+188)),A.size+=_e+188-fe);break;case B:ne&&(W&&(l=e(W))&&(c.isAAC?this.parseAACPES(l):this.parseMPEGPES(l)),W={data:[],size:0}),W&&(W.data.push(g.subarray(fe,_e+188)),W.size+=_e+188-fe);break;case O:ne&&(P&&(l=e(P))&&this.parseID3PES(l),P={data:[],size:0}),P&&(P.data.push(g.subarray(fe,_e+188)),P.size+=_e+188-fe);break;case 0:ne&&(fe+=g[fe]+1),re=this._pmtId=a(g,fe);break;case re:{ne&&(fe+=g[fe]+1);var J=s(g,fe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,u);D=J.avc,D>0&&(f.pid=D),B=J.audio,B>0&&(c.pid=B,c.isAAC=J.isAAC),O=J.id3,O>0&&(x.pid=O),G&&!Q&&(y.logger.log("reparse from beginning"),G=!1,_e=Ee-188),Q=this.pmtParsed=!0;break}case 17:case 8191:break;default:G=!0;break}}else this.observer.emit(R.Events.ERROR,R.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});f.pesData=A,c.pesData=W,x.pesData=P;var Ie={audioTrack:c,avcTrack:f,id3Track:x,textTrack:this._txtTrack};return r&&this.extractRemainingSamples(Ie),Ie},m.flush=function(){var g=this.remainderData;this.remainderData=null;var h;return g?h=this.demux(g,-1,!1,!0):h={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(h),this.sampleAes?this.decrypt(h,this.sampleAes):h},m.extractRemainingSamples=function(g){var h=g.audioTrack,u=g.avcTrack,r=g.id3Track,l=u.pesData,f=h.pesData,c=r.pesData,x;l&&(x=e(l))?(this.parseAVCPES(x,!0),u.pesData=null):u.pesData=l,f&&(x=e(f))?(h.isAAC?this.parseAACPES(x):this.parseMPEGPES(x),h.pesData=null):(f!=null&&f.size&&y.logger.log("last AAC PES packet truncated,might overlap between fragments"),h.pesData=f),c&&(x=e(c))?(this.parseID3PES(x),r.pesData=null):r.pesData=c},m.demuxSampleAes=function(g,h,u){var r=this.demux(g,u,!0,!this.config.progressive),l=this.sampleAes=new U.default(this.observer,this.config,h);return this.decrypt(r,l)},m.decrypt=function(g,h){return new Promise(function(u){var r=g.audioTrack,l=g.avcTrack;r.samples&&r.isAAC?h.decryptAacSamples(r.samples,0,function(){l.samples?h.decryptAvcSamples(l.samples,0,0,function(){u(g)}):u(g)}):l.samples&&h.decryptAvcSamples(l.samples,0,0,function(){u(g)})})},m.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},m.parseAVCPES=function(g,h){var u=this,r=this._avcTrack,l=this.parseAVCNALu(g.data),f=!1,c=this.avcSample,x,D=!1;g.data=null,c&&l.length&&!r.audFound&&(t(c,r),c=this.avcSample=n(!1,g.pts,g.dts,"")),l.forEach(function(A){switch(A.type){case 1:{x=!0,c||(c=u.avcSample=n(!0,g.pts,g.dts,"")),f&&(c.debug+="NDR "),c.frame=!0;var B=A.data;if(D&&B.length>4){var O=new w.default(B).readSliceType();(O===2||O===4||O===7||O===9)&&(c.key=!0)}break}case 5:x=!0,c||(c=u.avcSample=n(!0,g.pts,g.dts,"")),f&&(c.debug+="IDR "),c.key=!0,c.frame=!0;break;case 6:{x=!0,f&&c&&(c.debug+="SEI ");var W=new w.default(T(A.data));W.readUByte();for(var P=0,G=0,Q=!1,re=0;!Q&&W.bytesAvailable>1;){P=0;do re=W.readUByte(),P+=re;while(re===255);G=0;do re=W.readUByte(),G+=re;while(re===255);if(P===4&&W.bytesAvailable!==0){Q=!0;var le=W.readUByte();if(le===181){var Ee=W.readUShort();if(Ee===49){var _e=W.readUInt();if(_e===1195456820){var ne=W.readUByte();if(ne===3){for(var Te=W.readUByte(),Ae=W.readUByte(),fe=31&Te,J=[Te,Ae],Ie=0;Ie<fe;Ie++)J.push(W.readUByte()),J.push(W.readUByte()),J.push(W.readUByte());i(u._txtTrack.samples,{type:3,pts:g.pts,bytes:J})}}}}}else if(P===5&&W.bytesAvailable!==0){if(Q=!0,G>16){for(var it=[],et=0;et<16;et++)it.push(W.readUByte().toString(16)),(et===3||et===5||et===7||et===9)&&it.push("-");for(var Qe=G-16,nt=new Uint8Array(Qe),Me=0;Me<Qe;Me++)nt[Me]=W.readUByte();i(u._txtTrack.samples,{pts:g.pts,payloadType:P,uuid:it.join(""),userData:Object(H.utf8ArrayToStr)(nt),userDataBytes:nt})}}else if(G<W.bytesAvailable)for(var ze=0;ze<G;ze++)W.readUByte()}break}case 7:if(x=!0,D=!0,f&&c&&(c.debug+="SPS "),!r.sps){var Je=new w.default(A.data),$e=Je.readSPS();r.width=$e.width,r.height=$e.height,r.pixelRatio=$e.pixelRatio,r.sps=[A.data],r.duration=u._duration;for(var Xe=A.data.subarray(1,4),Fe="avc1.",We=0;We<3;We++){var yt=Xe[We].toString(16);yt.length<2&&(yt="0"+yt),Fe+=yt}r.codec=Fe}break;case 8:x=!0,f&&c&&(c.debug+="PPS "),r.pps||(r.pps=[A.data]);break;case 9:x=!1,r.audFound=!0,c&&t(c,r),c=u.avcSample=n(!1,g.pts,g.dts,f?"AUD ":"");break;case 12:x=!1;break;default:x=!1,c&&(c.debug+="unknown NAL "+A.type+" ");break}if(c&&x){var ft=c.units;ft.push(A)}}),h&&c&&(t(c,r),this.avcSample=null)},m.getLastNalUnit=function(){var g,h=this.avcSample,u;if(!h||h.units.length===0){var r=this._avcTrack.samples;h=r[r.length-1]}if((g=h)!==null&&g!==void 0&&g.units){var l=h.units;u=l[l.length-1]}return u},m.parseAVCNALu=function(g){var h=g.byteLength,u=this._avcTrack,r=u.naluState||0,l=r,f=[],c=0,x,D,A,B=-1,O=0;for(r===-1&&(B=0,O=g[0]&31,r=0,c=1);c<h;){if(x=g[c++],!r){r=x?0:1;continue}if(r===1){r=x?0:2;continue}if(!x)r=3;else if(x===1){if(B>=0){var W={data:g.subarray(B,c-r-1),type:O};f.push(W)}else{var P=this.getLastNalUnit();if(P&&(l&&c<=4-l&&(P.state&&(P.data=P.data.subarray(0,P.data.byteLength-l))),D=c-r-1,D>0)){var G=new Uint8Array(P.data.byteLength+D);G.set(P.data,0),G.set(g.subarray(0,D),P.data.byteLength),P.data=G,P.state=0}}c<h?(A=g[c]&31,B=c,O=A,r=0):r=-1}else r=0}if(B>=0&&r>=0){var Q={data:g.subarray(B,h),type:O,state:r};f.push(Q)}if(f.length===0){var re=this.getLastNalUnit();if(re){var le=new Uint8Array(re.data.byteLength+g.byteLength);le.set(re.data,0),le.set(g,re.data.byteLength),re.data=le}}return u.naluState=r,f},m.parseAACPES=function(g){var h=0,u=this._audioTrack,r=this.aacOverFlow,l=g.data;if(r){this.aacOverFlow=null;var f=r.sample.unit.byteLength,c=Math.min(r.missing,f),x=f-c;r.sample.unit.set(l.subarray(0,c),x),u.samples.push(r.sample),h=r.missing}var D,A;for(D=h,A=l.length;D<A-1&&!j.isHeader(l,D);D++);if(D!==h){var B,O;if(D<A-1?(B="AAC PES did not start with ADTS header,offset:"+D,O=!1):(B="no ADTS header found in AAC PES",O=!0),y.logger.warn("parsing error:"+B),this.observer.emit(R.Events.ERROR,R.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:O,reason:B}),O)return}j.initTrackConfig(u,this.observer,l,D,this.audioCodec);var W;if(g.pts!==void 0)W=g.pts;else if(r){var P=j.getFrameDuration(u.samplerate);W=r.sample.pts+P}else{y.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var G=0;D<A;)if(j.isHeader(l,D)){if(D+5<A){var Q=j.appendFrame(u,l,D,W,G);if(Q)if(Q.missing)this.aacOverFlow=Q;else{D+=Q.length,G++;continue}}break}else D++},m.parseMPEGPES=function(g){var h=g.data,u=h.length,r=0,l=0,f=g.pts;if(f===void 0){y.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;l<u;)if(C.isHeader(h,l)){var c=C.appendFrame(this._audioTrack,h,l,f,r);if(c)l+=c.length,r++;else break}else l++},m.parseID3PES=function(g){if(g.pts===void 0){y.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(g)},_}();o.minProbeByteLength=188;function n(_,m,E,g){return{key:_,frame:!1,pts:m,dts:E,units:[],debug:g,length:0}}function a(_,m){return(_[m+10]&31)<<8|_[m+11]}function s(_,m,E,g){var h={audio:-1,avc:-1,id3:-1,isAAC:!0},u=(_[m+1]&15)<<8|_[m+2],r=m+3+u-4,l=(_[m+10]&15)<<8|_[m+11];for(m+=12+l;m<r;){var f=(_[m+1]&31)<<8|_[m+2];switch(_[m]){case 207:if(!g){y.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:h.audio===-1&&(h.audio=f);break;case 21:h.id3===-1&&(h.id3=f);break;case 219:if(!g){y.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:h.avc===-1&&(h.avc=f);break;case 3:case 4:E?h.audio===-1&&(h.audio=f,h.isAAC=!1):y.logger.log("MPEG audio found, not supported in this browser");break;case 36:y.logger.warn("Unsupported HEVC stream type found");break;default:break}m+=((_[m+3]&15)<<8|_[m+4])+5}return h}function e(_){var m=0,E,g,h,u,r,l=_.data;if(!_||_.size===0)return null;for(;l[0].length<19&&l.length>1;){var f=new Uint8Array(l[0].length+l[1].length);f.set(l[0]),f.set(l[1],l[0].length),l[0]=f,l.splice(1,1)}E=l[0];var c=(E[0]<<16)+(E[1]<<8)+E[2];if(c===1){if(g=(E[4]<<8)+E[5],g&&g>_.size-6)return null;var x=E[7];x&192&&(u=(E[9]&14)*536870912+(E[10]&255)*4194304+(E[11]&254)*16384+(E[12]&255)*128+(E[13]&254)/2,x&64?(r=(E[14]&14)*536870912+(E[15]&255)*4194304+(E[16]&254)*16384+(E[17]&255)*128+(E[18]&254)/2,u-r>60*9e4&&(y.logger.warn(Math.round((u-r)/9e4)+"s delta between PTS and DTS, align them"),u=r)):r=u),h=E[8];var D=h+9;if(_.size<=D)return null;_.size-=D;for(var A=new Uint8Array(_.size),B=0,O=l.length;B<O;B++){E=l[B];var W=E.byteLength;if(D)if(D>W){D-=W;continue}else E=E.subarray(D),W-=D,D=0;A.set(E,m),m+=W}return g&&(g-=h+3),{data:A,pts:u,dts:r,len:g}}return null}function t(_,m){if(_.units.length&&_.frame){if(_.pts===void 0){var E=m.samples,g=E.length;if(g){var h=E[g-1];_.pts=h.pts,_.dts=h.dts}else{m.dropped++;return}}m.samples.push(_)}_.debug.length&&y.logger.log(_.pts+"/"+_.dts+":"+_.debug)}function i(_,m){var E=_.length;if(E>0){if(m.pts>=_[E-1].pts)_.push(m);else for(var g=E-1;g>=0;g--)if(m.pts<_[g].pts){_.splice(g,0,m);break}}else _.push(m)}function T(_){for(var m=_.byteLength,E=[],g=1;g<m-2;)_[g]===0&&_[g+1]===0&&_[g+2]===3?(E.push(g+2),g+=2):g++;if(E.length===0)return _;var h=m-E.length,u=new Uint8Array(h),r=0;for(g=0;g<h;r++,g++)r===E[0]&&(r++,E.shift()),u[g]=_[r];return u}L.default=o},"./src/errors.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"ErrorTypes",function(){return j}),I.d(L,"ErrorDetails",function(){return C});var j;(function(w){w.NETWORK_ERROR="networkError",w.MEDIA_ERROR="mediaError",w.KEY_SYSTEM_ERROR="keySystemError",w.MUX_ERROR="muxError",w.OTHER_ERROR="otherError"})(j||(j={}));var C;(function(w){w.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",w.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",w.KEY_SYSTEM_NO_SESSION="keySystemNoSession",w.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",w.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",w.MANIFEST_LOAD_ERROR="manifestLoadError",w.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",w.MANIFEST_PARSING_ERROR="manifestParsingError",w.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",w.LEVEL_EMPTY_ERROR="levelEmptyError",w.LEVEL_LOAD_ERROR="levelLoadError",w.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",w.LEVEL_SWITCH_ERROR="levelSwitchError",w.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",w.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",w.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",w.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",w.FRAG_LOAD_ERROR="fragLoadError",w.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",w.FRAG_DECRYPT_ERROR="fragDecryptError",w.FRAG_PARSING_ERROR="fragParsingError",w.REMUX_ALLOC_ERROR="remuxAllocError",w.KEY_LOAD_ERROR="keyLoadError",w.KEY_LOAD_TIMEOUT="keyLoadTimeOut",w.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",w.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",w.BUFFER_APPEND_ERROR="bufferAppendError",w.BUFFER_APPENDING_ERROR="bufferAppendingError",w.BUFFER_STALLED_ERROR="bufferStalledError",w.BUFFER_FULL_ERROR="bufferFullError",w.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",w.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",w.INTERNAL_EXCEPTION="internalException",w.INTERNAL_ABORTED="aborted",w.UNKNOWN="unknown"})(C||(C={}))},"./src/events.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"Events",function(){return j});var j;(function(C){C.MEDIA_ATTACHING="hlsMediaAttaching",C.MEDIA_ATTACHED="hlsMediaAttached",C.MEDIA_DETACHING="hlsMediaDetaching",C.MEDIA_DETACHED="hlsMediaDetached",C.BUFFER_RESET="hlsBufferReset",C.BUFFER_CODECS="hlsBufferCodecs",C.BUFFER_CREATED="hlsBufferCreated",C.BUFFER_APPENDING="hlsBufferAppending",C.BUFFER_APPENDED="hlsBufferAppended",C.BUFFER_EOS="hlsBufferEos",C.BUFFER_FLUSHING="hlsBufferFlushing",C.BUFFER_FLUSHED="hlsBufferFlushed",C.MANIFEST_LOADING="hlsManifestLoading",C.MANIFEST_LOADED="hlsManifestLoaded",C.MANIFEST_PARSED="hlsManifestParsed",C.LEVEL_SWITCHING="hlsLevelSwitching",C.LEVEL_SWITCHED="hlsLevelSwitched",C.LEVEL_LOADING="hlsLevelLoading",C.LEVEL_LOADED="hlsLevelLoaded",C.LEVEL_UPDATED="hlsLevelUpdated",C.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",C.LEVELS_UPDATED="hlsLevelsUpdated",C.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",C.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",C.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",C.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",C.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",C.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",C.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",C.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",C.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",C.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",C.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",C.CUES_PARSED="hlsCuesParsed",C.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",C.INIT_PTS_FOUND="hlsInitPtsFound",C.FRAG_LOADING="hlsFragLoading",C.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",C.FRAG_LOADED="hlsFragLoaded",C.FRAG_DECRYPTED="hlsFragDecrypted",C.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",C.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",C.FRAG_PARSING_METADATA="hlsFragParsingMetadata",C.FRAG_PARSED="hlsFragParsed",C.FRAG_BUFFERED="hlsFragBuffered",C.FRAG_CHANGED="hlsFragChanged",C.FPS_DROP="hlsFpsDrop",C.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",C.ERROR="hlsError",C.DESTROYING="hlsDestroying",C.KEY_LOADING="hlsKeyLoading",C.KEY_LOADED="hlsKeyLoaded",C.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",C.BACK_BUFFER_REACHED="hlsBackBufferReached"})(j||(j={}))},"./src/hls.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return _});var j=I("./node_modules/url-toolkit/src/url-toolkit.js"),C=I.n(j),w=I("./src/loader/playlist-loader.ts"),H=I("./src/loader/key-loader.ts"),U=I("./src/controller/id3-track-controller.ts"),R=I("./src/controller/latency-controller.ts"),S=I("./src/controller/level-controller.ts"),y=I("./src/controller/fragment-tracker.ts"),v=I("./src/controller/stream-controller.ts"),d=I("./src/is-supported.ts"),o=I("./src/utils/logger.ts"),n=I("./src/config.ts"),a=I("./node_modules/eventemitter3/index.js"),s=I.n(a),e=I("./src/events.ts"),t=I("./src/errors.ts");function i(m,E){for(var g=0;g<E.length;g++){var h=E[g];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(m,h.key,h)}}function T(m,E,g){return E&&i(m.prototype,E),g&&i(m,g),m}var _=function(){m.isSupported=function(){return Object(d.isSupported)()};function m(g){g===void 0&&(g={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new a.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var h=this.config=Object(n.mergeConfig)(m.DefaultConfig,g);this.userConfig=g,Object(o.enableLogs)(h.debug),this._autoLevelCapping=-1,h.progressive&&Object(n.enableStreamingMode)(h);var u=h.abrController,r=h.bufferController,l=h.capLevelController,f=h.fpsController,c=this.abrController=new u(this),x=this.bufferController=new r(this),D=this.capLevelController=new l(this),A=new f(this),B=new w.default(this),O=new H.default(this),W=new U.default(this),P=this.levelController=new S.default(this),G=new y.FragmentTracker(this),Q=this.streamController=new v.default(this,G);D.setStreamController(Q),A.setStreamController(Q);var re=[P,Q];this.networkControllers=re;var le=[B,O,c,x,D,A,W,G];this.audioTrackController=this.createController(h.audioTrackController,null,re),this.createController(h.audioStreamController,G,re),this.subtitleTrackController=this.createController(h.subtitleTrackController,null,re),this.createController(h.subtitleStreamController,G,re),this.createController(h.timelineController,null,le),this.emeController=this.createController(h.emeController,null,le),this.cmcdController=this.createController(h.cmcdController,null,le),this.latencyController=this.createController(R.default,null,le),this.coreComponents=le}var E=m.prototype;return E.createController=function(h,u,r){if(h){var l=u?new h(this,u):new h(this);return r&&r.push(l),l}return null},E.on=function(h,u,r){r===void 0&&(r=this),this._emitter.on(h,u,r)},E.once=function(h,u,r){r===void 0&&(r=this),this._emitter.once(h,u,r)},E.removeAllListeners=function(h){this._emitter.removeAllListeners(h)},E.off=function(h,u,r,l){r===void 0&&(r=this),this._emitter.off(h,u,r,l)},E.listeners=function(h){return this._emitter.listeners(h)},E.emit=function(h,u,r){return this._emitter.emit(h,u,r)},E.trigger=function(h,u){if(this.config.debug)return this.emit(h,h,u);try{return this.emit(h,h,u)}catch(r){o.logger.error("An internal error happened while handling event "+h+'. Error message: "'+r.message+'". Here is a stacktrace:',r),this.trigger(e.Events.ERROR,{type:t.ErrorTypes.OTHER_ERROR,details:t.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:h,error:r})}return!1},E.listenerCount=function(h){return this._emitter.listenerCount(h)},E.destroy=function(){o.logger.log("destroy"),this.trigger(e.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(h){return h.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(h){return h.destroy()}),this.coreComponents.length=0},E.attachMedia=function(h){o.logger.log("attachMedia"),this._media=h,this.trigger(e.Events.MEDIA_ATTACHING,{media:h})},E.detachMedia=function(){o.logger.log("detachMedia"),this.trigger(e.Events.MEDIA_DETACHING,void 0),this._media=null},E.loadSource=function(h){this.stopLoad();var u=this.media,r=this.url,l=this.url=j.buildAbsoluteURL(self.location.href,h,{alwaysNormalize:!0});o.logger.log("loadSource:"+l),u&&r&&r!==l&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(u)),this.trigger(e.Events.MANIFEST_LOADING,{url:h})},E.startLoad=function(h){h===void 0&&(h=-1),o.logger.log("startLoad("+h+")"),this.networkControllers.forEach(function(u){u.startLoad(h)})},E.stopLoad=function(){o.logger.log("stopLoad"),this.networkControllers.forEach(function(h){h.stopLoad()})},E.swapAudioCodec=function(){o.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},E.recoverMediaError=function(){o.logger.log("recoverMediaError");var h=this._media;this.detachMedia(),h&&this.attachMedia(h)},E.removeLevel=function(h,u){u===void 0&&(u=0),this.levelController.removeLevel(h,u)},T(m,[{key:"levels",get:function(){var h=this.levelController.levels;return h||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(h){o.logger.log("set currentLevel:"+h),this.loadLevel=h,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(h){o.logger.log("set nextLevel:"+h),this.levelController.manualLevel=h,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(h){o.logger.log("set loadLevel:"+h),this.levelController.manualLevel=h}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(h){this.levelController.nextLoadLevel=h}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(h){o.logger.log("set firstLevel:"+h),this.levelController.firstLevel=h}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(h){o.logger.log("set startLevel:"+h),h!==-1&&(h=Math.max(h,this.minAutoLevel)),this.levelController.startLevel=h}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(h){var u=!!h;u!==this.config.capLevelToPlayerSize&&(u?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=u)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(h){this._autoLevelCapping!==h&&(o.logger.log("set autoLevelCapping:"+h),this._autoLevelCapping=h)}},{key:"bandwidthEstimate",get:function(){var h=this.abrController.bwEstimator;return h?h.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var h=this.levels,u=this.config.minAutoBitrate;if(!h)return 0;for(var r=h.length,l=0;l<r;l++)if(h[l].maxBitrate>u)return l;return 0}},{key:"maxAutoLevel",get:function(){var h=this.levels,u=this.autoLevelCapping,r;return u===-1&&h&&h.length?r=h.length-1:r=u,r}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(h){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,h)}},{key:"audioTracks",get:function(){var h=this.audioTrackController;return h?h.audioTracks:[]}},{key:"audioTrack",get:function(){var h=this.audioTrackController;return h?h.audioTrack:-1},set:function(h){var u=this.audioTrackController;u&&(u.audioTrack=h)}},{key:"subtitleTracks",get:function(){var h=this.subtitleTrackController;return h?h.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var h=this.subtitleTrackController;return h?h.subtitleTrack:-1},set:function(h){var u=this.subtitleTrackController;u&&(u.subtitleTrack=h)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var h=this.subtitleTrackController;return h?h.subtitleDisplay:!1},set:function(h){var u=this.subtitleTrackController;u&&(u.subtitleDisplay=h)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(h){this.config.lowLatencyMode=h}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return e.Events}},{key:"ErrorTypes",get:function(){return t.ErrorTypes}},{key:"ErrorDetails",get:function(){return t.ErrorDetails}},{key:"DefaultConfig",get:function(){return m.defaultConfig?m.defaultConfig:n.hlsDefaultConfig},set:function(h){m.defaultConfig=h}}]),m}();_.defaultConfig=void 0},"./src/is-supported.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"isSupported",function(){return w}),I.d(L,"changeTypeSupported",function(){return H});var j=I("./src/utils/mediasource-helper.ts");function C(){return self.SourceBuffer||self.WebKitSourceBuffer}function w(){var U=Object(j.getMediaSource)();if(!U)return!1;var R=C(),S=U&&typeof U.isTypeSupported=="function"&&U.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),y=!R||R.prototype&&typeof R.prototype.appendBuffer=="function"&&typeof R.prototype.remove=="function";return!!S&&!!y}function H(){var U,R=C();return typeof(R==null||((U=R.prototype)===null||U===void 0)?void 0:U.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return o}),I.d(L,"LoadError",function(){return a});var j=I("./src/polyfills/number.ts"),C=I("./src/errors.ts");function w(s,e){s.prototype=Object.create(e.prototype),s.prototype.constructor=s,y(s,e)}function H(s){var e=typeof Map=="function"?new Map:void 0;return H=function(i){if(i===null||!S(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(i))return e.get(i);e.set(i,T)}function T(){return U(i,arguments,v(this).constructor)}return T.prototype=Object.create(i.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),y(T,i)},H(s)}function U(s,e,t){return R()?U=Reflect.construct:U=function(T,_,m){var E=[null];E.push.apply(E,_);var g=Function.bind.apply(T,E),h=new g;return m&&y(h,m.prototype),h},U.apply(null,arguments)}function R(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(s){return!1}}function S(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function y(s,e){return y=Object.setPrototypeOf||function(i,T){return i.__proto__=T,i},y(s,e)}function v(s){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(s)}var d=Math.pow(2,17),o=function(){function s(t){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}var e=s.prototype;return e.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},e.abort=function(){this.loader&&this.loader.abort()},e.load=function(i,T){var _=this,m=i.url;if(!m)return Promise.reject(new a({type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,networkDetails:null},"Fragment does not have a "+(m?"part list":"url")));this.abort();var E=this.config,g=E.fLoader,h=E.loader;return new Promise(function(u,r){_.loader&&_.loader.destroy();var l=_.loader=i.loader=g?new g(E):new h(E),f=n(i),c={timeout:E.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:E.fragLoadingMaxRetryTimeout,highWaterMark:d};i.stats=l.stats,l.load(f,c,{onSuccess:function(D,A,B,O){_.resetLoader(i,l),u({frag:i,part:null,payload:D.data,networkDetails:O})},onError:function(D,A,B){_.resetLoader(i,l),r(new a({type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,response:D,networkDetails:B}))},onAbort:function(D,A,B){_.resetLoader(i,l),r(new a({type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:i,networkDetails:B}))},onTimeout:function(D,A,B){_.resetLoader(i,l),r(new a({type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:i,networkDetails:B}))},onProgress:function(D,A,B,O){T&&T({frag:i,part:null,payload:B,networkDetails:O})}})})},e.loadPart=function(i,T,_){var m=this;this.abort();var E=this.config,g=E.fLoader,h=E.loader;return new Promise(function(u,r){m.loader&&m.loader.destroy();var l=m.loader=i.loader=g?new g(E):new h(E),f=n(i,T),c={timeout:E.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:E.fragLoadingMaxRetryTimeout,highWaterMark:d};T.stats=l.stats,l.load(f,c,{onSuccess:function(D,A,B,O){m.resetLoader(i,l),m.updateStatsFromPart(i,T);var W={frag:i,part:T,payload:D.data,networkDetails:O};_(W),u(W)},onError:function(D,A,B){m.resetLoader(i,l),r(new a({type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:i,part:T,response:D,networkDetails:B}))},onAbort:function(D,A,B){i.stats.aborted=T.stats.aborted,m.resetLoader(i,l),r(new a({type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:i,part:T,networkDetails:B}))},onTimeout:function(D,A,B){m.resetLoader(i,l),r(new a({type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:i,part:T,networkDetails:B}))}})})},e.updateStatsFromPart=function(i,T){var _=i.stats,m=T.stats,E=m.total;if(_.loaded+=m.loaded,E){var g=Math.round(i.duration/T.duration),h=Math.min(Math.round(_.loaded/E),g),u=g-h,r=u*Math.round(_.loaded/h);_.total=_.loaded+r}else _.total=Math.max(_.loaded,_.total);var l=_.loading,f=m.loading;l.start?l.first+=f.first-f.start:(l.start=f.start,l.first=f.first),l.end=f.end},e.resetLoader=function(i,T){i.loader=null,this.loader===T&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),T.destroy()},s}();function n(s,e){e===void 0&&(e=null);var t=e||s,i={frag:s,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},T=t.byteRangeStartOffset,_=t.byteRangeEndOffset;return Object(j.isFiniteNumber)(T)&&Object(j.isFiniteNumber)(_)&&(i.rangeStart=T,i.rangeEnd=_),i}var a=function(s){w(e,s);function e(t){for(var i,T=arguments.length,_=new Array(T>1?T-1:0),m=1;m<T;m++)_[m-1]=arguments[m];return i=s.call.apply(s,[this].concat(_))||this,i.data=void 0,i.data=t,i}return e}(H(Error))},"./src/loader/fragment.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"ElementaryStreamTypes",function(){return o}),I.d(L,"BaseSegment",function(){return n}),I.d(L,"Fragment",function(){return a}),I.d(L,"Part",function(){return s});var j=I("./src/polyfills/number.ts"),C=I("./node_modules/url-toolkit/src/url-toolkit.js"),w=I.n(C),H=I("./src/utils/logger.ts"),U=I("./src/loader/level-key.ts"),R=I("./src/loader/load-stats.ts");function S(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,y(e,t)}function y(e,t){return y=Object.setPrototypeOf||function(T,_){return T.__proto__=_,T},y(e,t)}function v(e,t){for(var i=0;i<t.length;i++){var T=t[i];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(e,T.key,T)}}function d(e,t,i){return t&&v(e.prototype,t),i&&v(e,i),e}var o;(function(e){e.AUDIO="audio",e.VIDEO="video",e.AUDIOVIDEO="audiovideo"})(o||(o={}));var n=function(){function e(i){var T;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(T={},T[o.AUDIO]=null,T[o.VIDEO]=null,T[o.AUDIOVIDEO]=null,T),this.baseurl=i}var t=e.prototype;return t.setByteRange=function(T,_){var m=T.split("@",2),E=[];m.length===1?E[0]=_?_.byteRangeEndOffset:0:E[0]=parseInt(m[1]),E[1]=parseInt(m[0])+E[0],this._byteRange=E},d(e,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(C.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(T){this._url=T}}]),e}(),a=function(e){S(t,e);function t(T,_){var m;return m=e.call(this,_)||this,m._decryptdata=null,m.rawProgramDateTime=null,m.programDateTime=null,m.tagList=[],m.duration=0,m.sn=0,m.levelkey=void 0,m.type=void 0,m.loader=null,m.level=-1,m.cc=0,m.startPTS=void 0,m.endPTS=void 0,m.appendedPTS=void 0,m.startDTS=void 0,m.endDTS=void 0,m.start=0,m.deltaPTS=void 0,m.maxStartPTS=void 0,m.minEndPTS=void 0,m.stats=new R.LoadStats,m.urlId=0,m.data=void 0,m.bitrateTest=!1,m.title=null,m.initSegment=null,m.type=T,m}var i=t.prototype;return i.createInitializationVector=function(_){for(var m=new Uint8Array(16),E=12;E<16;E++)m[E]=_>>8*(15-E)&255;return m},i.setDecryptDataFromLevelKey=function(_,m){var E=_;return(_==null?void 0:_.method)==="AES-128"&&_.uri&&!_.iv&&(E=U.LevelKey.fromURI(_.uri),E.method=_.method,E.iv=this.createInitializationVector(m),E.keyFormat="identity"),E},i.setElementaryStreamInfo=function(_,m,E,g,h,u){u===void 0&&(u=!1);var r=this.elementaryStreams,l=r[_];if(!l){r[_]={startPTS:m,endPTS:E,startDTS:g,endDTS:h,partial:u};return}l.startPTS=Math.min(l.startPTS,m),l.endPTS=Math.max(l.endPTS,E),l.startDTS=Math.min(l.startDTS,g),l.endDTS=Math.max(l.endDTS,h)},i.clearElementaryStreamInfo=function(){var _=this.elementaryStreams;_[o.AUDIO]=null,_[o.VIDEO]=null,_[o.AUDIOVIDEO]=null},d(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var _=this.sn;typeof _!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&H.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),_=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,_)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(j.isFiniteNumber)(this.programDateTime))return null;var _=Object(j.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+_*1e3}},{key:"encrypted",get:function(){var _;return!!((_=this.decryptdata)!==null&&_!==void 0&&_.keyFormat&&this.decryptdata.uri)}}]),t}(n),s=function(e){S(t,e);function t(i,T,_,m,E){var g;g=e.call(this,_)||this,g.fragOffset=0,g.duration=0,g.gap=!1,g.independent=!1,g.relurl=void 0,g.fragment=void 0,g.index=void 0,g.stats=new R.LoadStats,g.duration=i.decimalFloatingPoint("DURATION"),g.gap=i.bool("GAP"),g.independent=i.bool("INDEPENDENT"),g.relurl=i.enumeratedString("URI"),g.fragment=T,g.index=m;var h=i.enumeratedString("BYTERANGE");return h&&g.setByteRange(h,E),E&&(g.fragOffset=E.fragOffset+E.duration),g}return d(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var T=this.elementaryStreams;return!!(T.audio||T.video||T.audiovideo)}}]),t}(n)},"./src/loader/key-loader.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return H});var j=I("./src/events.ts"),C=I("./src/errors.ts"),w=I("./src/utils/logger.ts"),H=function(){function U(S){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=S,this._registerListeners()}var R=U.prototype;return R._registerListeners=function(){this.hls.on(j.Events.KEY_LOADING,this.onKeyLoading,this)},R._unregisterListeners=function(){this.hls.off(j.Events.KEY_LOADING,this.onKeyLoading)},R.destroy=function(){this._unregisterListeners();for(var y in this.loaders){var v=this.loaders[y];v&&v.destroy()}this.loaders={}},R.onKeyLoading=function(y,v){var d=v.frag,o=d.type,n=this.loaders[o];if(!d.decryptdata){w.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var a=d.decryptdata.uri;if(a!==this.decrypturl||this.decryptkey===null){var s=this.hls.config;if(n&&(w.logger.warn("abort previous key loader for type:"+o),n.abort()),!a){w.logger.warn("key uri is falsy");return}var e=s.loader,t=d.loader=this.loaders[o]=new e(s);this.decrypturl=a,this.decryptkey=null;var i={url:a,frag:d,responseType:"arraybuffer"},T={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout,highWaterMark:0},_={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};t.load(i,T,_)}else this.decryptkey&&(d.decryptdata.key=this.decryptkey,this.hls.trigger(j.Events.KEY_LOADED,{frag:d}))},R.loadsuccess=function(y,v,d){var o=d.frag;if(!o.decryptdata){w.logger.error("after key load, decryptdata unset");return}this.decryptkey=o.decryptdata.key=new Uint8Array(y.data),o.loader=null,delete this.loaders[o.type],this.hls.trigger(j.Events.KEY_LOADED,{frag:o})},R.loaderror=function(y,v){var d=v.frag,o=d.loader;o&&o.abort(),delete this.loaders[d.type],this.hls.trigger(j.Events.ERROR,{type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:d,response:y})},R.loadtimeout=function(y,v){var d=v.frag,o=d.loader;o&&o.abort(),delete this.loaders[d.type],this.hls.trigger(j.Events.ERROR,{type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:d})},U}()},"./src/loader/level-details.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"LevelDetails",function(){return U});var j=I("./src/polyfills/number.ts");function C(R,S){for(var y=0;y<S.length;y++){var v=S[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(R,v.key,v)}}function w(R,S,y){return S&&C(R.prototype,S),y&&C(R,y),R}var H=10,U=function(){function R(y){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=y}var S=R.prototype;return S.reloaded=function(v){if(!v){this.advanced=!0,this.updated=!0;return}var d=this.lastPartSn-v.lastPartSn,o=this.lastPartIndex-v.lastPartIndex;this.updated=this.endSN!==v.endSN||!!o||!!d,this.advanced=this.endSN>v.endSN||d>0||d===0&&o>0,this.updated||this.advanced?this.misses=Math.floor(v.misses*.6):this.misses=v.misses+1,this.availabilityDelay=v.availabilityDelay},w(R,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(j.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||H}},{key:"drift",get:function(){var v=this.driftEndTime-this.driftStartTime;if(v>0){var d=this.driftEnd-this.driftStart;return d*1e3/v}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var v;return(v=this.partList)!==null&&v!==void 0&&v.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var v;return(v=this.fragments)!==null&&v!==void 0&&v.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var v;return(v=this.partList)!==null&&v!==void 0&&v.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var v;return(v=this.partList)!==null&&v!==void 0&&v.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),R}()},"./src/loader/level-key.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"LevelKey",function(){return U});var j=I("./node_modules/url-toolkit/src/url-toolkit.js"),C=I.n(j);function w(R,S){for(var y=0;y<S.length;y++){var v=S[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(R,v.key,v)}}function H(R,S,y){return S&&w(R.prototype,S),y&&w(R,y),R}var U=function(){R.fromURL=function(y,v){return new R(y,v)},R.fromURI=function(y){return new R(y)};function R(S,y){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,y?this._uri=Object(j.buildAbsoluteURL)(S,y,{alwaysNormalize:!0}):this._uri=S}return H(R,[{key:"uri",get:function(){return this._uri}}]),R}()},"./src/loader/load-stats.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"LoadStats",function(){return j});var j=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return t});var j=I("./src/polyfills/number.ts"),C=I("./node_modules/url-toolkit/src/url-toolkit.js"),w=I.n(C),H=I("./src/loader/fragment.ts"),U=I("./src/loader/level-details.ts"),R=I("./src/loader/level-key.ts"),S=I("./src/utils/attr-list.ts"),y=I("./src/utils/logger.ts"),v=I("./src/utils/codecs.ts"),d=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,o=/#EXT-X-MEDIA:(.*)/g,n=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),a=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),s=/\.(mp4|m4s|m4v|m4a)$/i;function e(E){var g,h;return s.test((g=(h=C.parseURL(E))===null||h===void 0?void 0:h.path)!=null?g:"")}var t=function(){function E(){}return E.findGroup=function(h,u){for(var r=0;r<h.length;r++){var l=h[r];if(l.id===u)return l}},E.convertAVC1ToAVCOTI=function(h){var u=h.split(".");if(u.length>2){var r=u.shift()+".";return r+=parseInt(u.shift()).toString(16),r+=("000"+parseInt(u.shift()).toString(16)).substr(-4),r}return h},E.resolve=function(h,u){return C.buildAbsoluteURL(u,h,{alwaysNormalize:!0})},E.parseMasterPlaylist=function(h,u){var r=[],l={},f=!1;d.lastIndex=0;for(var c;(c=d.exec(h))!=null;)if(c[1]){var x=new S.AttrList(c[1]),D={attrs:x,bitrate:x.decimalInteger("AVERAGE-BANDWIDTH")||x.decimalInteger("BANDWIDTH"),name:x.NAME,url:E.resolve(c[2],u)},A=x.decimalResolution("RESOLUTION");A&&(D.width=A.width,D.height=A.height),i((x.CODECS||"").split(/[ ,]+/).filter(function(O){return O}),D),D.videoCodec&&D.videoCodec.indexOf("avc1")!==-1&&(D.videoCodec=E.convertAVC1ToAVCOTI(D.videoCodec)),r.push(D)}else if(c[3]){var B=new S.AttrList(c[3]);B["DATA-ID"]&&(f=!0,l[B["DATA-ID"]]=B)}return{levels:r,sessionData:f?l:null}},E.parseMasterPlaylistMedia=function(h,u,r,l){l===void 0&&(l=[]);var f,c=[],x=0;for(o.lastIndex=0;(f=o.exec(h))!==null;){var D=new S.AttrList(f[1]);if(D.TYPE===r){var A={attrs:D,bitrate:0,id:x++,groupId:D["GROUP-ID"],instreamId:D["INSTREAM-ID"],name:D.NAME||D.LANGUAGE||"",type:r,default:D.bool("DEFAULT"),autoselect:D.bool("AUTOSELECT"),forced:D.bool("FORCED"),lang:D.LANGUAGE,url:D.URI?E.resolve(D.URI,u):""};if(l.length){var B=E.findGroup(l,A.groupId)||l[0];T(A,B,"audioCodec"),T(A,B,"textCodec")}c.push(A)}}return c},E.parseLevelPlaylist=function(h,u,r,l,f){var c=new U.LevelDetails(u),x=c.fragments,D=null,A=0,B=0,O=0,W=0,P=null,G=new H.Fragment(l,u),Q,re,le,Ee=-1,_e=!1;for(n.lastIndex=0,c.m3u8=h;(Q=n.exec(h))!==null;){_e&&(_e=!1,G=new H.Fragment(l,u),G.start=O,G.sn=A,G.cc=W,G.level=r,D&&(G.initSegment=D,G.rawProgramDateTime=D.rawProgramDateTime));var ne=Q[1];if(ne){G.duration=parseFloat(ne);var Te=(" "+Q[2]).slice(1);G.title=Te||null,G.tagList.push(Te?["INF",ne,Te]:["INF",ne])}else if(Q[3])Object(j.isFiniteNumber)(G.duration)&&(G.start=O,le&&(G.levelkey=le),G.sn=A,G.level=r,G.cc=W,G.urlId=f,x.push(G),G.relurl=(" "+Q[3]).slice(1),m(G,P),P=G,O+=G.duration,A++,B=0,_e=!0);else if(Q[4]){var Ae=(" "+Q[4]).slice(1);P?G.setByteRange(Ae,P):G.setByteRange(Ae)}else if(Q[5])G.rawProgramDateTime=(" "+Q[5]).slice(1),G.tagList.push(["PROGRAM-DATE-TIME",G.rawProgramDateTime]),Ee===-1&&(Ee=x.length);else{if(Q=Q[0].match(a),!Q){y.logger.warn("No matches on slow regex match for level playlist!");continue}for(re=1;re<Q.length&&!(typeof Q[re]!="undefined");re++);var fe=(" "+Q[re]).slice(1),J=(" "+Q[re+1]).slice(1),Ie=Q[re+2]?(" "+Q[re+2]).slice(1):"";switch(fe){case"PLAYLIST-TYPE":c.type=J.toUpperCase();break;case"MEDIA-SEQUENCE":A=c.startSN=parseInt(J);break;case"SKIP":{var it=new S.AttrList(J),et=it.decimalInteger("SKIPPED-SEGMENTS");if(Object(j.isFiniteNumber)(et)){c.skippedSegments=et;for(var Qe=et;Qe--;)x.unshift(null);A+=et}var nt=it.enumeratedString("RECENTLY-REMOVED-DATERANGES");nt&&(c.recentlyRemovedDateranges=nt.split(" "));break}case"TARGETDURATION":c.targetduration=parseFloat(J);break;case"VERSION":c.version=parseInt(J);break;case"EXTM3U":break;case"ENDLIST":c.live=!1;break;case"#":(J||Ie)&&G.tagList.push(Ie?[J,Ie]:[J]);break;case"DIS":W++;case"GAP":G.tagList.push([fe]);break;case"BITRATE":G.tagList.push([fe,J]);break;case"DISCONTINUITY-SEQ":W=parseInt(J);break;case"KEY":{var Me,ze=new S.AttrList(J),Je=ze.enumeratedString("METHOD"),$e=ze.URI,Xe=ze.hexadecimalInteger("IV"),Fe=ze.enumeratedString("KEYFORMATVERSIONS"),We=ze.enumeratedString("KEYID"),yt=(Me=ze.enumeratedString("KEYFORMAT"))!=null?Me:"identity",ft=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(ft.indexOf(yt)>-1){y.logger.warn("Keyformat "+yt+" is not supported from the manifest");continue}else if(yt!=="identity")continue;Je&&(le=R.LevelKey.fromURL(u,$e),$e&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Je)>=0&&(le.method=Je,le.keyFormat=yt,We&&(le.keyID=We),Fe&&(le.keyFormatVersions=Fe),le.iv=Xe));break}case"START":{var ut=new S.AttrList(J),rt=ut.decimalFloatingPoint("TIME-OFFSET");Object(j.isFiniteNumber)(rt)&&(c.startTimeOffset=rt);break}case"MAP":{var Tt=new S.AttrList(J);G.relurl=Tt.URI,Tt.BYTERANGE&&G.setByteRange(Tt.BYTERANGE),G.level=r,G.sn="initSegment",le&&(G.levelkey=le),G.initSegment=null,D=G,_e=!0;break}case"SERVER-CONTROL":{var _t=new S.AttrList(J);c.canBlockReload=_t.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=_t.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&_t.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=_t.optionalFloat("PART-HOLD-BACK",0),c.holdBack=_t.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var me=new S.AttrList(J);c.partTarget=me.decimalFloatingPoint("PART-TARGET");break}case"PART":{var xe=c.partList;xe||(xe=c.partList=[]);var De=B>0?xe[xe.length-1]:void 0,ke=B++,be=new H.Part(new S.AttrList(J),G,u,ke,De);xe.push(be),G.duration+=be.duration;break}case"PRELOAD-HINT":{var Le=new S.AttrList(J);c.preloadHint=Le;break}case"RENDITION-REPORT":{var ce=new S.AttrList(J);c.renditionReports=c.renditionReports||[],c.renditionReports.push(ce);break}default:y.logger.warn("line parsed but not handled: "+Q);break}}}P&&!P.relurl?(x.pop(),O-=P.duration,c.partList&&(c.fragmentHint=P)):c.partList&&(m(G,P),G.cc=W,c.fragmentHint=G);var ee=x.length,te=x[0],V=x[ee-1];if(O+=c.skippedSegments*c.targetduration,O>0&&ee&&V){c.averagetargetduration=O/ee;var X=V.sn;c.endSN=X!=="initSegment"?X:0,te&&(c.startCC=te.cc,te.initSegment||c.fragments.every(function(q){return q.relurl&&e(q.relurl)})&&(y.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),G=new H.Fragment(l,u),G.relurl=V.relurl,G.level=r,G.sn="initSegment",te.initSegment=G,c.needSidxRanges=!0))}else c.endSN=0,c.startCC=0;return c.fragmentHint&&(O+=c.fragmentHint.duration),c.totalduration=O,c.endCC=W,Ee>0&&_(x,Ee),c},E}();function i(E,g){["video","audio","text"].forEach(function(h){var u=E.filter(function(l){return Object(v.isCodecType)(l,h)});if(u.length){var r=u.filter(function(l){return l.lastIndexOf("avc1",0)===0||l.lastIndexOf("mp4a",0)===0});g[h+"Codec"]=r.length>0?r[0]:u[0],E=E.filter(function(l){return u.indexOf(l)===-1})}}),g.unknownCodecs=E}function T(E,g,h){var u=g[h];u&&(E[h]=u)}function _(E,g){for(var h=E[g],u=g;u--;){var r=E[u];if(!r)return;r.programDateTime=h.programDateTime-r.duration*1e3,h=r}}function m(E,g){E.rawProgramDateTime?E.programDateTime=Date.parse(E.rawProgramDateTime):g!=null&&g.programDateTime&&(E.programDateTime=g.endProgramDateTime),Object(j.isFiniteNumber)(E.programDateTime)||(E.programDateTime=null,E.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/polyfills/number.ts"),C=I("./src/events.ts"),w=I("./src/errors.ts"),H=I("./src/utils/logger.ts"),U=I("./src/utils/mp4-tools.ts"),R=I("./src/loader/m3u8-parser.ts"),S=I("./src/types/loader.ts"),y=I("./src/utils/attr-list.ts");function v(n){var a=n.type;switch(a){case S.PlaylistContextType.AUDIO_TRACK:return S.PlaylistLevelType.AUDIO;case S.PlaylistContextType.SUBTITLE_TRACK:return S.PlaylistLevelType.SUBTITLE;default:return S.PlaylistLevelType.MAIN}}function d(n,a){var s=n.url;return(s===void 0||s.indexOf("data:")===0)&&(s=a.url),s}var o=function(){function n(s){this.hls=void 0,this.loaders=Object.create(null),this.hls=s,this.registerListeners()}var a=n.prototype;return a.registerListeners=function(){var e=this.hls;e.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(C.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(C.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(C.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},a.unregisterListeners=function(){var e=this.hls;e.off(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(C.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(C.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(C.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},a.createInternalLoader=function(e){var t=this.hls.config,i=t.pLoader,T=t.loader,_=i||T,m=new _(t);return e.loader=m,this.loaders[e.type]=m,m},a.getInternalLoader=function(e){return this.loaders[e.type]},a.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},a.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},a.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},a.onManifestLoading=function(e,t){var i=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:S.PlaylistContextType.MANIFEST,url:i,deliveryDirectives:null})},a.onLevelLoading=function(e,t){var i=t.id,T=t.level,_=t.url,m=t.deliveryDirectives;this.load({id:i,groupId:null,level:T,responseType:"text",type:S.PlaylistContextType.LEVEL,url:_,deliveryDirectives:m})},a.onAudioTrackLoading=function(e,t){var i=t.id,T=t.groupId,_=t.url,m=t.deliveryDirectives;this.load({id:i,groupId:T,level:null,responseType:"text",type:S.PlaylistContextType.AUDIO_TRACK,url:_,deliveryDirectives:m})},a.onSubtitleTrackLoading=function(e,t){var i=t.id,T=t.groupId,_=t.url,m=t.deliveryDirectives;this.load({id:i,groupId:T,level:null,responseType:"text",type:S.PlaylistContextType.SUBTITLE_TRACK,url:_,deliveryDirectives:m})},a.load=function(e){var t,i=this.hls.config,T=this.getInternalLoader(e);if(T){var _=T.context;if(_&&_.url===e.url){H.logger.trace("[playlist-loader]: playlist request ongoing");return}H.logger.log("[playlist-loader]: aborting previous loader for type: "+e.type),T.abort()}var m,E,g,h;switch(e.type){case S.PlaylistContextType.MANIFEST:m=i.manifestLoadingMaxRetry,E=i.manifestLoadingTimeOut,g=i.manifestLoadingRetryDelay,h=i.manifestLoadingMaxRetryTimeout;break;case S.PlaylistContextType.LEVEL:case S.PlaylistContextType.AUDIO_TRACK:case S.PlaylistContextType.SUBTITLE_TRACK:m=0,E=i.levelLoadingTimeOut;break;default:m=i.levelLoadingMaxRetry,E=i.levelLoadingTimeOut,g=i.levelLoadingRetryDelay,h=i.levelLoadingMaxRetryTimeout;break}if(T=this.createInternalLoader(e),(t=e.deliveryDirectives)!==null&&t!==void 0&&t.part){var u;if(e.type===S.PlaylistContextType.LEVEL&&e.level!==null?u=this.hls.levels[e.level].details:e.type===S.PlaylistContextType.AUDIO_TRACK&&e.id!==null?u=this.hls.audioTracks[e.id].details:e.type===S.PlaylistContextType.SUBTITLE_TRACK&&e.id!==null&&(u=this.hls.subtitleTracks[e.id].details),u){var r=u.partTarget,l=u.targetduration;r&&l&&(E=Math.min(Math.max(r*3,l*.8)*1e3,E))}}var f={timeout:E,maxRetry:m,retryDelay:g,maxRetryDelay:h,highWaterMark:0},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};T.load(e,f,c)},a.loadsuccess=function(e,t,i,T){if(T===void 0&&(T=null),i.isSidxRequest){this.handleSidxRequest(e,i),this.handlePlaylistLoaded(e,t,i,T);return}this.resetInternalLoader(i.type);var _=e.data;if(_.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(e,i,"no EXTM3U delimiter",T);return}t.parsing.start=performance.now(),_.indexOf("#EXTINF:")>0||_.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(e,t,i,T):this.handleMasterPlaylist(e,t,i,T)},a.loaderror=function(e,t,i){i===void 0&&(i=null),this.handleNetworkError(t,i,!1,e)},a.loadtimeout=function(e,t,i){i===void 0&&(i=null),this.handleNetworkError(t,i,!0)},a.handleMasterPlaylist=function(e,t,i,T){var _=this.hls,m=e.data,E=d(e,i),g=R.default.parseMasterPlaylist(m,E),h=g.levels,u=g.sessionData;if(!h.length){this.handleManifestParsingError(e,i,"no level found in manifest",T);return}var r=h.map(function(A){return{id:A.attrs.AUDIO,audioCodec:A.audioCodec}}),l=h.map(function(A){return{id:A.attrs.SUBTITLES,textCodec:A.textCodec}}),f=R.default.parseMasterPlaylistMedia(m,E,"AUDIO",r),c=R.default.parseMasterPlaylistMedia(m,E,"SUBTITLES",l),x=R.default.parseMasterPlaylistMedia(m,E,"CLOSED-CAPTIONS");if(f.length){var D=f.some(function(A){return!A.url});!D&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(H.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new y.AttrList({}),bitrate:0,url:""}))}_.trigger(C.Events.MANIFEST_LOADED,{levels:h,audioTracks:f,subtitles:c,captions:x,url:E,stats:t,networkDetails:T,sessionData:u})},a.handleTrackOrLevelPlaylist=function(e,t,i,T){var _=this.hls,m=i.id,E=i.level,g=i.type,h=d(e,i),u=Object(j.isFiniteNumber)(m)?m:0,r=Object(j.isFiniteNumber)(E)?E:u,l=v(i),f=R.default.parseLevelPlaylist(e.data,h,r,l,u);if(!f.fragments.length){_.trigger(C.Events.ERROR,{type:w.ErrorTypes.NETWORK_ERROR,details:w.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:h,reason:"no fragments found in level",level:typeof i.level=="number"?i.level:void 0});return}if(g===S.PlaylistContextType.MANIFEST){var c={attrs:new y.AttrList({}),bitrate:0,details:f,name:"",url:h};_.trigger(C.Events.MANIFEST_LOADED,{levels:[c],audioTracks:[],url:h,stats:t,networkDetails:T,sessionData:null})}if(t.parsing.end=performance.now(),f.needSidxRanges){var x,D=(x=f.fragments[0].initSegment)===null||x===void 0?void 0:x.url;this.load({url:D,isSidxRequest:!0,type:g,level:E,levelDetails:f,id:m,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}i.levelDetails=f,this.handlePlaylistLoaded(e,t,i,T)},a.handleSidxRequest=function(e,t){var i=Object(U.parseSegmentIndex)(new Uint8Array(e.data));if(!i)return;var T=i.references,_=t.levelDetails;T.forEach(function(m,E){var g=m.info,h=_.fragments[E];h.byteRange.length===0&&h.setByteRange(String(1+g.end-g.start)+"@"+String(g.start)),h.initSegment&&h.initSegment.setByteRange(String(i.moovEndOffset)+"@0")})},a.handleManifestParsingError=function(e,t,i,T){this.hls.trigger(C.Events.ERROR,{type:w.ErrorTypes.NETWORK_ERROR,details:w.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===S.PlaylistContextType.MANIFEST,url:e.url,reason:i,response:e,context:t,networkDetails:T})},a.handleNetworkError=function(e,t,i,T){i===void 0&&(i=!1),H.logger.warn("[playlist-loader]: A network "+(i?"timeout":"error")+" occurred while loading "+e.type+" level: "+e.level+" id: "+e.id+' group-id: "'+e.groupId+'"');var _=w.ErrorDetails.UNKNOWN,m=!1,E=this.getInternalLoader(e);switch(e.type){case S.PlaylistContextType.MANIFEST:_=i?w.ErrorDetails.MANIFEST_LOAD_TIMEOUT:w.ErrorDetails.MANIFEST_LOAD_ERROR,m=!0;break;case S.PlaylistContextType.LEVEL:_=i?w.ErrorDetails.LEVEL_LOAD_TIMEOUT:w.ErrorDetails.LEVEL_LOAD_ERROR,m=!1;break;case S.PlaylistContextType.AUDIO_TRACK:_=i?w.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:w.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,m=!1;break;case S.PlaylistContextType.SUBTITLE_TRACK:_=i?w.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:w.ErrorDetails.SUBTITLE_LOAD_ERROR,m=!1;break}E&&this.resetInternalLoader(e.type);var g={type:w.ErrorTypes.NETWORK_ERROR,details:_,fatal:m,url:e.url,loader:E,context:e,networkDetails:t};T&&(g.response=T),this.hls.trigger(C.Events.ERROR,g)},a.handlePlaylistLoaded=function(e,t,i,T){var _=i.type,m=i.level,E=i.id,g=i.groupId,h=i.loader,u=i.levelDetails,r=i.deliveryDirectives;if(!(u!=null&&u.targetduration)){this.handleManifestParsingError(e,i,"invalid target duration",T);return}if(!h)return;u.live&&(h.getCacheAge&&(u.ageHeader=h.getCacheAge()||0),(!h.getCacheAge||isNaN(u.ageHeader))&&(u.ageHeader=0));switch(_){case S.PlaylistContextType.MANIFEST:case S.PlaylistContextType.LEVEL:this.hls.trigger(C.Events.LEVEL_LOADED,{details:u,level:m||0,id:E||0,stats:t,networkDetails:T,deliveryDirectives:r});break;case S.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(C.Events.AUDIO_TRACK_LOADED,{details:u,id:E||0,groupId:g||"",stats:t,networkDetails:T,deliveryDirectives:r});break;case S.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(C.Events.SUBTITLE_TRACK_LOADED,{details:u,id:E||0,groupId:g||"",stats:t,networkDetails:T,deliveryDirectives:r});break}},n}();L.default=o},"./src/polyfills/number.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"isFiniteNumber",function(){return j}),I.d(L,"MAX_SAFE_INTEGER",function(){return C});var j=Number.isFinite||function(w){return typeof w=="number"&&isFinite(w)},C=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ie,L,I){"use strict";I.r(L);var j=function(){function C(){}return C.getSilentFrame=function(H,U){switch(H){case"mp4a.40.2":if(U===1)return new Uint8Array([0,200,0,128,35,128]);if(U===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(U===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(U===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(U===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(U===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(U===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(U===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(U===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},C}();L.default=j},"./src/remux/mp4-generator.ts":function(ie,L,I){"use strict";I.r(L);var j=Math.pow(2,32)-1,C=function(){function w(){}return w.init=function(){w.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var U;for(U in w.types)w.types.hasOwnProperty(U)&&(w.types[U]=[U.charCodeAt(0),U.charCodeAt(1),U.charCodeAt(2),U.charCodeAt(3)]);var R=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]),S=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]);w.HDLR_TYPES={video:R,audio:S};var y=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),v=new Uint8Array([0,0,0,0,0,0,0,0]);w.STTS=w.STSC=w.STCO=v,w.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),w.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),w.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),w.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var d=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),n=new Uint8Array([0,0,0,1]);w.FTYP=w.box(w.types.ftyp,d,n,d,o),w.DINF=w.box(w.types.dinf,w.box(w.types.dref,y))},w.box=function(U){for(var R=8,S=arguments.length,y=new Array(S>1?S-1:0),v=1;v<S;v++)y[v-1]=arguments[v];for(var d=y.length,o=d;d--;)R+=y[d].byteLength;var n=new Uint8Array(R);for(n[0]=R>>24&255,n[1]=R>>16&255,n[2]=R>>8&255,n[3]=R&255,n.set(U,4),d=0,R=8;d<o;d++)n.set(y[d],R),R+=y[d].byteLength;return n},w.hdlr=function(U){return w.box(w.types.hdlr,w.HDLR_TYPES[U])},w.mdat=function(U){return w.box(w.types.mdat,U)},w.mdhd=function(U,R){R*=U;var S=Math.floor(R/(j+1)),y=Math.floor(R%(j+1));return w.box(w.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,U>>24&255,U>>16&255,U>>8&255,U&255,S>>24,S>>16&255,S>>8&255,S&255,y>>24,y>>16&255,y>>8&255,y&255,85,196,0,0]))},w.mdia=function(U){return w.box(w.types.mdia,w.mdhd(U.timescale,U.duration),w.hdlr(U.type),w.minf(U))},w.mfhd=function(U){return w.box(w.types.mfhd,new Uint8Array([0,0,0,0,U>>24,U>>16&255,U>>8&255,U&255]))},w.minf=function(U){return U.type==="audio"?w.box(w.types.minf,w.box(w.types.smhd,w.SMHD),w.DINF,w.stbl(U)):w.box(w.types.minf,w.box(w.types.vmhd,w.VMHD),w.DINF,w.stbl(U))},w.moof=function(U,R,S){return w.box(w.types.moof,w.mfhd(U),w.traf(S,R))},w.moov=function(U){for(var R=U.length,S=[];R--;)S[R]=w.trak(U[R]);return w.box.apply(null,[w.types.moov,w.mvhd(U[0].timescale,U[0].duration)].concat(S).concat(w.mvex(U)))},w.mvex=function(U){for(var R=U.length,S=[];R--;)S[R]=w.trex(U[R]);return w.box.apply(null,[w.types.mvex].concat(S))},w.mvhd=function(U,R){R*=U;var S=Math.floor(R/(j+1)),y=Math.floor(R%(j+1)),v=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,U>>24&255,U>>16&255,U>>8&255,U&255,S>>24,S>>16&255,S>>8&255,S&255,y>>24,y>>16&255,y>>8&255,y&255,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 w.box(w.types.mvhd,v)},w.sdtp=function(U){var R=U.samples||[],S=new Uint8Array(4+R.length),y,v;for(y=0;y<R.length;y++)v=R[y].flags,S[y+4]=v.dependsOn<<4|v.isDependedOn<<2|v.hasRedundancy;return w.box(w.types.sdtp,S)},w.stbl=function(U){return w.box(w.types.stbl,w.stsd(U),w.box(w.types.stts,w.STTS),w.box(w.types.stsc,w.STSC),w.box(w.types.stsz,w.STSZ),w.box(w.types.stco,w.STCO))},w.avc1=function(U){var R=[],S=[],y,v,d;for(y=0;y<U.sps.length;y++)v=U.sps[y],d=v.byteLength,R.push(d>>>8&255),R.push(d&255),R=R.concat(Array.prototype.slice.call(v));for(y=0;y<U.pps.length;y++)v=U.pps[y],d=v.byteLength,S.push(d>>>8&255),S.push(d&255),S=S.concat(Array.prototype.slice.call(v));var o=w.box(w.types.avcC,new Uint8Array([1,R[3],R[4],R[5],252|3,224|U.sps.length].concat(R).concat([U.pps.length]).concat(S))),n=U.width,a=U.height,s=U.pixelRatio[0],e=U.pixelRatio[1];return w.box(w.types.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,n>>8&255,n&255,a>>8&255,a&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,w.box(w.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),w.box(w.types.pasp,new Uint8Array([s>>24,s>>16&255,s>>8&255,s&255,e>>24,e>>16&255,e>>8&255,e&255])))},w.esds=function(U){var R=U.config.length;return new Uint8Array([0,0,0,0,3,23+R,0,1,0,4,15+R,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([R]).concat(U.config).concat([6,1,2]))},w.mp4a=function(U){var R=U.samplerate;return w.box(w.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,U.channelCount,0,16,0,0,0,0,R>>8&255,R&255,0,0]),w.box(w.types.esds,w.esds(U)))},w.mp3=function(U){var R=U.samplerate;return w.box(w.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,U.channelCount,0,16,0,0,0,0,R>>8&255,R&255,0,0]))},w.stsd=function(U){return U.type==="audio"?!U.isAAC&&U.codec==="mp3"?w.box(w.types.stsd,w.STSD,w.mp3(U)):w.box(w.types.stsd,w.STSD,w.mp4a(U)):w.box(w.types.stsd,w.STSD,w.avc1(U))},w.tkhd=function(U){var R=U.id,S=U.duration*U.timescale,y=U.width,v=U.height,d=Math.floor(S/(j+1)),o=Math.floor(S%(j+1));return w.box(w.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,R>>24&255,R>>16&255,R>>8&255,R&255,0,0,0,0,d>>24,d>>16&255,d>>8&255,d&255,o>>24,o>>16&255,o>>8&255,o&255,0,0,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,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,y>>8&255,y&255,0,0,v>>8&255,v&255,0,0]))},w.traf=function(U,R){var S=w.sdtp(U),y=U.id,v=Math.floor(R/(j+1)),d=Math.floor(R%(j+1));return w.box(w.types.traf,w.box(w.types.tfhd,new Uint8Array([0,0,0,0,y>>24,y>>16&255,y>>8&255,y&255])),w.box(w.types.tfdt,new Uint8Array([1,0,0,0,v>>24,v>>16&255,v>>8&255,v&255,d>>24,d>>16&255,d>>8&255,d&255])),w.trun(U,S.length+16+20+8+16+8+8),S)},w.trak=function(U){return U.duration=U.duration||4294967295,w.box(w.types.trak,w.tkhd(U),w.mdia(U))},w.trex=function(U){var R=U.id;return w.box(w.types.trex,new Uint8Array([0,0,0,0,R>>24,R>>16&255,R>>8&255,R&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},w.trun=function(U,R){var S=U.samples||[],y=S.length,v=12+16*y,d=new Uint8Array(v),o,n,a,s,e,t;for(R+=8+v,d.set([0,0,15,1,y>>>24&255,y>>>16&255,y>>>8&255,y&255,R>>>24&255,R>>>16&255,R>>>8&255,R&255],0),o=0;o<y;o++)n=S[o],a=n.duration,s=n.size,e=n.flags,t=n.cts,d.set([a>>>24&255,a>>>16&255,a>>>8&255,a&255,s>>>24&255,s>>>16&255,s>>>8&255,s&255,e.isLeading<<2|e.dependsOn,e.isDependedOn<<6|e.hasRedundancy<<4|e.paddingValue<<1|e.isNonSync,e.degradPrio&240<<8,e.degradPrio&15,t>>>24&255,t>>>16&255,t>>>8&255,t&255],12+16*o);return w.box(w.types.trun,d)},w.initSegment=function(U){w.types||w.init();var R=w.moov(U),S=new Uint8Array(w.FTYP.byteLength+R.byteLength);return S.set(w.FTYP),S.set(R,w.FTYP.byteLength),S},w}();C.types=void 0,C.HDLR_TYPES=void 0,C.STTS=void 0,C.STSC=void 0,C.STCO=void 0,C.STSZ=void 0,C.VMHD=void 0,C.SMHD=void 0,C.STSD=void 0,C.FTYP=void 0,C.DINF=void 0,L.default=C},"./src/remux/mp4-remuxer.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return t}),I.d(L,"normalizePts",function(){return i});var j=I("./src/polyfills/number.ts"),C=I("./src/remux/aac-helper.ts"),w=I("./src/remux/mp4-generator.ts"),H=I("./src/events.ts"),U=I("./src/errors.ts"),R=I("./src/utils/logger.ts"),S=I("./src/types/loader.ts"),y=I("./src/utils/timescale-conversion.ts");function v(){return v=Object.assign||function(E){for(var g=1;g<arguments.length;g++){var h=arguments[g];for(var u in h)Object.prototype.hasOwnProperty.call(h,u)&&(E[u]=h[u])}return E},v.apply(this,arguments)}var d=10*1e3,o=1024,n=1152,a=null,s=null,e=!1,t=function(){function E(h,u,r,l){if(l===void 0&&(l=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=h,this.config=u,this.typeSupported=r,this.ISGenerated=!1,a===null){var f=navigator.userAgent||"",c=f.match(/Chrome\/(\d+)/i);a=c?parseInt(c[1]):0}if(s===null){var x=navigator.userAgent.match(/Safari\/(\d+)/i);s=x?parseInt(x[1]):0}e=!!a&&a<75||!!s&&s<600}var g=E.prototype;return g.destroy=function(){},g.resetTimeStamp=function(u){R.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=u},g.resetNextTimestamp=function(){R.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},g.resetInitSegment=function(){R.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},g.getVideoStartPts=function(u){var r=!1,l=u.reduce(function(f,c){var x=c.pts-f;return x<-4294967296?(r=!0,i(f,c.pts)):x>0?f:c.pts},u[0].pts);return r&&R.logger.debug("PTS rollover detected"),l},g.remux=function(u,r,l,f,c,x,D,A){var B,O,W,P,G,Q,re=c,le=c,Ee=u.pid>-1,_e=r.pid>-1,ne=r.samples.length,Te=u.samples.length>0,Ae=ne>1,fe=(!Ee||Te)&&(!_e||Ae)||this.ISGenerated||D;if(fe){this.ISGenerated||(W=this.generateIS(u,r,c));var J=this.isVideoContiguous,Ie=-1;if(Ae&&(Ie=T(r.samples),!J&&this.config.forceKeyFrameOnDiscontinuity))if(Q=!0,Ie>0){R.logger.warn("[mp4-remuxer]: Dropped "+Ie+" out of "+ne+" video samples due to a missing keyframe");var it=this.getVideoStartPts(r.samples);r.samples=r.samples.slice(Ie),r.dropped+=Ie,le+=(r.samples[0].pts-it)/(r.timescale||9e4)}else Ie===-1&&(R.logger.warn("[mp4-remuxer]: No keyframe found out of "+ne+" video samples"),Q=!1);if(this.ISGenerated){if(Te&&Ae){var et=this.getVideoStartPts(r.samples),Qe=i(u.samples[0].pts,et)-et,nt=Qe/r.inputTimeScale;re+=Math.max(0,nt),le+=Math.max(0,-nt)}if(Te){if(u.samplerate||(R.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),W=this.generateIS(u,r,c)),O=this.remuxAudio(u,re,this.isAudioContiguous,x,_e||Ae||A===S.PlaylistLevelType.AUDIO?le:void 0),Ae){var Me=O?O.endPTS-O.startPTS:0;r.inputTimeScale||(R.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),W=this.generateIS(u,r,c)),B=this.remuxVideo(r,le,J,Me)}}else Ae&&(B=this.remuxVideo(r,le,J,0));B&&(B.firstKeyFrame=Ie,B.independent=Ie!==-1)}}return this.ISGenerated&&(l.samples.length&&(G=this.remuxID3(l,c)),f.samples.length&&(P=this.remuxText(f,c))),{audio:O,video:B,initSegment:W,independent:Q,text:P,id3:G}},g.generateIS=function(u,r,l){var f=u.samples,c=r.samples,x=this.typeSupported,D={},A=!Object(j.isFiniteNumber)(this._initPTS),B="audio/mp4",O,W,P;if(A&&(O=W=Infinity),u.config&&f.length&&(u.timescale=u.samplerate,u.isAAC||(x.mpeg?(B="audio/mpeg",u.codec=""):x.mp3&&(u.codec="mp3")),D.audio={id:"audio",container:B,codec:u.codec,initSegment:!u.isAAC&&x.mpeg?new Uint8Array(0):w.default.initSegment([u]),metadata:{channelCount:u.channelCount}},A&&(P=u.inputTimeScale,O=W=f[0].pts-Math.round(P*l))),r.sps&&r.pps&&c.length&&(r.timescale=r.inputTimeScale,D.video={id:"main",container:"video/mp4",codec:r.codec,initSegment:w.default.initSegment([r]),metadata:{width:r.width,height:r.height}},A)){P=r.inputTimeScale;var G=this.getVideoStartPts(c),Q=Math.round(P*l);W=Math.min(W,i(c[0].dts,G)-Q),O=Math.min(O,G-Q)}if(Object.keys(D).length)return this.ISGenerated=!0,A&&(this._initPTS=O,this._initDTS=W),{tracks:D,initPTS:O,timescale:P}},g.remuxVideo=function(u,r,l,f){var c=u.inputTimeScale,x=u.samples,D=[],A=x.length,B=this._initPTS,O=this.nextAvcDts,W=8,P,G,Q,re=Number.POSITIVE_INFINITY,le=Number.NEGATIVE_INFINITY,Ee=0,_e=!1;if(!l||O===null){var ne=r*c,Te=x[0].pts-i(x[0].dts,x[0].pts);O=ne-Te}for(var Ae=0;Ae<A;Ae++){var fe=x[Ae];if(fe.pts=i(fe.pts-B,O),fe.dts=i(fe.dts-B,O),fe.dts>fe.pts){var J=9e4*.2;Ee=Math.max(Math.min(Ee,fe.pts-fe.dts),-1*J)}fe.dts<x[Ae>0?Ae-1:Ae].dts&&(_e=!0)}_e&&x.sort(function(st,tt){var Ye=st.dts-tt.dts,mt=st.pts-tt.pts;return Ye||mt}),G=x[0].dts,Q=x[x.length-1].dts;var Ie=Math.round((Q-G)/(A-1));if(Ee<0){if(Ee<Ie*-2){R.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(y.toMsFromMpegTsClock)(-Ie,!0)+" ms");for(var it=Ee,et=0;et<A;et++)x[et].dts=it=Math.max(it,x[et].pts-Ie),x[et].pts=Math.max(it,x[et].pts)}else{R.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(y.toMsFromMpegTsClock)(Ee,!0)+" ms to overcome this issue");for(var Qe=0;Qe<A;Qe++)x[Qe].dts=x[Qe].dts+Ee}G=x[0].dts}if(l){var nt=G-O,Me=nt>Ie,ze=nt<-1;if(Me||ze){Me?R.logger.warn("AVC: "+Object(y.toMsFromMpegTsClock)(nt,!0)+" ms ("+nt+"dts) hole between fragments detected, filling it"):R.logger.warn("AVC: "+Object(y.toMsFromMpegTsClock)(-nt,!0)+" ms ("+nt+"dts) overlapping between fragments detected"),G=O;var Je=x[0].pts-nt;x[0].dts=G,x[0].pts=Je,R.logger.log("Video: First PTS/DTS adjusted: "+Object(y.toMsFromMpegTsClock)(Je,!0)+"/"+Object(y.toMsFromMpegTsClock)(G,!0)+", delta: "+Object(y.toMsFromMpegTsClock)(nt,!0)+" ms")}}e&&(G=Math.max(0,G));for(var $e=0,Xe=0,Fe=0;Fe<A;Fe++){for(var We=x[Fe],yt=We.units,ft=yt.length,ut=0,rt=0;rt<ft;rt++)ut+=yt[rt].data.length;Xe+=ut,$e+=ft,We.length=ut,We.dts=Math.max(We.dts,G),We.pts=Math.max(We.pts,We.dts,0),re=Math.min(We.pts,re),le=Math.max(We.pts,le)}Q=x[A-1].dts;var Tt=Xe+4*$e+8,_t;try{_t=new Uint8Array(Tt)}catch(st){this.observer.emit(H.Events.ERROR,H.Events.ERROR,{type:U.ErrorTypes.MUX_ERROR,details:U.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Tt,reason:"fail allocating video mdat "+Tt});return}var me=new DataView(_t.buffer);me.setUint32(0,Tt),_t.set(w.default.types.mdat,4);for(var xe=0;xe<A;xe++){for(var De=x[xe],ke=De.units,be=0,Le=0,ce=ke.length;Le<ce;Le++){var ee=ke[Le],te=ee.data,V=ee.data.byteLength;me.setUint32(W,V),W+=4,_t.set(te,W),W+=V,be+=4+V}if(xe<A-1)P=x[xe+1].dts-De.dts;else{var X=this.config,q=De.dts-x[xe>0?xe-1:xe].dts;if(X.stretchShortVideoTrack&&this.nextAudioPts!==null){var ae=Math.floor(X.maxBufferHole*c),ge=(f?re+f*c:this.nextAudioPts)-De.pts;ge>ae?(P=ge-q,P<0&&(P=q),R.logger.log("[mp4-remuxer]: It is approximately "+ge/90+" ms to the next segment; using duration "+P/90+" ms for the last video frame.")):P=q}else P=q}var we=Math.round(De.pts-De.dts);D.push(new _(De.key,P,be,we))}if(D.length&&a&&a<70){var je=D[0].flags;je.dependsOn=2,je.isNonSync=0}console.assert(P!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=O=Q+P,this.isVideoContiguous=!0;var at=w.default.moof(u.sequenceNumber++,G,v({},u,{samples:D})),ot="video",Se={data1:at,data2:_t,startPTS:re/c,endPTS:(le+P)/c,startDTS:G/c,endDTS:O/c,type:ot,hasAudio:!1,hasVideo:!0,nb:D.length,dropped:u.dropped};return u.samples=[],u.dropped=0,console.assert(_t.length,"MDAT length must not be zero"),Se},g.remuxAudio=function(u,r,l,f,c){var x=u.inputTimeScale,D=u.samplerate?u.samplerate:x,A=x/D,B=u.isAAC?o:n,O=B*A,W=this._initPTS,P=!u.isAAC&&this.typeSupported.mpeg,G=[],Q=u.samples,re=P?0:8,le=this.nextAudioPts||-1,Ee=r*x;if(this.isAudioContiguous=l=l||Q.length&&le>0&&(f&&Math.abs(Ee-le)<9e3||Math.abs(i(Q[0].pts-W,Ee)-le)<20*O),Q.forEach(function(te){te.pts=i(te.pts-W,Ee)}),!l||le<0){if(Q=Q.filter(function(te){return te.pts>=0}),!Q.length)return;c===0?le=0:f?le=Math.max(0,Ee):le=Q[0].pts}if(u.isAAC)for(var _e=c!==void 0,ne=this.config.maxAudioFramesDrift,Te=0,Ae=le;Te<Q.length;Te++){var fe=Q[Te],J=fe.pts,Ie=J-Ae,it=Math.abs(1e3*Ie/x);if(Ie<=-ne*O&&_e)Te===0&&(R.logger.warn("Audio frame @ "+(J/x).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Ie/x)+" ms."),this.nextAudioPts=le=Ae=J);else if(Ie>=ne*O&&it<d&&_e){var et=Math.round(Ie/O);Ae=J-et*O,Ae<0&&(et--,Ae+=O),Te===0&&(this.nextAudioPts=le=Ae),R.logger.warn("[mp4-remuxer]: Injecting "+et+" audio frame @ "+(Ae/x).toFixed(3)+"s due to "+Math.round(1e3*Ie/x)+" ms gap.");for(var Qe=0;Qe<et;Qe++){var nt=Math.max(Ae,0),Me=C.default.getSilentFrame(u.manifestCodec||u.codec,u.channelCount);Me||(R.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Me=fe.unit.subarray()),Q.splice(Te,0,{unit:Me,pts:nt}),Ae+=O,Te++}}fe.pts=Ae,Ae+=O}for(var ze=null,Je=null,$e,Xe=0,Fe=Q.length;Fe--;)Xe+=Q[Fe].unit.byteLength;for(var We=0,yt=Q.length;We<yt;We++){var ft=Q[We],ut=ft.unit,rt=ft.pts;if(Je!==null){var Tt=G[We-1];Tt.duration=Math.round((rt-Je)/A)}else if(l&&u.isAAC&&(rt=le),ze=rt,Xe>0){Xe+=re;try{$e=new Uint8Array(Xe)}catch(te){this.observer.emit(H.Events.ERROR,H.Events.ERROR,{type:U.ErrorTypes.MUX_ERROR,details:U.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Xe,reason:"fail allocating audio mdat "+Xe});return}if(!P){var _t=new DataView($e.buffer);_t.setUint32(0,Xe),$e.set(w.default.types.mdat,4)}}else return;$e.set(ut,re);var me=ut.byteLength;re+=me,G.push(new _(!0,B,me,0)),Je=rt}var xe=G.length;if(!xe)return;var De=G[G.length-1];this.nextAudioPts=le=Je+A*De.duration;var ke=P?new Uint8Array(0):w.default.moof(u.sequenceNumber++,ze/A,v({},u,{samples:G}));u.samples=[];var be=ze/x,Le=le/x,ce="audio",ee={data1:ke,data2:$e,startPTS:be,endPTS:Le,startDTS:be,endDTS:Le,type:ce,hasAudio:!0,hasVideo:!1,nb:xe};return this.isAudioContiguous=!0,console.assert($e.length,"MDAT length must not be zero"),ee},g.remuxEmptyAudio=function(u,r,l,f){var c=u.inputTimeScale,x=u.samplerate?u.samplerate:c,D=c/x,A=this.nextAudioPts,B=(A!==null?A:f.startDTS*c)+this._initDTS,O=f.endDTS*c+this._initDTS,W=D*o,P=Math.ceil((O-B)/W),G=C.default.getSilentFrame(u.manifestCodec||u.codec,u.channelCount);if(R.logger.warn("[mp4-remuxer]: remux empty Audio"),!G){R.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Q=[],re=0;re<P;re++){var le=B+re*W;Q.push({unit:G,pts:le,dts:le})}return u.samples=Q,this.remuxAudio(u,r,l,!1)},g.remuxID3=function(u,r){var l=u.samples.length;if(!l)return;for(var f=u.inputTimeScale,c=this._initPTS,x=this._initDTS,D=0;D<l;D++){var A=u.samples[D];A.pts=i(A.pts-c,r*f)/f,A.dts=i(A.dts-x,r*f)/f}var B=u.samples;return u.samples=[],{samples:B}},g.remuxText=function(u,r){var l=u.samples.length;if(!l)return;for(var f=u.inputTimeScale,c=this._initPTS,x=0;x<l;x++){var D=u.samples[x];D.pts=i(D.pts-c,r*f)/f}u.samples.sort(function(B,O){return B.pts-O.pts});var A=u.samples;return u.samples=[],{samples:A}},E}();function i(E,g){var h;if(g===null)return E;for(g<E?h=-8589934592:h=8589934592;Math.abs(E-g)>4294967296;)E+=h;return E}function T(E){for(var g=0;g<E.length;g++)if(E[g].key)return g;return-1}var _=function(g,h,u,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=h,this.size=u,this.cts=r,this.flags=new m(g)},m=function(g){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=g?2:1,this.isNonSync=g?0:1}},"./src/remux/passthrough-remuxer.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/polyfills/number.ts"),C=I("./src/utils/mp4-tools.ts"),w=I("./src/loader/fragment.ts"),H=I("./src/utils/logger.ts"),U=function(){function y(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var v=y.prototype;return v.destroy=function(){},v.resetTimeStamp=function(o){this.initPTS=o,this.lastEndDTS=null},v.resetNextTimestamp=function(){this.lastEndDTS=null},v.resetInitSegment=function(o,n,a){this.audioCodec=n,this.videoCodec=a,this.generateInitSegment(o),this.emitInitSegment=!0},v.generateInitSegment=function(o){var n=this.audioCodec,a=this.videoCodec;if(!o||!o.byteLength){this.initTracks=void 0,this.initData=void 0;return}var s=this.initData=Object(C.parseInitSegment)(o);n||(n=S(s.audio,w.ElementaryStreamTypes.AUDIO)),a||(a=S(s.video,w.ElementaryStreamTypes.VIDEO));var e={};s.audio&&s.video?e.audiovideo={container:"video/mp4",codec:n+","+a,initSegment:o,id:"main"}:s.audio?e.audio={container:"audio/mp4",codec:n,initSegment:o,id:"audio"}:s.video?e.video={container:"video/mp4",codec:a,initSegment:o,id:"main"}:H.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=e},v.remux=function(o,n,a,s,e){var t=this.initPTS,i=this.lastEndDTS,T={audio:void 0,video:void 0,text:s,id3:a,initSegment:void 0};Object(j.isFiniteNumber)(i)||(i=this.lastEndDTS=e||0);var _=n.samples;if(!_||!_.length)return T;var m={initPTS:void 0,timescale:1},E=this.initData;if((!E||!E.length)&&(this.generateInitSegment(_),E=this.initData),!E||!E.length)return H.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),T;this.emitInitSegment&&(m.tracks=this.initTracks,this.emitInitSegment=!1),Object(j.isFiniteNumber)(t)||(this.initPTS=m.initPTS=t=R(E,_,i));var g=Object(C.getDuration)(_,E),h=i,u=g+h;Object(C.offsetStartDTS)(E,_,t),g>0?this.lastEndDTS=u:(H.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var r=!!E.audio,l=!!E.video,f="";r&&(f+="audio"),l&&(f+="video");var c={data1:_,startPTS:h,startDTS:h,endPTS:u,endDTS:u,type:f,hasAudio:r,hasVideo:l,nb:1,dropped:0};return T.audio=c.type==="audio"?c:void 0,T.video=c.type!=="audio"?c:void 0,T.text=s,T.id3=a,T.initSegment=m,T},y}(),R=function(v,d,o){return Object(C.getStartDTS)(v,d)-o};function S(y,v){var d=y==null?void 0:y.codec;return d&&d.length>4?d:d==="hvc1"?"hvc1.1.c.L120.90":d==="av01"?"av01.0.04M.08":d==="avc1"||v===w.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}L.default=U},"./src/task-loop.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return j});var j=function(){function C(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var w=C.prototype;return w.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},w.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},w.onHandlerDestroyed=function(){},w.hasInterval=function(){return!!this._tickInterval},w.hasNextTick=function(){return!!this._tickTimer},w.setInterval=function(U){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,U),!0)},w.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},w.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},w.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},w.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},w.doTick=function(){},C}()},"./src/types/cmcd.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"CMCDVersion",function(){return j}),I.d(L,"CMCDObjectType",function(){return C}),I.d(L,"CMCDStreamingFormat",function(){return w}),I.d(L,"CMCDStreamType",function(){return H});var j=1,C;(function(U){U.MANIFEST="m",U.AUDIO="a",U.VIDEO="v",U.MUXED="av",U.INIT="i",U.CAPTION="c",U.TIMED_TEXT="tt",U.KEY="k",U.OTHER="o"})(C||(C={}));var w;(function(U){U.DASH="d",U.HLS="h",U.SMOOTH="s",U.OTHER="o"})(w||(w={}));var H;(function(U){U.VOD="v",U.LIVE="l"})(H||(H={}))},"./src/types/level.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"HlsSkip",function(){return w}),I.d(L,"getSkipValue",function(){return H}),I.d(L,"HlsUrlParameters",function(){return U}),I.d(L,"Level",function(){return R});function j(S,y){for(var v=0;v<y.length;v++){var d=y[v];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(S,d.key,d)}}function C(S,y,v){return y&&j(S.prototype,y),v&&j(S,v),S}var w;(function(S){S.No="",S.Yes="YES",S.v2="v2"})(w||(w={}));function H(S,y){var v=S.canSkipUntil,d=S.canSkipDateRanges,o=S.endSN,n=y!==void 0?y-o:0;return v&&n<v?d?w.v2:w.Yes:w.No}var U=function(){function S(v,d,o){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=v,this.part=d,this.skip=o}var y=S.prototype;return y.addDirectives=function(d){var o=new self.URL(d);return this.msn!==void 0&&o.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&o.searchParams.set("_HLS_part",this.part.toString()),this.skip&&o.searchParams.set("_HLS_skip",this.skip),o.toString()},S}(),R=function(){function S(y){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[y.url],this.attrs=y.attrs,this.bitrate=y.bitrate,y.details&&(this.details=y.details),this.id=y.id||0,this.name=y.name,this.width=y.width||0,this.height=y.height||0,this.audioCodec=y.audioCodec,this.videoCodec=y.videoCodec,this.unknownCodecs=y.unknownCodecs,this.codecSet=[y.videoCodec,y.audioCodec].filter(function(v){return v}).join(",").replace(/\.[^.,]+/g,"")}return C(S,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(v){var d=v%this.url.length;this._urlId!==d&&(this.details=void 0,this._urlId=d)}}]),S}()},"./src/types/loader.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"PlaylistContextType",function(){return j}),I.d(L,"PlaylistLevelType",function(){return C});var j;(function(w){w.MANIFEST="manifest",w.LEVEL="level",w.AUDIO_TRACK="audioTrack",w.SUBTITLE_TRACK="subtitleTrack"})(j||(j={}));var C;(function(w){w.MAIN="main",w.AUDIO="audio",w.SUBTITLE="subtitle"})(C||(C={}))},"./src/types/transmuxer.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"ChunkMetadata",function(){return j});var j=function(H,U,R,S,y,v){S===void 0&&(S=0),y===void 0&&(y=-1),v===void 0&&(v=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=C(),this.buffering={audio:C(),video:C(),audiovideo:C()},this.level=H,this.sn=U,this.id=R,this.size=S,this.part=y,this.partial=v};function C(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"AttrList",function(){return w});var j=/^(\d+)x(\d+)$/,C=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,w=function(){function H(R){typeof R=="string"&&(R=H.parseAttrList(R));for(var S in R)R.hasOwnProperty(S)&&(this[S]=R[S])}var U=H.prototype;return U.decimalInteger=function(S){var y=parseInt(this[S],10);return y>Number.MAX_SAFE_INTEGER?Infinity:y},U.hexadecimalInteger=function(S){if(this[S]){var y=(this[S]||"0x").slice(2);y=(y.length&1?"0":"")+y;for(var v=new Uint8Array(y.length/2),d=0;d<y.length/2;d++)v[d]=parseInt(y.slice(d*2,d*2+2),16);return v}else return null},U.hexadecimalIntegerAsNumber=function(S){var y=parseInt(this[S],16);return y>Number.MAX_SAFE_INTEGER?Infinity:y},U.decimalFloatingPoint=function(S){return parseFloat(this[S])},U.optionalFloat=function(S,y){var v=this[S];return v?parseFloat(v):y},U.enumeratedString=function(S){return this[S]},U.bool=function(S){return this[S]==="YES"},U.decimalResolution=function(S){var y=j.exec(this[S]);return y===null?void 0:{width:parseInt(y[1],10),height:parseInt(y[2],10)}},H.parseAttrList=function(S){var y,v={},d='"';for(C.lastIndex=0;(y=C.exec(S))!==null;){var o=y[2];o.indexOf(d)===0&&o.lastIndexOf(d)===o.length-1&&(o=o.slice(1,-1)),v[y[1]]=o}return v},H}()},"./src/utils/binary-search.ts":function(ie,L,I){"use strict";I.r(L);var j={search:function(w,H){for(var U=0,R=w.length-1,S=null,y=null;U<=R;){S=(U+R)/2|0,y=w[S];var v=H(y);if(v>0)U=S+1;else if(v<0)R=S-1;else return y}return null}};L.default=j},"./src/utils/buffer-helper.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"BufferHelper",function(){return w});var j=I("./src/utils/logger.ts"),C={length:0,start:function(){return 0},end:function(){return 0}},w=function(){function H(){}return H.isBuffered=function(R,S){try{if(R){for(var y=H.getBuffered(R),v=0;v<y.length;v++)if(S>=y.start(v)&&S<=y.end(v))return!0}}catch(d){}return!1},H.bufferInfo=function(R,S,y){try{if(R){var v=H.getBuffered(R),d=[],o;for(o=0;o<v.length;o++)d.push({start:v.start(o),end:v.end(o)});return this.bufferedInfo(d,S,y)}}catch(n){}return{len:0,start:S,end:S,nextStart:void 0}},H.bufferedInfo=function(R,S,y){S=Math.max(0,S),R.sort(function(m,E){var g=m.start-E.start;return g||E.end-m.end});var v=[];if(y)for(var d=0;d<R.length;d++){var o=v.length;if(o){var n=v[o-1].end;R[d].start-n<y?R[d].end>n&&(v[o-1].end=R[d].end):v.push(R[d])}else v.push(R[d])}else v=R;for(var a=0,s,e=S,t=S,i=0;i<v.length;i++){var T=v[i].start,_=v[i].end;if(S+y>=T&&S<_)e=T,t=_,a=t-S;else if(S+y<T){s=T;break}}return{len:a,start:e||0,end:t||0,nextStart:s}},H.getBuffered=function(R){try{return R.buffered}catch(S){return j.logger.log("failed to get media.buffered",S),C}},H}()},"./src/utils/cea-608-parser.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"Row",function(){return t}),I.d(L,"CaptionScreen",function(){return i});var j=I("./src/utils/logger.ts"),C={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},w=function(u){var r=u;return C.hasOwnProperty(u)&&(r=C[u]),String.fromCharCode(r)},H=15,U=100,R={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},S={17:2,18:4,21:6,22:8,23:10,19:13,20:15},y={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},v={25:2,26:4,29:6,30:8,31:10,27:13,28:15},d=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],o;(function(h){h[h.ERROR=0]="ERROR",h[h.TEXT=1]="TEXT",h[h.WARNING=2]="WARNING",h[h.INFO=2]="INFO",h[h.DEBUG=3]="DEBUG",h[h.DATA=3]="DATA"})(o||(o={}));var n=function(){function h(){this.time=null,this.verboseLevel=o.ERROR}var u=h.prototype;return u.log=function(l,f){this.verboseLevel>=l&&j.logger.log(this.time+" ["+l+"] "+f)},h}(),a=function(u){for(var r=[],l=0;l<u.length;l++)r.push(u[l].toString(16));return r},s=function(){function h(r,l,f,c,x){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=r||"white",this.underline=l||!1,this.italics=f||!1,this.background=c||"black",this.flash=x||!1}var u=h.prototype;return u.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},u.setStyles=function(l){for(var f=["foreground","underline","italics","background","flash"],c=0;c<f.length;c++){var x=f[c];l.hasOwnProperty(x)&&(this[x]=l[x])}},u.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},u.equals=function(l){return this.foreground===l.foreground&&this.underline===l.underline&&this.italics===l.italics&&this.background===l.background&&this.flash===l.flash},u.copy=function(l){this.foreground=l.foreground,this.underline=l.underline,this.italics=l.italics,this.background=l.background,this.flash=l.flash},u.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},h}(),e=function(){function h(r,l,f,c,x,D){this.uchar=void 0,this.penState=void 0,this.uchar=r||" ",this.penState=new s(l,f,c,x,D)}var u=h.prototype;return u.reset=function(){this.uchar=" ",this.penState.reset()},u.setChar=function(l,f){this.uchar=l,this.penState.copy(f)},u.setPenState=function(l){this.penState.copy(l)},u.equals=function(l){return this.uchar===l.uchar&&this.penState.equals(l.penState)},u.copy=function(l){this.uchar=l.uchar,this.penState.copy(l.penState)},u.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},h}(),t=function(){function h(r){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var l=0;l<U;l++)this.chars.push(new e);this.logger=r,this.pos=0,this.currPenState=new s}var u=h.prototype;return u.equals=function(l){for(var f=!0,c=0;c<U;c++)if(!this.chars[c].equals(l.chars[c])){f=!1;break}return f},u.copy=function(l){for(var f=0;f<U;f++)this.chars[f].copy(l.chars[f])},u.isEmpty=function(){for(var l=!0,f=0;f<U;f++)if(!this.chars[f].isEmpty()){l=!1;break}return l},u.setCursor=function(l){this.pos!==l&&(this.pos=l),this.pos<0?(this.logger.log(o.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>U&&(this.logger.log(o.DEBUG,"Too large cursor position "+this.pos),this.pos=U)},u.moveCursor=function(l){var f=this.pos+l;if(l>1)for(var c=this.pos+1;c<f+1;c++)this.chars[c].setPenState(this.currPenState);this.setCursor(f)},u.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},u.insertChar=function(l){l>=144&&this.backSpace();var f=w(l);if(this.pos>=U){this.logger.log(o.ERROR,"Cannot insert "+l.toString(16)+" ("+f+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(f,this.currPenState),this.moveCursor(1)},u.clearFromPos=function(l){var f;for(f=l;f<U;f++)this.chars[f].reset()},u.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},u.clearToEndOfRow=function(){this.clearFromPos(this.pos)},u.getTextString=function(){for(var l=[],f=!0,c=0;c<U;c++){var x=this.chars[c].uchar;x!==" "&&(f=!1),l.push(x)}return f?"":l.join("")},u.setPenStyles=function(l){this.currPenState.setStyles(l);var f=this.chars[this.pos];f.setPenState(this.currPenState)},h}(),i=function(){function h(r){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var l=0;l<H;l++)this.rows.push(new t(r));this.logger=r,this.currRow=H-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var u=h.prototype;return u.reset=function(){for(var l=0;l<H;l++)this.rows[l].clear();this.currRow=H-1},u.equals=function(l){for(var f=!0,c=0;c<H;c++)if(!this.rows[c].equals(l.rows[c])){f=!1;break}return f},u.copy=function(l){for(var f=0;f<H;f++)this.rows[f].copy(l.rows[f])},u.isEmpty=function(){for(var l=!0,f=0;f<H;f++)if(!this.rows[f].isEmpty()){l=!1;break}return l},u.backSpace=function(){var l=this.rows[this.currRow];l.backSpace()},u.clearToEndOfRow=function(){var l=this.rows[this.currRow];l.clearToEndOfRow()},u.insertChar=function(l){var f=this.rows[this.currRow];f.insertChar(l)},u.setPen=function(l){var f=this.rows[this.currRow];f.setPenStyles(l)},u.moveCursor=function(l){var f=this.rows[this.currRow];f.moveCursor(l)},u.setCursor=function(l){this.logger.log(o.INFO,"setCursor: "+l);var f=this.rows[this.currRow];f.setCursor(l)},u.setPAC=function(l){this.logger.log(o.INFO,"pacData = "+JSON.stringify(l));var f=l.row-1;if(this.nrRollUpRows&&f<this.nrRollUpRows-1&&(f=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==f){for(var c=0;c<H;c++)this.rows[c].clear();var x=this.currRow+1-this.nrRollUpRows,D=this.lastOutputScreen;if(D){var A=D.rows[x].cueStartTime,B=this.logger.time;if(A&&B!==null&&A<B)for(var O=0;O<this.nrRollUpRows;O++)this.rows[f-this.nrRollUpRows+O+1].copy(D.rows[x+O])}}this.currRow=f;var W=this.rows[this.currRow];if(l.indent!==null){var P=l.indent,G=Math.max(P-1,0);W.setCursor(l.indent),l.color=W.chars[G].penState.foreground}var Q={foreground:l.color,underline:l.underline,italics:l.italics,background:"black",flash:!1};this.setPen(Q)},u.setBkgData=function(l){this.logger.log(o.INFO,"bkgData = "+JSON.stringify(l)),this.backSpace(),this.setPen(l),this.insertChar(32)},u.setRollUpRows=function(l){this.nrRollUpRows=l},u.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(o.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(o.TEXT,this.getDisplayText());var l=this.currRow+1-this.nrRollUpRows,f=this.rows.splice(l,1)[0];f.clear(),this.rows.splice(this.currRow,0,f),this.logger.log(o.INFO,"Rolling up")},u.getDisplayText=function(l){l=l||!1;for(var f=[],c="",x=-1,D=0;D<H;D++){var A=this.rows[D].getTextString();A&&(x=D+1,l?f.push("Row "+x+": '"+A+"'"):f.push(A.trim()))}return f.length>0&&(l?c="["+f.join(" | ")+"]":c=f.join(`
`)),c},u.getTextAndFormat=function(){return this.rows},h}(),T=function(){function h(r,l,f){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=r,this.outputFilter=l,this.mode=null,this.verbose=0,this.displayedMemory=new i(f),this.nonDisplayedMemory=new i(f),this.lastOutputScreen=new i(f),this.currRollUpRow=this.displayedMemory.rows[H-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=f}var u=h.prototype;return u.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[H-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},u.getHandler=function(){return this.outputFilter},u.setHandler=function(l){this.outputFilter=l},u.setPAC=function(l){this.writeScreen.setPAC(l)},u.setBkgData=function(l){this.writeScreen.setBkgData(l)},u.setMode=function(l){if(l===this.mode)return;this.mode=l,this.logger.log(o.INFO,"MODE="+l),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=l},u.insertChars=function(l){for(var f=0;f<l.length;f++)this.writeScreen.insertChar(l[f]);var c=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(o.INFO,c+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(o.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},u.ccRCL=function(){this.logger.log(o.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},u.ccBS=function(){if(this.logger.log(o.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},u.ccAOF=function(){},u.ccAON=function(){},u.ccDER=function(){this.logger.log(o.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},u.ccRU=function(l){this.logger.log(o.INFO,"RU("+l+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(l)},u.ccFON=function(){this.logger.log(o.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},u.ccRDC=function(){this.logger.log(o.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},u.ccTR=function(){this.logger.log(o.INFO,"TR"),this.setMode("MODE_TEXT")},u.ccRTD=function(){this.logger.log(o.INFO,"RTD"),this.setMode("MODE_TEXT")},u.ccEDM=function(){this.logger.log(o.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},u.ccCR=function(){this.logger.log(o.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},u.ccENM=function(){this.logger.log(o.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},u.ccEOC=function(){if(this.logger.log(o.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var l=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=l,this.writeScreen=this.nonDisplayedMemory,this.logger.log(o.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},u.ccTO=function(l){this.logger.log(o.INFO,"TO("+l+") - Tab Offset"),this.writeScreen.moveCursor(l)},u.ccMIDROW=function(l){var f={flash:!1};if(f.underline=l%2===1,f.italics=l>=46,f.italics)f.foreground="white";else{var c=Math.floor(l/2)-16,x=["white","green","blue","cyan","red","yellow","magenta"];f.foreground=x[c]}this.logger.log(o.INFO,"MIDROW: "+JSON.stringify(f)),this.writeScreen.setPen(f)},u.outputDataUpdate=function(l){l===void 0&&(l=!1);var f=this.logger.time;if(f===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=f:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,f,this.lastOutputScreen),l&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:f),this.lastOutputScreen.copy(this.displayedMemory))},u.cueSplitAtTime=function(l){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,l,this.displayedMemory),this.cueStartTime=l))},h}(),_=function(){function h(r,l,f){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var c=new n;this.channels=[null,new T(r,l,c),new T(r+1,f,c)],this.cmdHistory=g(),this.logger=c}var u=h.prototype;return u.getHandler=function(l){return this.channels[l].getHandler()},u.setHandler=function(l,f){this.channels[l].setHandler(f)},u.addData=function(l,f){var c,x,D,A=!1;this.logger.time=l;for(var B=0;B<f.length;B+=2){if(x=f[B]&127,D=f[B+1]&127,x===0&&D===0)continue;if(this.logger.log(o.DATA,"["+a([f[B],f[B+1]])+"] -> ("+a([x,D])+")"),c=this.parseCmd(x,D),c||(c=this.parseMidrow(x,D)),c||(c=this.parsePAC(x,D)),c||(c=this.parseBackgroundAttributes(x,D)),!c&&(A=this.parseChars(x,D),A)){var O=this.currentChannel;if(O&&O>0){var W=this.channels[O];W.insertChars(A)}else this.logger.log(o.WARNING,"No channel found yet. TEXT-MODE?")}!c&&!A&&this.logger.log(o.WARNING,"Couldn't parse cleaned data "+a([x,D])+" orig: "+a([f[B],f[B+1]]))}},u.parseCmd=function(l,f){var c=this.cmdHistory,x=(l===20||l===28||l===21||l===29)&&f>=32&&f<=47,D=(l===23||l===31)&&f>=33&&f<=35;if(!(x||D))return!1;if(E(l,f,c))return m(null,null,c),this.logger.log(o.DEBUG,"Repeated command ("+a([l,f])+") is dropped"),!0;var A=l===20||l===21||l===23?1:2,B=this.channels[A];return l===20||l===21||l===28||l===29?f===32?B.ccRCL():f===33?B.ccBS():f===34?B.ccAOF():f===35?B.ccAON():f===36?B.ccDER():f===37?B.ccRU(2):f===38?B.ccRU(3):f===39?B.ccRU(4):f===40?B.ccFON():f===41?B.ccRDC():f===42?B.ccTR():f===43?B.ccRTD():f===44?B.ccEDM():f===45?B.ccCR():f===46?B.ccENM():f===47&&B.ccEOC():B.ccTO(f-32),m(l,f,c),this.currentChannel=A,!0},u.parseMidrow=function(l,f){var c=0;if((l===17||l===25)&&f>=32&&f<=47){if(l===17?c=1:c=2,c!==this.currentChannel)return this.logger.log(o.ERROR,"Mismatch channel in midrow parsing"),!1;var x=this.channels[c];return x?(x.ccMIDROW(f),this.logger.log(o.DEBUG,"MIDROW ("+a([l,f])+")"),!0):!1}return!1},u.parsePAC=function(l,f){var c,x=this.cmdHistory,D=(l>=17&&l<=23||l>=25&&l<=31)&&f>=64&&f<=127,A=(l===16||l===24)&&f>=64&&f<=95;if(!(D||A))return!1;if(E(l,f,x))return m(null,null,x),!0;var B=l<=23?1:2;f>=64&&f<=95?c=B===1?R[l]:y[l]:c=B===1?S[l]:v[l];var O=this.channels[B];return O?(O.setPAC(this.interpretPAC(c,f)),m(l,f,x),this.currentChannel=B,!0):!1},u.interpretPAC=function(l,f){var c,x={color:null,italics:!1,indent:null,underline:!1,row:l};return f>95?c=f-96:c=f-64,x.underline=(c&1)===1,c<=13?x.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(c/2)]:c<=15?(x.italics=!0,x.color="white"):x.indent=Math.floor((c-16)/2)*4,x},u.parseChars=function(l,f){var c,x=null,D=null;if(l>=25?(c=2,D=l-8):(c=1,D=l),D>=17&&D<=19){var A;D===17?A=f+80:D===18?A=f+112:A=f+144,this.logger.log(o.INFO,"Special char '"+w(A)+"' in channel "+c),x=[A]}else l>=32&&l<=127&&(x=f===0?[l]:[l,f]);if(x){var B=a(x);this.logger.log(o.DEBUG,"Char codes = "+B.join(",")),m(l,f,this.cmdHistory)}return x},u.parseBackgroundAttributes=function(l,f){var c=(l===16||l===24)&&f>=32&&f<=47,x=(l===23||l===31)&&f>=45&&f<=47;if(!(c||x))return!1;var D,A={};l===16||l===24?(D=Math.floor((f-32)/2),A.background=d[D],f%2===1&&(A.background=A.background+"_semi")):f===45?A.background="transparent":(A.foreground="black",f===47&&(A.underline=!0));var B=l<=23?1:2,O=this.channels[B];return O.setBkgData(A),m(l,f,this.cmdHistory),!0},u.reset=function(){for(var l=0;l<Object.keys(this.channels).length;l++){var f=this.channels[l];f&&f.reset()}this.cmdHistory=g()},u.cueSplitAtTime=function(l){for(var f=0;f<this.channels.length;f++){var c=this.channels[f];c&&c.cueSplitAtTime(l)}},h}();function m(h,u,r){r.a=h,r.b=u}function E(h,u,r){return r.a===h&&r.b===u}function g(){return{a:null,b:null}}L.default=_},"./src/utils/codecs.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"isCodecType",function(){return C}),I.d(L,"isCodecSupportedInMp4",function(){return w});var j={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function C(H,U){var R=j[U];return!!R&&R[H.slice(0,4)]===!0}function w(H,U){return MediaSource.isTypeSupported((U||"video")+'/mp4;codecs="'+H+'"')}},"./src/utils/cues.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/utils/vttparser.ts"),C=I("./src/utils/webvtt-parser.ts"),w=I("./src/utils/texttrack-utils.ts"),H=/\s/,U={newCue:function(S,y,v,d){for(var o=[],n,a,s,e,t,i=self.VTTCue||self.TextTrackCue,T=0;T<d.rows.length;T++)if(n=d.rows[T],s=!0,e=0,t="",!n.isEmpty()){for(var _=0;_<n.chars.length;_++)H.test(n.chars[_].uchar)&&s?e++:(t+=n.chars[_].uchar,s=!1);n.cueStartTime=y,y===v&&(v+=1e-4),e>=16?e--:e++;var m=Object(j.fixLineBreaks)(t.trim()),E=Object(C.generateCueId)(y,v,m);(!S||!S.cues||!S.cues.getCueById(E))&&(a=new i(y,v,m),a.id=E,a.line=T+1,a.align="left",a.position=10+Math.min(80,Math.floor(e*8/32)*10),o.push(a))}return S&&o.length&&(o.sort(function(g,h){return g.line==="auto"||h.line==="auto"?0:g.line>8&&h.line>8?h.line-g.line:g.line-h.line}),o.forEach(function(g){return Object(w.addCueToTrack)(S,g)})),o}};L.default=U},"./src/utils/discontinuities.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"findFirstFragWithCC",function(){return H}),I.d(L,"shouldAlignOnDiscontinuities",function(){return U}),I.d(L,"findDiscontinuousReferenceFrag",function(){return R}),I.d(L,"adjustSlidingStart",function(){return y}),I.d(L,"alignStream",function(){return v}),I.d(L,"alignPDT",function(){return o}),I.d(L,"alignFragmentByPDTDelta",function(){return n}),I.d(L,"alignMediaPlaylistByPDT",function(){return a});var j=I("./src/polyfills/number.ts"),C=I("./src/utils/logger.ts"),w=I("./src/controller/level-helper.ts");function H(s,e){for(var t=null,i=0,T=s.length;i<T;i++){var _=s[i];if(_&&_.cc===e){t=_;break}}return t}function U(s,e,t){return!!(e.details&&(t.endCC>t.startCC||s&&s.cc<t.startCC))}function R(s,e){var t=s.fragments,i=e.fragments;if(!i.length||!t.length){C.logger.log("No fragments to align");return}var T=H(t,i[0].cc);if(!T||T&&!T.startPTS){C.logger.log("No frag in previous level to align on");return}return T}function S(s,e){if(s){var t=s.start+e;s.start=s.startPTS=t,s.endPTS=t+s.duration}}function y(s,e){for(var t=e.fragments,i=0,T=t.length;i<T;i++)S(t[i],s);e.fragmentHint&&S(e.fragmentHint,s),e.alignedSliding=!0}function v(s,e,t){if(!e)return;d(s,t,e),!t.alignedSliding&&e.details&&o(t,e.details),!t.alignedSliding&&e.details&&!t.skippedSegments&&Object(w.adjustSliding)(e.details,t)}function d(s,e,t){if(U(s,t,e)){var i=R(t.details,e);i&&Object(j.isFiniteNumber)(i.start)&&(C.logger.log("Adjusting PTS using last level due to CC increase within current level "+e.url),y(i.start,e))}}function o(s,e){if(!e.fragments.length||!s.hasProgramDateTime||!e.hasProgramDateTime)return;var t=e.fragments[0].programDateTime,i=s.fragments[0].programDateTime,T=(i-t)/1e3+e.fragments[0].start;T&&Object(j.isFiniteNumber)(T)&&(C.logger.log("Adjusting PTS using programDateTime delta "+(i-t)+"ms, sliding:"+T.toFixed(3)+" "+s.url+" "),y(T,s))}function n(s,e){var t=s.programDateTime;if(!t)return;var i=(t-e)/1e3;s.start=s.startPTS=i,s.endPTS=i+s.duration}function a(s,e){if(!e.fragments.length||!s.hasProgramDateTime||!e.hasProgramDateTime)return;var t=e.fragments[0].programDateTime,i=e.fragments[0].start,T=t-i*1e3;s.fragments.forEach(function(_){n(_,T)}),s.fragmentHint&&n(s.fragmentHint,T),s.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/utils/ewma.ts"),C=function(){function w(U,R,S){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=S,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new j.default(U),this.fast_=new j.default(R)}var H=w.prototype;return H.update=function(R,S){var y=this.slow_,v=this.fast_;this.slow_.halfLife!==R&&(this.slow_=new j.default(R,y.getEstimate(),y.getTotalWeight())),this.fast_.halfLife!==S&&(this.fast_=new j.default(S,v.getEstimate(),v.getTotalWeight()))},H.sample=function(R,S){R=Math.max(R,this.minDelayMs_);var y=8*S,v=R/1e3,d=y/v;this.fast_.sample(v,d),this.slow_.sample(v,d)},H.canEstimate=function(){var R=this.fast_;return R&&R.getTotalWeight()>=this.minWeight_},H.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},H.destroy=function(){},w}();L.default=C},"./src/utils/ewma.ts":function(ie,L,I){"use strict";I.r(L);var j=function(){function C(H,U,R){U===void 0&&(U=0),R===void 0&&(R=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=H,this.alpha_=H?Math.exp(Math.log(.5)/H):0,this.estimate_=U,this.totalWeight_=R}var w=C.prototype;return w.sample=function(U,R){var S=Math.pow(this.alpha_,U);this.estimate_=R*(1-S)+S*this.estimate_,this.totalWeight_+=U},w.getTotalWeight=function(){return this.totalWeight_},w.getEstimate=function(){if(this.alpha_){var U=1-Math.pow(this.alpha_,this.totalWeight_);if(U)return this.estimate_/U}return this.estimate_},C}();L.default=j},"./src/utils/fetch-loader.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"fetchSupported",function(){return n});var j=I("./src/polyfills/number.ts"),C=I("./src/loader/load-stats.ts"),w=I("./src/demux/chunk-cache.ts");function H(i,T){i.prototype=Object.create(T.prototype),i.prototype.constructor=i,v(i,T)}function U(i){var T=typeof Map=="function"?new Map:void 0;return U=function(m){if(m===null||!y(m))return m;if(typeof m!="function")throw new TypeError("Super expression must either be null or a function");if(typeof T!="undefined"){if(T.has(m))return T.get(m);T.set(m,E)}function E(){return R(m,arguments,d(this).constructor)}return E.prototype=Object.create(m.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),v(E,m)},U(i)}function R(i,T,_){return S()?R=Reflect.construct:R=function(E,g,h){var u=[null];u.push.apply(u,g);var r=Function.bind.apply(E,u),l=new r;return h&&v(l,h.prototype),l},R.apply(null,arguments)}function S(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(i){return!1}}function y(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function v(i,T){return v=Object.setPrototypeOf||function(m,E){return m.__proto__=E,m},v(i,T)}function d(i){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},d(i)}function o(){return o=Object.assign||function(i){for(var T=1;T<arguments.length;T++){var _=arguments[T];for(var m in _)Object.prototype.hasOwnProperty.call(_,m)&&(i[m]=_[m])}return i},o.apply(this,arguments)}function n(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(i){}return!1}var a=function(){function i(_){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=_.fetchSetup||e,this.controller=new self.AbortController,this.stats=new C.LoadStats}var T=i.prototype;return T.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},T.abortInternal=function(){var m=this.response;(!m||!m.ok)&&(this.stats.aborted=!0,this.controller.abort())},T.abort=function(){var m;this.abortInternal(),(m=this.callbacks)!==null&&m!==void 0&&m.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},T.load=function(m,E,g){var h=this,u=this.stats;if(u.loading.start)throw new Error("Loader can only be used once.");u.loading.start=self.performance.now();var r=s(m,this.controller.signal),l=g.onProgress,f=m.responseType==="arraybuffer",c=f?"byteLength":"length";this.context=m,this.config=E,this.callbacks=g,this.request=this.fetchSetup(m,r),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){h.abortInternal(),g.onTimeout(u,m,h.response)},E.timeout),self.fetch(this.request).then(function(x){if(h.response=h.loader=x,!x.ok){var D=x.status,A=x.statusText;throw new t(A||"fetch, bad network response",D,x)}return u.loading.first=Math.max(self.performance.now(),u.loading.start),u.total=parseInt(x.headers.get("Content-Length")||"0"),l&&Object(j.isFiniteNumber)(E.highWaterMark)?h.loadProgressively(x,u,m,E.highWaterMark,l):f?x.arrayBuffer():x.text()}).then(function(x){var D=h.response;self.clearTimeout(h.requestTimeout),u.loading.end=Math.max(self.performance.now(),u.loading.first),u.loaded=u.total=x[c];var A={url:D.url,data:x};l&&!Object(j.isFiniteNumber)(E.highWaterMark)&&l(u,m,x,D),g.onSuccess(A,u,m,D)}).catch(function(x){if(self.clearTimeout(h.requestTimeout),u.aborted)return;var D=x.code||0;g.onError({code:D,text:x.message},m,x.details)})},T.getCacheAge=function(){var m=null;if(this.response){var E=this.response.headers.get("age");m=E?parseFloat(E):null}return m},T.loadProgressively=function(m,E,g,h,u){h===void 0&&(h=0);var r=new w.default,l=m.body.getReader(),f=function c(){return l.read().then(function(x){if(x.done)return r.dataLength&&u(E,g,r.flush(),m),Promise.resolve(new ArrayBuffer(0));var D=x.value,A=D.length;return E.loaded+=A,A<h||r.dataLength?(r.push(D),r.dataLength>=h&&u(E,g,r.flush(),m)):u(E,g,D,m),c()}).catch(function(){return Promise.reject()})};return f()},i}();function s(i,T){var _={method:"GET",mode:"cors",credentials:"same-origin",signal:T,headers:new self.Headers(o({},i.headers))};return i.rangeEnd&&_.headers.set("Range","bytes="+i.rangeStart+"-"+String(i.rangeEnd-1)),_}function e(i,T){return new self.Request(i.url,T)}var t=function(i){H(T,i);function T(_,m,E){var g;return g=i.call(this,_)||this,g.code=void 0,g.details=void 0,g.code=m,g.details=E,g}return T}(U(Error));L.default=a},"./src/utils/imsc1-ttml-parser.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"IMSC1_CODEC",function(){return y}),I.d(L,"parseIMSC1",function(){return n});var j=I("./src/utils/mp4-tools.ts"),C=I("./src/utils/vttparser.ts"),w=I("./src/utils/vttcue.ts"),H=I("./src/demux/id3.ts"),U=I("./src/utils/timescale-conversion.ts"),R=I("./src/utils/webvtt-parser.ts");function S(){return S=Object.assign||function(h){for(var u=1;u<arguments.length;u++){var r=arguments[u];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(h[l]=r[l])}return h},S.apply(this,arguments)}var y="stpp.ttml.im1t",v=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,d=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,o={left:"start",center:"center",right:"end",start:"start",end:"end"};function n(h,u,r,l,f){var c=Object(j.findBox)(new Uint8Array(h),["mdat"]);if(c.length===0){f(new Error("Could not parse IMSC1 mdat"));return}var x=c[0],D=Object(H.utf8ArrayToStr)(new Uint8Array(h,x.start,x.end-x.start)),A=Object(U.toTimescaleFromScale)(u,1,r);try{l(a(D,A))}catch(B){f(B)}}function a(h,u){var r=new DOMParser,l=r.parseFromString(h,"text/xml"),f=l.getElementsByTagName("tt")[0];if(!f)throw new Error("Invalid ttml");var c={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},x=Object.keys(c).reduce(function(W,P){return W[P]=f.getAttribute("ttp:"+P)||c[P],W},{}),D=f.getAttribute("xml:space")!=="preserve",A=e(s(f,"styling","style")),B=e(s(f,"layout","region")),O=s(f,"body","[begin]");return[].map.call(O,function(W){var P=t(W,D);if(!P||!W.hasAttribute("begin"))return null;var G=m(W.getAttribute("begin"),x),Q=m(W.getAttribute("dur"),x),re=m(W.getAttribute("end"),x);if(G===null)throw _(W);if(re===null){if(Q===null)throw _(W);re=G+Q}var le=new w.default(G-u,re-u,P);le.id=Object(R.generateCueId)(le.startTime,le.endTime,le.text);var Ee=B[W.getAttribute("region")],_e=A[W.getAttribute("style")];le.position=10,le.size=80;var ne=i(Ee,_e),Te=ne.textAlign;if(Te){var Ae=o[Te];Ae&&(le.lineAlign=Ae),le.align=Te}return S(le,ne),le}).filter(function(W){return W!==null})}function s(h,u,r){var l=h.getElementsByTagName(u)[0];return l?[].slice.call(l.querySelectorAll(r)):[]}function e(h){return h.reduce(function(u,r){var l=r.getAttribute("xml:id");return l&&(u[l]=r),u},{})}function t(h,u){return[].slice.call(h.childNodes).reduce(function(r,l,f){var c;return l.nodeName==="br"&&f?r+`
`:(c=l.childNodes)!==null&&c!==void 0&&c.length?t(l,u):u?r+l.textContent.trim().replace(/\s+/g," "):r+l.textContent},"")}function i(h,u){var r="http://www.w3.org/ns/ttml#styling",l=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return l.reduce(function(f,c){var x=T(u,r,c)||T(h,r,c);return x&&(f[c]=x),f},{})}function T(h,u,r){return h.hasAttributeNS(u,r)?h.getAttributeNS(u,r):null}function _(h){return new Error("Could not parse ttml timestamp "+h)}function m(h,u){if(!h)return null;var r=Object(C.parseTimeStamp)(h);return r===null&&(v.test(h)?r=E(h,u):d.test(h)&&(r=g(h,u))),r}function E(h,u){var r=v.exec(h),l=(r[4]|0)+(r[5]|0)/u.subFrameRate;return(r[1]|0)*3600+(r[2]|0)*60+(r[3]|0)+l/u.frameRate}function g(h,u){var r=d.exec(h),l=Number(r[1]),f=r[2];switch(f){case"h":return l*3600;case"m":return l*60;case"ms":return l*1e3;case"f":return l/u.frameRate;case"t":return l/u.tickRate}return l}},"./src/utils/logger.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"enableLogs",function(){return R}),I.d(L,"logger",function(){return S});var j=function(){},C={trace:j,debug:j,log:j,warn:j,info:j,error:j},w=C;function H(y){var v=self.console[y];return v?v.bind(self.console,"["+y+"] >"):j}function U(y){for(var v=arguments.length,d=new Array(v>1?v-1:0),o=1;o<v;o++)d[o-1]=arguments[o];d.forEach(function(n){w[n]=y[n]?y[n].bind(y):H(n)})}function R(y){if(self.console&&y===!0||typeof y=="object"){U(y,"debug","log","info","warn","error");try{w.log()}catch(v){w=C}}else w=C}var S=w},"./src/utils/mediakeys-helper.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"KeySystems",function(){return j}),I.d(L,"requestMediaKeySystemAccess",function(){return C});var j;(function(w){w.WIDEVINE="com.widevine.alpha",w.PLAYREADY="com.microsoft.playready"})(j||(j={}));var C=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"getMediaSource",function(){return j});function j(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"bin2str",function(){return U}),I.d(L,"readUint16",function(){return R}),I.d(L,"readUint32",function(){return S}),I.d(L,"writeUint32",function(){return y}),I.d(L,"findBox",function(){return v}),I.d(L,"parseSegmentIndex",function(){return d}),I.d(L,"parseInitSegment",function(){return o}),I.d(L,"getStartDTS",function(){return n}),I.d(L,"getDuration",function(){return a}),I.d(L,"computeRawDurationFromSamples",function(){return s}),I.d(L,"offsetStartDTS",function(){return e}),I.d(L,"segmentValidRange",function(){return t}),I.d(L,"appendUint8Array",function(){return i});var j=I("./src/utils/typed-array.ts"),C=I("./src/loader/fragment.ts"),w=Math.pow(2,32)-1,H=[].push;function U(T){return String.fromCharCode.apply(null,T)}function R(T,_){"data"in T&&(_+=T.start,T=T.data);var m=T[_]<<8|T[_+1];return m<0?65536+m:m}function S(T,_){"data"in T&&(_+=T.start,T=T.data);var m=T[_]<<24|T[_+1]<<16|T[_+2]<<8|T[_+3];return m<0?4294967296+m:m}function y(T,_,m){"data"in T&&(_+=T.start,T=T.data),T[_]=m>>24,T[_+1]=m>>16&255,T[_+2]=m>>8&255,T[_+3]=m&255}function v(T,_){var m=[];if(!_.length)return m;var E,g,h;"data"in T?(E=T.data,g=T.start,h=T.end):(E=T,g=0,h=E.byteLength);for(var u=g;u<h;){var r=S(E,u),l=U(E.subarray(u+4,u+8)),f=r>1?u+r:h;if(l===_[0])if(_.length===1)m.push({data:E,start:u+8,end:f});else{var c=v({data:E,start:u+8,end:f},_.slice(1));c.length&&H.apply(m,c)}u=f}return m}function d(T){var _=v(T,["moov"]),m=_[0],E=m?m.end:null,g=v(T,["sidx"]);if(!g||!g[0])return null;var h=[],u=g[0],r=u.data[0],l=r===0?8:16,f=S(u,l);l+=4;var c=0,x=0;r===0?l+=8:l+=16,l+=2;var D=u.end+x,A=R(u,l);l+=2;for(var B=0;B<A;B++){var O=l,W=S(u,O);O+=4;var P=W&2147483647,G=(W&2147483648)>>>31;if(G===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Q=S(u,O);O+=4,h.push({referenceSize:P,subsegmentDuration:Q,info:{duration:Q/f,start:D,end:D+P-1}}),D+=P,O+=4,l=O}return{earliestPresentationTime:c,timescale:f,version:r,referencesCount:A,references:h,moovEndOffset:E}}function o(T){for(var _=[],m=v(T,["moov","trak"]),E=0;E<m.length;E++){var g=m[E],h=v(g,["tkhd"])[0];if(h){var u=h.data[h.start],r=u===0?12:20,l=S(h,r),f=v(g,["mdia","mdhd"])[0];if(f){u=f.data[f.start],r=u===0?12:20;var c=S(f,r),x=v(g,["mdia","hdlr"])[0];if(x){var D=U(x.data.subarray(x.start+8,x.start+12)),A={soun:C.ElementaryStreamTypes.AUDIO,vide:C.ElementaryStreamTypes.VIDEO}[D];if(A){var B=v(g,["mdia","minf","stbl","stsd"])[0],O=void 0;B&&(O=U(B.data.subarray(B.start+12,B.start+16))),_[l]={timescale:c,type:A},_[A]={timescale:c,id:l,codec:O}}}}}}var W=v(T,["moov","mvex","trex"]);return W.forEach(function(P){var G=S(P,4),Q=_[G];Q&&(Q.default={duration:S(P,12),flags:S(P,20)})}),_}function n(T,_){return v(_,["moof","traf"]).reduce(function(m,E){var g=v(E,["tfdt"])[0],h=g.data[g.start],u=v(E,["tfhd"]).reduce(function(r,l){var f=S(l,4),c=T[f];if(c){var x=S(g,4);h===1&&(x*=Math.pow(2,32),x+=S(g,8));var D=c.timescale||9e4,A=x/D;if(isFinite(A)&&(r===null||A<r))return A}return r},null);return u!==null&&isFinite(u)&&(m===null||u<m)?u:m},null)||0}function a(T,_){for(var m=0,E=0,g=0,h=v(T,["moof","traf"]),u=0;u<h.length;u++){var r=h[u],l=v(r,["tfhd"])[0],f=S(l,4),c=_[f];if(!c)continue;var x=c.default,D=S(l,0)|(x==null?void 0:x.flags),A=x==null?void 0:x.duration;D&8&&(D&2?A=S(l,12):A=S(l,8));for(var B=c.timescale||9e4,O=v(r,["trun"]),W=0;W<O.length;W++){if(A){var P=S(O[W],4);m=A*P}else m=s(O[W]);c.type===C.ElementaryStreamTypes.VIDEO?E+=m/B:c.type===C.ElementaryStreamTypes.AUDIO&&(g+=m/B)}}if(E===0&&g===0){var G=d(T);if(G!=null&&G.references)return G.references.reduce(function(Q,re){return Q+re.info.duration||0},0)}return E||g}function s(T){var _=S(T,0),m=8;_&1&&(m+=4),_&4&&(m+=4);for(var E=0,g=S(T,4),h=0;h<g;h++){if(_&256){var u=S(T,m);E+=u,m+=4}_&512&&(m+=4),_&1024&&(m+=4),_&2048&&(m+=4)}return E}function e(T,_,m){v(_,["moof","traf"]).forEach(function(E){v(E,["tfhd"]).forEach(function(g){var h=S(g,4),u=T[h];if(!u)return;var r=u.timescale||9e4;v(E,["tfdt"]).forEach(function(l){var f=l.data[l.start],c=S(l,4);if(f===0)y(l,4,c-m*r);else{c*=Math.pow(2,32),c+=S(l,8),c-=m*r,c=Math.max(c,0);var x=Math.floor(c/(w+1)),D=Math.floor(c%(w+1));y(l,4,x),y(l,8,D)}})})})}function t(T){var _={valid:null,remainder:null},m=v(T,["moof"]);if(m){if(m.length<2)return _.remainder=T,_}else return _;var E=m[m.length-1];return _.valid=Object(j.sliceUint8)(T,0,E.start-8),_.remainder=Object(j.sliceUint8)(T,E.start-8),_}function i(T,_){var m=new Uint8Array(T.length+_.length);return m.set(T),m.set(_,T.length),m}},"./src/utils/output-filter.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"default",function(){return j});var j=function(){function C(H,U){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=H,this.trackName=U}var w=C.prototype;return w.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},w.newCue=function(U,R,S){(this.startTime===null||this.startTime>U)&&(this.startTime=U),this.endTime=R,this.screen=S,this.timelineController.createCaptionsTrack(this.trackName)},w.reset=function(){this.cueRanges=[]},C}()},"./src/utils/texttrack-utils.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"sendAddTrackEvent",function(){return C}),I.d(L,"addCueToTrack",function(){return w}),I.d(L,"clearCurrentCues",function(){return H}),I.d(L,"removeCuesInRange",function(){return U}),I.d(L,"getCuesInRange",function(){return S});var j=I("./src/utils/logger.ts");function C(y,v){var d;try{d=new Event("addtrack")}catch(o){d=document.createEvent("Event"),d.initEvent("addtrack",!1,!1)}d.track=y,v.dispatchEvent(d)}function w(y,v){var d=y.mode;if(d==="disabled"&&(y.mode="hidden"),y.cues&&!y.cues.getCueById(v.id))try{if(y.addCue(v),!y.cues.getCueById(v.id))throw new Error("addCue is failed for: "+v)}catch(n){j.logger.debug("[texttrack-utils]: "+n);var o=new self.TextTrackCue(v.startTime,v.endTime,v.text);o.id=v.id,y.addCue(o)}d==="disabled"&&(y.mode=d)}function H(y){var v=y.mode;if(v==="disabled"&&(y.mode="hidden"),y.cues)for(var d=y.cues.length;d--;)y.removeCue(y.cues[d]);v==="disabled"&&(y.mode=v)}function U(y,v,d){var o=y.mode;if(o==="disabled"&&(y.mode="hidden"),y.cues&&y.cues.length>0)for(var n=S(y.cues,v,d),a=0;a<n.length;a++)y.removeCue(n[a]);o==="disabled"&&(y.mode=o)}function R(y,v){if(v<y[0].startTime)return 0;var d=y.length-1;if(v>y[d].endTime)return-1;for(var o=0,n=d;o<=n;){var a=Math.floor((n+o)/2);if(v<y[a].startTime)n=a-1;else if(v>y[a].startTime&&o<d)o=a+1;else return a}return y[o].startTime-v<v-y[n].startTime?o:n}function S(y,v,d){var o=[],n=R(y,v);if(n>-1)for(var a=n,s=y.length;a<s;a++){var e=y[a];if(e.startTime>=v&&e.endTime<=d)o.push(e);else if(e.startTime>d)return o}return o}},"./src/utils/time-ranges.ts":function(ie,L,I){"use strict";I.r(L);var j={toString:function(w){for(var H="",U=w.length,R=0;R<U;R++)H+="["+w.start(R).toFixed(3)+","+w.end(R).toFixed(3)+"]";return H}};L.default=j},"./src/utils/timescale-conversion.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"toTimescaleFromBase",function(){return C}),I.d(L,"toTimescaleFromScale",function(){return w}),I.d(L,"toMsFromMpegTsClock",function(){return H}),I.d(L,"toMpegTsClockFromTimescale",function(){return U});var j=9e4;function C(R,S,y,v){y===void 0&&(y=1),v===void 0&&(v=!1);var d=R*S*y;return v?Math.round(d):d}function w(R,S,y,v){return y===void 0&&(y=1),v===void 0&&(v=!1),C(R,S,1/y,v)}function H(R,S){return S===void 0&&(S=!1),C(R,1e3,1/j,S)}function U(R,S){return S===void 0&&(S=1),C(R,j,1/S)}},"./src/utils/typed-array.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"sliceUint8",function(){return j});function j(C,w,H){return Uint8Array.prototype.slice?C.slice(w,H):new Uint8Array(Array.prototype.slice.call(C,w,H))}},"./src/utils/vttcue.ts":function(ie,L,I){"use strict";I.r(L),L.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var j=["","lr","rl"],C=["start","middle","end","left","right"];function w(y,v){if(typeof v!="string")return!1;if(!Array.isArray(y))return!1;var d=v.toLowerCase();return~y.indexOf(d)?d:!1}function H(y){return w(j,y)}function U(y){return w(C,y)}function R(y){for(var v=arguments.length,d=new Array(v>1?v-1:0),o=1;o<v;o++)d[o-1]=arguments[o];for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var s in a)y[s]=a[s]}return y}function S(y,v,d){var o=this,n={enumerable:!0};o.hasBeenReset=!1;var a="",s=!1,e=y,t=v,i=d,T=null,_="",m=!0,E="auto",g="start",h=50,u="middle",r=50,l="middle";Object.defineProperty(o,"id",R({},n,{get:function(){return a},set:function(c){a=""+c}})),Object.defineProperty(o,"pauseOnExit",R({},n,{get:function(){return s},set:function(c){s=!!c}})),Object.defineProperty(o,"startTime",R({},n,{get:function(){return e},set:function(c){if(typeof c!="number")throw new TypeError("Start time must be set to a number.");e=c,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",R({},n,{get:function(){return t},set:function(c){if(typeof c!="number")throw new TypeError("End time must be set to a number.");t=c,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",R({},n,{get:function(){return i},set:function(c){i=""+c,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",R({},n,{get:function(){return T},set:function(c){T=c,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",R({},n,{get:function(){return _},set:function(c){var x=H(c);if(x===!1)throw new SyntaxError("An invalid or illegal string was specified.");_=x,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",R({},n,{get:function(){return m},set:function(c){m=!!c,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",R({},n,{get:function(){return E},set:function(c){if(typeof c!="number"&&c!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");E=c,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",R({},n,{get:function(){return g},set:function(c){var x=U(c);if(!x)throw new SyntaxError("An invalid or illegal string was specified.");g=x,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",R({},n,{get:function(){return h},set:function(c){if(c<0||c>100)throw new Error("Position must be between 0 and 100.");h=c,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",R({},n,{get:function(){return u},set:function(c){var x=U(c);if(!x)throw new SyntaxError("An invalid or illegal string was specified.");u=x,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",R({},n,{get:function(){return r},set:function(c){if(c<0||c>100)throw new Error("Size must be between 0 and 100.");r=c,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",R({},n,{get:function(){return l},set:function(c){var x=U(c);if(!x)throw new SyntaxError("An invalid or illegal string was specified.");l=x,this.hasBeenReset=!0}})),o.displayState=void 0}return S.prototype.getCueAsHTML=function(){var y=self.WebVTT;return y.convertCueToDOMTree(self,this.text)},S}()},"./src/utils/vttparser.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"parseTimeStamp",function(){return w}),I.d(L,"fixLineBreaks",function(){return v}),I.d(L,"VTTParser",function(){return d});var j=I("./src/utils/vttcue.ts"),C=function(){function o(){}var n=o.prototype;return n.decode=function(s,e){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))},o}();function w(o){function n(s,e,t,i){return(s|0)*3600+(e|0)*60+(t|0)+parseFloat(i||0)}var a=o.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return a?parseFloat(a[2])>59?n(a[2],a[3],0,a[4]):n(a[1],a[2],a[3],a[4]):null}var H=function(){function o(){this.values=Object.create(null)}var n=o.prototype;return n.set=function(s,e){!this.get(s)&&e!==""&&(this.values[s]=e)},n.get=function(s,e,t){return t?this.has(s)?this.values[s]:e[t]:this.has(s)?this.values[s]:e},n.has=function(s){return s in this.values},n.alt=function(s,e,t){for(var i=0;i<t.length;++i)if(e===t[i]){this.set(s,e);break}},n.integer=function(s,e){/^-?\d+$/.test(e)&&this.set(s,parseInt(e,10))},n.percent=function(s,e){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(e)){var t=parseFloat(e);if(t>=0&&t<=100)return this.set(s,t),!0}return!1},o}();function U(o,n,a,s){var e=s?o.split(s):[o];for(var t in e){if(typeof e[t]!="string")continue;var i=e[t].split(a);if(i.length!==2)continue;var T=i[0],_=i[1];n(T,_)}}var R=new j.default(0,0,""),S=R.align==="middle"?"middle":"center";function y(o,n,a){var s=o;function e(){var T=w(o);if(T===null)throw new Error("Malformed timestamp: "+s);return o=o.replace(/^[^\sa-zA-Z-]+/,""),T}function t(T,_){var m=new H;U(T,function(h,u){var r;switch(h){case"region":for(var l=a.length-1;l>=0;l--)if(a[l].id===u){m.set(h,a[l].region);break}break;case"vertical":m.alt(h,u,["rl","lr"]);break;case"line":r=u.split(","),m.integer(h,r[0]),m.percent(h,r[0])&&m.set("snapToLines",!1),m.alt(h,r[0],["auto"]),r.length===2&&m.alt("lineAlign",r[1],["start",S,"end"]);break;case"position":r=u.split(","),m.percent(h,r[0]),r.length===2&&m.alt("positionAlign",r[1],["start",S,"end","line-left","line-right","auto"]);break;case"size":m.percent(h,u);break;case"align":m.alt(h,u,["start",S,"end","left","right"]);break}},/:/,/\s/),_.region=m.get("region",null),_.vertical=m.get("vertical","");var E=m.get("line","auto");E==="auto"&&R.line===-1&&(E=-1),_.line=E,_.lineAlign=m.get("lineAlign","start"),_.snapToLines=m.get("snapToLines",!0),_.size=m.get("size",100),_.align=m.get("align",S);var g=m.get("position","auto");g==="auto"&&R.position===50&&(g=_.align==="start"||_.align==="left"?0:_.align==="end"||_.align==="right"?100:50),_.position=g}function i(){o=o.replace(/^\s+/,"")}if(i(),n.startTime=e(),i(),o.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+s);o=o.substr(3),i(),n.endTime=e(),i(),t(o,n)}function v(o){return o.replace(/<br(?: \/)?>/gi,`
`)}var d=function(){function o(){this.state="INITIAL",this.buffer="",this.decoder=new C,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var n=o.prototype;return n.parse=function(s){var e=this;s&&(e.buffer+=e.decoder.decode(s,{stream:!0}));function t(){var g=e.buffer,h=0;for(g=v(g);h<g.length&&g[h]!=="\r"&&g[h]!==`
`;)++h;var u=g.substr(0,h);return g[h]==="\r"&&++h,g[h]===`
`&&++h,e.buffer=g.substr(h),u}function i(g){U(g,function(h,u){},/:/)}try{var T="";if(e.state==="INITIAL"){if(!/\r\n|\n/.test(e.buffer))return this;T=t();var _=T.match(/^()?WEBVTT([ \t].*)?$/);if(!_||!_[0])throw new Error("Malformed WebVTT signature.");e.state="HEADER"}for(var m=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;m?m=!1:T=t();switch(e.state){case"HEADER":/:/.test(T)?i(T):T||(e.state="ID");continue;case"NOTE":T||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(T)){e.state="NOTE";break}if(!T)continue;if(e.cue=new j.default(0,0,""),e.state="CUE",T.indexOf("-->")===-1){e.cue.id=T;continue}case"CUE":if(!e.cue){e.state="BADCUE";continue}try{y(T,e.cue,e.regionList)}catch(g){e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":{var E=T.indexOf("-->")!==-1;if(!T||E&&(m=!0)){e.oncue&&e.cue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}if(e.cue===null)continue;e.cue.text&&(e.cue.text+=`
`),e.cue.text+=T}continue;case"BADCUE":T||(e.state="ID")}}}catch(g){e.state==="CUETEXT"&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state=e.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},n.flush=function(){var s=this;try{if((s.cue||s.state==="HEADER")&&(s.buffer+=`
`,s.parse()),s.state==="INITIAL"||s.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(e){s.onparsingerror&&s.onparsingerror(e)}return s.onflush&&s.onflush(),this},o}()},"./src/utils/webvtt-parser.ts":function(ie,L,I){"use strict";I.r(L),I.d(L,"generateCueId",function(){return d}),I.d(L,"parseWebVTT",function(){return n});var j=I("./src/polyfills/number.ts"),C=I("./src/utils/vttparser.ts"),w=I("./src/demux/id3.ts"),H=I("./src/utils/timescale-conversion.ts"),U=I("./src/remux/mp4-remuxer.ts"),R=/\r\n|\n\r|\n|\r/g,S=function(s,e,t){return t===void 0&&(t=0),s.substr(t,e.length)===e},y=function(s){var e=parseInt(s.substr(-3)),t=parseInt(s.substr(-6,2)),i=parseInt(s.substr(-9,2)),T=s.length>9?parseInt(s.substr(0,s.indexOf(":"))):0;if(!Object(j.isFiniteNumber)(e)||!Object(j.isFiniteNumber)(t)||!Object(j.isFiniteNumber)(i)||!Object(j.isFiniteNumber)(T))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+s);return e+=1e3*t,e+=60*1e3*i,e+=60*60*1e3*T,e},v=function(s){for(var e=5381,t=s.length;t;)e=e*33^s.charCodeAt(--t);return(e>>>0).toString()};function d(a,s,e){return v(a.toString())+v(s.toString())+v(e)}var o=function(s,e,t){var i=s[e],T=s[i.prevCC];if(!T||!T.new&&i.new){s.ccOffset=s.presentationOffset=i.start,i.new=!1;return}for(;(_=T)!==null&&_!==void 0&&_.new;){var _;s.ccOffset+=i.start-T.start,i.new=!1,i=T,T=s[i.prevCC]}s.presentationOffset=t};function n(a,s,e,t,i,T,_,m){var E=new C.VTTParser,g=Object(w.utf8ArrayToStr)(new Uint8Array(a)).trim().replace(R,`
`).split(`
`),h=[],u=Object(H.toMpegTsClockFromTimescale)(s,e),r="00:00.000",l=0,f=0,c,x=!0,D=!1;E.oncue=function(A){var B=t[i],O=t.ccOffset,W=(l-u)/9e4;if(B!=null&&B.new&&(f!==void 0?O=t.ccOffset=B.start:o(t,i,W)),W&&(O=W-t.presentationOffset),D){var P=A.endTime-A.startTime,G=Object(U.normalizePts)((A.startTime+O-f)*9e4,T*9e4)/9e4;A.startTime=G,A.endTime=G+P}var Q=A.text.trim();A.text=decodeURIComponent(encodeURIComponent(Q)),A.id||(A.id=d(A.startTime,A.endTime,Q)),A.endTime>0&&h.push(A)},E.onparsingerror=function(A){c=A},E.onflush=function(){if(c){m(c);return}_(h)},g.forEach(function(A){if(x)if(S(A,"X-TIMESTAMP-MAP=")){x=!1,D=!0,A.substr(16).split(",").forEach(function(B){S(B,"LOCAL:")?r=B.substr(6):S(B,"MPEGTS:")&&(l=parseInt(B.substr(7)))});try{f=y(r)/1e3}catch(B){D=!1,c=B}return}else A===""&&(x=!1);E.parse(A+`
`)}),E.flush()}},"./src/utils/xhr-loader.ts":function(ie,L,I){"use strict";I.r(L);var j=I("./src/utils/logger.ts"),C=I("./src/loader/load-stats.ts"),w=/^age:\s*[\d.]+\s*$/m,H=function(){function U(S){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=S?S.xhrSetup:null,this.stats=new C.LoadStats,this.retryDelay=0}var R=U.prototype;return R.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},R.abortInternal=function(){var y=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),y&&(y.onreadystatechange=null,y.onprogress=null,y.readyState!==4&&(this.stats.aborted=!0,y.abort()))},R.abort=function(){var y;this.abortInternal(),(y=this.callbacks)!==null&&y!==void 0&&y.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},R.load=function(y,v,d){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=y,this.config=v,this.callbacks=d,this.retryDelay=v.retryDelay,this.loadInternal()},R.loadInternal=function(){var y=this.config,v=this.context;if(!y)return;var d=this.loader=new self.XMLHttpRequest,o=this.stats;o.loading.first=0,o.loaded=0;var n=this.xhrSetup;try{if(n)try{n(d,v.url)}catch(e){d.open("GET",v.url,!0),n(d,v.url)}d.readyState||d.open("GET",v.url,!0);var a=this.context.headers;if(a)for(var s in a)d.setRequestHeader(s,a[s])}catch(e){this.callbacks.onError({code:d.status,text:e.message},v,d);return}v.rangeEnd&&d.setRequestHeader("Range","bytes="+v.rangeStart+"-"+(v.rangeEnd-1)),d.onreadystatechange=this.readystatechange.bind(this),d.onprogress=this.loadprogress.bind(this),d.responseType=v.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),y.timeout),d.send()},R.readystatechange=function(){var y=this.context,v=this.loader,d=this.stats;if(!y||!v)return;var o=v.readyState,n=this.config;if(d.aborted)return;if(o>=2)if(self.clearTimeout(this.requestTimeout),d.loading.first===0&&(d.loading.first=Math.max(self.performance.now(),d.loading.start)),o===4){v.onreadystatechange=null,v.onprogress=null;var a=v.status;if(a>=200&&a<300){d.loading.end=Math.max(self.performance.now(),d.loading.first);var s,e;if(y.responseType==="arraybuffer"?(s=v.response,e=s.byteLength):(s=v.responseText,e=s.length),d.loaded=d.total=e,!this.callbacks)return;var t=this.callbacks.onProgress;if(t&&t(d,y,s,v),!this.callbacks)return;var i={url:v.responseURL,data:s};this.callbacks.onSuccess(i,d,y,v)}else d.retry>=n.maxRetry||a>=400&&a<499?(j.logger.error(a+" while loading "+y.url),this.callbacks.onError({code:a,text:v.statusText},y,v)):(j.logger.warn(a+" while loading "+y.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,n.maxRetryDelay),d.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout)},R.loadtimeout=function(){j.logger.warn("timeout while loading "+this.context.url);var y=this.callbacks;y&&(this.abortInternal(),y.onTimeout(this.stats,this.context,this.loader))},R.loadprogress=function(y){var v=this.stats;v.loaded=y.loaded,y.lengthComputable&&(v.total=y.total)},R.getCacheAge=function(){var y=null;if(this.loader&&w.test(this.loader.getAllResponseHeaders())){var v=this.loader.getResponseHeader("age");y=v?parseFloat(v):null}return y},U}();L.default=H}}).default})},vHTk:function(Ge,Re,F){Ge.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(Ge,Re,F){"use strict";F.d(Re,"a",function(){return ut});var ie=F("rePB"),L=F("VTBJ"),I=F("KQm4"),j=F("U8pU"),C=F("ODXe"),w=F("cDcd"),H=F("TSYQ"),U=F.n(H),R=F("Gytx"),S=F.n(R),y=F("Kwbf"),v=F("t23M"),d=F("qx4F"),o=F("6eGT"),n=F("IBYe"),a=F("Ff2n"),s=F("c+Xe"),e=F("fyJ8"),t=F("biw7");function i(me,xe,De,ke,be){var Le=De[me]||{},ce=De[xe]||{},ee,te;Le.fixed==="left"?ee=ke.left[me]:ce.fixed==="right"&&(te=ke.right[xe]);var V=!1,X=!1,q=!1,ae=!1,ge=De[xe+1],we=De[me-1];if(be==="rtl"){if(ee!==void 0){var je=we&&we.fixed==="left";ae=!je}else if(te!==void 0){var at=ge&&ge.fixed==="right";q=!at}}else if(ee!==void 0){var ot=ge&&ge.fixed==="left";V=!ot}else if(te!==void 0){var Se=we&&we.fixed==="right";X=!Se}return{fixLeft:ee,fixRight:te,lastFixLeft:V,firstFixRight:X,lastFixRight:q,firstFixLeft:ae,isSticky:ke.isSticky}}var T=F("sR1s");function _(me){var xe=me.cells,De=me.stickyOffsets,ke=me.flattenColumns,be=me.rowComponent,Le=me.cellComponent,ce=me.onHeaderRow,ee=me.index,te=w.useContext(t.a),V=te.prefixCls,X=te.direction,q;ce&&(q=ce(xe.map(function(ge){return ge.column}),ee));var ae=Object(T.a)(xe.map(function(ge){return ge.column}));return w.createElement(be,Object.assign({},q),xe.map(function(ge,we){var je=ge.column,at=i(ge.colStart,ge.colEnd,ke,De,X),ot;return je&&je.onHeaderCell&&(ot=ge.column.onHeaderCell(je)),w.createElement(e.a,Object.assign({},ge,{ellipsis:je.ellipsis,align:je.align,component:Le,prefixCls:V,key:ae[we]},at,{additionalProps:ot,rowType:"header"}))}))}_.displayName="HeaderRow";var m=_;function E(me){var xe=[];function De(ce,ee){var te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;xe[te]=xe[te]||[];var V=ee,X=ce.filter(Boolean).map(function(q){var ae={key:q.key,className:q.className||"",children:q.title,column:q,colStart:V},ge=1,we=q.children;return we&&we.length>0&&(ge=De(we,V,te+1).reduce(function(je,at){return je+at},0),ae.hasSubColumns=!0),"colSpan"in q&&(ge=q.colSpan),"rowSpan"in q&&(ae.rowSpan=q.rowSpan),ae.colSpan=ge,ae.colEnd=ae.colStart+ge-1,xe[te].push(ae),V+=ge,ge});return X}De(me,0);for(var ke=xe.length,be=function(ee){xe[ee].forEach(function(te){!("rowSpan"in te)&&!te.hasSubColumns&&(te.rowSpan=ke-ee)})},Le=0;Le<ke;Le+=1)be(Le);return xe}function g(me){var xe=me.stickyOffsets,De=me.columns,ke=me.flattenColumns,be=me.onHeaderRow,Le=w.useContext(t.a),ce=Le.prefixCls,ee=Le.getComponent,te=w.useMemo(function(){return E(De)},[De]),V=ee(["header","wrapper"],"thead"),X=ee(["header","row"],"tr"),q=ee(["header","cell"],"th");return w.createElement(V,{className:"".concat(ce,"-thead")},te.map(function(ae,ge){var we=w.createElement(m,{key:ge,flattenColumns:ke,cells:ae,stickyOffsets:xe,rowComponent:X,cellComponent:q,onHeaderRow:be,index:ge});return we}))}var h=g,u=F("hW8S");function r(me){for(var xe=me.colWidths,De=me.columns,ke=me.columCount,be=[],Le=ke||De.length,ce=!1,ee=Le-1;ee>=0;ee-=1){var te=xe[ee],V=De&&De[ee],X=V&&V[u.a];(te||X||ce)&&(be.unshift(w.createElement("col",Object.assign({key:ee,style:{width:te,minWidth:te}},X))),ce=!0)}return w.createElement("colgroup",null,be)}var l=r;function f(me,xe){return Object(w.useMemo)(function(){for(var De=[],ke=0;ke<xe;ke+=1){var be=me[ke];if(be!==void 0)De[ke]=be;else return null}return De},[me.join("_"),xe])}var c=w.forwardRef(function(me,xe){var De=me.noData,ke=me.columns,be=me.flattenColumns,Le=me.colWidths,ce=me.columCount,ee=me.stickyOffsets,te=me.direction,V=me.fixHeader,X=me.offsetHeader,q=me.stickyClassName,ae=me.onScroll,ge=Object(a.a)(me,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),we=w.useContext(t.a),je=we.prefixCls,at=we.scrollbarSize,ot=we.isSticky,Se=ot&&!V?0:at,st=w.useRef(null),tt=w.useCallback(function(vt){Object(s.b)(xe,vt),Object(s.b)(st,vt)},[]);w.useEffect(function(){var vt;function Ot(Pe){var pt=Pe.currentTarget,St=Pe.deltaX;St&&(ae({currentTarget:pt,scrollLeft:pt.scrollLeft+St}),Pe.preventDefault())}return(vt=st.current)===null||vt===void 0||vt.addEventListener("wheel",Ot),function(){var Pe;(Pe=st.current)===null||Pe===void 0||Pe.removeEventListener("wheel",Ot)}},[]);var Ye=be[be.length-1],mt={fixed:Ye?Ye.fixed:null,onHeaderCell:function(){return{className:"".concat(je,"-cell-scrollbar")}}},bt=Object(w.useMemo)(function(){return Se?[].concat(Object(I.a)(ke),[mt]):ke},[Se,ke]),gt=Object(w.useMemo)(function(){return Se?[].concat(Object(I.a)(be),[mt]):be},[Se,be]),At=Object(w.useMemo)(function(){var vt=ee.right,Ot=ee.left;return Object(L.a)(Object(L.a)({},ee),{},{left:te==="rtl"?[].concat(Object(I.a)(Ot.map(function(Pe){return Pe+Se})),[0]):Ot,right:te==="rtl"?vt:[].concat(Object(I.a)(vt.map(function(Pe){return Pe+Se})),[0]),isSticky:ot})},[Se,ee,ot]),ht=f(Le,ce);return w.createElement("div",{style:Object(L.a)({overflow:"hidden"},ot?{top:X}:{}),ref:tt,className:U()("".concat(je,"-header"),Object(ie.a)({},q,!!q))},w.createElement("table",{style:{tableLayout:"fixed",visibility:De||ht?null:"hidden"}},w.createElement(l,{colWidths:ht?[].concat(Object(I.a)(ht),[Se]):[],columCount:ce+1,columns:gt}),w.createElement(h,Object.assign({},ge,{stickyOffsets:At,columns:bt,flattenColumns:gt}))))});c.displayName="FixedHeader";var x=c,D=w.createContext(null),A=D;function B(me){var xe=me.prefixCls,De=me.children,ke=me.component,be=me.cellComponent,Le=me.fixHeader,ce=me.fixColumn,ee=me.horizonScroll,te=me.className,V=me.expanded,X=me.componentWidth,q=me.colSpan,ae=w.useContext(t.a),ge=ae.scrollbarSize;return w.useMemo(function(){var we=De;return ce&&(we=w.createElement("div",{style:{width:X-(Le?ge:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(xe,"-expanded-row-fixed")},we)),w.createElement(ke,{className:te,style:{display:V?null:"none"}},w.createElement(e.a,{component:be,prefixCls:xe,colSpan:q},we))},[De,ke,Le,ee,te,V,X,q,ge])}var O=B;function W(me){var xe=me.className,De=me.style,ke=me.record,be=me.index,Le=me.rowKey,ce=me.getRowKey,ee=me.rowExpandable,te=me.expandedKeys,V=me.onRow,X=me.indent,q=X===void 0?0:X,ae=me.rowComponent,ge=me.cellComponent,we=me.childrenColumnName,je=w.useContext(t.a),at=je.prefixCls,ot=je.fixedInfoList,Se=w.useContext(A),st=Se.fixHeader,tt=Se.fixColumn,Ye=Se.horizonScroll,mt=Se.componentWidth,bt=Se.flattenColumns,gt=Se.expandableType,At=Se.expandRowByClick,ht=Se.onTriggerExpand,vt=Se.rowClassName,Ot=Se.expandedRowClassName,Pe=Se.indentSize,pt=Se.expandIcon,St=Se.expandedRowRender,Ct=Se.expandIconColumnIndex,Mt=w.useState(!1),xt=Object(C.a)(Mt,2),mn=xt[0],$t=xt[1],hn=te&&te.has(me.recordKey);w.useEffect(function(){hn&&$t(!0)},[hn]);var zt=gt==="row"&&(!ee||ee(ke)),Bt=gt==="nest",tn=we&&ke&&ke[we],gn=zt||Bt,_n;V&&(_n=V(ke,be));var Pn=function(p){if(At&&gn&&ht(ke,p),_n&&_n.onClick){for(var b,M=arguments.length,K=new Array(M>1?M-1:0),k=1;k<M;k++)K[k-1]=arguments[k];(b=_n).onClick.apply(b,[p].concat(K))}},Wn;typeof vt=="string"?Wn=vt:typeof vt=="function"&&(Wn=vt(ke,be,q));var oi=Object(T.a)(bt),Vn=w.createElement(ae,Object.assign({},_n,{"data-row-key":Le,className:U()(xe,"".concat(at,"-row"),"".concat(at,"-row-level-").concat(q),Wn,_n&&_n.className),style:Object(L.a)(Object(L.a)({},De),_n?_n.style:null),onClick:Pn}),bt.map(function(N,p){var b=N.render,M=N.dataIndex,K=N.className,k=oi[p],he=ot[p],He;p===(Ct||0)&&Bt&&(He=w.createElement(w.Fragment,null,w.createElement("span",{style:{paddingLeft:"".concat(Pe*q,"px")},className:"".concat(at,"-row-indent indent-level-").concat(q)}),pt({prefixCls:at,expanded:hn,expandable:tn,record:ke,onExpand:ht})));var lt;return N.onCell&&(lt=N.onCell(ke,be)),w.createElement(e.a,Object.assign({className:K,ellipsis:N.ellipsis,align:N.align,component:ge,prefixCls:at,key:k,record:ke,index:be,dataIndex:M,render:b,shouldCellUpdate:N.shouldCellUpdate},he,{appendNode:He,additionalProps:lt}))})),Ut;if(zt&&(mn||hn)){var Zn=St(ke,be,q+1,hn),fi=Ot&&Ot(ke,be,q);Ut=w.createElement(O,{expanded:hn,className:U()("".concat(at,"-expanded-row"),"".concat(at,"-expanded-row-level-").concat(q+1),fi),prefixCls:at,fixHeader:st,fixColumn:tt,horizonScroll:Ye,component:ae,componentWidth:mt,cellComponent:ge,colSpan:bt.length},Zn)}var qn;return tn&&hn&&(qn=(ke[we]||[]).map(function(N,p){var b=ce(N,p);return w.createElement(W,Object.assign({},me,{key:b,rowKey:b,record:N,recordKey:b,index:p,indent:q+1}))})),w.createElement(w.Fragment,null,Vn,Ut,qn)}W.displayName="BodyRow";var P=W,G=w.createContext(null),Q=G;function re(me){var xe=me.columnKey,De=me.onColumnResize,ke=w.useRef();return w.useEffect(function(){ke.current&&De(xe,ke.current.offsetWidth)},[]),w.createElement(v.a,{onResize:function(Le){var ce=Le.offsetWidth;De(xe,ce)}},w.createElement("td",{ref:ke,style:{padding:0,border:0,height:0}},w.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function le(me){var xe=me.data,De=me.getRowKey,ke=me.measureColumnWidth,be=me.expandedKeys,Le=me.onRow,ce=me.rowExpandable,ee=me.emptyNode,te=me.childrenColumnName,V=w.useContext(Q),X=V.onColumnResize,q=w.useContext(t.a),ae=q.prefixCls,ge=q.getComponent,we=w.useContext(A),je=we.fixHeader,at=we.horizonScroll,ot=we.flattenColumns,Se=we.componentWidth;return w.useMemo(function(){var st=ge(["body","wrapper"],"tbody"),tt=ge(["body","row"],"tr"),Ye=ge(["body","cell"],"td"),mt;xe.length?mt=xe.map(function(gt,At){var ht=De(gt,At);return w.createElement(P,{key:ht,rowKey:ht,record:gt,recordKey:ht,index:At,rowComponent:tt,cellComponent:Ye,expandedKeys:be,onRow:Le,getRowKey:De,rowExpandable:ce,childrenColumnName:te})}):mt=w.createElement(O,{expanded:!0,className:"".concat(ae,"-placeholder"),prefixCls:ae,fixHeader:je,fixColumn:at,horizonScroll:at,component:tt,componentWidth:Se,cellComponent:Ye,colSpan:ot.length},ee);var bt=Object(T.a)(ot);return w.createElement(st,{className:"".concat(ae,"-tbody")},ke&&w.createElement("tr",{"aria-hidden":"true",className:"".concat(ae,"-measure-row"),style:{height:0}},bt.map(function(gt){return w.createElement(re,{key:gt,columnKey:gt,onColumnResize:X})})),mt)},[xe,ae,Le,ke,be,De,ge,Se,ee,ot])}var Ee=w.memo(le);Ee.displayName="Body";var _e=Ee,ne=F("wRmb"),Te=F("xEkU"),Ae=F.n(Te);function fe(me){var xe=Object(w.useRef)(me),De=Object(w.useState)({}),ke=Object(C.a)(De,2),be=ke[1],Le=Object(w.useRef)(null),ce=Object(w.useRef)([]);function ee(te){Le.current===null&&(ce.current=[],Le.current=Ae()(function(){ce.current.forEach(function(V){xe.current=V(xe.current)}),Le.current=null,be({})})),ce.current.push(te)}return Object(w.useEffect)(function(){return function(){Ae.a.cancel(Le.current)}},[]),[xe.current,ee]}function J(me){var xe=Object(w.useRef)(me),De=Object(w.useRef)(null);function ke(){window.clearTimeout(De.current)}function be(ce){xe.current=ce,ke(),De.current=window.setTimeout(function(){xe.current=null,De.current=null},100)}function Le(){return xe.current}return Object(w.useEffect)(function(){return ke},[]),[be,Le]}function Ie(me,xe,De){var ke=Object(w.useMemo)(function(){for(var be=[],Le=[],ce=0,ee=0,te=0;te<xe;te+=1)if(De==="rtl"){Le[te]=ee,ee+=me[te]||0;var V=xe-te-1;be[V]=ce,ce+=me[V]||0}else{be[te]=ce,ce+=me[te]||0;var X=xe-te-1;Le[X]=ee,ee+=me[X]||0}return{left:be,right:Le}},[me,xe,De]);return ke}var it=Ie;function et(me){var xe=me.className,De=me.children;return w.createElement("div",{className:xe},De)}var Qe=et,nt=F("n6Qo");function Me(me){var xe,De=me.prefixCls,ke=me.record,be=me.onExpand,Le=me.expanded,ce=me.expandable,ee="".concat(De,"-row-expand-icon");if(!ce)return w.createElement("span",{className:U()(ee,"".concat(De,"-row-spaced"))});var te=function(X){be(ke,X),X.stopPropagation()};return w.createElement("span",{className:U()(ee,(xe={},Object(ie.a)(xe,"".concat(De,"-row-expanded"),Le),Object(ie.a)(xe,"".concat(De,"-row-collapsed"),!Le),xe)),onClick:te})}function ze(me,xe,De){var ke=[];function be(Le){(Le||[]).forEach(function(ce,ee){ke.push(xe(ce,ee)),be(ce[De])})}return be(me),ke}var Je=F("zT1h"),$e=F("y0+3"),Xe=function(xe,De){var ke,be,Le=xe.scrollBodyRef,ce=xe.onScroll,ee=xe.offsetScroll,te=w.useContext(t.a),V=te.prefixCls,X=((ke=Le.current)===null||ke===void 0?void 0:ke.scrollWidth)||0,q=((be=Le.current)===null||be===void 0?void 0:be.clientWidth)||0,ae=X&&q*(q/X),ge=w.useRef(),we=fe({scrollLeft:0,isHiddenScrollBar:!1}),je=Object(C.a)(we,2),at=je[0],ot=je[1],Se=w.useRef({delta:0,x:0}),st=w.useState(!1),tt=Object(C.a)(st,2),Ye=tt[0],mt=tt[1],bt=function(){mt(!1)},gt=function(Pe){Pe.persist(),Se.current.delta=Pe.pageX-at.scrollLeft,Se.current.x=0,mt(!0),Pe.preventDefault()},At=function(Pe){var pt,St=Pe||((pt=window)===null||pt===void 0?void 0:pt.event),Ct=St.buttons;if(!Ye||Ct===0){Ye&&mt(!1);return}var Mt=Se.current.x+Pe.pageX-Se.current.x-Se.current.delta;Mt<=0&&(Mt=0),Mt+ae>=q&&(Mt=q-ae),ce({scrollLeft:Mt/q*(X+2)}),Se.current.x=Pe.pageX},ht=function(){var Pe=Object($e.b)(Le.current).top,pt=Pe+Le.current.offsetHeight,St=document.documentElement.scrollTop+window.innerHeight;pt-Object(d.a)()<=St||Pe>=St-ee?ot(function(Ct){return Object(L.a)(Object(L.a)({},Ct),{},{isHiddenScrollBar:!0})}):ot(function(Ct){return Object(L.a)(Object(L.a)({},Ct),{},{isHiddenScrollBar:!1})})},vt=function(Pe){ot(function(pt){return Object(L.a)(Object(L.a)({},pt),{},{scrollLeft:Pe/X*q||0})})};return w.useImperativeHandle(De,function(){return{setScrollLeft:vt}}),w.useEffect(function(){var Ot=Object(Je.a)(document.body,"mouseup",bt,!1),Pe=Object(Je.a)(document.body,"mousemove",At,!1);return ht(),function(){Ot.remove(),Pe.remove()}},[ae,Ye]),w.useEffect(function(){var Ot=Object(Je.a)(window,"scroll",ht,!1),Pe=Object(Je.a)(window,"resize",ht,!1);return function(){Ot.remove(),Pe.remove()}},[]),w.useEffect(function(){at.isHiddenScrollBar||ot(function(Ot){var Pe,pt;return Object(L.a)(Object(L.a)({},Ot),{},{scrollLeft:Le.current.scrollLeft/((Pe=Le.current)===null||Pe===void 0?void 0:Pe.scrollWidth)*((pt=Le.current)===null||pt===void 0?void 0:pt.clientWidth)})})},[at.isHiddenScrollBar]),X<=q||!ae||at.isHiddenScrollBar?null:w.createElement("div",{style:{height:Object(d.a)(),width:q,bottom:ee},className:"".concat(V,"-sticky-scroll")},w.createElement("div",{onMouseDown:gt,ref:ge,className:U()("".concat(V,"-sticky-scroll-bar"),Object(ie.a)({},"".concat(V,"-sticky-scroll-bar-active"),Ye)),style:{width:"".concat(ae,"px"),transform:"translate3d(".concat(at.scrollLeft,"px, 0, 0)")}}))},Fe=w.forwardRef(Xe);function We(me,xe){return w.useMemo(function(){var De=!!me;return{isSticky:De,stickyClassName:De?"".concat(xe,"-sticky-header"):"",offsetHeader:Object(j.a)(me)==="object"&&me.offsetHeader||0,offsetScroll:Object(j.a)(me)==="object"&&me.offsetScroll||0}},[me,xe])}var yt=[],ft={},ut="rc-table-internal-hook",rt=w.memo(function(me){var xe=me.children;return xe},function(me,xe){return S()(me.props,xe.props)?me.pingLeft!==xe.pingLeft||me.pingRight!==xe.pingRight:!1});function Tt(me){var xe,De=me.prefixCls,ke=me.className,be=me.rowClassName,Le=me.style,ce=me.data,ee=me.rowKey,te=me.scroll,V=me.tableLayout,X=me.direction,q=me.title,ae=me.footer,ge=me.summary,we=me.id,je=me.showHeader,at=me.components,ot=me.emptyText,Se=me.onRow,st=me.onHeaderRow,tt=me.internalHooks,Ye=me.transformColumns,mt=me.internalRefs,bt=me.sticky,gt=ce||yt,At=!!gt.length,ht=w.useState(0),vt=Object(C.a)(ht,2),Ot=vt[0],Pe=vt[1];w.useEffect(function(){Pe(Object(d.a)())});var pt=w.useMemo(function(){return Object(T.c)(at,{})},[at]),St=w.useCallback(function(Vt,Jt){return Object(T.b)(pt,Vt)||Jt},[pt]),Ct=w.useMemo(function(){return typeof ee=="function"?ee:function(Vt){var Jt=Vt&&Vt[ee];return Jt}},[ee]),Mt=Object(u.c)(me),xt=Mt.expandIcon,mn=Mt.expandedRowKeys,$t=Mt.defaultExpandedRowKeys,hn=Mt.defaultExpandAllRows,zt=Mt.expandedRowRender,Bt=Mt.onExpand,tn=Mt.onExpandedRowsChange,gn=Mt.expandRowByClick,_n=Mt.rowExpandable,Pn=Mt.expandIconColumnIndex,Wn=Mt.expandedRowClassName,oi=Mt.childrenColumnName,Vn=Mt.indentSize,Ut=xt||Me,Zn=oi||"children",fi=w.useMemo(function(){return zt?"row":me.expandable&&tt===ut&&me.expandable.__PARENT_RENDER_ICON__||gt.some(function(Vt){return Vt&&Object(j.a)(Vt)==="object"&&Vt[Zn]})?"nest":!1},[!!zt,gt]),qn=w.useState(function(){return $t||(hn?ze(gt,Ct,Zn):[])}),N=Object(C.a)(qn,2),p=N[0],b=N[1],M=w.useMemo(function(){return new Set(mn||p||[])},[mn,p]),K=w.useCallback(function(Vt){var Jt=Ct(Vt,gt.indexOf(Vt)),bn,Mn=M.has(Jt);Mn?(M.delete(Jt),bn=Object(I.a)(M)):bn=[].concat(Object(I.a)(M),[Jt]),b(bn),Bt&&Bt(!Mn,Vt),tn&&tn(bn)},[Ct,M,gt,Bt,tn]),k=w.useState(0),he=Object(C.a)(k,2),He=he[0],lt=he[1],Et=Object(ne.b)(Object(L.a)(Object(L.a)(Object(L.a)({},me),Mt),{},{expandable:!!zt,expandedKeys:M,getRowKey:Ct,onTriggerExpand:K,expandIcon:Ut,expandIconColumnIndex:Pn,direction:X}),tt===ut?Ye:null),Ke=Object(C.a)(Et,2),It=Ke[0],Nt=Ke[1],on=w.useMemo(function(){return{columns:It,flattenColumns:Nt}},[It,Nt]),Nn=w.useRef(),Yn=w.useRef(),Oe=w.useRef(),In=w.useState(!1),si=Object(C.a)(In,2),Xn=si[0],pi=si[1],$n=w.useState(!1),Cn=Object(C.a)($n,2),Kn=Cn[0],li=Cn[1],mi=fe(new Map),Ti=Object(C.a)(mi,2),Ni=Ti[0],ui=Ti[1],Dn=Object(T.a)(Nt),ei=Dn.map(function(Vt){return Ni.get(Vt)}),Ri=w.useMemo(function(){return ei},[ei.join("_")]),gi=it(Ri,Nt.length,X),ln=te&&Object(T.d)(te.y),Ft=te&&Object(T.d)(te.x),vn=Ft&&Nt.some(function(Vt){var Jt=Vt.fixed;return Jt}),Qt=w.useRef(),An=We(bt,De),sn=An.isSticky,vi=An.offsetHeader,On=An.offsetScroll,xi=An.stickyClassName,yi,_i,ti;ln&&(_i={overflowY:"scroll",maxHeight:te.y}),Ft&&(yi={overflowX:"auto"},ln||(_i={overflowY:"hidden"}),ti={width:te.x===!0?"auto":te.x,minWidth:"100%"});var ci=w.useCallback(function(Vt,Jt){ui(function(bn){var Mn=new Map(bn);return Mn.set(Vt,Jt),Mn})},[]),Ci=J(null),di=Object(C.a)(Ci,2),Ki=di[0],Gi=di[1];function Si(Vt,Jt){if(!Jt)return;typeof Jt=="function"?Jt(Vt):Jt.scrollLeft!==Vt&&(Jt.scrollLeft=Vt)}var hi=function(Jt){var bn=Jt.currentTarget,Mn=Jt.scrollLeft,Bn=typeof Mn=="number"?Mn:bn.scrollLeft,Xi=bn||ft;if(!Gi()||Gi()===Xi){var Fi;Ki(Xi),Si(Bn,Yn.current),Si(Bn,Oe.current),Si(Bn,(Fi=Qt.current)===null||Fi===void 0?void 0:Fi.setScrollLeft)}if(bn){var Qi=bn.scrollWidth,Ji=bn.clientWidth;pi(Bn>0),li(Bn<Qi-Ji)}},Ii=function(){Oe.current&&hi({currentTarget:Oe.current})},zi=function(Jt){var bn=Jt.width;Ii(),lt(Nn.current?Nn.current.offsetWidth:bn)};w.useEffect(function(){return Ii},[]),w.useEffect(function(){Ft&&Ii()},[Ft]),w.useEffect(function(){tt===ut&&mt&&(mt.body.current=Oe.current)});var ki=St(["table"],"table"),bi=w.useMemo(function(){return V||(vn?te.x==="max-content"?"auto":"fixed":ln||Nt.some(function(Vt){var Jt=Vt.ellipsis;return Jt})?"fixed":"auto")},[ln,vn,Nt,V]),wi,Ui={colWidths:Ri,columCount:Nt.length,stickyOffsets:gi,onHeaderRow:st,fixHeader:ln},ni=w.useMemo(function(){return At?null:typeof ot=="function"?ot():ot},[At,ot]),$i=w.createElement(_e,{data:gt,measureColumnWidth:ln||Ft||sn,expandedKeys:M,rowExpandable:_n,getRowKey:Ct,onRow:Se,emptyNode:ni,childrenColumnName:Zn}),Bi=w.createElement(l,{colWidths:Nt.map(function(Vt){var Jt=Vt.width;return Jt}),columns:Nt}),er=ge&&w.createElement(nt.b,null,ge(gt)),Vi=St(["body"]);if(ln||sn){var ji;typeof Vi=="function"?(ji=Vi(gt,{scrollbarSize:Ot,ref:Oe,onScroll:hi}),Ui.colWidths=Nt.map(function(Vt,Jt){var bn=Vt.width,Mn=Jt===It.length-1?bn-Ot:bn;return typeof Mn=="number"&&!Number.isNaN(Mn)?Mn:(Object(y.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):ji=w.createElement("div",{style:Object(L.a)(Object(L.a)({},yi),_i),onScroll:hi,ref:Oe,className:U()("".concat(De,"-body"))},w.createElement(ki,{style:Object(L.a)(Object(L.a)({},ti),{},{tableLayout:bi})},Bi,$i,er),sn&&w.createElement(Fe,{ref:Qt,offsetScroll:On,scrollBodyRef:Oe,onScroll:hi})),wi=w.createElement(w.Fragment,null,je!==!1&&w.createElement(x,Object.assign({noData:!gt.length},Ui,on,{direction:X,offsetHeader:vi,stickyClassName:xi,ref:Yn,onScroll:hi})),ji)}else wi=w.createElement("div",{style:Object(L.a)(Object(L.a)({},yi),_i),className:U()("".concat(De,"-content")),onScroll:hi,ref:Oe},w.createElement(ki,{style:Object(L.a)(Object(L.a)({},ti),{},{tableLayout:bi})},Bi,je!==!1&&w.createElement(h,Object.assign({},Ui,on)),$i,er));var Gn=Object(u.b)(me),Ai=w.createElement("div",Object.assign({className:U()(De,ke,(xe={},Object(ie.a)(xe,"".concat(De,"-rtl"),X==="rtl"),Object(ie.a)(xe,"".concat(De,"-ping-left"),Xn),Object(ie.a)(xe,"".concat(De,"-ping-right"),Kn),Object(ie.a)(xe,"".concat(De,"-layout-fixed"),V==="fixed"),Object(ie.a)(xe,"".concat(De,"-fixed-header"),ln),Object(ie.a)(xe,"".concat(De,"-fixed-column"),vn),Object(ie.a)(xe,"".concat(De,"-scroll-horizontal"),Ft),Object(ie.a)(xe,"".concat(De,"-has-fix-left"),Nt[0]&&Nt[0].fixed),Object(ie.a)(xe,"".concat(De,"-has-fix-right"),Nt[Nt.length-1]&&Nt[Nt.length-1].fixed==="right"),xe)),style:Le,id:we,ref:Nn},Gn),w.createElement(rt,{pingLeft:Xn,pingRight:Kn,props:Object(L.a)(Object(L.a)({},me),{},{stickyOffsets:gi,mergedExpandedKeys:M})},q&&w.createElement(Qe,{className:"".concat(De,"-title")},q(gt)),w.createElement("div",{className:"".concat(De,"-container")},wi),ae&&w.createElement(Qe,{className:"".concat(De,"-footer")},ae(gt))));Ft&&(Ai=w.createElement(v.a,{onResize:zi},Ai));var Yi=w.useMemo(function(){return{prefixCls:De,getComponent:St,scrollbarSize:Ot,direction:X,fixedInfoList:Nt.map(function(Vt,Jt){return i(Jt,Jt,Nt,gi,X)}),isSticky:sn}},[De,St,Ot,X,Nt,gi,X,sn]),tr=w.useMemo(function(){return Object(L.a)(Object(L.a)({},on),{},{tableLayout:bi,rowClassName:be,expandedRowClassName:Wn,componentWidth:He,fixHeader:ln,fixColumn:vn,horizonScroll:Ft,expandIcon:Ut,expandableType:fi,expandRowByClick:gn,expandedRowRender:zt,onTriggerExpand:K,expandIconColumnIndex:Pn,indentSize:Vn})},[on,bi,be,Wn,He,ln,vn,Ft,Ut,fi,gn,zt,K,Pn,Vn]),Di=w.useMemo(function(){return{onColumnResize:ci}},[ci]);return w.createElement(t.a.Provider,{value:Yi},w.createElement(A.Provider,{value:tr},w.createElement(Q.Provider,{value:Di},Ai)))}Tt.Column=n.a,Tt.ColumnGroup=o.a,Tt.Summary=nt.a,Tt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var _t=Re.b=Tt},wRmb:function(Ge,Re,F){"use strict";F.d(Re,"a",function(){return S});var ie=F("rePB"),L=F("KQm4"),I=F("VTBJ"),j=F("Ff2n"),C=F("cDcd"),w=F.n(C),H=F("Kwbf"),U=F("Zm9Q"),R=F("hW8S");function S(n){return Object(U.a)(n).filter(function(a){return C.isValidElement(a)}).map(function(a){var s=a.key,e=a.props,t=e.children,i=Object(j.a)(e,["children"]),T=Object(I.a)({key:s},i);return t&&(T.children=S(t)),T})}function y(n){return n.reduce(function(a,s){var e=s.fixed,t=e===!0?"left":e,i=s.children;return i&&i.length>0?[].concat(Object(L.a)(a),Object(L.a)(y(i).map(function(T){return Object(I.a)({fixed:t},T)}))):[].concat(Object(L.a)(a),[Object(I.a)(Object(I.a)({},s),{},{fixed:t})])},[])}function v(n){for(var a=!0,s=0;s<n.length;s+=1){var e=n[s];if(a&&e.fixed!=="left")a=!1;else if(!a&&e.fixed==="left"){Object(H.a)(!1,"Index ".concat(s-1," of `columns` missing `fixed='left'` prop."));break}}for(var t=!0,i=n.length-1;i>=0;i-=1){var T=n[i];if(t&&T.fixed!=="right")t=!1;else if(!t&&T.fixed==="right"){Object(H.a)(!1,"Index ".concat(i+1," of `columns` missing `fixed='right'` prop."));break}}}function d(n){return n.map(function(a){var s=a.fixed,e=Object(j.a)(a,["fixed"]),t=s;return s==="left"?t="right":s==="right"&&(t="left"),Object(I.a)({fixed:t},e)})}function o(n,a){var s=n.prefixCls,e=n.columns,t=n.children,i=n.expandable,T=n.expandedKeys,_=n.getRowKey,m=n.onTriggerExpand,E=n.expandIcon,g=n.rowExpandable,h=n.expandIconColumnIndex,u=n.direction,r=n.expandRowByClick,l=C.useMemo(function(){return e||S(t)},[e,t]),f=C.useMemo(function(){if(i){var D,A=h||0,B=l[A],O=(D={},Object(ie.a)(D,R.a,{className:"".concat(s,"-expand-icon-col")}),Object(ie.a)(D,"title",""),Object(ie.a)(D,"fixed",B?B.fixed:null),Object(ie.a)(D,"className","".concat(s,"-row-expand-icon-cell")),Object(ie.a)(D,"render",function(G,Q,re){var le=_(Q,re),Ee=T.has(le),_e=g?g(Q):!0,ne=E({prefixCls:s,expanded:Ee,expandable:_e,record:Q,onExpand:m});return r?C.createElement("span",{onClick:function(Ae){return Ae.stopPropagation()}},ne):ne}),D),W=l.slice();return A>=0&&W.splice(A,0,O),W}return l},[i,l,_,T,E,u]),c=C.useMemo(function(){var D=f;return a&&(D=a(D)),D.length||(D=[{render:function(){return null}}]),D},[a,f,u]),x=C.useMemo(function(){return u==="rtl"?d(y(c)):y(c)},[c,u]);return[c,x]}Re.b=o},wwSX:function(Ge,Re,F){Ge.exports=F.p+"static/b2.2c844a2a.svg"},xiVL:function(Ge,Re){Ge.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012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Qylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC"},xwll:function(Ge,Re,F){Ge.exports=F.p+"static/statistic-icon.df5f8e49.png"},"y0+3":function(Ge,Re,F){"use strict";F.d(Re,"a",function(){return y}),F.d(Re,"b",function(){return d});var ie=/margin|padding|width|height|max|min|offset/,L={left:!0,top:!0},I={cssFloat:1,styleFloat:1,float:1};function j(o){return o.nodeType===1?o.ownerDocument.defaultView.getComputedStyle(o,null):{}}function C(o,n,a){if(n=n.toLowerCase(),a==="auto"){if(n==="height")return o.offsetHeight;if(n==="width")return o.offsetWidth}return n in L||(L[n]=ie.test(n)),L[n]?parseFloat(a)||0:a}function w(o,n){var a=arguments.length,s=j(o);return n=I[n]?"cssFloat"in o.style?"cssFloat":"styleFloat":n,a===1?s:C(o,n,s[n]||o.style[n])}function H(o,n,a){var s=arguments.length;if(n=I[n]?"cssFloat"in o.style?"cssFloat":"styleFloat":n,s===3)return typeof a=="number"&&ie.test(n)&&(a="".concat(a,"px")),o.style[n]=a,a;for(var e in n)n.hasOwnProperty(e)&&H(o,e,n[e]);return j(o)}function U(o){return o===document.body?document.documentElement.clientWidth:o.offsetWidth}function R(o){return o===document.body?window.innerHeight||document.documentElement.clientHeight:o.offsetHeight}function S(){var o=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),n=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:o,height:n}}function y(){var o=document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight;return{width:o,height:n}}function v(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function d(o){var n=o.getBoundingClientRect(),a=document.documentElement;return{left:n.left+(window.pageXOffset||a.scrollLeft)-(a.clientLeft||document.body.clientLeft||0),top:n.top+(window.pageYOffset||a.scrollTop)-(a.clientTop||document.body.clientTop||0)}}},y3Jh:function(Ge,Re,F){"use strict";F.r(Re);var ie=F("5Dmo"),L=F("3S7+"),I=F("fV52"),j=F("3I+P"),C=F("g9YV"),w=F("wCAj"),H=F("Znn+"),U=F("ZTPi"),R=F("5NDa"),S=F("5rEg"),y=F("OaEy"),v=F("2fM7"),d=F("14J3"),o=F("BMrR"),n=F("jCWc"),a=F("kPKH"),s=F("7Kak"),e=F("9yH6"),t=F("lUTK"),i=F("BvKs"),T=F("2qtc"),_=F("kLXV"),m=F("miYZ"),E=F("tsqr"),g=F("k1fw"),h=F("oBTY"),u=F("+L6B"),r=F("2/Rp"),l=F("qVdP"),f=F("jsC+"),c=F("9og8"),x=F("tJVT"),D=F("WmNS"),A=F.n(D),B=F("cDcd"),O=F.n(B),W=F("Ty5D"),P=F("9kvl"),G=F("9Bee"),Q=F("wd/R"),re=F.n(Q),le=F("m3rI"),Ee=F("ErOA"),_e=F("5A5F"),ne=F.n(_e),Te=F("xKgJ"),Ae=F("zqRK"),fe=F.n(Ae),J=F("+92d"),Ie=F.n(J),it=F("wwSX"),et=F.n(it),Qe=F("zlzj"),nt=F.n(Qe),Me=F("pxMS"),ze=F.n(Me),Je=F("xwll"),$e=F.n(Je),Xe=F("a2OE"),Fe=F.n(Xe),We=F("Nf5h"),yt=F("LvDl"),ft=F.n(yt),ut=F("1vsH"),rt=F("yDOu"),Tt=F.n(rt),_t=F("SVaM"),me=function(De){var ke,be,Le,ce,ee,te,V,X,q,ae,ge,we,je,at,ot,Se,st,tt=De.globalSetting,Ye=De.user,mt=De.dispatch,bt=Object(W.h)(),gt={page:1,per_page:30,tag_discipline_id:[-1],source_discipline_id:[-1],status:null,difficulty:null,search:"",save_search:"",sort_by:null,sort_direction:null,filter:(bt==null||((ke=bt.query)===null||ke===void 0)?void 0:ke.tab)||"public"},At=Object(B.useState)(0),ht=Object(x.a)(At,2),vt=ht[0],Ot=ht[1],Pe=Object(B.useState)(0),pt=Object(x.a)(Pe,2),St=pt[0],Ct=pt[1],Mt=Object(B.useState)(0),xt=Object(x.a)(Mt,2),mn=xt[0],$t=xt[1],hn=Object(B.useState)([]),zt=Object(x.a)(hn,2),Bt=zt[0],tn=zt[1],gn=Object(B.useState)([]),_n=Object(x.a)(gn,2),Pn=_n[0],Wn=_n[1],oi=Object(B.useState)({}),Vn=Object(x.a)(oi,2),Ut=Vn[0],Zn=Vn[1],fi=Object(B.useState)(!1),qn=Object(x.a)(fi,2),N=qn[0],p=qn[1],b=Object(B.useState)([]),M=Object(x.a)(b,2),K=M[0],k=M[1],he=Object(B.useState)(!0),He=Object(x.a)(he,2),lt=He[0],Et=He[1],Ke=Object(B.useState)(null),It=Object(x.a)(Ke,2),Nt=It[0],on=It[1],Nn=Object(B.useState)(gt),Yn=Object(x.a)(Nn,2),Oe=Yn[0],In=Yn[1],si=Object(B.useRef)(null),Xn=Object(B.useRef)(null),pi=Object(B.useState)([]),$n=Object(x.a)(pi,2),Cn=$n[0],Kn=$n[1],li=Object(B.useMemo)(function(){return["not_reviewed","under_review","review_finished"].includes(Oe.filter)},[Oe.filter]),mi=Object(B.useState)(!1),Ti=Object(x.a)(mi,2),Ni=Ti[0],ui=Ti[1],Dn=Object(B.useState)(!1),ei=Object(x.a)(Dn,2),Ri=ei[0],gi=ei[1],ln=Object(B.useState)(""),Ft=Object(x.a)(ln,2),vn=Ft[0],Qt=Ft[1],An=Object(B.useState)([]),sn=Object(x.a)(An,2),vi=sn[0],On=sn[1],xi=Object(B.useState)(!1),yi=Object(x.a)(xi,2),_i=yi[0],ti=yi[1],ci=Object(B.useState)([]),Ci=Object(x.a)(ci,2),di=Ci[0],Ki=Ci[1],Gi=Object(B.useState)(!1),Si=Object(x.a)(Gi,2),hi=Si[0],Ii=Si[1],zi=Object(B.useState)(!1),ki=Object(x.a)(zi,2),bi=ki[0],wi=ki[1],Ui=Ye.userInfo.identity==="teacher",ni=function(){var Ue=Object(c.a)(A.a.mark(function Be(Ve,dt,Lt){var Rt,fn,Sn,$,de;return A.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return Ve.persist(),Ve!=null&&(Rt=Ve.target)!==null&&Rt!==void 0&&(fn=Rt.style)!==null&&fn!==void 0&&fn.pointerEvents&&(Ve.target.style.pointerEvents="none"),oe.next=4,Object(Ee.a)("/api/practices/".concat(dt.identifier,"/start"),{method:"get"});case 4:if(de=oe.sent,!((de==null?void 0:de.status)===0)){oe.next=10;break}if(!Lt){oe.next=9;break}return Object(ut.U)("/problems/".concat(de==null?void 0:de.identifier,"/oj/").concat(dt==null?void 0:dt.identifier,"?tab=3")),oe.abrupt("return");case 9:Object(ut.U)("/problems/".concat(de==null?void 0:de.identifier,"/oj/").concat(dt==null?void 0:dt.identifier));case 10:Ve!=null&&(Sn=Ve.target)!==null&&Sn!==void 0&&($=Sn.style)!==null&&$!==void 0&&$.pointerEvents&&(Ve.target.style.pointerEvents="auto");case 11:case"end":return oe.stop()}},Be)}));return function(Ve,dt,Lt){return Ue.apply(this,arguments)}}();Object(B.useEffect)(function(){var Ue=re()().add(0,"days").unix(),Be=localStorage.getItem("problemsclose");if(!Be){ti(!0);return}Ue>parseInt(Be)&&ti(!0)},[]);var $i=["\u672A\u53D1\u5E03","\u5DF2\u516C\u5F00","\u672A\u5BA1\u6838","\u5BA1\u6838\u4E2D","\u672A\u516C\u5F00","\u672A\u901A\u8FC7"],Bi=[{title:"\u9898\u76EE\u540D\u79F0",dataIndex:"name",ellipsis:!0,render:function(Be,Ve){return O.a.createElement("div",{className:ne.a.titleWarp},(Oe==null?void 0:Oe.filter)==="mine"?O.a.createElement("span",{className:ne.a.tag},$i[Ve.practice_status]):null,O.a.createElement("span",{title:Be,className:ne.a.hov,onClick:function(Lt){return ni(Lt,Ve)}},Be))}},(Oe==null?void 0:Oe.filter)==="public"?{title:"\u9898\u89E3",dataIndex:"solution_count",width:100,sorter:!0,render:function(Be,Ve){return O.a.createElement("span",{style:{display:"flex"}},O.a.createElement("span",{onClick:function(Lt){return ni(Lt,Ve,!0)},className:"current"},Be),(Ve==null?void 0:Ve.has_video_solution)&&O.a.createElement("img",{className:"ml5",src:fe.a}))}}:null,(Oe==null?void 0:Oe.filter)==="public"?{title:"\u901A\u8FC7\u7387",dataIndex:"pass_ratio",sorter:!0,width:90}:null,{title:"\u96BE\u5EA6",dataIndex:"difficulty",sorter:!0,align:"left",width:90,render:function(Be){return O.a.createElement(O.a.Fragment,null,Be===1&&O.a.createElement("span",{className:ne.a["btn-style-1"]},"\u7B80\u5355"),Be===2&&O.a.createElement("span",{className:ne.a["btn-style-2"]},"\u9002\u4E2D"),Be===3&&O.a.createElement("span",{className:ne.a["btn-style-3"]},"\u56F0\u96BE"))}},(Oe==null?void 0:Oe.filter)==="public"?{title:"\u4EBA\u6570",dataIndex:"user_count",align:"center",sorter:!0,width:80}:null,(Oe==null?void 0:Oe.filter)==="public"?{title:"\u72B6\u6001",dataIndex:"status",width:90,render:function(Be,Ve){return Object(Te.p)()?O.a.createElement(O.a.Fragment,null,Nt===(Ve==null?void 0:Ve.identifier)?O.a.createElement("span",{className:ne.a.hovBtn,onClick:function(Lt){return ni(Lt,Ve)}},"\u5F00\u542F\u5237\u9898"):O.a.createElement(O.a.Fragment,null,Be===0&&O.a.createElement("span",{className:ne.a.statusText},"\u672A\u5F00\u542F"),Be===1&&O.a.createElement("span",{className:ne.a.statusText},"\u8FDB\u884C\u4E2D"),Be===2&&O.a.createElement("span",{className:ne.a.statusText},"\u5DF2\u901A\u8FC7"))):"-"}}:null,(Oe==null?void 0:Oe.filter)!=="public"?{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_disciplines_name",ellipsis:!0,width:200,render:function(Be){return O.a.createElement("span",null,Be==null?void 0:Be.join("\u3001"))}}:null,(Oe==null?void 0:Oe.filter)==="all"?{title:"\u521B\u5EFA\u8005",dataIndex:"creator",ellipsis:!0,width:100}:null,(Oe==null?void 0:Oe.filter)!=="public"?{title:"\u66F4\u65B0\u65F6\u95F4",dataIndex:"updated_at",sorter:!0,width:180}:null,Object(Te.v)()?{title:"\u64CD\u4F5C",dataIndex:"action",key:"action",align:"right",width:80,render:function(Be,Ve){return O.a.createElement(f.a,{className:"ml10",overlay:Fi(Ve==null?void 0:Ve.identifier,Ve)},O.a.createElement("span",{style:{cursor:"default"},onClick:function(Lt){return Lt.preventDefault()}},O.a.createElement("span",null,"\u66F4\u591A"),O.a.createElement("i",{style:{display:"inline-block",transform:"scale(0.6)",fontSize:12},className:"c-grey-c iconfont icon-xiajiantou1"})))}}:N&&(Oe==null?void 0:Oe.filter)!=="public"?{title:"\u64CD\u4F5C",dataIndex:"action",key:"action",align:"right",width:80,render:function(Be,Ve){return Ve!=null&&Ve.is_self&&(Ve==null?void 0:Ve.practice_status)!==1?O.a.createElement(f.a,{className:"ml10",overlay:Qi(Ve==null?void 0:Ve.identifier,Ve)},O.a.createElement("span",{style:{cursor:"default"},onClick:function(Lt){return Lt.preventDefault()}},O.a.createElement("span",null,"\u66F4\u591A"),O.a.createElement("i",{style:{display:"inline-block",transform:"scale(0.6)",fontSize:12},className:"c-grey-c iconfont icon-xiajiantou1"}))):"-"}}:null].filter(function(Ue){return!!Ue}),er=[{title:"\u9898\u76EE\u540D\u79F0",dataIndex:"name",ellipsis:!0,render:function(Be,Ve){return O.a.createElement("span",{className:ne.a.hov,onClick:function(Lt){return ni(Lt,Ve)}},Be)}},{title:"\u96BE\u5EA6",dataIndex:"difficulty",sorter:!0,align:"left",width:90,render:function(Be){return O.a.createElement(O.a.Fragment,null,Be===1&&O.a.createElement("span",{className:ne.a["btn-style-1"]},"\u7B80\u5355"),Be===2&&O.a.createElement("span",{className:ne.a["btn-style-2"]},"\u9002\u4E2D"),Be===3&&O.a.createElement("span",{className:ne.a["btn-style-3"]},"\u56F0\u96BE"))}},(Oe==null?void 0:Oe.filter)==="not_reviewed"?{title:"\u521B\u5EFA\u8005",dataIndex:"creator",ellipsis:!0,width:100}:{title:"\u5BA1\u6838\u8005",dataIndex:"reviewer",ellipsis:!0,width:100},(Oe==null?void 0:Oe.filter)==="not_reviewed"?{title:"\u53D1\u5E03\u65F6\u95F4",dataIndex:"submit_time",width:180}:null,(Oe==null?void 0:Oe.filter)==="under_review"?{title:"\u5F00\u59CB\u5BA1\u6838\u65F6\u95F4",dataIndex:"start_review_time",width:180}:null,(Oe==null?void 0:Oe.filter)==="review_finished"?{title:"\u6700\u540E\u5BA1\u6838\u65F6\u95F4",dataIndex:"review_time",width:180}:null,{title:"\u64CD\u4F5C",dataIndex:"action",key:"action",align:"center",width:120,render:function(Be,Ve){var dt;switch(Oe==null?void 0:Oe.filter){case"under_review":dt=O.a.createElement("div",{style:{display:"flex"}},O.a.createElement(r.a,{type:"link",size:"small",onClick:function(Rt){return ni(Rt,Ve)}},"\u5BA1\u6838"),O.a.createElement(r.a,{type:"link",style:{color:"#666"},size:"small",onClick:function(Rt){return Ai({e:Rt,record:Ve,op:"release"})}},"\u79FB\u51FA"));break;case"review_finished":dt=O.a.createElement(r.a,{type:"link",size:"small",onClick:function(Rt){ui(!0),Vi(Ve)}},"\u5BA1\u6838\u8BB0\u5F55");break;default:dt=O.a.createElement(r.a,{type:"link",block:!0,onClick:function(Rt){return Ai({e:Rt,record:Ve,op:"claim"})}},"\u5F00\u59CB\u5BA1\u6838");break}return dt}}].filter(function(Ue){return!!Ue}),Vi=function(){var Ue=Object(c.a)(A.a.mark(function Be(Ve){var dt;return A.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return On([]),Rt.next=3,Object(Ee.a)("/api/practices/".concat(Ve.identifier,"/review_list"),{method:"get"});case 3:dt=Rt.sent,On(dt==null?void 0:dt.reviews_list);case 5:case"end":return Rt.stop()}},Be)}));return function(Ve){return Ue.apply(this,arguments)}}(),ji=[{title:"\u5BA1\u6838\u65F6\u95F4",dataIndex:"review_time",key:"review_time",render:function(Be,Ve){return O.a.createElement("span",null,re()(Be).format("YYYY-MM-DD HH:mm:ss"))}},{title:"\u5BA1\u6838\u8005",dataIndex:"reviewer",key:"reviewer"},{title:"\u5BA1\u6838\u7ED3\u679C",dataIndex:"status",width:120,key:"status",render:function(Be,Ve){return Be==="5"||Be===5?O.a.createElement("div",{style:{display:"flex",alignItems:"center"}},O.a.createElement("div",{style:{color:"#333333",marginRight:"5px",whiteSpace:"nowrap"}},"\u672A\u901A\u8FC7"),O.a.createElement("div",{style:{color:"#0152d9",whiteSpace:"nowrap",cursor:"pointer"},onClick:function(){Qt(Ve.description),gi(!0)}},"\u67E5\u770B\u539F\u56E0")):O.a.createElement("span",null,"\u5DF2\u901A\u8FC7")}}];Object(B.useEffect)(function(){tr(),Gn(Oe)},[]),Object(B.useEffect)(function(){if(Bt.length!==0){var Ue;(si==null||((Ue=si.current)===null||Ue===void 0)?void 0:Ue.clientHeight)>98&&Ot(1)}},[Bt]),Object(B.useEffect)(function(){if(Pn.length!==0){var Ue;(Xn==null||((Ue=Xn.current)===null||Ue===void 0)?void 0:Ue.clientHeight)>98&&Ct(1)}},[Pn]),Object(B.useEffect)(function(){return mt({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),mt({type:"globalSetting/setShowQuestionBackTop",payload:!0}),function(){mt({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),mt({type:"globalSetting/setShowQuestionBackTop",payload:!1})}},[]),Object(B.useEffect)(function(){var Ue;(document.title==="\u4EBA\u5DE5\u667A\u80FD\u79D1\u7814\u670D\u52A1\u5E73\u53F0"||document.title==="\u9996\u9875"||document.title==="\u5B9E\u8DF5\u6559\u5B66\u5E73\u53F0"||(Ue=document.title)!==null&&Ue!==void 0&&Ue.includes("img"))&&(document.title="\u5728\u7EBF\u5237\u9898")},[tt]),Object(B.useEffect)(function(){return document.body.setAttribute("data-custom","initial"),function(){document.body.removeAttribute("data-custom")}},[]);var Gn=function(){var Ue=Object(c.a)(A.a.mark(function Be(Ve){var dt,Lt,Rt,fn;return A.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return Ve.search=encodeURIComponent(Ve.search),Rt=ft.a.cloneDeep(Ve),Rt.tag_discipline_id=(dt=Rt.tag_discipline_id)!==null&&dt!==void 0&&dt.includes(-1)?[]:Rt.tag_discipline_id,Rt.source_discipline_id=(Lt=Rt.source_discipline_id)!==null&&Lt!==void 0&&Lt.includes(-1)?[]:Rt.source_discipline_id,console.log(Rt,"sendData"),Et(!0),k([]),$.next=9,Object(Ee.a)("/api/practices.json",{method:"get",params:Rt});case 9:fn=$.sent,Kn([]),Et(!1),$t(fn==null?void 0:fn.practices_count),k(fn==null?void 0:fn.practices_list),Ki((fn==null?void 0:fn.recommend_subjects)||[]);case 15:case"end":return $.stop()}},Be)}));return function(Ve){return Ue.apply(this,arguments)}}(),Ai=function(){var Ue=Object(c.a)(A.a.mark(function Be(Ve){var dt,Lt,Rt,fn,Sn,$;return A.a.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return dt=Ve.op,Lt=Ve.description,Rt=Ve.record,fn=Ve.e,Sn={op:dt,description:Lt},Et(!0),ve.next=5,Object(Ee.a)("/api/practices/".concat(Rt.identifier,"/review"),{method:"post",body:Sn});case 5:$=ve.sent,Et(!1),dt==="claim"&&($.status===0||$.status==="0")&&ni(fn,Rt),Gn(Oe);case 9:case"end":return ve.stop()}},Be)}));return function(Ve){return Ue.apply(this,arguments)}}(),Yi=function(){var Ue=Object(c.a)(A.a.mark(function Be(Ve){var dt;return A.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return Et(!0),Rt.next=3,Object(Ee.a)("/api/practices/".concat(Ve.identifier,"/publish"),{method:"post"});case 3:dt=Rt.sent,Et(!1),Gn(Oe);case 6:case"end":return Rt.stop()}},Be)}));return function(Ve){return Ue.apply(this,arguments)}}(),tr=function(){var Ue=Object(c.a)(A.a.mark(function Be(){var Ve,dt,Lt,Rt,fn,Sn;return A.a.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:return de.next=2,Object(Ee.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});case 2:return dt=de.sent,de.next=5,Object(Ee.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source",position:"index"}});case 5:return Lt=de.sent,de.next=8,Object(Ee.a)("/api/mypractices/rank_list",{method:"get",params:{}});case 8:Rt=de.sent,dt!=null&&dt.tag_disciplines&&(fn=[{id:-1,name:"\u5168\u90E8",count:dt==null?void 0:dt.totalCount}].concat(Object(h.a)(dt==null?void 0:dt.tag_disciplines)),tn(fn)),Lt!=null&&Lt.tag_disciplines&&(Sn=[{id:-1,name:"\u5168\u90E8",count:Lt==null?void 0:Lt.totalCount}].concat(Object(h.a)(Lt==null?void 0:Lt.tag_disciplines)),Wn(Sn)),Zn(Rt||{}),p(Rt==null||((Ve=Rt.my_record)===null||Ve===void 0)?void 0:Ve.outsource);case 13:case"end":return de.stop()}},Be)}));return function(){return Ue.apply(this,arguments)}}(),Di=function(Be,Ve){var dt;Oe.page=1;var Lt=Oe["".concat(Ve,"_discipline_id")];(dt=Oe["".concat(Ve,"_discipline_id")])!==null&&dt!==void 0&&dt.includes(Be)?Lt=Lt.filter(function(Rt){return Rt!==Be}):Lt.push(Be),Be===-1?Lt=[-1]:(Lt=Lt.filter(function(Rt){return Rt!==-1}),Lt.length||(Lt=[-1])),Oe["".concat(Ve,"_discipline_id")]=Lt,In(Object(g.a)({},Oe)),Gn(Oe)},Vt=function(Be,Ve){Oe.page=1,Oe[Ve]=typeof Be=="number"?Be:null,In(Object(g.a)({},Oe)),Gn(Oe)},Jt=function(Be){Oe.page=1,Oe.save_search=Be,In(Object(g.a)({},Oe))},bn=function(Be,Ve,dt){Oe.page=Be==null?void 0:Be.current,Oe.per_page=Be==null?void 0:Be.pageSize,dt!=null&&dt.order?(Oe.sort_by=dt==null?void 0:dt.field,Oe.sort_direction=(dt==null?void 0:dt.order)==="ascend"?"asc":"desc"):(Oe.sort_by=null,Oe.sort_direction=null),In(Object(g.a)({},Oe)),Gn(Oe)},Mn=function(Be){Oe.page=1,Oe.filter=Be,Oe.status=null,Oe.practice_status=null,In(Object(g.a)({},Oe)),Gn(Oe)},Bn=function(Be,Ve){if((Ve==null?void 0:Ve.length)===0){E.b.warn("\u8BF7\u9009\u62E9\u8BD5\u9898");return}var dt=function(){var Lt=Object(c.a)(A.a.mark(function Rt(){var fn,Sn;return A.a.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:return de.next=2,Object(Ee.a)("/api/practices/batch_op.json",{method:"post",body:{identifier:Ve,op:Be}});case 2:fn=de.sent,(fn==null?void 0:fn.status)===0&&(Sn=K.length===1&&Oe.page!==1?Oe.page-1:Oe.page,Oe.page=Sn,In(Object(g.a)({},Oe)),Gn(Oe));case 4:case"end":return de.stop()}},Rt)}));return function(){return Lt.apply(this,arguments)}}();if(Be===-1){_.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u5220\u9664\u786E\u8BA4",icon:null,className:"custom-modal-divider",content:"\u5220\u9664\u540E\u9898\u76EE\u5C06\u4E0D\u53EF\u518D\u627E\u56DE\u3002",onOk:dt});return}dt()},Xi=O.a.createElement(i.a,null,(Oe==null?void 0:Oe.filter)==="public"?O.a.createElement(i.a.Item,{onClick:function(){return Bn(0,Cn)}},"\u6279\u91CF\u79FB\u51FA\u516C\u5171"):[O.a.createElement(i.a.Item,{key:2,onClick:function(){return Bn(1,Cn)}},"\u6279\u91CF\u79FB\u5165\u516C\u5171"),O.a.createElement(i.a.Item,{key:1,onClick:function(){return Bn(0,Cn)}},"\u6279\u91CF\u79FB\u51FA\u516C\u5171")],Object(Te.v)()&&O.a.createElement(i.a.Item,{onClick:function(){return nr()}},"\u53D1\u9001\u81F3\u8BD5\u9898\u5E93"),(Oe==null?void 0:Oe.filter)!=="public"&&O.a.createElement(i.a.Item,{onClick:function(){return Bn(-1,Cn)}},"\u6279\u91CF\u5220\u9664")),Fi=function(Be,Ve){return O.a.createElement(i.a,null,(Ve==null?void 0:Ve.practice_status)===1?O.a.createElement(i.a.Item,{onClick:function(){return Bn(0,[Be])}},"\u79FB\u51FA\u516C\u5171"):O.a.createElement(i.a.Item,{onClick:function(){return Bn(1,[Be])}},"\u79FB\u5165\u516C\u5171"),(Oe==null?void 0:Oe.filter)==="mine"?O.a.createElement(i.a.Item,{onClick:function(){return Yi(Ve)},disabled:![0,4,5].includes(Ve.practice_status)},[0,4,5].includes(Ve.practice_status)?"\u53D1\u5E03\u5BA1\u6838":"\u5DF2\u53D1\u5E03\u5BA1\u6838"):null,O.a.createElement(i.a.Item,{onClick:function(){return Object(ut.U)("/problems/".concat(Be,"/ojedit"))}},"\u7F16\u8F91"),(Oe==null?void 0:Oe.filter)!=="public"&&O.a.createElement(i.a.Item,{onClick:function(){return Bn(-1,[Be])}},"\u5220\u9664"))},Qi=function(Be,Ve){return O.a.createElement(i.a,null,O.a.createElement(i.a.Item,{onClick:function(){return Yi(Ve)},disabled:![0,4,5].includes(Ve.practice_status)},[0,4,5].includes(Ve.practice_status)?"\u53D1\u5E03\u5BA1\u6838":"\u5DF2\u53D1\u5E03\u5BA1\u6838"),O.a.createElement(i.a.Item,{onClick:function(){return Object(ut.U)("/problems/".concat(Be,"/ojedit"))}},"\u7F16\u8F91"),O.a.createElement(i.a.Item,{onClick:function(){return Bn(-1,[Be])}},"\u5220\u9664"))},Ji=function(Be){Kn(Be)},nr=function(){if(!Cn.length){E.b.warn("\u8BF7\u9009\u62E9\u53D1\u9001\u81F3\u8BD5\u9898\u5E93\u7684\u7F16\u7A0B\u5237\u9898");return}var Be=null;_.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u53D1\u9001\u81F3\u8BD5\u9898\u5E93",icon:null,className:"custom-modal-divider",content:O.a.createElement("div",null,O.a.createElement("p",{className:"mt20"},"\u5DF2\u9009",O.a.createElement("span",{className:"c-light-primary"},Cn.length),"\u4E2D\u4E2A\u7F16\u7A0B\u5237\u9898\u53D1\u9001\u81F3\u8BD5\u9898\u5E93\u6210\u4E3A\u7F16\u7A0B\u9898"),O.a.createElement("div",null,"\u8BF7\u9009\u62E9\u7F16\u7A0B\u9898\u7684\u8BED\u8A00\uFF1A"),O.a.createElement(e.a.Group,{onChange:function(dt){Be=dt.target.value,document.getElementById("send-to-modal").style.display="none"}},O.a.createElement(e.a,{value:"c"},"C"),O.a.createElement(e.a,{value:"c++"},"C++"),O.a.createElement(e.a,{value:"java"},"Java"),O.a.createElement(e.a,{value:"python"},"Python")),O.a.createElement("div",{id:"send-to-modal",style:{color:"#E30000",display:"none"}},"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00")),onOk:function(){var Ve=Object(c.a)(A.a.mark(function Lt(){var Rt;return A.a.wrap(function(Sn){for(;;)switch(Sn.prev=Sn.next){case 0:if(Be){Sn.next=3;break}return document.getElementById("send-to-modal").style.display="block",Sn.abrupt("return",Promise.reject());case 3:return Sn.next=5,Object(Ee.a)("/api/practices/send_to_item_bank.json",{method:"post",body:{identifiers:Cn,language:Be}});case 5:Rt=Sn.sent,(Rt==null?void 0:Rt.status)===0&&E.b.success("\u53D1\u9001\u6210\u529F");case 7:case"end":return Sn.stop()}},Lt)}));function dt(){return Ve.apply(this,arguments)}return dt}()})},dr={selectedRowKeys:Cn,columnWidth:40,onChange:Ji};return O.a.createElement("section",{className:ne.a.wrap},O.a.createElement(We.a,{img:ze.a,title:"\u7F16\u7A0B\u5237\u9898",sunTitle:"\u5FEB\u901F\u63D0\u9AD8\u7F16\u7A0B\u80FD\u529B",bannerExtraContent:O.a.createElement(f.a,{overlay:O.a.createElement(i.a,null,O.a.createElement(i.a.Item,{key:1,onClick:function(){P.d.push("/problems/add")}},"\u65B0\u5EFA\u9898\u76EE"),O.a.createElement(i.a.Item,{key:2,onClick:function(){P.d.push("/problems/batchAdd")}},"\u6279\u91CF\u5BFC\u5165\u9898\u76EE"))},O.a.createElement("div",{className:ne.a.addQuestion,style:{visibility:Object(Te.v)()||N?"visible":"hidden"}},O.a.createElement("span",null,"\u65B0\u5EFA\u9898\u76EE")))}),O.a.createElement("div",{className:ne.a.content},O.a.createElement("div",{className:ne.a.left},O.a.createElement(o.a,{className:"".concat(ne.a.filterPoint," mb10"),align:"top"},O.a.createElement(a.a,{className:ne.a.filterType},"\u77E5\u8BC6\u70B9"),O.a.createElement(a.a,{className:ne.a.btnWarp,ref:si,style:vt>0?{height:vt===1?76:"auto"}:{}},Bt==null?void 0:Bt.map(function(Ue){var Be;return O.a.createElement("div",{onClick:function(){return Di(Ue.id,"tag")},key:Ue.id,className:Oe!=null&&(Be=Oe.tag_discipline_id)!==null&&Be!==void 0&&Be.includes(Ue.id)?"".concat(ne.a.btn," ").concat(ne.a.btnActive):ne.a.btn},O.a.createElement("span",{title:Ue.name},Ue.name),O.a.createElement("span",{className:ne.a.count,style:{display:Ue.count?"block":"none"}},Ue.count))})),!!vt&&O.a.createElement(a.a,{className:ne.a.fold},vt===1?O.a.createElement("div",{onClick:function(){return Ot(2)},className:ne.a.action},"\u5C55\u5F00",O.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-zhankai4"})):O.a.createElement("div",{onClick:function(){return Ot(1)},className:ne.a.action},"\u6536\u8D77",O.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-shouqi3"})))),!!Pn.length&&O.a.createElement(o.a,{className:ne.a.filterPoint,align:"top",style:{marginBottom:22}},O.a.createElement(a.a,{className:ne.a.filterType},"\u6765\u6E90"),O.a.createElement(a.a,{className:ne.a.btnWarp,ref:Xn,style:St>0?{height:St===1?76:"auto"}:{}},Pn==null?void 0:Pn.map(function(Ue){var Be;return O.a.createElement("div",{onClick:function(){return Di(Ue.id,"source")},key:Ue.id,className:Oe!=null&&(Be=Oe.source_discipline_id)!==null&&Be!==void 0&&Be.includes(Ue.id)?"".concat(ne.a.btn," ").concat(ne.a.btnActive):ne.a.btn},O.a.createElement("span",{title:Ue.name},Ue.name),O.a.createElement("span",{className:ne.a.count},Ue.count))}),!!St&&O.a.createElement(a.a,{className:ne.a.fold},St===1?O.a.createElement("div",{onClick:function(){return Ct(2)},className:ne.a.action},"\u5C55\u5F00",O.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-zhankai4"})):O.a.createElement("div",{onClick:function(){return Ct(1)},className:ne.a.action},"\u6536\u8D77",O.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-shouqi3"}))))),O.a.createElement("div",{className:ne.a.control},O.a.createElement(v.a,{suffixIcon:O.a.createElement("i",{className:"iconfont icon-a-bianzu11"}),allowClear:!0,placeholder:"\u96BE\u5EA6",value:Oe==null?void 0:Oe.difficulty,onChange:function(Be){return Vt(Be,"difficulty")}},O.a.createElement(v.a.Option,{value:1},"\u7B80\u5355"),O.a.createElement(v.a.Option,{value:2},"\u9002\u4E2D"),O.a.createElement(v.a.Option,{value:3},"\u56F0\u96BE")),Object(Te.p)()&&Oe.filter==="public"&&O.a.createElement(v.a,{suffixIcon:O.a.createElement("i",{className:"iconfont icon-a-bianzu11"}),allowClear:!0,placeholder:"\u72B6\u6001",value:Oe==null?void 0:Oe.status,onChange:function(Be){return Vt(Be,"status")}},O.a.createElement(v.a.Option,{value:0},"\u672A\u5F00\u542F"),O.a.createElement(v.a.Option,{value:1},"\u8FDB\u884C\u4E2D"),O.a.createElement(v.a.Option,{value:2},"\u5DF2\u901A\u8FC7")),Object(Te.p)()&&Oe.filter==="mine"&&O.a.createElement(v.a,{suffixIcon:O.a.createElement("i",{className:"iconfont icon-a-bianzu11"}),allowClear:!0,placeholder:"\u72B6\u6001",value:Oe==null?void 0:Oe.practice_status,onChange:function(Be){return Vt(Be,"practice_status")}},O.a.createElement(v.a.Option,{value:0},"\u672A\u53D1\u5E03"),O.a.createElement(v.a.Option,{value:1},"\u5DF2\u516C\u5F00"),O.a.createElement(v.a.Option,{value:2},"\u672A\u5BA1\u6838"),O.a.createElement(v.a.Option,{value:3},"\u5BA1\u6838\u4E2D"),O.a.createElement(v.a.Option,{value:4},"\u672A\u516C\u5F00"),O.a.createElement(v.a.Option,{value:5},"\u672A\u901A\u8FC7")),Object(Te.p)()&&Oe.filter==="all"&&O.a.createElement(v.a,{suffixIcon:O.a.createElement("i",{className:"iconfont icon-a-bianzu11"}),allowClear:!0,placeholder:"\u72B6\u6001",value:Oe==null?void 0:Oe.practice_status,onChange:function(Be){return Vt(Be,"practice_status")}},O.a.createElement(v.a.Option,{value:0},"\u672A\u53D1\u5E03"),O.a.createElement(v.a.Option,{value:1},"\u5DF2\u516C\u5F00"),O.a.createElement(v.a.Option,{value:2},"\u672A\u5BA1\u6838"),O.a.createElement(v.a.Option,{value:3},"\u5BA1\u6838\u4E2D"),O.a.createElement(v.a.Option,{value:4},"\u672A\u516C\u5F00"),O.a.createElement(v.a.Option,{value:5},"\u672A\u901A\u8FC7")),O.a.createElement(S.a.Search,{className:ne.a.search,size:"large",suffix:O.a.createElement("i",{className:"iconfont icon-sousuo9 font14 ".concat(ne.a.searchIcon),onClick:function(){Oe.page=1,Oe.search=Oe.save_search,In(Object(g.a)({},Oe)),Oe.save_search&&Object(_t.a)({name:Oe.save_search,copywriting:Oe.save_search,position:"Practice"}),Gn(Oe)}}),placeholder:Object(Te.v)()?"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u3001\u521B\u5EFA\u8005\u641C\u7D22":"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",value:Oe==null?void 0:Oe.save_search,onChange:function(Be){return Jt(Be.target.value)},onSearch:function(Be){Oe.page=1,Oe.search=Oe.save_search,In(Object(g.a)({},Oe)),Be&&Object(_t.a)({name:Be,copywriting:Be,position:"Practice"}),Gn(Oe)}})),O.a.createElement("div",{className:ne.a.table},O.a.createElement("div",{className:ne.a.tabWarp,style:Object(Te.v)()||N?{}:{height:10,border:0}},Object(Te.v)()?O.a.createElement(U.a,{className:ne.a.tab,activeKey:li?"not_reviewed":Oe.filter,onChange:Mn,tabBarExtraContent:!li&&O.a.createElement(f.a,{overlay:Xi},O.a.createElement("span",{className:"ant-dropdown-link font14 current",onClick:function(Be){return Be.preventDefault()}},"\u6279\u91CF\u64CD\u4F5C ",O.a.createElement("i",{style:{display:"inline-block",transform:"scale(0.6)",fontSize:12},className:"iconfont icon-xiajiantou1"})))},O.a.createElement(U.a.TabPane,{tab:"\u516C\u5171",key:"public"}),O.a.createElement(U.a.TabPane,{tab:"\u5168\u90E8",key:"all"}),O.a.createElement(U.a.TabPane,{tab:"\u6211\u521B\u5EFA\u7684",key:"mine"}),O.a.createElement(U.a.TabPane,{tab:"\u5BA1\u6838\u5217\u8868",key:"not_reviewed"})):N?O.a.createElement(U.a,{className:ne.a.tab,activeKey:li?"not_reviewed":Oe.filter,onChange:Mn},O.a.createElement(U.a.TabPane,{tab:"\u516C\u5171",key:"public"}),O.a.createElement(U.a.TabPane,{tab:"\u6211\u521B\u5EFA\u7684",key:"mine"}),O.a.createElement(U.a.TabPane,{tab:"\u5BA1\u6838\u5217\u8868",key:"not_reviewed"})):null),li?O.a.createElement("div",{className:ne.a.tabWarp,style:Object(Te.v)()||N?{}:{height:10,border:0}},O.a.createElement(U.a,{className:ne.a.tab,activeKey:Oe.filter,onChange:Mn},O.a.createElement(U.a.TabPane,{tab:"\u5F85\u5BA1\u6838",key:"not_reviewed"}),O.a.createElement(U.a.TabPane,{tab:"\u5BA1\u6838\u4E2D",key:"under_review"}),O.a.createElement(U.a.TabPane,{tab:"\u5DF2\u5BA1\u6838",key:"review_finished"}))):null,!(Object(Te.v)()||N)&&Ui&&O.a.createElement("div",{className:ne.a.tabWarp2,style:{justifyContent:"end"}},hi?O.a.createElement(o.a,{align:"middle"},O.a.createElement(o.a,{onClick:function(){return wi(!0)},align:"middle",className:"current"},O.a.createElement("i",{className:"iconfont icon-yixuan mr10 c-light-primary font20"}),O.a.createElement("span",null,"\u5DF2\u9009",O.a.createElement("span",{className:"c-light-primary"},Cn.length),"\u4E2A")),O.a.createElement(r.a,{className:"mr20 ml40",ghost:!0,onClick:function(){Ii(!1),Kn([])},type:"primary"},"\u53D6\u6D88"),O.a.createElement(r.a,{onClick:nr,ghost:!0,type:"primary"},"\u786E\u8BA4\u53D1\u9001")):O.a.createElement(r.a,{onClick:function(){return Ii(!0)},type:"primary"},O.a.createElement("i",{className:"iconfont icon-fasong mr5"}),"\u53D1\u9001\u81F3\u8BD5\u9898\u5E93")),O.a.createElement(w.a,{rowSelection:Object(Te.v)()||hi?dr:void 0,className:ne.a.customTable,dataSource:K,bordered:!1,rowKey:function(Be){return Be.identifier},columns:li?er:Bi,rowClassName:ne.a.row,loading:lt,onRow:function(Be){return{onMouseEnter:function(dt){on(Be==null?void 0:Be.identifier)},onMouseLeave:function(dt){on(null)}}},onChange:bn,pagination:{pageSize:Oe.per_page,total:mn,current:Oe.page,showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!1,position:["bottomCenter"],showTotal:function(Be){return O.a.createElement("span",{className:"mr10"},"\u5171",O.a.createElement("span",{className:"c-orange"},Be),"\u6761\u6570\u636E")}}}))),O.a.createElement("div",{className:ne.a.right},O.a.createElement("div",{className:ne.a.statistics},O.a.createElement("img",{src:$e.a,alt:""}),O.a.createElement("div",{className:ne.a.title},"\u6211\u7684\u5237\u9898\u7EDF\u8BA1"),O.a.createElement(o.a,{justify:"space-between"},O.a.createElement(a.a,{className:ne.a.statisticItem},O.a.createElement("div",{className:ne.a.rate},Object(Te.p)()?(Ut==null||((be=Ut.my_record)===null||be===void 0)?void 0:be.passed_ratio)||0:"-"),O.a.createElement("div",{className:ne.a.dataName},"\u901A\u8FC7\u7387(%)")),O.a.createElement(a.a,{className:ne.a.statisticItem},O.a.createElement("div",{className:ne.a.rate},Object(Te.p)()?(Ut==null||((Le=Ut.my_record)===null||Le===void 0)?void 0:Le.passed_count)||0:"-"),O.a.createElement("div",{className:ne.a.dataName},"\u5237\u9898\u6570")),O.a.createElement(a.a,{className:ne.a.statisticItem},O.a.createElement("div",{className:ne.a.rate},Object(Te.p)()?Ut==null||((ce=Ut.my_record)===null||ce===void 0||((ee=ce.time_count)===null||ee===void 0))?void 0:ee.toFixed(2):"-"),O.a.createElement("div",{className:ne.a.dataName},"\u7D2F\u8BA1\u65F6\u957F(h)")))),!!(Ut!=null&&(te=Ut.rank_list)!==null&&te!==void 0&&te.length)&&O.a.createElement(O.a.Fragment,null,((V=Ye.userInfo)===null||V===void 0?void 0:V.user_id)!=2&&Object(Te.m)()&&(tt==null||((X=tt.setting)===null||X===void 0)?void 0:X.main_site)&&_i&&(di==null?void 0:di.length)>0&&O.a.createElement("div",{className:ne.a.problemsclose,style:{position:"relative"}},O.a.createElement(j.a,{autoplay:!0,pauseOnDotsHover:!0,style:{width:292,height:170,marginBottom:"10px",overflow:"hidden"}},di==null?void 0:di.map(function(Ue,Be){return O.a.createElement("div",{style:{display:"flex"},key:Be},O.a.createElement("a",{href:"/paths/".concat(Ue.identifier)},O.a.createElement("img",{style:{width:"292px",height:"170px",borderRadius:"4px"},src:le.a.IMG_SERVER+"/"+Ue.image_url})))})),O.a.createElement("img",{className:ne.a.imgsrc,onClick:function(){localStorage.setItem("problemsclose",re()().add(1,"days").unix()+""),ti(!1)},src:Tt.a})),O.a.createElement("div",{className:ne.a.sort},O.a.createElement("div",{className:ne.a.rankHeader},O.a.createElement("img",{src:Fe.a,className:ne.a.rankIcon})),!!(Ut!=null&&(q=Ut.my_record)!==null&&q!==void 0&&q.rank)&&O.a.createElement("div",{className:"".concat(ne.a.myRecord," ").concat(ne.a.li)},O.a.createElement("span",{className:"".concat(ne.a.recordPrefix," ").concat(ne.a.mine)},"\u6211\u7684"),O.a.createElement("img",{className:ne.a.avatar,src:le.a.IMG_SERVER+"/images/"+(Ut==null||((ae=Ut.my_record)===null||ae===void 0)?void 0:ae.image_url)}),O.a.createElement("span",{title:Ut==null||((ge=Ut.my_record)===null||ge===void 0)?void 0:ge.nickname,className:ne.a.nickname},Ut==null||((we=Ut.my_record)===null||we===void 0)?void 0:we.nickname),O.a.createElement("span",{className:ne.a.myRank},(Ut==null||((je=Ut.my_record)===null||je===void 0)?void 0:je.rank)>999?"\u7B2C999+\u540D":"\u7B2C".concat(Ut==null||((at=Ut.my_record)===null||at===void 0)?void 0:at.rank,"\u540D")),O.a.createElement("span",{className:ne.a.questionNumber},Ut==null||((ot=Ut.my_record)===null||ot===void 0)?void 0:ot.passed_count,"\u9898")),Ut==null||((Se=Ut.rank_list)===null||Se===void 0)?void 0:Se.map(function(Ue,Be){var Ve=Be+1;return Be===0&&(Ve=Ie.a),Be===1&&(Ve=et.a),Be===2&&(Ve=nt.a),O.a.createElement("div",{className:ne.a.li,key:Be},typeof Ve=="number"?O.a.createElement("span",{className:ne.a.recordPrefix},Ve):O.a.createElement("span",{className:ne.a.recordPrefix},O.a.createElement("img",{src:Ve})),O.a.createElement("img",{className:ne.a.avatar,src:le.a.IMG_SERVER+"/images/"+(Ue==null?void 0:Ue.image_url)}),O.a.createElement("span",{title:Ue==null?void 0:Ue.nickname,className:ne.a.nickname},Ue==null?void 0:Ue.nickname),O.a.createElement("span",{className:ne.a.questionNumber},Ue.passed_count,"\u9898"))}))))),O.a.createElement(_.a,{title:"\u5BA1\u6838\u8BB0\u5F55",visible:Ni,onOk:function(){},onCancel:function(){ui(!1)},footer:null,closable:!0},O.a.createElement(w.a,{dataSource:vi,columns:ji})),O.a.createElement(_.a,{title:"\u672A\u901A\u8FC7\u539F\u56E0",visible:Ri,onOk:function(){},onCancel:function(){gi(!1)},footer:null,closable:!0},O.a.createElement(G.a,{value:vn})),O.a.createElement(_.a,{visible:bi,centered:!0,width:1e3,okText:"\u786E\u5B9A\u53D1\u9001",onCancel:function(){return wi(!1)},cancelText:"\u8FD4\u56DE\u5217\u8868",onOk:Object(c.a)(A.a.mark(function Ue(){return A.a.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:wi(!1),nr();case 2:case"end":return Ve.stop()}},Ue)})),title:"\u67E5\u770B\u5DF2\u9009"},O.a.createElement("div",{className:"font14 c-light-primary mb10"},"\u5DF2\u9009",Cn==null?void 0:Cn.length,"\u4E2A"),O.a.createElement("div",{style:{height:400,overflow:"auto"}},K==null||((st=K.filter(function(Ue){return Cn.includes(Ue.identifier)}))===null||st===void 0)?void 0:st.map(function(Ue,Be){var Ve,dt;return O.a.createElement("div",{key:Be,className:ne.a.sendModal},O.a.createElement("div",{className:ne.a.li},O.a.createElement("p",null,Ue==null?void 0:Ue.name),O.a.createElement("div",{className:ne.a.bottom},O.a.createElement("span",{className:"c-grey-333"},"\u7F16\u7A0B\u9898"),O.a.createElement("i",{className:ne.a.line}),O.a.createElement("span",{className:"c-grey-333"},Ue.difficulty===1&&"\u7B80\u5355",Ue.difficulty===2&&"\u9002\u4E2D",Ue.difficulty===3&&"\u56F0\u96BE"),O.a.createElement("i",{className:ne.a.line}),O.a.createElement("span",null,"\u521B\u5EFA\u8005\xA0",O.a.createElement(L.a,{title:Ue==null?void 0:Ue.creator},O.a.createElement("span",{className:"c-grey-333"},(Ue==null||((Ve=Ue.creator)===null||Ve===void 0)?void 0:Ve.length)>6?(Ue==null||((dt=Ue.creator)===null||dt===void 0)?void 0:dt.substr(0,3))+"...":Ue==null?void 0:Ue.creator))),O.a.createElement("i",{className:ne.a.line}),O.a.createElement("span",{className:ne.a.des},"\u66F4\u65B0\xA0",O.a.createElement("span",{className:"c-grey-333"},Ue==null?void 0:Ue.updated_at)))),O.a.createElement("div",{className:ne.a.del,onClick:function(){Kn(Cn.filter(function(Rt){return Rt!==Ue.identifier}))}},"\u5220\u9664"))}))))};Re.default=Object(P.a)(function(xe){var De=xe.user,ke=xe.globalSetting;return{user:De,globalSetting:ke}})(me)},yDOu:function(Ge,Re){Ge.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABZlJREFUaEPtmd1rXNUah5/1tfdkkrSNMdWO+C0pp6mKYhURURRFvPFGiwj+A4p44Y30pngj5+ZcHET/AUGkeuONiKIoIqJVRO0UDdpzPAen2hhTm2Qye68vWdlOmYQ2M/2gYaQDw2K+f8/7/t53r/WOYMhvYsj1cxFgszN4MQN/mwzEGM8om0KIeD7gz+hH1//getEvvDBYU9i/nzXizwXmrAB6hXdFN3dV4mcOV2urtRam0ahEN3dV68zhau2FORuQMwI4nfAkurUDsXC0Er00j1hZXAswMk4cm6xET+wgNo4SE8y5ggwM0BXfG/Gu8P8fQibBUxOIzjKi2ILY2l4L8EedmJ8g1kaJcwvEBHTlbsLpQAbNxkAA68V/CHJ6B2JV+CRivIWsaWQxhmgfR47VEbZY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