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.
394 lines
1.0 MiB
394 lines
1.0 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[213,5,7,8,10,13],{"+92d":function(Ke,we,F){Ke.exports=F.p+"static/b1.8d46544a.svg"},"+GGh":function(Ke,we){Ke.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+ugmeamD1jINn9EbtE4GiWcdm5h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UjilAYQt2AqcBRuDhyEunEmg22PzCfR/M8DZG0n7Xny1kOuI8N/XGDrxJUCyxjB5bKGdUe6BGZvjswYvrrA3YWza8V+anyzz5HIJuZMX4xGQ7IUOrA57W9I6SnObcn1kB1X21ES7HW/pdnVJe+c7fchqp56Frd/L2CHUV/wxTNED4aLnpjbbgOj67X3rs7YaeFYYfWmoL1KzgnWUKRJhUxh2hqtXJJswi1tn082qcKoC+YrF4kzI5GwhTatPmbCn9Y/mlLxnRdiKs8TAlmB1OKJcl60ycFIVwLxEYbYo7F3csZPtPKc4q3PPzOJLz7jeKa6q5mHQCfvIjCVPzGSUZqy+Bah8nzGg4vAZ9IluHdxs9FE2C2CeGWTdikUYJmR+YiKTL0lg29AyiA7jMsNIcFO9O8j+yNWNDFq2AolAEyxKYUzpFrMwg1gzCmeyWo+5dNmlLYAHX9VCvhfvnbflo9jzYiHUM5H1x+w4wkyRHHuzDWfaoKOWNyFv9LRvvQ23CMD4cFX4XLEE+8lcDIHEHlLKPkDaXUrZDkjaSSlaGJ4jozNkmbJw6r6ElAGPVweIGXmo5fZGWTHbuevMniAjM+jnonbnuMmwpExEwAn6vwrmKhP2hcdXhv1cpKvCLzEtbrP14LLpR/o/JBqhquSiLD0AAAAASUVORK5CYII="},"+ua5":function(Ke,we,F){},"5A5F":function(Ke,we,F){Ke.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(Ke,we,F){"use strict";var ae,L;function I(j,C,S){var H=function(U,R){return j.js_beautify(U,R)};return H.js=j.js_beautify,H.css=C.css_beautify,H.html=S.html_beautify,H.js_beautify=j.js_beautify,H.css_beautify=C.css_beautify,H.html_beautify=S.html_beautify,H}!(ae=[F("6UM0"),F("TXwP"),F("psGv")],L=function(j,C,S){return I(j,C,S)}.apply(we,ae),L!==void 0&&(Ke.exports=L))},"6+eU":function(Ke,we,F){"use strict";F.d(we,"a",function(){return p});var ae=F("wx14"),L=F("rePB"),I=F("VTBJ"),j=F("1OyB"),C=F("vuIU"),S=F("Ji7U"),H=F("LK+K"),U=F("q1tI"),R=F.n(U),A=F("TSYQ"),y=F.n(A),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(S.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,O=x.quickGo,B=x.rootPrefixCls,w=u.state.goInputText;if(D||w==="")return;if(c.relatedTarget&&(c.relatedTarget.className.indexOf("".concat(B,"-prev"))>=0||c.relatedTarget.className.indexOf("".concat(B,"-next"))>=0))return;u.setState({goInputText:""}),O(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),O=isNaN(Number(x))?0:Number(x);return D-O})}},{key:"render",value:function(){var r=this,l=this.props,f=l.pageSize,c=l.locale,x=l.rootPrefixCls,D=l.changeSize,O=l.quickGo,B=l.goButton,w=l.selectComponentClass,W=l.buildOptionText,P=l.selectPrefixCls,z=l.disabled,Q=this.state.goInputText,re="".concat(x,"-options"),le=w,be=null,ye=null,ie=null;if(!D&&!O)return null;var xe=this.getPageSizeOptions();if(D&&le){var Ae=xe.map(function(fe,Z){return R.a.createElement(le.Option,{key:Z,value:fe.toString()},(W||r.buildOptionText)(fe))});be=R.a.createElement(le,{disabled:z,prefixCls:P,showSearch:!1,className:"".concat(re,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(f||xe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Z){return Z.parentNode}},Ae)}return O&&(B&&(ie=typeof B=="boolean"?R.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:z,className:"".concat(re,"-quick-jumper-button")},c.jump_to_confirm):R.a.createElement("span",{onClick:this.go,onKeyUp:this.go},B)),ye=R.a.createElement("div",{className:"".concat(re,"-quick-jumper")},c.jump_to,R.a.createElement("input",{disabled:z,type:"text",value:Q,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),c.page,ie)),R.a.createElement("li",{className:"".concat(re)},be,ye)}}]),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(S.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,O){var B=r.props.prefixCls,w=D||R.a.createElement("button",{type:"button","aria-label":O,className:"".concat(B,"-item-link")});return typeof D=="function"&&(w=R.a.createElement(D,Object(I.a)({},r.props))),w},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,O=D.showQuickJumper,B=D.pageSize,w=D.total;return w<=B?!1:O},r.handleKeyDown=function(D){(D.keyCode===o.ARROW_UP||D.keyCode===o.ARROW_DOWN)&&D.preventDefault()},r.handleKeyUp=function(D){var O=r.getValidValue(D),B=r.state.currentInputValue;O!==B&&r.setState({currentInputValue:O}),D.keyCode===o.ENTER?r.handleChange(O):D.keyCode===o.ARROW_UP?r.handleChange(O-1):D.keyCode===o.ARROW_DOWN&&r.handleChange(O+1)},r.changePageSize=function(D){var O=r.state.current,B=T(D,r.state,r.props);O=O>B?B:O,B===0&&(O=r.state.current),typeof D=="number"&&("pageSize"in r.props||r.setState({pageSize:D}),"current"in r.props||r.setState({current:O,currentInputValue:O})),r.props.onShowSizeChange(O,D),"onChange"in r.props&&r.props.onChange&&r.props.onChange(O,D)},r.handleChange=function(D){var O=r.props.disabled,B=D;if(r.isValid(B)&&!O){var w=T(void 0,r.state,r.props);B>w?B=w: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,O){if(D.key==="Enter"||D.charCode===13){for(var B=arguments.length,w=new Array(B>2?B-2:0),W=2;W<B;W++)w[W-2]=arguments[W];O.apply(void 0,w)}},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,O=l.hideOnSinglePage,B=l.total,w=l.locale,W=l.showQuickJumper,P=l.showLessItems,z=l.showTitle,Q=l.showTotal,re=l.simple,le=l.itemRender,be=l.showPrevNextJumpers,ye=l.jumpPrevIcon,ie=l.jumpNextIcon,xe=l.selectComponentClass,Ae=l.selectPrefixCls,fe=l.pageSizeOptions,Z=this.state,Ue=Z.current,$e=Z.pageSize,tt=Z.currentInputValue;if(O===!0&&B<=$e)return null;var Qe=T(void 0,this.state,this.props),it=[],Pe=null,We=null,Je=null,et=null,Ye=null,ze=W&&W.goButton,He=P?1:2,ft=Ue-1>0?Ue-1:0,ht=Ue+1<Qe?Ue+1:Qe,lt=Object.keys(this.props).reduce(function(K,Y){return(Y.substr(0,5)==="data-"||Y.substr(0,5)==="aria-"||Y==="role")&&(K[Y]=r.props[Y]),K},{});if(re)return ze&&(typeof ze=="boolean"?Ye=R.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},w.jump_to_confirm):Ye=R.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ze),Ye=R.a.createElement("li",{title:z?"".concat(w.jump_to).concat(Ue,"/").concat(Qe):null,className:"".concat(f,"-simple-pager")},Ye)),R.a.createElement("ul",Object(ae.a)({className:y()(f,"".concat(f,"-simple"),Object(L.a)({},"".concat(f,"-disabled"),D),c),style:x,ref:this.savePaginationNode},lt),R.a.createElement("li",{title:z?w.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(ft)),R.a.createElement("li",{title:z?"".concat(Ue,"/").concat(Qe):null,className:"".concat(f,"-simple-pager")},R.a.createElement("input",{type:"text",value:tt,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:z?w.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(ht)),Ye);if(Qe<=3+He*2){var at={locale:w,rootPrefixCls:f,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:z,itemRender:le};Qe||it.push(R.a.createElement(d,Object(ae.a)({},at,{key:"noPager",page:Qe,className:"".concat(f,"-disabled")})));for(var mt=1;mt<=Qe;mt+=1){var pt=Ue===mt;it.push(R.a.createElement(d,Object(ae.a)({},at,{key:mt,page:mt,active:pt})))}}else{var me=P?w.prev_3:w.prev_5,Ce=P?w.next_3:w.next_5;be&&(Pe=R.a.createElement("li",{title:z?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"),!!ye))},le(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(ye,"prev page"))),We=R.a.createElement("li",{title:z?Ce: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"),!!ie))},le(this.getJumpNextPage(),"jump-next",this.getItemIcon(ie,"next page")))),et=R.a.createElement(d,{locale:w,last:!0,rootPrefixCls:f,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Qe,page:Qe,active:!1,showTitle:z,itemRender:le}),Je=R.a.createElement(d,{locale:w,rootPrefixCls:f,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:z,itemRender:le});var De=Math.max(1,Ue-He),Ne=Math.min(Ue+He,Qe);Ue-1<=He&&(Ne=1+He*2),Qe-Ue<=He&&(De=Qe-He*2);for(var Ee=De;Ee<=Ne;Ee+=1){var Le=Ue===Ee;it.push(R.a.createElement(d,{locale:w,rootPrefixCls:f,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ee,page:Ee,active:Le,showTitle:z,itemRender:le}))}Ue-1>=He*2&&Ue!==1+2&&(it[0]=Object(U.cloneElement)(it[0],{className:"".concat(f,"-item-after-jump-prev")}),it.unshift(Pe)),Qe-Ue>=He*2&&Ue!==Qe-2&&(it[it.length-1]=Object(U.cloneElement)(it[it.length-1],{className:"".concat(f,"-item-before-jump-next")}),it.push(We)),De!==1&&it.unshift(Je),Ne!==Qe&&it.push(et)}var ue=null;Q&&(ue=R.a.createElement("li",{className:"".concat(f,"-total-text")},Q(B,[B===0?0:(Ue-1)*$e+1,Ue*$e>B?B:Ue*$e])));var ne=!this.hasPrev()||!Qe,te=!this.hasNext()||!Qe;return R.a.createElement("ul",Object(ae.a)({className:y()(f,c,Object(L.a)({},"".concat(f,"-disabled"),D)),style:x,unselectable:"unselectable",ref:this.savePaginationNode},lt),ue,R.a.createElement("li",{title:z?w.prev_page:null,onClick:this.prev,tabIndex:ne?null:0,onKeyPress:this.runIfEnterPrev,className:y()("".concat(f,"-prev"),Object(L.a)({},"".concat(f,"-disabled"),ne)),"aria-disabled":ne},this.renderPrev(ft)),it,R.a.createElement("li",{title:z?w.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(ht)),R.a.createElement(a,{disabled:D,locale:w,rootPrefixCls:f,selectComponentClass:xe,selectPrefixCls:Ae,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Ue,pageSize:$e,pageSizeOptions:fe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ze}))}}],[{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 p=_},"6RRn":function(Ke,we,F){"use strict";var ae=F("wCXF"),L=F("n6Qo");F.d(we,"b",function(){return L.a});var I=F("IBYe"),j=F("6eGT"),C=F("hW8S");F.d(we,"a",function(){return C.a}),we.c=ae.b},"6UM0":function(Ke,we,F){var ae,L;(function(){var I;(function(){"use strict";var C=[function(R,A,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,A,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,z){return z.indexOf(P)!==-1}function T(P){return P.replace(/^\s+/g,"")}function _(P){for(var z={},Q=0;Q<P.length;Q++)z[P[Q].replace(/-/g,"_")]=P[Q];return z}function p(P,z){return P&&P.type===t.RESERVED&&P.text===z}function E(P,z){return P&&P.type===t.RESERVED&&i(P.text,z)}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,z){if(z.multiline_frame||z.mode===l.ForInitializer||z.mode===l.Conditional)return;P.remove_indent(z.start_line_index)}function c(P){P=P.replace(o.allLineBreaks,`
|
|
`);for(var z=[],Q=P.indexOf(`
|
|
`);Q!==-1;)z.push(P.substring(0,Q)),P=P.substring(Q+1),Q=P.indexOf(`
|
|
`);return P.length&&z.push(P),z}function x(P){return P===l.ArrayLiteral}function D(P){return i(P,[l.Expression,l.ForInitializer,l.Conditional])}function O(P,z){for(var Q=0;Q<P.length;Q++){var re=P[Q].trim();if(re.charAt(0)!==z)return!1}return!0}function B(P,z){for(var Q=0,re=P.length,le;Q<re;Q++)if(le=P[Q],le&&le.indexOf(z)!==0)return!1;return!0}function w(P,z){z=z||{},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(z)}w.prototype.create_flags=function(P,z){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:z,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},w.prototype._reset=function(P){var z=P.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new v(this._options,z),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},w.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var P,z=this._reset(this._source_text),Q=this._options.eol;this._options.eol==="auto"&&(Q=`
|
|
`,z&&o.lineBreak.test(z||"")&&(Q=z.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},w.prototype.handle_token=function(P,z){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,z):P.type===t.COMMENT?this.handle_comment(P,z):P.type===t.DOT?this.handle_dot(P):P.type===t.EOF?this.handle_eof(P):P.type===t.UNKNOWN?this.handle_unknown(P,z):this.handle_unknown(P,z)},w.prototype.handle_whitespace_and_comments=function(P,z){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,z),this.handle_token(le,z),le=P.comments_before.next();if(re)for(var be=0;be<Q;be+=1)this.print_newline(be>0,z);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,z);for(var ye=1;ye<Q;ye+=1)this.print_newline(!0,z)}};var W=["async","break","continue","return","throw","yield"];w.prototype.allow_wrap_or_preserved_newline=function(P,z){if(z=z===void 0?!1:z,this._output.just_added_newline())return;var Q=this._options.preserve_newlines&&P.newlines||z,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()}},w.prototype.print_newline=function(P,z){if(!z&&(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&&p(Q,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(P)&&(this._flags.multiline_frame=!0)},w.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))},w.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 z=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(z),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)},w.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},w.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))},w.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)},w.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))},w.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"]))},w.prototype.start_of_statement=function(P){var z=!1;return z=z||E(this._flags.last_token,["var","let","const"])&&P.type===t.WORD,z=z||p(this._flags.last_token,"do"),z=z||!(this._flags.parent.mode===l.ObjectLiteral&&this._flags.mode===l.Statement)&&E(this._flags.last_token,W)&&!P.newlines,z=z||p(this._flags.last_token,"else")&&!(p(P,"if")&&!P.comments_before),z=z||this._flags.last_token.type===t.END_EXPR&&(this._previous_flags.mode===l.ForInitializer||this._previous_flags.mode===l.Conditional),z=z||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,z=z||this._flags.mode===l.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||E(this._flags.last_token,["get","set"])),z?(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},w.prototype.handle_start_expr=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P);var z=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(z),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}z=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,z=l.ForInitializer):i(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,z=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(z),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},w.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)},w.prototype.handle_start_block=function(P){this.handle_whitespace_and_comments(P);var z=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(z.type,[t.STRING,t.WORD,t.RESERVED])||i(z.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=!z.comments_before&&z.text==="}",le=re&&this._flags.last_word==="function"&&this._flags.last_token.type===t.END_EXPR;if(this._options.brace_preserve_inline){var be=0,ye=null;this._flags.inline_frame=!0;do if(be+=1,ye=this._tokens.peek(be-1),ye.newlines){this._flags.inline_frame=!1;break}while(ye.type!==t.EOF&&!(ye.type===t.END_BLOCK&&ye.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()},w.prototype.handle_end_block=function(P){for(this.handle_whitespace_and_comments(P);this._flags.mode===l.Statement;)this.restore_mode();var z=this._flags.last_token.type===t.START_BLOCK;this._flags.inline_frame&&!z?this._output.space_before_token=!0:this._options.brace_style==="expand"?z||this.print_newline():z||(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)},w.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 z=this._tokens.peek();z.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(p(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&&p(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)),p(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:p(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!==":"&&(p(P,"if")&&p(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&&p(P,"from")&&(this._flags.import_block=!1))},w.prototype.handle_semicolon=function(P){this.start_of_statement(P)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(P);for(var z=this._tokens.peek();this._flags.mode===l.Statement&&!(this._flags.if_block&&p(z,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(P)},w.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)},w.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},w.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)},w.prototype.handle_operator=function(P){var z=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=!z;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,be=!0,ye=!1;if(P.text===":"?this._flags.ternary_depth===0?le=!1:(this._flags.ternary_depth-=1,ye=!0):P.text==="?"&&(this._flags.ternary_depth+=1),!Q&&!z&&this._options.preserve_newlines&&i(P.text,e)){var ie=P.text===":",xe=ie&&ye,Ae=ie&&!ye;switch(this._options.operator_position){case u.before_newline:this._output.space_before_token=!Ae,this.print_token(P),(!ie||xe)&&this.allow_wrap_or_preserved_newline(P),this._output.space_before_token=!0;return;case u.after_newline:this._output.space_before_token=!0,!ie||xe?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(z){this.allow_wrap_or_preserved_newline(P),le=!1;var fe=this._tokens.peek();be=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,be=!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,be=!1,P.newlines&&(P.text==="--"||P.text==="++"||P.text==="~")){var Z=E(this._flags.last_token,g)&&P.newlines;Z&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Z,!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,["--","++"])&&(be=!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=be},w.prototype.handle_block_comment=function(P,z){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,z),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,z)},w.prototype.print_block_commment=function(P,z){var Q=c(P.text),re,le=!1,be=!1,ye=P.whitespace_before,ie=ye.length;if(this.print_newline(!1,z),this.print_token_line_indentation(P),this._output.add_token(Q[0]),this.print_newline(!1,z),Q.length>1){for(Q=Q.slice(1),le=O(Q,"*"),be=B(Q,ye),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]))):be&&Q[re]?(this.print_token_line_indentation(P),this._output.add_token(Q[re].substring(ie))):(this._output.current_line.set_indent(-1),this._output.add_token(Q[re])),this.print_newline(!1,z);this._flags.alignment=0}},w.prototype.handle_comment=function(P,z){P.newlines?this.print_newline(!1,z):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(P),this.print_newline(!1,z)},w.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)},w.prototype.handle_unknown=function(P,z){this.print_token(P),P.text[P.text.length-1]===`
|
|
`&&this.print_newline(!1,z)},w.prototype.handle_eof=function(P){for(;this._flags.mode===l.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P)},R.exports.Beautifier=w},function(R){function A(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=[]}A.prototype.clone_empty=function(){var d=new A(this.__parent);return d.set_indent(this.__indent_count,this.__alignment_count),d},A.prototype.item=function(d){return d<0?this.__items[this.__items.length+d]:this.__items[d]},A.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},A.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))},A.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)},A.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},A.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},A.prototype.is_empty=function(){return this.__items.length===0},A.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},A.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},A.prototype.pop=function(){var d=null;return this.is_empty()||(d=this.__items.pop(),this.__character_count-=d.length),d},A.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},A.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},A.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},A.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 A(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 A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},R.exports.Output=v},function(R){function A(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=A},function(R,A){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+"])*";A.identifier=new RegExp(n+a,"g"),A.identifierStart=new RegExp(n),A.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+v+d+o+"])+");var s=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;A.newline=/[\n\r\u2028\u2029]/,A.lineBreak=new RegExp(`\r
|
|
|`+A.newline.source),A.allLineBreaks=new RegExp(A.lineBreak.source,"g")},function(R,A,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 A(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"])}A.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},A.prototype._get_boolean=function(d,o){var n=this.raw_options[d],a=n===void 0?!!o:!!n;return a},A.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},A.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},A.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]},A.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},A.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=A,R.exports.normalizeOpts=v,R.exports.mergeOpts=y},function(R,A,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(O,B){return B.indexOf(O)!==-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_]+)?/,p=/[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(O,B){d.call(this,O,B),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var w=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:w.matching(_),punct:w.matching(u),comment:w.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:w.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:w.matching(/<!--/),html_comment_end:w.matching(/-->/),include:w.starting_with(/#include/).until_after(a.lineBreak),shebang:w.starting_with(/#!/).until_after(a.lineBreak),xml:w.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(O){return O.type===i.COMMENT||O.type===i.BLOCK_COMMENT||O.type===i.UNKNOWN},x.prototype._is_opening=function(O){return O.type===i.START_BLOCK||O.type===i.START_EXPR},x.prototype._is_closing=function(O,B){return(O.type===i.END_BLOCK||O.type===i.END_EXPR)&&B&&(O.text==="]"&&B.text==="["||O.text===")"&&B.text==="("||O.text==="}"&&B.text==="{")},x.prototype._reset=function(){c=!1},x.prototype._get_next_token=function(O,B){var w=null;this._readWhitespace();var W=this._input.peek();return W===null?this._create_token(i.EOF,""):(w=w||this._read_non_javascript(W),w=w||this._read_string(W),w=w||this._read_word(O),w=w||this._read_singles(W),w=w||this._read_comment(W),w=w||this._read_regexp(W,O),w=w||this._read_xml(W,O),w=w||this._read_punctuation(),w=w||this._create_token(i.UNKNOWN,this._input.next()),w)},x.prototype._read_word=function(O){var B;if(B=this.__patterns.identifier.read(),B!=="")return B=B.replace(a.allLineBreaks,`
|
|
`),!(O.type===i.DOT||O.type===i.RESERVED&&(O.text==="set"||O.text==="get"))&&f.test(B)?(B==="in"||B==="of")&&(O.type===i.WORD||O.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(O){var B=null;return O==="("||O==="["?B=this._create_token(i.START_EXPR,O):O===")"||O==="]"?B=this._create_token(i.END_EXPR,O):O==="{"?B=this._create_token(i.START_BLOCK,O):O==="}"?B=this._create_token(i.END_BLOCK,O):O===";"?B=this._create_token(i.SEMICOLON,O):O==="."&&E.test(this._input.peek(1))?B=this._create_token(i.DOT,O):O===","&&(B=this._create_token(i.COMMA,O)),B&&this._input.next(),B},x.prototype._read_punctuation=function(){var O=this.__patterns.punct.read();if(O!=="")return O==="="?this._create_token(i.EQUALS,O):O==="?."?this._create_token(i.DOT,O):this._create_token(i.OPERATOR,O)},x.prototype._read_non_javascript=function(O){var B="";if(O==="#"){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()+`
|
|
`);O=this._input.next();var w="#";if(this._input.hasNext()&&this._input.testChar(p)){do O=this._input.next(),w+=O;while(this._input.hasNext()&&O!=="#"&&O!=="=");return O==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(w+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(w+="{}",this._input.next(),this._input.next())),this._create_token(i.WORD,w)}this._input.back()}else if(O==="<"&&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&&O==="-"&&(B=this.__patterns.html_comment_end.read(),B))return c=!1,this._create_token(i.COMMENT,B);return null},x.prototype._read_comment=function(O){var B=null;if(O==="/"){var w="";if(this._input.peek(1)==="*"){w=this.__patterns.block_comment.read();var W=T.get_directives(w);W&&W.ignore==="start"&&(w+=T.readIgnored(this._input)),w=w.replace(a.allLineBreaks,`
|
|
`),B=this._create_token(i.BLOCK_COMMENT,w),B.directives=W}else this._input.peek(1)==="/"&&(w=this.__patterns.comment.read(),B=this._create_token(i.COMMENT,w))}return B},x.prototype._read_string=function(O){if(O==="`"||O==="'"||O==='"'){var B=this._input.next();return this.has_char_escapes=!1,O==="`"?B+=this._read_string_recursive("`",!0,"${"):B+=this._read_string_recursive(O),this.has_char_escapes&&this._options.unescape_strings&&(B=D(B)),this._input.peek()===O&&(B+=this._input.next()),B=B.replace(a.allLineBreaks,`
|
|
`),this._create_token(i.STRING,B)}return null},x.prototype._allow_regexp_or_xml=function(O){return O.type===i.RESERVED&&t(O.text,["return","case","throw","else","do","typeof","yield"])||O.type===i.END_EXPR&&O.text===")"&&O.opened.previous.type===i.RESERVED&&t(O.opened.previous.text,["if","while","for"])||t(O.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(O,B){if(O==="/"&&this._allow_regexp_or_xml(B)){for(var w=this._input.next(),W=!1,P=!1;this._input.hasNext()&&(W||P||this._input.peek()!==O)&&!this._input.testChar(a.newline);)w+=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()===O&&(w+=this._input.next(),w+=this._input.read(a.identifier)),this._create_token(i.STRING,w)}return null},x.prototype._read_xml=function(O,B){if(this._options.e4x&&O==="<"&&this._allow_regexp_or_xml(B)){var w="",W=this.__patterns.xml.read_match();if(W){for(var P=W[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),z=P.indexOf("{")===0,Q=0;W;){var re=!!W[1],le=W[2],be=!!W[W.length-1]||le.slice(0,8)==="![CDATA[";if(!be&&(le===P||z&&le.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(re?--Q:++Q),w+=W[0],Q<=0)break;W=this.__patterns.xml.read_match()}return W||(w+=this._input.match(/[\s\S]*/g)[0]),w=w.replace(a.allLineBreaks,`
|
|
`),this._create_token(i.STRING,w)}}return null};function D(O){for(var B="",w=0,W=new v(O),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 O;if(w=parseInt(P[1],16),w>126&&w<=255&&P[0].indexOf("x")===0)return O;if(w>=0&&w<32){B+="\\"+P[0];continue}else w===34||w===39||w===92?B+="\\"+String.fromCharCode(w):B+=String.fromCharCode(w)}return B}x.prototype._read_string_recursive=function(O,B,w){var W,P;O==="'"?P=this.__patterns.single_quote:O==='"'?P=this.__patterns.double_quote:O==="`"?P=this.__patterns.template_text:O==="}"&&(P=this.__patterns.template_expression);for(var z=P.read(),Q="";this._input.hasNext();){if(Q=this._input.next(),Q===O||!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()):w&&(w==="${"&&Q==="$"&&this._input.peek()==="{"&&(Q+=this._input.next()),w===Q&&(O==="`"?Q+=this._read_string_recursive("}",B,"`"):Q+=this._read_string_recursive("`",B,"${"),this._input.hasNext()&&(Q+=this._input.next())));Q+=P.read(),z+=Q}return z},R.exports.Tokenizer=x,R.exports.TOKEN=i,R.exports.positionable_operators=g.slice(),R.exports.line_starters=r.slice()},function(R){var A=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&&!(A&&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&&A&&(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,A,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 A(y){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=y}A.prototype.restart=function(){this.__position=0},A.prototype.isEmpty=function(){return this.__tokens_length===0},A.prototype.hasNext=function(){return this.__position<this.__tokens_length},A.prototype.next=function(){var y=null;return this.hasNext()&&(y=this.__tokens[this.__position],this.__position+=1),y},A.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},A.prototype.add=function(y){this.__parent_token&&(y.parent=this.__parent_token),this.__tokens.push(y),this.__tokens_length+=1},R.exports.TokenStream=A},function(R,A,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 A(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)}A.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},A.prototype.read_match=function(){return this._input.match(this._match_pattern)},A.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},A.prototype.until=function(y){var v=this._create();return v._until_after=!1,v._until_pattern=this._input.get_regexp(y),v._update(),v},A.prototype.starting_with=function(y){var v=this._create();return v._starting_pattern=this._input.get_regexp(y,!0),v._update(),v},A.prototype.matching=function(y){var v=this._create();return v._match_pattern=this._input.get_regexp(y,!0),v._update(),v},A.prototype._create=function(){return new A(this._input,this)},A.prototype._update=function(){},R.exports.Pattern=A},function(R){function A(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")}A.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},A.prototype.readIgnored=function(y){return y.readUntilAfter(this.__directives_end_ignore_pattern)},R.exports.Directives=A},function(R,A,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}],S={};function H(R){var A=S[R];if(A!==void 0)return A.exports;var y=S[R]={exports:{}};return C[R](y,y.exports,H),y.exports}var U=H(0);I=U})();var j=I;!(ae=[],L=function(){return{js_beautify:j}}.apply(we,ae),L!==void 0&&(Ke.exports=L))})()},"6eGT":function(Ke,we,F){"use strict";function ae(L){return null}we.a=ae},"6nfa":function(Ke,we,F){Ke.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(Ke,we,F){"use strict";F.d(we,"e",function(){return H}),F.d(we,"c",function(){return R}),F.d(we,"d",function(){return A}),F.d(we,"a",function(){return v}),F.d(we,"f",function(){return d}),F.d(we,"b",function(){return o});var ae=F("KQm4"),L=F("VTBJ"),I=F("Ff2n"),j=F("Zm9Q"),C=F("Kwbf"),S=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 p=String(T);Object(C.a)(!a.has(p)||T===null||T===void 0,"Same 'key' exist in the Tree: ".concat(p)),a.set(p,!0),s(_,"".concat(t).concat(p," > "))})}s(n)}function R(n){function a(s){var e=Object(j.a)(s);return e.map(function(t){if(!Object(S.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,p=Object(I.a)(T,["children"]),E=Object(L.a)({key:i},p),g=a(_);return g.length&&(E.children=g),E}).filter(function(t){return t})}return a(n)}function A(){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(_,p){var E=Object(S.h)(T?T.pos:"0",p),g=H(_.key,E),h=Object(L.a)(Object(L.a)({},_),{},{parent:T,pos:E,children:null,data:_,isStart:[].concat(Object(ae.a)(T?T.isStart:[]),[p===0]),isEnd:[].concat(Object(ae.a)(T?T.isEnd:[]),[p===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 p=i?i.children:n,E=i?Object(S.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)}p&&p.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={},_={},p={posEntities:T,keyEntities:_};return s&&(p=s(p)||p),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,p)},i),t&&t(p),p}function d(n,a){var s=a.expandedKeys,e=a.selectedKeys,t=a.loadedKeys,i=a.loadingKeys,T=a.checkedKeys,_=a.halfCheckedKeys,p=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:p===n&&E===0,dragOverGapTop:p===n&&E===-1,dragOverGapBottom:p===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,p=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:p,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(Ke,we,F){Ke.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(Ke,we,F){Ke.exports={button:"button___1wy9m"}},"8mKB":function(Ke,we,F){"use strict";var ae=F("rePB"),L=F("1OyB"),I=F("vuIU"),j=F("Ji7U"),C=F("md7G"),S=F("foSv"),H=F("q1tI"),U=F.n(H),R=F("m+aA"),A=F("TSYQ"),y=F.n(A),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(S.a)(u),c;if(r){var x=Object(S.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,O=x.index;D(c,O)},f.onClick=function(c){var x=f.props,D=x.onClick,O=x.index;D(c,O)},f.onKeyDown=function(c){var x=f.props,D=x.onClick,O=x.index;c.keyCode===13&&D(c,O)},f}return Object(I.a)(l,[{key:"getClassName",value:function(){var c=this.props,x=c.prefixCls,D=c.index,O=c.value,B=c.allowHalf,w=c.focused,W=D+1,P=x;return O===0&&D===0&&w?P+=" ".concat(x,"-focused"):B&&O+.5>=W&&O<W?(P+=" ".concat(x,"-half ").concat(x,"-active"),w&&(P+=" ".concat(x,"-focused"))):(P+=W<=O?" ".concat(x,"-full"):" ".concat(x,"-zero"),W===O&&w&&(P+=" ".concat(x,"-focused"))),P}},{key:"render",value:function(){var c=this.onHover,x=this.onClick,D=this.onKeyDown,O=this.props,B=O.disabled,w=O.prefixCls,W=O.character,P=O.characterRender,z=O.index,Q=O.count,re=O.value,le=typeof W=="function"?W(this.props):W,be=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>z?"true":"false","aria-posinset":z+1,"aria-setsize":Q,tabIndex:B?-1:0},U.a.createElement("div",{className:"".concat(w,"-first")},le),U.a.createElement("div",{className:"".concat(w,"-second")},le)));return P&&(be=P(be,this.props)),be}}]),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(ae.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(S.a)(u),c;if(r){var x=Object(S.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 p(){}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,O){var B=c.props.onHoverChange,w=c.getStarValue(O,D.pageX),W=c.state.cleanedValue;w!==W&&c.setState({hoverValue:w,cleanedValue:null}),B(w)},c.onMouseLeave=function(){var D=c.props.onHoverChange;c.setState({hoverValue:void 0,cleanedValue:null}),D(void 0)},c.onClick=function(D,O){var B=c.props.allowClear,w=c.state.value,W=c.getStarValue(O,D.pageX),P=!1;B&&(P=W===w),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 O=D.keyCode,B=c.props,w=B.count,W=B.allowHalf,P=B.onKeyDown,z=B.direction,Q=z==="rtl",re=c.state.value;O===v.a.RIGHT&&re<w&&!Q?(W?re+=.5:re+=1,c.changeValue(re),D.preventDefault()):O===v.a.LEFT&&re>0&&!Q||O===v.a.RIGHT&&re>0&&Q?(W?re-=.5:re-=1,c.changeValue(re),D.preventDefault()):O===v.a.LEFT&&re<w&&Q&&(W?re+=.5:re+=1,c.changeValue(re),D.preventDefault()),P&&P(D)},c.saveRef=function(D){return function(O){c.stars[D]=O}},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,O=D.allowHalf,B=D.direction,w=B==="rtl",W=c+1;if(O){var P=this.getStarDOM(c),z=n(P),Q=P.clientWidth;(w&&x-z>Q/2||!w&&x-z<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,O=c.style,B=c.prefixCls,w=c.disabled,W=c.className,P=c.character,z=c.characterRender,Q=c.tabIndex,re=c.direction,le=this.state,be=le.value,ye=le.hoverValue,ie=le.focused,xe=[],Ae=w?"".concat(B,"-disabled"):"",fe=0;fe<x;fe+=1)xe.push(U.a.createElement(e,{ref:this.saveRef(fe),index:fe,count:x,disabled:w,prefixCls:"".concat(B,"-star"),allowHalf:D,value:ye===void 0?be:ye,onClick:this.onClick,onHover:this.onHover,key:fe,character:P,characterRender:z,focused:ie}));var Z=y()(B,Ae,W,Object(ae.a)({},"".concat(B,"-rtl"),re==="rtl"));return U.a.createElement("ul",{className:Z,style:O,onMouseLeave:w?null:this.onMouseLeave,tabIndex:w?-1:Q,onFocus:w?null:this.onFocus,onBlur:w?null:this.onBlur,onKeyDown:w?null:this.onKeyDown,ref:this.saveRate,role:"radiogroup"},xe)}}],[{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:p,character:"\u2605",onHoverChange:p,tabIndex:0,direction:"ltr"};var g=E,h=we.a=g},"9Bee":function(Ke,we,F){"use strict";var ae=F("DYRE"),L=F("zeV3"),I=F("+L6B"),j=F("2/Rp"),C=F("k1fw"),S=F("9og8"),H=F("tJVT"),U=F("WmNS"),R=F.n(U),A=F("q1tI"),y=F.n(A),v=F("vg9a"),d=F("DlQD"),o=F.n(d),n=F("rUJ1");function a(N,m){var b=N.match(/^(\s+)(?:```)/);if(b===null)return m;var M=b[1];return m.split(`
|
|
`).map(function(G){var k=G.match(/^\s+/);if(k===null)return G;var he=Object(H.a)(k,1),je=he[0];return je.length>=M.length?G.slice(M.length):G}).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 p(N,m,b,M){if(m>=N.length||N[m].level<=b)return m;var G=N[m];M.push("<li><a href='#"+G.anchor+"'>"+G.text+"</a>"),m++;var k=[];return m=p(N,m,G.level,k),k.length>0&&(M.push("<ul>"),k.forEach(function(he){M.push(he)}),M.push("</ul>")),M.push("</li>"),m=p(N,m,b,M),m}function E(){return p(s,0,0,e),e.push("</ul>"),e.join("")}var g={heading:function(m){var b=i.exec(m);if(b)return{type:"heading",raw:b[0],depth:b[1].length,text:b[2]}},fences:function(m){var b=this.rules.block.fences.exec(m);if(b){var M=b[0],G=a(M,b[3]||""),k=b[2]?b[2].trim():b[2];if(["latex","katex","math"].indexOf(k)>=0){var he=r(),je=G;G=he,l[he]={type:"block",expression:je}}return{type:"code",raw:M,lang:k,text:G}}}},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(m,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 O=t.paragraph;t.paragraph=function(N){return O(x(N))};var B=t.tablecell;t.tablecell=function(N,m){return B(x(N),m)},t.code=function(N,m,b){var M=(m||"").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(m,'">').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,m,b){var M=this.options.headerPrefix+b.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:M,level:m,text:N}),"<h"+m+' id="'+M+'">'+N+"</h"+m+">"},o.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),o.a.use({tokenizer:g,renderer:t});var w=o.a,W=F("SJMd"),P=F("ulZh"),z=F.n(P),Q=F("m3rI"),re=F("Oy/b"),le=F("p5ED"),be=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 ye=function(N,m){return(ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,M){b.__proto__=M}||function(b,M){for(var G in M)Object.prototype.hasOwnProperty.call(M,G)&&(b[G]=M[G])})(N,m)};function ie(N,m){function b(){this.constructor=N}ye(N,m),N.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}function xe(N,m,b,M){return new(b||(b=Promise))(function(G,k){function he(gt){try{st(M.next(gt))}catch(Ge){k(Ge)}}function je(gt){try{st(M.throw(gt))}catch(Ge){k(Ge)}}function st(gt){var Ge;gt.done?G(gt.value):(Ge=gt.value,Ge instanceof b?Ge:new b(function(At){At(Ge)})).then(he,je)}st((M=M.apply(N,m||[])).next())})}function Ae(N,m){var b,M,G,k,he={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return k={next:je(0),throw:je(1),return:je(2)},typeof Symbol=="function"&&(k[Symbol.iterator]=function(){return this}),k;function je(st){return function(gt){return function(Ge){if(b)throw new TypeError("Generator is already executing.");for(;he;)try{if(b=1,M&&(G=2&Ge[0]?M.return:Ge[0]?M.throw||((G=M.return)&&G.call(M),0):M.next)&&!(G=G.call(M,Ge[1])).done)return G;switch(M=0,G&&(Ge=[2&Ge[0],G.value]),Ge[0]){case 0:case 1:G=Ge;break;case 4:return he.label++,{value:Ge[1],done:!1};case 5:he.label++,M=Ge[1],Ge=[0];continue;case 7:Ge=he.ops.pop(),he.trys.pop();continue;default:if(!(G=he.trys,(G=G.length>0&&G[G.length-1])||Ge[0]!==6&&Ge[0]!==2)){he=0;continue}if(Ge[0]===3&&(!G||Ge[1]>G[0]&&Ge[1]<G[3])){he.label=Ge[1];break}if(Ge[0]===6&&he.label<G[1]){he.label=G[1],G=Ge;break}if(G&&he.label<G[2]){he.label=G[2],he.ops.push(Ge);break}G[2]&&he.ops.pop(),he.trys.pop();continue}Ge=m.call(N,he)}catch(At){Ge=[6,At],M=0}finally{b=G=0}if(5&Ge[0])throw Ge[1];return{value:Ge[0]?Ge[1]:void 0,done:!0}}([st,gt])}}}function fe(){for(var N=0,m=0,b=arguments.length;m<b;m++)N+=arguments[m].length;var M=Array(N),G=0;for(m=0;m<b;m++)for(var k=arguments[m],he=0,je=k.length;he<je;he++,G++)M[G]=k[he];return M}var Z=function(){function N(){}return N.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},N.setAttributes=function(m,b){for(var M=0,G=b;M<G.length;M++){var k=G[M],he=k[0],je=k[1];m.setAttribute(he,je)}},N.createRect=function(m,b,M){var G=document.createElementNS("http://www.w3.org/2000/svg","rect");return G.setAttribute("width",m.toString()),G.setAttribute("height",b.toString()),M&&N.setAttributes(G,M),G},N.createLine=function(m,b,M,G,k){var he=document.createElementNS("http://www.w3.org/2000/svg","line");return he.setAttribute("x1",m.toString()),he.setAttribute("y1",b.toString()),he.setAttribute("x2",M.toString()),he.setAttribute("y2",G.toString()),k&&N.setAttributes(he,k),he},N.createPolygon=function(m,b){var M=document.createElementNS("http://www.w3.org/2000/svg","polygon");return M.setAttribute("points",m),b&&N.setAttributes(M,b),M},N.createCircle=function(m,b){var M=document.createElementNS("http://www.w3.org/2000/svg","circle");return M.setAttribute("cx",(m/2).toString()),M.setAttribute("cy",(m/2).toString()),M.setAttribute("r",m.toString()),b&&N.setAttributes(M,b),M},N.createEllipse=function(m,b,M){var G=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return G.setAttribute("cx",(m/2).toString()),G.setAttribute("cy",(b/2).toString()),G.setAttribute("rx",(m/2).toString()),G.setAttribute("ry",(b/2).toString()),M&&N.setAttributes(G,M),G},N.createGroup=function(m){var b=document.createElementNS("http://www.w3.org/2000/svg","g");return m&&N.setAttributes(b,m),b},N.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},N.createMarker=function(m,b,M,G,k,he,je){var st=document.createElementNS("http://www.w3.org/2000/svg","marker");return N.setAttributes(st,[["id",m],["orient",b],["markerWidth",M.toString()],["markerHeight",G.toString()],["refX",k.toString()],["refY",he.toString()]]),st.appendChild(je),st},N.createText=function(m){var b=document.createElementNS("http://www.w3.org/2000/svg","text");return b.setAttribute("x","0"),b.setAttribute("y","0"),m&&N.setAttributes(b,m),b},N.createTSpan=function(m,b){var M=document.createElementNS("http://www.w3.org/2000/svg","tspan");return M.textContent=m,b&&N.setAttributes(M,b),M},N.createImage=function(m){var b=document.createElementNS("http://www.w3.org/2000/svg","image");return m&&N.setAttributes(b,m),b},N.createPoint=function(m,b){var M=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return M.x=m,M.y=b,M},N.createPath=function(m,b){var M=document.createElementNS("http://www.w3.org/2000/svg","path");return M.setAttribute("d",m),b&&N.setAttributes(M,b),M},N}(),Ue=function(){function N(){}return N.addKey=function(m){N.key=m},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}(),$e=function(){function N(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return N.prototype.rasterize=function(m,b,M){var G=this;return new Promise(function(k){var he=M!==void 0?M:document.createElement("canvas");m===null&&(G.markersOnly=!0,G.naturalSize=!1);var je=document.createElementNS("http://www.w3.org/2000/svg","svg");je.setAttribute("xmlns","http://www.w3.org/2000/svg"),je.setAttribute("width",b.width.baseVal.valueAsString),je.setAttribute("height",b.height.baseVal.valueAsString),je.setAttribute("viewBox","0 0 "+b.viewBox.baseVal.width.toString()+" "+b.viewBox.baseVal.height.toString()),je.innerHTML=b.innerHTML,G.naturalSize===!0?(je.width.baseVal.value=m.naturalWidth,je.height.baseVal.value=m.naturalHeight):G.width!==void 0&&G.height!==void 0&&(je.width.baseVal.value=G.width,je.height.baseVal.value=G.height),he.width=je.width.baseVal.value,he.height=je.height.baseVal.value;var st=je.outerHTML,gt=he.getContext("2d");G.markersOnly!==!0&>.drawImage(m,0,0,he.width,he.height);var Ge=window.URL,At=new Image(he.width,he.height);At.setAttribute("crossOrigin","anonymous");var Lt=new Blob([st],{type:"image/svg+xml"}),en=Ge.createObjectURL(Lt);At.onload=function(){gt.drawImage(At,0,0),Ge.revokeObjectURL(en);var In=he.toDataURL(G.imageType,G.imageQuality);k(In)},At.src=en})},N}(),tt=function(){},Qe=function(){function N(m){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+m+"_"}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(m){return this.styleSheet===void 0&&this.addStyleSheet(),m.name=""+this.classNamePrefix+m.localName,this.classes.push(m),this.styleSheet.sheet.insertRule("."+m.name+" {"+m.style+"}",this.styleSheet.sheet.cssRules.length),m},N.prototype.addRule=function(m){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(m),this.styleSheet.sheet.insertRule(m.selector+" {"+m.style+"}",this.styleSheet.sheet.cssRules.length)},N.prototype.addStyleSheet=function(){var m;this.styleSheet=document.createElement("style"),((m=this.styleSheetRoot)!==null&&m!==void 0?m:document.head).appendChild(this.styleSheet),this.addRule(new it("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Pe("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Pe("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},N.prototype.removeStyleSheet=function(){var m;this.styleSheet&&(((m=this.styleSheetRoot)!==null&&m!==void 0?m:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},N}(),it=function(N,m){this.selector=N,this.style=m},Pe=function(N,m){this.localName=N,this.style=m},We=function(){function N(m,b,M,G,k){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=m,this.displayMode=b,this.markerItems=M,this.uiStyleSettings=G,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(m){var b=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=m,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 G=document.createElement("div");G.className=this.toolbarBlockStyleClass.name,G.style.whiteSpace="nowrap",G.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(G),this.addActionButton(G,'<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(G,'<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(m){this.buttonClickListeners.push(m)},N.prototype.removeButtonClickListener=function(m){this.buttonClickListeners.indexOf(m)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(m),1)},N.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},N.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var m=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<m||b===m&&this.markerButtons.length-1===m?this.markerButtonBlock.appendChild(this.markerButtons[b]):(b===m&&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 m=this;this.buttons.forEach(function(b){b.className=b.className.replace(m.uiStyleSettings.toolbarButtonStyleColorsClassName?m.uiStyleSettings.toolbarButtonStyleColorsClassName:m.toolbarButtonStyleColorsClass.name,"").trim(),b.className=b.className.replace(m.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?m.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:m.toolbarActiveButtonStyleColorsClass.name,"").trim(),b.className+=" "+(m.uiStyleSettings.toolbarButtonStyleColorsClassName?m.uiStyleSettings.toolbarButtonStyleColorsClassName:m.toolbarButtonStyleColorsClass.name)})},N.prototype.addActionButton=function(m,b,M){var G=this,k=document.createElement("div");switch(k.className=""+this.toolbarButtonStyleClass.name,k.innerHTML=b,k.setAttribute("data-action",M),k.addEventListener("click",function(){G.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}m.appendChild(k),this.buttons.push(k)},N.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Pe("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 Pe("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Pe("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Pe("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 Pe("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var m=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Pe("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*m)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*m)+`px;
|
|
padding: `+m+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Pe("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Pe("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},N.prototype.markerToolbarButtonClicked=function(m,b){this.setActiveButton(m),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(M){return M("marker",b)}),this.markerButtonOverflowBlock.style.display="none"},N.prototype.actionToolbarButtonClicked=function(m,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(m){this.resetButtonStyles(),m.className=m.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),m.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},N.prototype.setActiveMarkerButton=function(m){var b=this.markerButtons.find(function(M){return M.getAttribute("data-type-name")===m});b&&this.setActiveButton(b)},N.prototype.setCurrentMarker=function(m){var b=this;this.currentMarker=m,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(m,b,M,G){this.panels=[],this.panelButtons=[],this.markerjsContainer=m,this.displayMode=b,this.uiStyleSettings=M,this.styles=G,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return N.prototype.addStyles=function(){var m;this.toolboxStyleClass=this.styles.addClass(new Pe("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 Pe("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var b=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Pe("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Pe("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Pe("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 Pe("toolbox-panel-row_colors",`
|
|
background-color: `+((m=this.uiStyleSettings.toolboxBackgroundColor)!==null&&m!==void 0?m:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Pe("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 Pe("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Pe("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new it("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new it("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},N.prototype.show=function(m){var b;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=m,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(m){var b,M,G=this;this.panels=m,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=G.uiStyleSettings;var je=document.createElement("div");je.className=G.toolboxButtonStyleClass.name+" "+((he=G.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&he!==void 0?he:G.toolboxButtonStyleColorsClass.name),je.innerHTML=k.icon,je.title=k.title,je.addEventListener("click",function(){G.panelButtonClick(k)}),G.panelButtons.push(je),G.buttonRow.appendChild(je)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},N.prototype.panelButtonClick=function(m){var b=this,M=-1;if(m!==this.activePanel){M=this.panels.indexOf(m),this.panelRow.innerHTML="";var G=m.getUi();G.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(G),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=m}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 je,st;k.className=b.toolboxButtonStyleClass.name+" "+(he===M?""+((je=b.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&je!==void 0?je:b.toolboxActiveButtonStyleColorsClass.name):""+((st=b.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&st!==void 0?st:b.toolboxButtonStyleColorsClass.name))})},N}(),et=function(N,m){this.title=N,this.icon=m},Ye=function(N){function m(b,M,G,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=G,he.setCurrentColor=he.setCurrentColor.bind(he),he.getColorBox=he.getColorBox.bind(he),he}return ie(m,N),m.prototype.getUi=function(){var b=this,M=document.createElement("div");return M.style.overflow="hidden",M.style.whiteSpace="nowrap",this.colors.forEach(function(G){var k=b.getColorBox(G);M.appendChild(k),b.colorBoxes.push(k)}),M},m.prototype.getColorBox=function(b){var M=this,G=this.uiStyleSettings.toolbarHeight/4,k=this.uiStyleSettings.toolbarHeight-G,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 je=document.createElement("div");return je.style.display="inline-block",je.style.width=k-2+"px",je.style.height=k-2+"px",je.style.backgroundColor=b,je.style.borderRadius=k/2+"px",b==="transparent"&&(je.style.fill=this.uiStyleSettings.toolboxAccentColor,je.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(je),he},m.prototype.setCurrentColor=function(b,M){var G=this;this.currentColor=b,this.colorBoxes.forEach(function(k){k.style.borderColor=k===M?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(b)},m}(et),ze=function(){function N(m,b,M){this._state="new",this._isSelected=!1,this._container=m,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(m){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(m,b){},N.prototype.dblClick=function(m,b){},N.prototype.manipulate=function(m){},N.prototype.pointerUp=function(m){this.stateChanged()},N.prototype.dispose=function(){},N.prototype.addMarkerVisualToContainer=function(m){this.container.childNodes.length>0?this.container.insertBefore(m,this.container.childNodes[0]):this.container.appendChild(m)},N.prototype.getState=function(){return{typeName:N.typeName,state:this.state,notes:this.notes}},N.prototype.restoreState=function(m){this._state=m.state,this.notes=m.notes},N.prototype.scale=function(m,b){},N.prototype.colorChanged=function(m){this.onColorChanged&&this.onColorChanged(m),this.stateChanged()},N.prototype.fillColorChanged=function(m){this.onFillColorChanged&&this.onFillColorChanged(m),this.stateChanged()},N.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var m=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),m.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(m)&&this.onStateChanged(this)}},N.typeName="MarkerBase",N}(),He=function(){function N(){this.findGripByVisual=this.findGripByVisual.bind(this)}return N.prototype.findGripByVisual=function(m){return this.topLeft.ownsTarget(m)?this.topLeft:this.topCenter.ownsTarget(m)?this.topCenter:this.topRight.ownsTarget(m)?this.topRight:this.centerLeft.ownsTarget(m)?this.centerLeft:this.centerRight.ownsTarget(m)?this.centerRight:this.bottomLeft.ownsTarget(m)?this.bottomLeft:this.bottomCenter.ownsTarget(m)?this.bottomCenter:this.bottomRight.ownsTarget(m)?this.bottomRight:void 0},N}(),ft=function(){function N(){this.GRIP_SIZE=10,this.visual=Z.createGroup(),this.visual.appendChild(Z.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Z.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return N.prototype.ownsTarget=function(m){return m===this.visual||m===this.visual.childNodes[0]||m===this.visual.childNodes[1]},N}(),ht=function(){function N(){}return N.toITransformMatrix=function(m){return{a:m.a,b:m.b,c:m.c,d:m.d,e:m.e,f:m.f}},N.toSVGMatrix=function(m,b){return m.a=b.a,m.b=b.b,m.c=b.c,m.d=b.d,m.e=b.e,m.f=b.f,m},N}(),lt=function(N){function m(b,M,G){var k=N.call(this,b,M,G)||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(Z.createTransform()),k.setupControlBox(),k}return ie(m,N),Object.defineProperty(m.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"visual",{get:function(){return this._visual},set:function(b){this._visual=b;var M=Z.createTransform();this._visual.transform.baseVal.appendItem(M)},enumerable:!1,configurable:!0}),m.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))},m.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 G=this.unrotatePoint(b);if(this.manipulationStartX=G.x,this.manipulationStartY=G.y,this.offsetX=G.x-this.left,this.offsetY=G.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"},m.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)},m.prototype.moveVisual=function(b){this.visual.style.transform="translate("+b.x+"px, "+b.y+"px)"},m.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)},m.prototype.resize=function(b){var M=this.manipulationStartLeft,G=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,G=this.manipulationStartWidth+this.manipulationStartLeft-M;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:G=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}G>=0?(this.left=M,this.width=G):(this.left=M+G,this.width=-G),he>=0?(this.top=k,this.height=he):(this.top=k+he,this.height=-he),this.setSize()},m.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},m.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()}},m.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)},m.prototype.rotatePoint=function(b){if(this.rotationAngle===0)return b;var M=this.container.getCTM(),G=Z.createPoint(b.x,b.y);return{x:(G=G.matrixTransform(M)).x,y:G.y}},m.prototype.unrotatePoint=function(b){if(this.rotationAngle===0)return b;var M=this.container.getCTM();M=M.inverse();var G=Z.createPoint(b.x,b.y);return{x:(G=G.matrixTransform(M)).x,y:G.y}},m.prototype.select=function(){N.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},m.prototype.deselect=function(){N.prototype.deselect.call(this),this.controlBox.style.display="none"},m.prototype.setupControlBox=function(){this.controlBox=Z.createGroup();var b=Z.createTransform();b.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(b),this.container.appendChild(this.controlBox),this.controlRect=Z.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=Z.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 He,this.addControlGrips(),this.controlBox.style.display="none"},m.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()},m.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()},m.prototype.createGrip=function(){var b=new ft;return b.visual.transform.baseVal.appendItem(Z.createTransform()),this.controlBox.appendChild(b.visual),b},m.prototype.positionGrips=function(){var b=this.controlGrips.topLeft.GRIP_SIZE,M=-b/2,G=M,k=(this.width+this.CB_DISTANCE)/2-b/2,he=(this.height+this.CB_DISTANCE)/2-b/2,je=this.height+this.CB_DISTANCE-b/2,st=this.width+this.CB_DISTANCE-b/2;this.positionGrip(this.controlGrips.topLeft.visual,M,G),this.positionGrip(this.controlGrips.topCenter.visual,k,G),this.positionGrip(this.controlGrips.topRight.visual,st,G),this.positionGrip(this.controlGrips.centerLeft.visual,M,he),this.positionGrip(this.controlGrips.centerRight.visual,st,he),this.positionGrip(this.controlGrips.bottomLeft.visual,M,je),this.positionGrip(this.controlGrips.bottomCenter.visual,k,je),this.positionGrip(this.controlGrips.bottomRight.visual,st,je),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,k,G-3*this.CB_DISTANCE)},m.prototype.positionGrip=function(b,M,G){var k=b.transform.baseVal.getItem(0);k.setTranslate(M,G),b.transform.baseVal.replaceItem(k,0)},m.prototype.hideControlBox=function(){this.controlBox.style.display="none"},m.prototype.showControlBox=function(){this.controlBox.style.display=""},m.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ht.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ht.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},N.prototype.getState.call(this))},m.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(ht.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,M.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ht.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,M.containerTransformMatrix))},m.prototype.scale=function(b,M){N.prototype.scale.call(this,b,M);var G=this.rotatePoint({x:this.left,y:this.top}),k=this.unrotatePoint({x:G.x*b,y:G.y*M});this.left=k.x,this.top=k.y,this.width=this.width*b,this.height=this.height*M,this.adjustControlBox()},m}(ze),at=function(N){function m(b,M,G){var k=N.call(this,b,M,G)||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 ie(m,N),m.prototype.ownsTarget=function(b){return!(!N.prototype.ownsTarget.call(this,b)&&b!==this.visual)},m.prototype.createVisual=function(){this.visual=Z.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)},m.prototype.pointerDown=function(b,M){N.prototype.pointerDown.call(this,b,M),this.state==="new"&&(this.createVisual(),this.moveVisual(b),this._state="creating")},m.prototype.manipulate=function(b){N.prototype.manipulate.call(this,b)},m.prototype.resize=function(b){N.prototype.resize.call(this,b),this.setSize()},m.prototype.setSize=function(){N.prototype.setSize.call(this),Z.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},m.prototype.pointerUp=function(b){N.prototype.pointerUp.call(this,b),this.setSize()},m.prototype.setStrokeColor=function(b){this.strokeColor=b,this.visual&&Z.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(b),this.stateChanged()},m.prototype.setFillColor=function(b){this.fillColor=b,this.visual&&Z.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},m.prototype.setStrokeWidth=function(b){this.strokeWidth=b,this.visual&&Z.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},m.prototype.setStrokeDasharray=function(b){this.strokeDasharray=b,this.visual&&Z.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},m.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))},m.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()},m.prototype.scale=function(b,M){N.prototype.scale.call(this,b,M),this.setSize()},m.title="Rectangle marker",m}(lt),mt=function(N){function m(b,M,G,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=G,he.setCurrentWidth=he.setCurrentWidth.bind(he),he}return ie(m,N),m.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(G){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=G===b.currentWidth?b.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){b.setCurrentWidth(G,k)}),M.appendChild(k);var he=document.createElement("div");he.innerText=G.toString(),he.style.marginRight="5px",k.appendChild(he);var je=document.createElement("div");je.style.minHeight="20px",je.style.flexGrow="2",je.style.display="flex",je.style.alignItems="center";var st=document.createElement("hr");st.style.minWidth="20px",st.style.border="0px",st.style.borderTop=G+"px solid "+b.uiStyleSettings.toolboxColor,st.style.flexGrow="2",je.appendChild(st),k.appendChild(je),b.widthBoxes.push(k)}),M},m.prototype.setCurrentWidth=function(b,M){var G=this;this.currentWidth=b,this.widthBoxes.forEach(function(k){k.style.borderColor=k===M?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},m}(et),pt=function(N){function m(b,M,G,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=G,he.setCurrentStyle=he.setCurrentStyle.bind(he),he}return ie(m,N),m.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(G){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=G===b.currentStyle?b.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){b.setCurrentStyle(G,k)}),M.appendChild(k);var he=document.createElement("div");he.style.minHeight="20px",he.style.flexGrow="2",he.style.overflow="hidden";var je=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+b.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(G!==""?'stroke-dasharray="'+G+'"':"")+` />
|
|
</svg>`;he.innerHTML=je,k.appendChild(he),b.styleBoxes.push(k)}),M},m.prototype.setCurrentStyle=function(b,M){var G=this;this.currentStyle=b,this.styleBoxes.forEach(function(k){k.style.borderColor=k===M?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},m}(et),me=function(N){function m(b,M,G){var k=N.call(this,b,M,G)||this;return k.strokeColor=G.defaultColor,k.strokeWidth=G.defaultStrokeWidth,k.strokeDasharray=G.defaultStrokeDasharray,k.strokePanel=new Ye("Line color",G.defaultColorSet,G.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.strokeWidthPanel=new mt("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new pt("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k}return ie(m,N),Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var b=N.prototype.getState.call(this);return b.typeName=m.typeName,b},m.typeName="FrameMarker",m.title="Frame marker",m.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',m}(at),Ce=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 m(b,M,G){var k=N.call(this,b,M,G)||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 ie(m,N),m.prototype.ownsTarget=function(b){return!!N.prototype.ownsTarget.call(this,b)||!(!this.grip1.ownsTarget(b)&&!this.grip2.ownsTarget(b))},m.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")},m.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)},m.prototype.adjustVisual=function(){},m.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)},m.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()},m.prototype.select=function(){N.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},m.prototype.deselect=function(){N.prototype.deselect.call(this),this.controlBox.style.display="none"},m.prototype.setupControlBox=function(){this.controlBox=Z.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},m.prototype.adjustControlBox=function(){this.positionGrips()},m.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},m.prototype.createGrip=function(){var b=new ft;return b.visual.transform.baseVal.appendItem(Z.createTransform()),this.controlBox.appendChild(b.visual),b},m.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)},m.prototype.positionGrip=function(b,M,G){var k=b.transform.baseVal.getItem(0);k.setTranslate(M,G),b.transform.baseVal.replaceItem(k,0)},m.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},N.prototype.getState.call(this))},m.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},m.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()},m}(ze),Ne=function(N){function m(b,M,G){var k=N.call(this,b,M,G)||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=G.defaultColor,k.strokeWidth=G.defaultStrokeWidth,k.strokeDasharray=G.defaultStrokeDasharray,k.strokePanel=new Ye("Line color",G.defaultColorSet,G.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.strokeWidthPanel=new mt("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new pt("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k}return ie(m,N),m.prototype.ownsTarget=function(b){return!(!N.prototype.ownsTarget.call(this,b)&&b!==this.visual&&b!==this.selectorLine&&b!==this.visibleLine)},m.prototype.createVisual=function(){this.visual=Z.createGroup(),this.selectorLine=Z.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Z.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)},m.prototype.pointerDown=function(b,M){N.prototype.pointerDown.call(this,b,M),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},m.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()),Z.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Z.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Z.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},m.prototype.setStrokeColor=function(b){this.strokeColor=b,this.adjustVisual(),this.colorChanged(b)},m.prototype.setStrokeWidth=function(b){this.strokeWidth=b,this.adjustVisual()},m.prototype.setStrokeDasharray=function(b){this.strokeDasharray=b,this.adjustVisual(),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var b=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},N.prototype.getState.call(this));return b.typeName=m.typeName,b},m.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()},m.typeName="LineMarker",m.title="Line marker",m.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',m}(De),Ee=function(N){function m(b,M,G,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=G,he.setCurrentFont=he.setCurrentFont.bind(he),he}return ie(m,N),m.prototype.getUi=function(){var b=this,M=document.createElement("div");return M.style.overflow="hidden",M.style.flexGrow="2",this.fonts.forEach(function(G){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=G===b.currentFont?b.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){b.setCurrentFont(G,k)}),M.appendChild(k);var he=document.createElement("div");he.style.display="flex",he.style.minHeight="20px",he.style.flexGrow="2",he.style.fontFamily=G,he.style.overflow="hidden";var je=document.createElement("div");je.style.whiteSpace="nowrap",je.style.overflow="hidden",je.style.textOverflow="ellipsis",je.innerHTML="The quick brown fox jumps over the lazy dog",he.appendChild(je),k.appendChild(he),b.fontBoxes.push(k)}),M},m.prototype.setCurrentFont=function(b,M){var G=this;this.currentFont=b,this.fontBoxes.forEach(function(k){k.style.borderColor=k===M?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},m}(et),Le=function(N){function m(b,M,G){var k=N.call(this,b,M,G)||this;return k.color="transparent",k.padding=5,k.DEFAULT_TEXT="your text here",k.text=k.DEFAULT_TEXT,k.isMoved=!1,k.color=G.defaultColor,k.fontFamily=G.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 Ye("Color",G.defaultColorSet,G.defaultColor),k.colorPanel.onColorChanged=k.setColor,k.fontFamilyPanel=new Ee("Font",G.defaultFontFamilies,G.defaultFontFamily),k.fontFamilyPanel.onFontChanged=k.setFont,k}return ie(m,N),m.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(G){G===b&&(M=!0)}),M},m.prototype.createVisual=function(){this.visual=Z.createGroup(),this.bgRectangle=Z.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Z.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Z.createTransform()),this.textElement.transform.baseVal.appendItem(Z.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},m.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")},m.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(Z.createTSpan(M.trim()===""?" ":M.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},m.prototype.getTextScale=function(){var b=this.textElement.getBBox(),M=1;if(b.width>0&&b.height>0){var G=(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(G,k)}return M},m.prototype.getTextPosition=function(b){var M=this.textElement.getBBox(),G=0,k=0;return M.width>0&&M.height>0&&(G=(this.width-M.width*b)/2,k=this.height/2-M.height*b/2),{x:G,y:k}},m.prototype.sizeText=function(){var b=this.textElement.getBBox(),M=this.getTextScale(),G=this.getTextPosition(M);G.y-=b.y*M,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+G.x+"px, "+G.y+"px) scale("+M+", "+M+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(G.x,G.y),this.textElement.transform.baseVal.getItem(1).setScale(M,M))},m.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)},m.prototype.resize=function(b){N.prototype.resize.call(this,b),this.isMoved=!0,this.setSize(),this.sizeText()},m.prototype.setSize=function(){N.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Z.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Z.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},m.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},m.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 G=M.clipboardData.getData("text"),k=window.getSelection();if(!k.rangeCount)return!1;k.deleteFromDocument(),k.getRangeAt(0).insertNode(document.createTextNode(G)),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")},m.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}),G=this.textElement.getBBox(),k={x:G.width*b,y:G.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"}},m.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()},m.prototype.select=function(){N.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},m.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),N.prototype.deselect.call(this)},m.prototype.dblClick=function(b,M){N.prototype.dblClick.call(this,b,M),this.showTextEditor()},m.prototype.setColor=function(b){this.textElement&&Z.setAttributes(this.textElement,[["fill",b]]),this.color=b,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(b)},m.prototype.setFont=function(b){this.textElement&&Z.setAttributes(this.textElement,[["font-family",b]]),this.fontFamily=b,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},m.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},m.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),m.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=m.typeName,b},m.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()},m.prototype.scale=function(b,M){N.prototype.scale.call(this,b,M),this.setSize(),this.sizeText(),this.positionTextEditor()},m.typeName="TextMarker",m.title="Text marker",m.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>',m}(lt),ue=function(N){function m(b,M,G){var k=N.call(this,b,M,G)||this;return k.color="transparent",k.lineWidth=3,k.drawing=!1,k.pixelRatio=1,k.color=G.defaultColor,k.lineWidth=G.defaultStrokeWidth,k.pixelRatio=G.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 Ye("Color",G.defaultColorSet,G.defaultColor),k.colorPanel.onColorChanged=k.setColor,k.lineWidthPanel=new mt("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),k.lineWidthPanel.onWidthChanged=k.setLineWidth,k}return ie(m,N),m.prototype.ownsTarget=function(b){return!(!N.prototype.ownsTarget.call(this,b)&&b!==this.visual&&b!==this.drawingImage)},m.prototype.createVisual=function(){this.visual=Z.createGroup(),this.drawingImage=Z.createImage(),this.visual.appendChild(this.drawingImage);var b=Z.createTransform();this.visual.transform.baseVal.appendItem(b),this.addMarkerVisualToContainer(this.visual)},m.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)},m.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)},m.prototype.resize=function(b){N.prototype.resize.call(this,b),Z.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Z.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},m.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)},m.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)},m.prototype.select=function(){this.state==="creating"&&this.finishCreation(),N.prototype.select.call(this)},m.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),N.prototype.deselect.call(this)},m.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],G=M[0],k=M[1],he=M[2],je=M[3],st=!1,gt=0;gt<this.canvasElement.height;gt++)for(var Ge=0;Ge<this.canvasElement.width;Ge++)b.data[gt*this.canvasElement.width*4+4*Ge+3]>0&&(st=!0,gt<k&&(k=gt),Ge<G&&(G=Ge),gt>je&&(je=gt),Ge>he&&(he=Ge));if(st){this.left=G/this.pixelRatio,this.top=k/this.pixelRatio,this.width=(he-G)/this.pixelRatio,this.height=(je-k)/this.pixelRatio;var At=document.createElement("canvas");At.width=he-G,At.height=je-k,At.getContext("2d").putImageData(this.canvasContext.getImageData(G,k,he-G,je-k),0,0),this.drawingImgUrl=At.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},m.prototype.setDrawingImage=function(){Z.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Z.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},m.prototype.setColor=function(b){this.color=b,this.colorChanged(b)},m.prototype.setLineWidth=function(b){this.lineWidth=b},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var b=Object.assign({drawingImgUrl:this.drawingImgUrl},N.prototype.getState.call(this));return b.typeName=m.typeName,b},m.prototype.restoreState=function(b){this.createVisual(),N.prototype.restoreState.call(this,b),this.drawingImgUrl=b.drawingImgUrl,this.setDrawingImage()},m.prototype.scale=function(b,M){N.prototype.scale.call(this,b,M),this.setDrawingImage()},m.typeName="FreehandMarker",m.title="Freehand marker",m.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>',m}(lt),ne=function(N){function m(b,M,G){var k=N.call(this,b,G||'<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 ie(m,N),m.prototype.getUi=function(){var b=this,M=document.createElement("div");M.style.display="flex",M.style.overflow="hidden",M.style.flexGrow="2";for(var G=function(je){var st="both";switch(je){case 0:st="both";break;case 1:st="start";break;case 2:st="end";break;case 3:st="none"}var gt=document.createElement("div");if(gt.style.display="flex",gt.style.flexGrow="2",gt.style.alignItems="center",gt.style.justifyContent="space-between",gt.style.padding="5px",gt.style.borderWidth="2px",gt.style.borderStyle="solid",gt.style.borderColor=st===k.currentType?k.uiStyleSettings.toolboxAccentColor:"transparent",gt.addEventListener("click",function(){b.setCurrentType(st,gt)}),M.appendChild(gt),st==="both"||st==="start"){var Ge=document.createElement("div");Ge.style.display="flex",Ge.style.alignItems="center",Ge.style.minHeight="20px",Ge.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>`,Ge.style.marginLeft="5px",gt.appendChild(Ge)}var At=document.createElement("div");At.style.display="flex",At.style.alignItems="center",At.style.minHeight="20px",At.style.flexGrow="2";var Lt=document.createElement("hr");if(Lt.style.minWidth="20px",Lt.style.border="0px",Lt.style.borderTop="3px solid "+(k.uiStyleSettings!==void 0?k.uiStyleSettings.toolboxColor:"#eeeeee"),Lt.style.flexGrow="2",At.appendChild(Lt),gt.appendChild(At),st==="both"||st==="end"){var en=document.createElement("div");en.style.display="flex",en.style.alignItems="center",en.style.minHeight="20px",en.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>`,en.style.marginRight="5px",gt.appendChild(en)}k.typeBoxes.push(gt)},k=this,he=0;he<4;he++)G(he);return M},m.prototype.setCurrentType=function(b,M){var G=this;this.currentType=b,this.typeBoxes.forEach(function(k){k.style.borderColor=k===M?G.uiStyleSettings!==void 0?G.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},m}(et),te=function(N){function m(b,M,G){var k=N.call(this,b,M,G)||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 ne("Arrow type","end"),k.arrowTypePanel.onArrowTypeChanged=k.setArrowType,k}return ie(m,N),m.prototype.ownsTarget=function(b){return!(!N.prototype.ownsTarget.call(this,b)&&b!==this.arrow1&&b!==this.arrow2)},m.prototype.getArrowPoints=function(b,M){var G=this.arrowBaseWidth+2*this.strokeWidth,k=this.arrowBaseHeight+2*this.strokeWidth;return b-G/2+","+(M+k/2)+" "+b+","+(M-k/2)+" "+(b+G/2)+","+(M+k/2)},m.prototype.createTips=function(){this.arrow1=Z.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Z.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Z.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Z.createTransform()),this.visual.appendChild(this.arrow2)},m.prototype.pointerDown=function(b,M){N.prototype.pointerDown.call(this,b,M),this.state==="creating"&&this.createTips()},m.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",Z.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Z.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 G=this.arrow2.transform.baseVal.getItem(0);G.setRotate(b+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(G,0)}},m.prototype.setArrowType=function(b){this.arrowType=b,this.adjustVisual(),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var b=Object.assign({arrowType:this.arrowType},N.prototype.getState.call(this));return b.typeName=m.typeName,b},m.prototype.restoreState=function(b){N.prototype.restoreState.call(this,b);var M=b;this.arrowType=M.arrowType,this.createTips(),this.adjustVisual()},m.typeName="ArrowMarker",m.title="Arrow marker",m.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',m}(Ne),K=function(N){function m(b,M,G){var k=N.call(this,b,M,G)||this;return k.fillColor=G.defaultFillColor,k.strokeWidth=0,k.fillPanel=new Ye("Color",G.defaultColorSet,G.defaultFillColor),k.fillPanel.onColorChanged=k.setFillColor,k}return ie(m,N),Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var b=N.prototype.getState.call(this);return b.typeName=m.typeName,b},m.typeName="CoverMarker",m.title="Cover marker",m.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',m}(at),Y=function(N){function m(b,M,G,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=G,he.setCurrentOpacity=he.setCurrentOpacity.bind(he),he}return ie(m,N),m.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(G){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=G===b.currentOpacity?b.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){b.setCurrentOpacity(G,k)}),M.appendChild(k);var he=document.createElement("div");he.innerText=100*G+"%",k.appendChild(he),b.opacityBoxes.push(k)}),M},m.prototype.setCurrentOpacity=function(b,M){var G=this;this.currentOpacity=b,this.opacityBoxes.forEach(function(k){k.style.borderColor=k===M?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},m}(et),J=function(N){function m(b,M,G){var k=N.call(this,b,M,G)||this;return k.setOpacity=k.setOpacity.bind(k),k.fillColor=G.defaultHighlightColor,k.strokeWidth=0,k.opacity=G.defaultHighlightOpacity,k.fillPanel=new Ye("Color",G.defaultColorSet,k.fillColor),k.fillPanel.onColorChanged=k.setFillColor,k.opacityPanel=new Y("Opacity",G.defaultOpacitySteps,k.opacity),k.opacityPanel.onOpacityChanged=k.setOpacity,k}return ie(m,N),m.prototype.setOpacity=function(b){this.opacity=b,this.visual&&Z.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var b=N.prototype.getState.call(this);return b.typeName=m.typeName,b},m.typeName="HighlightMarker",m.title="Highlight marker",m.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>',m}(K),ee='<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>',pe=function(N){function m(b,M,G){var k=N.call(this,b,M,G)||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=G.defaultStrokeColor,k.bgColor=G.defaultFillColor,k.fontFamily=G.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 Ye("Text color",G.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 Ye("Fill color",G.defaultColorSet,k.bgColor,ee),k.bgColorPanel.onColorChanged=k.setBgColor,k.fontFamilyPanel=new Ee("Font",G.defaultFontFamilies,G.defaultFontFamily),k.fontFamilyPanel.onFontChanged=k.setFont,k.tipGrip=new ft,k.tipGrip.visual.transform.baseVal.appendItem(Z.createTransform()),k.controlBox.appendChild(k.tipGrip.visual),k}return ie(m,N),m.prototype.ownsTarget=function(b){return N.prototype.ownsTarget.call(this,b)||this.tipGrip.ownsTarget(b)||this.tip===b},m.prototype.createTip=function(){Z.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Z.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},m.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)},m.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()}},m.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)},m.prototype.setBgColor=function(b){this.bgRectangle&&this.tip&&(Z.setAttributes(this.bgRectangle,[["fill",b]]),Z.setAttributes(this.tip,[["fill",b]])),this.bgColor=b,this.fillColorChanged(b)},m.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},m.prototype.setTipPoints=function(b){b===void 0&&(b=!1);var M=Math.min(this.height/2,15),G=this.height/5;b&&(this.tipPosition={x:M+G/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))?(G=this.width/5,M=Math.min(this.width/2,15),this.tipBase1Position={x:M,y:0},this.tipBase2Position={x:M+G,y:0}):(this.tipBase1Position={x:0,y:M},this.tipBase2Position={x:0,y:M+G}):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))?(G=this.width/5,M=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-M-G,y:0},this.tipBase2Position={x:this.width-M,y:0}):(this.tipBase1Position={x:this.width,y:M},this.tipBase2Position={x:this.width,y:M+G}):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))?(G=this.width/5,M=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-M-G,y:this.height},this.tipBase2Position={x:this.width-M,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-M-G},this.tipBase2Position={x:this.width,y:this.height-M}):k<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(G=this.width/5,M=Math.min(this.width/2,15),this.tipBase1Position={x:M,y:this.height},this.tipBase2Position={x:M+G,y:this.height}):(this.tipBase1Position={x:0,y:this.height-M},this.tipBase2Position={x:0,y:this.height-M-G})},m.prototype.resize=function(b){N.prototype.resize.call(this,b),this.positionTip()},m.prototype.positionTip=function(){Z.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(m.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),m.prototype.select=function(){this.positionTip(),N.prototype.select.call(this)},m.prototype.getState=function(){var b=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},N.prototype.getState.call(this));return b.typeName=m.typeName,b},m.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()},m.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()},m.typeName="CalloutMarker",m.title="Callout marker",m.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>',m}(Le),Te=function(N){function m(b,M,G){var k=N.call(this,b,M,G)||this;return k.fillColor="transparent",k.strokeColor="transparent",k.strokeWidth=0,k.strokeDasharray="",k.opacity=1,k.strokeColor=G.defaultColor,k.strokeWidth=G.defaultStrokeWidth,k.strokeDasharray=G.defaultStrokeDasharray,k.fillColor=G.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 Ye("Line color",fe(G.defaultColorSet,["transparent"]),G.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.fillPanel=new Ye("Fill color",fe(G.defaultColorSet,["transparent"]),k.fillColor,ee),k.fillPanel.onColorChanged=k.setFillColor,k.strokeWidthPanel=new mt("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new pt("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k.opacityPanel=new Y("Opacity",G.defaultOpacitySteps,k.opacity),k.opacityPanel.onOpacityChanged=k.setOpacity,k}return ie(m,N),m.prototype.ownsTarget=function(b){return!(!N.prototype.ownsTarget.call(this,b)&&b!==this.visual)},m.prototype.createVisual=function(){this.visual=Z.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)},m.prototype.pointerDown=function(b,M){N.prototype.pointerDown.call(this,b,M),this.state==="new"&&(this.createVisual(),this.moveVisual(b),this._state="creating")},m.prototype.manipulate=function(b){N.prototype.manipulate.call(this,b)},m.prototype.resize=function(b){N.prototype.resize.call(this,b),this.setSize()},m.prototype.setSize=function(){N.prototype.setSize.call(this),Z.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},m.prototype.pointerUp=function(b){N.prototype.pointerUp.call(this,b),this.setSize()},m.prototype.setStrokeColor=function(b){this.strokeColor=b,this.visual&&Z.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(b),this.stateChanged()},m.prototype.setFillColor=function(b){this.fillColor=b,this.visual&&Z.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(b),this.stateChanged()},m.prototype.setStrokeWidth=function(b){this.strokeWidth=b,this.visual&&Z.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},m.prototype.setStrokeDasharray=function(b){this.strokeDasharray=b,this.visual&&Z.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},m.prototype.setOpacity=function(b){this.opacity=b,this.visual&&Z.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),m.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=m.typeName,b},m.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()},m.prototype.scale=function(b,M){N.prototype.scale.call(this,b,M),this.setSize()},m.typeName="EllipseMarker",m.title="Ellipse marker",m.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>',m}(lt),Re=function(N){function m(b,M,G){return N.call(this,b,M,G)||this}return ie(m,N),Object.defineProperty(m.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),m.prototype.ownsTarget=function(b){return!(!N.prototype.ownsTarget.call(this,b)&&b!==this.tip1&&b!==this.tip2)},m.prototype.createTips=function(){this.tip1=Z.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(Z.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Z.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(Z.createTransform()),this.visual.appendChild(this.tip2)},m.prototype.pointerDown=function(b,M){N.prototype.pointerDown.call(this,b,M),this.state==="creating"&&this.createTips()},m.prototype.adjustVisual=function(){if(N.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Z.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()]]),Z.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 G=this.tip2.transform.baseVal.getItem(0);G.setRotate(b+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(G,0)}},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var b=N.prototype.getState.call(this);return b.typeName=m.typeName,b},m.prototype.restoreState=function(b){N.prototype.restoreState.call(this,b),this.createTips(),this.adjustVisual()},m.typeName="MeasurementMarker",m.title="Measurement marker",m.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>',m}(Ne),Xe=function(N){function m(b,M,G){var k=N.call(this,b,M,G)||this;return k.strokePanel.colors=G.defaultColorSet,k.fillColor="transparent",k}return ie(m,N),Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var b=N.prototype.getState.call(this);return b.typeName=m.typeName,b},m.typeName="EllipseFrameMarker",m.title="Ellipse frame marker",m.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>',m}(Te),nt=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(m){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(m)||(this.undoStack.push(m),JSON.stringify(this.lastRedoStep)!==JSON.stringify(m)&&this.redoStack.splice(0,this.redoStack.length))},N.prototype.replaceLastUndoStep=function(m){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=m)},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 m=this.undoStack.pop();return m!==void 0&&this.redoStack.push(m),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}(),Fe=function(N){function m(b,M,G){var k=N.call(this,b,M,G)||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=G.defaultColor,k.strokeWidth=G.defaultStrokeWidth,k.strokeDasharray=G.defaultStrokeDasharray,k.strokePanel=new Ye("Line color",G.defaultColorSet,G.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.strokeWidthPanel=new mt("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new pt("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k}return ie(m,N),m.prototype.ownsTarget=function(b){return!(!N.prototype.ownsTarget.call(this,b)&&b!==this.visual&&b!==this.selectorCurve&&b!==this.visibleCurve&&!this.curveGrip.ownsTarget(b))},m.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},m.prototype.createVisual=function(){this.visual=Z.createGroup(),this.selectorCurve=Z.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Z.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)},m.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")},m.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Z.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Z.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Z.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},m.prototype.setupControlBox=function(){N.prototype.setupControlBox.call(this),this.curveControlLine1=Z.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Z.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)},m.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,N.prototype.addControlGrips.call(this)},m.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()))},m.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)},m.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)},m.prototype.setStrokeColor=function(b){this.strokeColor=b,this.adjustVisual(),this.colorChanged(b)},m.prototype.setStrokeWidth=function(b){this.strokeWidth=b,this.adjustVisual()},m.prototype.setStrokeDasharray=function(b){this.strokeDasharray=b,this.adjustVisual()},m.prototype.scale=function(b,M){this.curveX=this.curveX*b,this.curveY=this.curveY*M,N.prototype.scale.call(this,b,M)},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.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=m.typeName,b},m.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()},m.typeName="CurveMarker",m.title="Curve marker",m.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>',m}(De),bt=function(){function N(m,b){b===void 0&&(b=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=m,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}(),vt=function(N){function m(b,M,G){var k=N.call(this,b,!1)||this;return k.dataUrl=M,k.state=G,k}return ie(m,N),m}(bt),rt=function(N){function m(b,M,G){G===void 0&&(G=!1);var k=N.call(this,b,G)||this;return k.marker=M,k}return ie(m,N),m}(bt),wt=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(m,b){this[m].push(b)},N.prototype.removeEventListener=function(m,b){var M=this[m].indexOf(b);M>-1&&this[m].splice(M,1)},N}(),Dt=function(){function N(m){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ce,this._isOpen=!1,this.undoRedoManager=new nt,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 wt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=N.instanceCounter++,this.styles=new Qe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=m,this.targetRoot=document.body,this.width=m.clientWidth,this.height=m.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,ue,te,Le,Xe,Te,J,pe,Re,K,Ne,Fe]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[me,ue,te,Le,Te,J,pe]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"BASIC_MARKER_TYPES",{get:function(){return[me,ue,te,Le,J]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(m){var b=this;this._availableMarkerTypes.splice(0),m.forEach(function(M){if(typeof M=="string"){var G=b.ALL_MARKER_TYPES.find(function(k){return k.typeName===M});G!==void 0&&b._availableMarkerTypes.push(G)}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(m){this._zoomLevel=m,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(),Ue.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},N.prototype.show=function(){var m=this;this.styles.styleSheetRoot===void 0&&tt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=tt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(b){return b(new bt(m))})},N.prototype.render=function(){return xe(this,void 0,void 0,function(){var m;return Ae(this,function(b){switch(b.label){case 0:return this.setCurrentMarker(),(m=new $e).naturalSize=this.renderAtNaturalSize,m.imageType=this.renderImageType,m.imageQuality=this.renderImageQuality,m.markersOnly=this.renderMarkersOnly,m.width=this.renderWidth,m.height=this.renderHeight,[4,m.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return b.sent(),[4,m.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,b.sent()]}})})},N.prototype.close=function(m){var b=this;if(m===void 0&&(m=!1),this.isOpen){var M=!1;m||this.eventListeners.beforeclose.forEach(function(G){var k=new bt(b,!0);G(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(G){return G(new bt(b))}),this.detachEvents(),this._isOpen=!1)}},N.prototype.addMarkersToToolbar=function(){for(var m,b=[],M=0;M<arguments.length;M++)b[M]=arguments[M];(m=this._availableMarkerTypes).push.apply(m,b)},N.prototype.addRenderEventListener=function(m){this.addEventListener("render",function(b){m(b.dataUrl,b.state)})},N.prototype.removeRenderEventListener=function(m){},N.prototype.addCloseEventListener=function(m){this.addEventListener("close",function(){m()})},N.prototype.removeCloseEventListener=function(m){},N.prototype.setupResizeObserver=function(){var m=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){m.resize(m.target.clientWidth,m.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return m.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},N.prototype.onPopupTargetResize=function(){var m=1*this.target.clientWidth/this.target.clientHeight,b=this.editorCanvas.clientWidth/m>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*m:this.editorCanvas.clientWidth,M=b<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/m;this.resize(b,M)},N.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},N.prototype.resize=function(m,b){this._isResizing=!0;var M=m/this.imageWidth,G=b/this.imageHeight;this.imageWidth=Math.round(m),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,G),this._isResizing=!1},N.prototype.scaleMarkers=function(m,b){var M,G=this;this._currentMarker&&this._currentMarker instanceof Le?this._currentMarker.scale(m,b):(M=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(k){k!==G._currentMarker&&k.scale(m,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 m=this.editingTarget.getBoundingClientRect(),b=this.editorCanvas.getBoundingClientRect();this.left=m.left-b.left,this.top=m.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 m,b=[],M=0;M<arguments.length;M++)b[M]=arguments[M];this.defs=Z.createDefs(),this.addDefsToImage(),(m=this.defs).append.apply(m,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 m=document.createElement("a");m.href="https://markerjs.com/",m.target="_blank",m.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>',m.title="Powered by marker.js",m.style.display="grid",m.style.alignItems="center",m.style.justifyItems="center",m.style.padding="3px",m.style.width="20px",m.style.height="20px",this.logoUI.appendChild(m),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 m=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=m+"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 We(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(m){this.markerImage.removeChild(m.container),this.markers.indexOf(m)>-1&&this.markers.splice(this.markers.indexOf(m),1),m.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(m,b){if(m==="marker"&&b!==void 0)this.createNewMarker(b);else if(m==="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 m=this;if(this._currentMarker!==void 0){var b=!1;if(this.eventListeners.markerbeforedelete.forEach(function(G){var k=new rt(m,m._currentMarker,!0);G(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(G){return G(new rt(m,M))})}}},N.prototype.clear=function(){var m=this,b=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(he){var je=new rt(m,void 0,!0);he(je),je.defaultPrevented&&(b=!0)}),!b)){this.setCurrentMarker();for(var M=function(he){var je=G.markers[he];G.setCurrentMarker(G.markers[he]),G._currentMarker.dispose(),G.markerImage.removeChild(G._currentMarker.container),G.markers.splice(G.markers.indexOf(G._currentMarker),1),G.eventListeners.markerdelete.forEach(function(st){return st(new rt(m,je))})},G=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 m;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=(m=this._currentMarker.notes)!==null&&m!==void 0?m:"",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 m=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 G=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(b),G<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(k){return k(new bt(m))})}else this.undoRedoManager.replaceLastUndoStep(b),this.eventListeners.statechange.forEach(function(k){return k(new bt(m))})}},N.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},N.prototype.undoStep=function(){var m=this,b=this.undoRedoManager.undo();b!==void 0&&(this.restoreState(b),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(M){return M(new bt(m))}))},N.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},N.prototype.redoStep=function(){var m=this,b=this.undoRedoManager.redo();b!==void 0&&(this.restoreState(b),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(M){return M(new bt(m))}))},N.prototype.stepZoom=function(){var m=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=m<this.zoomSteps.length-1?this.zoomSteps[m+1]:this.zoomSteps[0]},N.prototype.panTo=function(m){this.contentDiv.scrollBy({left:this.prevPanPoint.x-m.x,top:this.prevPanPoint.y-m.y}),this.prevPanPoint=m},N.prototype.startRenderAndClose=function(){return xe(this,void 0,void 0,function(){var m,b,M=this;return Ae(this,function(G){switch(G.label){case 0:return[4,this.render()];case 1:return m=G.sent(),b=this.getState(),this.eventListeners.render.forEach(function(k){return k(new vt(M,m,b))}),this.close(!0),[2]}})})},N.prototype.getState=function(m){m===!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(m){var b=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);m.markers.forEach(function(M){var G=b._availableMarkerTypes.find(function(he){return he.typeName===M.typeName});if(G!==void 0){var k=b.addNewMarker(G);k.restoreState(M),b.markers.push(k)}}),m.width&&m.height&&(m.width!==this.imageWidth||m.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/m.width,this.imageHeight/m.height),this.eventListeners.restorestate.forEach(function(M){return M(new bt(b))})},N.prototype.addNewMarker=function(m){var b=Z.createGroup();return this.markerImage.appendChild(b),new m(b,this.overlayContainer,this.settings)},N.prototype.createNewMarker=function(m){var b,M=this;(b=typeof m=="string"?this._availableMarkerTypes.find(function(G){return G.typeName===m}):m)&&(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(G){return G(new rt(M,M._currentMarker))}))},N.prototype.markerCreated=function(m){var b=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(m),this.setCurrentMarker(m),m instanceof ue&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ue):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(M){return M(new rt(b,b._currentMarker))})},N.prototype.colorChanged=function(m){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=m,this.settings.defaultStrokeColor=m)},N.prototype.fillColorChanged=function(m){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=m)},N.prototype.markerStateChanged=function(m){var b=this;this.eventListeners.markerchange.forEach(function(M){return M(new rt(b,m))})},N.prototype.setCurrentMarker=function(m){var b=this;this._currentMarker!==m&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(M){return M(new rt(b,b._currentMarker))})),this._currentMarker=m,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 rt(b,b._currentMarker))}))},N.prototype.onPointerDown=function(m){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||m.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(m.target)});b!==void 0?(this.setCurrentMarker(b),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(m.clientX,m.clientY),m.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:m.clientX,y:m.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(m.clientX,m.clientY))},N.prototype.onDblClick=function(m){if(this._isFocused||this.focus(),this.mode==="select"){var b=this.markers.find(function(M){return M.ownsTarget(m.target)});b!==void 0&&b!==this._currentMarker&&this.setCurrentMarker(b),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(m.clientX,m.clientY),m.target):this.setCurrentMarker()}},N.prototype.onPointerMove=function(m){this.touchPoints!==1&&m.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||m.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(m.clientX,m.clientY)):this.zoomLevel>1&&this.panTo({x:m.clientX,y:m.clientY}))},N.prototype.onPointerUp=function(m){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(m.clientX,m.clientY)),this.isDragging=!1,this.addUndoStep()},N.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},N.prototype.onKeyUp=function(m){this._currentMarker===void 0||this.notesArea!==void 0||m.key!=="Delete"&&m.key!=="Backspace"||this.deleteSelectedMarker()},N.prototype.clientToLocalCoordinates=function(m,b){var M=this.markerImage.getBoundingClientRect();return{x:(m-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 m=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=m+"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(m){Ue.addKey(m)},N.prototype.addEventListener=function(m,b){this.eventListeners.addEventListener(m,b)},N.prototype.removeEventListener=function(m,b){this.eventListeners.removeEventListener(m,b)},N.prototype.renderState=function(m){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(m),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(N.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),N.prototype.focus=function(){var m=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 bt(m))}))},N.prototype.blur=function(){var m=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(b){return b(new bt(m))}))},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 xt=function(N,m){return(xt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,M){b.__proto__=M}||function(b,M){for(var G in M)Object.prototype.hasOwnProperty.call(M,G)&&(b[G]=M[G])})(N,m)};function ct(N,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function b(){this.constructor=N}xt(N,m),N.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}function yt(N,m,b,M){return new(b||(b=Promise))(function(G,k){function he(gt){try{st(M.next(gt))}catch(Ge){k(Ge)}}function je(gt){try{st(M.throw(gt))}catch(Ge){k(Ge)}}function st(gt){var Ge;gt.done?G(gt.value):(Ge=gt.value,Ge instanceof b?Ge:new b(function(At){At(Ge)})).then(he,je)}st((M=M.apply(N,m||[])).next())})}function St(N,m){var b,M,G,k,he={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return k={next:je(0),throw:je(1),return:je(2)},typeof Symbol=="function"&&(k[Symbol.iterator]=function(){return this}),k;function je(st){return function(gt){return function(Ge){if(b)throw new TypeError("Generator is already executing.");for(;he;)try{if(b=1,M&&(G=2&Ge[0]?M.return:Ge[0]?M.throw||((G=M.return)&&G.call(M),0):M.next)&&!(G=G.call(M,Ge[1])).done)return G;switch(M=0,G&&(Ge=[2&Ge[0],G.value]),Ge[0]){case 0:case 1:G=Ge;break;case 4:return he.label++,{value:Ge[1],done:!1};case 5:he.label++,M=Ge[1],Ge=[0];continue;case 7:Ge=he.ops.pop(),he.trys.pop();continue;default:if(!(G=he.trys,(G=G.length>0&&G[G.length-1])||Ge[0]!==6&&Ge[0]!==2)){he=0;continue}if(Ge[0]===3&&(!G||Ge[1]>G[0]&&Ge[1]<G[3])){he.label=Ge[1];break}if(Ge[0]===6&&he.label<G[1]){he.label=G[1],G=Ge;break}if(G&&he.label<G[2]){he.label=G[2],he.ops.push(Ge);break}G[2]&&he.ops.pop(),he.trys.pop();continue}Ge=m.call(N,he)}catch(At){Ge=[6,At],M=0}finally{b=G=0}if(5&Ge[0])throw Ge[1];return{value:Ge[0]?Ge[1]:void 0,done:!0}}([st,gt])}}}var Mt=function(){function N(){}return N.addKey=function(m){N.key=m},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}(),Ie=function(){function N(){}return N.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},N.setAttributes=function(m,b){for(var M=0,G=b;M<G.length;M++){var k=G[M],he=k[0],je=k[1];m.setAttribute(he,je)}},N.createRect=function(m,b,M){var G=document.createElementNS("http://www.w3.org/2000/svg","rect");return G.setAttribute("width",m.toString()),G.setAttribute("height",b.toString()),M&&N.setAttributes(G,M),G},N.createLine=function(m,b,M,G,k){var he=document.createElementNS("http://www.w3.org/2000/svg","line");return he.setAttribute("x1",m.toString()),he.setAttribute("y1",b.toString()),he.setAttribute("x2",M.toString()),he.setAttribute("y2",G.toString()),k&&N.setAttributes(he,k),he},N.createPolygon=function(m,b){var M=document.createElementNS("http://www.w3.org/2000/svg","polygon");return M.setAttribute("points",m),b&&N.setAttributes(M,b),M},N.createCircle=function(m,b){var M=document.createElementNS("http://www.w3.org/2000/svg","circle");return M.setAttribute("cx",(m/2).toString()),M.setAttribute("cy",(m/2).toString()),M.setAttribute("r",m.toString()),b&&N.setAttributes(M,b),M},N.createEllipse=function(m,b,M){var G=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return G.setAttribute("cx",(m/2).toString()),G.setAttribute("cy",(b/2).toString()),G.setAttribute("rx",(m/2).toString()),G.setAttribute("ry",(b/2).toString()),M&&N.setAttributes(G,M),G},N.createGroup=function(m){var b=document.createElementNS("http://www.w3.org/2000/svg","g");return m&&N.setAttributes(b,m),b},N.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},N.createMarker=function(m,b,M,G,k,he,je){var st=document.createElementNS("http://www.w3.org/2000/svg","marker");return N.setAttributes(st,[["id",m],["orient",b],["markerWidth",M.toString()],["markerHeight",G.toString()],["refX",k.toString()],["refY",he.toString()]]),st.appendChild(je),st},N.createText=function(m){var b=document.createElementNS("http://www.w3.org/2000/svg","text");return b.setAttribute("x","0"),b.setAttribute("y","0"),m&&N.setAttributes(b,m),b},N.createTSpan=function(m,b){var M=document.createElementNS("http://www.w3.org/2000/svg","tspan");return M.textContent=m,b&&N.setAttributes(M,b),M},N.createImage=function(m){var b=document.createElementNS("http://www.w3.org/2000/svg","image");return m&&N.setAttributes(b,m),b},N.createPoint=function(m,b){var M=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return M.x=m,M.y=b,M},N.createPath=function(m,b){var M=document.createElementNS("http://www.w3.org/2000/svg","path");return M.setAttribute("d",m),b&&N.setAttributes(M,b),M},N.createElement=function(m,b){var M=document.createElementNS("http://www.w3.org/2000/svg",m);return b&&N.setAttributes(M,b),M},N.getHollowRectanglePath=function(m,b,M,G,k,he,je,st){return"M"+m+","+b+"V"+(b+G)+"H"+(m+M)+"V"+b+"H"+k+"V"+he+"H"+(k+je)+"V"+(he+st)+"H"+k+"V"+b+"Z"},N}(),ot=function(){function N(m){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+m+"_"}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(m){return this.styleSheet===void 0&&this.addStyleSheet(),m.name=""+this.classNamePrefix+m.localName,this.classes.push(m),this.styleSheet.sheet.insertRule("."+m.name+" {"+m.style+"}",this.styleSheet.sheet.cssRules.length),m},N.prototype.addRule=function(m){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(m),this.styleSheet.sheet.insertRule(m.selector+" {"+m.style+"}",this.styleSheet.sheet.cssRules.length)},N.prototype.addStyleSheet=function(){var m;this.styleSheet=document.createElement("style"),((m=this.styleSheetRoot)!==null&&m!==void 0?m:document.head).appendChild(this.styleSheet),this.addRule(new _t("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new _t("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new _t("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Et("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Et("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},N.prototype.removeStyleSheet=function(){var m;this.styleSheet&&(((m=this.styleSheetRoot)!==null&&m!==void 0?m:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},N}(),_t=function(N,m){this.selector=N,this.style=m},Et=function(N,m){this.localName=N,this.style=m},Ut=function(){function N(){this.blocks=[],this.display=""}return N.prototype.addButtonBlock=function(m){m.className=this.blockClassName,m.buttonClassName=this.buttonClassName,m.buttonColorsClassName=this.buttonColorsClassName,m.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(m)},N.prototype.addElementBlock=function(m){m.className===void 0&&(m.className=this.blockClassName),this.blocks.push(m)},N.prototype.getUI=function(){var m=document.createElement("div");return m.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,m.style.display=this.display,this.blocks.forEach(function(b){return m.appendChild(b.getUI())}),m},N}(),wn=function(){function N(){}return N.prototype.getUI=function(){var m=document.createElement("div");if(m.className=this.className,this.minWidth!==void 0&&(m.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":m.style.justifyContent="flex-start";break;case"center":m.style.justifyContent="center";break;case"end":m.style.justifyContent="flex-end"}return m.style.whiteSpace="nowrap",m},N}(),jn=function(N){function m(){var b=N!==null&&N.apply(this,arguments)||this;return b.buttons=[],b}return ct(m,N),m.prototype.addButton=function(b){b.className=this.buttonClassName,b.colorsClassName=this.buttonColorsClassName,b.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(b)},m.prototype.getUI=function(){var b=N.prototype.getUI.call(this);return this.buttons.forEach(function(M){return b.appendChild(M.getUI())}),b},m}(wn),Cn=function(){function N(m,b){this._isActive=!1,this._isHidden=!1,this._icon=m,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(m){this._icon=m,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isActive",{get:function(){return this._isActive},set:function(m){this._isActive=m,this.adjustClassName()},enumerable:!1,configurable:!0}),N.prototype.getUI=function(){var m=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 m.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}(),Rn=function(N){function m(){var b=N!==null&&N.apply(this,arguments)||this;return b.elements=[],b}return ct(m,N),m.prototype.addElement=function(b){this.elements.push(b)},m.prototype.getUI=function(){var b=N.prototype.getUI.call(this);return this.elements.forEach(function(M){return b.appendChild(M)}),b},m}(wn),Pn=function(){function N(m,b){this.horizontal=m,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(m){return m/this.ratio},N.prototype.getHorizontalLength=function(m){return m*this.ratio},N}(),An=function(){function N(){}return N.getIcon=function(m,b){if(m>0&&b>0){var M=new Pn(m,b),G=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 je=Ie.createDefs();he.appendChild(je);var st=Ie.createElement("clipPath",[["id","text-bg-clip"]]);je.appendChild(st);var gt=Ie.createPath(Ie.getHollowRectanglePath((24-G)/2,(24-k)/2,G,k,(24-G)/2+2,(24-k)/2+2,G-4,k-4));he.appendChild(gt);var Ge=Ie.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ge.appendChild(Ie.createTSpan(m+":"+b)),he.appendChild(Ge);var At=Ge.getBBox();Ie.setAttributes(Ge,[["x",((24-At.width)/2).toString()],["y",((24-At.height)/2-At.y).toString()]]);var Lt=Ie.createPath(Ie.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(At.width))/2,(24-Math.ceil(At.height))/2,Math.ceil(At.width),Math.ceil(At.height)));return st.appendChild(Lt),Ie.setAttributes(gt,[["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}(),Jn=function(N){function m(b,M,G){var k=N.call(this,b,M)||this;return k.isDropdownOpen=!1,k.onClick=k.dropdownButtonClicked,k.dropdownButtons=G,k}return ct(m,N),m.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)},m.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},m.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},m.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},m.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},m.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},m}(Cn),Kn=function(){function N(m,b){this.GRIP_SIZE=10,this.color=m,this.fillColor=b,this.visual=Ie.createGroup(),this.visual.appendChild(Ie.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ie.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(m){return m===this.visual||m===this.visual.childNodes[0]||m===this.visual.childNodes[1]},N.prototype.setCenter=function(m,b){this.visual.childNodes.forEach(function(M){return Ie.setAttributes(M,[["cx",m.toString()],["cy",b.toString()]])})},N}(),On=function(){function N(m,b,M,G){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=m,this.canvasHeight=b,this.margin=M,this.container=G,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(m){this._aspectRatio=m,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(m){this._isGridVisible=m,this.gridContainer&&Ie.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(m){this._zoomFactor=m,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),N.prototype.open=function(){var m=this;this.cropShadeElement=Ie.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Ie.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var b=0;b<this.numberOfGridLines;b++)this.horizontalGridLines.push(Ie.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Ie.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(M){return m.gridContainer.appendChild(M)}),this.verticalGridLines.forEach(function(M){return m.gridContainer.appendChild(M)}),this.cropRectElement=Ie.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Kn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Kn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Kn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Kn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},N.prototype.setCropRectangle=function(m){this.cropRect=m;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),Ie.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 je=b.y+M*(he+1);Ie.setAttributes(k,[["x1",""+b.x],["y1",""+je],["x2",""+(b.x+b.width)],["y2",""+je]])});var G=b.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(k,he){var je=b.x+G*(he+1);Ie.setAttributes(k,[["x1",""+je],["y1",""+b.y],["x2",""+je],["y2",""+(b.y+b.height)]])}),Ie.setAttributes(this.cropShadeElement,[["d",Ie.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(m,b){var M=this.container.getBoundingClientRect();return{x:m-M.left+this.margin,y:b-M.top+this.margin}},N.prototype.onPointerDown=function(m){this.container.setPointerCapture(m.pointerId),this.previousPoint=this.clientToLocalCoordinates(m.clientX,m.clientY),this.cropRectElement===m.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(m.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(m.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(m.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(m.target)&&(this.activeGrip=this.bottomRightGrip)},N.prototype.onPointerMove=function(m){if(this.isMoving)this.move(this.clientToLocalCoordinates(m.clientX,m.clientY));else if(this.activeGrip){var b=this.clientToLocalCoordinates(m.clientX,m.clientY);this.resize(b)}m.preventDefault()},N.prototype.onPointerUp=function(m){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(m.pointerId)},N.prototype.move=function(m){var b=m.x-this.previousPoint.x,M=m.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=m},N.prototype.resize=function(m){var b=Object.assign({},this.cropRect),M=m.x-this.previousPoint.x,G=m.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+=G,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+=G}b.width<10&&(b.x=this.cropRect.x,b.width=10),b.height<10&&(b.y=this.cropRect.y,b.height=10),this.previousPoint=m,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 m=this.cropRect.x+this.cropRect.width/2,b=this.cropRect.y+this.cropRect.height/2,M=this.aspectRatio.getHorizontalLength(this.cropRect.height),G=this.aspectRatio.getVerticalLength(this.cropRect.width);M/this.canvasWidth<G/this.canvasHeight?this.cropRect.width=M:this.cropRect.height=G,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=m-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(m,b,M,G,k,he){var je=M/m,st=G/b;return{x:(k.x-he)*je+he,y:(k.y-he)*st+he,width:k.width*je,height:k.height*st}},N.prototype.scaleCanvas=function(m,b){var M=this.getRescaledRect(this.canvasWidth,this.canvasHeight,m,b,this.cropRect,this.margin);this.canvasWidth=m,this.canvasHeight=b,this.onCropChange&&this.onCropChange(M),this.setCropRectangle(M)},N}(),Mn=function(){function N(m){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=m,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(m){this._angle=m,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(m){this.controlContainer.setPointerCapture(m.pointerId),this.isDragging=!0,this.previousPoint={x:m.clientX,y:m.clientY}},N.prototype.onPointerMove=function(m){this.isDragging&&(this.onAngleChange&&this.onAngleChange((m.clientX-this.previousPoint.x)/5),this.previousPoint.x=m.clientX)},N.prototype.onPointerUp=function(m){this.isDragging&&this.onAngleChange&&this.onAngleChange((m.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(m.pointerId)},N.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var m=this.angleLabelText.getBBox();Ie.setAttributes(this.angleLabelElement,[["x",((this.width-m.width)/2).toString()],["y",(this.height/2).toString()]])}},N.prototype.positionScaleShape=function(){if(this.scaleShape){var m=this.scaleShape.transform.baseVal.getItem(0);m.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(m,0)}},N.prototype.getVisual=function(){var m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.setAttribute("xmlns","http://www.w3.org/2000/svg"),m.setAttribute("width",this.width+"px"),m.setAttribute("height",this.height+"px"),m.setAttribute("viewBox","0 0 "+this.width+" "+this.height),m.style.flexShrink="0",document.body.appendChild(m);for(var b="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,M=1;M<=this.width/5+10;M++){var G=M%5==0?this.height/3:this.height/6;b+="h4v"+-G+"h1v"+G}b+="v1H0Z",this.scaleShape=Ie.createPath(b);var k=Ie.createTransform();this.scaleShape.transform.baseVal.appendItem(k),m.appendChild(this.scaleShape),this.angleLabelElement=Ie.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Ie.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var he=Ie.createTSpan("");return he.innerHTML="°",this.angleLabelElement.appendChild(he),m.appendChild(this.angleLabelElement),document.body.removeChild(m),m},N}(),Gn=function(){function N(){this.naturalSize=!1,this.imageType="image/png"}return N.prototype.rasterize=function(m,b,M,G,k,he,je){var st=this;return new Promise(function(gt){var Ge=document.createElement("canvas");Ge.width=m.width.baseVal.value-2*G,Ge.height=m.height.baseVal.value-2*G;var At=1,Lt=1;st.naturalSize===!0?(At=b.naturalWidth/(m.width.baseVal.value-2*G)/he,Lt=b.naturalHeight/(m.height.baseVal.value-2*G)/je,Ge.width=b.naturalWidth/he,Ge.height=b.naturalHeight/je):st.width!==void 0&&st.height!==void 0&&(At=st.width/M.width,Lt=st.height/M.height,Ge.width*=At,Ge.height*=Lt);var en=Ge.getContext("2d");en.translate(Ge.width/2,Ge.height/2),en.rotate(k*Math.PI/180),en.scale(he,je),en.translate(-Ge.width/2,-Ge.height/2),en.drawImage(b,0,0,Ge.width,Ge.height);var In=document.createElement("canvas");In.width=M.width*At,In.height=M.height*Lt,In.getContext("2d").putImageData(en.getImageData((M.x-G)*At,(M.y-G)*Lt,M.width*At,M.height*Lt),0,0),gt(In.toDataURL(st.imageType,st.imageQuality))})},N}(),oi=function(){function N(m){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 ot(this.instanceNo),this.target=m,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(m){this._zoomToCropEnabled=m,m?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(m){this._isGridVisible=m,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"gridLines",{get:function(){return this._gridLines},set:function(m){this._gridLines=m,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(m){this._rotationAngle=m,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 m;return(m=this._aspectRatio)!==null&&m!==void 0?m:this.aspectRatios[0]},set:function(m){this._aspectRatio=m},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(m){m===void 0&&(m=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),m||this.closeEventListeners.forEach(function(b){return b()}),this._isOpen=!1)},N.prototype.addRenderEventListener=function(m){this.renderEventListeners.push(m)},N.prototype.removeRenderEventListener=function(m){this.renderEventListeners.indexOf(m)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(m),1)},N.prototype.addCloseEventListener=function(m){this.closeEventListeners.push(m)},N.prototype.removeCloseEventListener=function(m){this.closeEventListeners.indexOf(m)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(m),1)},N.prototype.setupResizeObserver=function(){var m=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){m.resize(m.target.clientWidth,m.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 m=1*this.target.clientWidth/this.target.clientHeight,b=this.contentDiv.clientWidth/m>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*m: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)/m;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",Ie.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(m,b){this.imageWidth=Math.round(m),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 m=document.createElement("canvas");m.width=this.target.naturalWidth,m.height=this.target.naturalHeight,m.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var b=m.toDataURL();Ie.setAttributes(this.editingTarget,[["href",b]]),this.setEditingTargetSize()},N.prototype.setTopLeft=function(){var m=this.target.getBoundingClientRect(),b=this.editorCanvas.getBoundingClientRect();this.left=m.left-b.left-this.CANVAS_MARGIN,this.top=m.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=Ie.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Ie.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Ie.createGroup(),this.editingTargetRotationScaleContainer=Ie.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var m=Ie.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(m);var b=Ie.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(b),this.editingTargetContainer=Ie.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=Ie.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new On(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 m=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=m+"px "+b+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-m+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(m){this.cropRect=m,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 m=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,b=this.target.offsetTop>m+this.CANVAS_MARGIN?this.target.offsetTop-(m+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 m=this;this.topToolbar=new Ut,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 jn;b.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(b);var M=[];this.aspectRatios.forEach(function(Lt){var en=new Cn(An.getIcon(Lt.horizontal,Lt.vertical),Lt.horizontal===0&&Lt.vertical===0?"FREE":Lt.horizontal+":"+Lt.vertical);en.onClick=function(){return m.ratioButtonClicked(Lt)},M.push(en)}),this.aspectRatioButton=new Jn(An.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 G=new Cn('<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");G.isActive=this.isGridVisible,G.onClick=function(){m.isGridVisible=!m.isGridVisible,G.isActive=m.isGridVisible},b.addButton(G);var k=new Cn('<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(){m.zoomToCropEnabled=!m.zoomToCropEnabled,k.isActive=m.zoomToCropEnabled},b.addButton(k),!Mt.isLicensed){var he=new Rn;this.topToolbar.addElementBlock(he);var je=document.createElement("div");je.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var st=document.createElement("a");st.style.color="currentColor",st.href="https://markerjs.com/products/cropro",st.target="_blank",st.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>',je.appendChild(st),he.addElement(je)}var gt=new jn;gt.minWidth=3*this.toolbarHeight+"px",gt.contentAlign="end",this.topToolbar.addButtonBlock(gt);var Ge=new Cn('<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");Ge.onClick=this.startRenderAndClose,gt.addButton(Ge),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ge.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var At=new Cn('<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");At.onClick=this.close,gt.addButton(At),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(At.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},N.prototype.addBottomToolbar=function(){var m=this;this.bottomToolbar=new Ut,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 jn;b.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(b);var M=new Cn('<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 G=new Cn('<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");G.onClick=this.rotateRightButtonClicked,b.addButton(G);var k=new Rn;k.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(k),this.straightener=new Mn("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(gt){m.rotateBy(gt),m.straightener.angle=m.rotationAngle},k.addElement(this.straightener.getUI());var he=new jn;he.minWidth=2*this.toolbarHeight+"px",he.contentAlign="end",this.bottomToolbar.addButtonBlock(he);var je=new Cn('<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");je.onClick=this.flipHorizontallyButtonClicked,he.addButton(je);var st=new Cn('<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");st.onClick=this.flipVerticallyButtonClicked,he.addButton(st)},N.prototype.ratioButtonClicked=function(m){this.aspectRatio=m,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},N.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=An.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 Pn(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(m){if(m){var b=this.cropLayer.getRescaledRect(m.width,m.height,this.imageWidth,this.imageHeight,m.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(b),this.cropRectChanged(b),this.flippedHorizontally=m.flippedHorizontally,this.flippedVertically=m.flippedVertically,this.applyFlip(),this.rotationAngle=m.rotationAngle,this.applyRotation()}},N.prototype.clientToLocalCoordinates=function(m,b){var M=this.cropImage.getBoundingClientRect();return{x:m-M.left,y:b-M.top}},N.prototype.onWindowResize=function(){this.positionUI()},N.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var m=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=m+"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 m=this.rotationAngle-90;this.rotationAngle%90!=0&&(m+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(m)},N.prototype.rotateRightButtonClicked=function(){var m=this.rotationAngle+90;this.rotationAngle%90!=0&&(m-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(m)},N.prototype.rotateTo=function(m){m=(m=m>180?m-360:m)<=-180?m+360:m,this.rotationAngle=m,this.applyRotation()},N.prototype.rotateBy=function(m){this.rotateTo((this.rotationAngle+m)%360)},N.prototype.applyRotation=function(){var m=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=m},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 yt(this,void 0,void 0,function(){var m,b;return St(this,function(M){switch(M.label){case 0:return[4,this.render()];case 1:return m=M.sent(),b=this.getState(),this.renderEventListeners.forEach(function(G){return G(m,b)}),this.close(!0),[2]}})})},N.prototype.render=function(){return yt(this,void 0,void 0,function(){var m;return St(this,function(b){switch(b.label){case 0:return(m=new Gn).naturalSize=this.renderAtNaturalSize,m.imageType=this.renderImageType,m.imageQuality=this.renderImageQuality,m.width=this.renderWidth,m.height=this.renderHeight,this.unzoomFromCrop(),Ie.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,m.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,m.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 Et("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 Et("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Et("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var m=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Et("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*m)+`px;
|
|
height: `+(this.toolbarHeight-2*m)+`px;
|
|
padding: `+m+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Et("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Et("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new _t("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new _t("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Et("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 Et("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Et("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 Et("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*m)+`px;
|
|
padding: `+m+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Et("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},N.instanceCounter=0,N}(),zn=F("8hTe"),Nt=F.n(zn),Zn=/<pre[^>]*>/g;function fi(N){var m=document.createElement("div");return m.innerHTML=N,m.childNodes.length===0?"":m.childNodes[0].nodeValue}var qn=we.a=function(N){var m=N.value,b=m===void 0?"":m,M=N.edit,G=M===void 0?!1:M,k=N.className,he=N.showTextOnly,je=N.showLines,st=N.replaces,gt=N.zoomImg,Ge=N.hasMask,At=N.style,Lt=At===void 0?{}:At,en=N.stylesPrev,In=en===void 0?{}:en,Vn=String(b),Oe=Object(A.useRef)(),En=Object(A.useRef)(),si=Object(A.useState)(""),Yn=Object(H.a)(si,2),pi=Yn[0],$n=Yn[1],mn=Object(A.useState)("office"),Fn=Object(H.a)(mn,2),li=Fn[0],mi=Fn[1],Ti=function(){var Bt=new oi(En.current);Bt.displayMode="popup",Bt.addRenderEventListener(function(){var un=Object(S.a)(R.a.mark(function Vt(yn){var tn;return R.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:return Oe.current.style.display="none",_n.next=3,Object(be.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:yn}});case 3:tn=_n.sent,tn!=null&&tn.id&&st(En.current.getAttribute("src").replace(Q.a.API_SERVER,""),"/api/attachments/".concat(tn==null?void 0:tn.id,"?type=").concat(tn.content_type));case 5:case"end":return _n.stop()}},Vt)}));return function(Vt){return un.apply(this,arguments)}}()),Bt.show()},Ni=function(){var Bt=new Dt(En.current);Bt.settings.displayMode="popup",Bt.addEventListener("render",function(){var un=Object(S.a)(R.a.mark(function Vt(yn){var tn;return R.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:if(Oe.current.style.display="none",!En.current){_n.next=6;break}return _n.next=4,Object(be.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:yn.dataUrl}});case 4:tn=_n.sent,tn!=null&&tn.id&&st(En.current.getAttribute("src").replace(Q.a.API_SERVER,""),"/api/attachments/".concat(tn==null?void 0:tn.id,"?type=").concat(tn.content_type));case 6:case"end":return _n.stop()}},Vt)}));return function(Vt){return un.apply(this,arguments)}}()),Bt.show(),window.markerArea=Bt},ui=Object(A.useMemo)(function(){Oe.current&&(Oe.current.style.zIndex=-1);try{var nn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Bt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,un=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Vn=Vn.replace(nn,"("+Q.a.API_SERVER+"/api/attachments/").replace(Bt,'"'+Q.a.API_SERVER+"/api/attachments/").replace(un,'"'+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 Vt=w(Vn),yn=f();if(Vn.match(/\[TOC\]/)&&(Vt=Vt.replace("<p>[TOC]</p>",E()),T()),Vt=Vt.replace(/(__special_katext_id_\d+__)/g,function(vi,_n){var xi=yn[_n],yi=xi.type,_i=xi.expression;return Object(re.renderToString)(fi(_i)||"",{displayMode:yi==="block",throwOnError:!1,output:"html"})}),Vt=Vt.replace(/▁/g,"\u2581\u2581\u2581"),c(),he){var tn=document.createElement("div");return tn.innerHTML=Vt,tn.innerText}return setTimeout(function(){return Ri()},500),Vt},[Vn]),Tn=Object(A.useRef)();_.WebkitLineClamp=je,je&&(Lt=Object(C.a)(Object(C.a)({},Lt),_));function ei(nn){var Bt=nn.target;if(Bt.tagName.toUpperCase()==="IMG"){if(gt){var un=Bt.getAttribute("src");$n(un),mi("image")}}else if(Bt.tagName.toUpperCase()==="A"){var Vt=Bt.getAttribute("href");if(Vt.indexOf("office")>-1)nn.preventDefault(),$n(Vt),mi("office");else if(Vt.indexOf("application/pdf")>-1)nn.preventDefault(),$n(Vt),mi("pdf");else if(Vt.indexOf("text/html")>-1)nn.preventDefault(),$n(Vt),mi("html");else if(Vt.startsWith("#")){nn.preventDefault();var yn=document.getElementById(Vt.replace("#",""));yn&&yn.scrollIntoView(!0)}}}var Ri=function(){var Bt,un=(Bt=Tn.current)===null||Bt===void 0?void 0:Bt.querySelectorAll("video");un==null||un.forEach(function(Vt){if(Vt.oncontextmenu=function(){return!1},Vt.src.indexOf(".m3u8")>-1&&!Vt.canPlayType("application/vnd.apple.mpegurl")){if(z.a.isSupported()){var yn=new z.a;yn.loadSource(Vt.src),yn.attachMedia(Vt)}}})};Object(A.useEffect)(function(){if(Tn.current&&ui&&(ui.match(Zn)&&window.PR.prettyPrint()),Tn.current)return Tn.current.addEventListener("click",ei),function(){Tn.current.removeEventListener("click",ei),c(),T()}},[ui,Tn.current,ei]);var gi=function(Bt){if(!G)return;Bt.target.nodeName==="IMG"?(Oe.current.style.zIndex=1,Oe.current.style.display="flex",Oe.current.style.width=Bt.target.clientWidth+"px",Oe.current.style.height=Bt.target.clientHeight+"px",Oe.current.style.top=Bt.target.offsetTop+"px",Oe.current.style.left=Bt.target.offsetLeft+"px",En.current.src=Bt.target.getAttribute("src")):Oe.current.style.display="none"};return y.a.createElement("div",{style:{position:"relative"}},y.a.createElement("div",{ref:Tn,style:Object(C.a)({},Lt),className:"".concat(k||""," markdown-body ").concat(Nt.a.mdBody),onMouseOver:gi,dangerouslySetInnerHTML:{__html:ui}}),y.a.createElement("div",{ref:Oe,className:Nt.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:En,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)({},In),onClose:function(){return $n("")}}))}},"9JIy":function(Ke,we,F){Ke.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(Ke,we){var F=function(ae){return ae.replace(/[A-Z]/g,function(L){return"-"+L.toLowerCase()}).toLowerCase()};Ke.exports=F},BU3w:function(Ke,we,F){"use strict";F.d(we,"a",function(){return S});var ae=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(ae.a)())return null;var A=document.createElement("style");if((U=R.csp)===null||U===void 0?void 0:U.nonce){var y;A.nonce=(y=R.csp)===null||y===void 0?void 0:y.nonce}A.innerHTML=H;var v=I(R),d=v.firstChild;return R.prepend&&v.prepend?v.prepend(A):R.prepend&&d?v.insertBefore(A,d):v.appendChild(A),A}var C=new Map;function S(H,U){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},A=I(R);if(!C.has(A)){var y=j("",R),v=y.parentNode;C.set(A,v),v.removeChild(y)}var d=Array.from(C.get(A).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(Ke,we,F){"use strict";var ae=F("+L6B"),L=F("2/Rp"),I=F("0Owb"),j=F("k1fw"),C=F("q1tI"),S=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 S.a.createElement("section",{className:"tc animated fadeIn",style:Object(j.a)(Object(j.a)({},{color:"#999",margin:"200px auto"}),n)},S.a.createElement("img",{src:U.a}),S.a.createElement("p",{className:"mt20 font14"},a||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),s&&S.a.createElement(L.a,Object(I.a)({className:t,onClick:e},d),s),i&&i)};we.a=R},Bq7L:function(Ke,we){Ke.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANQAAAA8CAYAAAAeyZT3AAAAAXNSR0IArs4c6QAAEpJJREFUeF7tXQeYFdUV/mcbS1F6UUEsoLC7IGKNJWpERbEgSoxGo7HEQFDRWCAGgdASNBbEhglqsC1rAxVBNGg0qNgLsJRddmFhe3vby3uT7393ZmfeezOv7M57W3LP9/EtM3Pn3DPn3n/uvf85c58CKdID0gOOeUBxTJNUJD0gPQAJKNkJpAcc9EALoNRpCaqt3rh4QIkDvH/jxV/zuZZjrVy8uRzvSzDdrx3HxWnnEnz1eevhOf/79HpNdrAs6wrQr9VvtiMc+/kc0HSan9Nrq8Uzt9hquuZjv8kPev26r8x16X5VP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/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},DlQD:function(Ke,we,F){(function(ae,L){Ke.exports=L()})(this,function(){"use strict";function ae(ue,ne){for(var te=0;te<ne.length;te++){var K=ne[te];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(ue,K.key,K)}}function L(ue,ne,te){return ne&&ae(ue.prototype,ne),te&&ae(ue,te),ue}function I(ue,ne){if(!ue)return;if(typeof ue=="string")return j(ue,ne);var te=Object.prototype.toString.call(ue).slice(8,-1);if(te==="Object"&&ue.constructor&&(te=ue.constructor.name),te==="Map"||te==="Set")return Array.from(ue);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return j(ue,ne)}function j(ue,ne){(ne==null||ne>ue.length)&&(ne=ue.length);for(var te=0,K=new Array(ne);te<ne;te++)K[te]=ue[te];return K}function C(ue,ne){var te;if(typeof Symbol=="undefined"||ue[Symbol.iterator]==null){if(Array.isArray(ue)||(te=I(ue))||ne&&ue&&typeof ue.length=="number"){te&&(ue=te);var K=0;return function(){return K>=ue.length?{done:!0}:{done:!1,value:ue[K++]}}}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=ue[Symbol.iterator](),te.next.bind(te)}function S(ue,ne){return ne={exports:{}},ue(ne,ne.exports),ne.exports}var H=S(function(ue){function ne(){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(K){ue.exports.defaults=K}ue.exports={defaults:ne(),getDefaults:ne,changeDefaults:te}}),U=H.defaults,R=H.getDefaults,A=H.changeDefaults,y=/[&<>"']/,v=/[&<>"']/g,d=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,n={"&":"&","<":"<",">":">",'"':""","'":"'"},a=function(ne){return n[ne]};function s(ue,ne){if(ne){if(y.test(ue))return ue.replace(v,a)}else if(d.test(ue))return ue.replace(o,a);return ue}var e=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function t(ue){return ue.replace(e,function(ne,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(ue,ne){ue=ue.source||ue,ne=ne||"";var te={replace:function(Y,J){return J=J.source||J,J=J.replace(i,"$1"),ue=ue.replace(Y,J),te},getRegex:function(){return new RegExp(ue,ne)}};return te}var _=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(ue,ne,te){if(ue){var K;try{K=decodeURIComponent(t(te)).replace(_,"").toLowerCase()}catch(Y){return null}if(K.indexOf("javascript:")===0||K.indexOf("vbscript:")===0||K.indexOf("data:")===0)return null}ne&&!p.test(te)&&(te=l(ne,te));try{te=encodeURI(te).replace(/%25/g,"%")}catch(Y){return null}return te}var g={},h=/^[^:]+:\/*[^/]*$/,u=/^([^:]+:)[\s\S]*$/,r=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(ue,ne){g[" "+ue]||(h.test(ue)?g[" "+ue]=ue+"/":g[" "+ue]=D(ue,"/",!0)),ue=g[" "+ue];var te=ue.indexOf(":")===-1;return ne.substring(0,2)==="//"?te?ne:ue.replace(u,"$1")+ne:ne.charAt(0)==="/"?te?ne:ue.replace(r,"$1")+ne:ue+ne}var f={exec:function(){}};function c(ue){for(var ne=1,te,K;ne<arguments.length;ne++){te=arguments[ne];for(K in te)Object.prototype.hasOwnProperty.call(te,K)&&(ue[K]=te[K])}return ue}function x(ue,ne){var te=ue.replace(/\|/g,function(J,ee,pe){for(var Te=!1,Re=ee;--Re>=0&&pe[Re]==="\\";)Te=!Te;return Te?"|":" |"}),K=te.split(/ \|/),Y=0;if(K.length>ne)K.splice(ne);else for(;K.length<ne;)K.push("");for(;Y<K.length;Y++)K[Y]=K[Y].trim().replace(/\\\|/g,"|");return K}function D(ue,ne,te){var K=ue.length;if(K===0)return"";for(var Y=0;Y<K;){var J=ue.charAt(K-Y-1);if(J===ne&&!te)Y++;else if(J!==ne&&te)Y++;else break}return ue.substr(0,K-Y)}function O(ue,ne){if(ue.indexOf(ne[1])===-1)return-1;for(var te=ue.length,K=0,Y=0;Y<te;Y++)if(ue[Y]==="\\")Y++;else if(ue[Y]===ne[0])K++;else if(ue[Y]===ne[1]&&(K--,K<0))return Y;return-1}function B(ue){ue&&ue.sanitize&&!ue.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 w={escape:s,unescape:t,edit:T,cleanUrl:E,resolveUrl:l,noopTest:f,merge:c,splitCells:x,rtrim:D,findClosingBracket:O,checkSanitizeDeprecation:B},W=H.defaults,P=w.rtrim,z=w.splitCells,Q=w.escape,re=w.findClosingBracket;function le(ue,ne,te){var K=ne.href,Y=ne.title?Q(ne.title):null,J=ue[1].replace(/\\([\[\]])/g,"$1");return ue[0].charAt(0)!=="!"?{type:"link",raw:te,href:K,title:Y,text:J}:{type:"image",raw:te,href:K,title:Y,text:Q(J)}}function be(ue,ne){var te=ue.match(/^(\s+)(?:```)/);if(te===null)return ne;var K=te[1];return ne.split(`
|
|
`).map(function(Y){var J=Y.match(/^\s+/);if(J===null)return Y;var ee=J[0];return ee.length>=K.length?Y.slice(K.length):Y}).join(`
|
|
`)}var ye=function(){function ue(te){this.options=te||W}var ne=ue.prototype;return ne.space=function(K){var Y=this.rules.block.newline.exec(K);if(Y)return Y[0].length>1?{type:"space",raw:Y[0]}:{raw:`
|
|
`}},ne.code=function(K,Y){var J=this.rules.block.code.exec(K);if(J){var ee=Y[Y.length-1];if(ee&&ee.type==="paragraph")return{raw:J[0],text:J[0].trimRight()};var pe=J[0].replace(/^ {4}/gm,"");return{type:"code",raw:J[0],codeBlockStyle:"indented",text:this.options.pedantic?pe:P(pe,`
|
|
`)}}},ne.fences=function(K){var Y=this.rules.block.fences.exec(K);if(Y){var J=Y[0],ee=be(J,Y[3]||"");return{type:"code",raw:J,lang:Y[2]?Y[2].trim():Y[2],text:ee}}},ne.heading=function(K){var Y=this.rules.block.heading.exec(K);if(Y)return{type:"heading",raw:Y[0],depth:Y[1].length,text:Y[2]}},ne.nptable=function(K){var Y=this.rules.block.nptable.exec(K);if(Y){var J={type:"table",header:z(Y[1].replace(/^ *| *\| *$/g,"")),align:Y[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Y[3]?Y[3].replace(/\n$/,"").split(`
|
|
`):[],raw:Y[0]};if(J.header.length===J.align.length){var ee=J.align.length,pe;for(pe=0;pe<ee;pe++)/^ *-+: *$/.test(J.align[pe])?J.align[pe]="right":/^ *:-+: *$/.test(J.align[pe])?J.align[pe]="center":/^ *:-+ *$/.test(J.align[pe])?J.align[pe]="left":J.align[pe]=null;for(ee=J.cells.length,pe=0;pe<ee;pe++)J.cells[pe]=z(J.cells[pe],J.header.length);return J}}},ne.hr=function(K){var Y=this.rules.block.hr.exec(K);if(Y)return{type:"hr",raw:Y[0]}},ne.blockquote=function(K){var Y=this.rules.block.blockquote.exec(K);if(Y){var J=Y[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Y[0],text:J}}},ne.list=function(K){var Y=this.rules.block.list.exec(K);if(Y){for(var J=Y[0],ee=Y[2],pe=ee.length>1,Te=ee[ee.length-1]===")",Re={type:"list",raw:J,ordered:pe,start:pe?+ee.slice(0,-1):"",loose:!1,items:[]},Xe=Y[0].match(this.rules.block.item),nt=!1,Fe,bt,vt,rt,wt,Dt,xt,ct=Xe.length,yt=0;yt<ct;yt++)Fe=Xe[yt],J=Fe,bt=Fe.length,Fe=Fe.replace(/^ *([*+-]|\d+[.)]) */,""),~Fe.indexOf(`
|
|
`)&&(bt-=Fe.length,Fe=this.options.pedantic?Fe.replace(/^ {1,4}/gm,""):Fe.replace(new RegExp("^ {1,"+bt+"}","gm"),"")),yt!==ct-1&&(vt=this.rules.block.bullet.exec(Xe[yt+1])[0],(pe?vt.length===1||!Te&&vt[vt.length-1]===")":vt.length>1||this.options.smartLists&&vt!==ee)&&(rt=Xe.slice(yt+1).join(`
|
|
`),Re.raw=Re.raw.substring(0,Re.raw.length-rt.length),yt=ct-1)),wt=nt||/\n\n(?!\s*$)/.test(Fe),yt!==ct-1&&(nt=Fe.charAt(Fe.length-1)===`
|
|
`,wt||(wt=nt)),wt&&(Re.loose=!0),Dt=/^\[[ xX]\] /.test(Fe),xt=void 0,Dt&&(xt=Fe[1]!==" ",Fe=Fe.replace(/^\[[ xX]\] +/,"")),Re.items.push({type:"list_item",raw:J,task:Dt,checked:xt,loose:wt,text:Fe});return Re}},ne.html=function(K){var Y=this.rules.block.html.exec(K);if(Y)return{type:this.options.sanitize?"paragraph":"html",raw:Y[0],pre:!this.options.sanitizer&&(Y[1]==="pre"||Y[1]==="script"||Y[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Y[0]):Q(Y[0]):Y[0]}},ne.def=function(K){var Y=this.rules.block.def.exec(K);if(Y){Y[3]&&(Y[3]=Y[3].substring(1,Y[3].length-1));var J=Y[1].toLowerCase().replace(/\s+/g," ");return{tag:J,raw:Y[0],href:Y[2],title:Y[3]}}},ne.table=function(K){var Y=this.rules.block.table.exec(K);if(Y){var J={type:"table",header:z(Y[1].replace(/^ *| *\| *$/g,"")),align:Y[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Y[3]?Y[3].replace(/\n$/,"").split(`
|
|
`):[]};if(J.header.length===J.align.length){J.raw=Y[0];var ee=J.align.length,pe;for(pe=0;pe<ee;pe++)/^ *-+: *$/.test(J.align[pe])?J.align[pe]="right":/^ *:-+: *$/.test(J.align[pe])?J.align[pe]="center":/^ *:-+ *$/.test(J.align[pe])?J.align[pe]="left":J.align[pe]=null;for(ee=J.cells.length,pe=0;pe<ee;pe++)J.cells[pe]=z(J.cells[pe].replace(/^ *\| *| *\| *$/g,""),J.header.length);return J}}},ne.lheading=function(K){var Y=this.rules.block.lheading.exec(K);if(Y)return{type:"heading",raw:Y[0],depth:Y[2].charAt(0)==="="?1:2,text:Y[1]}},ne.paragraph=function(K){var Y=this.rules.block.paragraph.exec(K);if(Y)return{type:"paragraph",raw:Y[0],text:Y[1].charAt(Y[1].length-1)===`
|
|
`?Y[1].slice(0,-1):Y[1]}},ne.text=function(K,Y){var J=this.rules.block.text.exec(K);if(J){var ee=Y[Y.length-1];return ee&&ee.type==="text"?{raw:J[0],text:J[0]}:{type:"text",raw:J[0],text:J[0]}}},ne.escape=function(K){var Y=this.rules.inline.escape.exec(K);if(Y)return{type:"escape",raw:Y[0],text:Q(Y[1])}},ne.tag=function(K,Y,J){var ee=this.rules.inline.tag.exec(K);if(ee)return!Y&&/^<a /i.test(ee[0])?Y=!0:Y&&/^<\/a>/i.test(ee[0])&&(Y=!1),!J&&/^<(pre|code|kbd|script)(\s|>)/i.test(ee[0])?J=!0:J&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ee[0])&&(J=!1),{type:this.options.sanitize?"text":"html",raw:ee[0],inLink:Y,inRawBlock:J,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ee[0]):Q(ee[0]):ee[0]}},ne.link=function(K){var Y=this.rules.inline.link.exec(K);if(Y){var J=re(Y[2],"()");if(J>-1){var ee=Y[0].indexOf("!")===0?5:4,pe=ee+Y[1].length+J;Y[2]=Y[2].substring(0,J),Y[0]=Y[0].substring(0,pe).trim(),Y[3]=""}var Te=Y[2],Re="";if(this.options.pedantic){var Xe=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Te);Xe?(Te=Xe[1],Re=Xe[3]):Re=""}else Re=Y[3]?Y[3].slice(1,-1):"";Te=Te.trim().replace(/^<([\s\S]*)>$/,"$1");var nt=le(Y,{href:Te&&Te.replace(this.rules.inline._escapes,"$1"),title:Re&&Re.replace(this.rules.inline._escapes,"$1")},Y[0]);return nt}},ne.reflink=function(K,Y){var J;if((J=this.rules.inline.reflink.exec(K))||(J=this.rules.inline.nolink.exec(K))){var ee=(J[2]||J[1]).replace(/\s+/g," ");if(ee=Y[ee.toLowerCase()],!ee||!ee.href){var pe=J[0].charAt(0);return{type:"text",raw:pe,text:pe}}var Te=le(J,ee,J[0]);return Te}},ne.strong=function(K,Y,J){J===void 0&&(J="");var ee=this.rules.inline.strong.start.exec(K);if(ee&&(!ee[1]||ee[1]&&(J===""||this.rules.inline.punctuation.exec(J)))){Y=Y.slice(-1*K.length);var pe=ee[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;pe.lastIndex=0;for(var Te;(ee=pe.exec(Y))!=null;)if(Te=this.rules.inline.strong.middle.exec(Y.slice(0,ee.index+3)),Te)return{type:"strong",raw:K.slice(0,Te[0].length),text:K.slice(2,Te[0].length-2)}}},ne.em=function(K,Y,J){J===void 0&&(J="");var ee=this.rules.inline.em.start.exec(K);if(ee&&(!ee[1]||ee[1]&&(J===""||this.rules.inline.punctuation.exec(J)))){Y=Y.slice(-1*K.length);var pe=ee[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;pe.lastIndex=0;for(var Te;(ee=pe.exec(Y))!=null;)if(Te=this.rules.inline.em.middle.exec(Y.slice(0,ee.index+2)),Te)return{type:"em",raw:K.slice(0,Te[0].length),text:K.slice(1,Te[0].length-1)}}},ne.codespan=function(K){var Y=this.rules.inline.code.exec(K);if(Y){var J=Y[2].replace(/\n/g," "),ee=/[^ ]/.test(J),pe=J.startsWith(" ")&&J.endsWith(" ");return ee&&pe&&(J=J.substring(1,J.length-1)),J=Q(J,!0),{type:"codespan",raw:Y[0],text:J}}},ne.br=function(K){var Y=this.rules.inline.br.exec(K);if(Y)return{type:"br",raw:Y[0]}},ne.del=function(K){var Y=this.rules.inline.del.exec(K);if(Y)return{type:"del",raw:Y[0],text:Y[1]}},ne.autolink=function(K,Y){var J=this.rules.inline.autolink.exec(K);if(J){var ee,pe;return J[2]==="@"?(ee=Q(this.options.mangle?Y(J[1]):J[1]),pe="mailto:"+ee):(ee=Q(J[1]),pe=ee),{type:"link",raw:J[0],text:ee,href:pe,tokens:[{type:"text",raw:ee,text:ee}]}}},ne.url=function(K,Y){var J;if(J=this.rules.inline.url.exec(K)){var ee,pe;if(J[2]==="@")ee=Q(this.options.mangle?Y(J[0]):J[0]),pe="mailto:"+ee;else{var Te;do Te=J[0],J[0]=this.rules.inline._backpedal.exec(J[0])[0];while(Te!==J[0]);ee=Q(J[0]),J[1]==="www."?pe="http://"+ee:pe=ee}return{type:"link",raw:J[0],text:ee,href:pe,tokens:[{type:"text",raw:ee,text:ee}]}}},ne.inlineText=function(K,Y,J){var ee=this.rules.inline.text.exec(K);if(ee){var pe;return Y?pe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ee[0]):Q(ee[0]):ee[0]:pe=Q(this.options.smartypants?J(ee[0]):ee[0]),{type:"text",raw:ee[0],text:pe}}},ue}(),ie=w.noopTest,xe=w.edit,Ae=w.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:ie,table:ie,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=xe(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=xe(fe.item,"gm").replace(/bull/g,fe.bullet).getRegex(),fe.list=xe(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=xe(fe.html,"i").replace("comment",fe._comment).replace("tag",fe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fe.paragraph=xe(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=xe(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=xe(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=xe(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:xe(`^ *(?: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:ie,paragraph:xe(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 Z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ie,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:ie,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};Z._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Z.punctuation=xe(Z.punctuation).replace(/punctuation/g,Z._punctuation).getRegex(),Z._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Z._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Z.em.start=xe(Z.em.start).replace(/punctuation/g,Z._punctuation).getRegex(),Z.em.middle=xe(Z.em.middle).replace(/punctuation/g,Z._punctuation).replace(/overlapSkip/g,Z._overlapSkip).getRegex(),Z.em.endAst=xe(Z.em.endAst,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.em.endUnd=xe(Z.em.endUnd,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.strong.start=xe(Z.strong.start).replace(/punctuation/g,Z._punctuation).getRegex(),Z.strong.middle=xe(Z.strong.middle).replace(/punctuation/g,Z._punctuation).replace(/blockSkip/g,Z._blockSkip).getRegex(),Z.strong.endAst=xe(Z.strong.endAst,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.strong.endUnd=xe(Z.strong.endUnd,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.blockSkip=xe(Z._blockSkip,"g").getRegex(),Z.overlapSkip=xe(Z._overlapSkip,"g").getRegex(),Z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Z._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])?)+(?![-_])/,Z.autolink=xe(Z.autolink).replace("scheme",Z._scheme).replace("email",Z._email).getRegex(),Z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Z.tag=xe(Z.tag).replace("comment",fe._comment).replace("attribute",Z._attribute).getRegex(),Z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Z._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Z.link=xe(Z.link).replace("label",Z._label).replace("href",Z._href).replace("title",Z._title).getRegex(),Z.reflink=xe(Z.reflink).replace("label",Z._label).getRegex(),Z.reflinkSearch=xe(Z.reflinkSearch,"g").replace("reflink",Z.reflink).replace("nolink",Z.nolink).getRegex(),Z.normal=Ae({},Z),Z.pedantic=Ae({},Z.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:xe(/^!?\[(label)\]\((.*?)\)/).replace("label",Z._label).getRegex(),reflink:xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Z._label).getRegex()}),Z.gfm=Ae({},Z.normal,{escape:xe(Z.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),Z.gfm.url=xe(Z.gfm.url,"i").replace("email",Z.gfm._extended_email).getRegex(),Z.breaks=Ae({},Z.gfm,{br:xe(Z.br).replace("{2,}","*").getRegex(),text:xe(Z.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Ue={block:fe,inline:Z},$e=H.defaults,tt=Ue.block,Qe=Ue.inline;function it(ue){return ue.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 Pe(ue){var ne="",te,K,Y=ue.length;for(te=0;te<Y;te++)K=ue.charCodeAt(te),Math.random()>.5&&(K="x"+K.toString(16)),ne+="&#"+K+";";return ne}var We=function(){function ue(te){this.tokens=[],this.tokens.links=Object.create(null),this.options=te||$e,this.options.tokenizer=this.options.tokenizer||new ye,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var K={block:tt.normal,inline:Qe.normal};this.options.pedantic?(K.block=tt.pedantic,K.inline=Qe.pedantic):this.options.gfm&&(K.block=tt.gfm,this.options.breaks?K.inline=Qe.breaks:K.inline=Qe.gfm),this.tokenizer.rules=K}ue.lex=function(K,Y){var J=new ue(Y);return J.lex(K)};var ne=ue.prototype;return ne.lex=function(K){return K=K.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(K,this.tokens,!0),this.inline(this.tokens),this.tokens},ne.blockTokens=function(K,Y,J){Y===void 0&&(Y=[]),J===void 0&&(J=!0),K=K.replace(/^ +$/gm,"");for(var ee,pe,Te,Re;K;){if(ee=this.tokenizer.space(K)){K=K.substring(ee.raw.length),ee.type&&Y.push(ee);continue}if(ee=this.tokenizer.code(K,Y)){K=K.substring(ee.raw.length),ee.type?Y.push(ee):(Re=Y[Y.length-1],Re.raw+=`
|
|
`+ee.raw,Re.text+=`
|
|
`+ee.text);continue}if(ee=this.tokenizer.fences(K)){K=K.substring(ee.raw.length),Y.push(ee);continue}if(ee=this.tokenizer.heading(K)){K=K.substring(ee.raw.length),Y.push(ee);continue}if(ee=this.tokenizer.nptable(K)){K=K.substring(ee.raw.length),Y.push(ee);continue}if(ee=this.tokenizer.hr(K)){K=K.substring(ee.raw.length),Y.push(ee);continue}if(ee=this.tokenizer.blockquote(K)){K=K.substring(ee.raw.length),ee.tokens=this.blockTokens(ee.text,[],J),Y.push(ee);continue}if(ee=this.tokenizer.list(K)){for(K=K.substring(ee.raw.length),Te=ee.items.length,pe=0;pe<Te;pe++)ee.items[pe].tokens=this.blockTokens(ee.items[pe].text,[],!1);Y.push(ee);continue}if(ee=this.tokenizer.html(K)){K=K.substring(ee.raw.length),Y.push(ee);continue}if(J&&(ee=this.tokenizer.def(K))){K=K.substring(ee.raw.length),this.tokens.links[ee.tag]||(this.tokens.links[ee.tag]={href:ee.href,title:ee.title});continue}if(ee=this.tokenizer.table(K)){K=K.substring(ee.raw.length),Y.push(ee);continue}if(ee=this.tokenizer.lheading(K)){K=K.substring(ee.raw.length),Y.push(ee);continue}if(J&&(ee=this.tokenizer.paragraph(K))){K=K.substring(ee.raw.length),Y.push(ee);continue}if(ee=this.tokenizer.text(K,Y)){K=K.substring(ee.raw.length),ee.type?Y.push(ee):(Re=Y[Y.length-1],Re.raw+=`
|
|
`+ee.raw,Re.text+=`
|
|
`+ee.text);continue}if(K){var Xe="Infinite loop on byte: "+K.charCodeAt(0);if(this.options.silent){console.error(Xe);break}else throw new Error(Xe)}}return Y},ne.inline=function(K){var Y,J,ee,pe,Te,Re,Xe=K.length;for(Y=0;Y<Xe;Y++){Re=K[Y];switch(Re.type){case"paragraph":case"text":case"heading":{Re.tokens=[],this.inlineTokens(Re.text,Re.tokens);break}case"table":{for(Re.tokens={header:[],cells:[]},pe=Re.header.length,J=0;J<pe;J++)Re.tokens.header[J]=[],this.inlineTokens(Re.header[J],Re.tokens.header[J]);for(pe=Re.cells.length,J=0;J<pe;J++)for(Te=Re.cells[J],Re.tokens.cells[J]=[],ee=0;ee<Te.length;ee++)Re.tokens.cells[J][ee]=[],this.inlineTokens(Te[ee],Re.tokens.cells[J][ee]);break}case"blockquote":{this.inline(Re.tokens);break}case"list":{for(pe=Re.items.length,J=0;J<pe;J++)this.inline(Re.items[J].tokens);break}}}return K},ne.inlineTokens=function(K,Y,J,ee,pe){Y===void 0&&(Y=[]),J===void 0&&(J=!1),ee===void 0&&(ee=!1),pe===void 0&&(pe="");var Te,Re=K,Xe;if(this.tokens.links){var nt=Object.keys(this.tokens.links);if(nt.length>0)for(;(Xe=this.tokenizer.rules.inline.reflinkSearch.exec(Re))!=null;)nt.includes(Xe[0].slice(Xe[0].lastIndexOf("[")+1,-1))&&(Re=Re.slice(0,Xe.index)+"["+"a".repeat(Xe[0].length-2)+"]"+Re.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Xe=this.tokenizer.rules.inline.blockSkip.exec(Re))!=null;)Re=Re.slice(0,Xe.index)+"["+"a".repeat(Xe[0].length-2)+"]"+Re.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;K;){if(Te=this.tokenizer.escape(K)){K=K.substring(Te.raw.length),Y.push(Te);continue}if(Te=this.tokenizer.tag(K,J,ee)){K=K.substring(Te.raw.length),J=Te.inLink,ee=Te.inRawBlock,Y.push(Te);continue}if(Te=this.tokenizer.link(K)){K=K.substring(Te.raw.length),Te.type==="link"&&(Te.tokens=this.inlineTokens(Te.text,[],!0,ee)),Y.push(Te);continue}if(Te=this.tokenizer.reflink(K,this.tokens.links)){K=K.substring(Te.raw.length),Te.type==="link"&&(Te.tokens=this.inlineTokens(Te.text,[],!0,ee)),Y.push(Te);continue}if(Te=this.tokenizer.strong(K,Re,pe)){K=K.substring(Te.raw.length),Te.tokens=this.inlineTokens(Te.text,[],J,ee),Y.push(Te);continue}if(Te=this.tokenizer.em(K,Re,pe)){K=K.substring(Te.raw.length),Te.tokens=this.inlineTokens(Te.text,[],J,ee),Y.push(Te);continue}if(Te=this.tokenizer.codespan(K)){K=K.substring(Te.raw.length),Y.push(Te);continue}if(Te=this.tokenizer.br(K)){K=K.substring(Te.raw.length),Y.push(Te);continue}if(Te=this.tokenizer.del(K)){K=K.substring(Te.raw.length),Te.tokens=this.inlineTokens(Te.text,[],J,ee),Y.push(Te);continue}if(Te=this.tokenizer.autolink(K,Pe)){K=K.substring(Te.raw.length),Y.push(Te);continue}if(!J&&(Te=this.tokenizer.url(K,Pe))){K=K.substring(Te.raw.length),Y.push(Te);continue}if(Te=this.tokenizer.inlineText(K,ee,it)){K=K.substring(Te.raw.length),pe=Te.raw.slice(-1),Y.push(Te);continue}if(K){var Fe="Infinite loop on byte: "+K.charCodeAt(0);if(this.options.silent){console.error(Fe);break}else throw new Error(Fe)}}return Y},L(ue,null,[{key:"rules",get:function(){return{block:tt,inline:Qe}}}]),ue}(),Je=H.defaults,et=w.cleanUrl,Ye=w.escape,ze=function(){function ue(te){this.options=te||Je}var ne=ue.prototype;return ne.code=function(K,Y,J){var ee=(Y||"").match(/\S*/)[0];if(this.options.highlight){var pe=this.options.highlight(K,ee);pe!=null&&pe!==K&&(J=!0,K=pe)}return ee?'<pre><code class="'+this.options.langPrefix+Ye(ee,!0)+'">'+(J?K:Ye(K,!0))+`</code></pre>
|
|
`:"<pre><code>"+(J?K:Ye(K,!0))+`</code></pre>
|
|
`},ne.blockquote=function(K){return`<blockquote>
|
|
`+K+`</blockquote>
|
|
`},ne.html=function(K){return K},ne.heading=function(K,Y,J,ee){return this.options.headerIds?"<h"+Y+' id="'+this.options.headerPrefix+ee.slug(J)+'">'+K+"</h"+Y+`>
|
|
`:"<h"+Y+">"+K+"</h"+Y+`>
|
|
`},ne.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},ne.list=function(K,Y,J){var ee=Y?"ol":"ul",pe=Y&&J!==1?' start="'+J+'"':"";return"<"+ee+pe+`>
|
|
`+K+"</"+ee+`>
|
|
`},ne.listitem=function(K){return"<li>"+K+`</li>
|
|
`},ne.checkbox=function(K){return"<input "+(K?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ne.paragraph=function(K){return"<p>"+K+`</p>
|
|
`},ne.table=function(K,Y){return Y&&(Y="<tbody>"+Y+"</tbody>"),`<table>
|
|
<thead>
|
|
`+K+`</thead>
|
|
`+Y+`</table>
|
|
`},ne.tablerow=function(K){return`<tr>
|
|
`+K+`</tr>
|
|
`},ne.tablecell=function(K,Y){var J=Y.header?"th":"td",ee=Y.align?"<"+J+' align="'+Y.align+'">':"<"+J+">";return ee+K+"</"+J+`>
|
|
`},ne.strong=function(K){return"<strong>"+K+"</strong>"},ne.em=function(K){return"<em>"+K+"</em>"},ne.codespan=function(K){return"<code>"+K+"</code>"},ne.br=function(){return this.options.xhtml?"<br/>":"<br>"},ne.del=function(K){return"<del>"+K+"</del>"},ne.link=function(K,Y,J){if(K=et(this.options.sanitize,this.options.baseUrl,K),K===null)return J;var ee='<a href="'+Ye(K)+'"';return Y&&(ee+=' title="'+Y+'"'),ee+=">"+J+"</a>",ee},ne.image=function(K,Y,J){if(K=et(this.options.sanitize,this.options.baseUrl,K),K===null)return J;var ee='<img src="'+K+'" alt="'+J+'"';return Y&&(ee+=' title="'+Y+'"'),ee+=this.options.xhtml?"/>":">",ee},ne.text=function(K){return K},ue}(),He=function(){function ue(){}var ne=ue.prototype;return ne.strong=function(K){return K},ne.em=function(K){return K},ne.codespan=function(K){return K},ne.del=function(K){return K},ne.html=function(K){return K},ne.text=function(K){return K},ne.link=function(K,Y,J){return""+J},ne.image=function(K,Y,J){return""+J},ne.br=function(){return""},ue}(),ft=function(){function ue(){this.seen={}}var ne=ue.prototype;return ne.slug=function(K){var Y=K.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Y)){var J=Y;do this.seen[J]++,Y=J+"-"+this.seen[J];while(this.seen.hasOwnProperty(Y))}return this.seen[Y]=0,Y},ue}(),ht=H.defaults,lt=w.unescape,at=function(){function ue(te){this.options=te||ht,this.options.renderer=this.options.renderer||new ze,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new He,this.slugger=new ft}ue.parse=function(K,Y){var J=new ue(Y);return J.parse(K)};var ne=ue.prototype;return ne.parse=function(K,Y){Y===void 0&&(Y=!0);var J="",ee,pe,Te,Re,Xe,nt,Fe,bt,vt,rt,wt,Dt,xt,ct,yt,St,Mt,Ie,ot=K.length;for(ee=0;ee<ot;ee++){rt=K[ee];switch(rt.type){case"space":continue;case"hr":{J+=this.renderer.hr();continue}case"heading":{J+=this.renderer.heading(this.parseInline(rt.tokens),rt.depth,lt(this.parseInline(rt.tokens,this.textRenderer)),this.slugger);continue}case"code":{J+=this.renderer.code(rt.text,rt.lang,rt.escaped);continue}case"table":{for(bt="",Fe="",Re=rt.header.length,pe=0;pe<Re;pe++)Fe+=this.renderer.tablecell(this.parseInline(rt.tokens.header[pe]),{header:!0,align:rt.align[pe]});for(bt+=this.renderer.tablerow(Fe),vt="",Re=rt.cells.length,pe=0;pe<Re;pe++){for(nt=rt.tokens.cells[pe],Fe="",Xe=nt.length,Te=0;Te<Xe;Te++)Fe+=this.renderer.tablecell(this.parseInline(nt[Te]),{header:!1,align:rt.align[Te]});vt+=this.renderer.tablerow(Fe)}J+=this.renderer.table(bt,vt);continue}case"blockquote":{vt=this.parse(rt.tokens),J+=this.renderer.blockquote(vt);continue}case"list":{for(wt=rt.ordered,Dt=rt.start,xt=rt.loose,Re=rt.items.length,vt="",pe=0;pe<Re;pe++)yt=rt.items[pe],St=yt.checked,Mt=yt.task,ct="",yt.task&&(Ie=this.renderer.checkbox(St),xt?yt.tokens.length>0&&yt.tokens[0].type==="text"?(yt.tokens[0].text=Ie+" "+yt.tokens[0].text,yt.tokens[0].tokens&&yt.tokens[0].tokens.length>0&&yt.tokens[0].tokens[0].type==="text"&&(yt.tokens[0].tokens[0].text=Ie+" "+yt.tokens[0].tokens[0].text)):yt.tokens.unshift({type:"text",text:Ie}):ct+=Ie),ct+=this.parse(yt.tokens,xt),vt+=this.renderer.listitem(ct,Mt,St);J+=this.renderer.list(vt,wt,Dt);continue}case"html":{J+=this.renderer.html(rt.text);continue}case"paragraph":{J+=this.renderer.paragraph(this.parseInline(rt.tokens));continue}case"text":{for(vt=rt.tokens?this.parseInline(rt.tokens):rt.text;ee+1<ot&&K[ee+1].type==="text";)rt=K[++ee],vt+=`
|
|
`+(rt.tokens?this.parseInline(rt.tokens):rt.text);J+=Y?this.renderer.paragraph(vt):vt;continue}default:{var _t='Token with "'+rt.type+'" type was not found.';if(this.options.silent){console.error(_t);return}else throw new Error(_t)}}}return J},ne.parseInline=function(K,Y){Y=Y||this.renderer;var J="",ee,pe,Te=K.length;for(ee=0;ee<Te;ee++){pe=K[ee];switch(pe.type){case"escape":{J+=Y.text(pe.text);break}case"html":{J+=Y.html(pe.text);break}case"link":{J+=Y.link(pe.href,pe.title,this.parseInline(pe.tokens,Y));break}case"image":{J+=Y.image(pe.href,pe.title,pe.text);break}case"strong":{J+=Y.strong(this.parseInline(pe.tokens,Y));break}case"em":{J+=Y.em(this.parseInline(pe.tokens,Y));break}case"codespan":{J+=Y.codespan(pe.text);break}case"br":{J+=Y.br();break}case"del":{J+=Y.del(this.parseInline(pe.tokens,Y));break}case"text":{J+=Y.text(pe.text);break}default:{var Re='Token with "'+pe.type+'" type was not found.';if(this.options.silent){console.error(Re);return}else throw new Error(Re)}}}return J},ue}(),mt=w.merge,pt=w.checkSanitizeDeprecation,me=w.escape,Ce=H.getDefaults,De=H.changeDefaults,Ne=H.defaults;function Ee(ue,ne,te){if(typeof ue=="undefined"||ue===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ue!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ue)+", string expected");if(typeof ne=="function"&&(te=ne,ne=null),ne=mt({},Ee.defaults,ne||{}),pt(ne),te){var K=ne.highlight,Y;try{Y=We.lex(ue,ne)}catch(Te){return te(Te)}var J=function(Re){var Xe;if(!Re)try{Xe=at.parse(Y,ne)}catch(nt){Re=nt}return ne.highlight=K,Re?te(Re):te(null,Xe)};if(!K||K.length<3)return J();if(delete ne.highlight,!Y.length)return J();var ee=0;Ee.walkTokens(Y,function(Te){Te.type==="code"&&(ee++,setTimeout(function(){K(Te.text,Te.lang,function(Re,Xe){if(Re)return J(Re);Xe!=null&&Xe!==Te.text&&(Te.text=Xe,Te.escaped=!0),ee--,ee===0&&J()})},0))}),ee===0&&J();return}try{var pe=We.lex(ue,ne);return ne.walkTokens&&Ee.walkTokens(pe,ne.walkTokens),at.parse(pe,ne)}catch(Te){if(Te.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,ne.silent)return"<p>An error occurred:</p><pre>"+me(Te.message+"",!0)+"</pre>";throw Te}}Ee.options=Ee.setOptions=function(ue){return mt(Ee.defaults,ue),De(Ee.defaults),Ee},Ee.getDefaults=Ce,Ee.defaults=Ne,Ee.use=function(ue){var ne=mt({},ue);if(ue.renderer&&function(){var K=Ee.defaults.renderer||new ze,Y=function(pe){var Te=K[pe];K[pe]=function(){for(var Re=arguments.length,Xe=new Array(Re),nt=0;nt<Re;nt++)Xe[nt]=arguments[nt];var Fe=ue.renderer[pe].apply(K,Xe);return Fe===!1&&(Fe=Te.apply(K,Xe)),Fe}};for(var J in ue.renderer)Y(J);ne.renderer=K}(),ue.tokenizer&&function(){var K=Ee.defaults.tokenizer||new ye,Y=function(pe){var Te=K[pe];K[pe]=function(){for(var Re=arguments.length,Xe=new Array(Re),nt=0;nt<Re;nt++)Xe[nt]=arguments[nt];var Fe=ue.tokenizer[pe].apply(K,Xe);return Fe===!1&&(Fe=Te.apply(K,Xe)),Fe}};for(var J in ue.tokenizer)Y(J);ne.tokenizer=K}(),ue.walkTokens){var te=Ee.defaults.walkTokens;ne.walkTokens=function(K){ue.walkTokens(K),te&&te(K)}}Ee.setOptions(ne)},Ee.walkTokens=function(ue,ne){for(var te=C(ue),K;!(K=te()).done;){var Y=K.value;ne(Y);switch(Y.type){case"table":{for(var J=C(Y.tokens.header),ee;!(ee=J()).done;){var pe=ee.value;Ee.walkTokens(pe,ne)}for(var Te=C(Y.tokens.cells),Re;!(Re=Te()).done;)for(var Xe=Re.value,nt=C(Xe),Fe;!(Fe=nt()).done;){var bt=Fe.value;Ee.walkTokens(bt,ne)}break}case"list":{Ee.walkTokens(Y.items,ne);break}default:Y.tokens&&Ee.walkTokens(Y.tokens,ne)}}},Ee.Parser=at,Ee.parser=at.parse,Ee.Renderer=ze,Ee.TextRenderer=He,Ee.Lexer=We,Ee.lexer=We.lex,Ee.Tokenizer=ye,Ee.Slugger=ft,Ee.parse=Ee;var Le=Ee;return Le})},FOrL:function(Ke,we,F){Ke.exports=F.p+"static/nodata.a6b3f948.png"},IBYe:function(Ke,we,F){"use strict";function ae(L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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(Ke,we,F){"use strict";F.d(we,"b",function(){return i}),F.d(we,"a",function(){return _});var ae=F("1OyB"),L=F("vuIU"),I=F("Ji7U"),j=F("LK+K"),C=F("q1tI"),S=F("rePB"),H=F("Ff2n"),U=F("ODXe"),R=F("4IlW"),A=F("bX4T"),y=F("YrtM"),v=F("TSYQ"),d=F.n(v),o=F("+nKL"),n=F("8OUc"),a=function(z,Q){var re=z.prefixCls,le=z.id,be=z.flattenOptions,ye=z.childrenAsData,ie=z.values,xe=z.searchValue,Ae=z.multiple,fe=z.defaultActiveFirstOption,Z=z.height,Ue=z.itemHeight,$e=z.notFoundContent,tt=z.open,Qe=z.menuItemSelectedIcon,it=z.virtual,Pe=z.onSelect,We=z.onToggleOpen,Je=z.onActiveValue,et=z.onScroll,Ye=z.onMouseEnter,ze="".concat(re,"-item"),He=Object(y.a)(function(){return be},[tt,be],function(Le,ue){return ue[0]&&Le[1]!==ue[1]}),ft=C.useRef(null),ht=function(ue){ue.preventDefault()},lt=function(ue){ft.current&&ft.current.scrollTo({index:ue})},at=function(ue){for(var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,te=He.length,K=0;K<te;K+=1){var Y=(ue+K*ne+te)%te,J=He[Y],ee=J.group,pe=J.data;if(!ee&&!pe.disabled)return Y}return-1},mt=C.useState(function(){return at(0)}),pt=Object(U.a)(mt,2),me=pt[0],Ce=pt[1],De=function(ue){Ce(ue);var ne=He[ue];if(!ne){Je(null,-1);return}Je(ne.data.value,ue)};C.useEffect(function(){De(fe!==!1?at(0):-1)},[He.length,xe]),C.useEffect(function(){var Le=setTimeout(function(){if(!Ae&&tt&&ie.size===1){var ue=Array.from(ie)[0],ne=He.findIndex(function(te){var K=te.data;return K.value===ue});De(ne),lt(ne)}});return function(){return clearTimeout(Le)}},[tt]);var Ne=function(ue){ue!==void 0&&Pe(ue,{selected:!ie.has(ue)}),Ae||We(!1)};if(C.useImperativeHandle(Q,function(){return{onKeyDown:function(ue){var ne=ue.which;switch(ne){case R.a.UP:case R.a.DOWN:{var te=0;if(ne===R.a.UP?te=-1:ne===R.a.DOWN&&(te=1),te!==0){var K=at(me+te,te);lt(K),De(K)}break}case R.a.ENTER:{var Y=He[me];Y&&!Y.data.disabled?Ne(Y.data.value):Ne(void 0),tt&&ue.preventDefault();break}case R.a.ESC:We(!1)}},onKeyUp:function(){},scrollTo:function(ue){lt(ue)}}}),He.length===0)return C.createElement("div",{role:"listbox",id:"".concat(le,"_list"),className:"".concat(ze,"-empty"),onMouseDown:ht},$e);function Ee(Le){var ue=He[Le];if(!ue)return null;var ne=ue.data||{},te=ne.value,K=ne.label,Y=ne.children,J=Object(A.a)(ne,!0),ee=ye?Y:K;return ue?C.createElement("div",Object.assign({"aria-label":typeof ee=="string"?ee:null},J,{key:Le,role:"option",id:"".concat(le,"_list_").concat(Le),"aria-selected":ie.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"}},Ee(me-1),Ee(me),Ee(me+1)),C.createElement(o.a,{itemKey:"key",ref:ft,data:He,height:Z,itemHeight:Ue,fullHeight:!1,onMouseDown:ht,onScroll:et,virtual:it,onMouseEnter:Ye},function(Le,ue){var ne,te=Le.group,K=Le.groupOption,Y=Le.data,J=Y.label,ee=Y.key;if(te)return C.createElement("div",{className:d()(ze,"".concat(ze,"-group"))},J!==void 0?J:ee);var pe=Y.disabled,Te=Y.value,Re=Y.title,Xe=Y.children,nt=Y.style,Fe=Y.className,bt=Object(H.a)(Y,["disabled","value","title","children","style","className"]),vt=ie.has(Te),rt="".concat(ze,"-option"),wt=d()(ze,rt,Fe,(ne={},Object(S.a)(ne,"".concat(rt,"-grouped"),K),Object(S.a)(ne,"".concat(rt,"-active"),me===ue&&!pe),Object(S.a)(ne,"".concat(rt,"-disabled"),pe),Object(S.a)(ne,"".concat(rt,"-selected"),vt),ne)),Dt=ye?Xe:J,xt=!Qe||typeof Qe=="function"||vt;return C.createElement("div",Object.assign({},bt,{"aria-selected":vt,className:wt,title:Re,onMouseMove:function(){if(me===ue||pe)return;De(ue)},onClick:function(){pe||Ne(Te)},style:nt}),C.createElement("div",{className:"".concat(rt,"-content")},Dt||Te),C.isValidElement(Qe)||vt,xt&&C.createElement(n.a,{className:"".concat(ze,"-option-state"),customizeIcon:Qe,customizeIconProps:{isSelected:vt}},vt?"\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,p=F("VTBJ"),E=F("Zm9Q");function g(P){var z=P.key,Q=P.props,re=Q.children,le=Q.value,be=Object(H.a)(Q,["children","value"]);return Object(p.a)({key:z,value:le!==void 0?le:z,children:re},be)}function h(P){var z=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,be=Q.key,ye=Q.props,ie=ye.children,xe=Object(H.a)(ye,["children"]);return z||!le?g(Q):Object(p.a)(Object(p.a)({key:"__RC_SELECT_GRP__".concat(be===null?re:be,"__"),label:be},xe),{},{options:h(ie)})}).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 z=P.mode,Q=P.options,re=P.children,le=P.backfill,be=P.allowClear,ye=P.placeholder,ie=P.getInputElement,xe=P.showSearch,Ae=P.onSearch,fe=P.defaultOpen,Z=P.autoFocus,Ue=P.labelInValue,$e=P.value,tt=P.inputValue,Qe=P.optionLabelProp,it=z==="multiple"||z==="tags",Pe=xe!==void 0?xe:it||z==="combobox",We=Q||h(re);if(Object(f.a)(z!=="tags"||We.every(function(ze){return!ze.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),z==="tags"||z==="combobox"){var Je=We.some(function(ze){return ze.options?ze.options.some(function(He){return typeof("value"in He?He.value:He.key)=="number"}):typeof("value"in ze?ze.value:ze.key)=="number"});Object(f.a)(!Je,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(f.a)(z!=="combobox"||!Qe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(f.a)(z==="combobox"||!le,"`backfill` only works with `combobox` mode."),Object(f.a)(z==="combobox"||!ie,"`getInputElement` only work with `combobox` mode."),Object(f.b)(z!=="combobox"||!ie||!be||!ye,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ae&&!Pe&&z!=="combobox"&&z!=="tags"&&Object(f.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(f.b)(!fe||Z,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),$e!=null){var et=Object(c.d)($e);Object(f.a)(!Ue||et.every(function(ze){return Object(l.a)(ze)==="object"&&("key"in ze||"value"in ze)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(f.a)(!it||Array.isArray($e),"`value` should be array when `mode` is `multiple` or `tags`")}if(re){var Ye=null;Object(E.a)(re).some(function(ze){if(!C.isValidElement(ze)||!ze.type)return!1;var He=ze.type;if(He.isSelectOption)return!1;if(He.isSelectOptGroup){var ft=Object(E.a)(ze.props.children).every(function(ht){return!C.isValidElement(ht)||!ze.type||ht.type.isSelectOption?!0:(Ye=ht.type,!1)});return!ft}return Ye=He,!0}),Ye&&Object(f.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ye.displayName||Ye.name||Ye,"`.")),Object(f.a)(tt===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var D=x,O=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 z=Object(j.a)(Q);function Q(){var re;return Object(ae.a)(this,Q),re=z.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(O,Object.assign({ref:this.selectRef},this.props))}}]),Q}(C.Component);B.Option=i,B.OptGroup=_;var w=B,W=we.c=w},LicW:function(Ke,we,F){"use strict";var ae=F("T2oS"),L=F("W9HT"),I=F("5Dmo"),j=F("3S7+"),C=F("q1tI"),S=F.n(C),H=F("ZJlW"),U=F.n(H),R=F("m3rI"),A=F("TSYQ"),y=F.n(A),v=F("1vsH"),d=F("z4EP"),o=F.n(d),n=F("+GGh"),a=F.n(n),s=F("cFMs"),e=F.n(s),t=F("BdwD"),i=function(_){var p=_.className,E=_.dataSource,g=E===void 0?[]:E,h=_.col,u=h===void 0?4:h,r=_.right,l=_.bottom,f=l===void 0?23:l,c=_.precision,x=c===void 0?0:c,D=_.wrapWidth,O=D===void 0?1200:D,B=_.trackEventItems,w=_.loading,W=Math.floor((O-(u-1)*r)/u);return S.a.createElement(L.a,{spinning:w},S.a.createElement("div",{className:y()(U.a.list,p)},!!g.length&&g.map(function(P,z){var Q=P.name,re=P.id,le=P.identifier,be=P.featured,ye=P.school_name,ie=P.image_url,xe=P.excellent;return S.a.createElement("div",{key:re,className:U.a.wrap,style:{width:W,marginRight:(1+z)%u===0?0:r+x,marginBottom:f}},S.a.createElement("a",{target:"_blank",href:"/paths/".concat(le),className:U.a.li,onClick:function(fe){fe.preventDefault(),B&&Object(v.cb)([B]),Object(v.S)("/paths/".concat(le))}},S.a.createElement("div",{className:U.a.img},S.a.createElement("img",{className:U.a.cover,src:"".concat(R.a.IMG_SERVER,"/").concat(ie)}),be===1&&S.a.createElement("img",{className:U.a.sign,src:o.a}),be===2&&S.a.createElement("img",{className:U.a.sign,src:""}),be===3&&S.a.createElement("img",{className:U.a.sign,src:a.a}),be===4&&S.a.createElement("img",{className:U.a.sign,src:""}),be===5&&S.a.createElement("img",{className:U.a.sign,src:e.a})),S.a.createElement("div",{className:U.a.name},S.a.createElement(j.a,{title:Q},S.a.createElement("span",{className:U.a.e},Q))),S.a.createElement(j.a,{title:"\u53D1\u5E03\u5355\u4F4D\uFF1A".concat(ye)},S.a.createElement("div",{className:U.a.unit},S.a.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),ye)),S.a.createElement("div",{className:U.a.tags},S.a.createElement(j.a,{placement:"bottom",title:"\u7AE0\u8282\u6570"},S.a.createElement("span",null,S.a.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),S.a.createElement("span",null,P.stages_count))),S.a.createElement(j.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},S.a.createElement("span",null,S.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),S.a.createElement("span",null,P.members_count))),xe&&S.a.createElement("div",{className:U.a.tag},"\u5F00\u653E\u8BFE\u7A0B"))))}),!g.length&&S.a.createElement(t.a,null)))};we.a=i},MEgm:function(Ke,we){Ke.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjq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T0RgMX+xjU7myBWAy7y0+EA3/0V649Hw9Lu3qSZ2nQKA7ahLYD6pYEkXiHVtSivqztrmv5RqSKzv/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(Ke,we,F){Ke.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(Ke,we,F){"use strict";F.d(we,"a",function(){return U}),F.d(we,"h",function(){return n}),F.d(we,"l",function(){return t}),F.d(we,"e",function(){return g}),F.d(we,"i",function(){return l}),F.d(we,"j",function(){return fe}),F.d(we,"c",function(){return Z.a}),F.d(we,"b",function(){return it}),F.d(we,"g",function(){return et}),F.d(we,"f",function(){return ft}),F.d(we,"k",function(){return Ne}),F.d(we,"d",function(){return ne});var ae=F("q1tI"),L=F.n(ae),I=F("NQs2"),j=F.n(I),C=F("ygoZ"),S=F.n(C),H=function(K){var Y=K.dataSource,J=Y===void 0?[]:Y,ee=K.img,pe=K.imgWidth,Te=pe===void 0?346:pe,Re=K.title,Xe=K.sunTitle,nt=K.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,Re),L.a.createElement("span",null,Xe)),J.length>0&&L.a.createElement("div",{className:j.a.btns},J.map(function(Fe,bt){return L.a.createElement("div",{key:bt,onClick:Fe.click},Fe.name,Fe.sign?L.a.createElement("img",{src:S.a,width:39}):null)})),nt),L.a.createElement("img",{style:{marginTop:33,marginRight:38},src:ee,width:Te})))},U=H,R=F("tJVT"),A=F("6nfa"),y=F.n(A),v=F("TSYQ"),d=F.n(v),o=function(K){var Y=K.dataSource,J=Y===void 0?[]:Y,ee=K.value,pe=K.onChange,Te=K.className,Re=K.title,Xe=K.titleWidth,nt=Xe===void 0?41:Xe,Fe=K.style,bt=Fe===void 0?{}:Fe,vt=K.fontColor,rt=vt===void 0?"#6A7283":vt,wt=Object(ae.useState)(0),Dt=Object(R.a)(wt,2),xt=Dt[0],ct=Dt[1],yt=Object(ae.useState)(!1),St=Object(R.a)(yt,2),Mt=St[0],Ie=St[1],ot=Object(ae.useRef)(null);return Object(ae.useEffect)(function(){if(J.length!==0){var _t;(ot==null||((_t=ot.current)===null||_t===void 0)?void 0:_t.clientHeight)>92?ct(1):ct(0)}J.length===0&&ct(0)},[J]),L.a.createElement("div",{className:d()(y.a.row,Te),style:bt},L.a.createElement("div",{style:{width:nt,marginTop:Mt?12:4},className:y.a.title},Re),L.a.createElement("div",{className:Mt?"".concat(y.a.tagsWrap," ").concat(y.a.tagsBorderWrap):y.a.tagsWrap},L.a.createElement("div",{className:y.a.bar,style:xt>0?{height:xt===1?92:"auto",overflow:xt===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},L.a.createElement("div",{className:y.a.name,ref:ot},J==null?void 0:J.map(function(_t){return L.a.createElement("span",{onClick:function(){return pe(_t.id)},key:_t.id,title:_t.name,style:{color:rt},className:ee===_t.id?y.a.active:""},_t.name)}))),!!xt&&L.a.createElement(ae.Fragment,null,xt===1?L.a.createElement("div",{onClick:function(){var Et;ct(2),(ot==null||((Et=ot.current)===null||Et===void 0)?void 0:Et.clientHeight)>205?Ie(!0):Ie(!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(){ct(1),Ie(!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(K){var Y=K.dataSource,J=Y===void 0?[]:Y,ee=K.value,pe=K.onChange,Te=K.className;return L.a.createElement("div",{className:d()(s.a.tabs,Te)},J.map(function(Re){return L.a.createElement("span",{onClick:function(){return pe(Re.id)},className:ee===Re.id?s.a.active:"",key:Re.id},Re.name)}))},t=e,i=F("5NDa"),T=F("5rEg"),_=F("KOXS"),p=F.n(_),E=function(K){var Y,J=K.dataSource,ee=J===void 0?[]:J,pe=K.value,Te=K.onChange,Re=K.className,Xe=K.style,nt=Xe===void 0?{}:Xe,Fe=K.placeholder,bt=Object(ae.useState)(""),vt=Object(R.a)(bt,2),rt=vt[0],wt=vt[1],Dt=Object(ae.useState)(""),xt=Object(R.a)(Dt,2),ct=xt[0],yt=xt[1];Object(ae.useEffect)(function(){var Ie;(Ie=JSON.stringify(pe))!==null&&Ie!==void 0&&Ie.includes("{")?(wt(pe.id),yt(pe.value)):yt(pe)},[pe]);var St=function(){Te(ct,rt||null)},Mt=function(ot){if(ot===rt)return;wt(ot),Te(ct,ot)};return L.a.createElement("div",{className:d()(p.a.input,Re),style:nt},!!ee.length&&L.a.createElement("div",{className:p.a.dropdown},L.a.createElement("div",{className:p.a.text},(Y=ee.find(function(Ie){return Ie.id===rt}))===null||Y===void 0?void 0:Y.name,L.a.createElement("i",{className:"iconfont icon-zhankai4"}),L.a.createElement("b",{className:p.a.b1}),L.a.createElement("b",{className:p.a.b2})),L.a.createElement("div",{className:p.a.menu},ee.map(function(Ie,ot){return L.a.createElement("div",{key:ot,onClick:function(){return Mt(Ie.id)}},Ie.name)}))),L.a.createElement(T.a,{onPressEnter:St,value:ct,onChange:function(ot){return yt(ot.target.value)},bordered:!1,placeholder:Fe}),L.a.createElement("i",{onClick:St,className:"iconfont icon-sousuo9 font14 pl10 current"}))},g=E,h=F("f9pc"),u=F.n(h),r=function(K){var Y=K.value,J=K.onChange,ee=K.className,pe=K.total,Te=K.pageSize,Re=K.style,Xe=Re===void 0?{}:Re,nt=Y<2,Fe=Y>=Math.ceil(pe/Te);return pe<=Te?L.a.createElement(L.a.Fragment,null):L.a.createElement("div",{className:d()(u.a.quickPager,ee),style:Xe},L.a.createElement("div",{onClick:function(){nt||J(Y-1,"prev")},className:nt?u.a.disabled:""},"\u4E0A\u4E00\u9875"),L.a.createElement("div",{onClick:function(){Fe||J(Y+1,"next")},className:Fe?u.a.disabled:""},"\u4E0B\u4E00\u9875"))},l=r,f=F("T2oS"),c=F("W9HT"),x=F("pC0b"),D=F("GzdX"),O=F("5Dmo"),B=F("3S7+"),w=F("Oe0F"),W=F.n(w),P=F("m3rI"),z=F("1vsH"),Q=F("JAbv"),re=F.n(Q),le=F("Bq7L"),be=F.n(le),ye=F("MEgm"),ie=F.n(ye),xe=F("BdwD"),Ae=function(K){var Y=K.className,J=K.dataSource,ee=J===void 0?[]:J,pe=K.col,Te=pe===void 0?4:pe,Re=K.right,Xe=K.bottom,nt=Xe===void 0?23:Xe,Fe=K.precision,bt=Fe===void 0?0:Fe,vt=K.wrapWidth,rt=vt===void 0?1200:vt,wt=K.trackEventItems,Dt=K.loading,xt=Math.floor((rt-(Te-1)*Re)/Te);return L.a.createElement(c.a,{spinning:Dt},L.a.createElement("div",{className:d()(W.a.list,Y)},!!ee.length&&ee.map(function(ct,yt){var St=ct.name,Mt=ct.id,Ie=ct.identifier,ot=ct.power,_t=ct.cover_image_id,Et=ct.pic;return L.a.createElement("div",{className:W.a.wrap,key:Mt,style:{width:xt,marginRight:(1+yt)%Te===0?0:Re+bt,marginBottom:nt}},L.a.createElement("a",{target:"_blank",href:"/shixuns/".concat(Ie,"/challenges"),className:W.a.li,onClick:function(wn){wn.preventDefault(),wt&&Object(z.cb)([wt]),ot&&Object(z.S)("/shixuns/".concat(Ie,"/challenges"))}},L.a.createElement("div",{className:W.a.img},L.a.createElement("img",{className:W.a.cover,src:_t?"".concat(P.a.API_SERVER,"/api/attachments/").concat(_t):"".concat(P.a.IMG_SERVER,"/").concat(Et)}),ct.is_jupyter&&L.a.createElement("img",{className:W.a.sign,src:re.a}),ct.is_jupyter_lab&&L.a.createElement("img",{className:W.a.sign,src:be.a}),ct.is_unity_3d&&L.a.createElement("img",{className:W.a.sign,src:ie.a})),L.a.createElement("div",{className:W.a.name},L.a.createElement(B.a,{title:St||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},L.a.createElement("span",{className:W.a.e},St||"\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,ct.challenges_count))),!!ct.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,ct.myshixuns_count))),L.a.createElement(B.a,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},L.a.createElement("span",null,L.a.createElement("span",null,ct.level))),L.a.createElement("div",{className:W.a.rate},L.a.createElement(D.a,{allowHalf:!0,disabled:!0,defaultValue:ct.score_info}),L.a.createElement("span",null,"\xA0",ct.score_info?"".concat(ct.score_info,"\u5206"):"5\u5206")))),!ot&&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")))}),!ee.length&&L.a.createElement(xe.a,null)))},fe=Ae,Z=F("LicW"),Ue=F("iL++"),$e=F.n(Ue),tt=F("xiVL"),Qe=function(K){var Y=K.className,J=K.dataSource,ee=J===void 0?[]:J,pe=K.col,Te=pe===void 0?4:pe,Re=K.right,Xe=K.bottom,nt=Xe===void 0?23:Xe,Fe=K.precision,bt=Fe===void 0?0:Fe,vt=K.wrapWidth,rt=vt===void 0?1200:vt,wt=K.trackEventItems,Dt=K.loading,xt=Math.floor((rt-(Te-1)*Re)/Te);return L.a.createElement(c.a,{spinning:Dt},L.a.createElement("div",{className:d()($e.a.list,Y)},!!ee.length&&ee.map(function(ct,yt){var St=ct.subject_identifier,Mt=ct.id,Ie=ct.identifier,ot=ct.power,_t=ct.is_public!=0&&ct.is_public;return L.a.createElement("div",{className:$e.a.wrap,key:Mt,style:{width:xt,marginRight:(1+yt)%Te===0?0:Re+bt,marginBottom:nt}},L.a.createElement("a",{className:$e.a.li,onClick:function(Ut){Ut.preventDefault()}},L.a.createElement("div",{className:$e.a.top},L.a.createElement(B.a,{title:ct.name},L.a.createElement("div",{className:$e.a.name},ct.name)),L.a.createElement("img",{className:$e.a.img,src:P.a.IMG_SERVER+"/images/"+ct.avatar_url}),L.a.createElement("div",{className:$e.a.text},ct.creator),St&&L.a.createElement("div",{className:$e.a.btns},L.a.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),L.a.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),_t&&L.a.createElement("div",{className:$e.a.sign},"\u516C\u5F00")),L.a.createElement("div",{className:$e.a.bottom},ct.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,ct.visits))),ct.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"}),ct.course_members_count)),ct.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"}),ct.tasks_count)),ct.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:$e.a.lockWrap},ct.is_accessible?L.a.createElement(L.a.Fragment,null,St&&L.a.createElement("div",{onClick:function(){return Object(z.S)("/paths/".concat(St))}},"\u8FDB\u5165\u5B9E\u8DF5\u8BFE\u7A0B"),L.a.createElement("div",{onClick:function(Ut){wt&&Object(z.cb)([wt]),Object(z.S)(ct.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"))))}),!ee.length&&L.a.createElement(xe.a,null)))},it=Qe,Pe=F("f0W+"),We=F.n(Pe),Je=function(K){var Y=K.dataSource,J=Y===void 0?[]:Y,ee=K.value,pe=K.onChange,Te=K.className,Re=K.style,Xe=Re===void 0?{}:Re,nt=K.tabBarExtraContent;return L.a.createElement("div",{className:d()(We.a.tabs,Te),style:Xe},L.a.createElement("div",{className:We.a.tabsWrap},J.map(function(Fe,bt){return L.a.createElement("div",{onClick:function(){return pe(Fe.id)},className:ee===Fe.id?We.a.active:"",key:bt},Fe.name)})),L.a.createElement("div",{className:We.a.tabBar},nt))},et=Je,Ye=F("9JIy"),ze=F.n(Ye),He=function(K){var Y=K.className,J=K.style,ee=J===void 0?{}:J,pe=K.children;return L.a.createElement("div",{className:d()(ze.a.table,Y),style:ee},pe)},ft=He,ht=F("qVdP"),lt=F("jsC+"),at=F("lUTK"),mt=F("BvKs"),pt=F("8WcF"),me=F.n(pt),Ce=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}],De=function(K){var Y,J=K.sortValue,ee=K.dropValue,pe=K.className,Te=K.onSort,Re=K.onDrop,Xe=K.dataSource,nt=Xe===void 0?Ce:Xe;return L.a.createElement("div",{className:d()(me.a.orderWrap,pe)},L.a.createElement(lt.a,{overlay:L.a.createElement(mt.a,null,nt.map(function(Fe,bt){return L.a.createElement(mt.a.Item,{key:bt,onClick:function(){return Re(Fe.id)}},Fe.name)}))},L.a.createElement("span",{className:me.a.orderTextWrap},(Y=nt.find(function(Fe){return ee===Fe.id}))===null||Y===void 0?void 0:Y.name)),L.a.createElement("span",{className:me.a.orderIconWrap},L.a.createElement("span",{className:me.a.orderAsc},L.a.createElement("i",{className:J==="asc"?"iconfont icon-sanjiaoxing-up font12 ".concat(me.a.cursorPointer," ").concat(me.a.active):"iconfont icon-sanjiaoxing-up font12 ".concat(me.a.cursorPointer),onClick:function(){return Te(J==="asc"?"desc":"asc")}})),L.a.createElement("span",{className:me.a.orderDesc},L.a.createElement("i",{className:J==="desc"?"iconfont icon-sanjiaoxing-down font12 ".concat(me.a.cursorPointer," ").concat(me.a.active):"iconfont icon-sanjiaoxing-down font12 ".concat(me.a.cursorPointer),onClick:function(){return Te(J==="asc"?"desc":"asc")}}))))},Ne=De,Ee=F("siWv"),Le=F.n(Ee),ue=function(K){var Y=K.className,J=K.style,ee=K.children,pe=K.onClick;return L.a.createElement("div",{onClick:pe,className:d()(Le.a.btn,Y),style:J},ee)},ne=ue},NvD2:function(Ke,we,F){"use strict";F.d(we,"a",function(){return S});var ae=F("Kwbf");function L(H,U){var R=new Set;return H.forEach(function(A){U.has(A)||R.add(A)}),R}function I(H){var U=H||{},R=U.disabled,A=U.disableCheckbox,y=U.checkable;return!!(R||A)||y===!1}function j(H,U,R,A){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)&&!A(i)&&_.filter(function(p){return!A(p.node)}).forEach(function(p){y.add(p.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(A(i)||!e.parent||n.has(e.parent.key))return;if(A(e.parent.node)){n.add(t.key);return}var T=!0,_=!1;(t.children||[]).filter(function(p){return!A(p.node)}).forEach(function(p){var E=p.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,A,y){for(var v=new Set(H),d=new Set(U),o=0;o<=A;o+=1){var n=R.get(o)||new Set;n.forEach(function(t){var i=t.key,T=t.node,_=t.children,p=_===void 0?[]:_;!v.has(i)&&!d.has(i)&&!y(T)&&p.filter(function(E){return!y(E.node)}).forEach(function(E){v.delete(E.key)})})}d=new Set;for(var a=new Set,s=A;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,p=!1;(i.children||[]).filter(function(E){return!y(E.node)}).forEach(function(E){var g=E.key,h=v.has(g);_&&!h&&(_=!1),!p&&(h||d.has(g))&&(p=!0)}),_||v.delete(i.key),p&&d.add(i.key),a.add(i.key)})}return{checkedKeys:Array.from(v),halfCheckedKeys:Array.from(L(d,v))}}function S(H,U,R,A){var y=[],v;A?v=A: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(ae.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(Ke,we,F){"use strict";F.d(we,"b",function(){return A}),F.d(we,"a",function(){return y}),F.d(we,"k",function(){return v}),F.d(we,"h",function(){return d}),F.d(we,"i",function(){return o}),F.d(we,"g",function(){return n}),F.d(we,"c",function(){return a}),F.d(we,"d",function(){return s}),F.d(we,"j",function(){return i}),F.d(we,"e",function(){return T}),F.d(we,"f",function(){return _});var ae=F("KQm4"),L=F("U8pU"),I=F("Ff2n"),j=F("q1tI"),C=F.n(j),S=F("Kwbf"),H=F("WaYH"),U=.25,R=2;function A(p,E){var g=p.slice(),h=g.indexOf(E);return h>=0&&g.splice(h,1),g}function y(p,E){var g=p.slice();return g.indexOf(E)===-1&&g.push(E),g}function v(p){return p.split("-")}function d(p,E){return"".concat(p,"-").concat(E)}function o(p){return p&&p.type&&p.type.isTreeNode}function n(p,E){var g=[p],h=E[p];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(p,E){var g=p.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(p,E){if(!p)return;var g=E.multiple;return g?p.slice():p.length?[p[0]]:p}var e=function(E){return E};function t(p,E){if(!p)return[];var g=E||{},h=g.processProps,u=h===void 0?e:h,r=Array.isArray(p)?p:[p];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(p){if(!p)return null;var E;if(Array.isArray(p))E={checkedKeys:p,halfCheckedKeys:void 0};else if(Object(L.a)(p)==="object")E={checkedKeys:p.checked||void 0,halfCheckedKeys:p.halfChecked||void 0};else return Object(S.a)(!1,"`checkedKeys` is not an array or an object"),null;return E}function T(p,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(p||[]).forEach(function(u){h(u)}),Object(ae.a)(g)}function _(p){var E={};return Object.keys(p).forEach(function(g){(g.startsWith("data-")||g.startsWith("aria-"))&&(E[g]=p[g])}),E}},Oe0F:function(Ke,we,F){Ke.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(Ke,we,F){var ae=F("wTVA"),L=F("EbDI"),I=F("ZhPi"),j=F("wkBT");function C(S){return ae(S)||L(S)||I(S)||j()}Ke.exports=C,Ke.exports.__esModule=!0,Ke.exports.default=Ke.exports},SJMd:function(Ke,we){/**
|
|
* @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,ae,L,I=!1,j,C;window.PR_SHOULD_USE_CONTINUATION=!0;var S,H;(function(){var U=window,R=["break,continue,do,else,for,if,return,while"],A=[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=[A,"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/,p="str",E="kwd",g="com",h="typ",u="lit",r="pun",l="pln",f="tag",c="dec",x="src",D="atn",O="atv",B="nocode",w="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function W(Pe){for(var We=0,Je=!1,et=!1,Ye=0,ze=Pe.length;Ye<ze;++Ye){var He=Pe[Ye];if(He.ignoreCase)et=!0;else if(/[a-z]/i.test(He.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Je=!0,et=!1;break}}var ft={b:8,t:9,n:10,v:11,f:12,r:13};function ht(me){var Ce=me.charCodeAt(0);if(Ce!==92)return Ce;var De=me.charAt(1);return Ce=ft[De],Ce||("0"<=De&&De<="7"?parseInt(me.substring(1),8):De==="u"||De==="x"?parseInt(me.substring(2),16):me.charCodeAt(1))}function lt(me){if(me<32)return(me<16?"\\x0":"\\x")+me.toString(16);var Ce=String.fromCharCode(me);return Ce==="\\"||Ce==="-"||Ce==="]"||Ce==="^"?"\\"+Ce:Ce}function at(me){var Ce=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=[],Ne=Ce[0]==="^",Ee=["["];Ne&&Ee.push("^");for(var Le=Ne?1:0,ue=Ce.length;Le<ue;++Le){var ne=Ce[Le];if(/\\[bdsw]/i.test(ne))Ee.push(ne);else{var te=ht(ne),K;Le+2<ue&&Ce[Le+1]==="-"?(K=ht(Ce[Le+2]),Le+=2):K=te,De.push([te,K]),K<65||te>122||(K<65||te>90||De.push([Math.max(65,te)|32,Math.min(K,90)|32]),K<97||te>122||De.push([Math.max(97,te)&~32,Math.min(K,122)&~32]))}}De.sort(function(pe,Te){return pe[0]-Te[0]||Te[1]-pe[1]});for(var Y=[],J=[],Le=0;Le<De.length;++Le){var ee=De[Le];ee[0]<=J[1]+1?J[1]=Math.max(J[1],ee[1]):Y.push(J=ee)}for(var Le=0;Le<Y.length;++Le){var ee=Y[Le];Ee.push(lt(ee[0])),ee[1]>ee[0]&&(ee[1]+1>ee[0]&&Ee.push("-"),Ee.push(lt(ee[1])))}return Ee.push("]"),Ee.join("")}function mt(me){for(var Ce=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=Ce.length,Ne=[],Ee=0,Le=0;Ee<De;++Ee){var ue=Ce[Ee];if(ue==="(")++Le;else if(ue.charAt(0)==="\\"){var ne=+ue.substring(1);ne&&(ne<=Le?Ne[ne]=-1:Ce[Ee]=lt(ne))}}for(var Ee=1;Ee<Ne.length;++Ee)Ne[Ee]===-1&&(Ne[Ee]=++We);for(var Ee=0,Le=0;Ee<De;++Ee){var ue=Ce[Ee];if(ue==="(")++Le,Ne[Le]||(Ce[Ee]="(?:");else if(ue.charAt(0)==="\\"){var ne=+ue.substring(1);ne&&ne<=Le&&(Ce[Ee]="\\"+Ne[ne])}}for(var Ee=0;Ee<De;++Ee)Ce[Ee]==="^"&&Ce[Ee+1]!=="^"&&(Ce[Ee]="");if(me.ignoreCase&&Je)for(var Ee=0;Ee<De;++Ee){var ue=Ce[Ee],te=ue.charAt(0);ue.length>=2&&te==="["?Ce[Ee]=at(ue):te!=="\\"&&(Ce[Ee]=ue.replace(/[a-zA-Z]/g,function(J){var ee=J.charCodeAt(0);return"["+String.fromCharCode(ee&~32,ee|32)+"]"}))}return Ce.join("")}for(var pt=[],Ye=0,ze=Pe.length;Ye<ze;++Ye){var He=Pe[Ye];if(He.global||He.multiline)throw new Error(""+He);pt.push("(?:"+mt(He)+")")}return new RegExp(pt.join("|"),et?"gi":"g")}function P(Pe,We){var Je=/(?:^|\s)nocode(?:\s|$)/,et=[],Ye=0,ze=[],He=0;function ft(ht){var lt=ht.nodeType;if(lt==1){if(Je.test(ht.className))return;for(var at=ht.firstChild;at;at=at.nextSibling)ft(at);var mt=ht.nodeName.toLowerCase();(mt==="br"||mt==="li")&&(et[He]=`
|
|
`,ze[He<<1]=Ye++,ze[He++<<1|1]=ht)}else if(lt==3||lt==4){var pt=ht.nodeValue;pt.length&&(We?pt=pt.replace(/\r\n?/g,`
|
|
`):pt=pt.replace(/[ \t\r\n]+/g," "),et[He]=pt,ze[He<<1]=Ye,Ye+=pt.length,ze[He++<<1|1]=ht)}}return ft(Pe),{sourceCode:et.join("").replace(/\n$/,""),spans:ze}}function z(Pe,We,Je,et,Ye){if(!Je)return;var ze={sourceNode:Pe,pre:1,langExtension:null,numberLines:null,sourceCode:Je,spans:null,basePos:We,decorations:null};et(ze),Ye.push.apply(Ye,ze.decorations)}var Q=/\S/;function re(Pe){for(var We=void 0,Je=Pe.firstChild;Je;Je=Je.nextSibling){var et=Je.nodeType;We=et===1?We?Pe:Je:et===3&&Q.test(Je.nodeValue)?Pe:We}return We===Pe?void 0:We}function le(Pe,We){var Je={},et;(function(){for(var He=Pe.concat(We),ft=[],ht={},lt=0,at=He.length;lt<at;++lt){var mt=He[lt],pt=mt[3];if(pt)for(var me=pt.length;--me>=0;)Je[pt.charAt(me)]=mt;var Ce=mt[1],De=""+Ce;ht.hasOwnProperty(De)||(ft.push(Ce),ht[De]=null)}ft.push(/[\0-\uffff]/),et=W(ft)})();var Ye=We.length,ze=function(He){for(var ft=He.sourceCode,ht=He.basePos,lt=He.sourceNode,at=[ht,l],mt=0,pt=ft.match(et)||[],me={},Ce=0,De=pt.length;Ce<De;++Ce){var Ne=pt[Ce],Ee=me[Ne],Le=void 0,ue;if(typeof Ee=="string")ue=!1;else{var ne=Je[Ne.charAt(0)];if(ne)Le=Ne.match(ne[1]),Ee=ne[0];else{for(var te=0;te<Ye;++te)if(ne=We[te],Le=Ne.match(ne[1]),Le){Ee=ne[0];break}Le||(Ee=l)}ue=Ee.length>=5&&Ee.substring(0,5)==="lang-",ue&&!(Le&&typeof Le[1]=="string")&&(ue=!1,Ee=x),ue||(me[Ne]=Ee)}var K=mt;if(mt+=Ne.length,!ue)at.push(ht+K,Ee);else{var Y=Le[1],J=Ne.indexOf(Y),ee=J+Y.length;Le[2]&&(ee=Ne.length-Le[2].length,J=ee-Y.length);var pe=Ee.substring(5);z(lt,ht+K,Ne.substring(0,J),ze,at),z(lt,ht+K+J,Y,Z(pe,Y),at),z(lt,ht+K+ee,Ne.substring(ee),ze,at)}}He.decorations=at};return ze}function be(Pe){var We=[],Je=[];Pe.tripleQuotedStrings?We.push([p,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Pe.multiLineStrings?We.push([p,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):We.push([p,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Pe.verbatimStrings&&Je.push([p,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var et=Pe.hashComments;et&&(Pe.cStyleComments?(et>1?We.push([g,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):We.push([g,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Je.push([p,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):We.push([g,/^#[^\r\n]*/,null,"#"])),Pe.cStyleComments&&(Je.push([g,/^\/\/[^\r\n]*/,null]),Je.push([g,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ye=Pe.regexLiterals;if(Ye){var ze=Ye>1?"":`
|
|
\r`,He=ze?".":"[\\S\\s]",ft="/(?=[^/*"+ze+"])(?:[^/\\x5B\\x5C"+ze+"]|\\x5C"+He+"|\\x5B(?:[^\\x5C\\x5D"+ze+"]|\\x5C"+He+")*(?:\\x5D|$))+/";Je.push(["lang-regex",RegExp("^"+w+"("+ft+")")])}var ht=Pe.types;ht&&Je.push([h,ht]);var lt=(""+Pe.keywords).replace(/^ | $/g,"");lt.length&&Je.push([E,new RegExp("^(?:"+lt.replace(/[\s,]+/g,"|")+")\\b"),null]),We.push([l,/^\s+/,null,` \r
|
|
\xA0`]);var at="^.[^\\s\\w.$@'\"`/\\\\]*";return Pe.regexLiterals&&(at+="(?!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(at),null]),le(We,Je)}var ye=be({keywords:T,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ie(Pe,We,Je){for(var et=/(?:^|\s)nocode(?:\s|$)/,Ye=/\r\n?|\n/,ze=Pe.ownerDocument,He=ze.createElement("li");Pe.firstChild;)He.appendChild(Pe.firstChild);var ft=[He];function ht(Ce){var De=Ce.nodeType;if(De==1&&!et.test(Ce.className))if(Ce.nodeName==="br")lt(Ce),Ce.parentNode&&Ce.parentNode.removeChild(Ce);else for(var Ne=Ce.firstChild;Ne;Ne=Ne.nextSibling)ht(Ne);else if((De==3||De==4)&&Je){var Ee=Ce.nodeValue,Le=Ee.match(Ye);if(Le){var ue=Ee.substring(0,Le.index);Ce.nodeValue=ue;var ne=Ee.substring(Le.index+Le[0].length);if(ne){var te=Ce.parentNode;te.insertBefore(ze.createTextNode(ne),Ce.nextSibling)}lt(Ce),ue||Ce.parentNode.removeChild(Ce)}}}function lt(Ce){for(;!Ce.nextSibling;)if(Ce=Ce.parentNode,!Ce)return;function De(Le,ue){var ne=ue?Le.cloneNode(!1):Le,te=Le.parentNode;if(te){var K=De(te,1),Y=Le.nextSibling;K.appendChild(ne);for(var J=Y;J;J=Y)Y=J.nextSibling,K.appendChild(J)}return ne}for(var Ne=De(Ce.nextSibling,0),Ee;(Ee=Ne.parentNode)&&Ee.nodeType===1;)Ne=Ee;ft.push(Ne)}for(var at=0;at<ft.length;++at)ht(ft[at]);We===(We|0)&&ft[0].setAttribute("value",We);var mt=ze.createElement("ol");mt.className="linenums";for(var pt=Math.max(0,We-1|0)||0,at=0,me=ft.length;at<me;++at)He=ft[at],He.className="L"+(at+pt)%10,He.firstChild||He.appendChild(ze.createTextNode("\xA0")),mt.appendChild(He);Pe.appendChild(mt)}function xe(Pe){var We=/\bMSIE\s(\d+)/.exec(navigator.userAgent);We=We&&+We[1]<=8;var Je=/\n/g,et=Pe.sourceCode,Ye=et.length,ze=0,He=Pe.spans,ft=He.length,ht=0,lt=Pe.decorations,at=lt.length,mt=0;lt[at]=Ye;var pt,me;for(me=pt=0;me<at;)lt[me]!==lt[me+2]?(lt[pt++]=lt[me++],lt[pt++]=lt[me++]):me+=2;for(at=pt,me=pt=0;me<at;){for(var Ce=lt[me],De=lt[me+1],Ne=me+2;Ne+2<=at&<[Ne+1]===De;)Ne+=2;lt[pt++]=Ce,lt[pt++]=De,me=Ne}at=lt.length=pt;var Ee=Pe.sourceNode,Le="";Ee&&(Le=Ee.style.display,Ee.style.display="none");try{for(var ue=null;ht<ft;){var ne=He[ht],te=He[ht+2]||Ye,K=lt[mt+2]||Ye,Ne=Math.min(te,K),Y=He[ht+1],J;if(Y.nodeType!==1&&(J=et.substring(ze,Ne))){We&&(J=J.replace(Je,"\r")),Y.nodeValue=J;var ee=Y.ownerDocument,pe=ee.createElement("span");pe.className=lt[mt+1];var Te=Y.parentNode;Te.replaceChild(pe,Y),pe.appendChild(Y),ze<te&&(He[ht+1]=Y=ee.createTextNode(et.substring(Ne,te)),Te.insertBefore(Y,pe.nextSibling))}ze=Ne,ze>=te&&(ht+=2),ze>=K&&(mt+=2)}}finally{Ee&&(Ee.style.display=Le)}}var Ae={};function fe(Pe,We){for(var Je=We.length;--Je>=0;){var et=We[Je];Ae.hasOwnProperty(et)?U.console&&console.warn("cannot override language handler %s",et):Ae[et]=Pe}}function Z(Pe,We){return Pe&&Ae.hasOwnProperty(Pe)||(Pe=/^\s*</.test(We)?"default-markup":"default-code"),Ae[Pe]}fe(ye,["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
|
|
`],[O,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,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([],[[O,/^[\s\S]+/]]),["uq.val"]),fe(be({keywords:v,hashComments:!0,cStyleComments:!0,types:_}),["c","cc","cpp","cxx","cyc","m"]),fe(be({keywords:"null,true,false"}),["json"]),fe(be({keywords:o,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:_}),["cs"]),fe(be({keywords:d,cStyleComments:!0}),["java"]),fe(be({keywords:i,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),fe(be({keywords:e,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),fe(be({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),fe(be({keywords:t,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),fe(be({keywords:a,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),fe(be({keywords:n,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),fe(le([],[[p,/^[\s\S]+/]]),["regex"]);function Ue(Pe){var We=Pe.langExtension;try{var Je=P(Pe.sourceNode,Pe.pre),et=Je.sourceCode;Pe.sourceCode=et,Pe.spans=Je.spans,Pe.basePos=0,Z(We,et)(Pe),xe(Pe)}catch(Ye){U.console&&console.log(Ye&&Ye.stack||Ye)}}function $e(Pe,We,Je){var et=Je||!1,Ye=We||null,ze=document.createElement("div");ze.innerHTML="<pre>"+Pe+"</pre>",ze=ze.firstChild,et&&ie(ze,et,!0);var He={langExtension:Ye,numberLines:et,sourceNode:ze,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Ue(He),ze.innerHTML}function tt(Pe,We){var Je=We||document.body,et=Je.ownerDocument||document;function Ye(ne){return Je.getElementsByTagName(ne)}for(var ze=[Ye("pre"),Ye("code"),Ye("xmp")],He=[],ft=0;ft<ze.length;++ft)for(var ht=0,lt=ze[ft].length;ht<lt;++ht)He.push(ze[ft][ht]);ze=null;var at=Date;at.now||(at={now:function(){return+new Date}});var mt=0,pt=/\blang(?:uage)?-([\w.]+)(?!\S)/,me=/\bprettyprint\b/,Ce=/\bprettyprinted\b/,De=/pre|xmp/i,Ne=/^code$/i,Ee=/^(?:pre|code|xmp)$/i,Le={};function ue(){for(var ne=U.PR_SHOULD_USE_CONTINUATION?at.now()+250:Infinity;mt<He.length&&at.now()<ne;mt++){for(var te=He[mt],K=Le,Y=te;Y=Y.previousSibling;){var J=Y.nodeType,ee=(J===7||J===8)&&Y.nodeValue;if(ee?!/^\??prettify\b/.test(ee):J!==3||/\S/.test(Y.nodeValue))break;if(ee){K={},ee.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ct,yt,St){K[yt]=St});break}}var pe=te.className;if((K!==Le||me.test(pe))&&!Ce.test(pe)){for(var Te=!1,Re=te.parentNode;Re;Re=Re.parentNode){var Xe=Re.tagName;if(Ee.test(Xe)&&Re.className&&me.test(Re.className)){Te=!0;break}}if(!Te){te.className+=" prettyprinted";var nt=K.lang;if(!nt){nt=pe.match(pt);var Fe;!nt&&(Fe=re(te))&&Ne.test(Fe.tagName)&&(nt=Fe.className.match(pt)),nt&&(nt=nt[1])}var bt;if(De.test(te.tagName))bt=1;else{var vt=te.currentStyle,rt=et.defaultView,wt=vt?vt.whiteSpace:rt&&rt.getComputedStyle?rt.getComputedStyle(te,null).getPropertyValue("white-space"):0;bt=wt&&wt.substring(0,3)==="pre"}var Dt=K.linenums;(Dt=Dt==="true"||+Dt)||(Dt=pe.match(/\blinenums\b(?::(\d+))?/),Dt=Dt?Dt[1]&&Dt[1].length?+Dt[1]:!0:!1),Dt&&ie(te,Dt,bt);var xt={langExtension:nt,sourceNode:te,numberLines:Dt,pre:bt,sourceCode:null,basePos:null,spans:null,decorations:null};Ue(xt)}}}mt<He.length?U.setTimeout(ue,250):typeof Pe=="function"&&Pe()}ue()}var Qe=U.PR={createSimpleLexer:le,registerLangHandler:fe,sourceDecorator:be,PR_ATTRIB_NAME:D,PR_ATTRIB_VALUE:O,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:p,PR_TAG:f,PR_TYPE:h,prettyPrintOne:I?U.prettyPrintOne=$e:S=$e,prettyPrint:H=I?U.prettyPrint=tt:H=tt},it=U.define;typeof it=="function"&&it.amd&&it("google-code-prettify",[],function(){return Qe})})()},TXwP:function(Ke,we,F){var ae,L;(function(){var I;(function(){"use strict";var C=[,,function(R){function A(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=[]}A.prototype.clone_empty=function(){var d=new A(this.__parent);return d.set_indent(this.__indent_count,this.__alignment_count),d},A.prototype.item=function(d){return d<0?this.__items[this.__items.length+d]:this.__items[d]},A.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},A.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))},A.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)},A.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},A.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},A.prototype.is_empty=function(){return this.__items.length===0},A.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},A.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},A.prototype.pop=function(){var d=null;return this.is_empty()||(d=this.__items.pop(),this.__character_count-=d.length),d},A.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},A.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},A.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},A.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 A(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 A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},R.exports.Output=v},,,,function(R){function A(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"])}A.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},A.prototype._get_boolean=function(d,o){var n=this.raw_options[d],a=n===void 0?!!o:!!n;return a},A.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},A.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},A.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]},A.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},A.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=A,R.exports.normalizeOpts=v,R.exports.mergeOpts=y},,function(R){var A=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&&!(A&&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&&A&&(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 A(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")}A.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},A.prototype.readIgnored=function(y){return y.readUntilAfter(this.__directives_end_ignore_pattern)},R.exports.Directives=A},,function(R,A,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,A,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 p(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"]}p.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},p.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},p.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},p.prototype.print_string=function(E){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(E)},p.prototype.preserveSingleSpace=function(E){E&&(this._output.space_before_token=!0)},p.prototype.indent=function(){this._indentLevel++},p.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},p.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,O=this._ch,B=!1,w,W,P;w=this._input.read(i),W=w!=="",P=O,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),O=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var z=this._input.read(T),Q=a.get_directives(z);Q&&Q.ignore==="start"&&(z+=a.readIgnored(this._input)),this.print_string(z),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 be=P==='"'||P==="'";this.preserveSingleSpace(be||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 ye=!1;this._input.lookBack("with")&&(ye=!0),this.preserveSingleSpace(W||ye),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 ie=P==='"'||P==="'";this.preserveSingleSpace(ie||W),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&B&&this._output.add_new_line()}var xe=this._output.get_code(g);return xe},R.exports.Beautifier=p},function(R,A,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}],S={};function H(R){var A=S[R];if(A!==void 0)return A.exports;var y=S[R]={exports:{}};return C[R](y,y.exports,H),y.exports}var U=H(15);I=U})();var j=I;!(ae=[],L=function(){return{css_beautify:j}}.apply(we,ae),L!==void 0&&(Ke.exports=L))})()},WaYH:function(Ke,we,F){"use strict";var ae=F("rePB"),L=F("Ff2n"),I=F("VTBJ"),j=F("1OyB"),C=F("vuIU"),S=F("JX7q"),H=F("Ji7U"),U=F("LK+K"),R=F("q1tI"),A=F("TSYQ"),y=F.n(A),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(ae.a)(x,"".concat(l,"-start"),u[c+1]),Object(ae.a)(x,"".concat(l,"-end"),r[c+1]),Object(ae.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(p){Object(H.a)(g,p);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(S.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(S.a)(h))},h.onDragOver=function(u){var r=h.props.context.onNodeDragOver;u.preventDefault(),u.stopPropagation(),r(u,Object(S.a)(h))},h.onDragLeave=function(u){var r=h.props.context.onNodeDragLeave;u.stopPropagation(),r(u,Object(S.a)(h))},h.onDragEnd=function(u){var r=h.props.context.onNodeDragEnd;u.stopPropagation(),h.setState({dragNodeHighlight:!1}),r(u,Object(S.a)(h))},h.onDrop=function(u){var r=h.props.context.onNodeDrop;u.preventDefault(),u.stopPropagation(),h.setState({dragNodeHighlight:!1}),r(u,Object(S.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 O=y()("".concat(c,"-switcher"),"".concat(c,"-switcher_").concat(r?s:e));return R.createElement("span",{onClick:h.onExpand,className:O},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 O=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},O)},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,O=h.props.context,B=O.prefixCls,w=O.showIcon,W=O.icon,P=O.draggable,z=O.loadData,Q=O.titleRender,re=h.isDisabled(),le="".concat(B,"-node-content-wrapper"),be;if(w){var ye=c||W;be=ye?R.createElement("span",{className:y()("".concat(B,"-iconEle"),"".concat(B,"-icon__customize"))},typeof ye=="function"?ye(h.props):ye):h.renderIcon()}else z&&x&&(be=h.renderIcon());var ie;typeof l=="function"?ie=l(D):Q?ie=Q(D):ie=l;var xe=R.createElement("span",{className:"".concat(B,"-title")},ie);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},be,xe)},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,O=r.dragOverGapBottom,B=r.isLeaf,w=r.isStart,W=r.isEnd,P=r.expanded,z=r.selected,Q=r.checked,re=r.halfChecked,le=r.loading,be=r.domRef,ye=r.active,ie=r.onMouseMove,xe=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,Z=Ae.filterTreeNode,Ue=Ae.draggable,$e=Ae.keyEntities,tt=this.isDisabled(),Qe=Object(d.f)(xe),it=$e[l]||{},Pe=it.level,We=W[W.length-1];return R.createElement("div",Object.assign({ref:be,className:y()(f,"".concat(fe,"-treenode"),(u={},Object(ae.a)(u,"".concat(fe,"-treenode-disabled"),tt),Object(ae.a)(u,"".concat(fe,"-treenode-switcher-").concat(P?"open":"close"),!B),Object(ae.a)(u,"".concat(fe,"-treenode-checkbox-checked"),Q),Object(ae.a)(u,"".concat(fe,"-treenode-checkbox-indeterminate"),re),Object(ae.a)(u,"".concat(fe,"-treenode-selected"),z),Object(ae.a)(u,"".concat(fe,"-treenode-loading"),le),Object(ae.a)(u,"".concat(fe,"-treenode-active"),ye),Object(ae.a)(u,"".concat(fe,"-treenode-leaf-last"),We),Object(ae.a)(u,"drag-over",!tt&&x),Object(ae.a)(u,"drag-over-gap-top",!tt&&D),Object(ae.a)(u,"drag-over-gap-bottom",!tt&&O),Object(ae.a)(u,"filter-node",Z&&Z(Object(a.b)(this.props))),u)),style:c,onDragEnter:Ue?this.onDragEnter:void 0,onDragOver:Ue?this.onDragOver:void 0,onDragLeave:Ue?this.onDragLeave:void 0,onDrop:Ue?this.onDrop:void 0,onDragEnd:Ue?this.onDragEnd:void 0,onMouseMove:ie},Qe),R.createElement(n,{prefixCls:fe,level:Pe,isStart:w,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 _=we.a=T},Y1PL:function(Ke,we,F){"use strict";F.r(we),F.d(we,"ResizableTextArea",function(){return re});var ae=F("wx14"),L=F("1OyB"),I=F("vuIU"),j=F("Ji7U"),C=F("LK+K"),S=F("q1tI"),H=F("VTBJ"),U=F("rePB"),R=F("Zm9Q"),A=F("Kwbf"),y=F("c+Xe"),v=F("m+aA"),d=F("bdgK"),o=new Map;function n(ye){ye.forEach(function(ie){var xe,Ae=ie.target;(xe=o.get(Ae))===null||xe===void 0||xe.forEach(function(fe){return fe(Ae)})})}var a=new d.default(n),s=null,e=null;function t(ye,ie){o.has(ye)||(o.set(ye,new Set),a.observe(ye)),o.get(ye).add(ie)}function i(ye,ie){o.has(ye)&&(o.get(ye).delete(ie),o.get(ye).size||(a.unobserve(ye),o.delete(ye)))}var T=function(ye){Object(j.a)(xe,ye);var ie=Object(C.a)(xe);function xe(){return Object(L.a)(this,xe),ie.apply(this,arguments)}return Object(I.a)(xe,[{key:"render",value:function(){return this.props.children}}]),xe}(S.Component),_=S.createContext(null);function p(ye){var ie=ye.children,xe=ye.onBatchResize,Ae=S.useRef(0),fe=S.useRef([]),Z=S.useContext(_),Ue=S.useCallback(function($e,tt,Qe){Ae.current+=1;var it=Ae.current;fe.current.push({size:$e,element:tt,data:Qe}),Promise.resolve().then(function(){it===Ae.current&&(xe==null||xe(fe.current),fe.current=[])}),Z==null||Z($e,tt,Qe)},[xe,Z]);return S.createElement(_.Provider,{value:Ue},ie)}function E(ye){var ie=ye.children,xe=ye.disabled,Ae=S.useRef(null),fe=S.useRef(null),Z=S.useContext(_),Ue=S.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),$e=S.isValidElement(ie)&&Object(y.c)(ie),tt=$e?ie.ref:null,Qe=S.useMemo(function(){return Object(y.a)(tt,Ae)},[tt,Ae]),it=S.useRef(ye);it.current=ye;var Pe=S.useCallback(function(We){var Je=it.current,et=Je.onResize,Ye=Je.data,ze=We.getBoundingClientRect(),He=ze.width,ft=ze.height,ht=We.offsetWidth,lt=We.offsetHeight,at=Math.floor(He),mt=Math.floor(ft);if(Ue.current.width!==at||Ue.current.height!==mt||Ue.current.offsetWidth!==ht||Ue.current.offsetHeight!==lt){var pt={width:at,height:mt,offsetWidth:ht,offsetHeight:lt};Ue.current=pt;var me=ht===Math.round(He)?He:ht,Ce=lt===Math.round(ft)?ft:lt,De=Object(H.a)(Object(H.a)({},pt),{},{offsetWidth:me,offsetHeight:Ce});Z==null||Z(De,We,Ye),et&&Promise.resolve().then(function(){et(De,We)})}},[]);return S.useEffect(function(){var We=Object(v.a)(Ae.current)||Object(v.a)(fe.current);return We&&!xe&&t(We,Pe),function(){return i(We,Pe)}},[Ae.current,xe]),S.createElement(T,{ref:fe},$e?S.cloneElement(ie,{ref:Qe}):ie)}var g="rc-observer-key";function h(ye){var ie=ye.children,xe=Object(R.a)(ie);return xe.map(function(Ae,fe){var Z=(Ae==null?void 0:Ae.key)||"".concat(g,"-").concat(fe);return S.createElement(E,Object(ae.a)({},ye,{key:Z}),Ae)})}h.Collection=p;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={},O;function B(ye){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe=ye.getAttribute("id")||ye.getAttribute("data-reactid")||ye.getAttribute("name");if(ie&&D[xe])return D[xe];var Ae=window.getComputedStyle(ye),fe=Ae.getPropertyValue("box-sizing")||Ae.getPropertyValue("-moz-box-sizing")||Ae.getPropertyValue("-webkit-box-sizing"),Z=parseFloat(Ae.getPropertyValue("padding-bottom"))+parseFloat(Ae.getPropertyValue("padding-top")),Ue=parseFloat(Ae.getPropertyValue("border-bottom-width"))+parseFloat(Ae.getPropertyValue("border-top-width")),$e=x.map(function(Qe){return"".concat(Qe,":").concat(Ae.getPropertyValue(Qe))}).join(";"),tt={sizingStyle:$e,paddingSize:Z,borderSize:Ue,boxSizing:fe};return ie&&xe&&(D[xe]=tt),tt}function w(ye){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;O||(O=document.createElement("textarea"),O.setAttribute("tab-index","-1"),O.setAttribute("aria-hidden","true"),document.body.appendChild(O)),ye.getAttribute("wrap")?O.setAttribute("wrap",ye.getAttribute("wrap")):O.removeAttribute("wrap");var fe=B(ye,ie),Z=fe.paddingSize,Ue=fe.borderSize,$e=fe.boxSizing,tt=fe.sizingStyle;O.setAttribute("style","".concat(tt,";").concat(c)),O.value=ye.value||ye.placeholder||"";var Qe=Number.MIN_SAFE_INTEGER,it=Number.MAX_SAFE_INTEGER,Pe=O.scrollHeight,We;if($e==="border-box"?Pe+=Ue:$e==="content-box"&&(Pe-=Z),xe!==null||Ae!==null){O.value=" ";var Je=O.scrollHeight-Z;xe!==null&&(Qe=Je*xe,$e==="border-box"&&(Qe=Qe+Z+Ue),Pe=Math.max(Qe,Pe)),Ae!==null&&(it=Je*Ae,$e==="border-box"&&(it=it+Z+Ue),We=Pe>it?"":"hidden",Pe=Math.min(it,Pe))}return{height:Pe,minHeight:Qe,maxHeight:it,overflowY:We,resize:"none"}}var W=F("Gytx"),P=F.n(W),z;(function(ye){ye[ye.NONE=0]="NONE",ye[ye.RESIZING=1]="RESIZING",ye[ye.RESIZED=2]="RESIZED"})(z||(z={}));var Q=function(ye){Object(j.a)(xe,ye);var ie=Object(C.a)(xe);function xe(Ae){var fe;return Object(L.a)(this,xe),fe=ie.call(this,Ae),fe.nextFrameActionId=void 0,fe.resizeFrameId=void 0,fe.textArea=void 0,fe.saveTextArea=function(Z){fe.textArea=Z},fe.handleResize=function(Z){var Ue=fe.state.resizeStatus,$e=fe.props,tt=$e.autoSize,Qe=$e.onResize;if(Ue!==z.NONE)return;typeof Qe=="function"&&Qe(Z),tt&&fe.resizeOnNextFrame()},fe.resizeOnNextFrame=function(){cancelAnimationFrame(fe.nextFrameActionId),fe.nextFrameActionId=requestAnimationFrame(fe.resizeTextarea)},fe.resizeTextarea=function(){var Z=fe.props.autoSize;if(!Z||!fe.textArea)return;var Ue=Z.minRows,$e=Z.maxRows,tt=w(fe.textArea,!1,Ue,$e);fe.setState({textareaStyles:tt,resizeStatus:z.RESIZING},function(){cancelAnimationFrame(fe.resizeFrameId),fe.resizeFrameId=requestAnimationFrame(function(){fe.setState({resizeStatus:z.RESIZED},function(){fe.resizeFrameId=requestAnimationFrame(function(){fe.setState({resizeStatus:z.NONE}),fe.fixFirefoxAutoScroll()})})})})},fe.renderTextArea=function(){var Z=fe.props,Ue=Z.prefixCls,$e=Ue===void 0?"rc-textarea":Ue,tt=Z.autoSize,Qe=Z.onResize,it=Z.className,Pe=Z.disabled,We=fe.state,Je=We.textareaStyles,et=We.resizeStatus,Ye=Object(r.a)(fe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ze=f()($e,it,Object(U.a)({},"".concat($e,"-disabled"),Pe));"value"in Ye&&(Ye.value=Ye.value||"");var He=Object(H.a)(Object(H.a)(Object(H.a)({},fe.props.style),Je),et===z.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return S.createElement(u,{onResize:fe.handleResize,disabled:!(tt||Qe)},S.createElement("textarea",Object(ae.a)({},Ye,{className:ze,style:He,ref:fe.saveTextArea})))},fe.state={textareaStyles:{},resizeStatus:z.NONE},fe}return Object(I.a)(xe,[{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,Z=this.textArea.selectionEnd;this.textArea.setSelectionRange(fe,Z)}}catch(Ue){}}},{key:"render",value:function(){return this.renderTextArea()}}]),xe}(S.Component),re=Q,le=function(ye){Object(j.a)(xe,ye);var ie=Object(C.a)(xe);function xe(Ae){var fe;Object(L.a)(this,xe),fe=ie.call(this,Ae),fe.resizableTextArea=void 0,fe.focus=function(){fe.resizableTextArea.textArea.focus()},fe.saveTextArea=function(Ue){fe.resizableTextArea=Ue},fe.handleChange=function(Ue){var $e=fe.props.onChange;fe.setValue(Ue.target.value,function(){fe.resizableTextArea.resizeTextarea()}),$e&&$e(Ue)},fe.handleKeyDown=function(Ue){var $e=fe.props,tt=$e.onPressEnter,Qe=$e.onKeyDown;Ue.keyCode===13&&tt&&tt(Ue),Qe&&Qe(Ue)};var Z=typeof Ae.value=="undefined"||Ae.value===null?Ae.defaultValue:Ae.value;return fe.state={value:Z},fe}return Object(I.a)(xe,[{key:"setValue",value:function(fe,Z){"value"in this.props||this.setState({value:fe},Z)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return S.createElement(re,Object(ae.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}}]),xe}(S.Component),be=we.default=le},ZJlW:function(Ke,we,F){Ke.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(Ke,we,F){"use strict";F.d(we,"a",function(){return w});var ae=F("k1fw"),L=F("miYZ"),I=F("tsqr"),j=F("rAM+"),C=F("tJVT"),S=F("PpiC"),H=F("q1tI"),U=F.n(H),R=F("bdgK"),A=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,z){return z.map(function(Q){return{label:Q,kind:P.languages.CompletionItemKind.Keyword,insertText:Q}})},_=function(P){return Object.keys(i.tables).map(function(z){return{label:z,kind:P.languages.CompletionItemKind.Variable,insertText:z}})},p=function(P,z){var Q=i.tables[P];return Q?Q.map(function(re){return{label:re,kind:z.languages.CompletionItemKind.Field,insertText:re}}):[]};function E(W,P,z,Q,re){var le=P.getWordUntilPosition(z),be={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:le.startColumn,endColumn:le.endColumn},ye=Q.map(function(ie){return{label:ie,kind:W.languages.CompletionItemKind.Keyword,insertText:ie,insertTextRules:W.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:be}});return re.map(function(ie){ye.push(Object(ae.a)(Object(ae.a)({},ie),{},{range:be}))}),ye}var g=function(W){i.languages.map(function(re){return W.languages.registerDocumentFormattingEditProvider(re,{provideDocumentFormattingEdits:function(be,ye,ie){return Object(y.a)(d.a.mark(function xe(){var Ae;return d.a.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Ae=t()(be.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}),Z.abrupt("return",[{range:be.getFullModelRange(),text:Ae}]);case 2:case"end":return Z.stop()}},xe)}))()}}),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}}),z=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(A.a)(a.keywords),Object(A.a)(a.quickKey.map(function(re){return re.label}))),provideCompletionItems:function(le,be){var ye=le.getValueInRange({startLineNumber:be.lineNumber,startColumn:1,endLineNumber:be.lineNumber,endColumn:be.column}),ie=ye.match(/cu/gim);console.log("match:",ie,be,ye,le);var xe=[],Ae=be.lineNumber,fe=be.column,Z=le.getValueInRange({startLineNumber:Ae,startColumn:0,endLineNumber:Ae,endColumn:fe}),Ue=Z.trim().split(/\s+/),$e=Ue[Ue.length-1];if($e.endsWith(".")){var tt=$e.slice(0,$e.length-1);Object.keys(i.tables).includes(tt)&&(xe=Object(A.a)(p(tt,W)))}else $e==="."?xe=[]:xe=[].concat(Object(A.a)(_(W)),Object(A.a)(T(W,a.keywords)),Object(A.a)(P));return{suggestions:xe}}}),W.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(A.a)(o.keywords)),provideCompletionItems:function(le,be){var ye=le.getValueInRange({startLineNumber:be.lineNumber,startColumn:1,endLineNumber:be.lineNumber,endColumn:be.column}),ie=ye.match(/cu/gim);console.log("match:",ie,be,ye,le);var xe=[],Ae=be.lineNumber,fe=be.column,Z=le.getValueInRange({startLineNumber:Ae,startColumn:0,endLineNumber:Ae,endColumn:fe}),Ue=Z.trim().split(/\s+/),$e=Ue[Ue.length-1];if($e.endsWith(".")){var tt=$e.slice(0,$e.length-1);Object.keys(i.tables).includes(tt)&&(xe=Object(A.a)(p(tt,W)))}else $e==="."?xe=[]:xe=[].concat(Object(A.a)(_(W)),Object(A.a)(T(W,o.keywords)));return{suggestions:xe}}}),W.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(A.a)(n.keywords)),provideCompletionItems:function(le,be){var ye=[],ie=be.lineNumber,xe=be.column,Ae=le.getValueInRange({startLineNumber:ie,startColumn:0,endLineNumber:ie,endColumn:xe}),fe=Ae.trim().split(/\s+/),Z=fe[fe.length-1];if(Z.endsWith(".")){var Ue=Z.slice(0,Z.length-1);Object.keys(i.tables).includes(Ue)&&(ye=Object(A.a)(p(Ue,W)))}else Z==="."?ye=[]:ye=[].concat(Object(A.a)(_(W)),Object(A.a)(T(W,n.keywords)),Object(A.a)(Q));return{suggestions:ye}}}),W.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(A.a)(s.keywords)),provideCompletionItems:function(le,be){var ye=[],ie=be.lineNumber,xe=be.column,Ae=le.getValueInRange({startLineNumber:ie,startColumn:0,endLineNumber:ie,endColumn:xe}),fe=Ae.trim().split(/\s+/),Z=fe[fe.length-1];if(Z.endsWith(".")){var Ue=Z.slice(0,Z.length-1);Object.keys(i.tables).includes(Ue)&&(ye=Object(A.a)(p(Ue,W)))}else Z==="."?ye=[]:ye=[].concat(Object(A.a)(_(W)),Object(A.a)(T(W,s.keywords)),Object(A.a)(z));return{suggestions:ye}}})},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 z=0;z<W.length;z++){var Q=x[W[z]];if(Q)return Q}return P[0]}return x[P]||P}var O=null,B=we.b=function(W){var P=W.width,z=P===void 0?"100%":P,Q=W.height,re=Q===void 0?"100%":Q,le=W.value,be=W.language,ye=be===void 0?"javascript":be,ie=W.style,xe=ie===void 0?{}:ie,Ae=W.options,fe=Ae===void 0?{}:Ae,Z=W.overrideServices,Ue=Z===void 0?{}:Z,$e=W.theme,tt=$e===void 0?"vs-dark":$e,Qe=W.onEditBlur,it=W.onSave,Pe=W.autoHeight,We=Pe===void 0?!1:Pe,Je=W.forbidCopy,et=Je===void 0?!1:Je,Ye=W.onChange,ze=Ye===void 0?f:Ye,He=W.editorDidMount,ft=He===void 0?f:He,ht=W.onFocus,lt=ht===void 0?f:ht,at=W.filename,mt=at===void 0?"educoder.txt":at,pt=W.errorLine,me=W.errorContent,Ce=me===void 0?"":me,De=Object(S.a)(W,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Ne=Object(H.useRef)(),Ee=Object(H.useRef)({}),Le=Object(H.useRef)(),ue=Object(H.useRef)(!1),ne=Object(H.useRef)(),te=Object(H.useState)(!1),K=Object(C.a)(te,2),Y=K[0],J=K[1];function ee(){var Ie;return Ne.current&&(Ie=new R.default(function(ot){var _t=Object(j.a)(ot),Et;try{for(_t.s();!(Et=_t.n()).done;){var Ut=Et.value;(Ut.target.offsetHeight>0||Ut.target.offsetWidth>0)&&Ee.current.instance.layout()}}catch(wn){_t.e(wn)}finally{_t.f()}}),Ie.observe(Ne.current)),Ie}function pe(){I.b.warn(decodeURIComponent(h))}var Te=function(){var ot=Ee.current.instance;if(le!=null&&ot&&Y){var _t=ot.getModel();_t&&le!==_t.getValue()&&(c=!0,_t.setValue(le),ot.layout(),c=!1)}};Object(H.useEffect)(function(){Le.current&&clearTimeout(Le.current),Le.current=setTimeout(function(){Te()},500)},[le,Y,Ee.current]),Object(H.useEffect)(function(){if(pt&&Ee.current&&Ee.current.instance){var Ie=Ee.current.instance;Ie.changeViewZones(function(_t){var Et=document.createElement("div");Et.style.padding="10px 20px",Et.style.width="calc(100% - 20px)",Et.className="my-error-line-wrp",Et.innerHTML=Ce,_t.addZone({afterLineNumber:pt||11,heightInLines:3,domNode:Et})});var ot={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}};Ie.addOverlayWidget(ot),Ie.revealPositionInCenter({lineNumber:20,column:1})}},[pt,Ee.current,Y]);function Re(){var Ie=Ee.current.instance;if(Ie){var ot=Ie.getSelection(),_t=Ee.current.pastePos||{},Et=new O.Range(_t.startLineNumber||ot.endLineNumber,_t.startColumn||ot.endColumn,_t.endLineNumber||ot.endLineNumber,_t.endColumn||ot.endColumn);setTimeout(function(){Ie.executeEdits("",[{range:Et,text:""}])},300)}}function Xe(Ie){(window.navigator.platform.match("Mac")?Ie.metaKey:Ie.ctrlKey)&&Ie.keyCode==83&&(Ie.preventDefault(),it())}var nt=function(){if(We&&Ee.current.instance){var ot=Ee.current.instance.getContentHeight();St(ot<re?re:ot)}else St(re)};function Fe(Ie){var ot=document.createEvent("MouseEvents");ot.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Ie.dispatchEvent(ot)}function bt(Ie,ot){var _t=window.URL||window.webkitURL||window,Et=new Blob([ot]),Ut=document.createElementNS("http://www.w3.org/1999/xhtml","a");Ut.href=_t.createObjectURL(Et),Ut.download=Ie,Fe(Ut)}Object(H.useEffect)(function(){nt()},[nt]),Object(H.useEffect)(function(){Ne.current&&!Y&&F.e(27).then(F.t.bind(null,"M/lh",7)).then(function(Ie){try{O=Ie,Ee.current.instance=O.editor.create(Ne.current,{value:le,language:D(ye),theme:tt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},Ue);var ot=Ee.current.instance;if(ft(ot,O),setTimeout(function(){nt(),Ee.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){bt(mt||"educoder.txt",ot.getValue())}})},500),Ee.current.subscription=ot.onDidChangeModelContent(function(Et){ue.current?clearTimeout(ne.current):(nt(),ze(ot.getValue(),Et)),ne.current=setTimeout(function(){ue.current=!1},500)}),window.Monaco||g(O),et&&(ot.addCommand(O.KeyMod.CtrlCmd|O.KeyMod.Shift|O.KeyCode.KEY_V,function(){return pe(),null}),ot.addCommand(O.KeyMod.CtrlCmd|O.KeyCode.KEY_C,function(){return pe(),null})),window.Monaco=O,Qe&&ot.onDidBlurEditorWidget(function(){Qe(ot.getValue())}),lt&&ot.onDidFocusEditorText(function(){lt(ot.getValue())}),et){ot.addCommand(O.KeyMod.CtrlCmd|O.KeyCode.KEY_V,function(){return pe(),null}),ot.onDidPaste(function(Et){Ee.current.pastePos=Et});try{window.addEventListener("paste",Re)}catch(Et){}}var _t=ee();return J(!0),function(){var Et=Ee.current.instance;Et.dispose();var Ut=Et.getModel();Ut&&Ut.dispose(),Ee.current.subscription&&Ee.current.subscription.dispose(),et&&window.removeEventListener("paste",Re),_t.unobserve(Ne.current)}}catch(Et){}})},[]),Object(H.useEffect)(function(){var Ie=Ee.current.instance;if(Ie&&Y)return document.addEventListener("keydown",Xe,!1),function(){document.removeEventListener("keydown",Xe)}},[it,Y]),Object(H.useEffect)(function(){var Ie=Ee.current.instance;if(Ie&&Y){var ot=D(ye);O.editor.setModelLanguage(Ie.getModel(),ot),console.log("language:",ye,Ie.getModel(),ot)}},[ye,Y]),Object(H.useEffect)(function(){var Ie=Ee.current.instance;Ie&&Y&&O.editor.setTheme(tt)},[tt,Y]),Object(H.useEffect)(function(){var Ie=Ee.current.instance;Ie&&Y&&(Ie.updateOptions(Object(ae.a)({},fe)),setTimeout(function(){Ie.getModel().updateOptions(Object(ae.a)({},fe))},200))},[JSON.stringify(fe),Y]),Object(H.useEffect)(function(){var Ie=Ee.current.instance;Ie&&Y&&Ie.layout()},[z,re,Y]);var vt=Object(H.useState)(l(z)),rt=Object(C.a)(vt,2),wt=rt[0],Dt=rt[1],xt=Object(H.useState)(l(re)),ct=Object(C.a)(xt,2),yt=ct[0],St=ct[1],Mt=Object(ae.a)(Object(ae.a)({},xe),{},{width:wt,height:yt});return U.a.createElement("div",{className:"my-monaco-editor",ref:Ne,style:Mt})};function w(W){var P=W.width,z=P===void 0?"100%":P,Q=W.height,re=Q===void 0?"100%":Q,le=W.original,be=W.modified,ye=W.language,ie=W.options,xe=ie===void 0?{}:ie,Ae=Object(H.useRef)(),fe=Object(H.useState)(null),Z=Object(C.a)(fe,2),Ue=Z[0],$e=Z[1];function tt(We){var Je;return Ae.current&&(Je=new R.default(function(et){var Ye=Object(j.a)(et),ze;try{for(Ye.s();!(ze=Ye.n()).done;){var He=ze.value;(He.target.offsetHeight>0||He.target.offsetWidth>0)&&We.layout()}}catch(ft){Ye.e(ft)}finally{Ye.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(We){O=We;var Je=O.editor.createDiffEditor(Ae.current,Object(ae.a)(Object(ae.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},xe),{},{wordWrap:!0}));$e(Je);var et=tt(Je);return function(){Je.dispose();var Ye=Je.getModel();Ye&&Ye.dispose(),et.unobserve(Ae.current)}})},[]),Object(H.useEffect)(function(){Ue&&Ue.setModel({original:O.editor.createModel(le,ye),modified:O.editor.createModel(be,ye)})},[le,be,ye,Ue]);var Qe=l(z),it=l(re),Pe={width:Qe,height:it};return U.a.createElement("div",{className:"my-diff-editor",ref:Ae,style:Pe})}},a2OE:function(Ke,we){Ke.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAAAkCAYAAABR/76qAAAAAXNSR0IArs4c6QAAE31JREFUeF61W3uQVcWZ/3137oxP1DE+EWIUJFlQkHkoougiz+ExvIe54COru6ZWk2xqd2OybKViWWWy1tZWLLc2q8ZH/nCYYRBkBIcBS6NRAZ2Hjgii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2AuJXUhjZ741/h9lg+MKrzmoaAAAAABJRU5ErkJggg=="},bT9E:function(Ke,we,F){"use strict";F.d(we,"a",function(){return L});var ae=F("VTBJ");function L(I,j){var C=Object(ae.a)({},I);return Array.isArray(j)&&j.forEach(function(S){delete C[S]}),C}},biw7:function(Ke,we,F){"use strict";var ae=F("q1tI"),L=F.n(ae),I=ae.createContext(null);we.a=I},cFMs:function(Ke,we){Ke.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+o67SL9suKz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kSaSU7FRDSPAQQdmpCBxeE8SiYQixFj7PTK2TynCAn22JaL9qTb/3PHK68mNJqdCjKPrZGM4IBG5QUsJTVokxFvk8yux7JKP+G9kkBTNjTj2H9qofhxaebhYnS9+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(Ke,we,F){Ke.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(Ke,we,F){Ke.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(Ke,we,F){Ke.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(Ke,we,F){"use strict";var ae=F("rePB"),L=F("VTBJ"),I=F("Ff2n"),j=F("U8pU"),C=F("q1tI"),S=F.n(C),H=F("TSYQ"),U=F.n(H),R=F("c+Xe"),A=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,p=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,O=a.firstFixRight,B=a.lastFixRight,w=a.appendNode,W=a.additionalProps,P=W===void 0?{}:W,z=a.ellipsis,Q=a.align,re=a.rowType,le=a.isSticky,be="".concat(t,"-cell"),ye,ie;if(g)ie=g;else{var xe=Object(A.b)(T,p);if(ie=xe,E){var Ae=E(xe,T,_);y(Ae)?(ie=Ae.children,ye=Ae.props):ie=Ae}}Object(j.a)(ie)==="object"&&!Array.isArray(ie)&&!C.isValidElement(ie)&&(ie=null),z&&(D||O)&&(ie=C.createElement("span",{className:"".concat(be,"-content")},ie));var fe=ye||{},Z=fe.colSpan,Ue=fe.rowSpan,$e=fe.style,tt=fe.className,Qe=Object(I.a)(fe,["colSpan","rowSpan","style","className"]),it=Z!==void 0?Z:r,Pe=Ue!==void 0?Ue:l;if(it===0||Pe===0)return null;var We={},Je=typeof f=="number",et=typeof c=="number";Je&&(We.position="sticky",We.left=f),et&&(We.position="sticky",We.right=c);var Ye={};Q&&(Ye.textAlign=Q);var ze,He=z===!0?{showTitle:!0}:z;He&&(He.showTitle||re==="header")&&(typeof ie=="string"||typeof ie=="number"?ze=ie.toString():C.isValidElement(ie)&&typeof ie.props.children=="string"&&(ze=ie.props.children));var ft=Object(L.a)(Object(L.a)(Object(L.a)({title:ze},Qe),P),{},{colSpan:it&&it!==1?it:null,rowSpan:Pe&&Pe!==1?Pe:null,className:U()(be,i,(e={},Object(ae.a)(e,"".concat(be,"-fix-left"),Je),Object(ae.a)(e,"".concat(be,"-fix-left-first"),x),Object(ae.a)(e,"".concat(be,"-fix-left-last"),D),Object(ae.a)(e,"".concat(be,"-fix-right"),et),Object(ae.a)(e,"".concat(be,"-fix-right-first"),O),Object(ae.a)(e,"".concat(be,"-fix-right-last"),B),Object(ae.a)(e,"".concat(be,"-ellipsis"),z),Object(ae.a)(e,"".concat(be,"-with-append"),w),Object(ae.a)(e,"".concat(be,"-fix-sticky"),(Je||et)&&le),e),P.className,tt),style:Object(L.a)(Object(L.a)(Object(L.a)(Object(L.a)({},P.style),Ye),We),$e),ref:v(u)?s:null});return C.createElement(u,Object.assign({},ft),w,ie)}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});we.a=n},hW8S:function(Ke,we,F){"use strict";F.d(we,"a",function(){return j}),F.d(we,"c",function(){return C}),F.d(we,"b",function(){return S});var ae=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(ae.a)(Object(ae.a)({},R),U):R}function S(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(Ke,we,F){Ke.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(Ke,we,F){"use strict";F.d(we,"a",function(){return Be});var ae=F("rePB"),L=F("ODXe"),I=F("Ff2n"),j=F("VTBJ"),C=F("q1tI"),S=F("TSYQ"),H=F.n(S),U=F("Zm9Q"),R=F("6cGi"),A=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 V=arguments.length,q=new Array(V),X=0;X<V;X++)q[X]=arguments[X];ve.current||(v.a.cancel(de.current),de.current=v()(function(){$.apply(void 0,q)}))}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),V=oe[1],q=Object(C.useRef)(typeof $=="function"?$():$),X=o(function(){var ce=q.current;de.current.forEach(function(_e){ce=_e(ce)}),de.current=[],q.current=ce,V({})});function se(ce){de.current.push(ce),X()}return[q.current,se]}var a=F("4IlW");function s($,de){var ve,oe=$.prefixCls,V=$.id,q=$.active,X=$.rtl,se=$.tab,ce=se.key,_e=se.tab,ge=se.disabled,Se=se.closeIcon,Me=$.tabBarGutter,qe=$.tabPosition,Ze=$.closable,ut=$.renderWrapper,Pt=$.removeAriaLabel,Ht=$.editable,kt=$.onClick,Gt=$.onRemove,Wt=$.onFocus,jt="".concat(oe,"-tab");C.useEffect(function(){return Gt},[]);var Ft={};qe==="top"||qe==="bottom"?Ft[X?"marginLeft":"marginRight"]=Me:Ft.marginBottom=Me;var Zt=Ht&&Ze!==!1&&!ge;function zt(It){if(ge)return;kt(It)}function vn(It){It.preventDefault(),It.stopPropagation(),Ht.onEdit("remove",{key:ce,event:It})}var an=C.createElement("div",{key:ce,ref:de,className:H()(jt,(ve={},Object(ae.a)(ve,"".concat(jt,"-with-remove"),Zt),Object(ae.a)(ve,"".concat(jt,"-active"),q),Object(ae.a)(ve,"".concat(jt,"-disabled"),ge),ve)),style:Ft,onClick:zt},C.createElement("div",{role:"tab","aria-selected":q,id:V&&"".concat(V,"-tab-").concat(ce),className:"".concat(jt,"-btn"),"aria-controls":V&&"".concat(V,"-panel-").concat(ce),"aria-disabled":ge,tabIndex:ge?null:0,onClick:function(Ot){Ot.stopPropagation(),zt(Ot)},onKeyDown:function(Ot){[a.a.SPACE,a.a.ENTER].includes(Ot.which)&&(Ot.preventDefault(),zt(Ot))},onFocus:Wt},_e),Zt&&C.createElement("button",{type:"button","aria-label":Pt||"remove",tabIndex:0,className:"".concat(jt,"-remove"),onClick:function(Ot){Ot.stopPropagation(),vn(Ot)}},Se||Ht.removeIcon||"\xD7"));return ut&&(an=ut(an)),an}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,V=new Map,q=de.get((oe=$[0])===null||oe===void 0?void 0:oe.key)||t,X=q.left+q.width,se=0;se<$.length;se+=1){var ce=$[se].key,_e=de.get(ce);if(!_e){var ge;_e=de.get((ge=$[se-1])===null||ge===void 0?void 0:ge.key)||t}var Se=V.get(ce)||Object(j.a)({},_e);Se.right=X-Se.left-Se.width,V.set(ce,Se)}return V},[$.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,V){var q=V.tabs,X=V.tabPosition,se=V.rtl,ce,_e,ge;["top","bottom"].includes(X)?(ce="width",_e=se?"right":"left",ge=Math.abs(de.left)):(ce="height",_e="top",ge=-de.top);var Se=de[ce],Me=ve[ce],qe=oe[ce],Ze=Se;return Me+qe>Se&&(Ze=Se-qe),Object(C.useMemo)(function(){if(!q.length)return[0,0];for(var ut=q.length,Pt=ut,Ht=0;Ht<ut;Ht+=1){var kt=$.get(q[Ht].key)||T;if(kt[_e]+kt[ce]>ge+Ze){Pt=Ht-1;break}}for(var Gt=0,Wt=ut-1;Wt>=0;Wt-=1){var jt=$.get(q[Wt].key)||T;if(jt[_e]<ge){Gt=Wt+1;break}}return[Gt,Pt]},[$,ge,Ze,X,q.map(function(ut){return ut.key}).join("_"),se])}var p=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),O=F("U8pU"),B=/iPhone/i,w=/iPod/i,W=/iPad/i,P=/\bAndroid(?:.+)Mobile\b/i,z=/Android/i,Q=/\bAndroid(?:.+)SD4930UR\b/i,re=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,le=/Windows Phone/i,be=/\bWindows(?:.+)ARM\b/i,ye=/BlackBerry/i,ie=/BB10/i,xe=/Opera Mini/i,Ae=/\b(CriOS|Chrome)(?:.+)Mobile/i,fe=/Mobile(?:.+)Firefox\b/i;function Z($,de){return $.test(de)}function Ue($){var de=$||(typeof navigator!="undefined"?navigator.userAgent:""),ve=(de||"").split("[FBAN");if(typeof ve[1]!="undefined"){var oe=ve,V=Object(L.a)(oe,1);de=V[0]}if(ve=de.split("Twitter"),typeof ve[1]!="undefined"){var q=ve,X=Object(L.a)(q,1);de=X[0]}var se={apple:{phone:Z(B,de)&&!Z(le,de),ipod:Z(w,de),tablet:!Z(B,de)&&Z(W,de)&&!Z(le,de),device:(Z(B,de)||Z(w,de)||Z(W,de))&&!Z(le,de)},amazon:{phone:Z(Q,de),tablet:!Z(Q,de)&&Z(re,de),device:Z(Q,de)||Z(re,de)},android:{phone:!Z(le,de)&&Z(Q,de)||!Z(le,de)&&Z(P,de),tablet:!Z(le,de)&&!Z(Q,de)&&!Z(P,de)&&(Z(re,de)||Z(z,de)),device:!Z(le,de)&&(Z(Q,de)||Z(re,de)||Z(P,de)||Z(z,de))||Z(/\bokhttp\b/i,de)},windows:{phone:Z(le,de),tablet:Z(be,de),device:Z(le,de)||Z(be,de)},other:{blackberry:Z(ye,de),blackberry10:Z(ie,de),opera:Z(xe,de),firefox:Z(fe,de),chrome:Z(Ae,de),device:Z(ye,de)||Z(ie,de)||Z(xe,de)||Z(fe,de)||Z(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 $e=Object(j.a)(Object(j.a)({},Ue()),{},{isMobile:Ue}),tt=$e;function Qe(){}function it($,de,ve){var oe=de||"";return $.key||"".concat(oe,"item_").concat(ve)}function Pe($){return"".concat($,"-menu-")}function We($,de){var ve=-1;C.Children.forEach($,function(oe){ve+=1,oe&&oe.type&&oe.type.isMenuItemGroup?C.Children.forEach(oe.props.children,function(V){ve+=1,de(V,ve)}):de(oe,ve)})}function Je($,de,ve){if(!$||ve.find)return;C.Children.forEach($,function(oe){if(oe){var V=oe.type;if(!V||!(V.isSubMenu||V.isMenuItem||V.isMenuItemGroup))return;de.indexOf(oe.key)!==-1?ve.find=!0:oe.props.children&&Je(oe.props.children,de,ve)}})}var et=["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"],Ye=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 V=getComputedStyle(de),q=V.marginLeft,X=V.marginRight;oe+=+q.replace("px","")+ +X.replace("px","")}oe=+oe.toFixed(6)}return oe||0},ze=function(de,ve,oe){de&&Object(O.a)(de.style)==="object"&&(de.style[ve]=oe)},He=function(){return tt.any},ft=F("bdgK"),ht=F("i8i4"),lt=F.n(ht),at=F("wgJM"),mt=F("l4aY"),pt=F("m+aA"),me=F("c+Xe"),Ce=F("zT1h"),De=F("QC+M");function Ne($,de,ve){return ve?$[0]===de[0]:$[0]===de[0]&&$[1]===de[1]}function Ee($,de,ve){var oe=$[de]||{};return Object(j.a)(Object(j.a)({},oe),ve)}function Le($,de,ve,oe){for(var V=ve.points,q=Object.keys($),X=0;X<q.length;X+=1){var se=q[X];if(Ne($[se].points,V,oe))return"".concat(de,"-placement-").concat(se)}return""}var ue=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)))},ne=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 K($,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 Y=K(Object(ne.a)(),typeof window!="undefined"?window:{}),J={};if(Object(ne.a)()){var ee=document.createElement("div");J=ee.style}var pe={};function Te($){if(pe[$])return pe[$];var de=Y[$];if(de)for(var ve=Object.keys(de),oe=ve.length,V=0;V<oe;V+=1){var q=ve[V];if(Object.prototype.hasOwnProperty.call(de,q)&&q in J)return pe[$]=de[q],pe[$]}return""}var Re=Te("animationend"),Xe=Te("transitionend"),nt=!!(Re&&Xe),Fe=Re||"animationend",bt=Xe||"transitionend";function vt($,de){if(!$)return null;if(Object(O.a)($)==="object"){var ve=de.replace(/-\w/g,function(oe){return oe[1].toUpperCase()});return $[ve]}return"".concat($,"-").concat(de)}var rt="none",wt="appear",Dt="enter",xt="leave",ct="none",yt="prepare",St="start",Mt="active",Ie="end";function ot($){var de=Object(C.useRef)(!1),ve=Object(C.useState)($),oe=Object(L.a)(ve,2),V=oe[0],q=oe[1];function X(se){de.current||q(se)}return Object(C.useEffect)(function(){return function(){de.current=!0}},[]),[V,X]}var _t=Object(ne.a)()?C.useLayoutEffect:C.useEffect,Et=_t,Ut=function(){var $=C.useRef(null);function de(){at.a.cancel($.current)}function ve(oe){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;de();var q=Object(at.a)(function(){V<=1?oe({isCanceled:function(){return q!==$.current}}):ve(oe,V-1)});$.current=q}return C.useEffect(function(){return function(){de()}},[]),[ve,de]},wn=[yt,St,Mt,Ie],jn=!1,Cn=!0;function Rn($){return $===Mt||$===Ie}var Pn=function($,de){var ve=C.useState(ct),oe=Object(L.a)(ve,2),V=oe[0],q=oe[1],X=Ut(),se=Object(L.a)(X,2),ce=se[0],_e=se[1];function ge(){q(yt)}return Et(function(){if(V!==ct&&V!==Ie){var Se=wn.indexOf(V),Me=wn[Se+1],qe=de(V);qe===jn?q(Me):ce(function(Ze){function ut(){if(Ze.isCanceled())return;q(Me)}qe===!0?ut():Promise.resolve(qe).then(ut)})}},[$,V]),C.useEffect(function(){return function(){_e()}},[]),[ge,V]},An=function($){var de=Object(C.useRef)(),ve=Object(C.useRef)($);ve.current=$;var oe=C.useCallback(function(X){ve.current(X)},[]);function V(X){X&&(X.removeEventListener(bt,oe),X.removeEventListener(Fe,oe))}function q(X){de.current&&de.current!==X&&V(de.current),X&&X!==de.current&&(X.addEventListener(bt,oe),X.addEventListener(Fe,oe),de.current=X)}return C.useEffect(function(){return function(){V(de.current)}},[]),[q,V]};function Jn($,de,ve,oe){var V=oe.motionEnter,q=V===void 0?!0:V,X=oe.motionAppear,se=X===void 0?!0:X,ce=oe.motionLeave,_e=ce===void 0?!0:ce,ge=oe.motionDeadline,Se=oe.motionLeaveImmediately,Me=oe.onAppearPrepare,qe=oe.onEnterPrepare,Ze=oe.onLeavePrepare,ut=oe.onAppearStart,Pt=oe.onEnterStart,Ht=oe.onLeaveStart,kt=oe.onAppearActive,Gt=oe.onEnterActive,Wt=oe.onLeaveActive,jt=oe.onAppearEnd,Ft=oe.onEnterEnd,Zt=oe.onLeaveEnd,zt=oe.onVisibleChanged,vn=ot(),an=Object(L.a)(vn,2),It=an[0],Ot=an[1],Xt=ot(rt),Jt=Object(L.a)(Xt,2),Tt=Jt[0],qt=Jt[1],hn=ot(null),$t=Object(L.a)(hn,2),ln=$t[0],pn=$t[1],kn=Object(C.useRef)(!1),Xn=Object(C.useRef)(null),bn=Object(C.useRef)(!1),Qn=Object(C.useRef)(null);function Ei(){var fn=ve();return fn||Qn.current}var ii=Object(C.useRef)(!1);function ri(fn){var rn=Ei();if(fn&&!fn.deadline&&fn.target!==rn)return;var Bn;Tt===wt&&ii.current?Bn=jt==null?void 0:jt(rn,fn):Tt===Dt&&ii.current?Bn=Ft==null?void 0:Ft(rn,fn):Tt===xt&&ii.current&&(Bn=Zt==null?void 0:Zt(rn,fn)),Bn!==!1&&!bn.current&&(qt(rt),pn(null))}var xn=An(ri),Wn=Object(L.a)(xn,1),Un=Wn[0],Dn=C.useMemo(function(){var fn,rn,Bn;switch(Tt){case"appear":return fn={},Object(ae.a)(fn,yt,Me),Object(ae.a)(fn,St,ut),Object(ae.a)(fn,Mt,kt),fn;case"enter":return rn={},Object(ae.a)(rn,yt,qe),Object(ae.a)(rn,St,Pt),Object(ae.a)(rn,Mt,Gt),rn;case"leave":return Bn={},Object(ae.a)(Bn,yt,Ze),Object(ae.a)(Bn,St,Ht),Object(ae.a)(Bn,Mt,Wt),Bn;default:return{}}},[Tt]),Li=Pn(Tt,function(fn){if(fn===yt){var rn=Dn[yt];return rn?rn(Ei()):jn}if(cn in Dn){var Bn;pn(((Bn=Dn[cn])===null||Bn===void 0?void 0:Bn.call(Dn,Ei(),null))||null)}return cn===Mt&&(Un(Ei()),ge>0&&(clearTimeout(Xn.current),Xn.current=setTimeout(function(){ri({deadline:!0})},ge))),Cn}),Pi=Object(L.a)(Li,2),Hi=Pi[0],cn=Pi[1],wi=Rn(cn);ii.current=wi,Et(function(){Ot(de);var fn=kn.current;if(kn.current=!0,!$)return;var rn;!fn&&de&&se&&(rn=wt),fn&&de&&q&&(rn=Dt),(fn&&!de&&_e||!fn&&Se&&!de&&_e)&&(rn=xt),rn&&(qt(rn),Hi())},[de]),Object(C.useEffect)(function(){(Tt===wt&&!se||Tt===Dt&&!q||Tt===xt&&!_e)&&qt(rt)},[se,q,_e]),Object(C.useEffect)(function(){return function(){clearTimeout(Xn.current),bn.current=!0}},[]),Object(C.useEffect)(function(){It!==void 0&&Tt===rt&&(zt==null||zt(It))},[It,Tt]);var Wi=ln;return Dn[yt]&&cn===St&&(Wi=Object(j.a)({transition:"none"},Wi)),[Tt,cn,Wi,It!=null?It:de]}var Kn=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),On=Kn;function Mn($){var de=$;Object(O.a)($)==="object"&&(de=$.transitionSupport);function ve(V){return!!(V.motionName&&de)}var oe=C.forwardRef(function(V,q){var X=V.visible,se=X===void 0?!0:X,ce=V.removeOnLeave,_e=ce===void 0?!0:ce,ge=V.forceRender,Se=V.children,Me=V.motionName,qe=V.leavedClassName,Ze=V.eventProps,ut=ve(V),Pt=Object(C.useRef)(),Ht=Object(C.useRef)();function kt(){try{return Object(pt.a)(Pt.current||Ht.current)}catch(qt){return null}}var Gt=Jn(ut,se,kt,V),Wt=Object(L.a)(Gt,4),jt=Wt[0],Ft=Wt[1],Zt=Wt[2],zt=Wt[3],vn=C.useRef(zt);zt&&(vn.current=!0);var an=Object(C.useRef)(q);an.current=q;var It=C.useCallback(function(qt){Pt.current=qt,Object(me.b)(an.current,qt)},[]),Ot,Xt=Object(j.a)(Object(j.a)({},Ze),{},{visible:se});if(!Se)Ot=null;else if(jt===rt||!ve(V))zt?Ot=Se(Object(j.a)({},Xt),It):!_e&&vn.current?Ot=Se(Object(j.a)(Object(j.a)({},Xt),{},{className:qe}),It):ge?Ot=Se(Object(j.a)(Object(j.a)({},Xt),{},{style:{display:"none"}}),It):Ot=null;else{var Jt,Tt;Ft===yt?Tt="prepare":Rn(Ft)?Tt="active":Ft===St&&(Tt="start"),Ot=Se(Object(j.a)(Object(j.a)({},Xt),{},{className:H()(vt(Me,jt),(Jt={},Object(ae.a)(Jt,vt(Me,"".concat(jt,"-").concat(Tt)),Tt),Object(ae.a)(Jt,Me,typeof Me=="string"),Jt)),style:Zt}),It)}return C.createElement(On,{ref:Ht},Ot)});return oe.displayName="CSSMotion",oe}var Gn=Mn(nt),oi="add",zn="keep",Nt="remove",Zn="removed";function fi($){var de;return $&&Object(O.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,V=de.length,q=qn($),X=qn(de);q.forEach(function(_e){for(var ge=!1,Se=oe;Se<V;Se+=1){var Me=X[Se];if(Me.key===_e.key){oe<Se&&(ve=ve.concat(X.slice(oe,Se).map(function(qe){return Object(j.a)(Object(j.a)({},qe),{},{status:oi})})),oe=Se),ve.push(Object(j.a)(Object(j.a)({},Me),{},{status:zn})),oe+=1,ge=!0;break}}ge||ve.push(Object(j.a)(Object(j.a)({},_e),{},{status:Nt}))}),oe<V&&(ve=ve.concat(X.slice(oe).map(function(_e){return Object(j.a)(Object(j.a)({},_e),{},{status:oi})})));var se={};ve.forEach(function(_e){var ge=_e.key;se[ge]=(se[ge]||0)+1});var ce=Object.keys(se).filter(function(_e){return se[_e]>1});return ce.forEach(function(_e){ve=ve.filter(function(ge){var Se=ge.key,Me=ge.status;return Se!==_e||Me!==Nt}),ve.forEach(function(ge){ge.key===_e&&(ge.status=zn)})}),ve}var m=["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]:Gn,ve=function(oe){Object(u.a)(q,oe);var V=Object(r.a)(q);function q(){var X;return Object(E.a)(this,q),X=V.apply(this,arguments),X.state={keyEntities:[]},X.removeKey=function(se){X.setState(function(ce){var _e=ce.keyEntities;return{keyEntities:_e.map(function(ge){return ge.key!==se?ge:Object(j.a)(Object(j.a)({},ge),{},{status:Zn})})}})},X}return Object(g.a)(q,[{key:"render",value:function(){var se=this,ce=this.state.keyEntities,_e=this.props,ge=_e.component,Se=_e.children,Me=_e.onVisibleChanged,qe=Object(I.a)(_e,["component","children","onVisibleChanged"]),Ze=ge||C.Fragment,ut={};return m.forEach(function(Pt){ut[Pt]=qe[Pt],delete qe[Pt]}),delete qe.keys,C.createElement(Ze,qe,ce.map(function(Pt){var Ht=Pt.status,kt=Object(I.a)(Pt,["status"]),Gt=Ht===oi||Ht===zn;return C.createElement(de,Object(p.a)({},ut,{key:kt.key,visible:Gt,eventProps:kt,onVisibleChanged:function(jt){Me==null||Me(jt,{key:kt.key}),jt||se.removeKey(kt.key)}}),Se)}))}}],[{key:"getDerivedStateFromProps",value:function(se,ce){var _e=se.keys,ge=ce.keyEntities,Se=qn(_e),Me=N(ge,Se);return{keyEntities:Me.filter(function(qe){var Ze=ge.find(function(ut){var Pt=ut.key;return qe.key===Pt});return!(Ze&&Ze.status===Zn&&qe.status===Nt)})}}}]),q}(C.Component);return ve.defaultProps={component:"div"},ve}var M=b(nt),G=Gn;function k($){var de=$.prefixCls,ve=$.motion,oe=$.animation,V=$.transitionName;return ve||(oe?{motionName:"".concat(de,"-").concat(oe)}:V?{motionName:V}:null)}function he($){var de=$.prefixCls,ve=$.visible,oe=$.zIndex,V=$.mask,q=$.maskMotion,X=$.maskAnimation,se=$.maskTransitionName;if(!V)return null;var ce={};return(q||se||X)&&(ce=Object(j.a)({motionAppear:!0},k({motion:q,prefixCls:de,transitionName:se,animation:X}))),C.createElement(G,Object(p.a)({},ce,{visible:ve,removeOnLeave:!0}),function(_e){var ge=_e.className;return C.createElement("div",{style:{zIndex:oe},className:H()("".concat(de,"-mask"),ge)})})}var je=F("9mu1"),st=F("o0o1"),gt=F.n(st),Ge=F("HaE+"),At=["measure","align",null,"motion"],Lt=function($,de){var ve=Object(C.useState)(null),oe=Object(L.a)(ve,2),V=oe[0],q=oe[1],X=Object(C.useRef)(),se=Object(C.useRef)(!1);function ce(Se){se.current||q(Se)}function _e(){at.a.cancel(X.current)}function ge(Se){_e(),X.current=Object(at.a)(function(){ce(function(Me){switch(V){case"align":return"motion";case"motion":return"stable";default:}return Me}),Se==null||Se()})}return Object(C.useEffect)(function(){ce("measure")},[$]),Object(C.useEffect)(function(){switch(V){case"measure":de();break;default:}V&&(X.current=Object(at.a)(Object(Ge.a)(gt.a.mark(function Se(){var Me,qe;return gt.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:Me=At.indexOf(V),qe=At[Me+1],qe&&Me!==-1&&ce(qe);case 3:case"end":return ut.stop()}},Se)}))))},[V]),Object(C.useEffect)(function(){return function(){se.current=!0,_e()}},[]),[V,ge]},en=function($){var de=C.useState({width:0,height:0}),ve=Object(L.a)(de,2),oe=ve[0],V=ve[1];function q(se){V({width:se.offsetWidth,height:se.offsetHeight})}var X=C.useMemo(function(){var se={};if($){var ce=oe.width,_e=oe.height;$.indexOf("height")!==-1&&_e?se.height=_e:$.indexOf("minHeight")!==-1&&_e&&(se.minHeight=_e),$.indexOf("width")!==-1&&ce?se.width=ce:$.indexOf("minWidth")!==-1&&ce&&(se.minWidth=ce)}return se},[$,oe]);return[X,q]},In=C.forwardRef(function($,de){var ve=$.visible,oe=$.prefixCls,V=$.className,q=$.style,X=$.children,se=$.zIndex,ce=$.stretch,_e=$.destroyPopupOnHide,ge=$.forceRender,Se=$.align,Me=$.point,qe=$.getRootDomNode,Ze=$.getClassNameFromAlign,ut=$.onAlign,Pt=$.onMouseEnter,Ht=$.onMouseLeave,kt=$.onMouseDown,Gt=$.onTouchStart,Wt=Object(C.useRef)(),jt=Object(C.useRef)(),Ft=Object(C.useState)(),Zt=Object(L.a)(Ft,2),zt=Zt[0],vn=Zt[1],an=en(ce),It=Object(L.a)(an,2),Ot=It[0],Xt=It[1];function Jt(){ce&&Xt(qe())}var Tt=Lt(ve,Jt),qt=Object(L.a)(Tt,2),hn=qt[0],$t=qt[1],ln=Object(C.useRef)();function pn(){return Me||qe}function kn(){var xn;(xn=Wt.current)===null||xn===void 0||xn.forceAlign()}function Xn(xn,Wn){var Un=Ze(Wn);zt!==Un&&vn(Un),hn==="align"&&(zt!==Un?Promise.resolve().then(function(){kn()}):$t(function(){var Dn;(Dn=ln.current)===null||Dn===void 0||Dn.call(ln)}),ut==null||ut(xn,Wn))}var bn=Object(j.a)({},k($));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(xn){var Wn=bn[xn];bn[xn]=function(Un,Dn){return $t(),Wn==null?void 0:Wn(Un,Dn)}});function Qn(){return new Promise(function(xn){ln.current=xn})}C.useEffect(function(){!bn.motionName&&hn==="motion"&&$t()},[bn.motionName,hn]),C.useImperativeHandle(de,function(){return{forceAlign:kn,getElement:function(){return jt.current}}});var Ei=Object(j.a)(Object(j.a)({},Ot),{},{zIndex:se,opacity:hn==="motion"||hn==="stable"||!ve?void 0:0,pointerEvents:hn==="stable"?void 0:"none"},q),ii=!0;(Se==null?void 0:Se.points)&&(hn==="align"||hn==="stable")&&(ii=!1);var ri=X;return C.Children.count(X)>1&&(ri=C.createElement("div",{className:"".concat(oe,"-content")},X)),C.createElement(G,Object(p.a)({visible:ve,ref:jt,leavedClassName:"".concat(oe,"-hidden")},bn,{onAppearPrepare:Qn,onEnterPrepare:Qn,removeOnLeave:_e,forceRender:ge}),function(xn,Wn){var Un=xn.className,Dn=xn.style,Li=H()(oe,V,zt,Un);return C.createElement(je.a,{target:pn(),key:"popup",ref:Wt,monitorWindowResize:!0,disabled:ii,align:Se,onAlign:Xn},C.createElement("div",{ref:Wn,className:Li,onMouseEnter:Pt,onMouseLeave:Ht,onMouseDownCapture:kt,onTouchStartCapture:Gt,style:Object(j.a)(Object(j.a)({},Dn),Ei)},ri))})});In.displayName="PopupInner";var Vn=In,Oe=C.forwardRef(function($,de){var ve=$.prefixCls,oe=$.visible,V=$.zIndex,q=$.children,X=$.mobile;X=X===void 0?{}:X;var se=X.popupClassName,ce=X.popupStyle,_e=X.popupMotion,ge=_e===void 0?{}:_e,Se=X.popupRender,Me=C.useRef();C.useImperativeHandle(de,function(){return{forceAlign:function(){},getElement:function(){return Me.current}}});var qe=Object(j.a)({zIndex:V},ce),Ze=q;return C.Children.count(q)>1&&(Ze=C.createElement("div",{className:"".concat(ve,"-content")},q)),Se&&(Ze=Se(Ze)),C.createElement(G,Object(p.a)({visible:oe,ref:Me,removeOnLeave:!0},ge),function(ut,Pt){var Ht=ut.className,kt=ut.style,Gt=H()(ve,se,Ht);return C.createElement("div",{ref:Pt,className:Gt,style:Object(j.a)(Object(j.a)({},kt),qe)},Ze)})});Oe.displayName="MobilePopupInner";var En=Oe,si=["visible","mobile"],Yn=C.forwardRef(function($,de){var ve=$.visible,oe=$.mobile,V=Object(I.a)($,si),q=Object(C.useState)(ve),X=Object(L.a)(q,2),se=X[0],ce=X[1],_e=Object(C.useState)(!1),ge=Object(L.a)(_e,2),Se=ge[0],Me=ge[1],qe=Object(j.a)(Object(j.a)({},V),{},{visible:se});Object(C.useEffect)(function(){ce(ve),ve&&oe&&Me(ue())},[ve,oe]);var Ze=Se?C.createElement(En,Object(p.a)({},qe,{mobile:oe,ref:de})):C.createElement(Vn,Object(p.a)({},qe,{ref:de}));return C.createElement("div",null,C.createElement(he,qe),Ze)});Yn.displayName="Popup";var pi=Yn,$n=C.createContext(null),mn=$n;function Fn(){}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)(V,ve);var oe=Object(r.a)(V);function V(q){var X;Object(E.a)(this,V),X=oe.call(this,q),X.popupRef=C.createRef(),X.triggerRef=C.createRef(),X.attachId=void 0,X.clickOutsideHandler=void 0,X.touchOutsideHandler=void 0,X.contextMenuOutsideHandler1=void 0,X.contextMenuOutsideHandler2=void 0,X.mouseDownTimeout=void 0,X.focusTime=void 0,X.preClickTime=void 0,X.preTouchTime=void 0,X.delayTimer=void 0,X.hasPopupMouseDown=void 0,X.onMouseEnter=function(ce){var _e=X.props.mouseEnterDelay;X.fireEvents("onMouseEnter",ce),X.delaySetPopupVisible(!0,_e,_e?null:ce)},X.onMouseMove=function(ce){X.fireEvents("onMouseMove",ce),X.setPoint(ce)},X.onMouseLeave=function(ce){X.fireEvents("onMouseLeave",ce),X.delaySetPopupVisible(!1,X.props.mouseLeaveDelay)},X.onPopupMouseEnter=function(){X.clearDelayTimer()},X.onPopupMouseLeave=function(ce){var _e;if(ce.relatedTarget&&!ce.relatedTarget.setTimeout&&Object(mt.a)((_e=X.popupRef.current)===null||_e===void 0?void 0:_e.getElement(),ce.relatedTarget))return;X.delaySetPopupVisible(!1,X.props.mouseLeaveDelay)},X.onFocus=function(ce){X.fireEvents("onFocus",ce),X.clearDelayTimer(),X.isFocusToShow()&&(X.focusTime=Date.now(),X.delaySetPopupVisible(!0,X.props.focusDelay))},X.onMouseDown=function(ce){X.fireEvents("onMouseDown",ce),X.preClickTime=Date.now()},X.onTouchStart=function(ce){X.fireEvents("onTouchStart",ce),X.preTouchTime=Date.now()},X.onBlur=function(ce){X.fireEvents("onBlur",ce),X.clearDelayTimer(),X.isBlurToHide()&&X.delaySetPopupVisible(!1,X.props.blurDelay)},X.onContextMenu=function(ce){ce.preventDefault(),X.fireEvents("onContextMenu",ce),X.setPopupVisible(!0,ce)},X.onContextMenuClose=function(){X.isContextMenuToShow()&&X.close()},X.onClick=function(ce){if(X.fireEvents("onClick",ce),X.focusTime){var _e;if(X.preClickTime&&X.preTouchTime?_e=Math.min(X.preClickTime,X.preTouchTime):X.preClickTime?_e=X.preClickTime:X.preTouchTime&&(_e=X.preTouchTime),Math.abs(_e-X.focusTime)<20)return;X.focusTime=0}X.preClickTime=0,X.preTouchTime=0,X.isClickToShow()&&(X.isClickToHide()||X.isBlurToHide())&&ce&&ce.preventDefault&&ce.preventDefault();var ge=!X.state.popupVisible;(X.isClickToHide()&&!ge||ge&&X.isClickToShow())&&X.setPopupVisible(!X.state.popupVisible,ce)},X.onPopupMouseDown=function(){if(X.hasPopupMouseDown=!0,clearTimeout(X.mouseDownTimeout),X.mouseDownTimeout=window.setTimeout(function(){X.hasPopupMouseDown=!1},0),X.context){var ce;(ce=X.context).onPopupMouseDown.apply(ce,arguments)}},X.onDocumentClick=function(ce){if(X.props.mask&&!X.props.maskClosable)return;var _e=ce.target,ge=X.getRootDomNode(),Se=X.getPopupDomNode();(!Object(mt.a)(ge,_e)||X.isContextMenuOnly())&&!Object(mt.a)(Se,_e)&&!X.hasPopupMouseDown&&X.close()},X.getRootDomNode=function(){var ce=X.props.getTriggerDOMNode;if(ce)return ce(X.triggerRef.current);try{var _e=Object(pt.a)(X.triggerRef.current);if(_e)return _e}catch(ge){}return lt.a.findDOMNode(Object(h.a)(X))},X.getPopupClassNameFromAlign=function(ce){var _e=[],ge=X.props,Se=ge.popupPlacement,Me=ge.builtinPlacements,qe=ge.prefixCls,Ze=ge.alignPoint,ut=ge.getPopupClassNameFromAlign;return Se&&Me&&_e.push(Le(Me,qe,ce,Ze)),ut&&_e.push(ut(ce)),_e.join(" ")},X.getComponent=function(){var ce=X.props,_e=ce.prefixCls,ge=ce.destroyPopupOnHide,Se=ce.popupClassName,Me=ce.onPopupAlign,qe=ce.popupMotion,Ze=ce.popupAnimation,ut=ce.popupTransitionName,Pt=ce.popupStyle,Ht=ce.mask,kt=ce.maskAnimation,Gt=ce.maskTransitionName,Wt=ce.maskMotion,jt=ce.zIndex,Ft=ce.popup,Zt=ce.stretch,zt=ce.alignPoint,vn=ce.mobile,an=ce.forceRender,It=X.state,Ot=It.popupVisible,Xt=It.point,Jt=X.getPopupAlign(),Tt={};return X.isMouseEnterToShow()&&(Tt.onMouseEnter=X.onPopupMouseEnter),X.isMouseLeaveToHide()&&(Tt.onMouseLeave=X.onPopupMouseLeave),Tt.onMouseDown=X.onPopupMouseDown,Tt.onTouchStart=X.onPopupMouseDown,C.createElement(pi,Object(p.a)({prefixCls:_e,destroyPopupOnHide:ge,visible:Ot,point:zt&&Xt,className:Se,align:Jt,onAlign:Me,animation:Ze,getClassNameFromAlign:X.getPopupClassNameFromAlign},Tt,{stretch:Zt,getRootDomNode:X.getRootDomNode,style:Pt,mask:Ht,zIndex:jt,transitionName:ut,maskAnimation:kt,maskTransitionName:Gt,maskMotion:Wt,ref:X.popupRef,motion:qe,mobile:vn,forceRender:an}),typeof Ft=="function"?Ft():Ft)},X.attachParent=function(ce){at.a.cancel(X.attachId);var _e=X.props,ge=_e.getPopupContainer,Se=_e.getDocument,Me=X.getRootDomNode(),qe;ge?(Me||ge.length===0)&&(qe=ge(Me)):qe=Se(X.getRootDomNode()).body,qe?qe.appendChild(ce):X.attachId=Object(at.a)(function(){X.attachParent(ce)})},X.getContainer=function(){var ce=X.props.getDocument,_e=ce(X.getRootDomNode()).createElement("div");return _e.style.position="absolute",_e.style.top="0",_e.style.left="0",_e.style.width="100%",X.attachParent(_e),_e},X.setPoint=function(ce){var _e=X.props.alignPoint;if(!_e||!ce)return;X.setState({point:{pageX:ce.pageX,pageY:ce.pageY}})},X.handlePortalUpdate=function(){X.state.prevPopupVisible!==X.state.popupVisible&&X.props.afterPopupVisibleChange(X.state.popupVisible)},X.triggerContextValue={onPopupMouseDown:X.onPopupMouseDown};var se;return"popupVisible"in q?se=!!q.popupVisible:se=!!q.defaultPopupVisible,X.state={prevPopupVisible:se,popupVisible:se},Ti.forEach(function(ce){X["fire".concat(ce)]=function(_e){X.fireEvents(ce,_e)}}),X}return Object(g.a)(V,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var X=this.props,se=this.state;if(se.popupVisible){var ce;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(ce=X.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ce.a)(ce,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(ce=ce||X.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ce.a)(ce,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(ce=ce||X.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ce.a)(ce,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ce.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),at.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var X;return((X=this.popupRef.current)===null||X===void 0?void 0:X.getElement())||null}},{key:"getPopupAlign",value:function(){var X=this.props,se=X.popupPlacement,ce=X.popupAlign,_e=X.builtinPlacements;return se&&_e?Ee(_e,se,ce):ce}},{key:"setPopupVisible",value:function(X,se){var ce=this.props.alignPoint,_e=this.state.popupVisible;this.clearDelayTimer(),_e!==X&&("popupVisible"in this.props||this.setState({popupVisible:X,prevPopupVisible:_e}),this.props.onPopupVisibleChange(X)),ce&&se&&X&&this.setPoint(se)}},{key:"delaySetPopupVisible",value:function(X,se,ce){var _e=this,ge=se*1e3;if(this.clearDelayTimer(),ge){var Se=ce?{pageX:ce.pageX,pageY:ce.pageY}:null;this.delayTimer=window.setTimeout(function(){_e.setPopupVisible(X,Se),_e.clearDelayTimer()},ge)}else this.setPopupVisible(X,ce)}},{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(X){var se=this.props.children.props,ce=this.props;return se[X]&&ce[X]?this["fire".concat(X)]:se[X]||ce[X]}},{key:"isClickToShow",value:function(){var X=this.props,se=X.action,ce=X.showAction;return se.indexOf("click")!==-1||ce.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var X=this.props.action;return X==="contextMenu"||X.length===1&&X[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var X=this.props,se=X.action,ce=X.showAction;return se.indexOf("contextMenu")!==-1||ce.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var X=this.props,se=X.action,ce=X.hideAction;return se.indexOf("click")!==-1||ce.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var X=this.props,se=X.action,ce=X.showAction;return se.indexOf("hover")!==-1||ce.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var X=this.props,se=X.action,ce=X.hideAction;return se.indexOf("hover")!==-1||ce.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var X=this.props,se=X.action,ce=X.showAction;return se.indexOf("focus")!==-1||ce.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var X=this.props,se=X.action,ce=X.hideAction;return se.indexOf("focus")!==-1||ce.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var X;(X=this.popupRef.current)===null||X===void 0||X.forceAlign()}}},{key:"fireEvents",value:function(X,se){var ce=this.props.children.props[X];ce&&ce(se);var _e=this.props[X];_e&&_e(se)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var X=this.state.popupVisible,se=this.props,ce=se.children,_e=se.forceRender,ge=se.alignPoint,Se=se.className,Me=se.autoDestroy,qe=C.Children.only(ce),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,ge&&(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 ut=H()(qe&&qe.props&&qe.props.className,Se);ut&&(Ze.className=ut);var Pt=Object(j.a)({},Ze);Object(me.c)(qe)&&(Pt.ref=Object(me.a)(this.triggerRef,qe.ref));var Ht=C.cloneElement(qe,Pt),kt;return(X||this.popupRef.current||_e)&&(kt=C.createElement($,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!X&&Me&&(kt=null),C.createElement(mn.Provider,{value:this.triggerContextValue},Ht,kt)}}],[{key:"getDerivedStateFromProps",value:function(X,se){var ce=X.popupVisible,_e={};return ce!==void 0&&se.popupVisible!==ce&&(_e.popupVisible=ce,_e.prevPopupVisible=se.popupVisible),_e}}]),V}(C.Component);return de.contextType=mn,de.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:li,getDocument:mi,onPopupVisibleChange:Fn,afterPopupVisibleChange:Fn,onPopupAlign:Fn,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),Tn={adjustX:1,adjustY:1},ei={topLeft:{points:["bl","tl"],overflow:Tn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Tn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Tn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Tn,offset:[4,0]}},Ri={topLeft:{points:["bl","tl"],overflow:Tn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Tn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Tn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Tn,offset:[4,0]}},gi=ei,nn=0,Bt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},un=function(de,ve,oe){var V=Pe(ve),q=de.getState();de.setState({defaultActiveFirst:Object(j.a)(Object(j.a)({},q.defaultActiveFirst),{},Object(ae.a)({},V,oe))})},Vt=function($){Object(u.a)(ve,$);var de=Object(r.a)(ve);function ve(oe){var V;Object(E.a)(this,ve),V=de.call(this,oe),V.onDestroy=function(ge){V.props.onDestroy(ge)},V.onKeyDown=function(ge){var Se=ge.keyCode,Me=V.menuInstance,qe=V.props.store,Ze=V.getVisible();if(Se===a.a.ENTER)return V.onTitleClick(ge),un(qe,V.props.eventKey,!0),!0;if(Se===a.a.RIGHT)return Ze?Me.onKeyDown(ge):(V.triggerOpenChange(!0),un(qe,V.props.eventKey,!0)),!0;if(Se===a.a.LEFT){var ut;if(Ze)ut=Me.onKeyDown(ge);else return;return ut||(V.triggerOpenChange(!1),ut=!0),ut}return Ze&&(Se===a.a.UP||Se===a.a.DOWN)?Me.onKeyDown(ge):void 0},V.onOpenChange=function(ge){V.props.onOpenChange(ge)},V.onPopupVisibleChange=function(ge){V.triggerOpenChange(ge,ge?"mouseenter":"mouseleave")},V.onMouseEnter=function(ge){var Se=V.props,Me=Se.eventKey,qe=Se.onMouseEnter,Ze=Se.store;un(Ze,V.props.eventKey,!1),qe({key:Me,domEvent:ge})},V.onMouseLeave=function(ge){var Se=V.props,Me=Se.parentMenu,qe=Se.eventKey,Ze=Se.onMouseLeave;Me.subMenuInstance=Object(h.a)(V),Ze({key:qe,domEvent:ge})},V.onTitleMouseEnter=function(ge){var Se=V.props,Me=Se.eventKey,qe=Se.onItemHover,Ze=Se.onTitleMouseEnter;qe({key:Me,hover:!0}),Ze({key:Me,domEvent:ge})},V.onTitleMouseLeave=function(ge){var Se=V.props,Me=Se.parentMenu,qe=Se.eventKey,Ze=Se.onItemHover,ut=Se.onTitleMouseLeave;Me.subMenuInstance=Object(h.a)(V),Ze({key:qe,hover:!1}),ut({key:qe,domEvent:ge})},V.onTitleClick=function(ge){var Se=Object(h.a)(V),Me=Se.props;if(Me.onTitleClick({key:Me.eventKey,domEvent:ge}),Me.triggerSubMenuAction==="hover")return;V.triggerOpenChange(!V.getVisible(),"click"),un(Me.store,V.props.eventKey,!1)},V.onSubMenuClick=function(ge){typeof V.props.onClick=="function"&&V.props.onClick(V.addKeyPath(ge))},V.onSelect=function(ge){V.props.onSelect(ge)},V.onDeselect=function(ge){V.props.onDeselect(ge)},V.getPrefixCls=function(){return"".concat(V.props.rootPrefixCls,"-submenu")},V.getActiveClassName=function(){return"".concat(V.getPrefixCls(),"-active")},V.getDisabledClassName=function(){return"".concat(V.getPrefixCls(),"-disabled")},V.getSelectedClassName=function(){return"".concat(V.getPrefixCls(),"-selected")},V.getOpenClassName=function(){return"".concat(V.props.rootPrefixCls,"-submenu-open")},V.getVisible=function(){return V.state.isOpen},V.getMode=function(){return V.state.mode},V.saveMenuInstance=function(ge){V.menuInstance=ge},V.addKeyPath=function(ge){return Object(j.a)(Object(j.a)({},ge),{},{keyPath:(ge.keyPath||[]).concat(V.props.eventKey)})},V.triggerOpenChange=function(ge,Se){var Me=V.props.eventKey,qe=function(){V.onOpenChange({key:Me,item:Object(h.a)(V),trigger:Se,open:ge})};Se==="mouseenter"?V.mouseenterTimeout=setTimeout(function(){qe()},0):qe()},V.isChildrenSelected=function(){var ge={find:!1};return Je(V.props.children,V.props.selectedKeys,ge),ge.find},V.isInlineMode=function(){return V.getMode()==="inline"},V.adjustWidth=function(){if(!V.subMenuTitle||!V.menuInstance)return;var ge=ht.findDOMNode(V.menuInstance);if(ge.offsetWidth>=V.subMenuTitle.offsetWidth)return;ge.style.minWidth="".concat(V.subMenuTitle.offsetWidth,"px")},V.saveSubMenuTitle=function(ge){V.subMenuTitle=ge},V.getBaseProps=function(){var ge=Object(h.a)(V),Se=ge.props,Me=V.getMode();return{mode:Me==="horizontal"?"vertical":Me,visible:V.getVisible(),level:Se.level+1,inlineIndent:Se.inlineIndent,focusable:!1,onClick:V.onSubMenuClick,onSelect:V.onSelect,onDeselect:V.onDeselect,onDestroy:V.onDestroy,selectedKeys:Se.selectedKeys,eventKey:"".concat(Se.eventKey,"-menu-"),openKeys:Se.openKeys,motion:Se.motion,onOpenChange:V.onOpenChange,subMenuOpenDelay:Se.subMenuOpenDelay,parentMenu:Object(h.a)(V),subMenuCloseDelay:Se.subMenuCloseDelay,forceSubMenuRender:Se.forceSubMenuRender,triggerSubMenuAction:Se.triggerSubMenuAction,builtinPlacements:Se.builtinPlacements,defaultActiveFirst:Se.store.getState().defaultActiveFirst[Pe(Se.eventKey)],multiple:Se.multiple,prefixCls:Se.rootPrefixCls,id:V.internalMenuId,manualRef:V.saveMenuInstance,itemIcon:Se.itemIcon,expandIcon:Se.expandIcon,direction:Se.direction}},V.getMotion=function(ge,Se){var Me=Object(h.a)(V),qe=Me.haveRendered,Ze=V.props,ut=Ze.motion,Pt=Ze.rootPrefixCls,Ht=Object(j.a)(Object(j.a)({},ut),{},{leavedClassName:"".concat(Pt,"-hidden"),removeOnLeave:!1,motionAppear:qe||!Se||ge!=="inline"});return Ht};var q=oe.store,X=oe.eventKey,se=q.getState(),ce=se.defaultActiveFirst;V.isRootMenu=!1;var _e=!1;return ce&&(_e=ce[X]),un(q,X,_e),V.state={mode:oe.mode,isOpen:oe.isOpen},V}return Object(g.a)(ve,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var V=this,q=this.props,X=q.mode,se=q.parentMenu,ce=q.manualRef,_e=q.isOpen,ge=function(){V.setState({mode:X,isOpen:_e})},Se=_e!==this.state.isOpen,Me=X!==this.state.mode;if((Me||Se)&&(at.a.cancel(this.updateStateRaf),Me?this.updateStateRaf=Object(at.a)(ge):ge()),ce&&ce(this),X!=="horizontal"||!(se==null?void 0:se.isRootMenu)||!_e)return;this.minWidthTimeout=setTimeout(function(){return V.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var V=this.props,q=V.onDestroy,X=V.eventKey;q&&q(X),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),at.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(V,q){var X=this.getBaseProps();return C.createElement(Si,Object(p.a)({},X,{id:this.internalMenuId,className:V,style:q}),this.props.children)}},{key:"renderChildren",value:function(){var V=this,q=this.getBaseProps(),X=q.mode,se=q.visible,ce=q.forceSubMenuRender,_e=q.direction,ge=this.getMotion(X,se);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||se||ce,!this.haveOpened)return C.createElement("div",null);var Se=H()("".concat(q.prefixCls,"-sub"),Object(ae.a)({},"".concat(q.prefixCls,"-rtl"),_e==="rtl"));return this.isInlineMode()?C.createElement(G,Object(p.a)({visible:q.visible,forceRender:ce},ge),function(Me){var qe=Me.className,Ze=Me.style,ut=H()(Se,qe);return V.renderPopupMenu(ut,Ze)}):this.renderPopupMenu(Se)}},{key:"render",value:function(){var V,q,X,se=Object(j.a)({},this.props),ce=this.getVisible(),_e=this.getPrefixCls(),ge=this.isInlineMode(),Se=this.getMode(),Me=H()(_e,"".concat(_e,"-").concat(Se),(V={},Object(ae.a)(V,se.className,!!se.className),Object(ae.a)(V,this.getOpenClassName(),ce),Object(ae.a)(V,this.getActiveClassName(),se.active||ce&&!ge),Object(ae.a)(V,this.getDisabledClassName(),se.disabled),Object(ae.a)(V,this.getSelectedClassName(),this.isChildrenSelected()),V));this.internalMenuId||(se.eventKey?this.internalMenuId="".concat(se.eventKey,"$Menu"):(nn+=1,this.internalMenuId="$__$".concat(nn,"$Menu")));var qe={},Ze={},ut={};se.disabled||(qe={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Ze={onClick:this.onTitleClick},ut={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Pt={},Ht=se.direction,kt=Ht==="rtl";ge&&(kt?Pt.paddingRight=se.inlineIndent*se.level:Pt.paddingLeft=se.inlineIndent*se.level);var Gt={};this.getVisible()&&(Gt={"aria-owns":this.internalMenuId});var Wt=null;Se!=="horizontal"&&(Wt=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Wt=C.createElement(this.props.expandIcon,Object(j.a)({},this.props))));var jt=C.createElement("div",Object(p.a)({ref:this.saveSubMenuTitle,style:Pt,className:"".concat(_e,"-title"),role:"button"},ut,Ze,{"aria-expanded":ce},Gt,{"aria-haspopup":"true",title:typeof se.title=="string"?se.title:void 0}),se.title,Wt||C.createElement("i",{className:"".concat(_e,"-arrow")})),Ft=this.renderChildren(),Zt=((q=se.parentMenu)===null||q===void 0?void 0:q.isRootMenu)?se.parentMenu.props.getPopupContainer:function(pn){return pn.parentNode},zt=Bt[Se],vn=se.popupOffset?{offset:se.popupOffset}:{},an=H()((X={},Object(ae.a)(X,se.popupClassName,se.popupClassName&&!ge),Object(ae.a)(X,"".concat(_e,"-rtl"),kt),X)),It=se.disabled,Ot=se.triggerSubMenuAction,Xt=se.subMenuOpenDelay,Jt=se.forceSubMenuRender,Tt=se.subMenuCloseDelay,qt=se.builtinPlacements;et.forEach(function(pn){return delete se[pn]}),delete se.onClick;var hn=kt?Object(j.a)(Object(j.a)({},Ri),qt):Object(j.a)(Object(j.a)({},ei),qt);delete se.direction;var $t=this.getBaseProps(),ln=ge?null:this.getMotion($t.mode,$t.visible);return C.createElement("li",Object(p.a)({},se,qe,{className:Me,role:"menuitem"}),C.createElement(ui,{prefixCls:_e,popupClassName:H()("".concat(_e,"-popup"),an),getPopupContainer:Zt,builtinPlacements:hn,popupPlacement:zt,popupVisible:ge?!1:ce,popupAlign:vn,popup:ge?null:Ft,action:It||ge?[]:[Ot],mouseEnterDelay:Xt,mouseLeaveDelay:Tt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Jt,popupMotion:ln},jt),ge?Ft:null)}}]),ve}(C.Component);Vt.defaultProps={onMouseEnter:Qe,onMouseLeave:Qe,onTitleMouseEnter:Qe,onTitleMouseLeave:Qe,onTitleClick:Qe,manualRef:Qe,mode:"vertical",title:""};var yn=Object(l.b)(function($,de){var ve=$.openKeys,oe=$.activeKey,V=$.selectedKeys,q=de.eventKey,X=de.subMenuKey;return{isOpen:ve.indexOf(q)>-1,active:oe[X]===q,selectedKeys:V}})(Vt);yn.isSubMenu=!0;var tn=yn,vi="menuitem-overflowed",_n=.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 V=oe.props.prefixCls,q=oe.childRef.current;return q?[].slice.call(q.children).filter(function(X){return X.className.split(" ").indexOf("".concat(V,"-overflowed-submenu"))<0}):[]},oe.getOverflowedSubMenuItem=function(V,q,X){var se=oe.props,ce=se.overflowedIndicator,_e=se.level,ge=se.mode,Se=se.prefixCls,Me=se.theme;if(_e!==1||ge!=="horizontal")return null;var qe=oe.props.children[0],Ze=qe.props,ut=Ze.children,Pt=Ze.title,Ht=Ze.style,kt=Object(I.a)(Ze,["children","title","style"]),Gt=Object(j.a)({},Ht),Wt="".concat(V,"-overflowed-indicator"),jt="".concat(V,"-overflowed-indicator");q.length===0&&X!==!0?Gt=Object(j.a)(Object(j.a)({},Gt),{},{display:"none"}):X&&(Gt=Object(j.a)(Object(j.a)({},Gt),{},{visibility:"hidden",position:"absolute"}),Wt="".concat(Wt,"-placeholder"),jt="".concat(jt,"-placeholder"));var Ft=Me?"".concat(Se,"-").concat(Me):"",Zt={};return et.forEach(function(zt){kt[zt]!==void 0&&(Zt[zt]=kt[zt])}),C.createElement(tn,Object(p.a)({title:ce,className:"".concat(Se,"-overflowed-submenu"),popupClassName:Ft},Zt,{key:Wt,eventKey:jt,disabled:!1,style:Gt}),q)},oe.setChildrenWidthAndResize=function(){if(oe.props.mode!=="horizontal")return;var V=oe.childRef.current;if(!V)return;var q=V.children;if(!q||q.length===0)return;var X=V.children[q.length-1];ze(X,"display","inline-block");var se=oe.getMenuItemNodes(),ce=se.filter(function(_e){return _e.className.split(" ").indexOf(vi)>=0});ce.forEach(function(_e){ze(_e,"display","inline-block")}),oe.menuItemSizes=se.map(function(_e){return Ye(_e,!0)}),ce.forEach(function(_e){ze(_e,"display","none")}),oe.overflowedIndicatorWidth=Ye(V.children[V.children.length-1],!0),oe.originalTotalWidth=oe.menuItemSizes.reduce(function(_e,ge){return _e+ge},0),oe.handleResize(),ze(X,"display","none")},oe.handleResize=function(){if(oe.props.mode!=="horizontal")return;var V=oe.childRef.current;if(!V)return;var q=Ye(V);oe.overflowedItems=[];var X=0,se;oe.originalTotalWidth>q+_n&&(se=-1,oe.menuItemSizes.forEach(function(ce){X+=ce,X+oe.overflowedIndicatorWidth<=q&&(se+=1)})),oe.setState({lastVisibleIndex:se})},oe}return Object(g.a)(ve,[{key:"componentDidMount",value:function(){var V=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var q=this.childRef.current;if(!q)return;this.resizeObserver=new ft.default(function(X){X.forEach(function(){var se=V.cancelFrameId;cancelAnimationFrame(se),V.cancelFrameId=requestAnimationFrame(V.setChildrenWidthAndResize)})}),[].slice.call(q.children).concat(q).forEach(function(X){V.resizeObserver.observe(X)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){V.resizeObserver.disconnect(),[].slice.call(q.children).concat(q).forEach(function(X){V.resizeObserver.observe(X)}),V.setChildrenWidthAndResize()}),this.mutationObserver.observe(q,{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(V){var q=this,X=this.state.lastVisibleIndex;return(V||[]).reduce(function(se,ce,_e){var ge=ce;if(q.props.mode==="horizontal"){var Se=q.getOverflowedSubMenuItem(ce.props.eventKey,[]);X!==void 0&&q.props.className.indexOf("".concat(q.props.prefixCls,"-root"))!==-1&&(_e>X&&(ge=C.cloneElement(ce,{style:{display:"none"},eventKey:"".concat(ce.props.eventKey,"-hidden"),className:"".concat(vi)})),_e===X+1&&(q.overflowedItems=V.slice(X+1).map(function(qe){return C.cloneElement(qe,{key:qe.props.eventKey,mode:"vertical-left"})}),Se=q.getOverflowedSubMenuItem(ce.props.eventKey,q.overflowedItems)));var Me=[].concat(Object(A.a)(se),[Se,ge]);return _e===V.length-1&&Me.push(q.getOverflowedSubMenuItem(ce.props.eventKey,[],!0)),Me}return[].concat(Object(A.a)(se),[ge])},[])}},{key:"render",value:function(){var V=this.props,q=V.visible,X=V.prefixCls,se=V.overflowedIndicator,ce=V.mode,_e=V.level,ge=V.tag,Se=V.children,Me=V.theme,qe=Object(I.a)(V,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Ze=ge;return C.createElement(Ze,Object(p.a)({ref:this.childRef},qe),this.renderChildren(Se))}}]),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(ae.a)({},de,ve))})}function ci($){return $.eventKey||"0-menu-"}function Ci($,de){var ve=de,oe=$.children,V=$.eventKey;if(ve){var q;if(We(oe,function(X,se){X&&X.props&&!X.props.disabled&&ve===it(X,V,se)&&(q=!0)}),q)return ve}return ve=null,$.defaultActiveFirst&&We(oe,function(X,se){!ve&&X&&!X.props.disabled&&(ve=it(X,V,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 V;return Object(E.a)(this,ve),V=de.call(this,oe),V.onKeyDown=function(q,X){var se=q.keyCode,ce;if(V.getFlatInstanceArray().forEach(function(ge){ge&&ge.props.active&&ge.onKeyDown&&(ce=ge.onKeyDown(q))}),ce)return 1;var _e=null;return(se===a.a.UP||se===a.a.DOWN)&&(_e=V.step(se===a.a.UP?-1:1)),_e?(q.preventDefault(),ti(V.props.store,ci(V.props),_e.props.eventKey),typeof X=="function"&&X(_e),1):void 0},V.onItemHover=function(q){var X=q.key,se=q.hover;ti(V.props.store,ci(V.props),se?X:null)},V.onDeselect=function(q){V.props.onDeselect(q)},V.onSelect=function(q){V.props.onSelect(q)},V.onClick=function(q){V.props.onClick(q)},V.onOpenChange=function(q){V.props.onOpenChange(q)},V.onDestroy=function(q){V.props.onDestroy(q)},V.getFlatInstanceArray=function(){return V.instanceArray},V.step=function(q){var X=V.getFlatInstanceArray(),se=V.props.store.getState().activeKey[ci(V.props)],ce=X.length;if(!ce)return null;q<0&&(X=X.concat().reverse());var _e=-1;if(X.every(function(qe,Ze){return qe&&qe.props.eventKey===se?(_e=Ze,!1):!0}),!V.props.defaultActiveFirst&&_e!==-1&&_i(X.slice(_e,ce-1)))return;var ge=(_e+1)%ce,Se=ge;do{var Me=X[Se];if(!Me||Me.props.disabled)Se=(Se+1)%ce;else return Me}while(Se!==ge);return null},V.renderCommonMenuItem=function(q,X,se){var ce=V.props.store.getState(),_e=Object(h.a)(V),ge=_e.props,Se=it(q,ge.eventKey,X),Me=q.props;if(!Me||typeof q.type=="string")return q;var qe=Se===ce.activeKey,Ze=Object(j.a)(Object(j.a)({mode:Me.mode||ge.mode,level:ge.level,inlineIndent:ge.inlineIndent,renderMenuItem:V.renderMenuItem,rootPrefixCls:ge.prefixCls,index:X,parentMenu:ge.parentMenu,manualRef:Me.disabled?void 0:Object(c.a)(q.ref,di.bind(Object(h.a)(V))),eventKey:Se,active:!Me.disabled&&qe,multiple:ge.multiple,onClick:function(Pt){(Me.onClick||Qe)(Pt),V.onClick(Pt)},onItemHover:V.onItemHover,motion:ge.motion,subMenuOpenDelay:ge.subMenuOpenDelay,subMenuCloseDelay:ge.subMenuCloseDelay,forceSubMenuRender:ge.forceSubMenuRender,onOpenChange:V.onOpenChange,onDeselect:V.onDeselect,onSelect:V.onSelect,builtinPlacements:ge.builtinPlacements,itemIcon:Me.itemIcon||V.props.itemIcon,expandIcon:Me.expandIcon||V.props.expandIcon},se),{},{direction:ge.direction});return(ge.mode==="inline"||He())&&(Ze.triggerSubMenuAction="click"),C.cloneElement(q,Object(j.a)(Object(j.a)({},Ze),{},{key:Se||X}))},V.renderMenuItem=function(q,X,se){if(!q)return null;var ce=V.props.store.getState(),_e={openKeys:ce.openKeys,selectedKeys:ce.selectedKeys,triggerSubMenuAction:V.props.triggerSubMenuAction,subMenuKey:se};return V.renderCommonMenuItem(q,X,_e)},oe.store.setState({activeKey:Object(j.a)(Object(j.a)({},oe.store.getState().activeKey),{},Object(ae.a)({},oe.eventKey,Ci(oe,oe.activeKey)))}),V.instanceArray=[],V}return Object(g.a)(ve,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(V){return this.props.visible||V.visible||this.props.className!==V.className||!D()(this.props.style,V.style)}},{key:"componentDidUpdate",value:function(V){var q=this.props,X="activeKey"in q?q.activeKey:q.store.getState().activeKey[ci(q)],se=Ci(q,X);if(se!==X)ti(q.store,ci(q),se);else if("activeKey"in V){var ce=Ci(V,V.activeKey);se!==ce&&ti(q.store,ci(q),se)}}},{key:"render",value:function(){var V=this,q=Object(p.a)({},this.props);this.instanceArray=[];var X=H()(q.prefixCls,q.className,"".concat(q.prefixCls,"-").concat(q.mode)),se={className:X,role:q.role||"menu"};q.id&&(se.id=q.id),q.focusable&&(se.tabIndex=0,se.onKeyDown=this.onKeyDown);var ce=q.prefixCls,_e=q.eventKey,ge=q.visible,Se=q.level,Me=q.mode,qe=q.overflowedIndicator,Ze=q.theme;return et.forEach(function(ut){return delete q[ut]}),delete q.onClick,C.createElement(yi,Object(p.a)({},q,{prefixCls:ce,mode:Me,tag:"ul",level:Se,theme:Ze,visible:ge,overflowedIndicator:qe},se),Object(U.a)(q.children).map(function(ut,Pt){return V.renderMenuItem(ut,Pt,_e||"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,V=$.motion,q=$.defaultMotions,X=q===void 0?{}:q,se=$.openAnimation,ce=$.openTransitionName,_e=de.switchingModeFromInline;if(V)return V;if(Object(O.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(ce)return{motionName:ce};var ge=X[ve];return ge||(_e?null:X.other)}var zi=function($){Object(u.a)(ve,$);var de=Object(r.a)(ve);function ve(oe){var V;Object(E.a)(this,ve),V=de.call(this,oe),V.onSelect=function(se){var ce=Object(h.a)(V),_e=ce.props;if(_e.selectable){var ge=V.store.getState(),Se=ge.selectedKeys,Me=se.key;_e.multiple?Se=Se.concat([Me]):Se=[Me],"selectedKeys"in _e||V.store.setState({selectedKeys:Se}),_e.onSelect(Object(j.a)(Object(j.a)({},se),{},{selectedKeys:Se}))}},V.onClick=function(se){var ce=V.getRealMenuMode(),_e=Object(h.a)(V),ge=_e.store,Se=_e.props.onOpenChange;ce!=="inline"&&!("openKeys"in V.props)&&(ge.setState({openKeys:[]}),Se([])),V.props.onClick(se)},V.onKeyDown=function(se,ce){V.innerMenu.getWrappedInstance().onKeyDown(se,ce)},V.onOpenChange=function(se){var ce=Object(h.a)(V),_e=ce.props,ge=V.store.getState().openKeys.concat(),Se=!1,Me=function(Ze){var ut=!1;if(Ze.open)ut=ge.indexOf(Ze.key)===-1,ut&&ge.push(Ze.key);else{var Pt=ge.indexOf(Ze.key);ut=Pt!==-1,ut&&ge.splice(Pt,1)}Se=Se||ut};Array.isArray(se)?se.forEach(Me):Me(se),Se&&("openKeys"in V.props||V.store.setState({openKeys:ge}),_e.onOpenChange(ge))},V.onDeselect=function(se){var ce=Object(h.a)(V),_e=ce.props;if(_e.selectable){var ge=V.store.getState().selectedKeys.concat(),Se=se.key,Me=ge.indexOf(Se);Me!==-1&&ge.splice(Me,1),"selectedKeys"in _e||V.store.setState({selectedKeys:ge}),_e.onDeselect(Object(j.a)(Object(j.a)({},se),{},{selectedKeys:ge}))}},V.onMouseEnter=function(se){V.restoreModeVerticalFromInline();var ce=V.props.onMouseEnter;ce&&ce(se)},V.onTransitionEnd=function(se){var ce=se.propertyName==="width"&&se.target===se.currentTarget,_e=se.target.className,ge=Object.prototype.toString.call(_e)==="[object SVGAnimatedString]"?_e.animVal:_e,Se=se.propertyName==="font-size"&&ge.indexOf("anticon")>=0;(ce||Se)&&V.restoreModeVerticalFromInline()},V.setInnerMenu=function(se){V.innerMenu=se},V.isRootMenu=!0;var q=oe.defaultSelectedKeys,X=oe.defaultOpenKeys;return"selectedKeys"in oe&&(q=oe.selectedKeys||[]),"openKeys"in oe&&(X=oe.openKeys||[]),V.store=Object(l.c)({selectedKeys:q,openKeys:X,activeKey:{"0-menu-":Ci(oe,oe.activeKey)}}),V.state={switchingModeFromInline:!1,prevProps:oe,inlineOpenKeys:[],store:V.store},V}return Object(g.a)(ve,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(V){var q=this.props,X=q.siderCollapsed,se=q.inlineCollapsed,ce=q.onOpenChange;(!V.inlineCollapsed&&se||!V.siderCollapsed&&X)&&ce([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var V=this.props.collapsedWidth,q=this.store,X=this.prevOpenKeys,se=this.getInlineCollapsed()&&(V===0||V==="0"||V==="0px");se?(this.prevOpenKeys=q.getState().openKeys.concat(),this.store.setState({openKeys:[]})):X&&(this.store.setState({openKeys:X}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var V=this.props.mode,q=this.state.switchingModeFromInline,X=this.getInlineCollapsed();return q&&X?"inline":X?"vertical":V}},{key:"getInlineCollapsed",value:function(){var V=this.props,q=V.inlineCollapsed,X=V.siderCollapsed;return X!==void 0?X:q}},{key:"restoreModeVerticalFromInline",value:function(){var V=this.state.switchingModeFromInline;V&&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 V=Object(j.a)({},Object(f.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),q=this.getRealMenuMode();return V.className+=" ".concat(V.prefixCls,"-root"),V.direction==="rtl"&&(V.className+=" ".concat(V.prefixCls,"-rtl")),V=Object(j.a)(Object(j.a)({},V),{},{mode:q,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,q)}),delete V.openAnimation,delete V.openTransitionName,C.createElement(l.a,{store:this.store},C.createElement(Si,Object(p.a)({},V,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(V,q){var X=q.prevProps,se=q.store,ce=se.getState(),_e={},ge={prevProps:V};return X.mode==="inline"&&V.mode!=="inline"&&(ge.switchingModeFromInline=!0),"openKeys"in V?_e.openKeys=V.openKeys||[]:((V.inlineCollapsed&&!X.inlineCollapsed||V.siderCollapsed&&!X.siderCollapsed)&&(ge.switchingModeFromInline=!0,ge.inlineOpenKeys=ce.openKeys,_e.openKeys=[]),(!V.inlineCollapsed&&X.inlineCollapsed||!V.siderCollapsed&&X.siderCollapsed)&&(_e.openKeys=q.inlineOpenKeys,ge.inlineOpenKeys=[])),Object.keys(_e).length&&se.setState(_e),ge}}]),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(V){var q=V.keyCode;return q===a.a.ENTER?(oe.onClick(V),!0):void 0},oe.onMouseLeave=function(V){var q=oe.props,X=q.eventKey,se=q.onItemHover,ce=q.onMouseLeave;se({key:X,hover:!1}),ce({key:X,domEvent:V})},oe.onMouseEnter=function(V){var q=oe.props,X=q.eventKey,se=q.onItemHover,ce=q.onMouseEnter;se({key:X,hover:!0}),ce({key:X,domEvent:V})},oe.onClick=function(V){var q=oe.props,X=q.eventKey,se=q.multiple,ce=q.onClick,_e=q.onSelect,ge=q.onDeselect,Se=q.isSelected,Me={key:X,keyPath:[X],item:Object(h.a)(oe),domEvent:V};ce(Me),se?Se?ge(Me):_e(Me):Se||_e(Me)},oe.saveNode=function(V){oe.node=V},oe}return Object(g.a)(ve,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var V=this.props;V.onDestroy&&V.onDestroy(V.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 V,q=Object(j.a)({},this.props),X=H()(this.getPrefixCls(),q.className,(V={},Object(ae.a)(V,this.getActiveClassName(),!q.disabled&&q.active),Object(ae.a)(V,this.getSelectedClassName(),q.isSelected),Object(ae.a)(V,this.getDisabledClassName(),q.disabled),V)),se=Object(j.a)(Object(j.a)({},q.attribute),{},{title:typeof q.title=="string"?q.title:void 0,className:X,role:q.role||"menuitem","aria-disabled":q.disabled});q.role==="option"?se=Object(j.a)(Object(j.a)({},se),{},{role:"option","aria-selected":q.isSelected}):(q.role===null||q.role==="none")&&(se.role="none");var ce={onClick:q.disabled?null:this.onClick,onMouseLeave:q.disabled?null:this.onMouseLeave,onMouseEnter:q.disabled?null:this.onMouseEnter},_e=Object(j.a)({},q.style);q.mode==="inline"&&(q.direction==="rtl"?_e.paddingRight=q.inlineIndent*q.level:_e.paddingLeft=q.inlineIndent*q.level),et.forEach(function(Se){return delete q[Se]}),delete q.direction;var ge=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(ge=C.createElement(this.props.itemIcon,this.props)),C.createElement("li",Object(p.a)({},Object(f.a)(q,["onClick","onMouseEnter","onMouseLeave","onSelect"]),se,ce,{style:_e,ref:this.saveNode}),q.children,ge)}}]),ve}(C.Component);bi.isMenuItem=!0,bi.defaultProps={onSelect:Qe,onMouseEnter:Qe,onMouseLeave:Qe,manualRef:Qe};var Ai=Object(l.b)(function($,de){var ve=$.activeKey,oe=$.selectedKeys,V=de.eventKey,q=de.subMenuKey;return{active:ve[q]===V,isSelected:Array.isArray(oe)?oe.indexOf(V)!==-1:oe===V}})(bi),Ui=Ai,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(V){var q=oe.props,X=q.renderMenuItem,se=q.index;return X(V,se,oe.props.subMenuKey)},oe}return Object(g.a)(ve,[{key:"render",value:function(){var V=Object(p.a)({},this.props),q=V.className,X=q===void 0?"":q,se=V.rootPrefixCls,ce="".concat(se,"-item-group-title"),_e="".concat(se,"-item-group-list"),ge=V.title,Se=V.children;return et.forEach(function(Me){return delete V[Me]}),delete V.direction,C.createElement("li",Object(p.a)({},V,{onClick:function(qe){return qe.stopPropagation()},className:"".concat(X," ").concat(se,"-item-group")}),C.createElement("div",{className:ce,title:typeof ge=="string"?ge:void 0},ge),C.createElement("ul",{className:_e},C.Children.map(Se,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,V=de.style;return C.createElement("li",{className:"".concat(ve," ").concat(oe,"-item-divider"),style:V})};Bi.defaultProps={disabled:!0,className:"",style:{}};var er=Bi,Vi=ki,ji=F("eDIo");function Hn($,de){var ve=$.prefixCls,oe=$.editable,V=$.locale,q=$.style;return!oe||oe.showAdd===!1?null:C.createElement("button",{ref:de,type:"button",className:"".concat(ve,"-nav-add"),style:q,"aria-label":(V==null?void 0:V.addAriaLabel)||"Add tab",onClick:function(se){oe.onEdit("add",{event:se})}},oe.addIcon||"+")}var Oi=C.forwardRef(Hn);function Yi($,de){var ve=$.prefixCls,oe=$.id,V=$.tabs,q=$.locale,X=$.mobile,se=$.moreIcon,ce=se===void 0?"More":se,_e=$.moreTransitionName,ge=$.style,Se=$.className,Me=$.editable,qe=$.tabBarGutter,Ze=$.rtl,ut=$.onTabClick,Pt=Object(C.useState)(!1),Ht=Object(L.a)(Pt,2),kt=Ht[0],Gt=Ht[1],Wt=Object(C.useState)(null),jt=Object(L.a)(Wt,2),Ft=jt[0],Zt=jt[1],zt="".concat(oe,"-more-popup"),vn="".concat(ve,"-dropdown"),an=Ft!==null?"".concat(zt,"-").concat(Ft):null,It=q==null?void 0:q.dropdownAriaLabel,Ot=C.createElement(Vi,{onClick:function(ln){var pn=ln.key,kn=ln.domEvent;ut(pn,kn),Gt(!1)},id:zt,tabIndex:-1,role:"listbox","aria-activedescendant":an,selectedKeys:[Ft],"aria-label":It!==void 0?It:"expanded dropdown"},V.map(function($t){return C.createElement(Ui,{key:$t.key,id:"".concat(zt,"-").concat($t.key),role:"option","aria-controls":oe&&"".concat(oe,"-panel-").concat($t.key),disabled:$t.disabled},$t.tab)}));function Xt($t){for(var ln=V.filter(function(Qn){return!Qn.disabled}),pn=ln.findIndex(function(Qn){return Qn.key===Ft})||0,kn=ln.length,Xn=0;Xn<kn;Xn+=1){pn=(pn+$t+kn)%kn;var bn=ln[pn];if(!bn.disabled){Zt(bn.key);return}}}function Jt($t){var ln=$t.which;if(!kt){[a.a.DOWN,a.a.SPACE,a.a.ENTER].includes(ln)&&(Gt(!0),$t.preventDefault());return}switch(ln){case a.a.UP:Xt(-1),$t.preventDefault();break;case a.a.DOWN:Xt(1),$t.preventDefault();break;case a.a.ESC:Gt(!1);break;case a.a.SPACE:case a.a.ENTER:Ft!==null&&ut(Ft,$t);break}}Object(C.useEffect)(function(){var $t=document.getElementById(an);$t&&$t.scrollIntoView&&$t.scrollIntoView(!1)},[Ft]),Object(C.useEffect)(function(){kt||Zt(null)},[kt]);var Tt=Object(ae.a)({},Ze?"marginLeft":"marginRight",qe);V.length||(Tt.visibility="hidden",Tt.order=1);var qt=H()(Object(ae.a)({},"".concat(vn,"-rtl"),Ze)),hn=X?null:C.createElement(ji.a,{prefixCls:vn,overlay:Ot,trigger:["hover"],visible:kt,transitionName:_e,onVisibleChange:Gt,overlayClassName:qt,mouseEnterDelay:.1,mouseLeaveDelay:.1},C.createElement("button",{type:"button",className:"".concat(ve,"-nav-more"),style:Tt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":zt,id:"".concat(oe,"-more"),"aria-expanded":kt,onKeyDown:Jt},ce));return C.createElement("div",{className:H()("".concat(ve,"-nav-operations"),Se),style:ge,ref:de},hn,C.createElement(Oi,{prefixCls:ve,locale:q,editable:Me}))}var tr=C.forwardRef(Yi),Di=Object(C.createContext)(null),Kt=.1,Yt=.01,dn=20,Sn=Math.pow(.995,dn);function Nn(){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),V=oe[0],q=oe[1],X=Object(C.useState)(0),se=Object(L.a)(X,2),ce=se[0],_e=se[1],ge=Object(C.useState)(0),Se=Object(L.a)(ge,2),Me=Se[0],qe=Se[1],Ze=Object(C.useState)(),ut=Object(L.a)(Ze,2),Pt=ut[0],Ht=ut[1],kt=Object(C.useRef)();function Gt(It){var Ot=It.touches[0],Xt=Ot.screenX,Jt=Ot.screenY;q({x:Xt,y:Jt}),window.clearInterval(kt.current)}function Wt(It){if(!V)return;It.preventDefault();var Ot=It.touches[0],Xt=Ot.screenX,Jt=Ot.screenY;q({x:Xt,y:Jt});var Tt=Xt-V.x,qt=Jt-V.y;de(Tt,qt);var hn=Date.now();_e(hn),qe(hn-ce),Ht({x:Tt,y:qt})}function jt(){if(!V)return;if(q(null),Ht(null),Pt){var It=Pt.x/Me,Ot=Pt.y/Me,Xt=Math.abs(It),Jt=Math.abs(Ot);if(Math.max(Xt,Jt)<Kt)return;var Tt=It,qt=Ot;kt.current=window.setInterval(function(){if(Math.abs(Tt)<Yt&&Math.abs(qt)<Yt){window.clearInterval(kt.current);return}Tt*=Sn,qt*=Sn,de(Tt*dn,qt*dn)},dn)}}var Ft=Object(C.useRef)(0),Zt=Object(C.useRef)(!1),zt=Object(C.useRef)();function vn(It){var Ot=It.deltaX,Xt=It.deltaY,Jt=0,Tt=Math.abs(Ot),qt=Math.abs(Xt);Tt===qt?Jt=zt.current==="x"?Ot:Xt:Tt>qt?(Jt=Ot,zt.current="x"):(Jt=Xt,zt.current="y");var hn=Date.now();hn-Ft.current>100&&(Zt.current=!1),(de(-Jt,-Jt)||Zt.current)&&(It.preventDefault(),Zt.current=!0),Ft.current=hn}var an=Object(C.useRef)(null);an.current={onTouchStart:Gt,onTouchMove:Wt,onTouchEnd:jt,onWheel:vn},C.useEffect(function(){function It(Tt){an.current.onTouchStart(Tt)}function Ot(Tt){an.current.onTouchMove(Tt)}function Xt(Tt){an.current.onTouchEnd(Tt)}function Jt(Tt){an.current.onWheel(Tt)}return document.addEventListener("touchmove",Ot,{passive:!1}),document.addEventListener("touchend",Xt,{passive:!1}),$.current.addEventListener("touchstart",It,{passive:!1}),$.current.addEventListener("wheel",Jt),function(){document.removeEventListener("touchmove",Ot),document.removeEventListener("touchend",Xt)}},[])}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({}),V=Object(L.a)(oe,2),q=V[1];function X(se){var ce=typeof se=="function"?se(ve.current):se;ce!==ve.current&&de(ce,ve.current),ve.current=ce,q({})}return[ve.current,X]}var Ji=function(de){var ve=de.position,oe=de.prefixCls,V=de.extra;if(!V)return null;var q,X=V;return ve==="right"&&(q=X.right||!X.left&&X||null),ve==="left"&&(q=X.left||null),q?C.createElement("div",{className:"".concat(oe,"-extra-content")},q):null};function nr($,de){var ve,oe=C.useContext(Di),V=oe.prefixCls,q=oe.tabs,X=$.className,se=$.style,ce=$.id,_e=$.animated,ge=$.activeKey,Se=$.rtl,Me=$.extra,qe=$.editable,Ze=$.locale,ut=$.tabPosition,Pt=$.tabBarGutter,Ht=$.children,kt=$.onTabClick,Gt=$.onTabScroll,Wt=Object(C.useRef)(),jt=Object(C.useRef)(),Ft=Object(C.useRef)(),Zt=Object(C.useRef)(),zt=Fi(),vn=Object(L.a)(zt,2),an=vn[0],It=vn[1],Ot=ut==="top"||ut==="bottom",Xt=Qi(0,function(on,Qt){Ot&&Gt&&Gt({direction:on>Qt?"left":"right"})}),Jt=Object(L.a)(Xt,2),Tt=Jt[0],qt=Jt[1],hn=Qi(0,function(on,Qt){!Ot&&Gt&&Gt({direction:on>Qt?"top":"bottom"})}),$t=Object(L.a)(hn,2),ln=$t[0],pn=$t[1],kn=Object(C.useState)(0),Xn=Object(L.a)(kn,2),bn=Xn[0],Qn=Xn[1],Ei=Object(C.useState)(0),ii=Object(L.a)(Ei,2),ri=ii[0],xn=ii[1],Wn=Object(C.useState)(0),Un=Object(L.a)(Wn,2),Dn=Un[0],Li=Un[1],Pi=Object(C.useState)(0),Hi=Object(L.a)(Pi,2),cn=Hi[0],wi=Hi[1],Wi=Object(C.useState)(null),fn=Object(L.a)(Wi,2),rn=fn[0],Bn=fn[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(q,ta,bn),Ar="".concat(V,"-nav-operations-hidden"),ir=0,rr=0;Ot?Se?(ir=0,rr=Math.max(0,bn-rn)):(ir=Math.min(0,rn-bn),rr=0):(ir=Math.min(0,Zi-ri),rr=0);function fr(on){return on<ir?[ir,!1]:on>rr?[rr,!1]:[on,!0]}var Or=Object(C.useRef)(),ia=Object(C.useState)(),wr=Object(L.a)(ia,2),pr=wr[0],Rr=wr[1];function mr(){Rr(Date.now())}function gr(){window.clearTimeout(Or.current)}Xi(Wt,function(on,Qt){var Ln=!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 Ln=Er,br})}if(Ot){if(rn>=bn)return Ln;ai(qt,on)}else{if(Zi>=ri)return Ln;ai(pn,Qt)}return gr(),mr(),Ln}),Object(C.useEffect)(function(){return gr(),pr&&(Or.current=window.setTimeout(function(){Rr(0)},100)),gr},[pr]);function Ir(){var on=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ge,Qt=hr.get(on);if(!Qt)return;if(Ot){var Ln=Tt;Se?Qt.right<Tt?Ln=Qt.right:Qt.right+Qt.width>Tt+rn&&(Ln=Qt.right+Qt.width-rn):Qt.left<-Tt?Ln=-Qt.left:Qt.left+Qt.width>-Tt+rn&&(Ln=-(Qt.left+Qt.width-rn)),pn(0),qt(fr(Ln)[0])}else{var ai=ln;Qt.top<-ln?ai=-Qt.top:Qt.top+Qt.height>-ln+Zi&&(ai=-(Qt.top+Qt.height-Zi)),qt(0),pn(fr(ai)[0])}}var ra=_(hr,{width:rn,height:Zi,left:Tt,top:ln},{width:Dn,height:cn},{width:Qr,height:qr},Object(j.a)(Object(j.a)({},$),{},{tabs:q})),Dr=Object(L.a)(ra,2),aa=Dr[0],oa=Dr[1],sa=q.map(function(on){var Qt=on.key;return C.createElement(e,{id:ce,prefixCls:V,key:Qt,rtl:Se,tab:on,closable:on.closable,editable:qe,active:Qt===ge,tabPosition:ut,tabBarGutter:Pt,renderWrapper:Ht,removeAriaLabel:Ze==null?void 0:Ze.removeAriaLabel,ref:an(Qt),onClick:function(ai){kt(Qt,ai)},onRemove:function(){It(Qt)},onFocus:function(){Ir(Qt),mr(),Se||(Wt.current.scrollLeft=0),Wt.current.scrollTop=0}})}),vr=o(function(){var on,Qt,Ln,ai,or,sr,lr,ur,qi,br=((on=Wt.current)===null||on===void 0?void 0:on.offsetWidth)||0,Er=((Qt=Wt.current)===null||Qt===void 0?void 0:Qt.offsetHeight)||0,jr=((Ln=Zt.current)===null||Ln===void 0?void 0:Ln.offsetWidth)||0,Fr=((ai=Zt.current)===null||ai===void 0?void 0:ai.offsetHeight)||0,fa=((or=Ft.current)===null||or===void 0?void 0:or.offsetWidth)||0,pa=((sr=Ft.current)===null||sr===void 0?void 0:sr.offsetHeight)||0;Bn(br),Yr(Er),Jr(jr),$r(Fr);var Hr=(((lr=jt.current)===null||lr===void 0?void 0:lr.offsetWidth)||0)-jr,Wr=(((ur=jt.current)===null||ur===void 0?void 0:ur.offsetHeight)||0)-Fr;Qn(Hr),xn(Wr);var Kr=(qi=Ft.current)===null||qi===void 0?void 0:qi.className.includes(Ar);Li(Hr-(Kr?0:fa)),wi(Wr-(Kr?0:pa)),na(function(){var Gr=new Map;return q.forEach(function(ma){var zr=ma.key,cr=an(zr).current;cr&&Gr.set(zr,{width:cr.offsetWidth,height:cr.offsetHeight,left:cr.offsetLeft,top:cr.offsetTop})}),Gr})}),la=q.slice(0,aa),ua=q.slice(oa+1),Lr=[].concat(Object(A.a)(la),Object(A.a)(ua)),ca=Object(C.useState)(),Pr=Object(L.a)(ca,2),da=Pr[0],ha=Pr[1],Mi=hr.get(ge),Mr=Object(C.useRef)();function Nr(){v.a.cancel(Mr.current)}Object(C.useEffect)(function(){var on={};return Mi&&(Ot?(Se?on.right=Mi.right:on.left=Mi.left,on.width=Mi.width):(on.top=Mi.top,on.height=Mi.height)),Nr(),Mr.current=v()(function(){ha(on)}),Nr},[Mi,Ot,Se]),Object(C.useEffect)(function(){Ir()},[ge,Mi,hr,Ot]),Object(C.useEffect)(function(){vr()},[Se,Pt,ge,q.map(function(on){return on.key}).join("_")]);var kr=!!Lr.length,ar="".concat(V,"-nav-wrap"),yr,_r,Ur,Br;return Ot?Se?(_r=Tt>0,yr=Tt+rn<bn):(yr=Tt<0,_r=-Tt+rn<bn):(Ur=ln<0,Br=-ln+Zi<ri),C.createElement("div",{ref:de,role:"tablist",className:H()("".concat(V,"-nav"),X),style:se,onKeyDown:function(){mr()}},C.createElement(Ji,{position:"left",extra:Me,prefixCls:V}),C.createElement(d.a,{onResize:vr},C.createElement("div",{className:H()(ar,(ve={},Object(ae.a)(ve,"".concat(ar,"-ping-left"),yr),Object(ae.a)(ve,"".concat(ar,"-ping-right"),_r),Object(ae.a)(ve,"".concat(ar,"-ping-top"),Ur),Object(ae.a)(ve,"".concat(ar,"-ping-bottom"),Br),ve)),ref:Wt},C.createElement(d.a,{onResize:vr},C.createElement("div",{ref:jt,className:"".concat(V,"-nav-list"),style:{transform:"translate(".concat(Tt,"px, ").concat(ln,"px)"),transition:pr?"none":void 0}},sa,C.createElement(Oi,{ref:Zt,prefixCls:V,locale:Ze,editable:qe,style:{visibility:kr?"hidden":null}}),C.createElement("div",{className:H()("".concat(V,"-ink-bar"),Object(ae.a)({},"".concat(V,"-ink-bar-animated"),_e.inkBar)),style:da}))))),C.createElement(tr,Object.assign({},$,{ref:Ft,prefixCls:V,tabs:Lr,className:!kr&&Ar})),C.createElement(Ji,{position:"right",extra:Me,prefixCls:V}))}var dr=C.forwardRef(nr);function ke($){var de=$.id,ve=$.activeKey,oe=$.animated,V=$.tabPosition,q=$.rtl,X=$.destroyInactiveTabPane,se=C.useContext(Di),ce=se.prefixCls,_e=se.tabs,ge=oe.tabPane,Se=_e.findIndex(function(Me){return Me.key===ve});return C.createElement("div",{className:H()("".concat(ce,"-content-holder"))},C.createElement("div",{className:H()("".concat(ce,"-content"),"".concat(ce,"-content-").concat(V),Object(ae.a)({},"".concat(ce,"-content-animated"),ge)),style:Se&&ge?Object(ae.a)({},q?"marginRight":"marginLeft","-".concat(Se,"00%")):null},_e.map(function(Me){return C.cloneElement(Me.node,{key:Me.key,prefixCls:ce,tabKey:Me.key,id:de,animated:ge,active:Me.key===ve,destroyInactiveTabPane:X})})))}function Be($){var de=$.prefixCls,ve=$.forceRender,oe=$.className,V=$.style,q=$.id,X=$.active,se=$.animated,ce=$.destroyInactiveTabPane,_e=$.tabKey,ge=$.children,Se=C.useState(ve),Me=Object(L.a)(Se,2),qe=Me[0],Ze=Me[1];C.useEffect(function(){X?Ze(!0):ce&&Ze(!1)},[X,ce]);var ut={};return X||(se?(ut.visibility="hidden",ut.height=0,ut.overflowY="hidden"):ut.display="none"),C.createElement("div",{id:q&&"".concat(q,"-panel-").concat(_e),role:"tabpanel",tabIndex:X?0:-1,"aria-labelledby":q&&"".concat(q,"-tab-").concat(_e),"aria-hidden":!X,style:Object(j.a)(Object(j.a)({},ut),V),className:H()("".concat(de,"-tabpane"),X&&"".concat(de,"-tabpane-active"),oe)},(X||qe||ve)&&ge)}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 Rt($,de){var ve,oe=$.id,V=$.prefixCls,q=V===void 0?"rc-tabs":V,X=$.className,se=$.children,ce=$.direction,_e=$.activeKey,ge=$.defaultActiveKey,Se=$.editable,Me=$.animated,qe=$.tabPosition,Ze=qe===void 0?"top":qe,ut=$.tabBarGutter,Pt=$.tabBarStyle,Ht=$.tabBarExtraContent,kt=$.locale,Gt=$.moreIcon,Wt=$.moreTransitionName,jt=$.destroyInactiveTabPane,Ft=$.renderTabBar,Zt=$.onChange,zt=$.onTabClick,vn=$.onTabScroll,an=Object(I.a)($,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),It=dt(se),Ot=ce==="rtl",Xt;Me===!1?Xt={inkBar:!1,tabPane:!1}:Xt=Object(j.a)({inkBar:!0,tabPane:!1},Me!==!0?Me:null);var Jt=Object(C.useState)(!1),Tt=Object(L.a)(Jt,2),qt=Tt[0],hn=Tt[1];Object(C.useEffect)(function(){hn(Nn())},[]);var $t=Object(R.a)(function(){var cn;return(cn=It[0])===null||cn===void 0?void 0:cn.key},{value:_e,defaultValue:ge}),ln=Object(L.a)($t,2),pn=ln[0],kn=ln[1],Xn=Object(C.useState)(function(){return It.findIndex(function(cn){return cn.key===pn})}),bn=Object(L.a)(Xn,2),Qn=bn[0],Ei=bn[1];Object(C.useEffect)(function(){var cn=It.findIndex(function(Wi){return Wi.key===pn});if(cn===-1){var wi;cn=Math.max(0,Math.min(Qn,It.length-1)),kn((wi=It[cn])===null||wi===void 0?void 0:wi.key)}Ei(cn)},[It.map(function(cn){return cn.key}).join("_"),pn,Qn]);var ii=Object(R.a)(null,{value:oe}),ri=Object(L.a)(ii,2),xn=ri[0],Wn=ri[1],Un=Ze;qt&&!["left","right"].includes(Ze)&&(Un="top"),Object(C.useEffect)(function(){oe||(Wn("rc-tabs-".concat(Ve)),Ve+=1)},[]);function Dn(cn,wi){zt==null||zt(cn,wi),kn(cn),Zt==null||Zt(cn)}var Li={id:xn,activeKey:pn,animated:Xt,tabPosition:Un,rtl:Ot,mobile:qt},Pi,Hi=Object(j.a)(Object(j.a)({},Li),{},{editable:Se,locale:kt,moreIcon:Gt,moreTransitionName:Wt,tabBarGutter:ut,onTabClick:Dn,onTabScroll:vn,extra:Ht,style:Pt,panes:se});return Ft?Pi=Ft(Hi,dr):Pi=C.createElement(dr,Object.assign({},Hi)),C.createElement(Di.Provider,{value:{tabs:It,prefixCls:q}},C.createElement("div",Object.assign({ref:de,id:oe,className:H()(q,"".concat(q,"-").concat(Un),(ve={},Object(ae.a)(ve,"".concat(q,"-mobile"),qt),Object(ae.a)(ve,"".concat(q,"-editable"),Se),Object(ae.a)(ve,"".concat(q,"-rtl"),Ot),ve),X)},an),Pi,C.createElement(ke,Object.assign({destroyInactiveTabPane:jt},Li,{animated:Xt}))))}var Ct=C.forwardRef(Rt);Ct.TabPane=Be;var sn=Ct,gn=we.b=sn},n6Qo:function(Ke,we,F){"use strict";F.d(we,"a",function(){return U});var ae=F("q1tI"),L=F("biw7"),I=F("fyJ8");function j(R){var A=R.className,y=R.index,v=R.children,d=R.colSpan,o=R.rowSpan,n=ae.useContext(L.a),a=n.prefixCls,s=n.fixedInfoList,e=s[y];return ae.createElement(I.a,Object.assign({className:A,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 ae.createElement("tr",Object.assign({},R))}function S(R){var A=R.children,y=ae.useContext(L.a),v=y.prefixCls;return ae.createElement("tfoot",{className:"".concat(v,"-summary")},A)}var H=we.b=S,U={Cell:j,Row:C}},p5ED:function(Ke,we,F){"use strict";var ae=F("+L6B"),L=F("2/Rp"),I=F("5Dmo"),j=F("3S7+"),C=F("k1fw"),S=F("tJVT"),H=F("q1tI"),U=F.n(H),R=F("vHTk"),A=F.n(R),y=F("yEEn"),v=F("ZW9T"),d=F("1vsH");we.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,p=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(S.a)(h,2),r=u[0],l=u[1],f=Object(H.useState)(""),c=Object(S.a)(f,2),x=c[0],D=c[1],O,B=1024*1024,w=10*B,W=Object(H.useRef)();e==="office"&&(O=Object(d.T)(a).filesize,O>w&&(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(be){var ye=be.split("=");ye[0]==="_educoder_session"&&D(ye[1])})},[]);var P=function(){if(a.startsWith("http")||a.startsWith("/")){z();return}Object(d.z)(t||"educoder",a,t)},z=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&&A.a.bgBlack," ").concat(e?A.a.wrp:"hide")},p&&U.a.createElement("div",{className:A.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:z},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(A.a[T]," ").concat(T," ").concat(A.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:A.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(Ke,we,F){var ae=F("BJfS"),L=function(C){var S=/[height|width]$/;return S.test(C)},I=function(C){var S="",H=Object.keys(C);return H.forEach(function(U,R){var A=C[U];U=ae(U),L(U)&&typeof A=="number"&&(A=A+"px"),A===!0?S+=U:A===!1?S+="not "+U:S+="("+U+": "+A+")",R<H.length-1&&(S+=" and ")}),S},j=function(C){var S="";return typeof C=="string"?C:C instanceof Array?(C.forEach(function(H,U){S+=I(H),U<C.length-1&&(S+=", ")}),S):I(C)};Ke.exports=j},psGv:function(Ke,we,F){var ae,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,p=[],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)?(p.push(_),_=i):_&&this._is_closing(i,_)&&(i.opened=_,_.closed=i,_=p.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 p(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 O=new o(c,"html");this._options=O,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:""},O=new u,B=new i(this._options,x),w=new a(f,this._options).tokenize();this._tag_stack=new g(B);for(var W=null,P=w.next();P.type!==s.EOF;)P.type===s.TAG_OPEN||P.type===s.COMMENT?(W=this._handle_tag_open(B,P,O,D),O=W):P.type===s.ATTRIBUTE||P.type===s.EQUALS||P.type===s.VALUE||P.type===s.TEXT&&!O.tag_complete?W=this._handle_inside_tag(B,P,O,w):P.type===s.TAG_CLOSE?W=this._handle_tag_close(B,P,O):P.type===s.TEXT?W=this._handle_text(B,P,O):B.add_raw_token(P),D=W,P=w.next();var z=B._output.get_code(c);return z},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 O=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),O=O||c.newlines!==0),this._is_wrap_attributes_force)){var w=x.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&x.attr_count===1){var W=!0,P=0,z;do{if(z=D.peek(P),z.type===s.ATTRIBUTE){W=!1;break}P+=1}while(P<4&&z.type!==s.EOF&&z.type!==s.TAG_CLOSE);w=!W}w&&(f.print_newline(!1),O=!0)}f.print_token(c),O=O||f.previous_token_wrapped(),x.has_wrapped_attrs=O}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 O=c.text,B,w=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(ye,ie){var xe=new h(ye,ie,D._js_beautify,D._css_beautify);return xe.beautify()}),this._options.indent_scripts==="keep"?w=0:this._options.indent_scripts==="separate"&&(w=-f.indent_level);var z=f.get_full_indent(w);if(O=O.replace(/\n[ \t]*$/,""),x.custom_beautifier_name!=="html"&&O[0]==="<"&&O.match(/^(<!--|<!\[CDATA\[)/)){var Q=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(O);if(!Q){f.add_raw_token(c);return}W=z+Q[1]+`
|
|
`,O=Q[4],Q[5]&&(P=z+Q[5]),O=O.replace(/\n[ \t]*$/,""),(Q[2]||Q[3].indexOf(`
|
|
`)!==-1)&&(Q=Q[3].match(/[ \t]+$/),Q&&(c.whitespace_before=Q[0]))}if(O)if(B){var re=function(){this.eol=`
|
|
`};re.prototype=this._options.raw_options;var le=new re;O=B(z+O,le)}else{var be=c.whitespace_before;be&&(O=O.replace(new RegExp(`
|
|
(`+be+")?","g"),`
|
|
`)),O=z+O.replace(/\n/g,`
|
|
`+z)}W&&(O?O=W+O+`
|
|
`+P:O=W+P),f.print_newline(!1),O&&(c.text=O,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 O=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),O.start_tag_token=this._tag_stack.try_pop(O.tag_name)):(f.traverse_whitespace(c),this._set_tag_position(f,c,O,x,D),O.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)&&(O.alignment_size=c.text.length+1),!O.tag_complete&&!O.is_unformatted&&(f.alignment_size=O.alignment_size),O};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||p(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&&p(c.tag_check,this._options.unformatted),c.is_content_unformatted=!c.is_empty_element&&p(c.tag_check,this._options.content_unformatted),c.is_inline_element=p(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,O){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)))),p(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==="!--"&&O.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 w=!1;w=x.start_tag_token&&x.start_tag_token.multiline_content,w=w||!x.is_inline_element&&!(D.is_inline_element||D.is_unformatted)&&!(O.type===s.TAG_CLOSE&&x.start_tag_token===D)&&O.type!=="TK_CONTENT",(x.is_content_unformatted||x.is_unformatted)&&(w=!1),w&&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)&&(O.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(_,p){o.call(this,_,p),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(_,p){return _.type===t.TAG_CLOSE&&p&&((_.text===">"||_.text==="/>")&&p.text[0]==="<"||_.text==="}}"&&p.text[0]==="{"&&p.text[1]==="{")},T.prototype._reset=function(){this._current_tag_name=""},T.prototype._get_next_token=function(_,p){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,p),E=E||this._read_attribute(g,_,p),E=E||this._read_close(g,p),E=E||this._read_raw_content(g,_,p),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,p),E=E||this._create_token(t.UNKNOWN,this._input.next()),E)},T.prototype._read_comment_or_cdata=function(_){var p=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&&(p=this._create_token(t.COMMENT,E),p.directives=g)}return p},T.prototype._read_processing=function(_){var p=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&&(p=this._create_token(t.COMMENT,E),p.directives=g)}return p},T.prototype._read_open=function(_,p){var E=null,g=null;return p||_==="<"&&(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(_,p){var E=null,g=null;return p||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(_,p){var E=null,g=null;return p&&(p.text[0]==="<"&&(_===">"||_==="/"&&this._input.peek(1)===">")?(E=this._input.next(),_==="/"&&(E+=this._input.next()),g=this._create_token(t.TAG_CLOSE,E)):p.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(_,p,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&&(p.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(_,p,E){var g="";if(E&&E.text[0]==="{")g=this.__patterns.handlebars_raw_close.read();else if(p.type===t.TAG_CLOSE&&p.opened.text[0]==="<"&&p.text[0]!=="/"){var h=p.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 p="";if(this._options.unformatted_content_delimiter&&(_===this._options.unformatted_content_delimiter[0]&&(p=this.__patterns.unformatted_content_delimiter.read())),p||(p=this.__patterns.word.read()),p)return this._create_token(t.TEXT,p)},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 A=R(18);I=A})();var j=I;if(!0)!(ae=[F,F("6UM0"),F("TXwP")],L=function(H){var U=F("6UM0"),R=F("TXwP");return{html_beautify:function(A,y){return j(A,y,U.js_beautify,R.css_beautify)}}}.apply(we,ae),L!==void 0&&(Ke.exports=L));else var C,S})()},pxMS:function(Ke,we,F){Ke.exports=F.p+"static/program-banner.03adba1e.png"},"rAM+":function(Ke,we,F){"use strict";F.d(we,"a",function(){return L});var ae=F("Qw5x");function L(I,j){var C;if(typeof Symbol=="undefined"||I[Symbol.iterator]==null){if(Array.isArray(I)||(C=Object(ae.a)(I))||j&&I&&typeof I.length=="number"){C&&(I=C);var S=0,H=function(){};return{s:H,n:function(){return S>=I.length?{done:!0}:{done:!1,value:I[S++]}},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,A;return{s:function(){C=I[Symbol.iterator]()},n:function(){var v=C.next();return U=v.done,v},e:function(v){R=!0,A=v},f:function(){try{!U&&C.return!=null&&C.return()}finally{if(R)throw A}}}}},rUJ1:function(Ke,we){const F=/[&<>"']/,ae=/[&<>"']/g,L=/[<>"']|&(?!#?\w+;)/,I=/[<>"']|&(?!#?\w+;)/g,j={"&":"&","<":"<",">":">",'"':""","'":"'"},C=g=>j[g];function S(g,h){if(h){if(F.test(g))return g.replace(ae,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 A(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,O=c;for(;--O>=0&&x[O]==="\\";)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 p(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")}Ke.exports={escape:S,unescape:U,edit:A,cleanUrl:d,resolveUrl:e,noopTest:t,merge:i,splitCells:T,rtrim:_,findClosingBracket:p,checkSanitizeDeprecation:E}},sR1s:function(Ke,we,F){"use strict";F.d(we,"b",function(){return j}),F.d(we,"a",function(){return C}),F.d(we,"c",function(){return S}),F.d(we,"d",function(){return H});var ae=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 A=I(R),y=U,v=0;v<A.length;v+=1){if(!y)return null;var d=A[v];y=y[d]}return y}function C(U){var R=[],A={};return U.forEach(function(y){for(var v=y||{},d=v.key,o=v.dataIndex,n=d||I(o).join("-")||L;A[n];)n="".concat(n,"_next");A[n]=!0,R.push(n)}),R}function S(){var U={};function R(d,o){o&&Object.keys(o).forEach(function(n){var a=o[n];a&&Object(ae.a)(a)==="object"?(d[n]=d[n]||{},R(d[n],a)):d[n]=a})}for(var A=arguments.length,y=new Array(A),v=0;v<A;v++)y[v]=arguments[v];return y.forEach(function(d){R(U,d)}),U}function H(U){return U!=null}},sboe:function(Ke,we,F){"use strict";F.d(we,"a",function(){return I});var ae=F("q1tI"),L=F.n(ae),I=ae.createContext(null)},siWv:function(Ke,we,F){Ke.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(Ke,we,F){"use strict";var ae=F("VTBJ"),L=F("1OyB"),I=F("vuIU"),j=F("Ji7U"),C=F("LK+K"),S=F("q1tI"),H=F.n(S),U=F("m+aA"),R=F("Zm9Q"),A=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(),p=_.width,E=_.height,g=T.offsetWidth,h=T.offsetHeight,u=Math.floor(p),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(ae.a)(Object(ae.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(A.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(i.length===0)return Object(A.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var T=i[0];if(S.isValidElement(T)&&Object(y.c)(T)){var _=T.ref;i[0]=S.cloneElement(T,{ref:Object(y.a)(_,this.setChildNode)})}return i.length===1?i[0]:i.map(function(p,E){return!S.isValidElement(p)||"key"in p&&p.key!==null?p:S.cloneElement(p,{key:"".concat(d,"-").concat(E)})})}}]),s}(S.Component);o.displayName="ResizeObserver",we.a=o},ulZh:function(Ke,we,F){typeof window!="undefined"&&function(L,I){Ke.exports=I()}(this,function(){return function(ae){var L={};function I(j){if(L[j])return L[j].exports;var C=L[j]={i:j,l:!1,exports:{}};return ae[j].call(C.exports,C,C.exports,I),C.l=!0,C.exports}return I.m=ae,I.c=L,I.d=function(j,C,S){I.o(j,C)||Object.defineProperty(j,C,{enumerable:!0,get:S})},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 S=Object.create(null);if(I.r(S),Object.defineProperty(S,"default",{enumerable:!0,value:j}),C&2&&typeof j!="string")for(var H in j)I.d(S,H,function(U){return j[U]}.bind(null,H));return S},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(ae,L,I){"use strict";var j=Object.prototype.hasOwnProperty,C="~";function S(){}Object.create&&(S.prototype=Object.create(null),new S().__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 S:delete y._events[v]}function A(){this._events=new S,this._eventsCount=0}A.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},A.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},A.prototype.listenerCount=function(v){var d=C?C+v:v,o=this._events[d];return o?o.fn?1:o.length:0},A.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 p=t.length,E;for(_=0;_<p;_++){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},A.prototype.on=function(v,d,o){return U(this,v,d,o,!1)},A.prototype.once=function(v,d,o){return U(this,v,d,o,!0)},A.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},A.prototype.removeAllListeners=function(v){var d;return v?(d=C?C+v:v,this._events[d]&&R(this,d)):(this._events=new S,this._eventsCount=0),this},A.prototype.off=A.prototype.removeListener,A.prototype.addListener=A.prototype.on,A.prefixed=C,A.EventEmitter=A,ae.exports=A},"./node_modules/url-toolkit/src/url-toolkit.js":function(ae,L,I){(function(j){var C=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,S=/^([^\/?#]*)([^]*)$/,H=/(?:\/|^)\.(?=\/)/g,U=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,R={buildAbsoluteURL:function(A,y,v){if(v=v||{},A=A.trim(),y=y.trim(),!y){if(!v.alwaysNormalize)return A;var d=R.parseURL(A);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(A);if(!n)throw new Error("Error trying to parse base URL.");if(!n.netLoc&&n.path&&n.path[0]!=="/"){var a=S.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(A){var y=C.exec(A);return y?{scheme:y[1]||"",netLoc:y[2]||"",path:y[3]||"",params:y[4]||"",query:y[5]||"",fragment:y[6]||""}:null},normalizePath:function(A){for(A=A.split("").reverse().join("").replace(H,"");A.length!==(A=A.replace(U,"")).length;);return A.split("").reverse().join("")},buildURLFromParts:function(A){return A.scheme+A.netLoc+A.path+A.params+A.query+A.fragment}};ae.exports=R})(this)},"./node_modules/webworkify-webpack/index.js":function(ae,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|/|@]+",S="\\(\\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)+S,"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+'))"\\)\\)'+S,"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 p=0;p<n[T[_]].length;p++)U(n[T[_]][p])&&(n[T[_]][p]=1*n[T[_]][p]);return n}function A(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:{}};A(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),p=Object.keys(_),E=0;E<p.length;E++)o[p[E]]=o[p[E]]||[],o[p[E]]=o[p[E]].concat(_[p[E]])}return n}ae.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(p){return""+JSON.stringify(p)+": "+o[T][p].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(ae,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"),S=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"),A=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){p(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 p(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:A.TimelineController,audioStreamController:C.default,audioTrackController:S.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(ae,L,I){"use strict";I.r(L);var j=I("./src/polyfills/number.ts"),C=I("./src/utils/ewma-bandwidth-estimator.ts"),S=I("./src/events.ts"),H=I("./src/utils/buffer-helper.ts"),U=I("./src/errors.ts"),R=I("./src/types/loader.ts"),A=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(S.Events.FRAG_LOADING,this.onFragLoading,this),s.on(S.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.on(S.Events.ERROR,this.onError,this)},n.unregisterListeners=function(){var s=this.hls;s.off(S.Events.FRAG_LOADING,this.onFragLoading,this),s.off(S.Events.FRAG_LOADED,this.onFragLoaded,this),s.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.off(S.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 p=e?e.stats:s.stats,E=e?e.duration:s.duration;if(p.aborted){A.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()-p.loading.start,h=Math.abs(_.playbackRate);if(g<=500*E/h)return;var u=t.levels,r=t.minAutoLevel,l=u[s.level],f=p.total||Math.max(p.loaded,Math.round(E*l.maxBitrate/8)),c=Math.max(1,p.bwEstimate?p.bwEstimate/8:p.loaded*1e3/g),x=(f-p.loaded)/c,D=_.currentTime,O=(H.BufferHelper.bufferInfo(_,D,T.maxBufferHole).end-D)/h;if(O>=2*E/h||x<=O)return;var B=Number.POSITIVE_INFINITY,w;for(w=s.level-1;w>r;w--){var W=u[w].maxBitrate;if(B=E*W/(8*.8*c),B<O)break}if(B>=x)return;var P=this.bwEstimator.getEstimate();A.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 "+w+`
|
|
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: `+O.toFixed(3)+" s"),t.nextLoadLevel=w,this.bwEstimator.sample(g,p.loaded),this.clearTimer(),s.loader&&(this.fragCurrent=this.partCurrent=null,s.loader.abort()),t.trigger(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:s,part:e,stats:p})},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 p=this.hls.levels[t.level],E=(p.loaded?p.loaded.bytes:0)+T.loaded,g=(p.loaded?p.loaded.duration:0)+_;p.loaded={bytes:E,duration:g},p.realBitrate=Math.round(8*E/g)}if(t.bitrateTest){var h={stats:T,frag:t,part:i,id:t.type};this.onFragBuffered(S.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,p=t.media,E=e?e.duration:s?s.duration:0,g=p?p.currentTime:0,h=p&&p.playbackRate!==0?Math.abs(p.playbackRate):1,u=this.bwEstimator?this.bwEstimator.getEstimate():T.abrEwmaDefaultEstimate,r=(H.BufferHelper.bufferInfo(p,g,T.maxBufferHole).end-g)/h,l=this.findBestLevel(u,_,i,r,T.abrBandWidthFactor,T.abrBandWidthUpFactor);if(l>=0)return l;A.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 O=E?Math.min(E,T.maxLoadingDelay):T.maxLoadingDelay;f=O-D,A.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 p,E=this.fragCurrent,g=this.partCurrent,h=this.lastLoadedFragLevel,u=this.hls.levels,r=u[h],l=!!(r!=null&&(p=r.details)!==null&&p!==void 0&&p.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 O=D.details,B=(g?O==null?void 0:O.partTarget:O==null?void 0:O.averagetargetduration)||c,w=void 0;x<=h?w=T*s:w=_*s;var W=u[x].maxBitrate,P=W*B/w;if(A.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+x+"/"+Math.round(w)+"/"+W+"/"+B+"/"+i+"/"+P),w>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(ae,L,I){"use strict";I.r(L);var j=I("./src/polyfills/number.ts"),C=I("./src/controller/base-stream-controller.ts"),S=I("./src/events.ts"),H=I("./src/utils/buffer-helper.ts"),U=I("./src/controller/fragment-tracker.ts"),R=I("./src/types/level.ts"),A=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,p=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(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.on(S.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),r.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.on(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),r.on(S.Events.ERROR,this.onError,this),r.on(S.Events.BUFFER_RESET,this.onBufferReset,this),r.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),r.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.on(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},h._unregisterListeners=function(){var r=this.hls;r.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.off(S.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),r.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.off(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),r.off(S.Events.ERROR,this.onError,this),r.off(S.Events.BUFFER_RESET,this.onBufferReset,this),r.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),r.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.off(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.off(S.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(),O=this.retryDate;(!O||D>=O||(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 w=B.frag,W=B.part,P=B.cache,z=B.complete;if(this.initPTS[w.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=C.State.FRAG_LOADING;var Q=P.flush(),re={frag:w,part:W,payload:Q,networkDetails:null};this._handleFragmentLoadProgress(re),z&&E.prototype._handleFragmentLoadComplete.call(this,re)}else if(this.videoTrackCC!==this.waitingVideoCC)e.logger.log("Waiting fragment cc ("+w.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var le=this.getLoadPosition(),be=H.BufferHelper.bufferInfo(this.mediaBuffer,le,this.config.maxBufferHole),ye=Object(n.fragmentWithinToleranceTest)(be.end,this.config.maxFragLookUpTolerance,w);ye<0&&(e.logger.log("Waiting fragment cc ("+w.cc+") @ "+w.start+" cancelled because another fragment at "+be.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,O=f.config;if(!c||!c[D])return;if(!x&&(this.startFragRequested||!O.startFragPrefetch))return;var B=c[D],w=B.details;if(!w||w.live&&this.levelLastLoaded!==D||this.waitForCdnTuneIn(w)){this.state=C.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,y.ElementaryStreamTypes.AUDIO,A.PlaylistLevelType.AUDIO));var W=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,A.PlaylistLevelType.AUDIO);if(W===null)return;var P=W.len,z=this.getMaxBufferLength(),Q=this.audioSwitch;if(P>=z&&!Q)return;if(!Q&&this._streamEnded(W,w)){f.trigger(S.Events.BUFFER_EOS,{type:"audio"}),this.state=C.State.ENDED;return}var re=w.fragments,le=re[0].start,be=W.end;if(Q){var ye=this.getLoadPosition();be=ye,w.PTSKnown&&ye<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 ie=this.getNextFragment(be,w);if(!ie){this.bufferFlushed=!0;return}((r=ie.decryptdata)===null||r===void 0?void 0:r.keyFormat)==="identity"&&!((l=ie.decryptdata)!==null&&l!==void 0&&l.key)?this.loadKey(ie,w):this.loadFragment(ie,w,be)},h.getMaxBufferLength=function(){var r=E.prototype.getMaxBufferLength.call(this),l=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,A.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 O=c[D],B=0;if(x.live||(f=O.details)!==null&&f!==void 0&&f.live){var w=this.mainDetails;if(x.fragments[0]||(x.deltaUpdateFailed=!0),x.deltaUpdateFailed||!w)return;!O.details&&x.hasProgramDateTime&&w.hasProgramDateTime?(Object(a.alignMediaPlaylistByPDT)(x,w),B=x.fragments[0].start):B=this.alignPlaylists(x,O.details)}O.details=x,this.levelLastLoaded=D,!this.startFragRequested&&(this.mainDetails||!x.live)&&this.setStartPosition(O.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,O=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 w=B[O];console.assert(w,"Audio track is defined on fragment load progress");var W=w.details;console.assert(W,"Audio track details are defined on fragment load progress");var P=D.defaultAudioCodec||w.audioCodec||"mp4a.40.2",z=this.transmuxer;z||(z=this.transmuxer=new d.default(this.hls,A.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,be=c?c.index:-1,ye=be!==-1,ie=new o.ChunkMetadata(f.level,f.sn,f.stats.chunkCount,x.byteLength,be,ye);z.push(x,re,P,"",f,c,W.totalduration,le,ie,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 "+O);var xe=this.waitingData=this.waitingData||{frag:f,part:c,cache:new v.default,complete:!1},Ae=xe.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!==A.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(S.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(A.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,A.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,O=this.getCurrentContext(D);if(!O){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=O.frag,w=O.part,W=x.audio,P=x.text,z=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(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:B,id:f,tracks:Q.tracks})),W){var re=W.startPTS,le=W.endPTS,be=W.startDTS,ye=W.endDTS;w&&(w.elementaryStreams[y.ElementaryStreamTypes.AUDIO]={startPTS:re,endPTS:le,startDTS:be,endDTS:ye}),B.setElementaryStreamInfo(y.ElementaryStreamTypes.AUDIO,re,le,be,ye),this.bufferFragmentData(W,B,w,D)}if(z!=null&&(l=z.samples)!==null&&l!==void 0&&l.length){var ie=t({frag:B,id:f},z);c.trigger(S.Events.FRAG_PARSING_METADATA,ie)}if(P){var xe=t({frag:B,id:f},P);c.trigger(S.Events.FRAG_PARSING_USERDATA,xe)}},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(S.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(S.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(S.Events.AUDIO_TRACK_SWITCHED,{id:f})},g}(C.default);L.default=p},"./src/controller/audio-track-controller.ts":function(ae,L,I){"use strict";I.r(L);var j=I("./src/events.ts"),C=I("./src/errors.ts"),S=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 A(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){A(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,p=_===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:p,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}(S.default);L.default=v},"./src/controller/base-playlist-controller.ts":function(ae,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"),S=I("./src/controller/level-helper.ts"),H=I("./src/utils/logger.ts"),U=I("./src/errors.ts"),R=function(){function A(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=A.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(S.mergeDetails)(n,s),!this.canLoad||!s.live)return;var i,T=void 0,_=void 0;if(s.canBlockReload&&s.endSN&&s.advanced){var p=this.hls.config.lowLatencyMode,E=s.lastPartSn,g=s.endSN,h=s.lastPartIndex,u=h!==-1,r=E===g,l=p?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 O=Math.round(x%s.targetduration/s.partTarget);_+=O}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,_),p||!r){this.loadPlaylist(i);return}}else i=this.getDeliveryDirectives(s,o.deliveryDirectives,T,_);var B=Object(S.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},A}()},"./src/controller/base-stream-controller.ts":function(ae,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"),S=I("./src/controller/fragment-tracker.ts"),H=I("./src/utils/buffer-helper.ts"),U=I("./src/utils/logger.ts"),R=I("./src/events.ts"),A=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 p(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){p(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,O=this.fragmentTracker;if(!x.live&&D&&D.sn===x.endSN&&!c.nextStart){var B=O.getState(D);return B===S.FragmentState.PARTIAL||B===S.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 O=this.config;this.levels&&O.autoStartLoad&&this.state===g.STOPPED&&this.startLoad(O.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,O=this.mediaBuffer,B=this.state,w=D?D.currentTime:0,W=H.BufferHelper.bufferInfo(O||D,w,c.maxBufferHole);if(this.log("media seeking to "+(Object(j.isFiniteNumber)(w)?w.toFixed(3):w)+", state: "+B),B===g.ENDED)this.resetLoadingState();else if(x&&!W.len){var P=c.maxFragLookUpTolerance,z=x.start-P,Q=x.start+x.duration+P,re=w>Q;(w<z||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=w),!this.loadedmetadata&&!W.len&&(this.nextLoadPosition=this.startPosition=w),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 O=this,B=function(W){if(O.fragContextChanged(c)){O.warn("Fragment "+c.sn+(W.part?" p: "+W.part.index:"")+" of level "+c.level+" was dropped during download."),O.fragmentTracker.removeFragment(c);return}c.stats.chunkCount++,O._handleFragmentLoadProgress(W)};this._doFragLoad(c,x,D,B).then(function(w){if(!w)return;O.fragLoadError=0;var W=O.state;if(O.fragContextChanged(c)){(W===g.FRAG_LOADING||W===g.BACKTRACKING||!O.fragCurrent&&W===g.PARSING)&&(O.fragmentTracker.removeFragment(c),O.state=g.IDLE);return}if("payload"in w&&(O.log("Loaded fragment "+c.sn+" of level "+c.level),O.hls.trigger(R.Events.FRAG_LOADED,w),O.state===g.BACKTRACKING)){O.fragmentTracker.backtrack(c,w),O.resetFragmentLoading(c);return}O._handleFragmentLoadComplete(w)}).catch(function(w){O.warn(w),O.resetFragmentLoading(c)})},l.flushMainBuffer=function(c,x,D){if(D===void 0&&(D=null),!(c-x))return;var O={startOffset:c,endOffset:x,type:D};this.fragLoadError=0,this.hls.trigger(R.Events.BUFFER_FLUSHING,O)},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 O=x.hls,B=D.payload,w=c.decryptdata;if(B&&B.byteLength>0&&w&&w.key&&w.iv&&w.method==="AES-128"){var W=self.performance.now();return x.decrypter.webCryptoDecrypt(new Uint8Array(B),w.key.buffer,w.iv.buffer).then(function(P){var z=self.performance.now();return O.trigger(R.Events.FRAG_DECRYPTED,{frag:c,payload:P,stats:{tstart:W,tdecrypt:z}}),D.payload=P,D})}return D}).then(function(D){var O=x.fragCurrent,B=x.hls,w=x.levels;if(!w)throw new Error("init load aborted, missing levels");var W=w[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===O&&B.trigger(R.Events.FRAG_BUFFERED,{stats:P,frag:O,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,O=c.part,B=c.partsLoaded,w=!B||B.length===0||B.some(function(P){return!P}),W=new y.ChunkMetadata(D.level,D.sn,D.stats.chunkCount+1,0,O?O.index:-1,!w);x.flush(W)},l._handleFragmentLoadProgress=function(c){},l._doFragLoad=function(c,x,D,O){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 w=x.partList;if(w&&O){D>c.end&&x.fragmentHint&&(c=x.fragmentHint);var W=this.getNextPart(w,c,D);if(W>-1){var P=w[W];return this.log("Loading part sn: "+c.sn+" p: "+P.index+" cc: "+c.cc+" of playlist ["+x.startSN+"-"+x.endSN+"] parts [0-"+W+"-"+(w.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:w[W],targetBufferTime:D}),this.doFragPartsLoad(c,w,W,O).catch(function(z){return B.handleFragLoadError(z)})}else if(!c.url||this.loadedEndOfParts(w,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,O).catch(function(z){return B.handleFragLoadError(z)})},l.doFragPartsLoad=function(c,x,D,O){var B=this;return new Promise(function(w,W){var P=[],z=function Q(re){var le=x[re];B.fragmentLoader.loadPart(c,le,O).then(function(be){P[le.index]=be;var ye=be.part;B.hls.trigger(R.Events.FRAG_LOADED,be);var ie=x[re+1];if(ie&&ie.fragment===c)Q(re+1);else return w({frag:c,part:ye,partsLoaded:P})}).catch(W)};z(D)})},l.handleFragLoadError=function(c){var x=c.data;return x&&x.details===A.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,O=x.part,B=x.level,w=self.performance.now();D.stats.parsing.end=w,O&&(O.stats.parsing.end=w),this.updateLevelTiming(D,O,B,c.partial)},l.getCurrentContext=function(c){var x=this.levels,D=c.level,O=c.sn,B=c.part;if(!x||!x[D])return this.warn("Levels object was unset while buffering fragment "+O+" of level "+D+". The current chunk will not be buffered."),null;var w=x[D],W=B>-1?Object(n.getPartWith)(w,O,B):null,P=W?W.fragment:Object(n.getFragmentWithSN)(w,O,this.fragCurrent);return P?{frag:P,part:W,level:w}:null},l.bufferFragmentData=function(c,x,D,O){if(!c||this.state!==g.PARSING)return;var B=c.data1,w=c.data2,W=B;if(B&&w&&(W=Object(v.appendUint8Array)(B,w)),!W||!W.length)return;var P={type:c.type,frag:x,part:D,chunkMeta:O,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,O=H.BufferHelper.bufferInfo(x,D,0),B=c.duration,w=Math.min(this.config.maxFragLookUpTolerance*2,B*.25),W=Math.max(Math.min(c.start-w,O.end-w),D+w);c.start-W>w&&this.flushMainBuffer(W,c.start)},l.getFwdBufferInfo=function(c,x){var D=this.config,O=this.getLoadPosition();if(!Object(j.isFiniteNumber)(O))return null;var B=H.BufferHelper.bufferInfo(c,O,D.maxBufferHole);if(B.len===0&&B.nextStart!==void 0){var w=this.fragmentTracker.getBufferedFrag(O,x);if(w&&B.nextStart<w.end)return H.BufferHelper.bufferInfo(c,O,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,O,B=x.fragments,w=B.length;if(!w)return null;var W=this.config,P=B[0].start,z;if(x.live){var Q=W.initialLiveManifestSize;if(w<Q)return this.warn("Not enough fragments to start playback (have: "+w+", need: "+Q+")"),null;!x.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(z=this.getInitialLiveFragment(x,B),this.startPosition=z?this.hls.liveSyncPosition||z.start:c)}else c<=P&&(z=B[0]);if(!z){var re=W.lowLatencyMode?x.partEnd:x.fragmentEnd;z=this.getFragmentAtPosition(c,re,x)}return(D=z)!==null&&D!==void 0&&D.initSegment&&!((O=z)!==null&&O!==void 0&&O.initSegment.data)&&!this.bitrateTest&&(z=z.initSegment),z},l.getNextPart=function(c,x,D){for(var O=-1,B=!1,w=!0,W=0,P=c.length;W<P;W++){var z=c[W];if(w=w&&!z.independent,O>-1&&D<z.start)break;var Q=z.loaded;!Q&&(B||z.independent||w)&&z.fragment===x&&(O=W),B=Q}return O},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,O=null;if(D){if(c.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+D.programDateTime),O=Object(o.findFragmentByPDT)(x,D.endProgramDateTime,this.config.maxFragLookUpTolerance)),!O){var B=D.sn+1;if(B>=c.startSN&&B<=c.endSN){var w=x[B-c.startSN];D.cc===w.cc&&(O=w,this.log("Live playlist, switching playlist, load frag with next SN: "+O.sn))}O||(O=Object(o.findFragWithCC)(x,D.cc),O&&this.log("Live playlist, switching playlist, load frag with same CC: "+O.sn))}}else{var W=this.hls.liveSyncPosition;W!==null&&(O=this.getFragmentAtPosition(W,this.bitrateTest?c.fragmentEnd:c.edge,c))}return O},l.getFragmentAtPosition=function(c,x,D){var O=this.config,B=this.fragPrevious,w=D.fragments,W=D.endSN,P=D.fragmentHint,z=O.maxFragLookUpTolerance,Q=!!(O.lowLatencyMode&&D.partList&&P);Q&&P&&!this.bitrateTest&&(w=w.concat(P),W=P.sn);var re;if(c<x){var le=c>x-z?0:z;re=Object(o.findFragmentByPTS)(B,w,c,le)}else re=w[w.length-1];if(re){var be=re.sn-D.startSN,ye=B&&re.level===B.level,ie=w[be+1],xe=this.fragmentTracker.getState(re);if(xe===S.FragmentState.BACKTRACKED){re=null;for(var Ae=be;w[Ae]&&this.fragmentTracker.getState(w[Ae])===S.FragmentState.BACKTRACKED;)B?re=w[Ae--]:re=w[--Ae];re||(re=ie)}else B&&re.sn===B.sn&&!Q&&(ye&&(re.sn<W&&this.fragmentTracker.getState(ie)!==S.FragmentState.OK?(this.log("SN "+re.sn+" just loaded, load next one: "+ie.sn),re=ie):re=null))}return re},l.synchronizeToLiveEdge=function(c){var x=this.config,D=this.media;if(!D)return;var O=this.hls.liveSyncPosition,B=D.currentTime,w=c.fragments[0].start,W=c.edge,P=B>=w-x.maxFragLookUpTolerance&&B<=W;if(O!==null&&D.duration>O&&(B<O||!P)){var z=x.liveMaxLatencyDuration!==void 0?x.liveMaxLatencyDuration:x.liveMaxLatencyDurationCount*c.targetduration;(!P&&D.readyState<4||B<W-z)&&(this.loadedmetadata||(this.nextLoadPosition=O),D.readyState&&(this.warn("Playback: "+B.toFixed(3)+" is located too far from the end of live sliding playlist: "+W+", reset currentTime to : "+O.toFixed(3)),D.currentTime=O))}},l.alignPlaylists=function(c,x){var D=this.levels,O=this.levelLastLoaded,B=this.fragPrevious,w=O!==null?D[O]:null,W=c.fragments.length;if(!W)return this.warn("No fragments in live playlist"),0;var P=c.fragments[0].start,z=!x,Q=c.alignedSliding&&Object(j.isFiniteNumber)(P);if(z||!Q&&!P){Object(d.alignStream)(B,w,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 O=c.startTimeOffset;Object(j.isFiniteNumber)(O)?(D=x+O,O<0&&(D+=c.totalduration),D=Math.min(Math.max(x,D),x+c.totalduration),this.log("Start time offset "+O+" 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 O=this.fragCurrent;console.assert(O&&D.sn===O.sn&&D.level===O.level&&D.urlId===O.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 w=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 "+w+"ms"),this.retryDate=self.performance.now()+w,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 O=H.BufferHelper.getBuffered(c);this.fragmentTracker.detectEvictedFragments(x,O,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,O){var B=this,w=D.details;console.assert(!!w,"level.details must be defined");var W=Object.keys(c.elementaryStreams).reduce(function(P,z){var Q=c.elementaryStreams[z];if(Q){var re=Q.endPTS-Q.startPTS;if(re<=0)return B.warn("Could not parse fragment "+c.sn+" "+z+" duration reliably ("+re+") resetting transmuxer to fallback to playlist timing"),B.resetTransmuxer(),P||!1;var le=O?0:Object(n.updateFragPTSDTS)(w,c,Q.startPTS,Q.endPTS,Q.startDTS,Q.endDTS);return B.hls.trigger(R.Events.LEVEL_PTS_UPDATED,{details:w,level:D,drift:le,type:z,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(ae,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"),S=I("./src/utils/logger.ts"),H=I("./src/errors.ts"),U=I("./src/utils/buffer-helper.ts"),R=I("./src/utils/mediasource-helper.ts"),A=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;S.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(){S.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){S.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,S.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(S.logger.log("[buffer-controller]: media source detaching"),t.readyState==="open")try{t.endOfStream()}catch(T){S.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()):S.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){S.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 p=i.tracks[_];if(p&&typeof p.buffer.changeType=="function"){var E=t[_],g=E.codec,h=E.levelCodec,u=E.container,r=(p.levelCodec||p.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&&(S.logger.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),E.changeType(t)),T.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(E){S.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,p=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=p.audio,O=g==="audio"&&r.id===1&&(D==null?void 0:D.container)==="audio/mpeg",B={execute:function(){if(l.executeStart=self.performance.now(),O){var W=i.sourceBuffer[g];if(W){var P=h.start-W.timestampOffset;Math.abs(P)>=.1&&(S.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,z={};for(var Q in P)z[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:z})},onError:function(W){S.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&&(S.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){S.logger.warn("[buffer-controller]: Failed to remove from "+E+" SourceBuffer",h)}}};t.type?T.append(_(t.type),t.type):this.getSourceBufferTypes().forEach(function(p){T.append(_(p),p)})},a.onFragParsed=function(e,t){var i=this,T=t.frag,_=t.part,p=[],E=_?_.elementaryStreams:T.elementaryStreams;E[A.ElementaryStreamTypes.AUDIOVIDEO]?p.push("audiovideo"):(E[A.ElementaryStreamTypes.AUDIO]&&p.push("audio"),E[A.ElementaryStreamTypes.VIDEO]&&p.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})};p.length===0&&S.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+T.type+" level: "+T.level+" sn: "+T.sn),this.blockBuffers(g,p)},a.onFragChanged=function(e,t){this.flushBackBuffer()},a.onBufferEos=function(e,t){var i=this,T=this.getSourceBufferTypes().reduce(function(_,p){var E=i.sourceBuffer[p];return(!t.type||t.type===p)&&(E&&!E.ended&&(E.ended=!0,S.logger.log("[buffer-controller]: "+p+" 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 p=t.live&&e.config.liveBackBufferLength!==null?e.config.liveBackBufferLength:e.config.backBufferLength;if(!Object(j.isFiniteNumber)(p)||p<0)return;var E=i.currentTime,g=t.levelTargetDuration,h=Math.max(p,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,p=i.duration,E=Object(j.isFiniteNumber)(T.duration)?T.duration:0;e.live&&t.config.liveDurationInfinity?(S.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),T.duration=Infinity,this.updateSeekableRange(e)):(_>E&&_>p||!Object(j.isFiniteNumber)(p))&&(S.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),p=Math.max(_,_+e.totalduration);t.setLiveSeekableRange(_,p)}},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(p){t.executeNext(p)})}},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 p=e[_];if(!p)throw Error("source buffer exists for track "+_+", however track does not");var E=p.levelCodec||p.codec,g=p.container+";codecs="+E;S.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:p.container,levelCodec:p.levelCodec,id:p.id},T++}catch(r){S.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){S.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,p=this.operationQueue,E=this.sourceBuffer,g=E[e];if(!T||!_||!g){S.logger.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),p.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?(S.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)):p.shiftAndExecuteNext(e)},a.appendExecutor=function(e,t){var i=this.operationQueue,T=this.sourceBuffer,_=T[t];if(!_){S.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){S.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(e);return}var T=this.operationQueue,_=t.map(function(p){return T.appendBlocker(p)});Promise.all(_).then(function(){e(),t.forEach(function(p){var E=i.sourceBuffer[p];(!E||!E.updating)&&T.shiftAndExecuteNext(p)})})},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(ae,L,I){"use strict";I.r(L),I.d(L,"default",function(){return C});var j=I("./src/utils/logger.ts"),C=function(){function S(U){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=U}var H=S.prototype;return H.append=function(R,A){var y=this.queues[A];y.push(R),y.length===1&&this.buffers[A]&&this.executeNext(A)},H.insertAbort=function(R,A){var y=this.queues[A];y.unshift(R),this.executeNext(A)},H.appendBlocker=function(R){var A,y=new Promise(function(d){A=d}),v={execute:A,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(v,R),y},H.executeNext=function(R){var A=this.buffers,y=this.queues,v=A[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]},S}()},"./src/controller/cap-level-controller.ts":function(ae,L,I){"use strict";I.r(L);var j=I("./src/events.ts");function C(U,R){for(var A=0;A<R.length;A++){var y=R[A];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(U,y.key,y)}}function S(U,R,A){return R&&C(U.prototype,R),A&&C(U,A),U}var H=function(){function U(A){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=A,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},S(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(ae,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"),S=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 A(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,p=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=p.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=A(i),_;!(_=T()).done;){var p=_.value;p.bitrate>t&&(t=p.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=S.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(p){this.loader=void 0,this.loader=new i(p)}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(p){this.loader=void 0,this.loader=new i(p)}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(O){return!Number.isNaN(O)&&O!=null&&O!==""&&O!==!1},T=function(O){return Math.round(O)},_=function(O){return T(O/100)*100},p=function(O){return encodeURIComponent(O)},E={br:T,d:T,bl:_,dl:_,mtp:_,nor:p,rtp:_,tb:T},g=Object.keys(e||{}).sort(),h=A(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"],_=[{},{},{},{}],p={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=p[h]!=null?p[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(ae,L,I){"use strict";I.r(L);var j=I("./src/events.ts"),C=I("./src/errors.ts"),S=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 A=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);S.logger.log("Requesting encrypted media key-system access");var _=this.requestMediaKeySystemAccess(s,T);this.mediaKeysPromise=_.then(function(p){return i._onMediaKeySystemAccessObtained(s,p)}),_.catch(function(p){S.logger.error('Failed to obtain key-system "'+s+'" access:',p)})},n._onMediaKeySystemAccessObtained=function(s,e){var t=this;S.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=_,S.logger.log('Media-keys created for key-system "'+s+'"'),t._onMediaKeysCreated(),_});return T.catch(function(_){S.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;S.logger.log("New key-system session "+s.sessionId),s.addEventListener("message",function(t){e._onKeySessionMessage(s,t.message)},!1)},n._onKeySessionMessage=function(s,e){S.logger.log("Got EME message event, creating license request"),this._requestLicense(e,function(t){S.logger.log("Received license data (length: "+(t&&t.byteLength)+"), updating key-session"),s.update(t)})},n.onMediaEncrypted=function(s){var e=this;if(S.logger.log('Media is encrypted using "'+s.initDataType+'" init data type'),!this.mediaKeysPromise){S.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){S.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}S.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){S.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){S.logger.warn("Key-Session already initialized but requested again");return}var T=i.mediaKeysSession;if(!T){S.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){S.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}S.logger.log('Generating key-session request for "'+s+'" init data type'),i.mediaKeysSessionInitialized=!0,T.generateRequest(s,e).then(function(){S.logger.debug("Key-session generation succeeded")}).catch(function(_){S.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(_){S.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,S.logger.log("License request succeeded");var T=s.response,_=this._licenseResponseCallback;if(_)try{T=_.call(this.hls,s,e)}catch(E){S.logger.error(E)}i(T)}else{if(S.logger.error("License Request XHR failed ("+e+"). Status: "+s.status+" ("+s.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>A){this.hls.trigger(j.Events.ERROR,{type:C.ErrorTypes.KEY_SYSTEM_ERROR,details:C.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var p=A-this._requestLicenseFailureCount+1;S.logger.warn("Retrying license request, "+p+" 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){S.logger.log("Requesting content license for key-system");var t=this._mediaKeysList[0];if(!t){S.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);S.logger.log("Sending license request to URL: "+i);var _=this._generateLicenseRequestChallenge(t,s);T.send(_)}catch(p){S.logger.error("Failure requesting DRM license: "+p),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(ae,L,I){"use strict";I.r(L);var j=I("./src/events.ts"),C=I("./src/utils/logger.ts"),S=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(A){this.streamController=A},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(A,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(A,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 A=this.media;if(A)if(this.isVideoPlaybackQualityAvailable){var y=A.getVideoPlaybackQuality();this.checkFPS(A,y.totalVideoFrames,y.droppedVideoFrames)}else this.checkFPS(A,A.webkitDecodedFrameCount,A.webkitDroppedFrameCount)},H}();L.default=S},"./src/controller/fragment-finders.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"findFragmentByPDT",function(){return S}),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 A});var j=I("./src/polyfills/number.ts"),C=I("./src/utils/binary-search.ts");function S(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 A(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(ae,L,I){"use strict";I.r(L),I.d(L,"FragmentState",function(){return S}),I.d(L,"FragmentTracker",function(){return H});var j=I("./src/events.ts"),C=I("./src/types/loader.ts"),S;(function(A){A.NOT_LOADED="NOT_LOADED",A.BACKTRACKED="BACKTRACKED",A.APPENDING="APPENDING",A.PARTIAL="PARTIAL",A.OK="OK"})(S||(S={}));var H=function(){function A(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=A.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],p=s!==null||T.partial===!0;t.range[i]=o.getBufferedTimes(a,s,p,_)}),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 p=a.start(_)-this.bufferPadding,E=a.end(_)+this.bufferPadding;if(T>=p&&i<=E){s.time.push({startPTS:Math.max(e,a.start(_)),endPTS:Math.min(t,a.end(_))});break}else if(e<E&&t>p)s.partial=!0,s.time.push({startPTS:Math.max(e,a.start(_)),endPTS:Math.min(t,a.end(_))});else if(t<=p)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)?S.PARTIAL:S.OK:n.backtrack?S.BACKTRACKED:S.APPENDING:S.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},A}();function U(A){var y,v;return A.buffered&&(((y=A.range.video)===null||y===void 0?void 0:y.partial)||((v=A.range.audio)===null||v===void 0?void 0:v.partial))}function R(A){return A.type+"_"+A.level+"_"+A.urlId+"_"+A.sn}},"./src/controller/gap-controller.ts":function(ae,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 A}),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"),S=I("./src/events.ts"),H=I("./src/utils/logger.ts"),U=250,R=2,A=.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,p=!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((p||_)&&(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,O=D?x.details.targetduration*2:R;if(c>0&&c<=O){this._trySkipBufferHole(null);return}}var B=self.performance.now();if(t===null){this.stalled=B;return}var w=B-t;!T&&w>=U&&this._reportStall(g.len);var W=j.BufferHelper.bufferInfo(e,i,s.maxBufferHole);this._tryFixBufferStall(W,w)},o._tryFixBufferStall=function(a,s){var e=this.config,t=this.fragmentTracker,i=this.media,T=i.currentTime,_=t.getPartialFragment(T);if(_){var p=this._trySkipBufferHole(_);if(p)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(S.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),p=0;p<_.length;p++){var E=_.start(p);if(i+s.maxBufferHole>=T&&i<E){var g=Math.max(E+y,t.currentTime+A);return H.logger.warn("skipping hole, adjusting currentTime from "+i+" to "+g),this.moved=!0,this.stalled=null,t.currentTime=g,a&&e.trigger(S.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(p)}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(S.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(S.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},d}()},"./src/controller/id3-track-controller.ts":function(ae,L,I){"use strict";I.r(L);var j=I("./src/events.ts"),C=I("./src/utils/texttrack-utils.ts"),S=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 A=R.prototype;return A.destroy=function(){this._unregisterListeners()},A._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)},A._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)},A.onMediaAttached=function(v,d){this.media=d.media},A.onMediaDetaching=function(){if(!this.id3Track)return;Object(C.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},A.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")},A.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=S.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 p=e[_];if(!S.isTimeStampFrame(p)){var E=new a(t,i,"");E.value=p,this.id3Track.addCue(E)}}}}},A.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(ae,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"),S=I("./src/utils/logger.ts");function H(A,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(A,d.key,d)}}function U(A,y,v){return y&&H(A.prototype,y),v&&H(A,v),A}var R=function(){function A(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=A.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++,S.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 p=Math.min(2,Math.max(1,e)),E=Math.round(2/(1+Math.exp(-.75*i-this.edgeStalled))*20)/20;d.playbackRate=Math.min(p,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(A,[{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 p=a,E=1;return _+Math.min(this.stallCount*E,p)}},{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}}]),A}()},"./src/controller/level-controller.ts":function(ae,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"),S=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"),A=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(p){p.loadError=0}),e.prototype.startLoad.call(this)},i.onManifestLoaded=function(_,p){var E=[],g=[],h=[],u,r={},l,f=!1,c=!1,x=!1;if(p.levels.forEach(function(w){var W=w.attrs;f=f||!!(w.width&&w.height),c=c||!!w.videoCodec,x=x||!!w.audioCodec,a&&w.audioCodec&&w.audioCodec.indexOf("mp4a.40.34")!==-1&&(w.audioCodec=void 0);var P=w.bitrate+"-"+w.attrs.RESOLUTION+"-"+w.attrs.CODECS;l=r[P],l?l.url.push(w.url):(l=new j.Level(w),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(w){var W=w.videoCodec,P=w.width,z=w.height;return!!W||!!(P&&z)})),E=E.filter(function(w){var W=w.audioCodec,P=w.videoCodec;return(!W||Object(H.isCodecSupportedInMp4)(W,"audio"))&&(!P||Object(H.isCodecSupportedInMp4)(P,"video"))}),p.audioTracks&&(g=p.audioTracks.filter(function(w){return!w.audioCodec||Object(H.isCodecSupportedInMp4)(w.audioCodec,"audio")}),Object(U.assignTrackIdsByGroup)(g)),p.subtitles&&(h=p.subtitles,Object(U.assignTrackIdsByGroup)(h)),E.length>0){u=E[0].bitrate,E.sort(function(w,W){return w.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 O=x&&!c,B={levels:E,audioTracks:g,subtitleTracks:h,firstLevel:this._firstLevel,stats:p.stats,audio:x,video:c,altAudio:!O&&g.some(function(w){return!!w.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:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:p.url,reason:"no level with compatible codecs found in manifest"})},i.onError=function(_,p){if(e.prototype.onError.call(this,_,p),p.fatal)return;var E=p.context,g=this._levels[this.currentLevelIndex];if(E&&(E.type===A.PlaylistContextType.AUDIO_TRACK&&g.audioGroupIds&&E.groupId===g.audioGroupIds[g.urlId]||E.type===A.PlaylistContextType.SUBTITLE_TRACK&&g.textGroupIds&&E.groupId===g.textGroupIds[g.urlId])){this.redundantFailover(this.currentLevelIndex);return}var h=!1,u=!0,r;switch(p.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:if(p.frag){var l=this._levels[p.frag.level];l?(l.fragmentError++,l.fragmentError>this.hls.config.fragLoadingMaxRetry&&(r=p.frag.level)):r=p.frag.level}break;case S.ErrorDetails.LEVEL_LOAD_ERROR:case S.ErrorDetails.LEVEL_LOAD_TIMEOUT:E&&(E.deliveryDirectives&&(u=!1),r=E.level),h=!0;break;case S.ErrorDetails.REMUX_ALLOC_ERROR:r=p.level,h=!0;break}r!==void 0&&this.recoverLevel(p,r,h,u)},i.recoverLevel=function(_,p,E,g){var h=_.details,u=this._levels[p];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(p);else if(this.manualLevelIndex===-1){var f=p===0?this._levels.length-1:p-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 p=this._levels[_],E=p.url.length;if(E>1){var g=(p.urlId+1)%E;this.warn("Switching to redundant URL-id "+g),this._levels.forEach(function(h){h.urlId=g}),this.level=_}},i.onFragLoaded=function(_,p){var E=p.frag;if(E!==void 0&&E.type===A.PlaylistLevelType.MAIN){var g=this._levels[E.level];g!==void 0&&(g.fragmentError=0,g.loadError=0)}},i.onLevelLoaded=function(_,p){var E,g=p.level,h=p.details,u=this._levels[g];if(!u){var r;this.warn("Invalid level index "+g),(r=p.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,p,u.details)):(E=p.deliveryDirectives)!==null&&E!==void 0&&E.skip&&(h.deltaUpdateFailed=!0)},i.onAudioTrackSwitched=function(_,p){var E=this.hls.levels[this.currentLevelIndex];if(!E)return;if(E.audioGroupIds){for(var g=-1,h=this.hls.audioTracks[p.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 p=this.currentLevelIndex,E=this._levels[p];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 "+p+(_?" at sn "+_.msn+" part "+_.part:"")+" with URL-id "+g+" "+h),this.clearTimer(),this.hls.trigger(C.Events.LEVEL_LOADING,{url:h,level:p,id:g,deliveryDirectives:_||null})}},i.removeLevel=function(_,p){var E=function(u,r){return r!==p},g=this._levels.filter(function(h,u){return u!==_?!0:h.url.length>1&&p!==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 p,E=this._levels;if(E.length===0)return;if(this.currentLevelIndex===_&&(p=E[_])!==null&&p!==void 0&&p.details)return;if(_<0||_>=E.length){var g=_<0;if(this.hls.trigger(C.Events.ERROR,{type:S.ErrorTypes.OTHER_ERROR,details:S.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(ae,L,I){"use strict";I.r(L),I.d(L,"addGroupId",function(){return S}),I.d(L,"assignTrackIdsByGroup",function(){return H}),I.d(L,"updatePTS",function(){return U}),I.d(L,"updateFragPTSDTS",function(){return A}),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 S(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],p=t[T];R(_,p)}function R(t,i){var T=i.startPTS;if(Object(j.isFiniteNumber)(T)){var _=0,p;i.sn>t.sn?(_=T-t.start,p=t):(_=t.start-T,p=i),p.duration!==_&&(p.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 A(t,i,T,_,p,E){var g=_-T;g<=0&&(C.logger.warn("Fragment should have a positive duration",i),_=T+i.duration,E=p+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),p=Math.min(p,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=p,i.endPTS=_,i.minEndPTS=u,i.endDTS=E;var x=i.sn;if(!t||x<t.startSN||x>t.endSN)return 0;var D,O=x-t.startSN,B=t.fragments;for(B[O]=i,D=O;D>0;D--)R(B[D],B[D-1]);for(D=O;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,p=_.length-1;p>=0;p--){var E=_[p].initSegment;if(E){T=E;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var g=0,h;if(d(t,i,function(D,O){D.relurl&&(g=D.cc-O.cc),Object(j.isFiniteNumber)(D.startPTS)&&Object(j.isFiniteNumber)(D.endPTS)&&(O.start=O.startPTS=D.startPTS,O.startDTS=D.startDTS,O.appendedPTS=D.appendedPTS,O.maxStartPTS=D.maxStartPTS,O.endPTS=D.endPTS,O.endDTS=D.endDTS,O.minEndPTS=D.minEndPTS,O.duration=D.endPTS-D.startPTS,O.duration&&(h=O),i.PTSKnown=i.alignedSliding=!0),O.elementaryStreams=D.elementaryStreams,O.loader=D.loader,O.stats=D.stats,O.urlId=D.urlId,D.initSegment&&(O.initSegment=D.initSegment,T=D.initSegment)}),T){var u=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments;u.forEach(function(D){var O;(!D.initSegment||D.initSegment.relurl===((O=T)===null||O===void 0?void 0:O.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,O){O.elementaryStreams=D.elementaryStreams,O.stats=D.stats}),h?A(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,p=0,E=t.length;p<=E;p++){var g=t[p],h=i[p+_];g&&h&&g.index===h.index&&g.fragment.sn===h.fragment.sn?T(g,h):_--}}function d(t,i,T){for(var _=i.skippedSegments,p=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=p;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,p=t.age,E=p>0&&p<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,p),t.availabilityDelay=u,h=u+T-p):h=T-g;return Math.round(h)}function s(t,i,T){if(!t||!t.details)return null;var _=t.details,p=_.fragments[i-_.startSN];return p||(p=_.fragmentHint,p&&p.sn===i?p: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 p=_.length;p--;){var E=_[p];if(E.index===T&&E.fragment.sn===i)return E}return null}},"./src/controller/stream-controller.ts":function(ae,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"),S=I("./src/is-supported.ts"),H=I("./src/events.ts"),U=I("./src/utils/buffer-helper.ts"),R=I("./src/controller/fragment-tracker.ts"),A=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(p,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(p,h.key,h)}}function e(p,E,g){return E&&s(p.prototype,E),g&&s(p,g),p}function t(p,E){p.prototype=Object.create(E.prototype),p.prototype.constructor=p,i(p,E)}function i(p,E){return i=Object.setPrototypeOf||function(h,u){return h.__proto__=u,h},i(p,E)}var T=100,_=function(p){t(E,p);function E(h,u){var r;return r=p.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,p.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(){p.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,O=l.nextLoadLevel;if(f===null||!x&&(this.startFragRequested||!D.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!c||!c[O])return;var B=c[O];this.level=l.nextLoadLevel=O;var w=B.details;if(!w||this.state===C.State.WAITING_LEVEL||w.live&&this.levelLastLoaded!==O){this.state=C.State.WAITING_LEVEL;return}var W=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:x,A.PlaylistLevelType.MAIN);if(W===null)return;var P=W.len,z=this.getMaxBufferLength(B.maxBitrate);if(P>=z)return;if(this._streamEnded(W,w)){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,w);if(this.couldBacktrack&&!this.fragPrevious&&le&&le.sn!=="initSegment"){var be=le.sn-w.startSN;be>1&&(le=w.fragments[be-1],this.fragmentTracker.removeFragment(le))}if(le&&this.fragmentTracker.getState(le)===R.FragmentState.OK&&this.nextLoadPosition>re){var ye=this.audioOnly&&!this.altAudio?y.ElementaryStreamTypes.AUDIO:y.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(x,ye,A.PlaylistLevelType.MAIN),le=this.getNextFragment(this.nextLoadPosition,w)}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,w):this.loadFragment(le,w,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,p.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,A.PlaylistLevelType.MAIN);return r&&"fragment"in r?r.fragment:r},g.getBufferedFrag=function(u){return this.fragmentTracker.getBufferedFrag(u,A.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 O=this.getBufferedFrag(r.currentTime+l);if(O){var B=this.followingBufferedFrag(O);if(B){this.abortCurrentFrag();var w=B.maxStartPTS?B.maxStartPTS:B.start,W=B.duration,P=Math.max(O.end,w+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){p.prototype.flushMainBuffer.call(this,u,r,this.altAudio?"video":null)},g.onMediaAttached=function(u,r){p.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),p.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(S.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 O=this.fragCurrent;O&&(this.state===C.State.FRAG_LOADING||this.state===C.State.FRAG_LOADING_WAITING_RETRY)&&(O.level!==r.level&&O.loader&&(this.state=C.State.IDLE,O.loader.abort()));var B=f[c],w=0;if(x.live||(l=B.details)!==null&&l!==void 0&&l.live){if(x.fragments[0]||(x.deltaUpdateFailed=!0),x.deltaUpdateFailed)return;w=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,w),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],O=D.details;if(!O){this.warn("Dropping fragment "+l.sn+" of level "+l.level+" after level details were reset");return}var B=D.videoCodec,w=O.PTSKnown||!O.live,W=(r=l.initSegment)===null||r===void 0?void 0:r.data,P=this._getAudioCodec(D),z=this.transmuxer=this.transmuxer||new v.default(this.hls,A.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),be=this.initPTS[l.cc];z.push(c,W,P,B,l,f,O.totalduration,w,le,be)},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 O=l[D];if(O.id==="main"){if(c=D,f=O,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!==A.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(A.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,A.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,A.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 O=D.frag,B=D.part,w=D.level,W=c.video,P=c.text,z=c.id3,Q=c.initSegment,re=this.altAudio?void 0:c.audio;if(this.fragContextChanged(O))return;if(this.state=C.State.PARSING,Q){Q.tracks&&(this._bufferInitSegment(w,Q.tracks,O,x),f.trigger(H.Events.FRAG_PARSING_INIT_SEGMENT,{frag:O,id:l,tracks:Q.tracks}));var le=Q.initPTS,be=Q.timescale;Object(j.isFiniteNumber)(le)&&(this.initPTS[O.cc]=le,f.trigger(H.Events.INIT_PTS_FOUND,{frag:O,id:l,initPTS:le,timescale:be}))}if(W&&c.independent!==!1){if(w.details){var ye=W.startPTS,ie=W.endPTS,xe=W.startDTS,Ae=W.endDTS;if(B)B.elementaryStreams[W.type]={startPTS:ye,endPTS:ie,startDTS:xe,endDTS:Ae};else if(W.firstKeyFrame&&W.independent&&(this.couldBacktrack=!0),W.dropped&&W.independent){var fe=this.getLoadPosition()+this.config.maxBufferHole;if(fe<ye){this.backtrack(O);return}O.setElementaryStreamInfo(W.type,O.start,ie,O.start,Ae,!0)}O.setElementaryStreamInfo(W.type,ye,ie,xe,Ae),this.bufferFragmentData(W,O,B,x)}}else if(c.independent===!1){this.backtrack(O);return}if(re){var Z=re.startPTS,Ue=re.endPTS,$e=re.startDTS,tt=re.endDTS;B&&(B.elementaryStreams[y.ElementaryStreamTypes.AUDIO]={startPTS:Z,endPTS:Ue,startDTS:$e,endDTS:tt}),O.setElementaryStreamInfo(y.ElementaryStreamTypes.AUDIO,Z,Ue,$e,tt),this.bufferFragmentData(re,O,B,x)}if(z!=null&&(r=z.samples)!==null&&r!==void 0&&r.length){var Qe={frag:O,id:l,samples:z.samples};f.trigger(H.Events.FRAG_PARSING_METADATA,Qe)}if(P){var it={frag:O,id:l,samples:P.samples};f.trigger(H.Events.FRAG_PARSING_USERDATA,it)}},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,O=r.audiovideo;if(x){var B=u.audioCodec,w=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(B&&(B.indexOf("mp4a.40.5")!==-1?B="mp4a.40.2":B="mp4a.40.5"),x.metadata.channelCount!==1&&w.indexOf("firefox")===-1&&(B="mp4a.40.5")),w.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+"]")),O&&this.log("Init audiovideo buffer, container:"+O.container+", codecs[level/parsed]=["+(u.attrs.CODECS||"")+"/"+O.codec+"]"),this.hls.trigger(H.Events.BUFFER_CODECS,r),Object.keys(r).forEach(function(W){var P=r[W],z=P.initSegment;z!=null&&z.byteLength&&c.hls.trigger(H.Events.BUFFER_APPENDING,{type:W,data:z,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(ae,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"),S=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"),A=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 p=T[_];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}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(p,E){return p.__proto__=E,p},s(i,T)}var e=500,t=function(i){a(T,i);function T(p,E){var g;return g=i.call(this,p,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 O=0;O<D.length;){if(D[O].end<=x){D.shift();continue}else if(D[O].start<x)D[O].start=x;else break;O++}}),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 O=this.alignPlaylists(u,c.details);O===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=S.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,f.currentTime-r,l.maxBufferHole),x=c.end,D=c.len,O=this.getMaxBufferLength()+r;if(D>O)return;console.assert(u,"Subtitle track details are defined on idle subtitle stream controller tick");var B=u.fragments,w=B.length,W=u.edge,P,z=this.fragPrevious;if(x<W){var Q=l.maxFragLookUpTolerance;z&&u.hasProgramDateTime&&(P=Object(H.findFragmentByPDT)(B,z.endProgramDateTime,Q)),P||(P=Object(H.findFragmentByPTS)(z,B,x,Q),!P&&z&&z.start<B[0].start&&(P=B[0]))}else P=B[w-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)===A.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(ae,L,I){"use strict";I.r(L);var j=I("./src/events.ts"),C=I("./src/utils/texttrack-utils.ts"),S=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 A(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){A(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,p=this.tracksInGroup[_];if(!p){this.warn("Invalid subtitle track id "+i);return}var E=p.details;p.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 p=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),p!==-1&&this.setSubtitleTrack(p,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(p){this.warn("Could not construct new URL with HLS Delivery Directives: "+p)}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 p=d(i.textTracks),E=p.filter(function(u){return u.groupId===t.groupId});if(e===-1)[].slice.call(p).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 p=_.id,E=_.groupId,g=E===void 0?"":E,h=_.name,u=_.type,r=_.url;this.hls.trigger(j.Events.SUBTITLE_TRACK_SWITCH,{id:p,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}(S.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(ae,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"),S=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"),A=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"),p=new H.default(this,"textTrack4");this.cea608Parser1=new S.default(1,i,T),this.cea608Parser2=new S.default(3,_,p)}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,_,p,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,_,p)}else{var f=this.Cues.newCue(null,T,_,p);this.hls.trigger(C.Events.CUES_PARSED,{type:"captions",cues:f,track:i})}},e.onInitPtsFound=function(i,T){var _=this,p=T.frag,E=T.id,g=T.initPTS,h=T.timescale,u=this.unparsedVttFrags;E==="main"&&(this.initPTS[p.cc]=g,this.timescale[p.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 p=T.textTracks[_];if(p[i])return p}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,p=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],p);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,p={_id:i,label:_,kind:"captions",default:T.media?!!T.media.default:!1,closedCaptions:T.media};this.nonNativeCaptionsTracks[i]=p,this.hls.trigger(C.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[p]})},e.createTextTrack=function(i,T,_){var p=this.media;return p?p.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 p=T.subtitleTracks||[],E=p.some(function(r){return r.textCodec===A.IMSC1_CODEC});if(this.config.enableWebVTT||E&&this.config.enableIMSC1){var g=this.tracks&&p&&this.tracks.length===p.length;if(this.tracks=p||[],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(p){var E=/(?:CC|SERVICE)([1-4])/.exec(p.instreamId);if(!E)return;var g="textTrack"+E[1],h=_.captionsProperties[g];if(!h)return;h.label=p.name,p.lang&&(h.languageCode=p.lang),h.media=p})},e.onFragLoading=function(i,T){var _=this.cea608Parser1,p=this.cea608Parser2,E=this.lastSn,g=this.lastPartIndex;if(!this.enabled||!(_&&p))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(),p.reset()),this.lastSn=r,this.lastPartIndex=l}},e.onFragLoaded=function(i,T){var _=T.frag,p=T.payload,E=this.initPTS,g=this.unparsedVttFrags;if(_.type===y.PlaylistLevelType.SUBTITLE)if(p.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===A.IMSC1_CODEC?this._parseIMSC1(_,p):this._parseVTTs(_,p,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,p=this.hls;Object(A.parseIMSC1)(T,this.initPTS[i.cc],this.timescale[i.cc],function(E){_._appendCues(E,i.level),p.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})},function(E){v.logger.log("Failed to parse IMSC1: "+E),p.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:E})})},e._parseVTTs=function(i,T,_){var p=this,E=this.hls;Object(U.parseWebVTT)(T,this.initPTS[i.cc],this.timescale[i.cc],_,i.cc,i.start,function(g){p._appendCues(g,i.level),E.trigger(C.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})},function(g){p._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,p=this.tracks[i.level];p.textCodec||Object(A.parseIMSC1)(T,this.initPTS[i.cc],this.timescale[i.cc],function(){p.textCodec=A.IMSC1_CODEC,_._parseIMSC1(i,T)},function(){p.textCodec="wvtt"})},e._appendCues=function(i,T){var _=this.hls;if(this.config.renderTextTracksNatively){var p=this.textTracks[T];if(p.mode==="disabled")return;i.forEach(function(h){return Object(R.addCueToTrack)(p,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,p=this.cea608Parser2;if(!this.enabled||!(_&&p))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]),p.addData(T.samples[E].pts,h[1])}}},e.onBufferFlushing=function(i,T){var _=T.startOffset,p=T.endOffset,E=T.endOffsetSubtitles,g=T.type,h=this.media;if(!h||h.currentTime<p)return;if(!g||g==="video"){var u=this.captionsTracks;Object.keys(u).forEach(function(l){return Object(R.removeCuesInRange)(u[l],_,p)})}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,p=[[],[]],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)&&(p[l].push(h),p[l].push(u)))}return p},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(ae,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 S=C.prototype;return S.decrypt=function(U,R){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},R,U)},C}()},"./src/crypt/aes-decryptor.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"removePadding",function(){return C}),I.d(L,"default",function(){return S});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 S=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(A){for(var y=new DataView(A),v=new Uint32Array(4),d=0;d<4;d++)v[d]=y.getUint32(d*4);return v},U.initTable=function(){var A=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),p=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,A[p]=h,y[h]=p;var u=_[p],r=_[u],l=_[r],f=_[h]*257^h*16843008;d[p]=f<<24|f>>>8,o[p]=f<<16|f>>>16,n[p]=f<<8|f>>>24,a[p]=f,f=l*16843009^r*65537^u*257^p*16843008,e[h]=f<<24|f>>>8,t[h]=f<<16|f>>>16,i[h]=f<<8|f>>>24,T[h]=f,p?(p=u^_[_[_[l^u]]],E^=_[_[E]]):p=E=1}},U.expandKey=function(A){for(var y=this.uint8ArrayToUint32Array_(A),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,p=_[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]=p[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(A){return A<<24|(A&65280)<<8|(A&16711680)>>8|A>>>24},U.decrypt=function(A,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],p=T[1],E=T[2],g=T[3],h=new Int32Array(A),u=new Int32Array(h.length),r,l,f,c,x,D,O,B,w,W,P,z,Q,re,le=this.networkToHostOrderSwap;y<h.length;){for(w=le(h[y]),W=le(h[y+1]),P=le(h[y+2]),z=le(h[y+3]),x=w^o[0],D=z^o[1],O=P^o[2],B=W^o[3],Q=4,re=1;re<d;re++)r=s[x>>>24]^e[D>>16&255]^t[O>>8&255]^i[B&255]^o[Q],l=s[D>>>24]^e[O>>16&255]^t[B>>8&255]^i[x&255]^o[Q+1],f=s[O>>>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[O&255]^o[Q+3],x=r,D=l,O=f,B=c,Q=Q+4;r=n[x>>>24]<<24^n[D>>16&255]<<16^n[O>>8&255]<<8^n[B&255]^o[Q],l=n[D>>>24]<<24^n[O>>16&255]<<16^n[B>>8&255]<<8^n[x&255]^o[Q+1],f=n[O>>>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[O&255]^o[Q+3],u[y]=le(r^_),u[y+1]=le(c^p),u[y+2]=le(f^E),u[y+3]=le(l^g),_=w,p=W,E=P,g=z,y=y+4}return u.buffer},H}()},"./src/crypt/decrypter.ts":function(ae,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"),S=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"),A=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(S.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 S.default),_.expandKey(a);var p=t;return this.currentResult=_.decrypt(T.buffer,0,s),this.currentIV=Object(R.sliceUint8)(T,-16).buffer,p||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%A;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(ae,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 S=C.prototype;return S.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},C}()},"./src/demux/aacdemuxer.ts":function(ae,L,I){"use strict";I.r(L);var j=I("./src/demux/base-audio-demuxer.ts"),C=I("./src/demux/adts.ts"),S=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 A=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 S.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);A.minProbeByteLength=9,L.default=A},"./src/demux/adts.ts":function(ae,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 A}),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"),S=I("./src/events.ts");function H(t,i,T,_){var p,E,g,h,u=navigator.userAgent.toLowerCase(),r=_,l=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];p=((i[T+2]&192)>>>6)+1;var f=(i[T+2]&60)>>>2;if(f>l.length-1){t.trigger(S.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:"+p+", samplingIndex:"+f),/firefox/i.test(u)?f>=6?(p=5,h=new Array(4),E=f-3):(p=2,h=new Array(2),E=f):u.indexOf("android")!==-1?(p=2,h=new Array(2),E=f):(p=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)&&(p=2,h=new Array(2)),E=f)),h[0]=p<<3,h[0]|=(f&14)>>1,h[1]|=(f&1)<<7,h[1]|=g<<3,p===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."+p,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 A(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)&&A(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 _=A(t,i);if(_<=T)return!1;var p=i+_;return p===t.length||v(t,p)}return!1}function n(t,i,T,_,p){if(!t.samplerate){var E=H(i,T,_,p);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,_,p){var E=R(t,i),g=A(t,i);if(g-=E,g>0){var h=T+_*p;return{headerLength:E,frameLength:g,stamp:h}}}function e(t,i,T,_,p){var E=a(t.samplerate),g=s(i,T,_,p,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(ae,L,I){"use strict";I.r(L),I.d(L,"initPTSFn",function(){return A});var j=I("./src/polyfills/number.ts"),C=I("./src/demux/id3.ts"),S=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,p=o.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=A(_,n)),a&&a.length>0&&T.samples.push({pts:this.initPTS,dts:this.initPTS,data:a}),t=this.initPTS;s<p;){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=p}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===p&&e!==p){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(S.dummyTrack)(),id3Track:T,textTrack:Object(S.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(S.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(S.dummyTrack)()}},v.destroy=function(){},y}(),A=function(v,d){return Object(j.isFiniteNumber)(v)?v*90:d*9e4};L.default=R},"./src/demux/chunk-cache.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"default",function(){return j});var j=function(){function S(){this.chunks=[],this.dataLength=0}var H=S.prototype;return H.push=function(R){this.chunks.push(R),this.dataLength+=R.length},H.flush=function(){var R=this.chunks,A=this.dataLength,y;if(R.length)R.length===1?y=R[0]:y=C(R,A);else return new Uint8Array(0);return this.reset(),y},H.reset=function(){this.chunks.length=0,this.dataLength=0},S}();function C(S,H){for(var U=new Uint8Array(H),R=0,A=0;A<S.length;A++){var y=S[A];U.set(y,R),R+=y.length}return U}},"./src/demux/dummy-demuxed-track.ts":function(ae,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(ae,L,I){"use strict";I.r(L);var j=I("./src/utils/logger.ts"),C=function(){function S(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=S.prototype;return H.loadWord=function(){var R=this.data,A=this.bytesAvailable,y=R.byteLength-A,v=new Uint8Array(4),d=Math.min(4,A);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 A;this.bitsAvailable>R?(this.word<<=R,this.bitsAvailable-=R):(R-=this.bitsAvailable,A=R>>3,R-=A>>3,this.bytesAvailable-=A,this.loadWord(),this.word<<=R,this.bitsAvailable-=R)},H.readBits=function(R){var A=Math.min(this.bitsAvailable,R),y=this.word>>>32-A;return R>32&&j.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=A,this.bitsAvailable>0?this.word<<=A:this.bytesAvailable>0&&this.loadWord(),A=R-A,A>0&&this.bitsAvailable?y<<A|this.readBits(A):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 A=8,y=8,v,d=0;d<R;d++)y!==0&&(v=this.readEG(),y=(A+v+256)%256),A=y===0?A:y},H.readSPS=function(){var R=0,A=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),p=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?p(16):p(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(),A=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-A*2),height:(2-l)*(r+1)*16-(l?2:4)*(y+v),pixelRatio:f}},H.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},S}();L.default=C},"./src/demux/id3.ts":function(ae,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 S}),I.d(L,"canParse",function(){return U}),I.d(L,"getTimeStamp",function(){return R}),I.d(L,"isTimeStampFrame",function(){return A}),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(p,E){return E+10<=p.length&&(p[E]===73&&p[E+1]===68&&p[E+2]===51&&(p[E+3]<255&&p[E+4]<255&&(p[E+6]<128&&p[E+7]<128&&p[E+8]<128&&p[E+9]<128)))},C=function(p,E){return E+10<=p.length&&(p[E]===51&&p[E+1]===68&&p[E+2]===73&&(p[E+3]<255&&p[E+4]<255&&(p[E+6]<128&&p[E+7]<128&&p[E+8]<128&&p[E+9]<128)))},S=function(p,E){for(var g=E,h=0;j(p,E);){h+=10;var u=H(p,E+6);h+=u,C(p,E+10)&&(h+=10),E+=h}return h>0?p.subarray(g,g+h):void 0},H=function(p,E){var g=0;return g=(p[E]&127)<<21,g|=(p[E+1]&127)<<14,g|=(p[E+2]&127)<<7,g|=p[E+3]&127,g},U=function(p,E){return j(p,E)&&H(p,E+6)+10<=p.length-E},R=function(p){for(var E=v(p),g=0;g<E.length;g++){var h=E[g];if(A(h))return s(h)}return},A=function(p){return p&&p.key==="PRIV"&&p.info==="com.apple.streaming.transportStreamTimestamp"},y=function(p){var E=String.fromCharCode(p[0],p[1],p[2],p[3]),g=H(p,4),h=10;return{type:E,size:g,data:p.subarray(h,h+g)}},v=function(p){for(var E=0,g=[];j(p,E);){var h=H(p,E+6);E+=10;for(var u=E+h;E+8<u;){var r=y(p.subarray(E)),l=d(r);l&&g.push(l),E+=r.size+10}C(p,E)&&(E+=10)}return g},d=function(p){return p.type==="PRIV"?o(p):p.type[0]==="W"?a(p):n(p)},o=function(p){if(p.size<2)return;var E=e(p.data,!0),g=new Uint8Array(p.data.subarray(E.length+1));return{key:p.type,info:E,data:g.buffer}},n=function(p){if(p.size<2)return;if(p.type==="TXXX"){var E=1,g=e(p.data.subarray(E),!0);E+=g.length+1;var h=e(p.data.subarray(E));return{key:p.type,info:g,data:h}}var u=e(p.data.subarray(1));return{key:p.type,data:u}},a=function(p){if(p.type==="WXXX"){if(p.size<2)return;var E=1,g=e(p.data.subarray(E),!0);E+=g.length+1;var h=e(p.data.subarray(E));return{key:p.type,info:g,data:h}}var u=e(p.data);return{key:p.type,data:u}},s=function(p){if(p.data.byteLength===8){var E=new Uint8Array(p.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(p,E){E===void 0&&(E=!1);var g=T();if(g){var h=g.decode(p);if(E){var u=h.indexOf("\0");return u!==-1?h.substring(0,u):h}return h.replace(/\0/g,"")}for(var r=p.length,l,f,c,x="",D=0;D<r;){if(l=p[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=p[D++],x+=String.fromCharCode((l&31)<<6|f&63);break;case 14:f=p[D++],c=p[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(ae,L,I){"use strict";I.r(L);var j=I("./src/demux/base-audio-demuxer.ts"),C=I("./src/demux/id3.ts"),S=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 A=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 S.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);A.minProbeByteLength=4,L.default=A},"./src/demux/mp4demuxer.ts":function(ae,L,I){"use strict";I.r(L);var j=I("./src/utils/mp4-tools.ts"),C=I("./src/demux/dummy-demuxed-track.ts"),S=function(){function H(R,A){this.remainderData=null,this.config=void 0,this.config=A}var U=H.prototype;return U.resetTimeStamp=function(){},U.resetInitSegment=function(){},U.resetContiguity=function(){},H.probe=function(A){return Object(j.findBox)({data:A,start:0,end:Math.min(A.length,16384)},["moof"]).length>0},U.demux=function(A){var y=A,v=Object(C.dummyTrack)();if(this.config.progressive){this.remainderData&&(y=Object(j.appendUint8Array)(this.remainderData,A));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 A=Object(C.dummyTrack)();return A.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(C.dummyTrack)(),avcTrack:A,id3Track:Object(C.dummyTrack)(),textTrack:Object(C.dummyTrack)()}},U.demuxSampleAes=function(A,y,v){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},U.destroy=function(){},H}();S.minProbeByteLength=1024,L.default=S},"./src/demux/mpegaudio.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"appendFrame",function(){return R}),I.d(L,"parseHeader",function(){return A}),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],S=[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=A(a,s);if(i&&s+i.frameLength<=a.length){var T=i.samplesPerFrame*9e4/i.sampleRate,_=e+t*T,p={unit:a.subarray(s,s+i.frameLength),pts:_,dts:_};return n.config=[],n.channelCount=i.channelCount,n.samplerate=i.sampleRate,n.samples.push(p),{sample:p,length:i.frameLength,missing:0}}}function A(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,p=s===3?3-e:e===3?3:4,E=C[p*14+t-1]*1e3,g=s===3?0:s===2?1:2,h=S[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 O=!!j&&j<=87;return O&&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=A(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(ae,L,I){"use strict";I.r(L);var j=I("./src/crypt/decrypter.ts"),C=I("./src/demux/tsdemuxer.ts"),S=function(){function H(R,A,y){this.keyData=void 0,this.decrypter=void 0,this.keyData=y,this.decrypter=new j.default(R,A,{removePKCS7Padding:!1})}var U=H.prototype;return U.decryptBuffer=function(A,y){this.decrypter.decrypt(A,this.keyData.key.buffer,this.keyData.iv.buffer,y)},U.decryptAacSample=function(A,y,v,d){var o=A[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(A,y+1,v)})},U.decryptAacSamples=function(A,y,v){for(;;y++){if(y>=A.length){v();return}if(A[y].unit.length<32)continue;var d=this.decrypter.isSync();if(this.decryptAacSample(A,y,v,d),!d)return}},U.getAvcEncryptedData=function(A){for(var y=Math.floor((A.length-48)/160)*16+16,v=new Int8Array(y),d=0,o=32;o<=A.length-16;o+=160,d+=16)v.set(A.subarray(o,o+16),d);return v},U.getAvcDecryptedUnit=function(A,y){for(var v=new Uint8Array(y),d=0,o=32;o<=A.length-16;o+=160,d+=16)A.set(v.subarray(d,d+16),o);return A},U.decryptAvcSample=function(A,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(A,y,v+1,d)})},U.decryptAvcSamples=function(A,y,v,d){if(A instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;y++,v=0){if(y>=A.length){d();return}for(var o=A[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(A,y,v,d,n,a),!a)return}}},H}();L.default=S},"./src/demux/transmuxer-interface.ts":function(ae,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),S=I("./src/events.ts"),H=I("./src/demux/transmuxer.ts"),U=I("./src/utils/logger.ts"),R=I("./src/errors.ts"),A=I("./src/utils/mediasource-helper.ts"),y=I("./node_modules/eventemitter3/index.js"),v=I.n(y),d=Object(A.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,p=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(S.Events.FRAG_DECRYPTED,p),this.observer.on(S.Events.ERROR,p);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(S.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,_,p,E,g,h,u){var r=this;h.transmuxing.start=self.performance.now();var l=this.transmuxer,f=this.worker,c=p?p.start:_.start,x=_.decryptdata,D=this.frag,O=!(D&&_.cc===D.cc),B=!(D&&h.level===D.level),w=D?h.sn-D.sn:-1,W=this.part?h.part-this.part.index:1,P=!B&&(w===1||w===0&&W===1),z=self.performance.now();(B||w||_.stats.parsing.start===0)&&(_.stats.parsing.start=z),p&&(W||!P)&&(p.stats.parsing.start=z);var Q=new H.TransmuxState(O,P,g,B,c);if(!P||O){U.logger.log("[transmuxer-interface, "+_.type+"]: Starting new transmux session for sn: "+h.sn+" p: "+h.part+" level: "+h.level+" id: "+h.id+`
|
|
discontinuity: `+O+`
|
|
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=p,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(be){r.handleTransmuxComplete(be)}):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(p){t.handleFlushResult(p,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(ae,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"),S=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(S.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(p){A(o,p)}):A(o,i);break}case"flush":{var T=e.chunkMeta,_=o.transmuxer.flush(T);Object(j.isPromise)(_)?_.then(function(p){v(o,p,T)}):v(o,_,T);break}default:break}})}function A(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){A(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(ae,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 p}),I.d(L,"TransmuxState",function(){return E});var j=I("./src/events.ts"),C=I("./src/errors.ts"),S=I("./src/crypt/decrypter.ts"),H=I("./src/demux/aacdemuxer.ts"),U=I("./src/demux/mp4demuxer.ts"),R=I("./src/demux/tsdemuxer.ts"),A=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:A.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 O=new Uint8Array(r),B=this.cache,w=this.config,W=this.currentTransmuxState,P=this.transmuxConfig;c&&(this.currentTransmuxState=c);var z=i(O,l);if(z&&z.method==="AES-128"){var Q=this.getDecrypter();if(w.enableSoftwareAES){var re=Q.softwareDecrypt(O,z.key.buffer,z.iv.buffer);if(!re)return D.executeEnd=a(),T(f);O=new Uint8Array(re)}else return this.decryptionPromise=Q.webCryptoDecrypt(O,z.key.buffer,z.iv.buffer).then(function(We){var Je=x.push(We,null,f);return x.decryptionPromise=null,Je}),this.decryptionPromise}var le=c||W,be=le.contiguous,ye=le.discontinuity,ie=le.trackSwitch,xe=le.accurateTimeOffset,Ae=le.timeOffset,fe=P.audioCodec,Z=P.videoCodec,Ue=P.defaultInitPts,$e=P.duration,tt=P.initSegmentData;if((ye||ie)&&this.resetInitSegment(tt,fe,Z,$e),ye&&this.resetInitialTimestamp(Ue),be||this.resetContiguity(),this.needsProbing(O,ye,ie)){if(B.dataLength){var Qe=B.flush();O=Object(o.appendUint8Array)(Qe,O)}this.configureTransmuxer(O,P)}var it=this.transmux(O,z,Ae,xe,f),Pe=this.currentTransmuxState;return Pe.contiguous=!0,Pe.discontinuity=!1,Pe.trackSwitch=!1,D.executeEnd=a(),it},h.flush=function(r){var l=this,f=r.transmuxing;f.executeStart=a();var c=this.decrypter,x=this.cache,D=this.currentTransmuxState,O=this.decryptionPromise;if(O)return O.then(function(){return l.flush(r)});var B=[],w=D.timeOffset;if(c){var W=c.flush();W&&B.push(this.push(W,null,r))}var P=x.dataLength;x.reset();var z=this.demuxer,Q=this.remuxer;if(!z||!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=z.flush(w);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,O=l.textTrack,B=this.currentTransmuxState,w=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,O,W,w,!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,O=x.avcTrack,B=x.id3Track,w=x.textTrack,W=this.remuxer.remux(D,O,B,w,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(O){var B=D.remuxer.remux(O.audioTrack,O.avcTrack,O.id3Track,O.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,O=l.audioCodec,B=l.defaultInitPts,w=l.duration,W=l.initSegmentData,P=l.videoCodec,z,Q=0,re=s.length;Q<re;Q++)if(s[Q].demux.probe(r)){z=s[Q];break}z||(n.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),z={demux:U.default,remux:v.default});var le=this.demuxer,be=this.remuxer,ye=z.remux,ie=z.demux;(!be||!(be instanceof ye))&&(this.remuxer=new ye(c,f,x,D)),(!le||!(le instanceof ie))&&(this.demuxer=new ie(c,f,x),this.probe=ie.probe),this.resetInitSegment(W,O,P,w),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 S.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 p=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(ae,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"),S=I("./src/demux/exp-golomb.ts"),H=I("./src/demux/id3.ts"),U=I("./src/demux/sample-aes.ts"),R=I("./src/events.ts"),A=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 p=_.prototype;return p.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},p.resetTimeStamp=function(){},p.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},p.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,O=f.pesData,B=c.pid,w=x.pid,W=c.pesData,P=x.pesData,z=!1,Q=this.pmtParsed,re=this._pmtId,le=g.length;if(this.remainderData&&(g=Object(A.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 be=Math.max(0,_.syncOffset(g));le-=(le+be)%188,le<g.byteLength&&!r&&(this.remainderData=new Uint8Array(g.buffer,le,g.buffer.byteLength-le));for(var ye=be;ye<le;ye+=188)if(g[ye]===71){var ie=!!(g[ye+1]&64),xe=((g[ye+1]&31)<<8)+g[ye+2],Ae=(g[ye+3]&48)>>4,fe=void 0;if(Ae>1){if(fe=ye+5+g[ye+4],fe===ye+188)continue}else fe=ye+4;switch(xe){case D:ie&&(O&&(l=e(O))&&this.parseAVCPES(l,!1),O={data:[],size:0}),O&&(O.data.push(g.subarray(fe,ye+188)),O.size+=ye+188-fe);break;case B:ie&&(W&&(l=e(W))&&(c.isAAC?this.parseAACPES(l):this.parseMPEGPES(l)),W={data:[],size:0}),W&&(W.data.push(g.subarray(fe,ye+188)),W.size+=ye+188-fe);break;case w:ie&&(P&&(l=e(P))&&this.parseID3PES(l),P={data:[],size:0}),P&&(P.data.push(g.subarray(fe,ye+188)),P.size+=ye+188-fe);break;case 0:ie&&(fe+=g[fe]+1),re=this._pmtId=a(g,fe);break;case re:{ie&&(fe+=g[fe]+1);var Z=s(g,fe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,u);D=Z.avc,D>0&&(f.pid=D),B=Z.audio,B>0&&(c.pid=B,c.isAAC=Z.isAAC),w=Z.id3,w>0&&(x.pid=w),z&&!Q&&(y.logger.log("reparse from beginning"),z=!1,ye=be-188),Q=this.pmtParsed=!0;break}case 17:case 8191:break;default:z=!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=O,c.pesData=W,x.pesData=P;var Ue={audioTrack:c,avcTrack:f,id3Track:x,textTrack:this._txtTrack};return r&&this.extractRemainingSamples(Ue),Ue},p.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},p.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},p.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)},p.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)})})},p.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},p.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(O){switch(O.type){case 1:{x=!0,c||(c=u.avcSample=n(!0,g.pts,g.dts,"")),f&&(c.debug+="NDR "),c.frame=!0;var B=O.data;if(D&&B.length>4){var w=new S.default(B).readSliceType();(w===2||w===4||w===7||w===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 S.default(T(O.data));W.readUByte();for(var P=0,z=0,Q=!1,re=0;!Q&&W.bytesAvailable>1;){P=0;do re=W.readUByte(),P+=re;while(re===255);z=0;do re=W.readUByte(),z+=re;while(re===255);if(P===4&&W.bytesAvailable!==0){Q=!0;var le=W.readUByte();if(le===181){var be=W.readUShort();if(be===49){var ye=W.readUInt();if(ye===1195456820){var ie=W.readUByte();if(ie===3){for(var xe=W.readUByte(),Ae=W.readUByte(),fe=31&xe,Z=[xe,Ae],Ue=0;Ue<fe;Ue++)Z.push(W.readUByte()),Z.push(W.readUByte()),Z.push(W.readUByte());i(u._txtTrack.samples,{type:3,pts:g.pts,bytes:Z})}}}}}else if(P===5&&W.bytesAvailable!==0){if(Q=!0,z>16){for(var $e=[],tt=0;tt<16;tt++)$e.push(W.readUByte().toString(16)),(tt===3||tt===5||tt===7||tt===9)&&$e.push("-");for(var Qe=z-16,it=new Uint8Array(Qe),Pe=0;Pe<Qe;Pe++)it[Pe]=W.readUByte();i(u._txtTrack.samples,{pts:g.pts,payloadType:P,uuid:$e.join(""),userData:Object(H.utf8ArrayToStr)(it),userDataBytes:it})}}else if(z<W.bytesAvailable)for(var We=0;We<z;We++)W.readUByte()}break}case 7:if(x=!0,D=!0,f&&c&&(c.debug+="SPS "),!r.sps){var Je=new S.default(O.data),et=Je.readSPS();r.width=et.width,r.height=et.height,r.pixelRatio=et.pixelRatio,r.sps=[O.data],r.duration=u._duration;for(var Ye=O.data.subarray(1,4),ze="avc1.",He=0;He<3;He++){var ft=Ye[He].toString(16);ft.length<2&&(ft="0"+ft),ze+=ft}r.codec=ze}break;case 8:x=!0,f&&c&&(c.debug+="PPS "),r.pps||(r.pps=[O.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 "+O.type+" ");break}if(c&&x){var ht=c.units;ht.push(O)}}),h&&c&&(t(c,r),this.avcSample=null)},p.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},p.parseAVCNALu=function(g){var h=g.byteLength,u=this._avcTrack,r=u.naluState||0,l=r,f=[],c=0,x,D,O,B=-1,w=0;for(r===-1&&(B=0,w=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:w};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 z=new Uint8Array(P.data.byteLength+D);z.set(P.data,0),z.set(g.subarray(0,D),P.data.byteLength),P.data=z,P.state=0}}c<h?(O=g[c]&31,B=c,w=O,r=0):r=-1}else r=0}if(B>=0&&r>=0){var Q={data:g.subarray(B,h),type:w,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},p.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,O;for(D=h,O=l.length;D<O-1&&!j.isHeader(l,D);D++);if(D!==h){var B,w;if(D<O-1?(B="AAC PES did not start with ADTS header,offset:"+D,w=!1):(B="no ADTS header found in AAC PES",w=!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:w,reason:B}),w)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 z=0;D<O;)if(j.isHeader(l,D)){if(D+5<O){var Q=j.appendFrame(u,l,D,W,z);if(Q)if(Q.missing)this.aacOverFlow=Q;else{D+=Q.length,z++;continue}}break}else D++},p.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++},p.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(_,p,E,g){return{key:_,frame:!1,pts:p,dts:E,units:[],debug:g,length:0}}function a(_,p){return(_[p+10]&31)<<8|_[p+11]}function s(_,p,E,g){var h={audio:-1,avc:-1,id3:-1,isAAC:!0},u=(_[p+1]&15)<<8|_[p+2],r=p+3+u-4,l=(_[p+10]&15)<<8|_[p+11];for(p+=12+l;p<r;){var f=(_[p+1]&31)<<8|_[p+2];switch(_[p]){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}p+=((_[p+3]&15)<<8|_[p+4])+5}return h}function e(_){var p=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 O=new Uint8Array(_.size),B=0,w=l.length;B<w;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;O.set(E,p),p+=W}return g&&(g-=h+3),{data:O,pts:u,dts:r,len:g}}return null}function t(_,p){if(_.units.length&&_.frame){if(_.pts===void 0){var E=p.samples,g=E.length;if(g){var h=E[g-1];_.pts=h.pts,_.dts=h.dts}else{p.dropped++;return}}p.samples.push(_)}_.debug.length&&y.logger.log(_.pts+"/"+_.dts+":"+_.debug)}function i(_,p){var E=_.length;if(E>0){if(p.pts>=_[E-1].pts)_.push(p);else for(var g=E-1;g>=0;g--)if(p.pts<_[g].pts){_.splice(g,0,p);break}}else _.push(p)}function T(_){for(var p=_.byteLength,E=[],g=1;g<p-2;)_[g]===0&&_[g+1]===0&&_[g+2]===3?(E.push(g+2),g+=2):g++;if(E.length===0)return _;var h=p-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(ae,L,I){"use strict";I.r(L),I.d(L,"ErrorTypes",function(){return j}),I.d(L,"ErrorDetails",function(){return C});var j;(function(S){S.NETWORK_ERROR="networkError",S.MEDIA_ERROR="mediaError",S.KEY_SYSTEM_ERROR="keySystemError",S.MUX_ERROR="muxError",S.OTHER_ERROR="otherError"})(j||(j={}));var C;(function(S){S.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",S.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",S.KEY_SYSTEM_NO_SESSION="keySystemNoSession",S.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",S.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",S.MANIFEST_LOAD_ERROR="manifestLoadError",S.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",S.MANIFEST_PARSING_ERROR="manifestParsingError",S.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",S.LEVEL_EMPTY_ERROR="levelEmptyError",S.LEVEL_LOAD_ERROR="levelLoadError",S.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",S.LEVEL_SWITCH_ERROR="levelSwitchError",S.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",S.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",S.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",S.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",S.FRAG_LOAD_ERROR="fragLoadError",S.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",S.FRAG_DECRYPT_ERROR="fragDecryptError",S.FRAG_PARSING_ERROR="fragParsingError",S.REMUX_ALLOC_ERROR="remuxAllocError",S.KEY_LOAD_ERROR="keyLoadError",S.KEY_LOAD_TIMEOUT="keyLoadTimeOut",S.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",S.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",S.BUFFER_APPEND_ERROR="bufferAppendError",S.BUFFER_APPENDING_ERROR="bufferAppendingError",S.BUFFER_STALLED_ERROR="bufferStalledError",S.BUFFER_FULL_ERROR="bufferFullError",S.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",S.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",S.INTERNAL_EXCEPTION="internalException",S.INTERNAL_ABORTED="aborted",S.UNKNOWN="unknown"})(C||(C={}))},"./src/events.ts":function(ae,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(ae,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),S=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"),A=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(p,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(p,h.key,h)}}function T(p,E,g){return E&&i(p.prototype,E),g&&i(p,g),p}var _=function(){p.isSupported=function(){return Object(d.isSupported)()};function p(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)(p.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),O=new f(this),B=new S.default(this),w=new H.default(this),W=new U.default(this),P=this.levelController=new A.default(this),z=new y.FragmentTracker(this),Q=this.streamController=new v.default(this,z);D.setStreamController(Q),O.setStreamController(Q);var re=[P,Q];this.networkControllers=re;var le=[B,w,c,x,D,O,W,z];this.audioTrackController=this.createController(h.audioTrackController,null,re),this.createController(h.audioStreamController,z,re),this.subtitleTrackController=this.createController(h.subtitleTrackController,null,re),this.createController(h.subtitleStreamController,z,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=p.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(p,[{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 p.defaultConfig?p.defaultConfig:n.hlsDefaultConfig},set:function(h){p.defaultConfig=h}}]),p}();_.defaultConfig=void 0},"./src/is-supported.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"isSupported",function(){return S}),I.d(L,"changeTypeSupported",function(){return H});var j=I("./src/utils/mediasource-helper.ts");function C(){return self.SourceBuffer||self.WebKitSourceBuffer}function S(){var U=Object(j.getMediaSource)();if(!U)return!1;var R=C(),A=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!!A&&!!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(ae,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 S(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||!A(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,_,p){var E=[null];E.push.apply(E,_);var g=Function.bind.apply(T,E),h=new g;return p&&y(h,p.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 A(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,p=i.url;if(!p)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 "+(p?"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,O,B,w){_.resetLoader(i,l),u({frag:i,part:null,payload:D.data,networkDetails:w})},onError:function(D,O,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,O,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,O,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,O,B,w){T&&T({frag:i,part:null,payload:B,networkDetails:w})}})})},e.loadPart=function(i,T,_){var p=this;this.abort();var E=this.config,g=E.fLoader,h=E.loader;return new Promise(function(u,r){p.loader&&p.loader.destroy();var l=p.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,O,B,w){p.resetLoader(i,l),p.updateStatsFromPart(i,T);var W={frag:i,part:T,payload:D.data,networkDetails:w};_(W),u(W)},onError:function(D,O,B){p.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,O,B){i.stats.aborted=T.stats.aborted,p.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,O,B){p.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,p=T.stats,E=p.total;if(_.loaded+=p.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=p.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){S(e,s);function e(t){for(var i,T=arguments.length,_=new Array(T>1?T-1:0),p=1;p<T;p++)_[p-1]=arguments[p];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(ae,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"),S=I.n(C),H=I("./src/utils/logger.ts"),U=I("./src/loader/level-key.ts"),R=I("./src/loader/load-stats.ts");function A(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 p=T.split("@",2),E=[];p.length===1?E[0]=_?_.byteRangeEndOffset:0:E[0]=parseInt(p[1]),E[1]=parseInt(p[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){A(t,e);function t(T,_){var p;return p=e.call(this,_)||this,p._decryptdata=null,p.rawProgramDateTime=null,p.programDateTime=null,p.tagList=[],p.duration=0,p.sn=0,p.levelkey=void 0,p.type=void 0,p.loader=null,p.level=-1,p.cc=0,p.startPTS=void 0,p.endPTS=void 0,p.appendedPTS=void 0,p.startDTS=void 0,p.endDTS=void 0,p.start=0,p.deltaPTS=void 0,p.maxStartPTS=void 0,p.minEndPTS=void 0,p.stats=new R.LoadStats,p.urlId=0,p.data=void 0,p.bitrateTest=!1,p.title=null,p.initSegment=null,p.type=T,p}var i=t.prototype;return i.createInitializationVector=function(_){for(var p=new Uint8Array(16),E=12;E<16;E++)p[E]=_>>8*(15-E)&255;return p},i.setDecryptDataFromLevelKey=function(_,p){var E=_;return(_==null?void 0:_.method)==="AES-128"&&_.uri&&!_.iv&&(E=U.LevelKey.fromURI(_.uri),E.method=_.method,E.iv=this.createInitializationVector(p),E.keyFormat="identity"),E},i.setElementaryStreamInfo=function(_,p,E,g,h,u){u===void 0&&(u=!1);var r=this.elementaryStreams,l=r[_];if(!l){r[_]={startPTS:p,endPTS:E,startDTS:g,endDTS:h,partial:u};return}l.startPTS=Math.min(l.startPTS,p),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){A(t,e);function t(i,T,_,p,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=p;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(ae,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"),S=I("./src/utils/logger.ts"),H=function(){function U(A){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=A,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){S.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&&(S.logger.warn("abort previous key loader for type:"+o),n.abort()),!a){S.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){S.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(ae,L,I){"use strict";I.r(L),I.d(L,"LevelDetails",function(){return U});var j=I("./src/polyfills/number.ts");function C(R,A){for(var y=0;y<A.length;y++){var v=A[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(R,v.key,v)}}function S(R,A,y){return A&&C(R.prototype,A),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 A=R.prototype;return A.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},S(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(ae,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 S(R,A){for(var y=0;y<A.length;y++){var v=A[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(R,v.key,v)}}function H(R,A,y){return A&&S(R.prototype,A),y&&S(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(A,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)(A,y,{alwaysNormalize:!0}):this._uri=A}return H(R,[{key:"uri",get:function(){return this._uri}}]),R}()},"./src/loader/load-stats.ts":function(ae,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(ae,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"),S=I.n(C),H=I("./src/loader/fragment.ts"),U=I("./src/loader/level-details.ts"),R=I("./src/loader/level-key.ts"),A=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 A.AttrList(c[1]),D={attrs:x,bitrate:x.decimalInteger("AVERAGE-BANDWIDTH")||x.decimalInteger("BANDWIDTH"),name:x.NAME,url:E.resolve(c[2],u)},O=x.decimalResolution("RESOLUTION");O&&(D.width=O.width,D.height=O.height),i((x.CODECS||"").split(/[ ,]+/).filter(function(w){return w}),D),D.videoCodec&&D.videoCodec.indexOf("avc1")!==-1&&(D.videoCodec=E.convertAVC1ToAVCOTI(D.videoCodec)),r.push(D)}else if(c[3]){var B=new A.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 A.AttrList(f[1]);if(D.TYPE===r){var O={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,O.groupId)||l[0];T(O,B,"audioCodec"),T(O,B,"textCodec")}c.push(O)}}return c},E.parseLevelPlaylist=function(h,u,r,l,f){var c=new U.LevelDetails(u),x=c.fragments,D=null,O=0,B=0,w=0,W=0,P=null,z=new H.Fragment(l,u),Q,re,le,be=-1,ye=!1;for(n.lastIndex=0,c.m3u8=h;(Q=n.exec(h))!==null;){ye&&(ye=!1,z=new H.Fragment(l,u),z.start=w,z.sn=O,z.cc=W,z.level=r,D&&(z.initSegment=D,z.rawProgramDateTime=D.rawProgramDateTime));var ie=Q[1];if(ie){z.duration=parseFloat(ie);var xe=(" "+Q[2]).slice(1);z.title=xe||null,z.tagList.push(xe?["INF",ie,xe]:["INF",ie])}else if(Q[3])Object(j.isFiniteNumber)(z.duration)&&(z.start=w,le&&(z.levelkey=le),z.sn=O,z.level=r,z.cc=W,z.urlId=f,x.push(z),z.relurl=(" "+Q[3]).slice(1),p(z,P),P=z,w+=z.duration,O++,B=0,ye=!0);else if(Q[4]){var Ae=(" "+Q[4]).slice(1);P?z.setByteRange(Ae,P):z.setByteRange(Ae)}else if(Q[5])z.rawProgramDateTime=(" "+Q[5]).slice(1),z.tagList.push(["PROGRAM-DATE-TIME",z.rawProgramDateTime]),be===-1&&(be=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),Z=(" "+Q[re+1]).slice(1),Ue=Q[re+2]?(" "+Q[re+2]).slice(1):"";switch(fe){case"PLAYLIST-TYPE":c.type=Z.toUpperCase();break;case"MEDIA-SEQUENCE":O=c.startSN=parseInt(Z);break;case"SKIP":{var $e=new A.AttrList(Z),tt=$e.decimalInteger("SKIPPED-SEGMENTS");if(Object(j.isFiniteNumber)(tt)){c.skippedSegments=tt;for(var Qe=tt;Qe--;)x.unshift(null);O+=tt}var it=$e.enumeratedString("RECENTLY-REMOVED-DATERANGES");it&&(c.recentlyRemovedDateranges=it.split(" "));break}case"TARGETDURATION":c.targetduration=parseFloat(Z);break;case"VERSION":c.version=parseInt(Z);break;case"EXTM3U":break;case"ENDLIST":c.live=!1;break;case"#":(Z||Ue)&&z.tagList.push(Ue?[Z,Ue]:[Z]);break;case"DIS":W++;case"GAP":z.tagList.push([fe]);break;case"BITRATE":z.tagList.push([fe,Z]);break;case"DISCONTINUITY-SEQ":W=parseInt(Z);break;case"KEY":{var Pe,We=new A.AttrList(Z),Je=We.enumeratedString("METHOD"),et=We.URI,Ye=We.hexadecimalInteger("IV"),ze=We.enumeratedString("KEYFORMATVERSIONS"),He=We.enumeratedString("KEYID"),ft=(Pe=We.enumeratedString("KEYFORMAT"))!=null?Pe:"identity",ht=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(ht.indexOf(ft)>-1){y.logger.warn("Keyformat "+ft+" is not supported from the manifest");continue}else if(ft!=="identity")continue;Je&&(le=R.LevelKey.fromURL(u,et),et&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Je)>=0&&(le.method=Je,le.keyFormat=ft,He&&(le.keyID=He),ze&&(le.keyFormatVersions=ze),le.iv=Ye));break}case"START":{var lt=new A.AttrList(Z),at=lt.decimalFloatingPoint("TIME-OFFSET");Object(j.isFiniteNumber)(at)&&(c.startTimeOffset=at);break}case"MAP":{var mt=new A.AttrList(Z);z.relurl=mt.URI,mt.BYTERANGE&&z.setByteRange(mt.BYTERANGE),z.level=r,z.sn="initSegment",le&&(z.levelkey=le),z.initSegment=null,D=z,ye=!0;break}case"SERVER-CONTROL":{var pt=new A.AttrList(Z);c.canBlockReload=pt.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=pt.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&pt.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=pt.optionalFloat("PART-HOLD-BACK",0),c.holdBack=pt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var me=new A.AttrList(Z);c.partTarget=me.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ce=c.partList;Ce||(Ce=c.partList=[]);var De=B>0?Ce[Ce.length-1]:void 0,Ne=B++,Ee=new H.Part(new A.AttrList(Z),z,u,Ne,De);Ce.push(Ee),z.duration+=Ee.duration;break}case"PRELOAD-HINT":{var Le=new A.AttrList(Z);c.preloadHint=Le;break}case"RENDITION-REPORT":{var ue=new A.AttrList(Z);c.renditionReports=c.renditionReports||[],c.renditionReports.push(ue);break}default:y.logger.warn("line parsed but not handled: "+Q);break}}}P&&!P.relurl?(x.pop(),w-=P.duration,c.partList&&(c.fragmentHint=P)):c.partList&&(p(z,P),z.cc=W,c.fragmentHint=z);var ne=x.length,te=x[0],K=x[ne-1];if(w+=c.skippedSegments*c.targetduration,w>0&&ne&&K){c.averagetargetduration=w/ne;var Y=K.sn;c.endSN=Y!=="initSegment"?Y:0,te&&(c.startCC=te.cc,te.initSegment||c.fragments.every(function(J){return J.relurl&&e(J.relurl)})&&(y.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),z=new H.Fragment(l,u),z.relurl=K.relurl,z.level=r,z.sn="initSegment",te.initSegment=z,c.needSidxRanges=!0))}else c.endSN=0,c.startCC=0;return c.fragmentHint&&(w+=c.fragmentHint.duration),c.totalduration=w,c.endCC=W,be>0&&_(x,be),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 p(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(ae,L,I){"use strict";I.r(L);var j=I("./src/polyfills/number.ts"),C=I("./src/events.ts"),S=I("./src/errors.ts"),H=I("./src/utils/logger.ts"),U=I("./src/utils/mp4-tools.ts"),R=I("./src/loader/m3u8-parser.ts"),A=I("./src/types/loader.ts"),y=I("./src/utils/attr-list.ts");function v(n){var a=n.type;switch(a){case A.PlaylistContextType.AUDIO_TRACK:return A.PlaylistLevelType.AUDIO;case A.PlaylistContextType.SUBTITLE_TRACK:return A.PlaylistLevelType.SUBTITLE;default:return A.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,p=new _(t);return e.loader=p,this.loaders[e.type]=p,p},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:A.PlaylistContextType.MANIFEST,url:i,deliveryDirectives:null})},a.onLevelLoading=function(e,t){var i=t.id,T=t.level,_=t.url,p=t.deliveryDirectives;this.load({id:i,groupId:null,level:T,responseType:"text",type:A.PlaylistContextType.LEVEL,url:_,deliveryDirectives:p})},a.onAudioTrackLoading=function(e,t){var i=t.id,T=t.groupId,_=t.url,p=t.deliveryDirectives;this.load({id:i,groupId:T,level:null,responseType:"text",type:A.PlaylistContextType.AUDIO_TRACK,url:_,deliveryDirectives:p})},a.onSubtitleTrackLoading=function(e,t){var i=t.id,T=t.groupId,_=t.url,p=t.deliveryDirectives;this.load({id:i,groupId:T,level:null,responseType:"text",type:A.PlaylistContextType.SUBTITLE_TRACK,url:_,deliveryDirectives:p})},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 p,E,g,h;switch(e.type){case A.PlaylistContextType.MANIFEST:p=i.manifestLoadingMaxRetry,E=i.manifestLoadingTimeOut,g=i.manifestLoadingRetryDelay,h=i.manifestLoadingMaxRetryTimeout;break;case A.PlaylistContextType.LEVEL:case A.PlaylistContextType.AUDIO_TRACK:case A.PlaylistContextType.SUBTITLE_TRACK:p=0,E=i.levelLoadingTimeOut;break;default:p=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===A.PlaylistContextType.LEVEL&&e.level!==null?u=this.hls.levels[e.level].details:e.type===A.PlaylistContextType.AUDIO_TRACK&&e.id!==null?u=this.hls.audioTracks[e.id].details:e.type===A.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:p,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,p=e.data,E=d(e,i),g=R.default.parseMasterPlaylist(p,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(O){return{id:O.attrs.AUDIO,audioCodec:O.audioCodec}}),l=h.map(function(O){return{id:O.attrs.SUBTITLES,textCodec:O.textCodec}}),f=R.default.parseMasterPlaylistMedia(p,E,"AUDIO",r),c=R.default.parseMasterPlaylistMedia(p,E,"SUBTITLES",l),x=R.default.parseMasterPlaylistMedia(p,E,"CLOSED-CAPTIONS");if(f.length){var D=f.some(function(O){return!O.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,p=i.id,E=i.level,g=i.type,h=d(e,i),u=Object(j.isFiniteNumber)(p)?p: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:S.ErrorTypes.NETWORK_ERROR,details:S.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===A.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:p,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(p,E){var g=p.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:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===A.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 _=S.ErrorDetails.UNKNOWN,p=!1,E=this.getInternalLoader(e);switch(e.type){case A.PlaylistContextType.MANIFEST:_=i?S.ErrorDetails.MANIFEST_LOAD_TIMEOUT:S.ErrorDetails.MANIFEST_LOAD_ERROR,p=!0;break;case A.PlaylistContextType.LEVEL:_=i?S.ErrorDetails.LEVEL_LOAD_TIMEOUT:S.ErrorDetails.LEVEL_LOAD_ERROR,p=!1;break;case A.PlaylistContextType.AUDIO_TRACK:_=i?S.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:S.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,p=!1;break;case A.PlaylistContextType.SUBTITLE_TRACK:_=i?S.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:S.ErrorDetails.SUBTITLE_LOAD_ERROR,p=!1;break}E&&this.resetInternalLoader(e.type);var g={type:S.ErrorTypes.NETWORK_ERROR,details:_,fatal:p,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,p=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 A.PlaylistContextType.MANIFEST:case A.PlaylistContextType.LEVEL:this.hls.trigger(C.Events.LEVEL_LOADED,{details:u,level:p||0,id:E||0,stats:t,networkDetails:T,deliveryDirectives:r});break;case A.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 A.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(ae,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(S){return typeof S=="number"&&isFinite(S)},C=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ae,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(ae,L,I){"use strict";I.r(L);var j=Math.pow(2,32)-1,C=function(){function S(){}return S.init=function(){S.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 S.types)S.types.hasOwnProperty(U)&&(S.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]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);S.HDLR_TYPES={video:R,audio:A};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]);S.STTS=S.STSC=S.STCO=v,S.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),S.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),S.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),S.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]);S.FTYP=S.box(S.types.ftyp,d,n,d,o),S.DINF=S.box(S.types.dinf,S.box(S.types.dref,y))},S.box=function(U){for(var R=8,A=arguments.length,y=new Array(A>1?A-1:0),v=1;v<A;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},S.hdlr=function(U){return S.box(S.types.hdlr,S.HDLR_TYPES[U])},S.mdat=function(U){return S.box(S.types.mdat,U)},S.mdhd=function(U,R){R*=U;var A=Math.floor(R/(j+1)),y=Math.floor(R%(j+1));return S.box(S.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,A>>24,A>>16&255,A>>8&255,A&255,y>>24,y>>16&255,y>>8&255,y&255,85,196,0,0]))},S.mdia=function(U){return S.box(S.types.mdia,S.mdhd(U.timescale,U.duration),S.hdlr(U.type),S.minf(U))},S.mfhd=function(U){return S.box(S.types.mfhd,new Uint8Array([0,0,0,0,U>>24,U>>16&255,U>>8&255,U&255]))},S.minf=function(U){return U.type==="audio"?S.box(S.types.minf,S.box(S.types.smhd,S.SMHD),S.DINF,S.stbl(U)):S.box(S.types.minf,S.box(S.types.vmhd,S.VMHD),S.DINF,S.stbl(U))},S.moof=function(U,R,A){return S.box(S.types.moof,S.mfhd(U),S.traf(A,R))},S.moov=function(U){for(var R=U.length,A=[];R--;)A[R]=S.trak(U[R]);return S.box.apply(null,[S.types.moov,S.mvhd(U[0].timescale,U[0].duration)].concat(A).concat(S.mvex(U)))},S.mvex=function(U){for(var R=U.length,A=[];R--;)A[R]=S.trex(U[R]);return S.box.apply(null,[S.types.mvex].concat(A))},S.mvhd=function(U,R){R*=U;var A=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,A>>24,A>>16&255,A>>8&255,A&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 S.box(S.types.mvhd,v)},S.sdtp=function(U){var R=U.samples||[],A=new Uint8Array(4+R.length),y,v;for(y=0;y<R.length;y++)v=R[y].flags,A[y+4]=v.dependsOn<<4|v.isDependedOn<<2|v.hasRedundancy;return S.box(S.types.sdtp,A)},S.stbl=function(U){return S.box(S.types.stbl,S.stsd(U),S.box(S.types.stts,S.STTS),S.box(S.types.stsc,S.STSC),S.box(S.types.stsz,S.STSZ),S.box(S.types.stco,S.STCO))},S.avc1=function(U){var R=[],A=[],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,A.push(d>>>8&255),A.push(d&255),A=A.concat(Array.prototype.slice.call(v));var o=S.box(S.types.avcC,new Uint8Array([1,R[3],R[4],R[5],252|3,224|U.sps.length].concat(R).concat([U.pps.length]).concat(A))),n=U.width,a=U.height,s=U.pixelRatio[0],e=U.pixelRatio[1];return S.box(S.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,S.box(S.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),S.box(S.types.pasp,new Uint8Array([s>>24,s>>16&255,s>>8&255,s&255,e>>24,e>>16&255,e>>8&255,e&255])))},S.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]))},S.mp4a=function(U){var R=U.samplerate;return S.box(S.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]),S.box(S.types.esds,S.esds(U)))},S.mp3=function(U){var R=U.samplerate;return S.box(S.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]))},S.stsd=function(U){return U.type==="audio"?!U.isAAC&&U.codec==="mp3"?S.box(S.types.stsd,S.STSD,S.mp3(U)):S.box(S.types.stsd,S.STSD,S.mp4a(U)):S.box(S.types.stsd,S.STSD,S.avc1(U))},S.tkhd=function(U){var R=U.id,A=U.duration*U.timescale,y=U.width,v=U.height,d=Math.floor(A/(j+1)),o=Math.floor(A%(j+1));return S.box(S.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]))},S.traf=function(U,R){var A=S.sdtp(U),y=U.id,v=Math.floor(R/(j+1)),d=Math.floor(R%(j+1));return S.box(S.types.traf,S.box(S.types.tfhd,new Uint8Array([0,0,0,0,y>>24,y>>16&255,y>>8&255,y&255])),S.box(S.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])),S.trun(U,A.length+16+20+8+16+8+8),A)},S.trak=function(U){return U.duration=U.duration||4294967295,S.box(S.types.trak,S.tkhd(U),S.mdia(U))},S.trex=function(U){var R=U.id;return S.box(S.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]))},S.trun=function(U,R){var A=U.samples||[],y=A.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=A[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 S.box(S.types.trun,d)},S.initSegment=function(U){S.types||S.init();var R=S.moov(U),A=new Uint8Array(S.FTYP.byteLength+R.byteLength);return A.set(S.FTYP),A.set(R,S.FTYP.byteLength),A},S}();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(ae,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"),S=I("./src/remux/mp4-generator.ts"),H=I("./src/events.ts"),U=I("./src/errors.ts"),R=I("./src/utils/logger.ts"),A=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,O){var B,w,W,P,z,Q,re=c,le=c,be=u.pid>-1,ye=r.pid>-1,ie=r.samples.length,xe=u.samples.length>0,Ae=ie>1,fe=(!be||xe)&&(!ye||Ae)||this.ISGenerated||D;if(fe){this.ISGenerated||(W=this.generateIS(u,r,c));var Z=this.isVideoContiguous,Ue=-1;if(Ae&&(Ue=T(r.samples),!Z&&this.config.forceKeyFrameOnDiscontinuity))if(Q=!0,Ue>0){R.logger.warn("[mp4-remuxer]: Dropped "+Ue+" out of "+ie+" video samples due to a missing keyframe");var $e=this.getVideoStartPts(r.samples);r.samples=r.samples.slice(Ue),r.dropped+=Ue,le+=(r.samples[0].pts-$e)/(r.timescale||9e4)}else Ue===-1&&(R.logger.warn("[mp4-remuxer]: No keyframe found out of "+ie+" video samples"),Q=!1);if(this.ISGenerated){if(xe&&Ae){var tt=this.getVideoStartPts(r.samples),Qe=i(u.samples[0].pts,tt)-tt,it=Qe/r.inputTimeScale;re+=Math.max(0,it),le+=Math.max(0,-it)}if(xe){if(u.samplerate||(R.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),W=this.generateIS(u,r,c)),w=this.remuxAudio(u,re,this.isAudioContiguous,x,ye||Ae||O===A.PlaylistLevelType.AUDIO?le:void 0),Ae){var Pe=w?w.endPTS-w.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,Z,Pe)}}else Ae&&(B=this.remuxVideo(r,le,Z,0));B&&(B.firstKeyFrame=Ue,B.independent=Ue!==-1)}}return this.ISGenerated&&(l.samples.length&&(z=this.remuxID3(l,c)),f.samples.length&&(P=this.remuxText(f,c))),{audio:w,video:B,initSegment:W,independent:Q,text:P,id3:z}},g.generateIS=function(u,r,l){var f=u.samples,c=r.samples,x=this.typeSupported,D={},O=!Object(j.isFiniteNumber)(this._initPTS),B="audio/mp4",w,W,P;if(O&&(w=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):S.default.initSegment([u]),metadata:{channelCount:u.channelCount}},O&&(P=u.inputTimeScale,w=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:S.default.initSegment([r]),metadata:{width:r.width,height:r.height}},O)){P=r.inputTimeScale;var z=this.getVideoStartPts(c),Q=Math.round(P*l);W=Math.min(W,i(c[0].dts,z)-Q),w=Math.min(w,z-Q)}if(Object.keys(D).length)return this.ISGenerated=!0,O&&(this._initPTS=w,this._initDTS=W),{tracks:D,initPTS:w,timescale:P}},g.remuxVideo=function(u,r,l,f){var c=u.inputTimeScale,x=u.samples,D=[],O=x.length,B=this._initPTS,w=this.nextAvcDts,W=8,P,z,Q,re=Number.POSITIVE_INFINITY,le=Number.NEGATIVE_INFINITY,be=0,ye=!1;if(!l||w===null){var ie=r*c,xe=x[0].pts-i(x[0].dts,x[0].pts);w=ie-xe}for(var Ae=0;Ae<O;Ae++){var fe=x[Ae];if(fe.pts=i(fe.pts-B,w),fe.dts=i(fe.dts-B,w),fe.dts>fe.pts){var Z=9e4*.2;be=Math.max(Math.min(be,fe.pts-fe.dts),-1*Z)}fe.dts<x[Ae>0?Ae-1:Ae].dts&&(ye=!0)}ye&&x.sort(function(bt,vt){var rt=bt.dts-vt.dts,wt=bt.pts-vt.pts;return rt||wt}),z=x[0].dts,Q=x[x.length-1].dts;var Ue=Math.round((Q-z)/(O-1));if(be<0){if(be<Ue*-2){R.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(y.toMsFromMpegTsClock)(-Ue,!0)+" ms");for(var $e=be,tt=0;tt<O;tt++)x[tt].dts=$e=Math.max($e,x[tt].pts-Ue),x[tt].pts=Math.max($e,x[tt].pts)}else{R.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(y.toMsFromMpegTsClock)(be,!0)+" ms to overcome this issue");for(var Qe=0;Qe<O;Qe++)x[Qe].dts=x[Qe].dts+be}z=x[0].dts}if(l){var it=z-w,Pe=it>Ue,We=it<-1;if(Pe||We){Pe?R.logger.warn("AVC: "+Object(y.toMsFromMpegTsClock)(it,!0)+" ms ("+it+"dts) hole between fragments detected, filling it"):R.logger.warn("AVC: "+Object(y.toMsFromMpegTsClock)(-it,!0)+" ms ("+it+"dts) overlapping between fragments detected"),z=w;var Je=x[0].pts-it;x[0].dts=z,x[0].pts=Je,R.logger.log("Video: First PTS/DTS adjusted: "+Object(y.toMsFromMpegTsClock)(Je,!0)+"/"+Object(y.toMsFromMpegTsClock)(z,!0)+", delta: "+Object(y.toMsFromMpegTsClock)(it,!0)+" ms")}}e&&(z=Math.max(0,z));for(var et=0,Ye=0,ze=0;ze<O;ze++){for(var He=x[ze],ft=He.units,ht=ft.length,lt=0,at=0;at<ht;at++)lt+=ft[at].data.length;Ye+=lt,et+=ht,He.length=lt,He.dts=Math.max(He.dts,z),He.pts=Math.max(He.pts,He.dts,0),re=Math.min(He.pts,re),le=Math.max(He.pts,le)}Q=x[O-1].dts;var mt=Ye+4*et+8,pt;try{pt=new Uint8Array(mt)}catch(bt){this.observer.emit(H.Events.ERROR,H.Events.ERROR,{type:U.ErrorTypes.MUX_ERROR,details:U.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:mt,reason:"fail allocating video mdat "+mt});return}var me=new DataView(pt.buffer);me.setUint32(0,mt),pt.set(S.default.types.mdat,4);for(var Ce=0;Ce<O;Ce++){for(var De=x[Ce],Ne=De.units,Ee=0,Le=0,ue=Ne.length;Le<ue;Le++){var ne=Ne[Le],te=ne.data,K=ne.data.byteLength;me.setUint32(W,K),W+=4,pt.set(te,W),W+=K,Ee+=4+K}if(Ce<O-1)P=x[Ce+1].dts-De.dts;else{var Y=this.config,J=De.dts-x[Ce>0?Ce-1:Ce].dts;if(Y.stretchShortVideoTrack&&this.nextAudioPts!==null){var ee=Math.floor(Y.maxBufferHole*c),pe=(f?re+f*c:this.nextAudioPts)-De.pts;pe>ee?(P=pe-J,P<0&&(P=J),R.logger.log("[mp4-remuxer]: It is approximately "+pe/90+" ms to the next segment; using duration "+P/90+" ms for the last video frame.")):P=J}else P=J}var Te=Math.round(De.pts-De.dts);D.push(new _(De.key,P,Ee,Te))}if(D.length&&a&&a<70){var Re=D[0].flags;Re.dependsOn=2,Re.isNonSync=0}console.assert(P!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=w=Q+P,this.isVideoContiguous=!0;var Xe=S.default.moof(u.sequenceNumber++,z,v({},u,{samples:D})),nt="video",Fe={data1:Xe,data2:pt,startPTS:re/c,endPTS:(le+P)/c,startDTS:z/c,endDTS:w/c,type:nt,hasAudio:!1,hasVideo:!0,nb:D.length,dropped:u.dropped};return u.samples=[],u.dropped=0,console.assert(pt.length,"MDAT length must not be zero"),Fe},g.remuxAudio=function(u,r,l,f,c){var x=u.inputTimeScale,D=u.samplerate?u.samplerate:x,O=x/D,B=u.isAAC?o:n,w=B*O,W=this._initPTS,P=!u.isAAC&&this.typeSupported.mpeg,z=[],Q=u.samples,re=P?0:8,le=this.nextAudioPts||-1,be=r*x;if(this.isAudioContiguous=l=l||Q.length&&le>0&&(f&&Math.abs(be-le)<9e3||Math.abs(i(Q[0].pts-W,be)-le)<20*w),Q.forEach(function(te){te.pts=i(te.pts-W,be)}),!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,be):le=Q[0].pts}if(u.isAAC)for(var ye=c!==void 0,ie=this.config.maxAudioFramesDrift,xe=0,Ae=le;xe<Q.length;xe++){var fe=Q[xe],Z=fe.pts,Ue=Z-Ae,$e=Math.abs(1e3*Ue/x);if(Ue<=-ie*w&&ye)xe===0&&(R.logger.warn("Audio frame @ "+(Z/x).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Ue/x)+" ms."),this.nextAudioPts=le=Ae=Z);else if(Ue>=ie*w&&$e<d&&ye){var tt=Math.round(Ue/w);Ae=Z-tt*w,Ae<0&&(tt--,Ae+=w),xe===0&&(this.nextAudioPts=le=Ae),R.logger.warn("[mp4-remuxer]: Injecting "+tt+" audio frame @ "+(Ae/x).toFixed(3)+"s due to "+Math.round(1e3*Ue/x)+" ms gap.");for(var Qe=0;Qe<tt;Qe++){var it=Math.max(Ae,0),Pe=C.default.getSilentFrame(u.manifestCodec||u.codec,u.channelCount);Pe||(R.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Pe=fe.unit.subarray()),Q.splice(xe,0,{unit:Pe,pts:it}),Ae+=w,xe++}}fe.pts=Ae,Ae+=w}for(var We=null,Je=null,et,Ye=0,ze=Q.length;ze--;)Ye+=Q[ze].unit.byteLength;for(var He=0,ft=Q.length;He<ft;He++){var ht=Q[He],lt=ht.unit,at=ht.pts;if(Je!==null){var mt=z[He-1];mt.duration=Math.round((at-Je)/O)}else if(l&&u.isAAC&&(at=le),We=at,Ye>0){Ye+=re;try{et=new Uint8Array(Ye)}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:Ye,reason:"fail allocating audio mdat "+Ye});return}if(!P){var pt=new DataView(et.buffer);pt.setUint32(0,Ye),et.set(S.default.types.mdat,4)}}else return;et.set(lt,re);var me=lt.byteLength;re+=me,z.push(new _(!0,B,me,0)),Je=at}var Ce=z.length;if(!Ce)return;var De=z[z.length-1];this.nextAudioPts=le=Je+O*De.duration;var Ne=P?new Uint8Array(0):S.default.moof(u.sequenceNumber++,We/O,v({},u,{samples:z}));u.samples=[];var Ee=We/x,Le=le/x,ue="audio",ne={data1:Ne,data2:et,startPTS:Ee,endPTS:Le,startDTS:Ee,endDTS:Le,type:ue,hasAudio:!0,hasVideo:!1,nb:Ce};return this.isAudioContiguous=!0,console.assert(et.length,"MDAT length must not be zero"),ne},g.remuxEmptyAudio=function(u,r,l,f){var c=u.inputTimeScale,x=u.samplerate?u.samplerate:c,D=c/x,O=this.nextAudioPts,B=(O!==null?O:f.startDTS*c)+this._initDTS,w=f.endDTS*c+this._initDTS,W=D*o,P=Math.ceil((w-B)/W),z=C.default.getSilentFrame(u.manifestCodec||u.codec,u.channelCount);if(R.logger.warn("[mp4-remuxer]: remux empty Audio"),!z){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:z,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 O=u.samples[D];O.pts=i(O.pts-c,r*f)/f,O.dts=i(O.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,w){return B.pts-w.pts});var O=u.samples;return u.samples=[],{samples:O}},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 p(g)},p=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(ae,L,I){"use strict";I.r(L);var j=I("./src/polyfills/number.ts"),C=I("./src/utils/mp4-tools.ts"),S=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=A(s.audio,S.ElementaryStreamTypes.AUDIO)),a||(a=A(s.video,S.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 p={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&&(p.tracks=this.initTracks,this.emitInitSegment=!1),Object(j.isFiniteNumber)(t)||(this.initPTS=p.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=p,T},y}(),R=function(v,d,o){return Object(C.getStartDTS)(v,d)-o};function A(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===S.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}L.default=U},"./src/task-loop.ts":function(ae,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 S=C.prototype;return S.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},S.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},S.onHandlerDestroyed=function(){},S.hasInterval=function(){return!!this._tickInterval},S.hasNextTick=function(){return!!this._tickTimer},S.setInterval=function(U){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,U),!0)},S.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},S.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},S.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},S.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},S.doTick=function(){},C}()},"./src/types/cmcd.ts":function(ae,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 S}),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 S;(function(U){U.DASH="d",U.HLS="h",U.SMOOTH="s",U.OTHER="o"})(S||(S={}));var H;(function(U){U.VOD="v",U.LIVE="l"})(H||(H={}))},"./src/types/level.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"HlsSkip",function(){return S}),I.d(L,"getSkipValue",function(){return H}),I.d(L,"HlsUrlParameters",function(){return U}),I.d(L,"Level",function(){return R});function j(A,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(A,d.key,d)}}function C(A,y,v){return y&&j(A.prototype,y),v&&j(A,v),A}var S;(function(A){A.No="",A.Yes="YES",A.v2="v2"})(S||(S={}));function H(A,y){var v=A.canSkipUntil,d=A.canSkipDateRanges,o=A.endSN,n=y!==void 0?y-o:0;return v&&n<v?d?S.v2:S.Yes:S.No}var U=function(){function A(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=A.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()},A}(),R=function(){function A(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(A,[{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)}}]),A}()},"./src/types/loader.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"PlaylistContextType",function(){return j}),I.d(L,"PlaylistLevelType",function(){return C});var j;(function(S){S.MANIFEST="manifest",S.LEVEL="level",S.AUDIO_TRACK="audioTrack",S.SUBTITLE_TRACK="subtitleTrack"})(j||(j={}));var C;(function(S){S.MAIN="main",S.AUDIO="audio",S.SUBTITLE="subtitle"})(C||(C={}))},"./src/types/transmuxer.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"ChunkMetadata",function(){return j});var j=function(H,U,R,A,y,v){A===void 0&&(A=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=A,this.part=y,this.partial=v};function C(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"AttrList",function(){return S});var j=/^(\d+)x(\d+)$/,C=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,S=function(){function H(R){typeof R=="string"&&(R=H.parseAttrList(R));for(var A in R)R.hasOwnProperty(A)&&(this[A]=R[A])}var U=H.prototype;return U.decimalInteger=function(A){var y=parseInt(this[A],10);return y>Number.MAX_SAFE_INTEGER?Infinity:y},U.hexadecimalInteger=function(A){if(this[A]){var y=(this[A]||"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(A){var y=parseInt(this[A],16);return y>Number.MAX_SAFE_INTEGER?Infinity:y},U.decimalFloatingPoint=function(A){return parseFloat(this[A])},U.optionalFloat=function(A,y){var v=this[A];return v?parseFloat(v):y},U.enumeratedString=function(A){return this[A]},U.bool=function(A){return this[A]==="YES"},U.decimalResolution=function(A){var y=j.exec(this[A]);return y===null?void 0:{width:parseInt(y[1],10),height:parseInt(y[2],10)}},H.parseAttrList=function(A){var y,v={},d='"';for(C.lastIndex=0;(y=C.exec(A))!==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(ae,L,I){"use strict";I.r(L);var j={search:function(S,H){for(var U=0,R=S.length-1,A=null,y=null;U<=R;){A=(U+R)/2|0,y=S[A];var v=H(y);if(v>0)U=A+1;else if(v<0)R=A-1;else return y}return null}};L.default=j},"./src/utils/buffer-helper.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"BufferHelper",function(){return S});var j=I("./src/utils/logger.ts"),C={length:0,start:function(){return 0},end:function(){return 0}},S=function(){function H(){}return H.isBuffered=function(R,A){try{if(R){for(var y=H.getBuffered(R),v=0;v<y.length;v++)if(A>=y.start(v)&&A<=y.end(v))return!0}}catch(d){}return!1},H.bufferInfo=function(R,A,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,A,y)}}catch(n){}return{len:0,start:A,end:A,nextStart:void 0}},H.bufferedInfo=function(R,A,y){A=Math.max(0,A),R.sort(function(p,E){var g=p.start-E.start;return g||E.end-p.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=A,t=A,i=0;i<v.length;i++){var T=v[i].start,_=v[i].end;if(A+y>=T&&A<_)e=T,t=_,a=t-A;else if(A+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(A){return j.logger.log("failed to get media.buffered",A),C}},H}()},"./src/utils/cea-608-parser.ts":function(ae,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},S=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},A={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=S(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 O=D.rows[x].cueStartTime,B=this.logger.time;if(O&&B!==null&&O<B)for(var w=0;w<this.nrRollUpRows;w++)this.rows[f-this.nrRollUpRows+w+1].copy(D.rows[x+w])}}this.currRow=f;var W=this.rows[this.currRow];if(l.indent!==null){var P=l.indent,z=Math.max(P-1,0);W.setCursor(l.indent),l.color=W.chars[z].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 O=this.rows[D].getTextString();O&&(x=D+1,l?f.push("Row "+x+": '"+O+"'"):f.push(O.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,O=!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&&(O=this.parseChars(x,D),O)){var w=this.currentChannel;if(w&&w>0){var W=this.channels[w];W.insertChars(O)}else this.logger.log(o.WARNING,"No channel found yet. TEXT-MODE?")}!c&&!O&&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 p(null,null,c),this.logger.log(o.DEBUG,"Repeated command ("+a([l,f])+") is dropped"),!0;var O=l===20||l===21||l===23?1:2,B=this.channels[O];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),p(l,f,c),this.currentChannel=O,!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,O=(l===16||l===24)&&f>=64&&f<=95;if(!(D||O))return!1;if(E(l,f,x))return p(null,null,x),!0;var B=l<=23?1:2;f>=64&&f<=95?c=B===1?R[l]:y[l]:c=B===1?A[l]:v[l];var w=this.channels[B];return w?(w.setPAC(this.interpretPAC(c,f)),p(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 O;D===17?O=f+80:D===18?O=f+112:O=f+144,this.logger.log(o.INFO,"Special char '"+S(O)+"' in channel "+c),x=[O]}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(",")),p(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,O={};l===16||l===24?(D=Math.floor((f-32)/2),O.background=d[D],f%2===1&&(O.background=O.background+"_semi")):f===45?O.background="transparent":(O.foreground="black",f===47&&(O.underline=!0));var B=l<=23?1:2,w=this.channels[B];return w.setBkgData(O),p(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 p(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(ae,L,I){"use strict";I.r(L),I.d(L,"isCodecType",function(){return C}),I.d(L,"isCodecSupportedInMp4",function(){return S});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 S(H,U){return MediaSource.isTypeSupported((U||"video")+'/mp4;codecs="'+H+'"')}},"./src/utils/cues.ts":function(ae,L,I){"use strict";I.r(L);var j=I("./src/utils/vttparser.ts"),C=I("./src/utils/webvtt-parser.ts"),S=I("./src/utils/texttrack-utils.ts"),H=/\s/,U={newCue:function(A,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 p=Object(j.fixLineBreaks)(t.trim()),E=Object(C.generateCueId)(y,v,p);(!A||!A.cues||!A.cues.getCueById(E))&&(a=new i(y,v,p),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 A&&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(S.addCueToTrack)(A,g)})),o}};L.default=U},"./src/utils/discontinuities.ts":function(ae,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"),S=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 A(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++)A(t[i],s);e.fragmentHint&&A(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(S.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(ae,L,I){"use strict";I.r(L);var j=I("./src/utils/ewma.ts"),C=function(){function S(U,R,A){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=A,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new j.default(U),this.fast_=new j.default(R)}var H=S.prototype;return H.update=function(R,A){var y=this.slow_,v=this.fast_;this.slow_.halfLife!==R&&(this.slow_=new j.default(R,y.getEstimate(),y.getTotalWeight())),this.fast_.halfLife!==A&&(this.fast_=new j.default(A,v.getEstimate(),v.getTotalWeight()))},H.sample=function(R,A){R=Math.max(R,this.minDelayMs_);var y=8*A,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(){},S}();L.default=C},"./src/utils/ewma.ts":function(ae,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 S=C.prototype;return S.sample=function(U,R){var A=Math.pow(this.alpha_,U);this.estimate_=R*(1-A)+A*this.estimate_,this.totalWeight_+=U},S.getTotalWeight=function(){return this.totalWeight_},S.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(ae,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"),S=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(p){if(p===null||!y(p))return p;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(typeof T!="undefined"){if(T.has(p))return T.get(p);T.set(p,E)}function E(){return R(p,arguments,d(this).constructor)}return E.prototype=Object.create(p.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),v(E,p)},U(i)}function R(i,T,_){return A()?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 A(){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(p,E){return p.__proto__=E,p},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 p in _)Object.prototype.hasOwnProperty.call(_,p)&&(i[p]=_[p])}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 p=this.response;(!p||!p.ok)&&(this.stats.aborted=!0,this.controller.abort())},T.abort=function(){var p;this.abortInternal(),(p=this.callbacks)!==null&&p!==void 0&&p.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},T.load=function(p,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(p,this.controller.signal),l=g.onProgress,f=p.responseType==="arraybuffer",c=f?"byteLength":"length";this.context=p,this.config=E,this.callbacks=g,this.request=this.fetchSetup(p,r),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){h.abortInternal(),g.onTimeout(u,p,h.response)},E.timeout),self.fetch(this.request).then(function(x){if(h.response=h.loader=x,!x.ok){var D=x.status,O=x.statusText;throw new t(O||"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,p,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 O={url:D.url,data:x};l&&!Object(j.isFiniteNumber)(E.highWaterMark)&&l(u,p,x,D),g.onSuccess(O,u,p,D)}).catch(function(x){if(self.clearTimeout(h.requestTimeout),u.aborted)return;var D=x.code||0;g.onError({code:D,text:x.message},p,x.details)})},T.getCacheAge=function(){var p=null;if(this.response){var E=this.response.headers.get("age");p=E?parseFloat(E):null}return p},T.loadProgressively=function(p,E,g,h,u){h===void 0&&(h=0);var r=new S.default,l=p.body.getReader(),f=function c(){return l.read().then(function(x){if(x.done)return r.dataLength&&u(E,g,r.flush(),p),Promise.resolve(new ArrayBuffer(0));var D=x.value,O=D.length;return E.loaded+=O,O<h||r.dataLength?(r.push(D),r.dataLength>=h&&u(E,g,r.flush(),p)):u(E,g,D,p),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(_,p,E){var g;return g=i.call(this,_)||this,g.code=void 0,g.details=void 0,g.code=p,g.details=E,g}return T}(U(Error));L.default=a},"./src/utils/imsc1-ttml-parser.ts":function(ae,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"),S=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 A(){return A=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},A.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)),O=Object(U.toTimescaleFromScale)(u,1,r);try{l(a(D,O))}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",O=e(s(f,"styling","style")),B=e(s(f,"layout","region")),w=s(f,"body","[begin]");return[].map.call(w,function(W){var P=t(W,D);if(!P||!W.hasAttribute("begin"))return null;var z=p(W.getAttribute("begin"),x),Q=p(W.getAttribute("dur"),x),re=p(W.getAttribute("end"),x);if(z===null)throw _(W);if(re===null){if(Q===null)throw _(W);re=z+Q}var le=new S.default(z-u,re-u,P);le.id=Object(R.generateCueId)(le.startTime,le.endTime,le.text);var be=B[W.getAttribute("region")],ye=O[W.getAttribute("style")];le.position=10,le.size=80;var ie=i(be,ye),xe=ie.textAlign;if(xe){var Ae=o[xe];Ae&&(le.lineAlign=Ae),le.align=xe}return A(le,ie),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 p(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(ae,L,I){"use strict";I.r(L),I.d(L,"enableLogs",function(){return R}),I.d(L,"logger",function(){return A});var j=function(){},C={trace:j,debug:j,log:j,warn:j,info:j,error:j},S=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){S[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{S.log()}catch(v){S=C}}else S=C}var A=S},"./src/utils/mediakeys-helper.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"KeySystems",function(){return j}),I.d(L,"requestMediaKeySystemAccess",function(){return C});var j;(function(S){S.WIDEVINE="com.widevine.alpha",S.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(ae,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(ae,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 A}),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"),S=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 p=T[_]<<8|T[_+1];return p<0?65536+p:p}function A(T,_){"data"in T&&(_+=T.start,T=T.data);var p=T[_]<<24|T[_+1]<<16|T[_+2]<<8|T[_+3];return p<0?4294967296+p:p}function y(T,_,p){"data"in T&&(_+=T.start,T=T.data),T[_]=p>>24,T[_+1]=p>>16&255,T[_+2]=p>>8&255,T[_+3]=p&255}function v(T,_){var p=[];if(!_.length)return p;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=A(E,u),l=U(E.subarray(u+4,u+8)),f=r>1?u+r:h;if(l===_[0])if(_.length===1)p.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(p,c)}u=f}return p}function d(T){var _=v(T,["moov"]),p=_[0],E=p?p.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=A(u,l);l+=4;var c=0,x=0;r===0?l+=8:l+=16,l+=2;var D=u.end+x,O=R(u,l);l+=2;for(var B=0;B<O;B++){var w=l,W=A(u,w);w+=4;var P=W&2147483647,z=(W&2147483648)>>>31;if(z===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Q=A(u,w);w+=4,h.push({referenceSize:P,subsegmentDuration:Q,info:{duration:Q/f,start:D,end:D+P-1}}),D+=P,w+=4,l=w}return{earliestPresentationTime:c,timescale:f,version:r,referencesCount:O,references:h,moovEndOffset:E}}function o(T){for(var _=[],p=v(T,["moov","trak"]),E=0;E<p.length;E++){var g=p[E],h=v(g,["tkhd"])[0];if(h){var u=h.data[h.start],r=u===0?12:20,l=A(h,r),f=v(g,["mdia","mdhd"])[0];if(f){u=f.data[f.start],r=u===0?12:20;var c=A(f,r),x=v(g,["mdia","hdlr"])[0];if(x){var D=U(x.data.subarray(x.start+8,x.start+12)),O={soun:C.ElementaryStreamTypes.AUDIO,vide:C.ElementaryStreamTypes.VIDEO}[D];if(O){var B=v(g,["mdia","minf","stbl","stsd"])[0],w=void 0;B&&(w=U(B.data.subarray(B.start+12,B.start+16))),_[l]={timescale:c,type:O},_[O]={timescale:c,id:l,codec:w}}}}}}var W=v(T,["moov","mvex","trex"]);return W.forEach(function(P){var z=A(P,4),Q=_[z];Q&&(Q.default={duration:A(P,12),flags:A(P,20)})}),_}function n(T,_){return v(_,["moof","traf"]).reduce(function(p,E){var g=v(E,["tfdt"])[0],h=g.data[g.start],u=v(E,["tfhd"]).reduce(function(r,l){var f=A(l,4),c=T[f];if(c){var x=A(g,4);h===1&&(x*=Math.pow(2,32),x+=A(g,8));var D=c.timescale||9e4,O=x/D;if(isFinite(O)&&(r===null||O<r))return O}return r},null);return u!==null&&isFinite(u)&&(p===null||u<p)?u:p},null)||0}function a(T,_){for(var p=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=A(l,4),c=_[f];if(!c)continue;var x=c.default,D=A(l,0)|(x==null?void 0:x.flags),O=x==null?void 0:x.duration;D&8&&(D&2?O=A(l,12):O=A(l,8));for(var B=c.timescale||9e4,w=v(r,["trun"]),W=0;W<w.length;W++){if(O){var P=A(w[W],4);p=O*P}else p=s(w[W]);c.type===C.ElementaryStreamTypes.VIDEO?E+=p/B:c.type===C.ElementaryStreamTypes.AUDIO&&(g+=p/B)}}if(E===0&&g===0){var z=d(T);if(z!=null&&z.references)return z.references.reduce(function(Q,re){return Q+re.info.duration||0},0)}return E||g}function s(T){var _=A(T,0),p=8;_&1&&(p+=4),_&4&&(p+=4);for(var E=0,g=A(T,4),h=0;h<g;h++){if(_&256){var u=A(T,p);E+=u,p+=4}_&512&&(p+=4),_&1024&&(p+=4),_&2048&&(p+=4)}return E}function e(T,_,p){v(_,["moof","traf"]).forEach(function(E){v(E,["tfhd"]).forEach(function(g){var h=A(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=A(l,4);if(f===0)y(l,4,c-p*r);else{c*=Math.pow(2,32),c+=A(l,8),c-=p*r,c=Math.max(c,0);var x=Math.floor(c/(S+1)),D=Math.floor(c%(S+1));y(l,4,x),y(l,8,D)}})})})}function t(T){var _={valid:null,remainder:null},p=v(T,["moof"]);if(p){if(p.length<2)return _.remainder=T,_}else return _;var E=p[p.length-1];return _.valid=Object(j.sliceUint8)(T,0,E.start-8),_.remainder=Object(j.sliceUint8)(T,E.start-8),_}function i(T,_){var p=new Uint8Array(T.length+_.length);return p.set(T),p.set(_,T.length),p}},"./src/utils/output-filter.ts":function(ae,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 S=C.prototype;return S.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},S.newCue=function(U,R,A){(this.startTime===null||this.startTime>U)&&(this.startTime=U),this.endTime=R,this.screen=A,this.timelineController.createCaptionsTrack(this.trackName)},S.reset=function(){this.cueRanges=[]},C}()},"./src/utils/texttrack-utils.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"sendAddTrackEvent",function(){return C}),I.d(L,"addCueToTrack",function(){return S}),I.d(L,"clearCurrentCues",function(){return H}),I.d(L,"removeCuesInRange",function(){return U}),I.d(L,"getCuesInRange",function(){return A});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 S(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=A(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 A(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(ae,L,I){"use strict";I.r(L);var j={toString:function(S){for(var H="",U=S.length,R=0;R<U;R++)H+="["+S.start(R).toFixed(3)+","+S.end(R).toFixed(3)+"]";return H}};L.default=j},"./src/utils/timescale-conversion.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"toTimescaleFromBase",function(){return C}),I.d(L,"toTimescaleFromScale",function(){return S}),I.d(L,"toMsFromMpegTsClock",function(){return H}),I.d(L,"toMpegTsClockFromTimescale",function(){return U});var j=9e4;function C(R,A,y,v){y===void 0&&(y=1),v===void 0&&(v=!1);var d=R*A*y;return v?Math.round(d):d}function S(R,A,y,v){return y===void 0&&(y=1),v===void 0&&(v=!1),C(R,A,1/y,v)}function H(R,A){return A===void 0&&(A=!1),C(R,1e3,1/j,A)}function U(R,A){return A===void 0&&(A=1),C(R,j,1/A)}},"./src/utils/typed-array.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"sliceUint8",function(){return j});function j(C,S,H){return Uint8Array.prototype.slice?C.slice(S,H):new Uint8Array(Array.prototype.slice.call(C,S,H))}},"./src/utils/vttcue.ts":function(ae,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 S(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 S(j,y)}function U(y){return S(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 A(y,v,d){var o=this,n={enumerable:!0};o.hasBeenReset=!1;var a="",s=!1,e=y,t=v,i=d,T=null,_="",p=!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 p},set:function(c){p=!!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 A.prototype.getCueAsHTML=function(){var y=self.WebVTT;return y.convertCueToDOMTree(self,this.text)},A}()},"./src/utils/vttparser.ts":function(ae,L,I){"use strict";I.r(L),I.d(L,"parseTimeStamp",function(){return S}),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 S(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,""),A=R.align==="middle"?"middle":"center";function y(o,n,a){var s=o;function e(){var T=S(o);if(T===null)throw new Error("Malformed timestamp: "+s);return o=o.replace(/^[^\sa-zA-Z-]+/,""),T}function t(T,_){var p=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){p.set(h,a[l].region);break}break;case"vertical":p.alt(h,u,["rl","lr"]);break;case"line":r=u.split(","),p.integer(h,r[0]),p.percent(h,r[0])&&p.set("snapToLines",!1),p.alt(h,r[0],["auto"]),r.length===2&&p.alt("lineAlign",r[1],["start",A,"end"]);break;case"position":r=u.split(","),p.percent(h,r[0]),r.length===2&&p.alt("positionAlign",r[1],["start",A,"end","line-left","line-right","auto"]);break;case"size":p.percent(h,u);break;case"align":p.alt(h,u,["start",A,"end","left","right"]);break}},/:/,/\s/),_.region=p.get("region",null),_.vertical=p.get("vertical","");var E=p.get("line","auto");E==="auto"&&R.line===-1&&(E=-1),_.line=E,_.lineAlign=p.get("lineAlign","start"),_.snapToLines=p.get("snapToLines",!0),_.size=p.get("size",100),_.align=p.get("align",A);var g=p.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 p=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;p?p=!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&&(p=!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(ae,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"),S=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,A=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,_,p){var E=new C.VTTParser,g=Object(S.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(O){var B=t[i],w=t.ccOffset,W=(l-u)/9e4;if(B!=null&&B.new&&(f!==void 0?w=t.ccOffset=B.start:o(t,i,W)),W&&(w=W-t.presentationOffset),D){var P=O.endTime-O.startTime,z=Object(U.normalizePts)((O.startTime+w-f)*9e4,T*9e4)/9e4;O.startTime=z,O.endTime=z+P}var Q=O.text.trim();O.text=decodeURIComponent(encodeURIComponent(Q)),O.id||(O.id=d(O.startTime,O.endTime,Q)),O.endTime>0&&h.push(O)},E.onparsingerror=function(O){c=O},E.onflush=function(){if(c){p(c);return}_(h)},g.forEach(function(O){if(x)if(A(O,"X-TIMESTAMP-MAP=")){x=!1,D=!0,O.substr(16).split(",").forEach(function(B){A(B,"LOCAL:")?r=B.substr(6):A(B,"MPEGTS:")&&(l=parseInt(B.substr(7)))});try{f=y(r)/1e3}catch(B){D=!1,c=B}return}else O===""&&(x=!1);E.parse(O+`
|
|
`)}),E.flush()}},"./src/utils/xhr-loader.ts":function(ae,L,I){"use strict";I.r(L);var j=I("./src/utils/logger.ts"),C=I("./src/loader/load-stats.ts"),S=/^age:\s*[\d.]+\s*$/m,H=function(){function U(A){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=A?A.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&&S.test(this.loader.getAllResponseHeaders())){var v=this.loader.getResponseHeader("age");y=v?parseFloat(v):null}return y},U}();L.default=H}}).default})},vHTk:function(Ke,we,F){Ke.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(Ke,we,F){"use strict";F.d(we,"a",function(){return lt});var ae=F("rePB"),L=F("VTBJ"),I=F("KQm4"),j=F("U8pU"),C=F("ODXe"),S=F("q1tI"),H=F("TSYQ"),U=F.n(H),R=F("Gytx"),A=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,Ce,De,Ne,Ee){var Le=De[me]||{},ue=De[Ce]||{},ne,te;Le.fixed==="left"?ne=Ne.left[me]:ue.fixed==="right"&&(te=Ne.right[Ce]);var K=!1,Y=!1,J=!1,ee=!1,pe=De[Ce+1],Te=De[me-1];if(Ee==="rtl"){if(ne!==void 0){var Re=Te&&Te.fixed==="left";ee=!Re}else if(te!==void 0){var Xe=pe&&pe.fixed==="right";J=!Xe}}else if(ne!==void 0){var nt=pe&&pe.fixed==="left";K=!nt}else if(te!==void 0){var Fe=Te&&Te.fixed==="right";Y=!Fe}return{fixLeft:ne,fixRight:te,lastFixLeft:K,firstFixRight:Y,lastFixRight:J,firstFixLeft:ee,isSticky:Ne.isSticky}}var T=F("sR1s");function _(me){var Ce=me.cells,De=me.stickyOffsets,Ne=me.flattenColumns,Ee=me.rowComponent,Le=me.cellComponent,ue=me.onHeaderRow,ne=me.index,te=S.useContext(t.a),K=te.prefixCls,Y=te.direction,J;ue&&(J=ue(Ce.map(function(pe){return pe.column}),ne));var ee=Object(T.a)(Ce.map(function(pe){return pe.column}));return S.createElement(Ee,Object.assign({},J),Ce.map(function(pe,Te){var Re=pe.column,Xe=i(pe.colStart,pe.colEnd,Ne,De,Y),nt;return Re&&Re.onHeaderCell&&(nt=pe.column.onHeaderCell(Re)),S.createElement(e.a,Object.assign({},pe,{ellipsis:Re.ellipsis,align:Re.align,component:Le,prefixCls:K,key:ee[Te]},Xe,{additionalProps:nt,rowType:"header"}))}))}_.displayName="HeaderRow";var p=_;function E(me){var Ce=[];function De(ue,ne){var te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ce[te]=Ce[te]||[];var K=ne,Y=ue.filter(Boolean).map(function(J){var ee={key:J.key,className:J.className||"",children:J.title,column:J,colStart:K},pe=1,Te=J.children;return Te&&Te.length>0&&(pe=De(Te,K,te+1).reduce(function(Re,Xe){return Re+Xe},0),ee.hasSubColumns=!0),"colSpan"in J&&(pe=J.colSpan),"rowSpan"in J&&(ee.rowSpan=J.rowSpan),ee.colSpan=pe,ee.colEnd=ee.colStart+pe-1,Ce[te].push(ee),K+=pe,pe});return Y}De(me,0);for(var Ne=Ce.length,Ee=function(ne){Ce[ne].forEach(function(te){!("rowSpan"in te)&&!te.hasSubColumns&&(te.rowSpan=Ne-ne)})},Le=0;Le<Ne;Le+=1)Ee(Le);return Ce}function g(me){var Ce=me.stickyOffsets,De=me.columns,Ne=me.flattenColumns,Ee=me.onHeaderRow,Le=S.useContext(t.a),ue=Le.prefixCls,ne=Le.getComponent,te=S.useMemo(function(){return E(De)},[De]),K=ne(["header","wrapper"],"thead"),Y=ne(["header","row"],"tr"),J=ne(["header","cell"],"th");return S.createElement(K,{className:"".concat(ue,"-thead")},te.map(function(ee,pe){var Te=S.createElement(p,{key:pe,flattenColumns:Ne,cells:ee,stickyOffsets:Ce,rowComponent:Y,cellComponent:J,onHeaderRow:Ee,index:pe});return Te}))}var h=g,u=F("hW8S");function r(me){for(var Ce=me.colWidths,De=me.columns,Ne=me.columCount,Ee=[],Le=Ne||De.length,ue=!1,ne=Le-1;ne>=0;ne-=1){var te=Ce[ne],K=De&&De[ne],Y=K&&K[u.a];(te||Y||ue)&&(Ee.unshift(S.createElement("col",Object.assign({key:ne,style:{width:te,minWidth:te}},Y))),ue=!0)}return S.createElement("colgroup",null,Ee)}var l=r;function f(me,Ce){return Object(S.useMemo)(function(){for(var De=[],Ne=0;Ne<Ce;Ne+=1){var Ee=me[Ne];if(Ee!==void 0)De[Ne]=Ee;else return null}return De},[me.join("_"),Ce])}var c=S.forwardRef(function(me,Ce){var De=me.noData,Ne=me.columns,Ee=me.flattenColumns,Le=me.colWidths,ue=me.columCount,ne=me.stickyOffsets,te=me.direction,K=me.fixHeader,Y=me.offsetHeader,J=me.stickyClassName,ee=me.onScroll,pe=Object(a.a)(me,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Te=S.useContext(t.a),Re=Te.prefixCls,Xe=Te.scrollbarSize,nt=Te.isSticky,Fe=nt&&!K?0:Xe,bt=S.useRef(null),vt=S.useCallback(function(St){Object(s.b)(Ce,St),Object(s.b)(bt,St)},[]);S.useEffect(function(){var St;function Mt(Ie){var ot=Ie.currentTarget,_t=Ie.deltaX;_t&&(ee({currentTarget:ot,scrollLeft:ot.scrollLeft+_t}),Ie.preventDefault())}return(St=bt.current)===null||St===void 0||St.addEventListener("wheel",Mt),function(){var Ie;(Ie=bt.current)===null||Ie===void 0||Ie.removeEventListener("wheel",Mt)}},[]);var rt=Ee[Ee.length-1],wt={fixed:rt?rt.fixed:null,onHeaderCell:function(){return{className:"".concat(Re,"-cell-scrollbar")}}},Dt=Object(S.useMemo)(function(){return Fe?[].concat(Object(I.a)(Ne),[wt]):Ne},[Fe,Ne]),xt=Object(S.useMemo)(function(){return Fe?[].concat(Object(I.a)(Ee),[wt]):Ee},[Fe,Ee]),ct=Object(S.useMemo)(function(){var St=ne.right,Mt=ne.left;return Object(L.a)(Object(L.a)({},ne),{},{left:te==="rtl"?[].concat(Object(I.a)(Mt.map(function(Ie){return Ie+Fe})),[0]):Mt,right:te==="rtl"?St:[].concat(Object(I.a)(St.map(function(Ie){return Ie+Fe})),[0]),isSticky:nt})},[Fe,ne,nt]),yt=f(Le,ue);return S.createElement("div",{style:Object(L.a)({overflow:"hidden"},nt?{top:Y}:{}),ref:vt,className:U()("".concat(Re,"-header"),Object(ae.a)({},J,!!J))},S.createElement("table",{style:{tableLayout:"fixed",visibility:De||yt?null:"hidden"}},S.createElement(l,{colWidths:yt?[].concat(Object(I.a)(yt),[Fe]):[],columCount:ue+1,columns:xt}),S.createElement(h,Object.assign({},pe,{stickyOffsets:ct,columns:Dt,flattenColumns:xt}))))});c.displayName="FixedHeader";var x=c,D=S.createContext(null),O=D;function B(me){var Ce=me.prefixCls,De=me.children,Ne=me.component,Ee=me.cellComponent,Le=me.fixHeader,ue=me.fixColumn,ne=me.horizonScroll,te=me.className,K=me.expanded,Y=me.componentWidth,J=me.colSpan,ee=S.useContext(t.a),pe=ee.scrollbarSize;return S.useMemo(function(){var Te=De;return ue&&(Te=S.createElement("div",{style:{width:Y-(Le?pe:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ce,"-expanded-row-fixed")},Te)),S.createElement(Ne,{className:te,style:{display:K?null:"none"}},S.createElement(e.a,{component:Ee,prefixCls:Ce,colSpan:J},Te))},[De,Ne,Le,ne,te,K,Y,J,pe])}var w=B;function W(me){var Ce=me.className,De=me.style,Ne=me.record,Ee=me.index,Le=me.rowKey,ue=me.getRowKey,ne=me.rowExpandable,te=me.expandedKeys,K=me.onRow,Y=me.indent,J=Y===void 0?0:Y,ee=me.rowComponent,pe=me.cellComponent,Te=me.childrenColumnName,Re=S.useContext(t.a),Xe=Re.prefixCls,nt=Re.fixedInfoList,Fe=S.useContext(O),bt=Fe.fixHeader,vt=Fe.fixColumn,rt=Fe.horizonScroll,wt=Fe.componentWidth,Dt=Fe.flattenColumns,xt=Fe.expandableType,ct=Fe.expandRowByClick,yt=Fe.onTriggerExpand,St=Fe.rowClassName,Mt=Fe.expandedRowClassName,Ie=Fe.indentSize,ot=Fe.expandIcon,_t=Fe.expandedRowRender,Et=Fe.expandIconColumnIndex,Ut=S.useState(!1),wn=Object(C.a)(Ut,2),jn=wn[0],Cn=wn[1],Rn=te&&te.has(me.recordKey);S.useEffect(function(){Rn&&Cn(!0)},[Rn]);var Pn=xt==="row"&&(!ne||ne(Ne)),An=xt==="nest",Jn=Te&&Ne&&Ne[Te],Kn=Pn||An,On;K&&(On=K(Ne,Ee));var Mn=function(m){if(ct&&Kn&&yt(Ne,m),On&&On.onClick){for(var b,M=arguments.length,G=new Array(M>1?M-1:0),k=1;k<M;k++)G[k-1]=arguments[k];(b=On).onClick.apply(b,[m].concat(G))}},Gn;typeof St=="string"?Gn=St:typeof St=="function"&&(Gn=St(Ne,Ee,J));var oi=Object(T.a)(Dt),zn=S.createElement(ee,Object.assign({},On,{"data-row-key":Le,className:U()(Ce,"".concat(Xe,"-row"),"".concat(Xe,"-row-level-").concat(J),Gn,On&&On.className),style:Object(L.a)(Object(L.a)({},De),On?On.style:null),onClick:Mn}),Dt.map(function(N,m){var b=N.render,M=N.dataIndex,G=N.className,k=oi[m],he=nt[m],je;m===(Et||0)&&An&&(je=S.createElement(S.Fragment,null,S.createElement("span",{style:{paddingLeft:"".concat(Ie*J,"px")},className:"".concat(Xe,"-row-indent indent-level-").concat(J)}),ot({prefixCls:Xe,expanded:Rn,expandable:Jn,record:Ne,onExpand:yt})));var st;return N.onCell&&(st=N.onCell(Ne,Ee)),S.createElement(e.a,Object.assign({className:G,ellipsis:N.ellipsis,align:N.align,component:pe,prefixCls:Xe,key:k,record:Ne,index:Ee,dataIndex:M,render:b,shouldCellUpdate:N.shouldCellUpdate},he,{appendNode:je,additionalProps:st}))})),Nt;if(Pn&&(jn||Rn)){var Zn=_t(Ne,Ee,J+1,Rn),fi=Mt&&Mt(Ne,Ee,J);Nt=S.createElement(w,{expanded:Rn,className:U()("".concat(Xe,"-expanded-row"),"".concat(Xe,"-expanded-row-level-").concat(J+1),fi),prefixCls:Xe,fixHeader:bt,fixColumn:vt,horizonScroll:rt,component:ee,componentWidth:wt,cellComponent:pe,colSpan:Dt.length},Zn)}var qn;return Jn&&Rn&&(qn=(Ne[Te]||[]).map(function(N,m){var b=ue(N,m);return S.createElement(W,Object.assign({},me,{key:b,rowKey:b,record:N,recordKey:b,index:m,indent:J+1}))})),S.createElement(S.Fragment,null,zn,Nt,qn)}W.displayName="BodyRow";var P=W,z=S.createContext(null),Q=z;function re(me){var Ce=me.columnKey,De=me.onColumnResize,Ne=S.useRef();return S.useEffect(function(){Ne.current&&De(Ce,Ne.current.offsetWidth)},[]),S.createElement(v.a,{onResize:function(Le){var ue=Le.offsetWidth;De(Ce,ue)}},S.createElement("td",{ref:Ne,style:{padding:0,border:0,height:0}},S.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function le(me){var Ce=me.data,De=me.getRowKey,Ne=me.measureColumnWidth,Ee=me.expandedKeys,Le=me.onRow,ue=me.rowExpandable,ne=me.emptyNode,te=me.childrenColumnName,K=S.useContext(Q),Y=K.onColumnResize,J=S.useContext(t.a),ee=J.prefixCls,pe=J.getComponent,Te=S.useContext(O),Re=Te.fixHeader,Xe=Te.horizonScroll,nt=Te.flattenColumns,Fe=Te.componentWidth;return S.useMemo(function(){var bt=pe(["body","wrapper"],"tbody"),vt=pe(["body","row"],"tr"),rt=pe(["body","cell"],"td"),wt;Ce.length?wt=Ce.map(function(xt,ct){var yt=De(xt,ct);return S.createElement(P,{key:yt,rowKey:yt,record:xt,recordKey:yt,index:ct,rowComponent:vt,cellComponent:rt,expandedKeys:Ee,onRow:Le,getRowKey:De,rowExpandable:ue,childrenColumnName:te})}):wt=S.createElement(w,{expanded:!0,className:"".concat(ee,"-placeholder"),prefixCls:ee,fixHeader:Re,fixColumn:Xe,horizonScroll:Xe,component:vt,componentWidth:Fe,cellComponent:rt,colSpan:nt.length},ne);var Dt=Object(T.a)(nt);return S.createElement(bt,{className:"".concat(ee,"-tbody")},Ne&&S.createElement("tr",{"aria-hidden":"true",className:"".concat(ee,"-measure-row"),style:{height:0}},Dt.map(function(xt){return S.createElement(re,{key:xt,columnKey:xt,onColumnResize:Y})})),wt)},[Ce,ee,Le,Ne,Ee,De,pe,Fe,ne,nt])}var be=S.memo(le);be.displayName="Body";var ye=be,ie=F("wRmb"),xe=F("xEkU"),Ae=F.n(xe);function fe(me){var Ce=Object(S.useRef)(me),De=Object(S.useState)({}),Ne=Object(C.a)(De,2),Ee=Ne[1],Le=Object(S.useRef)(null),ue=Object(S.useRef)([]);function ne(te){Le.current===null&&(ue.current=[],Le.current=Ae()(function(){ue.current.forEach(function(K){Ce.current=K(Ce.current)}),Le.current=null,Ee({})})),ue.current.push(te)}return Object(S.useEffect)(function(){return function(){Ae.a.cancel(Le.current)}},[]),[Ce.current,ne]}function Z(me){var Ce=Object(S.useRef)(me),De=Object(S.useRef)(null);function Ne(){window.clearTimeout(De.current)}function Ee(ue){Ce.current=ue,Ne(),De.current=window.setTimeout(function(){Ce.current=null,De.current=null},100)}function Le(){return Ce.current}return Object(S.useEffect)(function(){return Ne},[]),[Ee,Le]}function Ue(me,Ce,De){var Ne=Object(S.useMemo)(function(){for(var Ee=[],Le=[],ue=0,ne=0,te=0;te<Ce;te+=1)if(De==="rtl"){Le[te]=ne,ne+=me[te]||0;var K=Ce-te-1;Ee[K]=ue,ue+=me[K]||0}else{Ee[te]=ue,ue+=me[te]||0;var Y=Ce-te-1;Le[Y]=ne,ne+=me[Y]||0}return{left:Ee,right:Le}},[me,Ce,De]);return Ne}var $e=Ue;function tt(me){var Ce=me.className,De=me.children;return S.createElement("div",{className:Ce},De)}var Qe=tt,it=F("n6Qo");function Pe(me){var Ce,De=me.prefixCls,Ne=me.record,Ee=me.onExpand,Le=me.expanded,ue=me.expandable,ne="".concat(De,"-row-expand-icon");if(!ue)return S.createElement("span",{className:U()(ne,"".concat(De,"-row-spaced"))});var te=function(Y){Ee(Ne,Y),Y.stopPropagation()};return S.createElement("span",{className:U()(ne,(Ce={},Object(ae.a)(Ce,"".concat(De,"-row-expanded"),Le),Object(ae.a)(Ce,"".concat(De,"-row-collapsed"),!Le),Ce)),onClick:te})}function We(me,Ce,De){var Ne=[];function Ee(Le){(Le||[]).forEach(function(ue,ne){Ne.push(Ce(ue,ne)),Ee(ue[De])})}return Ee(me),Ne}var Je=F("zT1h"),et=F("y0+3"),Ye=function(Ce,De){var Ne,Ee,Le=Ce.scrollBodyRef,ue=Ce.onScroll,ne=Ce.offsetScroll,te=S.useContext(t.a),K=te.prefixCls,Y=((Ne=Le.current)===null||Ne===void 0?void 0:Ne.scrollWidth)||0,J=((Ee=Le.current)===null||Ee===void 0?void 0:Ee.clientWidth)||0,ee=Y&&J*(J/Y),pe=S.useRef(),Te=fe({scrollLeft:0,isHiddenScrollBar:!1}),Re=Object(C.a)(Te,2),Xe=Re[0],nt=Re[1],Fe=S.useRef({delta:0,x:0}),bt=S.useState(!1),vt=Object(C.a)(bt,2),rt=vt[0],wt=vt[1],Dt=function(){wt(!1)},xt=function(Ie){Ie.persist(),Fe.current.delta=Ie.pageX-Xe.scrollLeft,Fe.current.x=0,wt(!0),Ie.preventDefault()},ct=function(Ie){var ot,_t=Ie||((ot=window)===null||ot===void 0?void 0:ot.event),Et=_t.buttons;if(!rt||Et===0){rt&&wt(!1);return}var Ut=Fe.current.x+Ie.pageX-Fe.current.x-Fe.current.delta;Ut<=0&&(Ut=0),Ut+ee>=J&&(Ut=J-ee),ue({scrollLeft:Ut/J*(Y+2)}),Fe.current.x=Ie.pageX},yt=function(){var Ie=Object(et.b)(Le.current).top,ot=Ie+Le.current.offsetHeight,_t=document.documentElement.scrollTop+window.innerHeight;ot-Object(d.a)()<=_t||Ie>=_t-ne?nt(function(Et){return Object(L.a)(Object(L.a)({},Et),{},{isHiddenScrollBar:!0})}):nt(function(Et){return Object(L.a)(Object(L.a)({},Et),{},{isHiddenScrollBar:!1})})},St=function(Ie){nt(function(ot){return Object(L.a)(Object(L.a)({},ot),{},{scrollLeft:Ie/Y*J||0})})};return S.useImperativeHandle(De,function(){return{setScrollLeft:St}}),S.useEffect(function(){var Mt=Object(Je.a)(document.body,"mouseup",Dt,!1),Ie=Object(Je.a)(document.body,"mousemove",ct,!1);return yt(),function(){Mt.remove(),Ie.remove()}},[ee,rt]),S.useEffect(function(){var Mt=Object(Je.a)(window,"scroll",yt,!1),Ie=Object(Je.a)(window,"resize",yt,!1);return function(){Mt.remove(),Ie.remove()}},[]),S.useEffect(function(){Xe.isHiddenScrollBar||nt(function(Mt){var Ie,ot;return Object(L.a)(Object(L.a)({},Mt),{},{scrollLeft:Le.current.scrollLeft/((Ie=Le.current)===null||Ie===void 0?void 0:Ie.scrollWidth)*((ot=Le.current)===null||ot===void 0?void 0:ot.clientWidth)})})},[Xe.isHiddenScrollBar]),Y<=J||!ee||Xe.isHiddenScrollBar?null:S.createElement("div",{style:{height:Object(d.a)(),width:J,bottom:ne},className:"".concat(K,"-sticky-scroll")},S.createElement("div",{onMouseDown:xt,ref:pe,className:U()("".concat(K,"-sticky-scroll-bar"),Object(ae.a)({},"".concat(K,"-sticky-scroll-bar-active"),rt)),style:{width:"".concat(ee,"px"),transform:"translate3d(".concat(Xe.scrollLeft,"px, 0, 0)")}}))},ze=S.forwardRef(Ye);function He(me,Ce){return S.useMemo(function(){var De=!!me;return{isSticky:De,stickyClassName:De?"".concat(Ce,"-sticky-header"):"",offsetHeader:Object(j.a)(me)==="object"&&me.offsetHeader||0,offsetScroll:Object(j.a)(me)==="object"&&me.offsetScroll||0}},[me,Ce])}var ft=[],ht={},lt="rc-table-internal-hook",at=S.memo(function(me){var Ce=me.children;return Ce},function(me,Ce){return A()(me.props,Ce.props)?me.pingLeft!==Ce.pingLeft||me.pingRight!==Ce.pingRight:!1});function mt(me){var Ce,De=me.prefixCls,Ne=me.className,Ee=me.rowClassName,Le=me.style,ue=me.data,ne=me.rowKey,te=me.scroll,K=me.tableLayout,Y=me.direction,J=me.title,ee=me.footer,pe=me.summary,Te=me.id,Re=me.showHeader,Xe=me.components,nt=me.emptyText,Fe=me.onRow,bt=me.onHeaderRow,vt=me.internalHooks,rt=me.transformColumns,wt=me.internalRefs,Dt=me.sticky,xt=ue||ft,ct=!!xt.length,yt=S.useState(0),St=Object(C.a)(yt,2),Mt=St[0],Ie=St[1];S.useEffect(function(){Ie(Object(d.a)())});var ot=S.useMemo(function(){return Object(T.c)(Xe,{})},[Xe]),_t=S.useCallback(function(Kt,Yt){return Object(T.b)(ot,Kt)||Yt},[ot]),Et=S.useMemo(function(){return typeof ne=="function"?ne:function(Kt){var Yt=Kt&&Kt[ne];return Yt}},[ne]),Ut=Object(u.c)(me),wn=Ut.expandIcon,jn=Ut.expandedRowKeys,Cn=Ut.defaultExpandedRowKeys,Rn=Ut.defaultExpandAllRows,Pn=Ut.expandedRowRender,An=Ut.onExpand,Jn=Ut.onExpandedRowsChange,Kn=Ut.expandRowByClick,On=Ut.rowExpandable,Mn=Ut.expandIconColumnIndex,Gn=Ut.expandedRowClassName,oi=Ut.childrenColumnName,zn=Ut.indentSize,Nt=wn||Pe,Zn=oi||"children",fi=S.useMemo(function(){return Pn?"row":me.expandable&&vt===lt&&me.expandable.__PARENT_RENDER_ICON__||xt.some(function(Kt){return Kt&&Object(j.a)(Kt)==="object"&&Kt[Zn]})?"nest":!1},[!!Pn,xt]),qn=S.useState(function(){return Cn||(Rn?We(xt,Et,Zn):[])}),N=Object(C.a)(qn,2),m=N[0],b=N[1],M=S.useMemo(function(){return new Set(jn||m||[])},[jn,m]),G=S.useCallback(function(Kt){var Yt=Et(Kt,xt.indexOf(Kt)),dn,Sn=M.has(Yt);Sn?(M.delete(Yt),dn=Object(I.a)(M)):dn=[].concat(Object(I.a)(M),[Yt]),b(dn),An&&An(!Sn,Kt),Jn&&Jn(dn)},[Et,M,xt,An,Jn]),k=S.useState(0),he=Object(C.a)(k,2),je=he[0],st=he[1],gt=Object(ie.b)(Object(L.a)(Object(L.a)(Object(L.a)({},me),Ut),{},{expandable:!!Pn,expandedKeys:M,getRowKey:Et,onTriggerExpand:G,expandIcon:Nt,expandIconColumnIndex:Mn,direction:Y}),vt===lt?rt:null),Ge=Object(C.a)(gt,2),At=Ge[0],Lt=Ge[1],en=S.useMemo(function(){return{columns:At,flattenColumns:Lt}},[At,Lt]),In=S.useRef(),Vn=S.useRef(),Oe=S.useRef(),En=S.useState(!1),si=Object(C.a)(En,2),Yn=si[0],pi=si[1],$n=S.useState(!1),mn=Object(C.a)($n,2),Fn=mn[0],li=mn[1],mi=fe(new Map),Ti=Object(C.a)(mi,2),Ni=Ti[0],ui=Ti[1],Tn=Object(T.a)(Lt),ei=Tn.map(function(Kt){return Ni.get(Kt)}),Ri=S.useMemo(function(){return ei},[ei.join("_")]),gi=$e(Ri,Lt.length,Y),nn=te&&Object(T.d)(te.y),Bt=te&&Object(T.d)(te.x),un=Bt&&Lt.some(function(Kt){var Yt=Kt.fixed;return Yt}),Vt=S.useRef(),yn=He(Dt,De),tn=yn.isSticky,vi=yn.offsetHeader,_n=yn.offsetScroll,xi=yn.stickyClassName,yi,_i,ti;nn&&(_i={overflowY:"scroll",maxHeight:te.y}),Bt&&(yi={overflowX:"auto"},nn||(_i={overflowY:"hidden"}),ti={width:te.x===!0?"auto":te.x,minWidth:"100%"});var ci=S.useCallback(function(Kt,Yt){ui(function(dn){var Sn=new Map(dn);return Sn.set(Kt,Yt),Sn})},[]),Ci=Z(null),di=Object(C.a)(Ci,2),Ki=di[0],Gi=di[1];function Si(Kt,Yt){if(!Yt)return;typeof Yt=="function"?Yt(Kt):Yt.scrollLeft!==Kt&&(Yt.scrollLeft=Kt)}var hi=function(Yt){var dn=Yt.currentTarget,Sn=Yt.scrollLeft,Nn=typeof Sn=="number"?Sn:dn.scrollLeft,Xi=dn||ht;if(!Gi()||Gi()===Xi){var Fi;Ki(Xi),Si(Nn,Vn.current),Si(Nn,Oe.current),Si(Nn,(Fi=Vt.current)===null||Fi===void 0?void 0:Fi.setScrollLeft)}if(dn){var Qi=dn.scrollWidth,Ji=dn.clientWidth;pi(Nn>0),li(Nn<Qi-Ji)}},Ii=function(){Oe.current&&hi({currentTarget:Oe.current})},zi=function(Yt){var dn=Yt.width;Ii(),st(In.current?In.current.offsetWidth:dn)};S.useEffect(function(){return Ii},[]),S.useEffect(function(){Bt&&Ii()},[Bt]),S.useEffect(function(){vt===lt&&wt&&(wt.body.current=Oe.current)});var ki=_t(["table"],"table"),bi=S.useMemo(function(){return K||(un?te.x==="max-content"?"auto":"fixed":nn||Lt.some(function(Kt){var Yt=Kt.ellipsis;return Yt})?"fixed":"auto")},[nn,un,Lt,K]),Ai,Ui={colWidths:Ri,columCount:Lt.length,stickyOffsets:gi,onHeaderRow:bt,fixHeader:nn},ni=S.useMemo(function(){return ct?null:typeof nt=="function"?nt():nt},[ct,nt]),$i=S.createElement(ye,{data:xt,measureColumnWidth:nn||Bt||tn,expandedKeys:M,rowExpandable:On,getRowKey:Et,onRow:Fe,emptyNode:ni,childrenColumnName:Zn}),Bi=S.createElement(l,{colWidths:Lt.map(function(Kt){var Yt=Kt.width;return Yt}),columns:Lt}),er=pe&&S.createElement(it.b,null,pe(xt)),Vi=_t(["body"]);if(nn||tn){var ji;typeof Vi=="function"?(ji=Vi(xt,{scrollbarSize:Mt,ref:Oe,onScroll:hi}),Ui.colWidths=Lt.map(function(Kt,Yt){var dn=Kt.width,Sn=Yt===At.length-1?dn-Mt:dn;return typeof Sn=="number"&&!Number.isNaN(Sn)?Sn:(Object(y.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):ji=S.createElement("div",{style:Object(L.a)(Object(L.a)({},yi),_i),onScroll:hi,ref:Oe,className:U()("".concat(De,"-body"))},S.createElement(ki,{style:Object(L.a)(Object(L.a)({},ti),{},{tableLayout:bi})},Bi,$i,er),tn&&S.createElement(ze,{ref:Vt,offsetScroll:_n,scrollBodyRef:Oe,onScroll:hi})),Ai=S.createElement(S.Fragment,null,Re!==!1&&S.createElement(x,Object.assign({noData:!xt.length},Ui,en,{direction:Y,offsetHeader:vi,stickyClassName:xi,ref:Vn,onScroll:hi})),ji)}else Ai=S.createElement("div",{style:Object(L.a)(Object(L.a)({},yi),_i),className:U()("".concat(De,"-content")),onScroll:hi,ref:Oe},S.createElement(ki,{style:Object(L.a)(Object(L.a)({},ti),{},{tableLayout:bi})},Bi,Re!==!1&&S.createElement(h,Object.assign({},Ui,en)),$i,er));var Hn=Object(u.b)(me),Oi=S.createElement("div",Object.assign({className:U()(De,Ne,(Ce={},Object(ae.a)(Ce,"".concat(De,"-rtl"),Y==="rtl"),Object(ae.a)(Ce,"".concat(De,"-ping-left"),Yn),Object(ae.a)(Ce,"".concat(De,"-ping-right"),Fn),Object(ae.a)(Ce,"".concat(De,"-layout-fixed"),K==="fixed"),Object(ae.a)(Ce,"".concat(De,"-fixed-header"),nn),Object(ae.a)(Ce,"".concat(De,"-fixed-column"),un),Object(ae.a)(Ce,"".concat(De,"-scroll-horizontal"),Bt),Object(ae.a)(Ce,"".concat(De,"-has-fix-left"),Lt[0]&&Lt[0].fixed),Object(ae.a)(Ce,"".concat(De,"-has-fix-right"),Lt[Lt.length-1]&&Lt[Lt.length-1].fixed==="right"),Ce)),style:Le,id:Te,ref:In},Hn),S.createElement(at,{pingLeft:Yn,pingRight:Fn,props:Object(L.a)(Object(L.a)({},me),{},{stickyOffsets:gi,mergedExpandedKeys:M})},J&&S.createElement(Qe,{className:"".concat(De,"-title")},J(xt)),S.createElement("div",{className:"".concat(De,"-container")},Ai),ee&&S.createElement(Qe,{className:"".concat(De,"-footer")},ee(xt))));Bt&&(Oi=S.createElement(v.a,{onResize:zi},Oi));var Yi=S.useMemo(function(){return{prefixCls:De,getComponent:_t,scrollbarSize:Mt,direction:Y,fixedInfoList:Lt.map(function(Kt,Yt){return i(Yt,Yt,Lt,gi,Y)}),isSticky:tn}},[De,_t,Mt,Y,Lt,gi,Y,tn]),tr=S.useMemo(function(){return Object(L.a)(Object(L.a)({},en),{},{tableLayout:bi,rowClassName:Ee,expandedRowClassName:Gn,componentWidth:je,fixHeader:nn,fixColumn:un,horizonScroll:Bt,expandIcon:Nt,expandableType:fi,expandRowByClick:Kn,expandedRowRender:Pn,onTriggerExpand:G,expandIconColumnIndex:Mn,indentSize:zn})},[en,bi,Ee,Gn,je,nn,un,Bt,Nt,fi,Kn,Pn,G,Mn,zn]),Di=S.useMemo(function(){return{onColumnResize:ci}},[ci]);return S.createElement(t.a.Provider,{value:Yi},S.createElement(O.Provider,{value:tr},S.createElement(Q.Provider,{value:Di},Oi)))}mt.Column=n.a,mt.ColumnGroup=o.a,mt.Summary=it.a,mt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var pt=we.b=mt},wRmb:function(Ke,we,F){"use strict";F.d(we,"a",function(){return A});var ae=F("rePB"),L=F("KQm4"),I=F("VTBJ"),j=F("Ff2n"),C=F("q1tI"),S=F.n(C),H=F("Kwbf"),U=F("Zm9Q"),R=F("hW8S");function A(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=A(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,p=n.onTriggerExpand,E=n.expandIcon,g=n.rowExpandable,h=n.expandIconColumnIndex,u=n.direction,r=n.expandRowByClick,l=C.useMemo(function(){return e||A(t)},[e,t]),f=C.useMemo(function(){if(i){var D,O=h||0,B=l[O],w=(D={},Object(ae.a)(D,R.a,{className:"".concat(s,"-expand-icon-col")}),Object(ae.a)(D,"title",""),Object(ae.a)(D,"fixed",B?B.fixed:null),Object(ae.a)(D,"className","".concat(s,"-row-expand-icon-cell")),Object(ae.a)(D,"render",function(z,Q,re){var le=_(Q,re),be=T.has(le),ye=g?g(Q):!0,ie=E({prefixCls:s,expanded:be,expandable:ye,record:Q,onExpand:p});return r?C.createElement("span",{onClick:function(Ae){return Ae.stopPropagation()}},ie):ie}),D),W=l.slice();return O>=0&&W.splice(O,0,w),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]}we.b=o},wwSX:function(Ke,we,F){Ke.exports=F.p+"static/b2.2c844a2a.svg"},xiVL:function(Ke,we){Ke.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGl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EdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC"},xwll:function(Ke,we,F){Ke.exports=F.p+"static/statistic-icon.df5f8e49.png"},"y0+3":function(Ke,we,F){"use strict";F.d(we,"a",function(){return y}),F.d(we,"b",function(){return d});var ae=/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]=ae.test(n)),L[n]?parseFloat(a)||0:a}function S(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"&&ae.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 A(){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(Ke,we,F){"use strict";F.r(we);var ae=F("5Dmo"),L=F("3S7+"),I=F("fV52"),j=F("3I+P"),C=F("g9YV"),S=F("wCAj"),H=F("Znn+"),U=F("ZTPi"),R=F("5NDa"),A=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"),p=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"),O=F.n(D),B=F("q1tI"),w=F.n(B),W=F("Ty5D"),P=F("9kvl"),z=F("9Bee"),Q=F("wd/R"),re=F.n(Q),le=F("m3rI"),be=F("ErOA"),ye=F("5A5F"),ie=F.n(ye),xe=F("xKgJ"),Ae=F("zqRK"),fe=F.n(Ae),Z=F("+92d"),Ue=F.n(Z),$e=F("wwSX"),tt=F.n($e),Qe=F("zlzj"),it=F.n(Qe),Pe=F("pxMS"),We=F.n(Pe),Je=F("xwll"),et=F.n(Je),Ye=F("a2OE"),ze=F.n(Ye),He=F("Nf5h"),ft=F("LvDl"),ht=F.n(ft),lt=F("1vsH"),at=F("yDOu"),mt=F.n(at),pt=F("SVaM"),me=function(De){var Ne,Ee,Le,ue,ne,te,K,Y,J,ee,pe,Te,Re,Xe,nt,Fe,bt,vt=De.globalSetting,rt=De.user,wt=De.dispatch,Dt=Object(W.h)(),xt={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:(Dt==null||((Ne=Dt.query)===null||Ne===void 0)?void 0:Ne.tab)||"public"},ct=Object(B.useState)(0),yt=Object(x.a)(ct,2),St=yt[0],Mt=yt[1],Ie=Object(B.useState)(0),ot=Object(x.a)(Ie,2),_t=ot[0],Et=ot[1],Ut=Object(B.useState)(0),wn=Object(x.a)(Ut,2),jn=wn[0],Cn=wn[1],Rn=Object(B.useState)([]),Pn=Object(x.a)(Rn,2),An=Pn[0],Jn=Pn[1],Kn=Object(B.useState)([]),On=Object(x.a)(Kn,2),Mn=On[0],Gn=On[1],oi=Object(B.useState)({}),zn=Object(x.a)(oi,2),Nt=zn[0],Zn=zn[1],fi=Object(B.useState)(!1),qn=Object(x.a)(fi,2),N=qn[0],m=qn[1],b=Object(B.useState)([]),M=Object(x.a)(b,2),G=M[0],k=M[1],he=Object(B.useState)(!0),je=Object(x.a)(he,2),st=je[0],gt=je[1],Ge=Object(B.useState)(null),At=Object(x.a)(Ge,2),Lt=At[0],en=At[1],In=Object(B.useState)(xt),Vn=Object(x.a)(In,2),Oe=Vn[0],En=Vn[1],si=Object(B.useRef)(null),Yn=Object(B.useRef)(null),pi=Object(B.useState)([]),$n=Object(x.a)(pi,2),mn=$n[0],Fn=$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],Tn=Object(B.useState)(!1),ei=Object(x.a)(Tn,2),Ri=ei[0],gi=ei[1],nn=Object(B.useState)(""),Bt=Object(x.a)(nn,2),un=Bt[0],Vt=Bt[1],yn=Object(B.useState)([]),tn=Object(x.a)(yn,2),vi=tn[0],_n=tn[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],Ai=ki[1],Ui=rt.userInfo.identity==="teacher",ni=function(){var ke=Object(c.a)(O.a.mark(function Be(Ve,dt,Rt){var Ct,sn,gn,$,de;return O.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return Ve.persist(),Ve!=null&&(Ct=Ve.target)!==null&&Ct!==void 0&&(sn=Ct.style)!==null&&sn!==void 0&&sn.pointerEvents&&(Ve.target.style.pointerEvents="none"),oe.next=4,Object(be.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(!Rt){oe.next=9;break}return Object(lt.S)("/problems/".concat(de==null?void 0:de.identifier,"/oj/").concat(dt==null?void 0:dt.identifier,"?tab=3")),oe.abrupt("return");case 9:Object(lt.S)("/problems/".concat(de==null?void 0:de.identifier,"/oj/").concat(dt==null?void 0:dt.identifier));case 10:Ve!=null&&(gn=Ve.target)!==null&&gn!==void 0&&($=gn.style)!==null&&$!==void 0&&$.pointerEvents&&(Ve.target.style.pointerEvents="auto");case 11:case"end":return oe.stop()}},Be)}));return function(Ve,dt,Rt){return ke.apply(this,arguments)}}();Object(B.useEffect)(function(){var ke=re()().add(0,"days").unix(),Be=localStorage.getItem("problemsclose");if(!Be){ti(!0);return}ke>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 w.a.createElement("div",{className:ie.a.titleWarp},(Oe==null?void 0:Oe.filter)==="mine"?w.a.createElement("span",{className:ie.a.tag},$i[Ve.practice_status]):null,w.a.createElement("span",{title:Be,className:ie.a.hov,onClick:function(Rt){return ni(Rt,Ve)}},Be))}},(Oe==null?void 0:Oe.filter)==="public"?{title:"\u9898\u89E3",dataIndex:"solution_count",width:100,sorter:!0,render:function(Be,Ve){return w.a.createElement("span",{style:{display:"flex"}},w.a.createElement("span",{onClick:function(Rt){return ni(Rt,Ve,!0)},className:"current"},Be),(Ve==null?void 0:Ve.has_video_solution)&&w.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 w.a.createElement(w.a.Fragment,null,Be===1&&w.a.createElement("span",{className:ie.a["btn-style-1"]},"\u7B80\u5355"),Be===2&&w.a.createElement("span",{className:ie.a["btn-style-2"]},"\u9002\u4E2D"),Be===3&&w.a.createElement("span",{className:ie.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(xe.p)()?w.a.createElement(w.a.Fragment,null,Lt===(Ve==null?void 0:Ve.identifier)?w.a.createElement("span",{className:ie.a.hovBtn,onClick:function(Rt){return ni(Rt,Ve)}},"\u5F00\u542F\u5237\u9898"):w.a.createElement(w.a.Fragment,null,Be===0&&w.a.createElement("span",{className:ie.a.statusText},"\u672A\u5F00\u542F"),Be===1&&w.a.createElement("span",{className:ie.a.statusText},"\u8FDB\u884C\u4E2D"),Be===2&&w.a.createElement("span",{className:ie.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 w.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(xe.v)()?{title:"\u64CD\u4F5C",dataIndex:"action",key:"action",align:"right",width:80,render:function(Be,Ve){return w.a.createElement(f.a,{className:"ml10",overlay:Fi(Ve==null?void 0:Ve.identifier,Ve)},w.a.createElement("span",{style:{cursor:"default"},onClick:function(Rt){return Rt.preventDefault()}},w.a.createElement("span",null,"\u66F4\u591A"),w.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?w.a.createElement(f.a,{className:"ml10",overlay:Qi(Ve==null?void 0:Ve.identifier,Ve)},w.a.createElement("span",{style:{cursor:"default"},onClick:function(Rt){return Rt.preventDefault()}},w.a.createElement("span",null,"\u66F4\u591A"),w.a.createElement("i",{style:{display:"inline-block",transform:"scale(0.6)",fontSize:12},className:"c-grey-c iconfont icon-xiajiantou1"}))):"-"}}:null].filter(function(ke){return!!ke}),er=[{title:"\u9898\u76EE\u540D\u79F0",dataIndex:"name",ellipsis:!0,render:function(Be,Ve){return w.a.createElement("span",{className:ie.a.hov,onClick:function(Rt){return ni(Rt,Ve)}},Be)}},{title:"\u96BE\u5EA6",dataIndex:"difficulty",sorter:!0,align:"left",width:90,render:function(Be){return w.a.createElement(w.a.Fragment,null,Be===1&&w.a.createElement("span",{className:ie.a["btn-style-1"]},"\u7B80\u5355"),Be===2&&w.a.createElement("span",{className:ie.a["btn-style-2"]},"\u9002\u4E2D"),Be===3&&w.a.createElement("span",{className:ie.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=w.a.createElement("div",{style:{display:"flex"}},w.a.createElement(r.a,{type:"link",size:"small",onClick:function(Ct){return ni(Ct,Ve)}},"\u5BA1\u6838"),w.a.createElement(r.a,{type:"link",style:{color:"#666"},size:"small",onClick:function(Ct){return Oi({e:Ct,record:Ve,op:"release"})}},"\u79FB\u51FA"));break;case"review_finished":dt=w.a.createElement(r.a,{type:"link",size:"small",onClick:function(Ct){ui(!0),Vi(Ve)}},"\u5BA1\u6838\u8BB0\u5F55");break;default:dt=w.a.createElement(r.a,{type:"link",block:!0,onClick:function(Ct){return Oi({e:Ct,record:Ve,op:"claim"})}},"\u5F00\u59CB\u5BA1\u6838");break}return dt}}].filter(function(ke){return!!ke}),Vi=function(){var ke=Object(c.a)(O.a.mark(function Be(Ve){var dt;return O.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:return _n([]),Ct.next=3,Object(be.a)("/api/practices/".concat(Ve.identifier,"/review_list"),{method:"get"});case 3:dt=Ct.sent,_n(dt==null?void 0:dt.reviews_list);case 5:case"end":return Ct.stop()}},Be)}));return function(Ve){return ke.apply(this,arguments)}}(),ji=[{title:"\u5BA1\u6838\u65F6\u95F4",dataIndex:"review_time",key:"review_time",render:function(Be,Ve){return w.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?w.a.createElement("div",{style:{display:"flex",alignItems:"center"}},w.a.createElement("div",{style:{color:"#333333",marginRight:"5px",whiteSpace:"nowrap"}},"\u672A\u901A\u8FC7"),w.a.createElement("div",{style:{color:"#0152d9",whiteSpace:"nowrap",cursor:"pointer"},onClick:function(){Vt(Ve.description),gi(!0)}},"\u67E5\u770B\u539F\u56E0")):w.a.createElement("span",null,"\u5DF2\u901A\u8FC7")}}];Object(B.useEffect)(function(){tr(),Hn(Oe)},[]),Object(B.useEffect)(function(){if(An.length!==0){var ke;(si==null||((ke=si.current)===null||ke===void 0)?void 0:ke.clientHeight)>98&&Mt(1)}},[An]),Object(B.useEffect)(function(){if(Mn.length!==0){var ke;(Yn==null||((ke=Yn.current)===null||ke===void 0)?void 0:ke.clientHeight)>98&&Et(1)}},[Mn]),Object(B.useEffect)(function(){return wt({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),wt({type:"globalSetting/setShowQuestionBackTop",payload:!0}),function(){wt({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),wt({type:"globalSetting/setShowQuestionBackTop",payload:!1})}},[]),Object(B.useEffect)(function(){var ke;(document.title==="\u4EBA\u5DE5\u667A\u80FD\u79D1\u7814\u670D\u52A1\u5E73\u53F0"||document.title==="\u9996\u9875"||document.title==="\u5B9E\u8DF5\u6559\u5B66\u5E73\u53F0"||(ke=document.title)!==null&&ke!==void 0&&ke.includes("img"))&&(document.title="\u5728\u7EBF\u5237\u9898")},[vt]),Object(B.useEffect)(function(){return document.body.setAttribute("data-custom","initial"),function(){document.body.removeAttribute("data-custom")}},[]);var Hn=function(){var ke=Object(c.a)(O.a.mark(function Be(Ve){var dt,Rt,Ct,sn;return O.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return Ve.search=encodeURIComponent(Ve.search),Ct=ht.a.cloneDeep(Ve),Ct.tag_discipline_id=(dt=Ct.tag_discipline_id)!==null&&dt!==void 0&&dt.includes(-1)?[]:Ct.tag_discipline_id,Ct.source_discipline_id=(Rt=Ct.source_discipline_id)!==null&&Rt!==void 0&&Rt.includes(-1)?[]:Ct.source_discipline_id,console.log(Ct,"sendData"),gt(!0),k([]),$.next=9,Object(be.a)("/api/practices.json",{method:"get",params:Ct});case 9:sn=$.sent,Fn([]),gt(!1),Cn(sn==null?void 0:sn.practices_count),k(sn==null?void 0:sn.practices_list),Ki((sn==null?void 0:sn.recommend_subjects)||[]);case 15:case"end":return $.stop()}},Be)}));return function(Ve){return ke.apply(this,arguments)}}(),Oi=function(){var ke=Object(c.a)(O.a.mark(function Be(Ve){var dt,Rt,Ct,sn,gn,$;return O.a.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return dt=Ve.op,Rt=Ve.description,Ct=Ve.record,sn=Ve.e,gn={op:dt,description:Rt},gt(!0),ve.next=5,Object(be.a)("/api/practices/".concat(Ct.identifier,"/review"),{method:"post",body:gn});case 5:$=ve.sent,gt(!1),dt==="claim"&&($.status===0||$.status==="0")&&ni(sn,Ct),Hn(Oe);case 9:case"end":return ve.stop()}},Be)}));return function(Ve){return ke.apply(this,arguments)}}(),Yi=function(){var ke=Object(c.a)(O.a.mark(function Be(Ve){var dt;return O.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:return gt(!0),Ct.next=3,Object(be.a)("/api/practices/".concat(Ve.identifier,"/publish"),{method:"post"});case 3:dt=Ct.sent,gt(!1),Hn(Oe);case 6:case"end":return Ct.stop()}},Be)}));return function(Ve){return ke.apply(this,arguments)}}(),tr=function(){var ke=Object(c.a)(O.a.mark(function Be(){var Ve,dt,Rt,Ct,sn,gn;return O.a.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:return de.next=2,Object(be.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});case 2:return dt=de.sent,de.next=5,Object(be.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source",position:"index"}});case 5:return Rt=de.sent,de.next=8,Object(be.a)("/api/mypractices/rank_list",{method:"get",params:{}});case 8:Ct=de.sent,dt!=null&&dt.tag_disciplines&&(sn=[{id:-1,name:"\u5168\u90E8",count:dt==null?void 0:dt.totalCount}].concat(Object(h.a)(dt==null?void 0:dt.tag_disciplines)),Jn(sn)),Rt!=null&&Rt.tag_disciplines&&(gn=[{id:-1,name:"\u5168\u90E8",count:Rt==null?void 0:Rt.totalCount}].concat(Object(h.a)(Rt==null?void 0:Rt.tag_disciplines)),Gn(gn)),Zn(Ct||{}),m(Ct==null||((Ve=Ct.my_record)===null||Ve===void 0)?void 0:Ve.outsource);case 13:case"end":return de.stop()}},Be)}));return function(){return ke.apply(this,arguments)}}(),Di=function(Be,Ve){var dt;Oe.page=1;var Rt=Oe["".concat(Ve,"_discipline_id")];(dt=Oe["".concat(Ve,"_discipline_id")])!==null&&dt!==void 0&&dt.includes(Be)?Rt=Rt.filter(function(Ct){return Ct!==Be}):Rt.push(Be),Be===-1?Rt=[-1]:(Rt=Rt.filter(function(Ct){return Ct!==-1}),Rt.length||(Rt=[-1])),Oe["".concat(Ve,"_discipline_id")]=Rt,En(Object(g.a)({},Oe)),Hn(Oe)},Kt=function(Be,Ve){Oe.page=1,Oe[Ve]=typeof Be=="number"?Be:null,En(Object(g.a)({},Oe)),Hn(Oe)},Yt=function(Be){Oe.page=1,Oe.save_search=Be,En(Object(g.a)({},Oe))},dn=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),En(Object(g.a)({},Oe)),Hn(Oe)},Sn=function(Be){Oe.page=1,Oe.filter=Be,Oe.status=null,Oe.practice_status=null,En(Object(g.a)({},Oe)),Hn(Oe)},Nn=function(Be,Ve){if((Ve==null?void 0:Ve.length)===0){E.b.warn("\u8BF7\u9009\u62E9\u8BD5\u9898");return}var dt=function(){var Rt=Object(c.a)(O.a.mark(function Ct(){var sn,gn;return O.a.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:return de.next=2,Object(be.a)("/api/practices/batch_op.json",{method:"post",body:{identifier:Ve,op:Be}});case 2:sn=de.sent,(sn==null?void 0:sn.status)===0&&(gn=G.length===1&&Oe.page!==1?Oe.page-1:Oe.page,Oe.page=gn,En(Object(g.a)({},Oe)),Hn(Oe));case 4:case"end":return de.stop()}},Ct)}));return function(){return Rt.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=w.a.createElement(i.a,null,(Oe==null?void 0:Oe.filter)==="public"?w.a.createElement(i.a.Item,{onClick:function(){return Nn(0,mn)}},"\u6279\u91CF\u79FB\u51FA\u516C\u5171"):[w.a.createElement(i.a.Item,{key:2,onClick:function(){return Nn(1,mn)}},"\u6279\u91CF\u79FB\u5165\u516C\u5171"),w.a.createElement(i.a.Item,{key:1,onClick:function(){return Nn(0,mn)}},"\u6279\u91CF\u79FB\u51FA\u516C\u5171")],Object(xe.v)()&&w.a.createElement(i.a.Item,{onClick:function(){return nr()}},"\u53D1\u9001\u81F3\u8BD5\u9898\u5E93"),(Oe==null?void 0:Oe.filter)!=="public"&&w.a.createElement(i.a.Item,{onClick:function(){return Nn(-1,mn)}},"\u6279\u91CF\u5220\u9664")),Fi=function(Be,Ve){return w.a.createElement(i.a,null,(Ve==null?void 0:Ve.practice_status)===1?w.a.createElement(i.a.Item,{onClick:function(){return Nn(0,[Be])}},"\u79FB\u51FA\u516C\u5171"):w.a.createElement(i.a.Item,{onClick:function(){return Nn(1,[Be])}},"\u79FB\u5165\u516C\u5171"),(Oe==null?void 0:Oe.filter)==="mine"?w.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,w.a.createElement(i.a.Item,{onClick:function(){return Object(lt.S)("/problems/".concat(Be,"/ojedit"))}},"\u7F16\u8F91"),(Oe==null?void 0:Oe.filter)!=="public"&&w.a.createElement(i.a.Item,{onClick:function(){return Nn(-1,[Be])}},"\u5220\u9664"))},Qi=function(Be,Ve){return w.a.createElement(i.a,null,w.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"),w.a.createElement(i.a.Item,{onClick:function(){return Object(lt.S)("/problems/".concat(Be,"/ojedit"))}},"\u7F16\u8F91"),w.a.createElement(i.a.Item,{onClick:function(){return Nn(-1,[Be])}},"\u5220\u9664"))},Ji=function(Be){Fn(Be)},nr=function(){if(!mn.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:w.a.createElement("div",null,w.a.createElement("p",{className:"mt20"},"\u5DF2\u9009",w.a.createElement("span",{className:"c-light-primary"},mn.length),"\u4E2D\u4E2A\u7F16\u7A0B\u5237\u9898\u53D1\u9001\u81F3\u8BD5\u9898\u5E93\u6210\u4E3A\u7F16\u7A0B\u9898"),w.a.createElement("div",null,"\u8BF7\u9009\u62E9\u7F16\u7A0B\u9898\u7684\u8BED\u8A00\uFF1A"),w.a.createElement(e.a.Group,{onChange:function(dt){Be=dt.target.value,document.getElementById("send-to-modal").style.display="none"}},w.a.createElement(e.a,{value:"c"},"C"),w.a.createElement(e.a,{value:"c++"},"C++"),w.a.createElement(e.a,{value:"java"},"Java"),w.a.createElement(e.a,{value:"python"},"Python")),w.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)(O.a.mark(function Rt(){var Ct;return O.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:if(Be){gn.next=3;break}return document.getElementById("send-to-modal").style.display="block",gn.abrupt("return",Promise.reject());case 3:return gn.next=5,Object(be.a)("/api/practices/send_to_item_bank.json",{method:"post",body:{identifiers:mn,language:Be}});case 5:Ct=gn.sent,(Ct==null?void 0:Ct.status)===0&&E.b.success("\u53D1\u9001\u6210\u529F");case 7:case"end":return gn.stop()}},Rt)}));function dt(){return Ve.apply(this,arguments)}return dt}()})},dr={selectedRowKeys:mn,columnWidth:40,onChange:Ji};return w.a.createElement("section",{className:ie.a.wrap},w.a.createElement(He.a,{img:We.a,title:"\u7F16\u7A0B\u5237\u9898",sunTitle:"\u5FEB\u901F\u63D0\u9AD8\u7F16\u7A0B\u80FD\u529B",bannerExtraContent:w.a.createElement(f.a,{overlay:w.a.createElement(i.a,null,w.a.createElement(i.a.Item,{key:1,onClick:function(){P.d.push("/problems/add")}},"\u65B0\u5EFA\u9898\u76EE"),w.a.createElement(i.a.Item,{key:2,onClick:function(){P.d.push("/problems/batchAdd")}},"\u6279\u91CF\u5BFC\u5165\u9898\u76EE"))},w.a.createElement("div",{className:ie.a.addQuestion,style:{visibility:Object(xe.v)()||N?"visible":"hidden"}},w.a.createElement("span",null,"\u65B0\u5EFA\u9898\u76EE")))}),w.a.createElement("div",{className:ie.a.content},w.a.createElement("div",{className:ie.a.left},w.a.createElement(o.a,{className:"".concat(ie.a.filterPoint," mb10"),align:"top"},w.a.createElement(a.a,{className:ie.a.filterType},"\u77E5\u8BC6\u70B9"),w.a.createElement(a.a,{className:ie.a.btnWarp,ref:si,style:St>0?{height:St===1?76:"auto"}:{}},An==null?void 0:An.map(function(ke){var Be;return w.a.createElement("div",{onClick:function(){return Di(ke.id,"tag")},key:ke.id,className:Oe!=null&&(Be=Oe.tag_discipline_id)!==null&&Be!==void 0&&Be.includes(ke.id)?"".concat(ie.a.btn," ").concat(ie.a.btnActive):ie.a.btn},w.a.createElement("span",{title:ke.name},ke.name),w.a.createElement("span",{className:ie.a.count,style:{display:ke.count?"block":"none"}},ke.count))})),!!St&&w.a.createElement(a.a,{className:ie.a.fold},St===1?w.a.createElement("div",{onClick:function(){return Mt(2)},className:ie.a.action},"\u5C55\u5F00",w.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-zhankai4"})):w.a.createElement("div",{onClick:function(){return Mt(1)},className:ie.a.action},"\u6536\u8D77",w.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-shouqi3"})))),!!Mn.length&&w.a.createElement(o.a,{className:ie.a.filterPoint,align:"top",style:{marginBottom:22}},w.a.createElement(a.a,{className:ie.a.filterType},"\u6765\u6E90"),w.a.createElement(a.a,{className:ie.a.btnWarp,ref:Yn,style:_t>0?{height:_t===1?76:"auto"}:{}},Mn==null?void 0:Mn.map(function(ke){var Be;return w.a.createElement("div",{onClick:function(){return Di(ke.id,"source")},key:ke.id,className:Oe!=null&&(Be=Oe.source_discipline_id)!==null&&Be!==void 0&&Be.includes(ke.id)?"".concat(ie.a.btn," ").concat(ie.a.btnActive):ie.a.btn},w.a.createElement("span",{title:ke.name},ke.name),w.a.createElement("span",{className:ie.a.count},ke.count))}),!!_t&&w.a.createElement(a.a,{className:ie.a.fold},_t===1?w.a.createElement("div",{onClick:function(){return Et(2)},className:ie.a.action},"\u5C55\u5F00",w.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-zhankai4"})):w.a.createElement("div",{onClick:function(){return Et(1)},className:ie.a.action},"\u6536\u8D77",w.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-shouqi3"}))))),w.a.createElement("div",{className:ie.a.control},w.a.createElement(v.a,{suffixIcon:w.a.createElement("i",{className:"iconfont icon-a-bianzu11"}),allowClear:!0,placeholder:"\u96BE\u5EA6",value:Oe==null?void 0:Oe.difficulty,onChange:function(Be){return Kt(Be,"difficulty")}},w.a.createElement(v.a.Option,{value:1},"\u7B80\u5355"),w.a.createElement(v.a.Option,{value:2},"\u9002\u4E2D"),w.a.createElement(v.a.Option,{value:3},"\u56F0\u96BE")),Object(xe.p)()&&Oe.filter==="public"&&w.a.createElement(v.a,{suffixIcon:w.a.createElement("i",{className:"iconfont icon-a-bianzu11"}),allowClear:!0,placeholder:"\u72B6\u6001",value:Oe==null?void 0:Oe.status,onChange:function(Be){return Kt(Be,"status")}},w.a.createElement(v.a.Option,{value:0},"\u672A\u5F00\u542F"),w.a.createElement(v.a.Option,{value:1},"\u8FDB\u884C\u4E2D"),w.a.createElement(v.a.Option,{value:2},"\u5DF2\u901A\u8FC7")),Object(xe.p)()&&Oe.filter==="mine"&&w.a.createElement(v.a,{suffixIcon:w.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 Kt(Be,"practice_status")}},w.a.createElement(v.a.Option,{value:0},"\u672A\u53D1\u5E03"),w.a.createElement(v.a.Option,{value:1},"\u5DF2\u516C\u5F00"),w.a.createElement(v.a.Option,{value:2},"\u672A\u5BA1\u6838"),w.a.createElement(v.a.Option,{value:3},"\u5BA1\u6838\u4E2D"),w.a.createElement(v.a.Option,{value:4},"\u672A\u516C\u5F00"),w.a.createElement(v.a.Option,{value:5},"\u672A\u901A\u8FC7")),Object(xe.p)()&&Oe.filter==="all"&&w.a.createElement(v.a,{suffixIcon:w.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 Kt(Be,"practice_status")}},w.a.createElement(v.a.Option,{value:0},"\u672A\u53D1\u5E03"),w.a.createElement(v.a.Option,{value:1},"\u5DF2\u516C\u5F00"),w.a.createElement(v.a.Option,{value:2},"\u672A\u5BA1\u6838"),w.a.createElement(v.a.Option,{value:3},"\u5BA1\u6838\u4E2D"),w.a.createElement(v.a.Option,{value:4},"\u672A\u516C\u5F00"),w.a.createElement(v.a.Option,{value:5},"\u672A\u901A\u8FC7")),w.a.createElement(A.a.Search,{className:ie.a.search,size:"large",suffix:w.a.createElement("i",{className:"iconfont icon-sousuo9 font14 ".concat(ie.a.searchIcon),onClick:function(){Oe.page=1,Oe.search=Oe.save_search,En(Object(g.a)({},Oe)),Oe.save_search&&Object(pt.a)({name:Oe.save_search,copywriting:Oe.save_search,position:"Practice"}),Hn(Oe)}}),placeholder:Object(xe.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 Yt(Be.target.value)},onSearch:function(Be){Oe.page=1,Oe.search=Oe.save_search,En(Object(g.a)({},Oe)),Be&&Object(pt.a)({name:Be,copywriting:Be,position:"Practice"}),Hn(Oe)}})),w.a.createElement("div",{className:ie.a.table},w.a.createElement("div",{className:ie.a.tabWarp,style:Object(xe.v)()||N?{}:{height:10,border:0}},Object(xe.v)()?w.a.createElement(U.a,{className:ie.a.tab,activeKey:li?"not_reviewed":Oe.filter,onChange:Sn,tabBarExtraContent:!li&&w.a.createElement(f.a,{overlay:Xi},w.a.createElement("span",{className:"ant-dropdown-link font14 current",onClick:function(Be){return Be.preventDefault()}},"\u6279\u91CF\u64CD\u4F5C"," ",w.a.createElement("i",{style:{display:"inline-block",transform:"scale(0.6)",fontSize:12},className:"iconfont icon-xiajiantou1"})))},w.a.createElement(U.a.TabPane,{tab:"\u516C\u5171",key:"public"}),w.a.createElement(U.a.TabPane,{tab:"\u5168\u90E8",key:"all"}),w.a.createElement(U.a.TabPane,{tab:"\u6211\u521B\u5EFA\u7684",key:"mine"}),w.a.createElement(U.a.TabPane,{tab:"\u5BA1\u6838\u5217\u8868",key:"not_reviewed"})):N?w.a.createElement(U.a,{className:ie.a.tab,activeKey:li?"not_reviewed":Oe.filter,onChange:Sn},w.a.createElement(U.a.TabPane,{tab:"\u516C\u5171",key:"public"}),w.a.createElement(U.a.TabPane,{tab:"\u6211\u521B\u5EFA\u7684",key:"mine"}),w.a.createElement(U.a.TabPane,{tab:"\u5BA1\u6838\u5217\u8868",key:"not_reviewed"})):null),li?w.a.createElement("div",{className:ie.a.tabWarp,style:Object(xe.v)()||N?{}:{height:10,border:0}},w.a.createElement(U.a,{className:ie.a.tab,activeKey:Oe.filter,onChange:Sn},w.a.createElement(U.a.TabPane,{tab:"\u5F85\u5BA1\u6838",key:"not_reviewed"}),w.a.createElement(U.a.TabPane,{tab:"\u5BA1\u6838\u4E2D",key:"under_review"}),w.a.createElement(U.a.TabPane,{tab:"\u5DF2\u5BA1\u6838",key:"review_finished"}))):null,!(Object(xe.v)()||N)&&Ui&&w.a.createElement("div",{className:ie.a.tabWarp2,style:{justifyContent:"end"}},hi?w.a.createElement(o.a,{align:"middle"},w.a.createElement(o.a,{onClick:function(){return Ai(!0)},align:"middle",className:"current"},w.a.createElement("i",{className:"iconfont icon-yixuan mr10 c-light-primary font20"}),w.a.createElement("span",null,"\u5DF2\u9009",w.a.createElement("span",{className:"c-light-primary"},mn.length),"\u4E2A")),w.a.createElement(r.a,{className:"mr20 ml40",ghost:!0,onClick:function(){Ii(!1),Fn([])},type:"primary"},"\u53D6\u6D88"),w.a.createElement(r.a,{onClick:nr,ghost:!0,type:"primary"},"\u786E\u8BA4\u53D1\u9001")):w.a.createElement(r.a,{onClick:function(){return Ii(!0)},type:"primary"},w.a.createElement("i",{className:"iconfont icon-fasong mr5"}),"\u53D1\u9001\u81F3\u8BD5\u9898\u5E93")),w.a.createElement(S.a,{rowSelection:Object(xe.v)()||hi?dr:void 0,className:ie.a.customTable,dataSource:G,bordered:!1,rowKey:function(Be){return Be.identifier},columns:li?er:Bi,rowClassName:ie.a.row,loading:st,onRow:function(Be){return{onMouseEnter:function(dt){en(Be==null?void 0:Be.identifier)},onMouseLeave:function(dt){en(null)}}},onChange:dn,pagination:{pageSize:Oe.per_page,total:jn,current:Oe.page,showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!1,position:["bottomCenter"],showTotal:function(Be){return w.a.createElement("span",{className:"mr10"},"\u5171",w.a.createElement("span",{className:"c-orange"},Be),"\u6761\u6570\u636E")}}}))),w.a.createElement("div",{className:ie.a.right},w.a.createElement("div",{className:ie.a.statistics},w.a.createElement("img",{src:et.a,alt:""}),w.a.createElement("div",{className:ie.a.title},"\u6211\u7684\u5237\u9898\u7EDF\u8BA1"),w.a.createElement(o.a,{justify:"space-between"},w.a.createElement(a.a,{className:ie.a.statisticItem},w.a.createElement("div",{className:ie.a.rate},Object(xe.p)()?(Nt==null||((Ee=Nt.my_record)===null||Ee===void 0)?void 0:Ee.passed_ratio)||0:"-"),w.a.createElement("div",{className:ie.a.dataName},"\u901A\u8FC7\u7387(%)")),w.a.createElement(a.a,{className:ie.a.statisticItem},w.a.createElement("div",{className:ie.a.rate},Object(xe.p)()?(Nt==null||((Le=Nt.my_record)===null||Le===void 0)?void 0:Le.passed_count)||0:"-"),w.a.createElement("div",{className:ie.a.dataName},"\u5237\u9898\u6570")),w.a.createElement(a.a,{className:ie.a.statisticItem},w.a.createElement("div",{className:ie.a.rate},Object(xe.p)()?Nt==null||((ue=Nt.my_record)===null||ue===void 0||((ne=ue.time_count)===null||ne===void 0))?void 0:ne.toFixed(2):"-"),w.a.createElement("div",{className:ie.a.dataName},"\u7D2F\u8BA1\u65F6\u957F(h)")))),!!(Nt!=null&&(te=Nt.rank_list)!==null&&te!==void 0&&te.length)&&w.a.createElement(w.a.Fragment,null,((K=rt.userInfo)===null||K===void 0?void 0:K.user_id)!=2&&Object(xe.m)()&&(vt==null||((Y=vt.setting)===null||Y===void 0)?void 0:Y.main_site)&&_i&&(di==null?void 0:di.length)>0&&w.a.createElement("div",{className:ie.a.problemsclose,style:{position:"relative"}},w.a.createElement(j.a,{autoplay:!0,pauseOnDotsHover:!0,style:{width:292,height:170,marginBottom:"10px",overflow:"hidden"}},di==null?void 0:di.map(function(ke,Be){return w.a.createElement("div",{style:{display:"flex"},key:Be},w.a.createElement("a",{href:"/paths/".concat(ke.identifier)},w.a.createElement("img",{style:{width:"292px",height:"170px",borderRadius:"4px"},src:le.a.IMG_SERVER+"/"+ke.image_url})))})),w.a.createElement("img",{className:ie.a.imgsrc,onClick:function(){localStorage.setItem("problemsclose",re()().add(1,"days").unix()+""),ti(!1)},src:mt.a})),w.a.createElement("div",{className:ie.a.sort},w.a.createElement("div",{className:ie.a.rankHeader},w.a.createElement("img",{src:ze.a,className:ie.a.rankIcon})),!!(Nt!=null&&(J=Nt.my_record)!==null&&J!==void 0&&J.rank)&&w.a.createElement("div",{className:"".concat(ie.a.myRecord," ").concat(ie.a.li)},w.a.createElement("span",{className:"".concat(ie.a.recordPrefix," ").concat(ie.a.mine)},"\u6211\u7684"),w.a.createElement("img",{className:ie.a.avatar,src:le.a.IMG_SERVER+"/images/"+(Nt==null||((ee=Nt.my_record)===null||ee===void 0)?void 0:ee.image_url)}),w.a.createElement("span",{title:Nt==null||((pe=Nt.my_record)===null||pe===void 0)?void 0:pe.nickname,className:ie.a.nickname},Nt==null||((Te=Nt.my_record)===null||Te===void 0)?void 0:Te.nickname),w.a.createElement("span",{className:ie.a.myRank},(Nt==null||((Re=Nt.my_record)===null||Re===void 0)?void 0:Re.rank)>999?"\u7B2C999+\u540D":"\u7B2C".concat(Nt==null||((Xe=Nt.my_record)===null||Xe===void 0)?void 0:Xe.rank,"\u540D")),w.a.createElement("span",{className:ie.a.questionNumber},Nt==null||((nt=Nt.my_record)===null||nt===void 0)?void 0:nt.passed_count,"\u9898")),Nt==null||((Fe=Nt.rank_list)===null||Fe===void 0)?void 0:Fe.map(function(ke,Be){var Ve=Be+1;return Be===0&&(Ve=Ue.a),Be===1&&(Ve=tt.a),Be===2&&(Ve=it.a),w.a.createElement("div",{className:ie.a.li,key:Be},typeof Ve=="number"?w.a.createElement("span",{className:ie.a.recordPrefix},Ve):w.a.createElement("span",{className:ie.a.recordPrefix},w.a.createElement("img",{src:Ve})),w.a.createElement("img",{className:ie.a.avatar,src:le.a.IMG_SERVER+"/images/"+(ke==null?void 0:ke.image_url)}),w.a.createElement("span",{title:ke==null?void 0:ke.nickname,className:ie.a.nickname},ke==null?void 0:ke.nickname),w.a.createElement("span",{className:ie.a.questionNumber},ke.passed_count,"\u9898"))}))))),w.a.createElement(_.a,{title:"\u5BA1\u6838\u8BB0\u5F55",visible:Ni,onOk:function(){},onCancel:function(){ui(!1)},footer:null,closable:!0},w.a.createElement(S.a,{dataSource:vi,columns:ji})),w.a.createElement(_.a,{title:"\u672A\u901A\u8FC7\u539F\u56E0",visible:Ri,onOk:function(){},onCancel:function(){gi(!1)},footer:null,closable:!0},w.a.createElement(z.a,{value:un})),w.a.createElement(_.a,{visible:bi,centered:!0,width:1e3,okText:"\u786E\u5B9A\u53D1\u9001",onCancel:function(){return Ai(!1)},cancelText:"\u8FD4\u56DE\u5217\u8868",onOk:Object(c.a)(O.a.mark(function ke(){return O.a.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:Ai(!1),nr();case 2:case"end":return Ve.stop()}},ke)})),title:"\u67E5\u770B\u5DF2\u9009"},w.a.createElement("div",{className:"font14 c-light-primary mb10"},"\u5DF2\u9009",mn==null?void 0:mn.length,"\u4E2A"),w.a.createElement("div",{style:{height:400,overflow:"auto"}},G==null||((bt=G.filter(function(ke){return mn.includes(ke.identifier)}))===null||bt===void 0)?void 0:bt.map(function(ke,Be){var Ve,dt;return w.a.createElement("div",{key:Be,className:ie.a.sendModal},w.a.createElement("div",{className:ie.a.li},w.a.createElement("p",null,ke==null?void 0:ke.name),w.a.createElement("div",{className:ie.a.bottom},w.a.createElement("span",{className:"c-grey-333"},"\u7F16\u7A0B\u9898"),w.a.createElement("i",{className:ie.a.line}),w.a.createElement("span",{className:"c-grey-333"},ke.difficulty===1&&"\u7B80\u5355",ke.difficulty===2&&"\u9002\u4E2D",ke.difficulty===3&&"\u56F0\u96BE"),w.a.createElement("i",{className:ie.a.line}),w.a.createElement("span",null,"\u521B\u5EFA\u8005\xA0",w.a.createElement(L.a,{title:ke==null?void 0:ke.creator},w.a.createElement("span",{className:"c-grey-333"},(ke==null||((Ve=ke.creator)===null||Ve===void 0)?void 0:Ve.length)>6?(ke==null||((dt=ke.creator)===null||dt===void 0)?void 0:dt.substr(0,3))+"...":ke==null?void 0:ke.creator))),w.a.createElement("i",{className:ie.a.line}),w.a.createElement("span",{className:ie.a.des},"\u66F4\u65B0\xA0",w.a.createElement("span",{className:"c-grey-333"},ke==null?void 0:ke.updated_at)))),w.a.createElement("div",{className:ie.a.del,onClick:function(){Fn(mn.filter(function(Ct){return Ct!==ke.identifier}))}},"\u5220\u9664"))}))))};we.default=Object(P.a)(function(Ce){var De=Ce.user,Ne=Ce.globalSetting;return{user:De,glob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